Defaule base URI for files

-----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