<?xml version="1.0"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<samples xmlns:xlink="http://www.w3.org/1999/xlink" name="WebDAV Block Samples">

  <group name="Back">
    <sample name="Back" href="../..">to Cocoon Samples main page</sample>
    <sample name="Back" href="..">to Cocoon Blocks Samples main page</sample>
  </group>

  <group name="Documentation">
    <sample name="WebDAV" href="http://wiki.cocoondev.org/Wiki.jsp?page=WebDAVBlock">
      How to How to build a poor men's CMS with Cocoon and WebDAV
    </sample>
    <sample name="Setting up mod_dav" href="http://httpd.apache.org/docs/2.0/mod/mod_dav.html">
      How to setup the Apache Web server as a WebDAV server
    </sample>
  </group>

  <group name="WebDAV protocol examples">
    <note>
      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.
    </note>
    <note>
      In fact you could use any of Cocoon's pseudo protocols that implements the TraversableSource and
      ModifiableSource interfaces.
    </note>
    <sample name="step1" href="step1/repo/">
      Using the TraversableGenerator
    </sample>
    <sample name="step2" href="step2/repo/">
      Browsing the folder hierarchy
    </sample>
    <sample name="step3" href="step3/repo/">
      Changing content
    </sample>
    <sample name="step4" href="step4/repo/">
      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)
    </sample>
    <sample name="step5" href="step5/repo/">
      Creating new content
    </sample>
    <!--
    <sample name="step6" href="step6/repo/">
      Enabling WYSIWYG - This sample integrates htmlArea (see below for the link) as an example
      how to integrate other editors.
    </sample>
    -->
    <sample name="Flow sample" href="flowsample/repo/">
      Sample using flow
    </sample>
  </group>

  <group name="Serving WebDAV">
    <sample name="WebDAV sitemap" href="davmap/repo/">
      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!
    </sample>
  </group>

  <group name="DASL">
    <sample name="DASL query" href="dasl/">
      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.
    </sample>
    <sample name="Query source" href="dasl/src/test-dasl.xml">
      View the actual query source.
    </sample>
  </group>
  
  <group name="Protocol Level WebDAV Requests">
    <note>
      This sample shows how to run a query against a WebDAV server 
      (such as Catacomb or Slide). It assumes that
      on localhost a server is running with a resource 
      path of /repos (the default place for Catacomb installs). If
      that's not the case, please change low-level/test-search.xml and other test-*.xml accordingly.
      Also, adjust your username/password there.
    </note>
    <sample name="SEARCH Request" href="low-level/test-search.xml">
      Searches a WebDAV server for everthing that is of content type "text/xml" and return the first 4 hits ordered by content type.
    </sample>
    <sample name="SEARCH Request source" href="low-level/src/test-search.xml">
      View the actual query source.
    </sample>
    <sample name="PUT Request" href="low-level/test-put.xml">
      PUT will add a new resource to the WebDAV server.
    </sample>
    <sample name="PUT Request source" href="low-level/src/test-put.xml">
      View the actual query source.
    </sample>
    <sample name="PROPPATCH Request" href="low-level/test-proppatch.xml">
      PROPPATCH will set/remove WebDAV properties. Here, we set a sample property "http://cocoon.apache.org/samplenamespace/1.0:caption".
    </sample>
    <sample name="PROPPATCH Request source" href="low-level/src/test-proppatch.xml">
      View the actual query source.
    </sample>
    <sample name="PROPFIND Request" href="low-level/test-propfind.xml">
      PROPFIND will select all properties given from the target itself and all immediate decendants (because "Depth" is 1).
    </sample>
    <sample name="PROPFIND Request source" href="low-level/src/test-propfind.xml">
      View the actual query source.
    </sample>
  </group>
  
  <group name="WebDAV Source">
    <note>
      Just as with the examples above, make sure a webdav server is running. You can use the sample below after using the PUT request above.
    </note>
    <sample name="GETting a WebDAV resource" href="source/test.xml">
      with the webdav:// protocol.
    </sample>
  </group>

  <group name="Resources">
    <sample name="webdav.org" href="http://www.webdav.org/">
      The webdav.org website
    </sample>
    <sample name="Catacomb" href="http://www.webdav.org/catacomb/">
      A DASL enabled WebDAV server
    </sample>
  </group>

</samples>

