Subject: [xml2rfc] #357 (Version 2 cli): <name> in <figure> is position dependent

From: "xml2rfc issue tracker" <[email-masked]>
Date: Mon, 06 Aug 2018 22:28:14 -0000

#357: <name> in <figure> is position dependent

 If I put name directly after figure I get (showing XML and text):
 xml
 {{{
 <figure>
 <name>That's some nice code.
 </name>
 <artwork>println(&quot;some code&quot;)
 </artwork>
 </figure>
 }}}

 text
 {{{
    println("some code")

                       Figure 1: That's some nice code.

 }}}

 Doing <name> *after* the artwork:

 {{{
 <figure>
 <artwork>println(&quot;some code&quot;)
 </artwork>
 <name>That's some nice code.
 </name>
 </figure>
 }}}

 renders:

 {{{
    println("some code"): That's some nice code.

                                   Figure 1

 }}}

-- 
---------------------------+----------------------------------
 Reporter:  [email-masked]   |      Owner:  [email-masked]
     Type:  defect         |     Status:  new
 Priority:  medium         |  Milestone:
Component:  Version 2 cli  |    Version:  2.4.x
 Keywords:                 |
---------------------------+----------------------------------

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

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Mon, 06 Aug 2018 22:34:47 -0000

Comment (by [email-masked]):

 Ok, I think you've found an undefined area in the v2v3 converter here.

 FWIW, I think you'll have a smoother path forward with the v3 renderer if
 you generate v3-compliant xml.  To see what your xml turns into before it
 hits the renderer, I'd suggest running any generated xml through the v2v3
 converter.  That will let you see if you're using non-v3 constructs
 (because the xml coming out is different from the xml going in).

-- 
----------------------------+----------------------------------
Resolution:                 |   Keywords:
----------------------------+----------------------------------

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

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Mon, 06 Aug 2018 22:47:45 -0000

Comment (by [email-masked]):

 Fair enough, but shouldn't this be a XML validation error?

 (my AST has the caption as the last child, so it's a bit tricky to print
 it first)

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

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Tue, 07 Aug 2018 19:41:39 -0000

> Fair enough, but shouldn't this be a XML validation error?

 I just tried to reproduce this, and got (with mixed v2 and v3 input:
 {{{
 ERROR: Unable to validate the XML document:...
  <string>: Line 950: Element figure content does not follow the DTD,
 expecting (iref* , preamble? , artwork , postamble?), got (name artwork)
  <string>: Line 951: No declaration for element name
  <string>: Line 952: Element artwork was declared #PCDATA but contains non
 text nodes
  <string>: Line 953: No declaration for element name
 }}}

 With v3 input and <name> on the artwork, I got:
 {{{
    document.xml(0): Warning: Invalid document after running preptool: Did
 not expect element name there, line 1091
 }}}

 So this looks to me as if the construct does result in an XML validation
 error (or warning).

 Did you not get any of these?

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