Subject: [xml2rfc] #264 (Version 2 cli): xml:space and spanx style attribute implemented

From: "xml2rfc issue tracker" <[email-masked]>
Date: Wed, 02 Jul 2014 22:01:51 -0000

#264: xml:space and spanx style attribute implemented

 I fixed xml:space in xml2rfc v2, '''without''' modifying the DTD
 (rfc2629.dtd).

 The behavior is exactly as one would expect, which I tested against a
 variety of inputs for both the artwork and spanx elements.

 Additionally, I implemented the semi-documented spanx styles bare, vemph,
 strong, deluxe, and nobreak. (See xml2rfc-12.pdf.)

 I am including two patches: the first patch includes extensive debugging
 information during development. The second patch has this debugging
 information removed. (This upload also has my modifications for the other
 ticket, but those modifications such as to the DTD can be removed if it is
 overly bothersome. For the defect at hand, no DTD modification is
 necessary.)

-- 
-------------------------------------+----------------------------------
 Reporter:  [email-masked]     |      Owner:  [email-masked]
     Type:  defect                   |     Status:  new
 Priority:  major                    |  Milestone:
Component:  Version 2 cli            |    Version:  2.4.x
 Keywords:  xml:space, spanx, style  |
-------------------------------------+----------------------------------

Ticket URL: <https://tools.ietf.org/tools/xml2rfc/trac/ticket/264>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Wed, 02 Jul 2014 22:09:44 -0000

Comment (by [email-masked]):

 Can we please start with a description of a bug?

 What do you mean by "I fixed xml:space in xml2rfc v2" -- what was broken?

-- 
-----------------------------------+-------------------------------------
  Reporter:  [email-masked]  |      Owner:  [email-masked]
      Type:  defect                |     Status:  new
  Priority:  major                 |  Milestone:
 Component:  Version 2 cli         |    Version:  2.4.x
Resolution:                        |   Keywords:  xml:space, spanx, style
-----------------------------------+-------------------------------------

Ticket URL: <https://tools.ietf.org/tools/xml2rfc/trac/ticket/264#comment:1>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Wed, 02 Jul 2014 22:17:01 -0000

Comment (by [email-masked]):

 Description of bug:
 Setting xml:space to "preserve" or "default" did not have any effect. It
 should have had an effect. Various documentation insists that it should
 have an effect; therefore, it should be fixed.

 draft-reschke-xml2rfc says "Determines whitespace handling."
 Prior documentation dating back to RFC 2629 indicates that xml:space
 should have some effect.

Ticket URL: <https://tools.ietf.org/tools/xml2rfc/trac/ticket/264#comment:2>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Wed, 02 Jul 2014 22:21:43 -0000

More detailed description of fix (regarding xml:space):
 xml:space = "preserve" preserves whitespace (SP and HTAB) and line breaks.
 xml:space = "default" collapses whitespace (SP and HTAB) and line breaks
 into a single space.

 For either value, auto-wrap (i.e., wrap to box/word break) is unaffected.

Ticket URL: <http://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/264#comment:3>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Wed, 02 Jul 2014 22:24:06 -0000

This is bug, not a feature. Citing myself: "According to the DTD, the
 default value is "preserve". Tests however show that it doesn't have any
 effect on processing; thus this attribute will be removed in future
 versions of the vocabulary."

 What problem are you trying to solve here?

Ticket URL: <https://tools.ietf.org/tools/xml2rfc/trac/ticket/264#comment:4>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Wed, 02 Jul 2014 22:27:37 -0000

The problem I solved is that it did not work; now it works. I see the
 draft documentation. Now the draft documentation can be updated to reflect
 that it has an effect on processing, as described above.

 To your specific question: "What problem are you trying to solve here?" I
 tried to solve the problem where xml:space = preserve did not preserve
 whitespace and line breaks; conversely, xml:space = default did not
 collapse whitespace and line breaks into a single space.

Ticket URL: <https://tools.ietf.org/tools/xml2rfc/trac/ticket/264#comment:5>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Thu, 03 Jul 2014 05:39:30 -0000

a) Now it has an effect in one of three v2 implementations., and still
 will be removed in v3. So what's the gain?

 b) I'm trying to understand why this (mis-)feature is needed in practice.
 Please provide use cases.

Ticket URL: <http://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/264#comment:6>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Thu, 03 Jul 2014 06:08:51 -0000

a) Well I am willing to work on the other v2 implementations, if you point
 me to them.

 b) I have already provided several use cases (i.e., related to prior posts
 about line breaks). In addition: the HTML output is meaningfully enhanced.
 For example if you want to have code snippets inline in the text, and you
 want to highlight particular segments, <spanx style="vstrong"
 xml:space="preserve"> does the job. Remember that <spanx> elements cannot
 be nested. In some languages the number and positioning of spaces is
 meaningful--hence preservation of whitespace is desirable in and of
 itself, without recourse to no-break-space kludges. I am sure that others
 can chime in with other examples.

Ticket URL: <http://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/264#comment:7>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Thu, 03 Jul 2014 06:24:43 -0000

Changes (by [email-masked]):

 * status:  new => closed
 * resolution:   => wontfix

Comment:

 Again, spanx is dead and being phased out. Please use your energy to
 review the v3 spec and provide feedback.

 Preservation of whitespace in code examples is indeed needed, and that's
 what we currently have <artwork> for.

-- 
-----------------------------------+-------------------------------------
  Reporter:  [email-masked]  |      Owner:  [email-masked]
      Type:  defect                |     Status:  closed
  Priority:  major                 |  Milestone:
 Component:  Version 2 cli         |    Version:  2.4.x
Resolution:  wontfix               |   Keywords:  xml:space, spanx, style
-----------------------------------+-------------------------------------

Ticket URL: <http://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/264#comment:8>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Thu, 03 Jul 2014 13:49:57 -0000

Look, preservation of whitespace in code examples is indeed needed, but
 <artwork> forces these examples into figures that in HTML are rendered
 with the <pre> tag. In text it also forces the code to be offset by blank
 lines; I have need to refer to these code examples inline with the text
 (without extraneous CRLF CRLF characters).

Ticket URL: <http://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/264#comment:9>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Thu, 03 Jul 2014 14:25:47 -0000

I recommend that you provide a complete example (of spec text, not
 markup), showing what you need. And please do so on the rfc-interest
 mailing list. This is a new feature, so that's the right venue to discuss
 it.

Ticket URL: <http://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/264#comment:10>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>