W3C home > Mailing lists > Public > uri@w3.org > June 2003

Re: non-hierarchical URIs and square brackets

From: Graham Klyne <gk@ninebynine.org>
Date: Mon, 23 Jun 2003 16:17:47 +0100
Message-Id: <>
To: Al Gilman <asgilman@iamdigex.net>, uri@w3.org

At 09:20 23/06/03 -0400, Al Gilman wrote:
>At 08:00 AM 2003-06-23, Graham Klyne wrote:
>>At 14:35 19/06/03 -0400, Al Gilman wrote:
>>>At 05:45 AM 2003-06-19, Graham Klyne wrote:
>>>>or mid:, defined by RFC 2392, which is clearly non-hierarchical, but:
>>>>      mid-url       = "mid" ":" message-id [ "/" content-id ]
>>>>-- http://www.faqs.org/rfcs/rfc2392.html
>>>Please explain in what terms you find the 'mid' scheme to be "clearly 
>>I meant in the sense that it does not conform to the normal rules for 
>>hierarchical URIs;  e.g.
>>given a base URI:
>>   mid:m@example.ord/c@example.org
>>and a URI-reference:
>>   m2@example.ord/c2@example.org
>>making an absolute URI from these parts using normal hierarchical URI 
>>rules would yield:
>>   mid:m@example.ord/m2@example.ord/c2@example.org
>>which isn't a valid mid: URI.
>But there is no use for the relative URI that you cooked up.
>Just because there are syntactically well-formed but semantically garbage
>examples that can be constructed doesn't mean that there is no hierarchy
>in the scheme.  Just that the hierarchy isn't everything that
>you expect.

Without wishing to debate the semantic minutiae, I have code based on (my 
reading of) a previous version of the URI specification that processes the 
above example and produces a perfectly usable result, namely:


I.e. it uses just the scheme name from the base URI.  The lack of a leading 
'/' in the base URI path is taken as an indicator that URI hierarchy rules 
don't apply, so the path component is treated as an opaque item to be 
replaced by that from the URI reference.

Now, maybe my code is wrong.  But it seemed to me a reasonable way to write 
some generic URI handling code that may be called upon to do 
relative-to-absolute mapping on any pair of URI-references, and it seems to 
produce results that are reasonable and workable.

I find the latest revision of the spec, however, is open to an 
interpretation in which it is not possible to get a valid URI in this 
case.  That is the basis of my original question -- I don't really care if 
the example does or does not have any element of hierarchy, but rather that 
I can understand how to properly process it and (hopefully) obtain a useful 
or usable result.


Graham Klyne
PGP: 0FAA 69FF C083 000B A2E9  A131 01B9 1C7A DBCA CB5E
Received on Monday, 23 June 2003 13:39:22 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:06 UTC