Subject: Re: [docbook] Xinclude processing with docbook 5
I checked this out and can confirm that with Xerces, any XIncludes that reference an xml:id in the included document don't work the same for DocBook 5 documents. Just to be clear, the issue is not the use of the namespace-aware stylesheets, because the XInclude is resolved by the XML parser before the stylesheets are applied. The issue is the XInclude function in the Xerces parser. Such XIncludes work fine with xmllint.
It seems that in order for the Xerces XInclude processor to find an xml:id, it must be informed that an xml:id attribute is an attribute of type "ID". I can get it to work if I add a DOCTYPE and reference to the DocBook 5 DTD to the included document.
<!DOCTYPE book SYSTEM "../docbook50/dtd/docbook.dtd" [
<!ENTITY esb "ESB stuff">
<book xml:lang="es" xmlns="http://docbook.org/ns/docbook" version="5.0">
That defines the para element's xml:id attribute of type ID:
<!ENTITY % db.common.attributes "
xml:id ID #IMPLIED
I believe this is a bug in the Xerces XInclude processor. An attribute named xml:id is predefined to be of type ID by the standards. You shouldn't have to identify it as type ID. It works with xmllint without such prompting.