Re: [xml] XInclude and Namespaces



  Yep, the href is an URI-Reference, and hence should be context insensitive
there is a special construct xmlns(s=....)#xpointer(/s:slideset...) in recent
XPointer drafts to map the s prefix to the URI for the namespace, see
   http://www.w3.org/TR/xptr/#ns-context
this should work in libxml2, if not it's a bug :-)
I did not check the latest set of XPointer drafts, I expect the construct to
still be there.

Daniel

On Mon, Aug 12, 2002 at 03:08:01PM +0200, Christian Stocker wrote:
Hi

played with the XInclude Support in libxml and it seems to work very fine,
except when my xpath-expression has namespaces... the xml:

*******
<?xml version="1.0" standalone="yes"?>
<root xmlns:xi="http://www.w3.org/2001/XInclude";
xmlns:s="http://www.oscom.org/2002/SlideML/0.9/";>
<xi:include
href="http://roger.bitflux.ch/slideset-20020808.xml#xpointer(/s:slideset/s:slide[1]/*)"/>
</root>
*******

produces with  xmllint --xinclude xinclude.xml just:
*******
Error Undefined namespace prefix

^
XInclude: XPointer evaluation failed: #xpointer(/s:slideset/s:slide[1]/*)
<?xml version="1.0" standalone="yes"?>
<root xmlns:xi="http://www.w3.org/2001/XInclude";
xmlns:s="http://www.oscom.org/2002/SlideML/0.9/";>

</root>
********

Did i something wrong, or how can I declare that namespace correctly?

TIA

christian


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

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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