W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > April 2008

Re: Changing base URIs

From: Richard Tobin <richard@inf.ed.ac.uk>
Date: Thu, 10 Apr 2008 16:02:57 +0100 (BST)
To: Norman Walsh <ndw@nwalsh.com>, public-xml-processing-model-wg@w3.org
Message-Id: <20080410150257.9E4B237932C@macpro.inf.ed.ac.uk>

> Java's URI class includes a 'relativize' method:
> 
>   http://java.sun.com/j2se/1.5.0/docs/api/java/net/URI.html#relativize(java=
> .net.URI)
> 
> That might be sufficient.

It's not a very complete definition.  It seems to assume that the
base URI is a prefix of the to-be-relativized URI.  That works for

   http://x.y/text/foo.html - http://x.y/text/ -> foo.html

but not for

   http://x.y/text/foo.html - http://x.y/text/bar.html -> foo.html

let alone

   http://x.y/images/foo.html - http://x.y/text/bar.html -> ../images/foo.html

-- Richard

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
Received on Thursday, 10 April 2008 15:03:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 10 April 2008 15:03:40 GMT