[xml] XInclude fallback and missing root element


Funny things can happen when XInclude processing is run on a document that has an include as the root element. For example:

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude";

Running "xmllint --xinclude" on this document produces this output:

    <?xml version="1.0"?>


Which doesn't look like well-formed XML to me. Manipulating the document with the tree functions will find that there is no root element in this document at all after XInclude processing has taken place. Seems a bit odd!

Is there something better that libxml2 could do in this situation? Or is this a gap in the XInclude specification?

Best regards,


Print XML with Prince!

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]