hassanakbar4 / tractive-test

0 stars 0 forks source link

line-breaking of URLs in references #168

Closed hassanakbar4 closed 2 years ago

hassanakbar4 commented 11 years ago

component_Version 2 cli resolution_fixed type_defect | by arusso@amsl.com


For reference elements where the target contains a URL, I think the output (txt and nroff) would ideally be as follows.

(Fyi, Changeset 743 has to do with line breaking of URLs in references; I'm not sure if/how it relates to the points above.)

Examples below are from the attached XML.

v2 output (bad):
   [OASIS-SAMLv2-CORE]
              Cantor, S., Ed., Kemp, J., Ed., Philpott, R., Ed., and E.
              Maler, Ed., "Assertions and Protocols for the OASIS
              Security Assertion Markup Language (SAML) V2.0", OASIS
              Standard saml-core-2.0-os, March 2005, <http://docs.oasis-
              open.org/security/saml/v2.0/saml-core-2.0-os.pdf>.

Desired output:
   [OASIS-SAMLv2-CORE]
              Cantor, S., Ed., Kemp, J., Ed., Philpott, R., Ed., and E.
              Maler, Ed., "Assertions and Protocols for the OASIS
              Security Assertion Markup Language (SAML) V2.0", OASIS
              Standard saml-core-2.0-os, March 2005, 
              <http://docs.oasis-open.org/security/saml/v2.0/
              saml-core-2.0-os.pdf>.

v1 output (also bad, btw):
   [OASIS-SAMLv2-CORE]
              Cantor, S., Ed., Kemp, J., Ed., Philpott, R., Ed., and E.
              Maler, Ed., "Assertions and Protocols for the OASIS
              Security Assertion Markup Language (SAML) V2.0", OASIS
              Standard saml-core-2.0-os, March 2005, <http://
              docs.oasis-open.org/security/saml/v2.0/
              saml-core-2.0-os.pdf>.

There's also an issue where the v2 nroff output does not match the v2 txt output, and the output creates a line over 72 chars:

v2 text (OK):
   [WEBER]    Weber, C., "Attacking Software Globalization", March 2010,
              <http://www.lookout.net/files/
              Chris_Weber_Character%20Transformations%20v1.7_IUC33.pdf>.

v2 nroff (bad):
.ti 3
[WEBER]    Weber, C., "Attacking Software Globalization", March 2010,
<http://www.lookout.net/files/Chris_Weber_Character%20Transformations
%20v1.7_IUC33.pdf>.

which yields text that's over 72 chars. 

Desired nroff (in order to match v2 text):
.ti 3
[WEBER]    Weber, C., "Attacking Software Globalization", March 2010,
<http://www.lookout.net/file/
.br
Chris_Weber_Character%20Transformations%20v1.7_IUC33.pdf>.

Side note about the XML: turning the rfcedstyle PI off and on around the references section is a work-around in order to get it to make the indentation less when there are long anchors.


Issue migrated from trac:168 at 2021-10-20 18:05:01 +0500

hassanakbar4 commented 11 years ago

@{"email"=>"arusso@amsl.com", "name"=>nil, "username"=>nil} uploaded file test6943.xml (65.2 KiB)

hassanakbar4 commented 10 years ago

@{"email"=>"ietf@augustcellars.com", "name"=>nil, "username"=>nil} changed owner from henrik@levkowetz.com to ietf@augustcellars.com

hassanakbar4 commented 10 years ago

@{"email"=>"ietf@augustcellars.com", "name"=>nil, "username"=>nil} changed status from new to closed

hassanakbar4 commented 10 years ago

@{"email"=>"ietf@augustcellars.com", "name"=>nil, "username"=>nil} changed resolution from ` tofixed`

hassanakbar4 commented 10 years ago

@{"email"=>"ietf@augustcellars.com", "name"=>nil, "username"=>nil} commented


Fixed in 1052

The algorithm for wrapping of URLs is now different than it was. We now insert a zero-width breaking space (&zwsp;) after slashes (except the leading two) and use word joins (&wj;) after the hyphens (and the leading slashes). The line wrapping algorithm will break first on normal spaces, then on the zwsp and then on the wj. It will only use the latter two elements if the URL is too long to fit into a single line.