[xml] XInclude and in-scope namespaces



Hi!

I’m trying to do something like the following:

a.xml:

<a>
 <include xmlns="http://www.w3.org/2001/XInclude"; href="b.xml"
          xpointer="xpointer(*/*)"/>
</a>

b.xml:

<a xmlns:c="c:c">
 <b/>
</a>

and then

% xmllint --xinclude a.xml

This, however, doesn’t render the output I was expecting, namely

<a>
 <b xmlns:c="c:c"/>
</a>

but rather

<a>
 <b/>
</a>

That is, the in-scope namespaces of the “b” element aren’t being copied over. I can’t determine from the standard whether this is as intended or not. Section 4.5.4 talks about “namespace fixup”, but I can’t for the life of me understand what they’re trying to say, see

https://www.w3.org/TR/xinclude/#namespaces

I tried looking at other implementations, but Xerces doesn’t support the xpointer attribute and I couldn’t find any other XInclude implementations.

Anyway, is this working as intended, or should in-scope namespaces be included?

 Nikolai


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