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

> From: Roy T. Fielding [mailto:fielding@ebuilt.com]
> Sent: Tuesday, November 20, 2001 7:58 PM
> To: Julian Reschke
> Cc: Matt Timmermans; w3c-dist-auth@w3.org; uri@w3.org
> Subject: Re: RFC2518 (WebDAV) / RFC2396 (URI) inconsistency
>
>
> ..
>
> > First of all, without namespace declaration, an element named
> > DAV:multistatus wouldn't be NS-wellformed. In addition,
>
> Should I take that to mean only namespaces can have ":" in the tag name?
> That would explain a lot.

No.

Colons in element names are allowed in XML 1.0 ([1]). Otherwise XML
namespaces wouldn't have been possible (in the current syntactic form).
However, if you use a namespace-aware XML processor, there are special rules
once you put the a colon into an element name. These are expressed in the
XML namespaces recommendation.

Using "DAV:elementname" without declaring "DAV" as namespace prefix would
have made WebDAV incompatible with XML + Namespaces. This would be a
desaster, for instance we wouldn't have a defined XML Infoset for WebDAV
messages ([2]).

> > - WebDAV messages can be extended with "arbitrary" new
> extension elements,
> > preferrably from other namespaces (just like other XML applications do),
>
> Yes, but those will presumably be in another (well-formed) namespace.

Yes. But to do so, the WebDAV message itself (unextended) needs to be
NS-wellformed as well.

> > - WebDAV has a resource property model where a property is
> identified by the
> > pair (namespace, element name).
>
> Isn't it reasonable to have a default namespace in the property model?

Yes. That's why RFC2518-defined properties are in the DAV: namespace.

> > So, having XML namespaces in WebDAV has really nothing to do
> with the syntax
> > for the prefix.
>
> I didn't say it did.  I said that treating DAV: as both a namespace and a
> URI scheme is wrong (and confusing).  The reasons for doing so at the time
> were because xmlns was being developed (slowly) at the same time
> as WebDAV.

May be. But then both the URI RFC and working drafts of XML namespaces had
been around months earlier, and even the 1998 september version of XMLNS
([3]) speaks about the namespace being an URI. So this *could* have been
noticed back then. The fact that it was only noticed a few days ago IMHO
simply shows that what many people think is a valid URI just isn't true
(according to the grammar).

So maybe the grammar needs to be blamed (and updated).

For instance, RFC2396++ could allow empty schema-specific parts, but the URI
registration process could reject new URI schemes which allow empty
scheme-specific parts.

> > Of course I do agree that choosing "DAV:" as namespace name was
> a bad idea.
> >
> > > want to change the definition of URI in 2396 to allow
> > >
> > >    scheme:
> > >
> > > to be a valid URI?  It isn't a valid URI.
> >
> > (Side remark: good old Microsoft is even using namespace names
> like "xml:").
> >
> > Not according to the current grammar, right.
>
> Then it sounds to me like the xmlns attribute does not contain a URI.
> It contains a URI prefix.

Well, the XML namespaces recommendation says it's a URI reference. RFC2518
uses "DAV:". RFC2396 says "DAV:" is not a valid URI reference. So the set of
specs (RFC2396, RFC2518, XML/NS) is inconsistent right now.

>...

> > > As you said, RFC 2518 was based on an early draft of XML
> namespaces, and
> > > it will need to be updated for that in any case (or stop using xmlns).
> >
> > Again, this is on the list of known and resolved issues.
> >
> > [1]
> <http://lists.w3.org/Archives/Public/w3c-dist-auth/2001JanMar/0166.html>
>
> I don't see that as being resolved, unless the WG is going to bite the
> bullet and follow Tim's recommendation.

Tim's recommendation was based on the fact that RFCs shouldn't *invent* URI
schemes without compelling reason. At that point of time there already was a
big number of RFC2518 based code, and "DAV:" already *was* a registered URI
scheme. Back then I was saying to myself: "technically correct, but
impractical to change".

Now the situation is a bit different: using "DAV:" as namespace name is not
only considered "bad practice", it's plain wrong. In a perfect world, the
WebDAV WG could now just pick a better namespace name, everybody would be
updating their servers and clients... But this isn't a perfect world, and I
feel that we need a less intrusive solution.

Regards, Julian

[1] <http://www.w3.org/TR/2000/REC-xml-20001006#sec-common-syn>
[2] <http://www.w3.org/TR/xml-infoset/#intro.namespaces>
[3] <http://www.w3.org/TR/1998/WD-xml-names-19980916>

Received on Tuesday, 20 November 2001 14:44:03 UTC