WebDAV Block Samples


Back - to Cocoon Samples main page
Back - to Cocoon Blocks Samples main page


WebDAV - How to How to build a poor men's CMS with Cocoon and WebDAV
Setting up mod_dav - How to setup the Apache Web server as a WebDAV server

WebDAV protocol examples

NOTE: All these samples operate on the filesystem by default. Each sitemap has a global variable {staging} that is empty. Just put your content on a WebDAV server (i.e. copy this folder to your WebDAV server) and point this variable to the corresponding path. The WebDAV protocol is then used transparently. Now you can connect one or several additional Cocoon instances to your WebDAV repository to serve as publishing engines.

In fact you could use any of Cocoon's pseudo protocols that implements the TraversableSource and ModifiableSource interfaces.

step1 - Using the TraversableGenerator
step2 - Browsing the folder hierarchy
step3 - Changing content
step4 - Putting meta data separate. This sample puts the meta data in a separate file with a .meta extension. You could equally well put your meta data in a relational database by putting the SQLTransformer in the write pipeline and modifying the doc2write.xsl stylesheet accordingly. That way you can query your meta data via SQL later on. In the future there will be the possibility to store your meta data together with your document as a WebDAV property and query it via DASL (given you have a DASL enabled WebDAV server such as Catacomb)
step5 - Creating new content
Flow sample - Sample using flow

Serving WebDAV

WebDAV sitemap - This sample shows how to serve WebDAV clients from Cocoon (i.e. using Cocoon as a WebDAV server) - still some work in progress, but quite usable already: point your favourite WebDAV client to [Cocoon URL]/samples/blocks/webdav/davmap/repo/ and have fun browsing around!


DASL query - This sample shows how to run a query against a DASL enabled WebDAV server (such as Catacomb or Slide). It assumes that on localhost a DASL enables server is running with a resource path of /repos (the default place for Catacomb installs). If that's not the case, please change dasl/test.dasl.xml accordingly.
Query source - View the actual query source.


webdav.org - The webdav.org website
Catacomb - A DASL enabled WebDAV server