Re: Format of DAV:get* properties

Wallmer, Martin wrote:

> Hi,
> 
> 
> <julian>
> ... So one low-cost suggestion I made was to require servers that do
> support DAV:basicsearch to perform matching on DAV:getcontentlength
> after normalizing whitespace in the attribute value. I think in practice
> this is what servers do anyway. Feedback appreciated.
> </julian>
> 
> ours does
> 
> <julian>
> If we can make this operator reasonably simple, would there be support
> for adding it as mandatory operator?
> </julian>
> 
> media type is often used in queries. Having an operator for getting it 
> in an easy way helps the client. From my point of view it is not hard to 
> implement, so +1 for media-type-match from me.

OK,

it seems to me that mathching by content type is one of the most 
frequently used conditions, so let's make that as easy as possible (as 
right now, it isn't easy at all).

We want to match on the "type" and "subtype" elements of the media type 
as defined in RFC2616, section 3.7.

As this is a match on two independant tokens, we *could* introduce an 
operator that separates both. However, everybody is familiar with the 
"type/subtype" format, and there doesn't seem to be any tokenization 
issue. So let's just define


DAV:media-type-like operator

<!ELEMENT media-type-like (#PCDATA)>

This required operator can be used to specify conditions on the type and 
subtype parts (RFC2616, section 3.7) of the DAV:getcontenttype property. 
The specified string uses the format "type/subtype" and supports the 
wildcard patterns defined for DAV:like.

Examples:

<media-type-like xmlns="DAV:">text/%</media-type-like>

matches all resources with representations having the media type "text" 
and any subtype.

<media-type-like xmlns="DAV:">application/pdf</media-type-like>

matches all resources with representations having the media type 
"application" and the subtype "pdf".

<media-type-like xmlns="DAV:">application/%+xml</media-type-like>

matches all resources with representations having the media type 
"application" and subtypes ending in "+xml".


Note: if we make this a required operator (which I'd prefer), we'll also 
have to think about making DAV:like required (any objections from the 
current implementers)?

Julian

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

Received on Sunday, 30 November 2003 06:20:33 UTC