Subject: D:href as a property?

From: Helge Hess <[email-masked]>
Date: Fri, 24 Sep 2004 18:47:50 +0200

Hi,

is it allowed to use <D:href xmlns:D="DAV:"> as a regular WebDAV 
property?
---snip---
<D:response>
   <D:href>http://abc:8050/zidestore/so/x/IPM/Enterprises/34390</D:href>
   <D:propstat>
     <D:status>HTTP/1.1 200 OK</D:status>
     <D:prop>
       
<D:href>http://abc:8050/zidestore/so/x/IPM/Enterprises/34390</D:href>
---snap---

I would assume yes. The D:href is part of the WebDAV protocol header 
while the contained D:href is a property being transported by WebDAV.

Two relevant snippets from the spec:

---snip(section 4.5)---
Finally, it is not possible to define the same property twice on a 
single resource, as this would cause a collision in the resource's 
property namespace.
---snap---
I guess this one is pretty clear, the response/href element is not a 
property and therefore doesn't clash with the prop/href XML element.
The thing I miss in the spec is a statement that only direct <prop> 
children are considered properties in a <response> payload.

This one is a bit harder:
---snip(section 12.9.1)---
A particular href MUST NOT appear more than once as the child of a 
response XML element
---snap---
I suppose the intention was to forbid multiple href elements directly 
below <response>. But the text isn't clear whether MOST NOT applies to 
direct children or to deep children as well. The latter would include 
children of <prop> and therefore forbid D:href being exposed as a 
regular property.

It would be great if someone could put some light on this.

best regards,
   Helge
-- 
http://docs.opengroupware.org/Members/helge/
OpenGroupware.org

---

From: Julian Reschke <[email-masked]>
Date: Wed, 29 Sep 2004 16:12:58 +0200

Helge Hess wrote:

> Hi,
> 
> is it allowed to use <D:href xmlns:D="DAV:"> as a regular WebDAV property?

No (not until it becomes a standard WebDAV property, that is).

> while the contained D:href is a property being transported by WebDAV.

It could be, but as no standards-track spec defines it, and it resides 
in the DAV: namespace, it's invalid.

Anyway: I've seen servers implementing this because the Microsoft 
Webfolder client indeed asks for it. But, surprise, it doesn't use it.

> children are considered properties in a <response> payload.

Why would that need to be stated?

> children of <prop> and therefore forbid D:href being exposed as a 

It applies to children in the sense of XML, thus direct children. So 
this restricts the multistatus response body not to have multiple 
response elements for the same href. It doesn't say anything at all 
about DAV:href elements that appear somewhere else (such as inside 
DAV:lockinfo).

> It would be great if someone could put some light on this.

Hope this helps,

Julian
-- 
<green/>bytes GmbH -- http://www.greenbytes.de -- tel:+492512807760

---

From: Helge Hess <[email-masked]>
Date: Wed, 29 Sep 2004 16:25:25 +0200

> in the DAV: namespace, it's invalid.

Just out of interest: Is it stated somewhere in the spec that DAV: 
namespace'd properties are considered private?
(again, of course this makes sense, but was not aware of this strict 
limitation)

> Why would that need to be stated?

Because there doesn't seem to be an explicit explanation what a 
"property" wrt to the spec is. I had several discussions with 
developers which would suggest that "D:href" as used outside the <prop> 
element is also a "property" and I didn't find a proof or exact 
specification in the standard to answer that.
While it is somewhat obvious for me, it doesn't seem to be so for 
others.

> Hope this helps,

Yes, thanks a lot!

Greets,
   Helge