Re: [xml] XInclude and the default namespace



On Tue, Apr 19, 2005 at 08:13:24AM -0400, Norman Walsh wrote:
I think this is a bug in XInclude support in libxml 2.6.16.

Consider:

test.xml:

<doc xmlns="http://example.com/";
     xmlns:xi='http://www.w3.org/2001/XInclude'>

<p>What about this?</p>

<xi:include href="testinc.xml" xpointer="/1/1"/>

</doc>

and testinc.xml:

<doc>

<p>This is p from no namespace</p>

</doc>

and

$ xmllint -xinclude test.xml
<?xml version="1.0"?>
<doc xmlns="http://example.com/"; xmlns:xi="http://www.w3.org/2001/XInclude";>

<p>What about this?</p>

<p>This is p from no namespace</p>

</doc>

I think that second 'p' needs an xmlns="". Note that if the second 'p'
is in some other namespace, the proper declaration is added, so it
seems to be the edge case of the "no namespace" that's the problem.

  Right, this is a bug. Could you bugzilla it so we don't loose track
of the issue. I can reproduce it on the latest version.

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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