Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xref with format="title" doesn't work as expected #563

Closed
ietf-svn-bot opened this issue Nov 5, 2020 · 15 comments
Closed

xref with format="title" doesn't work as expected #563

ietf-svn-bot opened this issue Nov 5, 2020 · 15 comments

Comments

@ietf-svn-bot
Copy link

owner:jennifer@painless-security.com resolution_fixed type_defect | by arusso@amsl.com


xref with format="title" for a document title yields square brackets and quotes around the title in the text file. (PDF and HTML outputs are OK, but the text output is not.)

XML:

This document obsoletes "<xref target="RFC5575" format="title"/>" 
<xref target="RFC5575" format="default"/>

Text output:

   This document obsoletes "["Dissemination of Flow Specification
   Rules"]" [RFC5575]

Also: If quotes are manually typed into the source (as in the XML above) to get the desired output (title enclosed in quotes), the text rendering automatically puts quotes in -- resulting in 2 sets of quotes.

Desired output:

   This document obsoletes "Dissemination of Flow Specification
   Rules" [RFC5575]

Files:
https://www.rfc-editor.org/v3test/test-draft-ietf-idr-rfc5575bis-27.xml
https://www.rfc-editor.org/v3test/test-draft-ietf-idr-rfc5575bis-27.txt
https://www.rfc-editor.org/v3test/test-draft-ietf-idr-rfc5575bis-27.html
https://www.rfc-editor.org/v3test/test-draft-ietf-idr-rfc5575bis-27.pdf

Side note: format="title" works fine with an internal section title. i.e., the issue seems to affect an xref to a , not a

. (Tested in Section 9 of the files above.)


Issue migrated from trac:563 at 2022-02-08 07:10:39 +0000

@ietf-svn-bot
Copy link
Author

@henrik@levkowetz.com changed status from new to closed

@ietf-svn-bot
Copy link
Author

@henrik@levkowetz.com changed resolution from `` to fixed

@ietf-svn-bot
Copy link
Author

@henrik@levkowetz.com commented


Fixed in 3c855d4:

Changed the text output for on request from the RPC. Fixes issue #563.

@ietf-svn-bot
Copy link
Author

@ietf-svn-bot
Copy link
Author

@arusso@amsl.com commented


Seems quotes are being added when rendering TXT (and not HTML or PDF). This is not desired.

(Ideally, the title is output by itself, no matter the output format. The author puts quotation marks in the XML if they want quotation marks in the output.)

Example: (same input file as above. new output files created by v3.5.0)

https://www.rfc-editor.org/v3test/test2.txt
This document obsoletes ""Dissemination of Flow Specification Rules""

https://www.rfc-editor.org/v3test/test2.html (and pdf)
This document obsoletes "Dissemination of Flow Specification Rules"

(The fix was released in v3.4.0.)

@ietf-svn-bot
Copy link
Author

@mahoney@nostrum.com commented


This is still an issue with xml2rfc 3.5.0, but I don't seem to have the privileges to reopen the ticket (I can only "leave as closed" or "deploy").

See Section 1 of the following for examples:
https://www.rfc-editor.org/v3test/draft-ietf-anima-autonomic-control-plane-30.txt

@ietf-svn-bot
Copy link
Author

@rjsparks@nostrum.com changed status from closed to reopened

@ietf-svn-bot
Copy link
Author

@rjsparks@nostrum.com changed resolution from fixed to ``

@ietf-svn-bot
Copy link
Author

@jennifer@painless-security.com changed status from reopened to assigned

@ietf-svn-bot
Copy link
Author

@jennifer@painless-security.com changed owner from `` to jennifer@painless-security.com

@ietf-svn-bot
Copy link
Author

@jennifer@painless-security.com commented


Fixing this. There are two cases where quotes are inserted - <xref> elements with and without enclosed text. I think a case can be made that they should be kept when there is enclosed text, because the author cannot add their own quotes in that context. However, the HTML writer does not include quotes in that case. For purposes of this issue, I'm going to match that behavior. If such quotes are indeed wanted, I think that should be filed as a separate issue.

@ietf-svn-bot
Copy link
Author

@jennifer@painless-security.com changed status from assigned to closed

@ietf-svn-bot
Copy link
Author

@jennifer@painless-security.com changed resolution from `` to fixed

@ietf-svn-bot
Copy link
Author

@jennifer@painless-security.com commented


Fixed in 2be113c:

Remove quotes from in text writer. Fixes #563. Commit ready for merge.

@ietf-svn-bot
Copy link
Author

@rjsparks@nostrum.com commented


Fixed in 48ab565:

Merged in 2be113c from jennifer@painless-security.com:\n Remove quotes from in text writer. Fixes #563.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant