[plt-scheme] file: urls & their relation to path names

From: Doug Orleans (dougorleans at gmail.com)
Date: Wed Jan 11 16:21:22 EST 2006

For comparison, here's how Java extends the URI grammar:

  An empty authority component is permitted as long as it is followed
by a non-empty path, a query component, or a fragment component. This
allows the parsing of URIs such as "file:///foo/bar", which seems to
be the intent of RFC 2396 although the grammar does not permit it. If
the authority component is empty then the user-information, host, and
port components are undefined.

  Empty relative paths are permitted; this seems to be the intent of
RFC 2396 although the grammar does not permit it. The primary
consequence of this deviation is that a standalone fragment such as
"#foo" parses as a relative URI with an empty path and the given
fragment, and can be usefully resolved against a base URI.

http://java.sun.com/j2se/1.5.0/docs/api/java/net/URI.html#URI(java.lang.String)

--dougorleans at gmail.com


Posted on the users mailing list.