Calculating relative URIs

Dan,

In an message about a year ago [1], you said:

[[
TimBL prefers root-relative paths, i.e. "/x%2Fabc"
to "../../x%2Fabc"
Both are correct relative paths from here to there,
but our code currently does "/x%2Fabc".

I don't really like it; it doesn't support moving
filesets around as well as it could. But I haven't
convinced timbl, nor have I completely debugged
an algorithm for returning "../../x%2Fabc".
]]

The approach I've taken is to calculate leaf-relative form is the two URIs 
have at least one leading path segment in common, and I think I have an 
algorithm that does this fairly reliably (i.e. passes lots of test cases).

When I get time, my revised code will be on the web.

#g
--

[1] http://lists.w3.org/Archives/Public/uri/2003Feb/0028.html



------------
Graham Klyne
For email:
http://www.ninebynine.org/#Contact

Received on Thursday, 19 February 2004 19:04:17 UTC