Re: [xml] XPointer behaviour in LibXML2
- From: Daniel Veillard <veillard redhat com>
- To: Johann Richard <Johann richard dspfactory ch>
- Cc: xml gnome org
- Subject: Re: [xml] XPointer behaviour in LibXML2
- Date: Thu, 28 Nov 2002 05:01:37 -0500
On Thu, Nov 28, 2002 at 10:40:20AM +0100, Johann Richard wrote:
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.
Hum , do you mean that using #xpointer(/section/section[3]) works, or that
it doesn't work. For id() to work you need access to the DTD, and if the DTD
is specified as a relative URI to the document base, this can lead to serious
problems when using "urn:x-xmlbase:files:intro:xml" as the base for the
document. Thge urn: scheme has the potential to break a lot of thing, I have
advised against it in the past, and this could be related, or not ...
So if #xpointer(/section/section[3]) worked, that's a problem with the
addressing of the DTD from the document. If not, that's a problem in XInclude
support. But since XInclude implementation uses a layer of the API where
catalogs mapping are completely transparent, a priori this kind of problem
should not occur.
Daniel
--
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]