W3C home > Mailing lists > Public > xml-uri@w3.org > May 2000

Defaule base URI for files

From: Tim Berners-Lee <timbl@w3.org>
Date: Thu, 18 May 2000 05:48:11 -0400
Message-ID: <001301bfc119$d84580c0$75ec5c8b@ridge.w3.org>
To: "David Carlisle" <davidc@nag.co.uk>, <xml-uri@w3.org>

-----Original Message-----
From: David Carlisle <davidc@nag.co.uk>

>Incidentally is there a canonical base URI for a file on my filesystem
>(say /users/davidc/file.xml)?
>
>file://openmath.nag.co.uk/users/davidc/file.xml
>
>is one possibility, but there are others including using localhost.


That (full DNS name) is best because it protects against the URI being
interpreteded accidentally on another system. However, in practice
many systems don't bother to or want to know thir own names
and so just use

file:///users/davidc/file.xml

When this is being done by an XML processor on a given machine
then so long as it is done consistently it won't matter which is done.

It was of course not an accident that unix pathnames are valid relative URIs
when used with a base UI of the present working directory with a trailing
slash.

Tim
Received on Thursday, 18 May 2000 18:36:57 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:32:42 UTC