W3C home > Mailing lists > Public > uri@w3.org > October 2007

Re: file: URIs without host

From: Roy T. Fielding <fielding@gbiv.com>
Date: Wed, 10 Oct 2007 13:24:43 -0700
Message-Id: <D257D25D-DF1C-49C0-9B29-E8021AED7FF1@gbiv.com>
Cc: URI <uri@w3.org>
To: Charles Lindsey <chl@clerew.man.ac.uk>

On Oct 10, 2007, at 12:45 PM, Charles Lindsey wrote:
> On Thu, 04 Oct 2007 14:43:05 +0100, Dan Connolly <connolly@w3.org>  
> wrote:
>
>> On Thu, 2007-10-04 at 14:34 +0100, Jeremy Carroll wrote:
>> [...]
>>> ====
>>>
>>> Jena's RDF/XML side:
>>>
>>> However, a use case for such file URIs would be that we wish to  
>>> create a
>>> zip file including a complete application, which includes  
>>> references to
>>> data in the zip. When we unzip we want the references to work,
>>> independent of both the machine or the directory.
>>
>> That case is why we have relative URI references; drop the scheme
>> altogether if you want to refer to "nearby" things.
>
> Yes, but if you drop the scheme, then you inherit the current scheme.
>
> If you are in the middle of an http page and write <a href="foo">  
> then it means look for the page 'foo' at the same level as the  
> current page, but STILL USING HTTP. If you want to insert a file:  
> URL in the middle of an http page (in general, a stupid thing to  
> do), then a relative URI won't work.

That is not a relevant use case.

> But in the example mentioned, with that zipped application, and it  
> happens to contain an internal ./doc directory with all the  
> documentation in html, then indeed all the URLs within the  
> documentation are relative, and are likely to be accessed using a  
> file: URL when examining the doco on the local machine. Packages  
> are routinely distributed in that sort of format.
>
> It is only the rare cases where you want to change scheme at the  
> same time as using a relative URL that the problem under discussion  
> arises.

Rare cases?  There is no such valid case.  RFC 3986 forbids it.
There has never been any standard that supports it.  There is no
way that it would ever be consistently implemented (even on Unix,
where there is such a thing as a current working directory, there
is often disagreement about when the working directory should be
used when the application is invoked with a pathname).

It is silly to hold up a specification of known interoperable
behavior just because someone invented a fanciful test case.
Just spec the stuff that already works.

....Roy
Received on Wednesday, 10 October 2007 20:24:39 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 13 January 2011 12:15:37 GMT