Subject: [xml2rfc] #389 (Version 2 cli): Error: Found unexpected inline element: <cref> Error: Found unexpected inline element: <cref>

From: "xml2rfc issue tracker" <[email-masked]>
Date: Wed, 19 Dec 2018 00:53:10 -0000

#389: Error: Found unexpected inline element: <cref> Error: Found unexpected
inline element: <cref>

 I don't understand the error message (and it's not an error, xml2rfc runs
 to completion).
 There is only one cref, but two identical message lines.  No context
 given, but I expect the message lines relate to this one cref.

 https://github.com/cbor-wg/CBORbis/blob/master/draft-ietf-cbor-7049bis.md

 (kdrfc this to reproduce.)

 Excerpt from the XML:

 {{{
 <t>...bla...bla...bla... are not considered part of the semantics.
   <cref anchor="_20_cabo">I don’t understand this last sentence.  Can we
 leave it out?</cref></t>
 }}}

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

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

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Wed, 19 Dec 2018 01:06:42 -0000

Comment (by [email-masked]):

 Oh, found it:

 raw_txt.py:
 {{{
             elif element.tag == 'cref' and \
                 element.pis['comments'] == 'yes':
 ...
             else:
                 xml2rfc.log.error("Found unexpected inline element: <%s>"
 % element.tag)
 }}}

 So the message is produced every time there is a cref that is being
 suppressed by the PIs.

 (Clearly, the "and" should be a nested if for the new else part to stay as
 it is.)

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

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

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Wed, 19 Dec 2018 05:24:13 -0000

Comment (by [email-masked]):

 I believe the message shouldn't be produced at all, right? After all, the
 purpose of the PI is to *hide* the comments.

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

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Wed, 19 Dec 2018 08:04:50 -0000

No, the message should not be produced for the cbor-wg file.

 The code in the else part looks fine to me, though: It is a "cannot
 happen" catch-all for inline elements that made it through validation but
 are not handled by the code.
 However, to make this else part work, the cref elif cannot be limited to
 comments=yes, so the latter needs to moved into a nested if.

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

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Wed, 19 Dec 2018 08:37:12 -0000

Comment (by [email-masked]):

 Yes, that's right.  Will fix.

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

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Thu, 20 Dec 2018 14:07:54 -0000

Changes (by [email-masked]):

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

Comment:

 Fixed in [2856]:

 Fixed a bug related to cref handling.  Fixes issue #389.

-- 
----------------------------+----------------------------------
  Reporter:  [email-masked]   |      Owner:  [email-masked]
      Type:  defect         |     Status:  closed
  Priority:  minor          |  Milestone:
 Component:  Version 2 cli  |    Version:
Resolution:  fixed          |   Keywords:
----------------------------+----------------------------------

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