RE: RFC2518 (WebDAV) / RFC2396 (URI) inconsistency

> * WebDAV marshals "dav:" URIs that are the name of XML elements as a
> {namespace} + {opaque_part} pair.  So, for example, "dav:creationdate" is
> <D:creationdate xmlns:D="dav:">.

The XML Namespaces Recommendation provides a facility to name an element by 
a URI/local-name pair.  It does not provide a facility to name an element 
by a URI. The element

<D:creationdate xmlns:D="dav:"/>

has a name that is a pair consisting of the (non-)URI "dav:" and the local 
name creationdate.  Nowhere does the XML Namespaces Recommendation say that 
you will get anything interesting or useful by concatenating the URI and 
the local name. The fact that "dav:creationdate" is a fine URI is 
completely irrelevant from the perspective of the XML Namespaces Rec to the 
issue of whether "dav:" is a legal namespace identifier.

> It
> seems clear to me that the XML namespace recommendation was written with
> only the class of hierarchical URIs in mind, and as a result it's not too
> surprising that a glitch arose in the first use with non-hierarchical
> URIs.

I don't think the issue is anything to do with whether URIs are 
hierarchical. From reading your message, the requirements appear to be as 
follows:

- DAV wants to identify elements by a URI not a URI/local name pair

- DAV wants the generated URI for an element <D:creationdate/> to be 
dav:creationdate

- DAV to generate the URI that identifies an element from the namespace 
identifier and local name

You might think that these requirements imply that the namespace identifier 
for DAV must be "dav:", but in fact they don't, because there is no 
requirement that the method that you use to generate the URI that 
identifies an element is to concatenate the namespace identifier and the 
local name or the element.  You can solve the problem simply by choosing 
some other method of generating the URI, which allows the namespace 
identifier to be a legal URI, as required by the XML Namespaces Rec.

James

Received on Tuesday, 20 November 2001 23:00:22 UTC