RE: Possible bug mod_dav 1.0.2

> From: w3c-dist-auth-request@w3.org
> [mailto:w3c-dist-auth-request@w3.org]On Behalf Of Lisa Dusseault
> Sent: Monday, October 15, 2001 11:41 PM
> To: w3c-dist-auth@w3.org
> Subject: Re: Possible bug mod_dav 1.0.2
>
>
>
> Julian, you've reported a bug for mod_dav and Xythos WFS:
>
> "a) Set a dead property with no namespace, for instance by:
>
> <propertyupdate xmlns="DAV:">
> 	<set>
> 		<prop>
> 			<bar xmlns="">123</bar>
> 		</prop>
> 	</set>
> </propertyupdate>
>
> This works, no error is reported."
>
> Is it your contention that an error SHOULD be reported?  That was unclear
> >from the mail and posting.

No, I just wanted to indicate that the "precondition" for this test (that
the property was created) was OK.

> I've taken a look at the primary sources:
>
> >From http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCName:
>
> "The attribute's value, a URI reference, is the namespace name identifying
> the namespace. The namespace name, to serve its intended purpose, should
> have the characteristics of uniqueness and persistence. It is not a goal
> that it be directly usable for retrieval of a schema (if any exists). An
> example of a syntax that is designed with these goals in mind is that for
> Uniform Resource Names [RFC2141]. However, it should be noted
> that ordinary
> URLs can be managed in such a way as to achieve these same goals."
>
> >From http://www.ietf.org/rfc/rfc2396.txt:
>
> "A URI reference that does not contain a URI is a reference to the current
> document."
>
> However, the "current document" does not have an identity, so this can't
> work for WebDAV requests.  This is unfortunately ambiguous, but I conclude
> that the original request that is mentioned in this bug should never have
> been accepted, because it contains a null namespace which can't be a
> reference to the current document.  It should have been rejected with 400
> Bad Request. Do you agree?

No, it's simply a property that is in no namespace. If you feel better with
the notation, consider:

<D:propertyupdate xmlns:D="DAV:">
	<D:set>
		<D:prop>
			<bar>123</bar>
		</D:prop>
	</D:set>
</D:propertyupdate>

This sets the property "bar" (which is in no namespace).

They key sentence in XNLMS is from
<http://www.w3.org/TR/1999/REC-xml-names-19990114/#ns-decl>:

[Definition:] If the attribute name matches DefaultAttName, then the
namespace name in the attribute value is that of the default namespace in
the scope of the element to which the declaration is attached. In such a
default declaration, the attribute value may be empty. Default namespaces
and overriding of declarations are discussed in "5. Applying Namespaces to
Elements and Attributes".

So using

	xmlns=""

is a special case where the value of the attribute *isn't* a URI -- it's a
notation to "undeclare" the previously defined default namespace.

What needs to be fixed in the way the property values are marshalled (in the
two servers) is the following: if an element is in no namespace (in DOM2:
namespaceUri is null), then it MUST be serialized without a prefix (and the
default namespace undeclared if previously declared). That's the only
XMLNS-wellfomed way to represent elements that are in no namespace.

Julian

Received on Tuesday, 16 October 2001 03:18:28 UTC