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

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

From: Paul Grosso <pgrosso@arbortext.com>
Date: Tue, 16 May 2000 15:12:52 -0500
Message-Id: <>
To: xml-uri@w3.org
At 15:13 2000 05 16 -0400, John Cowan wrote:
>Tim Berners-Lee wrote:
>> A classic example is a document which defines its own namespace and uses it
>> as it goes along. I understood the WebCGM schema does that, refering to the
>> namespace it defines as "#".  Without relative URIs, this would be
>> impossible to do without always writing the URI of the document in it every
>> time you published a variation!
>But this is not a decisive case, because a namespace name used in a single
>document will give the same identity function whether it is taken as a
>string or a relative URI reference.

No, it won't necessarily when xml:base is considered:

<doc xml:base="http://example.com/" xmlns:y="foo">
 <elem1 xml:base="./bar/">
  <x:E xmlns:x="../foo" xmlns:z="foo">
    <elem2 x:a="1" y:a="2" z:a="3"/>

The namespace names associated with the prefixes y and z in the
example above will be the same with the literal string interpretation,
but different if the relative URI refs are absolutized.

And the namespace names associated with the prefixes x and y in the
example above will be different with the literal string interpretation,
but the same if the relative URI refs are absolutized.

And the "Uniqueness of attributes" constraint in the Namespace spec [1]
will be violated either by the x:a and y:a pair or the y:a and z:a pair
depending on whether the literal string or absolutized relative URI ref
interpretation is used.

This--and the fact that the majority of us developing the original
Namespace spec changed "URI" to "URI reference" without realizing 
this allowed for relative URI references which we never intended--is 
why I felt that the "forbid relative URI refs in namespace names" was
the least of all evils.  Specifically, I suggest that value [2] of a
namespace declaration attribute be syntactically restricted to match 
what RFC 2396 [3] means by
    absoluteURI [ "#" fragment ]
so as to have a clear definition that is a subset of URI references
that is unambiguous and useful when used as a namespace name.


[1] http://www.w3.org/TR/REC-xml-names/#uniqAttrs
[2] http://www.w3.org/TR/REC-xml-names/#ns-decl
[3] see 4. URI References in ftp://ftp.ietf.org/rfc/rfc2396.txt
Received on Tuesday, 16 May 2000 16:12:55 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:13:58 UTC