Search Mailing List Archives
[protege-discussion] uri, frames, owl or not
Thomas Russ
tar at isi.edu
Tue Aug 3 10:19:00 PDT 2010
On Aug 2, 2010, at 9:55 PM, Ed - 0x1b, Inc. wrote:
> yes, the tradition of using only the forward slash (even for windows
> file locations) pops up from time to time and can be confusing. I have
> not noticed a pattern among the various projects, but I suspect there
> is a library that enforces this counter-intuitive/simplified file
> designation.
>
> Does anyone know what drives this odd formatting? expat maybe?
Well, the specific technical answer to this is that the URL standard
(IETF RFC 1738) defines what the legal syntax is for URLs. And that
standard adopted the universal convention that the directory separator
character in paths would be "/".
See http://www.ietf.org/rfc/rfc1738.txt
'Some URL schemes (such as the ftp, http, and file schemes)
contain names that can be considered hierarchical; the
components of the hierarchy are separated by "/".'
As to why that was chosen, the RFC is silent. I would speculate that
there was a desire to have a uniform path syntax across different
types of URLs and that the forward slash was chosen. This may be
because of some Unix influence on the syntax of HTTP URLs. And it was
undoubtedly felt that preserving uniformity in the path representation
was preferable to having the path syntax be idiosyncratic by file
system. At least with a common syntax, it becomes possible to parse
the URLs without requiring detailed knowledge of the rules of all of
the file systems that one might encounter. This makes the URLs a bit
more "universal", even if a file URL will really only work if the
directory structure happens to coincide.
More information about the protege-discussion
mailing list