Re: [xml] XPointer behaviour in LibXML2

On Thu, Nov 28, 2002 at 06:10:29AM -0500, Daniel Veillard wrote:
On Thu, Nov 28, 2002 at 11:17:30AM +0100, Johann Richard wrote:
The bizzare thing for me is really that the URN gets correctly resolved to the URL but that somehow, the 
fragment seems to get lost ...

  I was able to reproduce the problem locally.

  and thinking more about it, RFC 2396 defines the following:
    URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]

 and URN is an absoluteURI, so it ought to work independantly of what
RFC 2141 defines. So I modified the URI parsing and saving module
accordingly, so this works now:

paphio:~/XML -> cat xinc.xml
<x xmlns:xinclude="";>
   <xinclude:include href="urn:toto#xpointer(//p[2])"/>
paphio:~/XML -> cat tst.catal
<!DOCTYPE catalog
  PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"
<system systemId="urn:toto" uri="toto.xml"/>

paphio:~/XML -> cat toto.xml
paphio:~/XML -> ./xmllint --xinclude xinc.xml
<?xml version="1.0"?>
<x xmlns:xinclude="";>
paphio:~/XML ->

 the patch is in CVS and enclosed.



Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

Attachment: uri.patch
Description: Text document

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