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 438835 - xmlreader problem with long comment at beginning of document
xmlreader problem with long comment at beginning of document
Status: RESOLVED FIXED
Product: libxml2
Classification: Platform
Component: general
git master
Other All
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2007-05-16 10:02 UTC by stephane.bidoul
Modified: 2007-06-12 14:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
a.xml (611 bytes, text/xml)
2007-05-16 10:03 UTC, stephane.bidoul
Details
b.xml (532 bytes, text/xml)
2007-05-16 10:03 UTC, stephane.bidoul
Details

Description stephane.bidoul 2007-05-16 10:02:17 UTC
Please describe the problem:
Hi,
 
I've discovered a strange problem with documents that have a long comment at the beginning (such as the attached a.xml). A slightly shorter header comment solves the problem (such as in the attached b.xml).

The problem occurs only with --stream. I can reproduce with 2.6.26 (cygwin) and the latest subversion code (win32).

-sbi
 


Steps to reproduce:
~>xmllint --stream --noout --valid a.xml
a.xml:10: parser error : Extra content at the end of the document <!DOCTYPE a [
            ^
a.xml : failed to parse
~>xmllint --stream --noout --valid b.xml ~>xmllint --noout --valid a.xml ~>xmllint --noout --valid b.xml



Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 stephane.bidoul 2007-05-16 10:03:10 UTC
Created attachment 88267 [details]
a.xml
Comment 2 stephane.bidoul 2007-05-16 10:03:46 UTC
Created attachment 88268 [details]
b.xml
Comment 3 Daniel Veillard 2007-06-12 14:47:25 UTC
Okay found it, the patch is minimal but we have some horrible 
code in push mode to detect the end of the internal subset and
having a large comment or PI at the beginning of the XML.
I added a test case in the suite, commited to SVN head,
 
  thanks for the report !

Daniel