Re: [xml] XInclude and in-scope namespaces

I have found name spaces to be completely frustrating.  Big companies (like Fedex) don't handle them 
"properly" in that if a namespace applies to the document they don't carry it through for each block.  I 
finally gave up on using libxml2 namespaces (which are correct -- if the rest of the world would read the 
specs) -- I simply use the add attribute feature to put my names spaces in, and use ns1:tag or ns2:tag as the 
tags I set.  It is a hassle at first, but once you start coding that way, you can handle all the (incorrect 
and goofy) ways that people handle XML and name spaces.


-----Original Message-----
From: xml [mailto:xml-bounces gnome org] On Behalf Of Nikolai Weibull via xml
Sent: Monday, October 22, 2018 12:50 PM
To: xml gnome org
Subject: [xml] XInclude and in-scope namespaces


I’m trying to do something like the following:


  <include xmlns=""; href="b.xml"


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

and then

% xmllint --xinclude a.xml

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

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

but rather


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

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?

xml mailing list, project page xml gnome org

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