cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Homeijer <>
Subject webDAV status - Separation of content and protocol
Date Thu, 17 Oct 2002 07:13:05 GMT

I have build a prototype webapp that handles the webDAV protocol for my
application. With very little pipelines and files I was able to simulate a
file system that contains files from a folder in my webapp and contains
files that represent rows in a database table (most "files" will be
read-only for now).

At the bottom of this mail I included a snippet of my sitemap.

I you look at it, you'll see that the sitemap contains code that handles the
DAV protocol and code to represent my virtual filesystem on top of my Cocoon
uri space in DAV. I think my next step should be to seperate the generic
webDAV handling from my "filesystem" configuration.

I see some options for this:
1. Creating a DAVmap handler, like the sitemap handler that reads a davmap
configuration and represents this as a DAV filesystem.
2. Creating a generic DAV sitemap and mount that in my DAV root directory.
The dav sitemap uses information from the DAVmap from my root DAV directory
and represents this as a DAV filesystem.
3. Creating a DAVmap configuration and generating this into a DAV sitemap
that is specific for my URI space configuration. This sitemap can than be
mounted in a DAV directory.

Input appreciated.


<map:match pattern="spike/**">
  <map:act type="requestmethod">
    <map:redirect-to uri="cocoon:/WEBDAV/{request-method}/{../1}"/>

<map:match pattern="WEBDAV/PROPFIND/*">
  <map:act type="status">
    <map:generate type="directory" src="files"/>
    <map:transform src="propfind{../1}.xsl"/>
    <map:serialize type="xml"/>

<map:match pattern="WEBDAV/OPTIONS/*">
  <map:act type="set-header">
    <map:parameter name="DAV" value="DAV:1"/>
    <map:parameter name="Allow" value="OPTIONS, GET, HEAD, POST, DELETE,
    <map:generate type="request"/>
    <map:serialize type="xml"/>

<map:match pattern="WEBDAV/LOCK/*">
  <map:generate src="dummylock.xml"/>
  <map:serialize type="xml"/>

<map:match pattern="WEBDAV/GET/offerte/offerte(*.*).xml">
  <map:generate src="cocoon://main/offreren/offerte({1}.{2}).xml.debug"/>
  <map:serialize type="xml"/>
<map:match pattern="WEBDAV/GET/files/*.xml">
  <map:generate src="files/{1}.xml"/>
  <map:serialize type="xml"/>

<map:match pattern="WEBDAV/GET/files/*.txt">
  <map:read src="files/{1}.txt" mime-type="text/plain"/>

<map:match pattern="WEBDAV/PUT/files/*.xml">
  <map:generate type="streamdav"/>
  <map:transform src="writetofile.xsl">
    <map:parameter name="file" value="files/{1}.xml"/>
  <map:transform type="write-source"/>
  <map:transform src="dummydav.xsl"/>

To unsubscribe, e-mail:
For additional commands, email:

View raw message