Re: [xml] XInclude and in-scope namespaces

2018-10-25 Thread Eric Eberhard
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-boun...@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:


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


b.xml:


  


and then

% xmllint --xinclude a.xml

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


  


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

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


___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


[xml] XInclude and in-scope namespaces

2018-10-22 Thread Nikolai Weibull via xml

Hi!

I’m trying to do something like the following:

a.xml:


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


b.xml:


 


and then

% xmllint --xinclude a.xml

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


 


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


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