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

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

From: James Clark <jjc@JCLARK.COM>
Date: Tue, 23 May 2000 10:55:39 +0700
Message-ID: <392A013B.7188A124@JCLARK.COM>
To: David Carlisle <davidc@nag.co.uk>
CC: timbl@w3.org, xml-uri@w3.org
David Carlisle wrote:
> 
> > It is inconsistent.  What do you do with documents on different http servers
> > which each refer to "foo"?  What do you do with a documents
> > which refers to "foo" and "./foo" in the same document? Here treating
> > them as URIs and as strings give opposite results.  You just can't do that.
> 
> The current namespace spec is perfectly consistent.
> Namespace names are URI references.
> 
> foo and ./foo are two namespace names, they are two URI references.
> They refer to the same URI when combined with the base URI of the
> document.

That's not the problematic case.  The problematic case is when you have
two URI references that are identical when compared as strings but refer
to different resources (because they have different base URIs).  This is
like having obj1 == obj2 but not obj1.equals(obj2).  I would call that
inconsistent.  By only comparing absolute URIs (either because you
forbib relative URIs or because you absolutize first), you guarantee
that if two namespace names compare equal then they refer to the same
resource.

James
Received on Tuesday, 23 May 2000 01:07:46 UTC

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