- From: Jim Whitehead <ejw@ics.uci.edu>
- Date: Tue, 16 Sep 1997 19:11:06 -0400
- To: "'Arthur van Hoff'" <avh@marimba.com>
- Cc: Push Workshop <www-push@w3.org>
> By the way, I would love to get a pointer to the latest > definition of a web-dav collection. I haven't been able > to find it yet. > From draft-ietf-webdav-protocol-02.txt, the WebDAV definition of a collection is: 3.1.1 Collection Resources A collection is a Web resource type whose primary state is a set of URIs and associated values that are recorded as properties on the resource. The URIs identify resources that are members of the collection. The values associated with each URI include information such as the Last Modified Date, Entity Tag, Creation Date, Content Type, Display Name, and whether the member is a collection. A member of a collection is either an internal member resource, which MUST have a URI that is relative to the base URI of the collection, or an external member resource, which has a URI which is not relative to the base URI of the collection. External member resources are further subdivided into propagate members, which have recursive method invocations propagated to them, and no-propagate members, which do not. The following operations are defined upon a collection: MKCOL - create a new collection ADDREF - add an external member resource DELREF - remove an external member resource INDEX - list the contents of a collection The existing DELETE method (RFC 2068) removes a collection. The INDEX method is specified as follows: The INDEX method returns a machine-readable representation of the membership of the resource at the Request-URI. For a collection, INDEX MUST return a machine-readable list of its members. For other resources, the information returned by INDEX is undefined, and MAY vary. The request message body of an INDEX request SHOULD be ignored. The default INDEX response for a resource is a text/xml HTTP entity (i.e., an Extensible Markup Language (XML) document) that contains a single XML element called collectionresource which describes the collection, and a set of XML elements called memberesource which describe the members of the collection. The response from INDEX is cacheable, and SHOULD be accompanied by an ETag header (see section 13.3.4 of RFC 2068). If GET and INDEX return different entities for the same resource state, they MUST return different entity tags. The server MUST transmit the following XML elements for each member resource of a collection: Ref, IsCollection, Content-Type, External. The server MUST transmit the following XML elements if it can generate any meaningful values for them: Creation-Date, Last-Modified, DisplayName, Content-Language. The server SHOULD transmit Etag XML elements for each member (see section 13.3.4 of RFC 2068). The value of content-type, last-modified, and etag XML elements MUST be identical to the value of the response header field of the same name in the HTTP/1.1 specification. Since the HTTP/1.1 header fields are described in terms of the on-the-wire entity, the values presented by INDEX are those that would be generated if the resource was accessed using the GET method without content negotiation. An example of INDEX is as follows: INDEX /user/yarong/dav_drafts/ HTTP/1.1 Host: www.microsoft.com HTTP/1.1 200 OK Content-Type: text/xml Content-Length: xxx Last-Modified: xxx ETag: "fooyyybar" <?XML:Namespace href="http://www.ietf.org/standards/dav/" As = "D"/> <D:CollectionResource> <MemberResource> <XML:Href>namespace.doc</XML:Href> <IsCollection>false</IsCollection> <Content-Type>application/msword</Content-Type> <External>false</External> <Creation-Date>Thu, 20 Mar 1997 23:05:25 GMT</Creation-Date> <Last-Modified>Fri, 22 Aug 1997 18:22:56 GMT</Last-Modified> <Etag>8675309</Etag> <DisplayName>WebDAV Name Space Operations Draft</DisplayName> <Content-Language>en</Content-Language> </MemberResource> </D:CollectionResource> This example shows the result of the INDEX method applied to the collection resource http://www.microsoft.com/er/yarong/dav_drafts/. It returns a response body in XML format, which gives information about the container's sole member, http://www.microsoft.com/users/yarong/dav_drafts/namespace.doc - Jim
Received on Tuesday, 16 September 1997 19:14:36 UTC