[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: rfc 1738


unc rfc
Dave Pawson scripsit:

> >\\machine\share\dir\file.xml
> >
> >is addressible using the URI
> >
> >file:////machine/share/dir/file.xml
> 
> Thanks Michael. One more to add to the test grouping!
> 4 slashes now!!!  Why must it be so confusing?

Actually, either 2 or 4 slashes is defensible.  Remember that the general
scheme of a typical URL (excluding things like mailto: and news:) is

	scheme://machine/path

where the third slash serves both to separate the machine from the path
and to indicate that the path is absolute.  So a file: URL referring to
the local file /bar/baz looks like:

	file://localhost/bar/baz

Equivalently, you can write

	file:///bar/baz

leaving the machine name is empty, because the local system is meant.
This is the most common form, so typically file URLs begin "file:///".

Now we have to decide whether we are going to interpret an UNC name as
containing separate machine and path information, or as just being a path.
In the former case, the natural approach is to map the first component
onto the "machine" part of the URL schema, like this:

	file://foo/bar/baz

This is naturally interpreted as being the file /bar/baz on machine foo
rather than the local machine, or \\foo\bar\baz in UNCspeak.

Alternatively, you can say that the UNC name is just a path with an
unusual first component "//foo", in which case the UNC name \\foo\bar\baz
would be written

	file://localhost//foo/bar/baz

which can be abbreviated to

	file:////foo/bar/baz

-- 
John Cowan      jcowan@r...        http://www.reutershealth.com
        "Not to know The Smiths is not to know K.X.U."  --K.X.U.

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.