Angela Schreiber wrote:
...
so, i'd like to understand what is the goal of custom
xml properties.
...
Well, the same as using XML instead of text, I guess. Such as putting
things like marked-up text into properties:
<D:prop><X:comment foo='bar' xmlns:xhtml="..." xmlns:X="...">This is
an <xhtml:em>important</xhtml:em> change.</X:comment></D:prop>
In JCR (and therefore Jackrabbit), this kind of structure would
preferably be stored in nodes, not properties, I assume (a design that I
don't necessarily like).
So what we *have* to do is to make sure that somebody wants to set a
property value as above, it will either work, or fail upon PROPPATCH.
For the latter, check whether the property XML element ("comment") has
element child nodes. If it does, reject the request.
If we want enable Jackrabbit to store things like that, we need to map
the WebDAV property to something over than a single-valued string. It
may be possible to use JCR child nodes, but I'm not sure how that fits
into the Jackrabbit WebDAV design.
An alternative would be to tunnel the value in a way that it as least
unlikely to be confused with other property values, such as a
multivalued string property:
comment[0] = "WebDAV XML property"
comment[1] = content serialized as XML, including containing element,
attributes and namespace decls. (*)
BR, Julian
(*) See <http://greenbytes.de/tech/webdav/rfc4918.html#rfc.section.4.3.1>