hassanakbar4 / tractive-test

0 stars 0 forks source link

incomplete reference returns confusing error #363

Closed hassanakbar4 closed 3 years ago

hassanakbar4 commented 6 years ago

component_Version_3_cli_txt resolution_wontfix type_defect | by miek@miek.nl


Having an incomplete reference:

<reference anchor='NIST' target=''>
 <front>
 <title>Digital Signature Standard (DSS)</title>
 </front>
 <seriesInfo name="National Institute of Standards and Technology" value='' />
</reference>

generates this error from xml2rfc:

6239.xml(0): Warning: Invalid document before running preptool: Expecting an element , got nothing, line 484

element what?


Issue migrated from trac:363 at 2021-10-20 18:28:19 +0500

hassanakbar4 commented 6 years ago

@{"email"=>"henrik@levkowetz.com", "name"=>nil, "username"=>nil} changed priority from medium to minor

hassanakbar4 commented 6 years ago

@{"email"=>"henrik@levkowetz.com", "name"=>nil, "username"=>nil} commented


Mmm. The schema permits either seriesInfo or author to occur at this point. I guess the lxml parser takes the easy way out by not listing all possible elements if not one unique element is expected. Noted, but fixing this will require a different parser.

Lowering the priority for now.

hassanakbar4 commented 4 years ago

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

hassanakbar4 commented 4 years ago

@{"email"=>"rjsparks@nostrum.com", "name"=>nil, "username"=>nil} changed resolution from ` towontfix`

hassanakbar4 commented 4 years ago

@{"email"=>"rjsparks@nostrum.com", "name"=>nil, "username"=>nil} commented


The current error message is more verbose:

tests/input/elements.xml(999): Error: Expecting an element , got nothing, at /rfc/back/references/references[1]/reference[3]/front
tests/input/elements.xml(6): Error: Invalid document before running preptool.
Unable to complete processing tests/input/elements.xml

There's not much more that the program can say.

hassanakbar4 commented 4 years ago

@{"email"=>"julian.reschke@gmx.de", "name"=>nil, "username"=>nil} commented


Well, it could say "expecting an element seriesInfo or author".