GNOME Bugzilla – Bug 126806
Entity resolution with XInclude failed
Last modified: 2009-08-15 18:40:50 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>­</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
Created attachment 21379 [details] testcase3.tgz: Some files which shows the failure of entity resolution and xinclude
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
This should be closed in release of libxml2-2.6.5, Daniel