GNOME Bugzilla – Bug 68882
Implement the ID/IDREF fixup of Xinclude
Last modified: 2009-08-15 18:40:50 UTC
The updated XInclude spec has a fixup for resolving ID/IDREFs in included documents. This needs to be implemented.
I think the ID part should be fixed in CVS now and will be in the next release: orchis:~/XML -> cat test/XInclude/docs/docids.xml <!DOCTYPE book [ <!ELEMENT book (doc*)> <!ELEMENT doc (isid*)> <!ELEMENT isid EMPTY> <!ATTLIST isid myid ID #IMPLIED> ]> <book> <doc> <isid myid="mine"/> <isid myid="dup"/> </doc> <!-- including another XML document with IDs --> <xinclude:include xmlns:xinclude="http://www.w3.org/2001/XInclude" href="../ents/ids.xml"/> </book> orchis:~/XML -> cat test/XInclude/ents/ids.xml <!DOCTYPE doc [ <!ELEMENT doc (isid*)> <!ELEMENT isid EMPTY> <!ATTLIST isid myid ID #IMPLIED> ]> <doc> <isid myid="dup"/> <isid myid="foo"/> <isid myid="bar"/> </doc> orchis:~/XML -> xmllint --xinclude --shell test/XInclude/docs/docids.xml / > dir id('foo') ELEMENT isid ATTRIBUTE myid TEXT content=foo / > The IDs from the included Infoset have been merged in the resulting infoset, and then available to XPath, This should fix your problem :-) Daniel
The libxml2-2.4.15 / libxslt-1.0.12 release should fix the problem, thanks, Daniel