Subject: WebDAV properties

From: Adam Klatzkin <[email-masked]>
Date: Mon, 20 Nov 2000 14:09:40 -0500

From section 4.5 of RFC 2518

> The property namespace is flat; that is, no hierarchy of properties is
explicitly recognized.  
> Thus, if a property A and a property A/B exist on a resource, there is no
recognition of any 
> relationship between the two properties. . . .
>
> ... 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.

Example from section 8.2.2

<?xml version="1.0" encoding="utf-8" ?>
<D:propertyupdate xmlns:D="DAV:"
xmlns:Z="http://www.w3.com/standards/z39.50/">
 <D:set>
   <D:prop>
      <Z:authors>
          <Z:Author>Jim Whitehead</Z:Author>
          <Z:Author>Roy Fielding</Z:Author>
      </Z:authors>
   </D:prop>
  </D:set>
</D:propertyupdate>

Unless I am interpreting this incorrectly, the example seems to violate the
definition of the property namespace as described in section 4.5.
Can anybody provide any insight into this?
One thought is that maybe
          <Z:Author>Jim Whitehead</Z:Author>
          <Z:Author>Roy Fielding</Z:Author>
is itself the value that should be stored for the Z:authors property?
If that is the case then how do I prevent an XML parser from parsing the
element tags?  Do I have to attempt to rebuild this string from the parsed
data and store it?

Thanks for any help,
Adam Klatzkin
Software Engineer
Bentley Systems

---

From: Greg Stein <[email-masked]>
Date: Mon, 20 Nov 2000 19:00:20 -0800

On Mon, Nov 20, 2000 at 02:09:40PM -0500, Adam Klatzkin wrote:
>...

That XML fragment is indeed the property value for Z:authors.

> element tags?

Probably with extreme difficulty. Probably not even possible with most XML
parsers.

> Do I have to attempt to rebuild this string from the parsed
> data and store it?

If you want to interpret the value as a string... yes -- you would need to
rebuild it.

As a concrete example of this behavior: mod_dav parses the above
DAV:propertyupdate request into an XML structure. When it goes to store the
Z:authors property's value, it reconstructs the string and stores that. So,
there is precedent for reconstruction.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/