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 126806 - Entity resolution with XInclude failed
Entity resolution with XInclude failed
Status: VERIFIED FIXED
Product: libxml2
Classification: Platform
Component: general
2.6.2
Other Linux
: Normal major
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on: 126351
Blocks:
 
 
Reported: 2003-11-12 12:03 UTC by Thomas Schraitle
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
testcase3.tgz: Some files which shows the failure of entity resolution and xinclude (630 bytes, application/x-tgz)
2003-11-12 12:05 UTC, Thomas Schraitle
Details

Description Thomas Schraitle 2003-11-12 12:03:08 UTC
I will post in a few minutes a tarball with the included files.

Here is a summery:

booktitle.xml:   Are included from test.03-xi.xml
mydocbook.dtd:   Loads internally the DocBook DTD + contains an
                 entity declaration db.
test.03-xi.xml:  Contains an xi:include element which points to
                 booktitle.xml
test.03.xml:     Contains just ordinary DocBook elements

The difference between test.03-xi.xml and test.03.xml are only the
xi:include element.

My catalog files seems to be correct:

$ xmlcatalog /etc/xml/catalog  "-//OASIS//DTD DocBook XML V4.2//EN"
file:///usr/share/sgml/db42xml/docbookx.dtd

First, I validate test.03.xml:

$ xmllint --noout --valid --noent test.03.xml

Everything is fine! But if I validate test.03-xi.xml xmllint gives some errors:

$ xmllint --xinclude --postvalid --noout --noent test.03-xi.xml
test.03-xi.xml:10: parser error : Entity 'db' not defined
    <title>&db; Test chapter</title>
               ^
test.03-xi.xml:11: parser error : Entity 'shy' not defined
    <para>&shy;</para>
               ^

It seems that everytime the options "--xinclude --postvalid" are used, the
above error occurs. But from my understanding these options are required by
XIncludes. So it is impossible to validate a XML file with xi:include elements.

I hope my description are helpful. :)

Tom
Comment 1 Thomas Schraitle 2003-11-12 12:05:12 UTC
Created attachment 21379 [details]
testcase3.tgz: Some files which shows the failure of entity resolution and xinclude
Comment 2 Daniel Veillard 2003-12-09 13:55:38 UTC
Okay, fixed in CVS. It's just a bug in xmllint when transitionning
over the new parsing APIs, some flags were not properly passed
down as parser options:

paphio:~/tmp/testcase3 -> ~/XML/xmllint --xinclude --postvalid --noout
--noent test.03-xi.xml
test.03-xi.xml:5: element include: XInclude warning : Deprecated
XInclude namespace found, use http://www.w3.org/2003/XInclude
paphio:~/tmp/testcase3 ->

  The new warning is normal, the XInclude namespace has changed,

Daniel
Comment 3 Daniel Veillard 2004-01-26 13:25:55 UTC
This should be closed in release of libxml2-2.6.5,
                                                                     
          
Daniel