After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 377925 - xinclude loses namespace information
xinclude loses namespace information
Status: RESOLVED OBSOLETE
Product: libxml2
Classification: Platform
Component: xinclude
2.6.x
Other All
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2006-11-21 21:37 UTC by Sebastian Rahtz
Modified: 2021-07-05 13:25 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16



Description Sebastian Rahtz 2006-11-21 21:37:16 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.
Comment 1 GNOME Infrastructure Team 2021-07-05 13:25:56 UTC
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.