GNOME Bugzilla – Bug 377925
xinclude loses namespace information
Last modified: 2021-07-05 13:25:56 UTC
Please describe the problem: When a XML file with a namespace declaration on the root element has an XInclude of another XML file where the root element has no namespace, the included elements inherit the namespace of the parent document Steps to reproduce: 1. file x.xml :<a xmlns="http://www.tei-c.org/ns/1.0"> <include href="a.xml" xmlns="http://www.w3.org/2001/XInclude"/> </a> 2. file a.xml: <p>hello<p> 3. xmllint --xinclude x.xml Actual results: I get <a xmlns="http://www.tei-c.org/ns/1.0"> <p>vide</p> </a> Expected results: <a xmlns="http://www.tei-c.org/ns/1.0"> <p xmlns="">vide</p> </a> Does this happen every time? yes Other information: xsltproc --xinclude does NOT produce this behaviour. I had assumed it used the same code.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/libxml2/-/issues/ Thank you for your understanding and your help.