W3C home > Mailing lists > Public > w3c-dist-auth@w3.org > April to June 2002

Lightweight PROPFIND requests

From: Jim Luther <luther.j@apple.com>
Date: Tue, 28 May 2002 18:18:41 -0700
To: w3c-dist-auth@w3.org
Message-Id: <02D5A282-72A2-11D6-B08A-0003934B6A22@apple.com>
There are a few times when the Mac OS X WebDAV file system client needs 
to use the PROPFIND method with "Depth: 1" on a collection resource to 
determine if it contains any children resources. For example, POSIX 
requires that my rmdir code must not delete a directory (collection) 
unless it is empty. Since the WebDAV DELETE method doesn't work that way 
(it deletes all children), my code uses the PROPFIND method with "Depth: 
1" to determine if the DELETE method can be called on the empty 
collection, or if ENOTEMPTY should be returned because the collection 
has children. I don't need any properties from that PROPFIND, just the 
list of children.

I tried this:

<?xml version="1.0" encoding="utf-8"?>
<D:propfind xmlns:D="DAV:">

and it works with mod_dav. However (and this is my question), is this 
legal by the rule <!ELEMENT prop ANY>? I looked through the XML docs to 
see how ANY was defined but couldn't tell it allowed an empty set.

If that's illegal and I must I ask for at least one property, I'll just 
ask for the resourcetype property since it looks like the only property 
that MUST be defined for all DAV compliant resources (all of the other 
DAV properties are shoulds, or are MUSTs under certain conditions).


- Jim Luther
Received on Tuesday, 28 May 2002 21:18:43 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:01:25 UTC