XInclude and in-scope namespaces

Nikolai Weibull via xml <[email protected]> Mon, 22 Oct 2018 21:50:14 +0200
Newsgroups gmane.comp.gnome.lib.xml.general
Message-ID <[email protected]>
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
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
https://mail.gnome.org/mailman/listinfo/xml