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

Let me reconstruct how we got here.

* WebDAV uses the "dav:" URI scheme for the name of XML elements used in
protocol messages, and for the name of properties.

* While the BNF for "dav:" URIs has never been explicitly defined (something
we should do when we revise RFC 2518), if we had, its definition would be as
follows:

davuri = davscheme ":" davvalue
davscheme = "dav"
davvalue = opaque_part

From RFC 2396 we know that the opaque_part is defined as:

opaque_part   = uric_no_slash *uric

That is, the "dav:" URI scheme can be considered a member of the class of
non-hierarchical URIs described on page 12 of RFC 2396. In particular, it
was never the intent that just the string "dav:" would be considered a full
URI. The string "dav:" is a URI scheme name, not a URI. The string "dav:"
plus a string matching the production "opaque_part" is a URI.

* 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 Namespace recommendation requires that the namespace identifier be
a URI.

* Since "dav:" scheme URIs are members of the class of non-hierarchical
URIs, the only constant part is the URI scheme name itself, "dav:". From the
definition of non-hierarchical URIs given in RFC 2396, ALL non-hierarchical
URIs will share this quality. Since "dav:" is the only constant part, it is
the only part of a "dav:" scheme URI suitable for use as the namespace
identifier.


To summarize:
* The "dav:" URI scheme is perfectly legal according to RFC 2396. Therefore,
no change is needed to RFC 2396.
* It is only the use of the "dav:" URI scheme name as an namespace
identifier that is violating any specification. Either RFC 2518 or the XML
Namespaces specification could be changed to rectify this.


In my opinion, it is natural to want to use the URI scheme name as the XML
namespace identifier.  That is:

<D:getcontentlength xmlns:D="DAV:">

is more natural than:

<D:getcontentlength xmlns:D="http://www.webdav.org/">

Not to mention that it uses fewer bytes on the wire (not a huge
consideration these days, but those bytes add up over millions of daily
users).

As a result, I recommend that the XML namespace recommendation be modified
to allow the use of just the URI scheme name as a namespace identifier,
perhaps limited to just members of the set of non-hierarchical URIs. 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.
Based on Julian's experience, and our experience with multiple WebDAV
implementations, accepting a URI scheme name as a namespace identifier would
codify existing, interoperable, practice.

- Jim

Received on Tuesday, 20 November 2001 21:29:19 UTC