Re: [xsl] document() function

Subject: Re: [xsl] document() function
From: Mike Brown <mike@xxxxxxxx>
Date: Tue, 20 Aug 2002 22:19:31 -0600 (MDT)
J.Pietschmann wrote:
> The component separator for file: URLs is "/", not "\".

Thomas covered this pretty thoroughly, and contributed significantly to
related threads on other lists, but I want to reiterate the point that the
statement above is *not* a rule.

Everything after the scheme in a file: URL is OS-dependent by definition.
(Thanks, Netscape, for bestowing yet another abomination upon us). The format 
is:

  "file:" + an OS-dependent path, properly escaped

Ultimately, there are *no* assumptions you can make about what comes after the
scheme, if you don't know the OS the URL is associated with.

Examples of paths on different OSes that make life difficult:

Mac (before OS X)           Windows/DOS                     UNIX
=========================   ====================            =================
(no equivalent)             \abs\path\to\file               /abs/path/to/file
drive:abs:path:to:file      DRIVE:\abs\path\to\file         (no equivalent)
:rel:path:to:file           rel\path\to\file                rel/path/to/file
::foo:rel:path:to:file      ..\foo\rel\path\to\file         ../foo/etc
:::foo:rel:path:to:file     ..\..\foo\rel\path\to\file       ../../foo/etc
(no equivalent)             \\Host\Share\abs\path\to\file   (no equivalent*)

  * Well, sorta. Things like NFS, SMBFS, etc. complicate matters a bit

The URI resolver shared by Windows Explorer and Internet Explorer is by far
the most forgiving. Its ability to handle pretty much anything you throw at
it should not be considered evidence of the equivalence of different kinds of 
path components, or of there being a canonical format for the paths in file: 
URLs across OSes.

   - Mike
____________________________________________________________________________
  mike j. brown                   |  xml/xslt: http://skew.org/xml/
  denver/boulder, colorado, usa   |  resume: http://skew.org/~mike/resume/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread