W3C home > Mailing lists > Public > w3c-dist-auth@w3.org > January to March 1998

RE: Extend PROPPATCH to allow appending to properties?

From: Jim Whitehead <ejw@ics.uci.edu>
Date: Mon, 2 Mar 1998 16:39:10 -0800
Message-ID: <01BD45F9.BB0FF3C0.ejw@ics.uci.edu>
To: "'Jim Davis'" <jdavis@parc.xerox.com>, "'WEBDAV WG'" <w3c-dist-auth@w3.org>
On Monday, March 02, 1998 2:32 PM, Jim Davis [SMTP:jdavis@parc.xerox.com] 
wrote:
> As you know, I've been arguing that both external members and ordering of
> collections should be implemented by properties alone.  Last night it
> occurred to me that such property manipulation would be way more 
efficient
> if one extended PROPPATCH by defining a new XML element (append) that
> added a new value to a property (optionally at an arbitrary position).
>
> Without such an extension, to add a new external member one do LOCK,
> PROPFIND, PROPPATCH, UNLOCK.  With it, it suffices to do a PROPPATCH.

Unless you have test and set semantics on this append capability, it will 
be difficult to guarantee freedom from race condition problems without 
performing a LOCK.  Since PROPPATCH doesn't modify the entity tag (it 
doesn't modify the GET entity body), you can't use If-Match to see if the 
contents have changed.

> In a way, this makes PROPPATCH behave like PATCH did.  It allows a client
> to rewrite a value without a round trip.

I think you'd save one round trip (PROPFIND).

> A little more detail:  I propose to define a new XML element 'append', to
> extend propertyupdate to allow it.  The 'append' XML element MUST have a
> prop element, and optionally accepts a a 'listposition' XML element.  It
> interprets the property named by the prop as a list, and inserts the 
value
> of the prop into that list.  If listposition is not provided, the new 
item
> goes at the end.  If it is, then it specified the position.  I have not
> worked out listpostion, but it would include means to specify absolute
> position (0-n), first, last, and position relative to another value.
> (before, after).

It seems to me the devil is in the details of how to specify the absolute 
position.  Where do you start counting?  What gets counted (elements), what 
doesn't (PIs)?  It might be interesting to perform counting by "level" -- 
i.e., append after the 2nd level 2 element.

- Jim
Received on Monday, 2 March 1998 20:23:14 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 18:43:44 GMT