After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 583439 - bogus line numbers in push mode
bogus line numbers in push mode
Status: RESOLVED FIXED
Product: libxml2
Classification: Platform
Component: general
git master
Other Linux
: Normal minor
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2009-05-21 12:04 UTC by Jakub Wilk
Modified: 2009-08-23 13:46 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jakub Wilk 2009-05-21 12:04:00 UTC
Bogus line numbers are reported in push mode:

$ cat test.xml
<root>
<foo></bar>
</root>

$ xmllint test.xml
test.xml:2: parser error : Opening and ending tag mismatch: foo line 2 and bar
<foo></bar>
           ^

$ xmllint --push test.xml
test.xml:2: parser error : Opening and ending tag mismatch: foo line 0 and bar
<foo></bar>
           ^
Comment 1 Daniel Veillard 2009-08-23 13:46:32 UTC
Okay, I can fix this but only if there is a tree being built by the
parser, since in push mode we don't have a stack to hold the start line
of each parsed element, I can get that line number from the node itself:

paphio:~/XML -> xmllint --push test.xml
test.xml:7: parser error : Opening and ending tag mismatch: foo line 2 and bar
</bar>
      ^
paphio:~/XML -> cat test.xml
<root>
<foo>




</bar>
</root>

paphio:~/XML ->