[xml] XPointer behaviour in LibXML2
- From: "Johann Richard" <Johann richard dspfactory ch>
- To: <xml gnome org>
- Subject: [xml] XPointer behaviour in LibXML2
- Date: Thu, 28 Nov 2002 10:40:20 +0100
Hi all,
I have a little problem w/ libxml's XPointer --- maybe someone can help:
I have two XInclude's in an XML file which is processed with libxml and libxslt with XInclude enabled and the
namespace xi defined somewhere:
[ ... ]
<xi:include href="urn:x-xmlbase:files:intro:xml#xpointer(id('section3'))">
<xi:include href="intro.xml#xpointer('section3')">
[ ... ]
where "urn:x-xmlbase:files:intro:xml" resolves to "http://xmlbase.info:8080/intro.xml" and
with intro.xml (both files) being like:
<section>
[...]
<section id="section3">
[ ...]
</section>
[...]
</section>
both "intro.xml" files exist, of course, and if I don't specify an XPointer, I get both of them completely
included, i.e., the URN resolves to http and gets loaded. (I added my proper entity resolver that resolves
the urn to the http://[...])
Now, the problem arises when I specify the xpointer: For the local file, everything is fine: I only get the
desired section with id='section3' in my output. For the remote file, I always get the full file included,
independent of the value of the xpointer.
If I specify, however, directly the URL, say like
<xi:include href="http://xmlbase.info:8080/intro.xml#xpointer(id('section3'))">
everything works fine as well. I tried with xpath expressions like "/section/section[3]" as well, with
exactly the same result.
libxml only seems to take care of the xpointer when I use a "real" URL which also gets "resolved"!
Am I missing something or is this a bug?
any help is appreciated.
Kind regards,
johann
********************************************
Johann Richard
IC & DSP Design Engineer
Dspfactory SA
Champs-Montants 12a
2074 Marin-Epagnier
Switzerland
Tel: +41 32 755 7400
Fax: +41 32 755 7401
e-mail: mailto:johann richard dspfactory ch
http://www.dspfactory.com
********************************************
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]