Re: [xml] XInclude and in-scope namespaces
- From: "Eric Eberhard" <flash vicsmba com>
- To: "'Nikolai Weibull'" <now disu se>
- Cc: <xml gnome org>
- Subject: Re: [xml] XInclude and in-scope namespaces
- Date: Thu, 25 Oct 2018 17:23:39 -0700
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.
Eric
-----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
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/ xml gnome org https://mail.gnome.org/mailman/listinfo/xml
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]