W3C home > Mailing lists > Public > xml-uri@w3.org > May 2000

Re: Are *relative* URIs as namespace nemes considered harmful?

From: John Cowan <jcowan@reutershealth.com>
Date: Wed, 17 May 2000 13:15:34 -0400
Message-ID: <3922D3B6.E4D676EB@reutershealth.com>
To: Jonathan Robie <Jonathan.Robie@SoftwareAG-USA.com>, "xml-uri@w3.org" <xml-uri@w3.org>
Jonathan Robie wrote:

> I want to make sure that I understand what you want. Are you saying that
> two namespaces should be considered the same if and only if their URIs
> resolve to the same resource? If so, must a physical resource be created in
> order to create a namespace?

I suspect what you are asking about is not a "resource" but an "entity body",
which is a bunch of bytes plus a media-type (text/plain or image/gif, e.g.)
that says how the bytes are to be interpreted.  A single resource may
be made of one or more entity bodies, or none at all.

It may be useful to give some concrete examples of what is and what is not
an equivalent namespace name under "absolutizing" RFC 2396 rules.
Consider the (fictitious) namespace name "http://www.syrtis.mars/ns/asteroids".
Suppose also that there is a (fictitious) document referenced by the absolute URI
"http://www.syrtis.mars/docs/jwc/ceres.xhtml" which contains some
namespace declarations.  Here is a table of them:

Attribute value					Refers to above namespace?

http://www.syrtis.mars/ns/asteroids		Yes, literal match

../../ns/asteroids				Yes, relative URI reference

../../ns/./asteroids				Yes, relative URI reference

/ns/asteroids					Yes, host-relative URI reference

/ns/../ns/asteroids				Yes, host-relative URI reference

http://www.syrtis.mars/ns/./asteroids		No, absolute URI doesn't match
						    (no "." processing done)
http://www.syrtis.mars/ns/../ns/asteroids	No, absolute URI doesn't match
						    (no ".." processing done)
http://ftp.syrtis.mars/ns/asteroids		No, host name doesn't match
						    even if names have same IP addr
http://[126.0.0.5]/ns/asteroids			No, host name doesn't match

ftp://www.syrtis.mars/pub/ns/asteroids		No, even if the same file would
						    be retrieved by FTP

> Also, let me make sure I have my facts straight. I assume that when string
> comparison says two URIs are equal, they identify the same resource (if
> such a resource exists). If string comparison says two URIs are unequal,
> they may still be aliases for the same resource. To me, this does not seem
> inconsistent for the purpose of names. Two pointers may have different
> names, but identify the same object. If the identity is not in the name
> itself, where is it?

The identity *is* in the name.  However, under this interpretation the
name is not the literal string, but a syntactic conversion of it with
respect to the "base URI" that every Web resource has.

> Suppose two different domain names are registered for
> the same web site, but the company owning those domains splits and creates
> two different web sites, one for each domain. If I have a document
> containing URIs defined with each domain, did the names used in that
> document all change when the domains were mapped to different resources?

No.  Identity is still a syntactic property under the "absolutizing" rule;
the names were always different (see above).
 
> Are you implying that XML implementations should do this kind of research
> for such simple operations as determining the name of an element or an
> attribute?

Not at all.  But if we are able to define namespace names as URIs, then it
will be possible to use general tools (such as an RDF database) for determining
things about resources, since URIs name resources.

-- 

Schlingt dreifach einen Kreis um dies! || John Cowan <jcowan@reutershealth.com>
Schliesst euer Aug vor heiliger Schau,  || http://www.reutershealth.com
Denn er genoss vom Honig-Tau,           || http://www.ccil.org/~cowan
Und trank die Milch vom Paradies.            -- Coleridge (tr. Politzer)
Received on Wednesday, 17 May 2000 13:15:48 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:32:42 UTC