Now we see exactly how a client is supposed to find out what is inside a collection. Typically, users want to see directory listings in order to manage files. A directory listing can simply be a fixed, standard format or it can be flexible. Even local file systems now show the need for flexibility for example, in collections of photos where users like to see thumbnails and pixel sizes in directory listings. WebDAV was designed with this flexibility from the ground up, so it can handle not just directory listings, but also:
Thus, WebDAV defines a consistent semantic model for properties: Every resource has an extensible set of properties, including a handful of standard properties. Properties can be downloaded for just one resource or for a collection, including all the resources in a collection. The WebDAV methods for manipulating properties are PROPFIND and PROPPATCH. To achieve the flexibility and easy parsability required, both PROPFIND and PROPPATCH make heavy use of XML. XML is easy to parse, transform, and display. The XML results returned in a PROPFIND response can be used to quickly generate rich directory contents listings, in any visual format selected by the client. XML schemas are easy to extend, particularly when XML namespaces are used, which makes XML particularly attractive when custom metadata must be transmitted. In this chapter, we'll see how PROPFIND and PROPPATCH work and what their XML formats look like. |