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

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
literal
>string or a relative URI reference.

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

http://example.com/file.xml
---------------------------
<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"/>
  </x:E>
 </elem1>
</doc>

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.

paul

[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