Closed hassanakbar4 closed 3 years ago
@{"email"=>"cabo@tzi.org", "name"=>nil, "username"=>nil} commented
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.)
@{"email"=>"julian.reschke@gmx.de", "name"=>nil, "username"=>nil} commented
I believe the message shouldn't be produced at all, right? After all, the purpose of the PI is to hide the comments.
@{"email"=>"cabo@tzi.org", "name"=>nil, "username"=>nil} commented
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.
@{"email"=>"henrik@levkowetz.com", "name"=>nil, "username"=>nil} commented
Replying to hassanakbar4/tractive-test#389 (comment:3):
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.
Yes, that's right. Will fix.
@{"email"=>"henrik@levkowetz.com", "name"=>nil, "username"=>nil} changed status from new
to closed
@{"email"=>"henrik@levkowetz.com", "name"=>nil, "username"=>nil} changed resolution from ` to
fixed`
@{"email"=>"henrik@levkowetz.com", "name"=>nil, "username"=>nil} commented
Fixed in [2856]:
Fixed a bug related to cref handling. Fixes issue #389.
component_Version 2 cli
resolution_fixed
type_defect
| by cabo@tzi.orgI 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:
Issue migrated from trac:389 at 2021-10-20 18:31:22 +0500