Lists Home |
Date Index |
On Sat, Dec 14, 2002 at 12:38:11AM +0000, Richard Tobin wrote:
> >The use of file: URIs are fraught with so many hassles regarding
> >their proper construction and security that it's darned tough to
> >justify using them.
> I disagree. It's useful for a program that handles URIs - an XML
> parser, for example - to be able to handle local files without
> having to special-case them everywhere. file: URLs provide a
> natural way to do that.
Just to give a very concrete example of an absolute need for
file: URLs: catalogs. The XML Catalog spec says the "translated"
resource name must be given as URIs (this makes sense, the "local"
copy could be installed either on the local filesystem or on a
server on the local LAN).
And for any resource actually addressed by the catalog on the filesystem
well you really need a file:/// URL (or a relative URI to the
file:/// URL of the catalog).
file:/// is not intrinsicly evil (using it for namespaces is evil though)
it can have really good use case, the problem is the diversity of
filesystem naming convention (and hierarchy convention but that's
My take is that 95% of the time if you find a file: URL in an instance
it means that the environment is still in flux, that a persistant
canonical URL for the resource has not being defined and that catalogs
haven't been setup. Proper naming conventions and catalog usage ought
to make file: URI disapear completely from the XML documents themselve.
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
firstname.lastname@example.org | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/