Tamino XML Server Version 9.7
 —  Tamino WebDAV Functionality  —

Properties

One major benefit of storing documents in WebDAV compared to simple file systems is that each document (and folder) also contains properties. Some properties are provided by the WebDAV system, others are user-defined, thereby allowing applications to add any information they wish to the WebDAV resources.

Properties are basically key value pairs, where the key is a qualified name (QName) and the value is a string. Properties are represented as XML elements, where the key is the name of the element and the value is the content. This means that the restrictions of XML element names and content apply to WebDAV properties.

A property with the name author in the namespace http://myhost.com/nspace1 with the value John could be represented as:

<ns1:author xmlns:ns1="http://myhost.com/nspace1">John</ns1:author>

WebDAV properties can also be XML fragments, where the content contains further XML elements.

The information in this document is organized under the following headings:


Live Properties

According to RFC 2518, a live property is "a property whose semantics and syntax are enforced by the server". Please refer to RFC 2518, RFC 3253, and RFC 3744 for a list of the available live properties. All the required live properties are supported by the Tamino. Some of the optional live properties are not available. The live properties are predefined and belong to the DAV:namespace.

An example of a live property is the content-type of a document, which has the name getcontenttype and would be represented as:

<d:getcontenttype xmlns:d="DAV:">test/xml</d:getcontenttype>

Top of page

Dead Properties

According to RFC 2518, a dead property is "a property whose semantics and syntax are not enforced by the server. The server only records the value of a dead property; the client is responsible for maintaining the consistency of the syntax and semantics of a dead property". This basically means that dead properties can be anything which can be represented as XML and which is not in the DAV:namespace, since that namespace is reserved for the live properties.

Top of page

Special Tamino Properties

The Tamino Server offers some special properties which are used to control certain functional aspects. The special Tamino properties are in the namespace http://namespaces.softwareag.com/tamino/response2. These properties can only be applied to folders (WebDAV collections) and not to documents.

Collection

The property collection specifies the Tamino collection to which the WebDAV folder is mapped. By default, a folder is mapped to the collection ino:dav. If this property is set for a WebDAV folder, all documents stored in this folder and all subfolders are stored into the specified Tamino collection. Note that changing this property does not move the documents stored in the WebDAV folder to the new collection; only documents stored after the change are stored in the new Tamino collection. Note also that the collection to which the mapping is set must exist before specifying the mapping – it is not created automatically.

Since WebDAV is often used like a file system and should be able to store all kinds of documents, it is probably a good practice to set the mapped collections to optional schema usage, so that also documents without a matching schema can be stored to the respective WebDAV folder.

Non-XML Doctype

When a WebDAV folder is mapped to a Tamino collection, all non-XML data is stored into the doctype ino:nonXML by default. If another non-XML doctype should be used, it can be specified using the non-xml-doctype property.

Auto-Version Control

The Tamino Server provides a mechanism for putting WebDAV collections under auto-version control. This means that any document stored into that folder is automatically put under version control, and changes to the document can lead to automatically generated versions. To activate this option, the auto-version-control property can be set to any of the four support auto-versioning modes: checkout-checkin, checkout-unlocked-checkin, checkout, and locked-checkout. Set the value off to deactivate this option after it has been set.

Top of page

Setting Properties

In most cases, the WebDAV properties will probably be set by using a WebDAV client or an application using a WebDAV API. When communicating directly with the Tamino, the properties are set using the PROPPATCH command. The following example uses PROPPATCH to set to mydoctype the doctype for non-XML documents stored in the WebDAV folder myfolder:

PROPPATCH /tamino/mydb/ino:dav/ino:dav/myfolder HTTP/1.1
Host: mymachine.com
Content-Type: text/xml; charset="utf-8"
Content-Length: xxx

<?xml version="1.0" encoding="utf-8" ?>
<D:propertyupdate xmlns:D="DAV:"
  xmlns:Z="http://www.w3.com/standards/z39.50/">
  <D:set>
    <D:prop>
      <ino:non-xml-doctype
        xmlns:ino="http://namespaces.softwareag.com/tamino/response2">
        mydoctype
      </ino:non-xml-doctype>
    </D:prop>
  </D:set>  
</D:propertyupdate>

An example of a WebDAV client that supports the setting of properties and has been tested with Tamino is the DAV Explorer, an open source implementation from the University of California at Irvine (http://www.davexplorer.org/).

Top of page

Limitations

The properties that can be stored for one WebDAV resource are limited in size. About 32 kilobytes of space are available for each resource – depending on the type of encoding used, this can be considerably less than 32,000 characters. The property values are indexed using standard indexes, so performing searches on the properties should be very efficient.

Top of page

Accessing Properties from XQuery

The WebDAV properties are represented as XML fragments and can be accessed from within XQuery requests using special predefined functions. Please refer to the Tamino WebDAV Functions overview for details on these functions.

Top of page