move doco to branches

git-svn-id: https://svn.apache.org/repos/asf/lenya/branches/doco@416020 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/.project b/.project
new file mode 100644
index 0000000..c43f62e
--- /dev/null
+++ b/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>doco</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/CREDITS.txt b/CREDITS.txt
deleted file mode 100644
index 9e33e6a..0000000
--- a/CREDITS.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-
-                                C R E D I T S
-                                 
-This is the file where major donations to the Lenya project are listed and it
-should be used to give appropriate visibility to those inviduals, organizations
-or companies that donated resources to the effort. This file wants to be one of
-the ways the Lenya community pays back.
-
-
- Community Credits
- =================
-                                   
- Active Committers:
- ------------------
-
-* Edith Chevrier
-* Dale Christ
-* Christian Egli
-* Antonio Gallardo
-* Andreas Hartmann   Andreas runs the cocooncenter.org site.
-* Andreas Kuckartz   Tester, Bugzilla reporter
-* Rolf Kulemann
-* Gregor J. Rothfuss 
-* Thorsten Scherler
-* Michael Wechner    
-
- Inactive Committers:
- --------------------
-
-* Juergen Bigalke      wrote some creators.
-* Memo Birgi
-* Marc Liyanage       wrote the first Lenya build system way back.
-* Felix Maeder
-* Rene Niedermowe
-* Giacomo Pati        helped to port the predecessor of Lenya to Cocoon.
-
- Other Contributors:
- -------------------
-
-* Lon Boonen           Lon is the original creator of Xopus and helped a 
-                       lot to integrate it into Lenya. Recently he 
-                       rewrote the JavaScript of the Lenya menubar.
-* Jose Chaso           Spanish translation.
-* Dale Christ          Fixes for blog publication.
-* Stephen England      Design of the Lenya logo, design of the Lenya UI.
-* Jann Forrer          Usability enhancements.
-* Jorge Gutierrez      Spanish translation.
-* Martin Hitz
-* Margrit John
-* Olivier Lange        French translation.
-* Jean Pierre LeJacq   Build system improvements.
-* Martin Lüthi         Mail class.
-* Christian Stocker    Christian is the original creator of the 
-                       Bitflux Editor and helped a lot to integrate 
-                       it into Lenya.
-* Urs Stöckli
-* Giampaolo Trapasso   Italian translation, entertainer on #lenya
-* Markus Vaterlaus
-* Kars Veiling
-* Marc von Wattenwyl
-* Thomas Werschlein
-
-
-                                                  The Apache Lenya Community
-                                                  http://lenya.apache.org/
diff --git a/INSTALL-BIN.txt b/INSTALL-BIN.txt
deleted file mode 100644
index 00fd72f..0000000
--- a/INSTALL-BIN.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-
-   +----------------------+
-   |    INSTALL BINARY    |
-   +----------------------+
-
-Jetty
------
-
-
-1) Start up Lenya by executing lenya.bat on Windows or lenya.sh on Unix, e.g.
-
-   sh lenya.sh servlet
-
-
-2) Open http://localhost:8888/ with your browser
-
-
-
-Tomcat
-------
-
-
-1) Copy lenya.war into .../TOMCAT_PREFIX/webapps directory
-
-2) Copy endorsed libraries into .../TOMCAT_PREFIX/common/endorsed directory
-
-3) Startup Tomcat
-
-
-
-Known issues
-------------
-Please read the "Known issues" section in the README.txt file
-to find out more about known bugs/issues in Lenya.
\ No newline at end of file
diff --git a/INSTALL-SRC.txt b/INSTALL-SRC.txt
deleted file mode 100644
index e2856cf..0000000
--- a/INSTALL-SRC.txt
+++ /dev/null
@@ -1,189 +0,0 @@
-Installation of the Source Version
-
-    * Prerequisites
-    * Standalone Installation (using the built-in Jetty)
-    * Installation with Apache Tomcat
-
-Prerequisites
-
-The following list describes the setup that is tested and recommended. 
-Please note that you can use other servlet containers as well, but Jetty and Tomcat are the tested ones.
-
-
-    *
-
-      Java 2 Platform, Standard Edition
-      version: 1.4.2 or newer, 1.5.x not tested.
-      source: http://java.sun.com/j2se/1.4.2/download.html
-    *
-
-      Apache Cocoon
-      version: 2.1.5.1
-      source: http://cocoon.apache.org/mirror.cgi
-
-      Note that Cocoon is needed when building the source version of Lenya, but the 
-      resulting Lenya webapp is completely self contained and therefore it does not need 
-      the Cocoon webapp to be installed. See the FAQ for details of configuration changes 
-      required when running multiple Cocoon based applications.
-    *
-
-      (optional) Apache Tomcat for JDK 1.4
-      version: 5.0.28 or newer, 5.5.x not tested.
-      source: http://jakarta.apache.org/site/binindex.cgi
-
-      Note that Lenya ships with Jetty and therefore does not need a servlet container to be installed.
-
-Standalone Installation (using the built-in Jetty)
-
-   1.
-
-      Get the Java SDK (see Prerequisites)
-   2.
-
-      Get Apache Cocoon (see Prerequisites)
-   3.
-
-      Get Apache Lenya (see Download Lenya)
-   4.
-
-      Extract the downloaded Lenya archive to the lenya-trunk directory as described below. 
-      If you use Subversion, create your Lenya checkout inside the src directory as described below. 
-      It is recommended to use the following directory structure for an easier build experience.
-
-            your_home/ (or c:\ on Windows, NOT My Documents)
-              `-- src/
-                   |-- lenya-trunk/            $LENYA_HOME
-                   `-- cocoon/                 $COCOON_HOME
-                        `-- build/
-                             `-- webapp/       $COCOON_WEBAPP
-          
-   5.
-
-      Configure Lenya
-
-      If your Cocoon source tree is set up as described above, you can skip this step. 
-      If your Cocoon source tree is not at ../cocoon relative to Lenya, you need to edit 
-      your build properties. To do this, copy $LENYA_HOME/build.properties to 
-      $LENYA_HOME/local.build.properties.
-
-      Edit local.build.properties. For the described configuration the following settings 
-      will work (MS Windows: Don't use backslashes "\" for directory separation.)
-          * cocoon.src.dir=$COCOON_HOME
-          * tomcat.home.dir=$TOMCAT_HOME
-   6.
-
-      Build Lenya
-
-      Execute build.bat or build.sh in your Lenya source directory, depending on your platform.
-
-      MS Windows
-
-            $LENYA_HOME > build.bat
-          
-
-      Unix
-
-            $LENYA_HOME > ./build.sh
-          
-
-   7.
-
-      Start Lenya
-
-      Execute lenya.bat or lenya.sh servlet in your Lenya source directory, depending on your 
-      platform. Make sure that you have the environment variable JAVA_HOME defined to point 
-      to the location of the Java SDK you installed (see Prerequisites).
-
-      MS Windows
-
-            $LENYA_HOME > lenya.bat
-          
-
-      Unix
-
-            $LENYA_HOME > ./lenya.sh servlet
-          
-
-  8.
-
-      Test the installation
-
-      http://localhost:8888/
-
-Installation with Apache Tomcat
-
-Installing Lenya with Tomcat is mostly the same procedure. Follow Steps 1-4, then do the steps below.
-
-   1.
-
-      get Apache Tomcat (see Prerequisites)
-   2.
-
-      Install Apache Tomcat
-
-      See Tomcat 5.0 Setup
-
-      MS Windows:
-      Basically this is setting the JAVA_HOME environment variable and running the Tomcat installer. 
-      Decide to run Tomcat as a Windows NT/2000/XP-Service.
-      Warning
-      Make sure you do not install at a location with spaces in the path.
-   3.
-
-      Configure Lenya
-
-      To install Lenya with Tomcat, you need to edit your build properties. To do this, 
-      copy $LENYA_HOME/build.properties to $LENYA_HOME/local.build.properties.
-
-      Edit local.build.properties. For the described configuration the following settings 
-      will work (MS Windows: Don't use backslashes "\" for directory separation.) It is 
-      important that tomcat.home.dir is an absolute path. Replace $TOMCAT_HOME by your Tomcat 
-      installation directory. If your Cocoon source directory is not at ../cocoon 
-      relative to Lenya, then change the cocoon.webapp.dir and cocoon.src.dir properties.
-          * cocoon.src.dir=$COCOON_HOME
-          * tomcat.home.dir=$TOMCAT_HOME
-   4.
-
-      Build Lenya
-
-      Execute build install in your Lenya source directory.
-   5.
-
-      Checked versions of endorsed libraries
-
-      Lenya and Tomcat will inter-operate correctly only if the proper versions of the Xalan 
-      and Xerces libraries are used consistently throughout the deployment. Unfortunately 
-      this can be difficult to get to work correctly since both of these libraries are shipped 
-      with Java 2 SDK, Tomcat, Cocoon and Lenya.
-
-      The following libraries must be placed in the endorsed library directory for your deployment.
-          * jakarta-bcel-20040329.jar
-          * jakarta-regexp-1.3.jar
-          * xalan-2.6.0.jar
-          * xercesImpl-2.6.2.jar
-          * xml-apis.jar
-
-      They are placed by the build process in the directory specified by tomcat.endorsed.dir in 
-      build.properties. You should validate that these files are indeed in the proper location 
-      for your deployment. You must then validate that no other instances of these libraries 
-      exist in any of the following directories:
-          * The Java 2 SDK endorsed standards directories. This is usually ${JAVA_HOME}/lib/endorsed/.
-          * Any other location in your Tomcat deployment. Specifically, check shared/lib/, common/lib/ and server/lib/.
-          * Any other location in your Lenya deployment. Specifically, check webapps/lenya/WEB-INF/lib/.
-
-      A common symptom of incorrect library version are blank pages after starting Lenya. 
-      Try carefully checking the location and version numbers of each of the libraries.
-
-      References:
-          * Tomcat Class Loader HOWTO (http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html)
-          * Java 2 Endorsed Standards Override Mechanism (http://java.sun.com/j2se/1.4.2/docs/guide/standards/index.html)
-   6.
-
-      Restart Tomcat
-
-      Restart Tomcat to load the Lenya webapp.
-   7.
-
-      Test the installation
-
-      http://localhost:8080/lenya/
\ No newline at end of file
diff --git a/KEYS b/KEYS
deleted file mode 100644
index c8d8936..0000000
--- a/KEYS
+++ /dev/null
@@ -1,77 +0,0 @@
-(instructions copied from cocoons's KEYS file)
-
-This file contains the PGP keys of various developers.
-Please don't use them for email unless you have to. Their main
-purpose is code signing.
-
-Users: pgp < KEYS
-Developers:
-        pgp -kxa <your name> and append it to this file.
-        (pgpk -ll <your name> && pgpk -xa <your name>) >> this file.
-        (gpg --list-sigs <your name>
-             && gpg --armor --export <your name>) >> this file.
-             
-pub  1024D/08586F81 2004-12-29 Rolf Kulemann (Commiter of the Apache Software Foundation) <roku@apache.org>
-sig 3       08586F81 2004-12-29   Rolf Kulemann (Commiter of the Apache Software Foundation) <roku@apache.org>
-sub  2048g/A57AD592 2004-12-29
-sig         08586F81 2004-12-29   Rolf Kulemann (Commiter of the Apache Software Foundation) <roku@apache.org>
- 
------BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v1.2.4 (GNU/Linux)
- 
-mQGiBEHTMc8RBACrsQmDSKRahyGhnb2744to8ejgPpNSnZ2Zxr4D7YFG3h5YfbXJ
-GOGbtqelSCHUUhUxmOUOUmaiuhSN0l3a1D+zgiesuZxQyCVUVuKPqKkmxm3+q5Ir
-dg6/BXTVQJ+oLJNa4/k/P3V4uncq67NXvweJSzsm15Z9b92K0uFne+m8FwCgp85g
-Lhq+KSHxWTbeZfkUOhhTm7UD/3bcXgOs2NWmqvoOjNVvGu1Fp8mUvpDt5k4mXLqc
-SxAWHm84Mb4K4jrutoc+zWUvXI+ZtoElYGBm3VPBmqSxMgtUrnlPPpQCqZ6w2dU9
-TgJRzJgzwqJFwT++ivPMIokwL5ORn9oKMZUjNjjwCDGFuhUGNTZ2hwiF8568CPs2
-VDIQA/9vQlH5qyJrS9iHvpWKSkE2IdLf1KzpiLx/wiMdRU3UPRN4+ZlObfYwOOdp
-HG0/1njFqueQT4N38DsIzbkXrPd9QPYFiVgbH7dfXKMl3Ddc/5WibfvAWABC6p2u
-Jm6/NANTG9/3aHzg2BsYi+LYgbKJP9+DBIurM511PnIhlW46zLRMUm9sZiBLdWxl
-bWFubiAoQ29tbWl0ZXIgb2YgdGhlIEFwYWNoZSBTb2Z0d2FyZSBGb3VuZGF0aW9u
-KSA8cm9rdUBhcGFjaGUub3JnPoheBBMRAgAeBQJB0zHPAhsDBgsJCAcDAgMVAgMD
-FgIBAh4BAheAAAoJEAFpbawIWG+BG7gAoJ5fRwMJ3uH4458Plut5lmKu3bggAKCf
-TAn5L3xkjOuIeLjsHM3eI8nYJbkCDQRB0zHgEAgArsy9ADrDmueVAPyYBCDwR2nL
-IekaRRngrocjPPiy4dbEAywkw9A0ixpWKOsTeWHu8/+fKu7+gbInwH3YPLvpJ2+N
-3sHdNpGlGYEV2v50EoJnjeRzRi9HZzPlMtyde/x6Buedz/UtuA3P3IRxSH64OzJE
-DQmMEETkgbIC+//OiNBlxZNzXDhwxoCXjZMTAiXoGITPg6PvDfzgFITWnu6kbLy0
-37aaWAlOS1OLCP9emhDC6I6fE+JaHJyfXfNYlNIy3IMEHVJPsn9uMPcI2jsfiaF2
-HcHJXWFxwWXLHAwRIxXyKPDuKpY6eWU2SIXMNRPsYBiEdgjn8hBWwwFAfT8P0wAD
-Bgf9HSwOjl6MIEpM//JPRV4WMWje7orme+uNVIv5PUmtEev2VE8nSJE5zjgcTYjs
-scSqRFKxHojCDEMbN7GtIXF+AUgoB8BNYT0x0fGf2uohWSteKjGLV23AYG1T+ENr
-v/VqEEP0KnRSwi214rKOsl9msvUtKsX3VqnFiWfSsfv7Azntv1gnHIAIEtlL2Av+
-5aIlbDQ85MGQITOMDO8jGFb+IT/8uf6JnyyxzQzxnKlpp19kew6jnrCCTorral8r
-e7RV4b+KAkHU19YsJWyb+9boCyzA/sgZpjEA9BTAxQOG/TgnR3nqeLyC6mpCVczZ
-JQ7nBdkp2cPEyuTJoE7g1JIhKohJBBgRAgAJBQJB0zHgAhsMAAoJEAFpbawIWG+B
-cMIAmwYpKy/m/LVY7OVZFg7ZoxUU0M14AJ9KrFhoLUbekdKWVY6YNMKarO055w==
-=ndjW
------END PGP PUBLIC KEY BLOCK-----
-             pub  1024D/6A6DC9F7 2005-05-01 Gregor J. Rothfuss <gregor@apache.org>

-sig 3       6A6DC9F7 2005-05-01   Gregor J. Rothfuss <gregor@apache.org>

-sub  1024g/E245A2B0 2005-05-01

-sig         6A6DC9F7 2005-05-01   Gregor J. Rothfuss <gregor@apache.org>

-

------BEGIN PGP PUBLIC KEY BLOCK-----

-Version: GnuPG v1.2.3-nr1 (Windows XP)

-

-mQGiBEJ1SoQRBAC99TailoMLV0eeOkkt+j2qcSiMIFkHdjvh4HoqR6IFwU25gBTB

-0kc6oqx6DzeHI+k8OYh0oG6d7N82kgeGAYsxtYfSrHGqWTr7zz/YjY1N/0xHS+iW

-AEprN7s8Zf3kKQH53bKS6OOVMfdjTkrjwTOw9z0EE6aWzV0y9SIyj3QiKwCgm1dt

-Z1EdHHWGQ0D/iOuPJy4ejCkD/3MLJqjBicx5Lbhm444C28Na7G4QMq84QqhC+qNf

-VY2NcnuMxni7AbcrbGxB5Cvo8untgt/flTvMmK+o0oYZ/zuvvK4sJ5uXDawWnFLH

-nFcvRyLdzHglKeqpEh4LirxR0noiZyrBy0JiHg9NeB/UviFD3bMPRHZorYNoeACK

-WrAHA/wNoH8w/lyYjycVJXgYCW1a4KXpkYqPBpJKKjqPvg9djuWNOaAmWoHcKBI3

-dxyySihi5nQ7ZsZhPXA1Qs/Mp8FeF7xXvr9c2j+r5LWDm4fy3kIpUEcQt3DPubpm

-N+jsb7q3zYcx9jDE5/gE3G4oiS2WqzZ/5+KVrU8dycxAO2tVmbQmR3JlZ29yIEou

-IFJvdGhmdXNzIDxncmVnb3JAYXBhY2hlLm9yZz6IXwQTEQIAHwUCQnVKhAIbAwcL

-CQgHAwIBAxUCAwMWAgECHgECF4AACgkQ8XfjPGptyfe1UwCfaZ8d+pVjgb2yMMa/

-q9+HYzsF9KIAnicPkeNbup0JWZ/Ax5ejNS/1s1GAuQENBEJ1SocQBACN+vU6lOYw

-TB+4s/7xdzSmGWoLv5ZNUNUrXVUwNYAdSCpwfIUcCOkE7mD2QCY7lkeukyYUzy6n

-y7C2zYCIxcf5B12mEX82jUcvHyezgCLziTCKKKnO6kfn5rG18MaPwqNEpyI+PG+h

-FFXGO42+aansVLIMpvHxwkVF0V/fqDtmEwADBQP/cFz7JuuEu0KgAxv8Q2oGsfbm

-qZzrPErChls7mSYBN2n7fWiqb1qcm2rfGq7vUtWGM+I26p+UKZhcF/AnDbfp9lT9

-xdp3rSg3t64//i8VbOv3Y5DCFbcfSVjRCvLzFMnQIT0NwLxkhGh8ugrharCVKgr2

-dEmRNV5jP7dHEpQx356ISQQYEQIACQUCQnVKhwIbDAAKCRDxd+M8am3J97oCAJ0d

-IfihpLACvSdSiT2fCm5UEFrI3ACfXOPMYHCtG4wDI7hrpjFcIjuTzEo=

-=C9sc

------END PGP PUBLIC KEY BLOCK-----

diff --git a/LICENSE.txt b/LICENSE.txt
deleted file mode 100644
index 261eeb9..0000000
--- a/LICENSE.txt
+++ /dev/null
@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed 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.
diff --git a/NOTICE.txt b/NOTICE.txt
deleted file mode 100644
index 5c7f8c6..0000000
--- a/NOTICE.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-This product includes software developed by The Apache Software Foundation
-(http://www.apache.org/).
-   
-This product includes software developed by the DOM4J Project
-(http://www.dom4j.org/).
-
-This product includes software developed by the XML:DB Initiative 
-(http://www.xmldb.org/).
-
-This product includes software developed by the BXE Project
-(http://bxe.oscom.org/).
-
-This product includes software developed by the Kupu Project
-(http://kupu.oscom.org/).
-
-Portions are Copyright (c) 1998-2000 World Wide Web Consortium 
-(Massachusetts Institute of Technology, Institut National de Recherche en
-Informatique et en Automatique, Keio University). All Rights Reserved.
-
-Portions are Copyright (c) 2001, 2002 Thai Open Source Software Center Ltd.
-All rights reserved.
diff --git a/README.txt b/README.txt
index 65ea2f7..02b295d 100644
--- a/README.txt
+++ b/README.txt
@@ -1,67 +1,78 @@
+# What is the doco pub?
+This publication is created with the aim to be a generic documentation publication for Apache wide usage.
 
-                    A  P  A  C  H  E        L  E  N  Y  A
+The first projects to test it are the Apache Forrest and the Apache Lenya project.
 
-  About Apache Lenya
-  ------------------
+The idea is to manage the content via the Apache Lenya CMS and export it via Apache Forrest.
 
-  Apache Lenya is a Java-based Open-Source Content Management System.
-  It is based on open standards such as XML and XSLT. One of its core
-  components is Cocoon from the Apache Software Foundation.
+# How to install?
+## Download
+You need to have the svn head of lenya and forrest:
+svn co https://svn.apache.org/repos/asf/lenya/trunk lenya-trunk
+svn co https://svn.apache.org/repos/asf/forrest/trunk forrest-trunk
 
-  Apache Lenya supports inline WYSIWYG editors. Your site editors do not
-  have to learn XML. This is possible thanks to the support of XML,
-  XSLT and XML Schema on the client side. An administration interface
-  allows advanced users to monitor the CMS, and perform configuration
-  tasks.
+Further you need to download the doco pub:
+svn co https://svn.apache.org/repos/asf/lenya/sandbox/doco doco
 
+We will refer to the checkouts {lenya-trunk} for lenya and {forrest-trunk} for forrest
+and {doco} for the doco pub.
 
-  Installation Instructions and Documentation
-  -------------------------------------------
+## Install forrest/lenya
+Follow 
+http://forrest.apache.org/docs_0_80/build.html
+and
+http://lenya.apache.org/1_4/installation/source_version.html
 
-  For the binary distribution read INSTALL-BIN.txt.
+##Install lenya docu pub.
+Since we are using a specific pub we need to tell lenya about it. 
+In your {lenya-trunk}/local.build.properties 
+*** NOTE: 
+*** If you not yet have them do
+*** cp {lenya-trunk}/build.properties {lenya-trunk}/local.build.properties) 
+you need to 
+1) add the pub:
+pubs.root.dirs={doco}:{pubs.root.dirs.more.pubs}
+2) add the modules:
+modules.root.dirs={doco}/modules:{modules.root.dirs.more.modules}
+3) change the default port
+web.app.server.jetty.port=9999
 
-  For the source distribution read INSTALL-SRC.txt.
+Since we are using an external content dir we will need to override the publication.xconf
+1) cp {doco}/config/publication.xconf {doco}/config/local.publication.xconf
+2) change <content-dir src="/home/thorsten/src/apache/forrest-trunk/whiteboard/doco"/> to
+<content-dir src="{forrest-trunk}/whiteboard/doco"/> for forrest (we will start with this)
 
-  The documentation available as of the date of this release is included
-  in this directory.
+# Start
+## CMS mode
+For authoring start lenya with
+{lenya-trunk}/build.sh
+{lenya-trunk}/lenya.sh
+http://localhost:9999/doco/authoring/index.html
+## Render mode
+To render your lenya site with forrest first you will need to deploy 
+locally some plugins (first time and after ./build.sh clean) and then start forrest.
+1) deploy locally
+cd {forrest-trunk}/whiteboard/plugins/org.apache.forrest.themes.core
+$FORREST_HOME/tools/ant/bin/ant local-deploy
+cd ../org.apache.forrest.plugin.internal.dispatcher
+$FORREST_HOME/tools/ant/bin/ant local-deploy
+cd ../org.apache.forrest.plugin.input.Lenya
+$FORREST_HOME/tools/ant/bin/ant local-deploy
+2) Run forrest, run ;)
+cd $FORREST_HOME/whiteboard/doco
+forrest run
+http://localhost:8888/index.html
 
-  If you are updating from a previous release of Lenya, make sure
-  that you read the installation instructions on updating first.
+WARNING
+This is a prototype ONLY for now, do not use it in production!!!
 
-  Look for the most updated documentation on the Apache Lenya web site
-  (http://lenya.apache.org/).
+NOTE
+For now we are rendering the authoring area only and do not support
+the live are. This will change.
 
-
-
-  Licensing and legal issues
-  --------------------------
-
-  Apache Lenya is licensed under the Apache Software License, a license of the BSD
-  family, and contains software which is compatible with the BSD licensing
-  style.
-
-  For more information, please read the LICENSE files in the /legal directory.
-
-
-
-  Credits
-  -------
-
-  For more information on credits and due reference to included software,
-  please read the CREDITS.txt file in this directory.
-
-
-  Known issues
-  ------------
-
-  The Apache issue tracker is available at
-  http://issues.apache.org/bugzilla/ .
-
-
-
-  Thanks for your interest in Apache Lenya.
-
-
-
-                                               The Apache Lenya Project
-                                             http://lenya.apache.org/
+TODO
+* lenya 
+- create forrest enabler usecase in lenya/doco. We need a basic usecase that adds forrest 
+specific files to a lenya pub.
+- create a forrest export usecase in lenya/doco. We need a basic usecase that 
+communicate via ant with forrest and invoke e.g. forrestbot, forrest site, ...
diff --git a/build.bat b/build.bat
deleted file mode 100644
index 880f322..0000000
--- a/build.bat
+++ /dev/null
@@ -1,39 +0,0 @@
-@echo off
-rem  Copyright 1999-2004 The Apache Software Foundation
-rem
-rem  Licensed under the Apache License, Version 2.0 (the "License");
-rem  you may not use this file except in compliance with the License.
-rem  You may obtain a copy of the License at
-rem
-rem      http://www.apache.org/licenses/LICENSE-2.0
-rem
-rem  Unless required by applicable law or agreed to in writing, software
-rem  distributed under the License is distributed on an "AS IS" BASIS,
-rem  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-rem  See the License for the specific language governing permissions and
-rem  limitations under the License.
-rem
-rem ----------------------------------------------------------------------------
-rem build.bat - Win32 Build Script for Apache Lenya
-rem
-rem $Id: build.bat 54525 2004-10-11 09:39:04Z cziegeler $
-rem ----------------------------------------------------------------------------
-
-rem ----- Ignore system CLASSPATH variable
-set OLD_CLASSPATH=%CLASSPATH%
-set CLASSPATH=
-for %%i in (lib\*.jar) do call tools\bin\appendcp.bat %%i
-
-rem ----- Use Ant shipped with Cocoon. Ignore installed in the system Ant
-set OLD_ANT_HOME=%ANT_HOME%
-set ANT_HOME=tools
-
-call %ANT_HOME%\bin\ant -Djava.endorsed.dirs=lib\endorsed -logger org.apache.tools.ant.NoBannerLogger -emacs %1 %2 %3 %4 %5 %6 %7 %8 %9
-
-rem ----- Restore ANT_HOME and ANT_OPTS
-set ANT_HOME=%OLD_ANT_HOME%
-set OLD_ANT_HOME=
-
-rem ----- Restore CLASSPATH
-set CLASSPATH=%OLD_CLASSPATH%
-set OLD_CLASSPATH=
diff --git a/build.properties b/build.properties
deleted file mode 100644
index 3d4dc1e..0000000
--- a/build.properties
+++ /dev/null
@@ -1,120 +0,0 @@
-# Copyright 1999-2004 The Apache Software Foundation
-#
-# Licensed 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.
-
-# Properties controlling the build process
-
-
-#------------------------------------------------------------------------------------
-# Build properties version to make sure that local.build.properties is kept in sync
-# NOTE: Do NOT modify this number unless you are a Dev and want to modify this file
-# NOTE for Devs: Update this number if this file is being updated.
-#                Also update the version number within src/targets/properties-build.xml
-
-build.properties.version=156028
-
-
-#------------------------------------------------------------------------------------
-# The root of the Cocoon source tree
-
-cocoon.src.dir=../../cocoon/branches/BRANCH_2_1_X
-
-
-#------------------------------------------------------------------------------------
-# The cocoon webapp directory
-# You do not have to change this since Lenya will build Cocoon for you
-
-cocoon.webapp.dir=${cocoon.src.dir}/build/webapp
-
-
-#------------------------------------------------------------------------------------
-# Root directories where publications are located
-
-pubs.root.dirs=src/webapp/lenya/pubs
-#pubs.root.dirs=src/webapp/lenya/pubs:../anotherproject/pubs:/home/user/my-pub
-
-
-#------------------------------------------------------------------------------------
-# Web Application Server
-# NOTE: There are slight differences re deployment on the various servlet containers, e.g. endorsed libraries ...
-
-web.app.server=Jetty
-#web.app.server=Tomcat
-#web.app.server=WLS
-
-
-#------------------------------------------------------------------------------------
-# Where the 'install' build target should put the webapp context
-# WARNING: This has to be an absolute path! (FIXME: cocoon.xconf needs absolute path (scr/targets/init-build.xml))
-# NOTE: Do not use white spaces within the path
-
-tomcat.home.dir=/usr/local/tomcat
-#tomcat.home.dir=C:/build/tomcat
-
-
-#------------------------------------------------------------------------------------
-# Where the 'install' build target should put the webapp context
-# NOTE: This path is not necessarily relative to tomcat.home.dir
-
-tomcat.webapps.dir=${tomcat.home.dir}/webapps/lenya
-
-
-#------------------------------------------------------------------------------------
-# The server cache directory to be cleaned by the 'reset' target
-# NOTE: This path is not necessarily relative to tomcat.home.dir
-
-# Tomcat 5.x
-tomcat.cache.dir=${tomcat.home.dir}/work/Catalina/localhost/lenya
-
-#------------------------------------------------------------------------------------
-# Where the 'install' build target should copy the endorsed libraries
-# NOTE: This path is not necessarily relative to tomcat.home.dir
-
-tomcat.endorsed.dir=${tomcat.home.dir}/common/endorsed
-
-
-#------------------------------------------------------------------------------------
-# Files and directories which should be excluded during 'install', 'clean' and 'reset'
-# Comma- or space-separated list of patterns
-# All files are included when commented
-# This is useful for preserving content while you are developing a publication
-
-#target.install.excludes=**/pubs/default/content/**,**/pubs/default/resources/authoring/**,**/pubs/default/resources/live/**,**/pubs/default/config/ac/passwd/*.iml
-#target.reset.excludes=${target.install.excludes}
-
-
-#------------------------------------------------------------------------------------
-# Enable file uploads in Lenya
-# If you leave this set to false, asset and image upload will not work.
-# It is disabled by default for security reasons
-
-enable.uploads=false
-
-#------------------------------------------------------------------------------------
-# Anteater and Webtest home directories
-
-#anteater.home=/usr/local/anteater
-#webtest.home = /usr/local/canoo-webtest
-
-#------------------------------------------------------------------------------------
-# Eclipse Properties for use with the eclipse-project target
-
-ide.eclipse.outputdir=build/eclipse/classes
-ide.eclipse.export.libs=false
-
-
-#------------------------------------------------------------------------------------
-# Xopus context name
-
-xopus.context=Xopus2.1.64
-xopus.path=../../ROOT
diff --git a/build.sh b/build.sh
deleted file mode 100755
index d229c67..0000000
--- a/build.sh
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/sh
-
-#  Copyright 1999-2004 The Apache Software Foundation
-#
-#  Licensed 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.
-                                                                                                                                                             
-chmod u+x ./tools/bin/antRun
-chmod u+x ./tools/bin/ant
-                                                                                                                                                             
-# ----- Verify and Set Required Environment Variables -------------------------
-                                                                                                                                                             
-if [ "$TERM" = "cygwin" ] ; then
-  S=';'
-else
-  S=':'
-fi
-                                                                                                                                                             
-# ----- Ignore system CLASSPATH variable
-OLD_CLASSPATH="$CLASSPATH"
-unset CLASSPATH
-CLASSPATH="`echo lib/*.jar | tr ' ' $S`"
-export CLASSPATH
-
-# ----- Use Ant shipped with Lenya. Ignore installed in the system Ant
-OLD_ANT_HOME="$ANT_HOME"
-ANT_HOME=tools
-OLD_ANT_OPTS="$ANT_OPTS"
-ANT_OPTS="-Xms32M -Xmx512M -Djava.endorsed.dirs=lib/endorsed"
-export ANT_HOME ANT_OPTS
-
-"$ANT_HOME/bin/ant" -logger org.apache.tools.ant.NoBannerLogger -emacs  $@
-
-# ----- Restore ANT_HOME and ANT_OPTS
-ANT_HOME="$OLD_ANT_HOME"
-ANT_OPTS="$OLD_ANT_OPTS"
-export ANT_HOME ANT_OPTS
-unset OLD_ANT_HOME
-unset OLD_ANT_OPTS
-                                                                                                                                                             
-# ----- Restore CLASSPATH
-CLASSPATH="$OLD_CLASSPATH"
-export CLASSPATH
-unset OLD_CLASSPATH
-
diff --git a/build.xml b/build.xml
deleted file mode 100644
index 796ac88..0000000
--- a/build.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<!DOCTYPE project [
-<!-- ===========================================================================
-
-                       * =========================== *
-                       |  Apache Lenya Build System |
-                       * =========================== *
-
-       CVS $Id$:
-
-    History
-    =======
-    
-    when        Who               What
-    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-    2003-04-16  Gregor J. Rothfuss   Refactoring
-    2003-03-01  Michael Wechner      Custom Tasks
-    2002-02-05  Giacomo Pati         Revision
-    2001-01-06  Marc Liyanage        Initial version
-
-============================================================================ -->
-
-]>
-
-<project default="webapp" basedir="." name="lenya">
-
-  <!-- ==================  Apache Lenya targets  ======================== -->
-
-  <!-- =================================================================== -->
-  <!-- Global properties  -->
-  <import file="src/targets/properties-build.xml" />
-  <!-- Initialization targets  -->
-  <import file="src/targets/init-build.xml" />
-  <!-- IDE targets             --> 
-  <import file="src/targets/ide-build.xml" />
-  <!-- Compile targets         --> 
-  <import file="src/targets/compile-build.xml" />
-  <!-- Documentation targets   --> 
-  <import file="src/targets/docs-build.xml" />
-  <!-- Web application targets -->
-  <import file="src/targets/webapp-build.xml" />
-  <!-- Testcases targets       -->
-  <import file="src/targets/test-build.xml" />
-  <!-- Distribution targets    -->
-  <import file="src/targets/dist-build.xml" />
-  <!-- Kupu targets            -->
-  <import file="src/targets/kupu-build.xml" />
-  <!-- Export targets          -->
-  <import file="src/targets/export-build.xml" />
-  <!-- Publication tests       -->
-  <import file="src/targets/publication-test-build.xml" />
-  <!-- Successfully Built Message       -->
-  <import file="src/targets/message-build.xml" />
-  <!-- =================================================================== -->
-
-</project>
diff --git a/config/ac/ac.xconf b/config/ac/ac.xconf
new file mode 100644
index 0000000..30a6bec
--- /dev/null
+++ b/config/ac/ac.xconf
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+  
+  Licensed 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.
+-->
+
+<!-- $Id: ac.xconf 372891 2006-01-27 16:08:47Z andreas $ -->
+
+<access-controller type="bypassable">
+  
+  <accreditable-manager type="file">
+    <parameter name="directory" value="context:///lenya/pubs/default/config/ac/passwd"/>
+    
+    <user-manager>
+      <user-type class="org.apache.lenya.ac.file.FileUser" create-use-case="userAddUser">Local User</user-type>
+      <!-- uncomment the following line if you want LDAP support -->
+      <!-- <user-type class="org.apache.lenya.ac.ldap.LDAPUser" create-use-case="userAddUserLdap">LDAP User</user-type> -->
+    </user-manager>
+  </accreditable-manager>
+  
+  <policy-manager type="document">
+    <policy-manager type="file">
+      <parameter name="directory" value="context:///lenya/pubs/default/config/ac/policies"/>
+    </policy-manager>
+  </policy-manager>
+  
+  <authorizer type="policy"/>
+  
+  <authorizer type="usecase">
+    <parameter name="configuration" value="context:///lenya/pubs/default/config/ac/usecase-policies.xml"/>
+  </authorizer>
+  
+</access-controller>
diff --git a/config/ac/passwd/admin.gml b/config/ac/passwd/admin.gml
new file mode 100644
index 0000000..02f4cbb
--- /dev/null
+++ b/config/ac/passwd/admin.gml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<!-- $Id: admin.gml 42702 2004-03-13 12:34:18Z gregor $ -->
+
+<group class="org.apache.lenya.ac.file.FileGroup" id="admin"/>
\ No newline at end of file
diff --git a/config/ac/passwd/admin.rml b/config/ac/passwd/admin.rml
new file mode 100644
index 0000000..f7e1959
--- /dev/null
+++ b/config/ac/passwd/admin.rml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<!-- $Id: admin.rml 42702 2004-03-13 12:34:18Z gregor $ -->
+
+<role class="org.apache.lenya.ac.file.FileRole" id="admin"/>
\ No newline at end of file
diff --git a/config/ac/passwd/alice.iml b/config/ac/passwd/alice.iml
new file mode 100644
index 0000000..a1411c4
--- /dev/null
+++ b/config/ac/passwd/alice.iml
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<!-- $Id: alice.iml 42702 2004-03-13 12:34:18Z gregor $ -->
+
+<identity id="alice" class="org.apache.lenya.ac.file.FileUser">
+  <name>Alice</name>
+  <description></description>
+  <email>alice@lenya.org</email>
+  <password type="md5">8e07dafd13495561db9063ebe4db4b27</password>
+  <groups>
+    <group>editor</group>
+    <group>reviewer</group>
+  </groups>
+</identity>
diff --git a/config/ac/passwd/cifs.properties.sample b/config/ac/passwd/cifs.properties.sample
new file mode 100644
index 0000000..1bdf348
--- /dev/null
+++ b/config/ac/passwd/cifs.properties.sample
@@ -0,0 +1,5 @@
+# the name of the domain controller (or samba sever) to authenticate against
+domain-controller=my-domain-controller
+
+# domain/workgroup name to use
+domain=WORKGROUP
\ No newline at end of file
diff --git a/config/ac/passwd/edit.rml b/config/ac/passwd/edit.rml
new file mode 100644
index 0000000..539b159
--- /dev/null
+++ b/config/ac/passwd/edit.rml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<!-- $Id$ -->
+
+<role class="org.apache.lenya.ac.file.FileRole" id="edit"/>
\ No newline at end of file
diff --git a/config/ac/passwd/editor.gml b/config/ac/passwd/editor.gml
new file mode 100644
index 0000000..ee5b919
--- /dev/null
+++ b/config/ac/passwd/editor.gml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<!-- $Id: editor.gml 42702 2004-03-13 12:34:18Z gregor $ -->
+
+<group class="org.apache.lenya.ac.file.FileGroup" id="editor"/>
\ No newline at end of file
diff --git a/config/ac/passwd/ldap.properties.sample b/config/ac/passwd/ldap.properties.sample
new file mode 100644
index 0000000..a92d923
--- /dev/null
+++ b/config/ac/passwd/ldap.properties.sample
@@ -0,0 +1,54 @@
+#############################################################################
+# File: ldap.properties.sample
+# $Id: ldap.properties.sample 124751 2005-01-10 02:25:42Z gregor $
+#############################################################################
+
+#############################################################################
+# General settings 
+#############################################################################
+provider-url=ldaps://ldap.example.com:636/dc=example,dc=com
+base-dn=dc=example,dc=com
+
+#############################################################################
+# User parameters for authentication:
+# usr-branch: 
+#      if users are to be taken from a specific branch, set this.
+#      If you set this to empty, users will be searched in the whole 
+#      subtree, i.e.:
+#         usr-branch=
+# usr-authentication:
+#      authentication method when the user authenticates
+# domain-name:
+#      AFAIK, this is only relevant for MS Active Directory
+#############################################################################
+#usr-branch=ou=People
+usr-branch=
+usr-attr=uid
+usr-name-attr=sn
+usr-authentication=simple
+domain-name=
+
+############################################################################
+# Security settings
+# -----------------
+# security-authentication:
+#       you can set this to none if there is no manager authentication, i.e.:
+#         security-authentication=none
+# mgr-dn and mgr-pw:
+#       Manager/user which is allowed to retrieve a list of "all" users
+#       (fullname) from LDAP server. Leave it empty for anonymous bindings.
+# key-store:
+#       - If you do not use ssl, you can comment out this property.
+#       - keystore is taken relatively to the publication config/ac/passwd
+#       directory. You should put the Directory-Server certificate in this 
+#       file, if using ssl. 
+#       The keystore file can be generated as follows:
+#          keytool -import -keystore .keystore -file <ca_cert_file> 
+#                    -alias <yourdomain.com>
+#       
+############################################################################
+security-authentication=simple
+mgr-dn=
+mgr-pw=
+key-store=.keystore
+security-protocol=ssl
diff --git a/config/ac/passwd/lenya.iml b/config/ac/passwd/lenya.iml
new file mode 100644
index 0000000..f48bcb4
--- /dev/null
+++ b/config/ac/passwd/lenya.iml
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<!-- $Id: lenya.iml 42702 2004-03-13 12:34:18Z gregor $ -->
+
+<identity id="lenya" class="org.apache.lenya.ac.file.FileUser">
+  <name>Levi Vanya</name>
+  <description></description>
+  <email>levi.vanya@wyona.org</email>
+  <password type="md5">8e07dafd13495561db9063ebe4db4b27</password>
+  <groups>
+    <group>editor</group>
+    <group>admin</group>
+  </groups>
+</identity>
diff --git a/config/ac/passwd/localhost.ipml b/config/ac/passwd/localhost.ipml
new file mode 100644
index 0000000..722ee85
--- /dev/null
+++ b/config/ac/passwd/localhost.ipml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<!-- $Id: localhost.ipml 42702 2004-03-13 12:34:18Z gregor $ -->
+
+<ip-range class="org.apache.lenya.ac.file.FileIPRange" id="localhost">
+  <name>Localhost</name>
+  <network-address>127.0.0.1</network-address>
+  <subnet-mask>255.255.255.0</subnet-mask>
+</ip-range>
diff --git a/config/ac/passwd/review.rml b/config/ac/passwd/review.rml
new file mode 100644
index 0000000..0d942d2
--- /dev/null
+++ b/config/ac/passwd/review.rml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<!-- $Id$ -->
+
+<role class="org.apache.lenya.ac.file.FileRole" id="review"/>
\ No newline at end of file
diff --git a/config/ac/passwd/reviewer.gml b/config/ac/passwd/reviewer.gml
new file mode 100644
index 0000000..63823a4
--- /dev/null
+++ b/config/ac/passwd/reviewer.gml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<!-- $Id: reviewer.gml 42702 2004-03-13 12:34:18Z gregor $ -->
+
+<group class="org.apache.lenya.ac.file.FileGroup" id="reviewer"/>
\ No newline at end of file
diff --git a/config/ac/passwd/visit.rml b/config/ac/passwd/visit.rml
new file mode 100644
index 0000000..dc5c817
--- /dev/null
+++ b/config/ac/passwd/visit.rml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<!-- $Id$ -->
+
+<role class="org.apache.lenya.ac.file.FileRole" id="visit"/>
\ No newline at end of file
diff --git a/config/ac/policies/admin/subtree-policy.acml b/config/ac/policies/admin/subtree-policy.acml
new file mode 100644
index 0000000..08797a0
--- /dev/null
+++ b/config/ac/policies/admin/subtree-policy.acml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<!-- $Id: subtree-policy.acml 42702 2004-03-13 12:34:18Z gregor $ -->
+
+<policy xmlns="http://apache.org/cocoon/lenya/ac/1.0">
+
+  <group id="admin">
+    <role id="admin"/>
+  </group>
+
+</policy> 
diff --git a/config/ac/policies/admin/users/alice.html/subtree-policy.acml b/config/ac/policies/admin/users/alice.html/subtree-policy.acml
new file mode 100644
index 0000000..159efce
--- /dev/null
+++ b/config/ac/policies/admin/users/alice.html/subtree-policy.acml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ac:policy xmlns:ac="http://apache.org/cocoon/lenya/ac/1.0" ssl="false">
+  <ac:user id="alice">
+    <ac:role id="edit"/>
+  </ac:user>
+</ac:policy>
diff --git a/config/ac/policies/admin/users/lenya.html/subtree-policy.acml b/config/ac/policies/admin/users/lenya.html/subtree-policy.acml
new file mode 100644
index 0000000..616f1ec
--- /dev/null
+++ b/config/ac/policies/admin/users/lenya.html/subtree-policy.acml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<policy xmlns="http://apache.org/cocoon/lenya/ac/1.0">
+
+  <user id="lenya">
+    <role id="edit"/>
+  </user>
+
+</policy> 
diff --git a/src/webapp/lenya/pubs/default/config/ac/policies/archive/subtree-policy.acml b/config/ac/policies/archive/subtree-policy.acml
similarity index 100%
rename from src/webapp/lenya/pubs/default/config/ac/policies/archive/subtree-policy.acml
rename to config/ac/policies/archive/subtree-policy.acml
diff --git a/src/webapp/lenya/pubs/default/config/ac/policies/archive/subtree-policy.acml b/config/ac/policies/authoring/subtree-policy.acml
similarity index 100%
copy from src/webapp/lenya/pubs/default/config/ac/policies/archive/subtree-policy.acml
copy to config/ac/policies/authoring/subtree-policy.acml
diff --git a/config/ac/policies/index.html/url-policy.acml b/config/ac/policies/index.html/url-policy.acml
new file mode 100644
index 0000000..0858141
--- /dev/null
+++ b/config/ac/policies/index.html/url-policy.acml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<!-- $Id: url-policy.acml 42702 2004-03-13 12:34:18Z gregor $ -->
+
+<policy xmlns="http://apache.org/cocoon/lenya/ac/1.0">
+
+  <world>
+    <role id="visit"/>
+  </world>
+
+</policy> 
diff --git a/src/webapp/lenya/pubs/default/config/ac/policies/archive/subtree-policy.acml b/config/ac/policies/info/subtree-policy.acml
similarity index 100%
copy from src/webapp/lenya/pubs/default/config/ac/policies/archive/subtree-policy.acml
copy to config/ac/policies/info/subtree-policy.acml
diff --git a/config/ac/policies/introduction.html/subtree-policy.acml b/config/ac/policies/introduction.html/subtree-policy.acml
new file mode 100644
index 0000000..23d0fea
--- /dev/null
+++ b/config/ac/policies/introduction.html/subtree-policy.acml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<!-- $Id: subtree-policy.acml 42702 2004-03-13 12:34:18Z gregor $ -->
+
+<policy xmlns="http://apache.org/cocoon/lenya/ac/1.0">
+
+  <world>
+    <role id="visit"/>
+  </world>
+
+</policy> 
diff --git a/config/ac/policies/live/subtree-policy.acml b/config/ac/policies/live/subtree-policy.acml
new file mode 100644
index 0000000..23d0fea
--- /dev/null
+++ b/config/ac/policies/live/subtree-policy.acml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<!-- $Id: subtree-policy.acml 42702 2004-03-13 12:34:18Z gregor $ -->
+
+<policy xmlns="http://apache.org/cocoon/lenya/ac/1.0">
+
+  <world>
+    <role id="visit"/>
+  </world>
+
+</policy> 
diff --git a/src/webapp/lenya/pubs/default/config/ac/policies/trash/subtree-policy.acml b/config/ac/policies/trash/subtree-policy.acml
similarity index 100%
rename from src/webapp/lenya/pubs/default/config/ac/policies/trash/subtree-policy.acml
rename to config/ac/policies/trash/subtree-policy.acml
diff --git a/config/ac/policies/url-policy.acml b/config/ac/policies/url-policy.acml
new file mode 100644
index 0000000..0858141
--- /dev/null
+++ b/config/ac/policies/url-policy.acml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<!-- $Id: url-policy.acml 42702 2004-03-13 12:34:18Z gregor $ -->
+
+<policy xmlns="http://apache.org/cocoon/lenya/ac/1.0">
+
+  <world>
+    <role id="visit"/>
+  </world>
+
+</policy> 
diff --git a/config/ac/usecase-policies.xml b/config/ac/usecase-policies.xml
new file mode 100644
index 0000000..bebf0f1
--- /dev/null
+++ b/config/ac/usecase-policies.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<!-- $Id: usecase-policies.xml 320970 2005-10-14 01:57:28Z chestnut $ -->
+    
+<usecases xmlns="http://apache.org/cocoon/lenya/ac/1.0">
+	<usecase id="create">
+		<role id="edit"/>
+	</usecase>
+    <usecase id="archive">
+        <role id="edit"/>
+    </usecase>
+    <usecase id="delete">
+        <role id="edit"/>
+    </usecase>
+    <usecase id="restore">
+        <role id="edit"/>
+    </usecase>
+    <usecase id="submit">
+        <role id="edit"/>
+    </usecase>
+    <usecase id="publish">
+        <role id="review"/>
+    </usecase>
+    <usecase id="reject">
+        <role id="review"/>
+    </usecase>
+    <usecase id="deactivate">
+        <role id="review"/>
+    </usecase>
+
+	<usecase id="userChangeProfile"><role id="edit"/><role id="admin"/></usecase>
+	<usecase id="userChangePasswordUser"><role id="edit"/></usecase>
+	<usecase id="userChangePasswordAdmin"><role id="admin"/></usecase>
+	<usecase id="userChangeGroups"><role id="admin"/></usecase>
+	
+	<usecase id="filePropfind"><role id="visit"/></usecase>
+	<usecase id="propfind"><role id="visit"/></usecase>
+	<usecase id="put"><role id="edit"/></usecase>
+	
+
+</usecases>
\ No newline at end of file
diff --git a/config/lucene_index.xconf b/config/lucene_index.xconf
new file mode 100644
index 0000000..de8c0f1
--- /dev/null
+++ b/config/lucene_index.xconf
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<indexes>
+  <index id="doco-live" analyzer="stopword_en" directory="lenya/pubs/doco/work/lucene/index/live/index">
+    <structure>
+      <field id="url" type="keyword" />
+      <field id="title" type="text" storetext="true"/>
+      <field id="description" type="text" storetext="true"/>
+      <field id="subject" type="keyword" storetext="true" />
+      <field id="body" type="text" storetext="true"/>
+    </structure>
+  </index>
+
+  <index id="doco-authoring" analyzer="stopword_en" directory="lenya/pubs/doco/work/lucene/index/authoring/index">
+    <structure>
+      <field id="url" type="keyword" />
+      <field id="title" type="text" storetext="true"/>
+      <field id="description" type="text" storetext="true"/>
+      <field id="subject" type="keyword" storetext="true" />
+      <field id="body" type="text" storetext="true"/>
+    </structure>
+  </index>
+</indexes>
diff --git a/config/publication.xconf b/config/publication.xconf
new file mode 100644
index 0000000..193d678
--- /dev/null
+++ b/config/publication.xconf
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<publication>
+  <languages>
+    <language default="true">en</language>
+    <language>de</language>
+  </languages>
+  <template-instantiator name="default"/>
+  <path-mapper>
+    org.apache.lenya.cms.publication.DefaultDocumentIdToPathMapper</path-mapper>
+  <document-builder name="default"/>
+  <breadcrumb-prefix/>
+  <site-manager name="tree"/>
+  <resource-type workflow="fallback://config/workflow/workflow.xml" 
+    name="xhtml"/>
+  <resource-type workflow="fallback://config/workflow/workflow.xml" 
+    name="homepage"/>
+  <resource-type workflow="fallback://config/workflow/workflow.xml" 
+    name="links"/>
+  <resource-type workflow="fallback://config/workflow/workflow.xml" 
+    name="cforms"/>
+  <module name="xhtml"/>
+  <module name="links"/>
+  <module name="opendocument"/>
+  <module name="cforms"/>
+  <module name="xdocs"/>
+  <module name="homepage"/>
+  <link-attribute 
+    xpath="//*[namespace-uri() = 'http://www.w3.org/1999/xhtml']/@href"/>
+  <templates>
+    <template id="default"/>
+  </templates>
+
+<!-- NOTE: Copy publication.xconf to local.publication.xconf and uncomment and modify the line below accordingly -->
+<!--
+  <content-dir src="/home/thorsten/src/apache/forrest-trunk/whiteboard/doco"/>
+-->
+</publication>
diff --git a/config/workflow/workflow.xml b/config/workflow/workflow.xml
new file mode 100644
index 0000000..0428365
--- /dev/null
+++ b/config/workflow/workflow.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<!-- $Id: workflow.xml 153818 2005-02-14 18:07:10Z gregor $ -->
+
+<workflow xmlns="http://apache.org/cocoon/lenya/workflow/1.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://apache.org/cocoon/lenya/workflow/1.0 ../../../../resources/entities/workflow.xsd">
+
+  <state id="authoring" initial="true"/>
+  <state id="review"/>
+  <state id="live"/>
+  <state id="trash"/>
+  <state id="archive"/>
+  
+  <variable name="is_live" value="false"/>
+  
+  <transition source="authoring" destination="review">
+    <event id="submit"/>
+    <condition class="org.apache.lenya.cms.workflow.RoleCondition">edit</condition>
+  </transition>
+        
+  <transition source="review" destination="live">
+    <event id="publish"/>
+    <condition class="org.apache.lenya.cms.workflow.RoleCondition">review</condition>
+    <assign variable="is_live" value="true"/>
+  </transition>
+        
+  <transition source="review" destination="authoring">
+    <event id="reject"/>
+    <condition class="org.apache.lenya.cms.workflow.RoleCondition">review</condition>
+  </transition>
+        
+  <transition source="live" destination="authoring">
+    <event id="edit"/>
+    <condition class="org.apache.lenya.cms.workflow.RoleCondition">edit</condition>
+  </transition>
+        
+  <transition source="authoring" destination="authoring">
+    <event id="edit"/>
+    <condition class="org.apache.lenya.cms.workflow.RoleCondition">edit</condition>
+  </transition>
+        
+  <transition source="live" destination="authoring">
+    <event id="deactivate"/>
+    <condition class="org.apache.lenya.cms.workflow.RoleCondition">review</condition>
+    <assign variable="is_live" value="false"/>
+  </transition>
+
+  <transition source="authoring" destination="trash">
+    <event id="delete"/>
+    <condition class="org.apache.lenya.cms.workflow.RoleCondition">edit</condition>
+    <assign variable="is_live" value="false"/>
+  </transition>
+
+  <transition source="authoring" destination="archive">
+    <event id="archive"/>
+    <condition class="org.apache.lenya.cms.workflow.RoleCondition">edit</condition>
+    <assign variable="is_live" value="false"/>
+  </transition>
+  
+  <transition source="archive" destination="authoring">
+    <event id="restore"/>
+    <condition class="org.apache.lenya.cms.workflow.RoleCondition">edit</condition>
+  </transition>
+  
+  <transition source="trash" destination="authoring">
+    <event id="restore"/>
+    <condition class="org.apache.lenya.cms.workflow.RoleCondition">edit</condition>
+  </transition>  
+</workflow>
diff --git a/content/rcbak/content/authoring/index/index_en.xml.bak.1142078368240 b/content/rcbak/content/authoring/index/index_en.xml.bak.1142078368240
new file mode 100644
index 0000000..62e86ef
--- /dev/null
+++ b/content/rcbak/content/authoring/index/index_en.xml.bak.1142078368240
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>Default Publication</title>
+  </head>
+  <body>
+    <h1>Default Publication</h1>
+    <p>Welcome to the default Lenya publication!</p>
+    <p>The purpose of this publication is</p>
+    <ul>
+      <li>to show beginners the basic functionality of the Lenya CMS,</li>
+      <li>to provide an "out of the box" publication that can be easily adapted and used, and</li>
+      <li>to provide a basis for reference implementations of new concepts and best practices.</li>
+    </ul>
+    <p>
+    You won't find any fancy and confusing bells and whistles here, but the
+    publication contains everything you need to get started.
+    </p>
+  </body>
+</html>
diff --git a/content/rcbak/content/authoring/index/index_en.xml.meta.bak.1142078368161 b/content/rcbak/content/authoring/index/index_en.xml.meta.bak.1142078368161
new file mode 100644
index 0000000..1953c63
--- /dev/null
+++ b/content/rcbak/content/authoring/index/index_en.xml.meta.bak.1142078368161
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<lenya:document xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0">
+<lenya:meta>
+<lenya:custom>
+<lenya:myMeta/>
+</lenya:custom>
+<lenya:dc>
+<dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">test</dc:title>
+<dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">lenya</dc:creator>
+<dc:subject xmlns:dc="http://purl.org/dc/elements/1.1/"/>
+<dc:publisher xmlns:dc="http://purl.org/dc/elements/1.1/"/>
+<dc:date xmlns:dc="http://purl.org/dc/elements/1.1/">2006-03-11 12:59:21</dc:date>
+<dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">en</dc:language>
+<dc:rights xmlns:dc="http://purl.org/dc/elements/1.1/"/>
+</lenya:dc>
+<lenya:internal>
+<lenya:resourceType>xhtml</lenya:resourceType>
+<lenya:contentType>xml</lenya:contentType>
+<lenya:extension>xml</lenya:extension>
+</lenya:internal>
+</lenya:meta>
+</lenya:document>
diff --git a/content/rcbak/content/authoring/sitetree.xml.bak.1142078368329 b/content/rcbak/content/authoring/sitetree.xml.bak.1142078368329
new file mode 100644
index 0000000..55baec1
--- /dev/null
+++ b/content/rcbak/content/authoring/sitetree.xml.bak.1142078368329
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site xmlns="http://apache.org/cocoon/lenya/sitetree/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://apache.org/cocoon/lenya/sitetree/1.0  ../../../../resources/entities/sitetree.xsd">
+<node id="index" visibleinnav="true">
+<label xml:lang="en">test</label>
+</node>
+</site>
diff --git a/content/rcml/content/authoring/index/index_en.xml.meta.rcml b/content/rcml/content/authoring/index/index_en.xml.meta.rcml
new file mode 100644
index 0000000..1127b85
--- /dev/null
+++ b/content/rcml/content/authoring/index/index_en.xml.meta.rcml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<XPSRevisionControl xmlns="">
+<CheckIn>
+<Identity>lenya</Identity>
+<Time>1142078368161</Time>
+<Version>2</Version>
+<Backup/>
+</CheckIn>
+<CheckOut>
+<Identity>lenya</Identity>
+<Time>1142078367920</Time>
+</CheckOut>
+<CheckIn>
+<Identity>System</Identity>
+<Time>0</Time>
+<Version>1</Version>
+</CheckIn>
+</XPSRevisionControl>
diff --git a/content/rcml/content/authoring/index/index_en.xml.rcml b/content/rcml/content/authoring/index/index_en.xml.rcml
new file mode 100644
index 0000000..365591b
--- /dev/null
+++ b/content/rcml/content/authoring/index/index_en.xml.rcml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<XPSRevisionControl xmlns="">
+<CheckIn>
+<Identity>lenya</Identity>
+<Time>1142078368240</Time>
+<Version>2</Version>
+<Backup/>
+</CheckIn>
+<CheckOut>
+<Identity>lenya</Identity>
+<Time>1142078367981</Time>
+</CheckOut>
+<CheckIn>
+<Identity>System</Identity>
+<Time>0</Time>
+<Version>1</Version>
+</CheckIn>
+</XPSRevisionControl>
diff --git a/content/rcml/content/authoring/sitetree.xml.meta.rcml b/content/rcml/content/authoring/sitetree.xml.meta.rcml
new file mode 100644
index 0000000..df0b2af
--- /dev/null
+++ b/content/rcml/content/authoring/sitetree.xml.meta.rcml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<XPSRevisionControl xmlns="">
+<CheckIn>
+<Identity>System</Identity>
+<Time>0</Time>
+<Version>1</Version>
+</CheckIn>
+</XPSRevisionControl>
diff --git a/content/rcml/content/authoring/sitetree.xml.rcml b/content/rcml/content/authoring/sitetree.xml.rcml
new file mode 100644
index 0000000..9f7c15b
--- /dev/null
+++ b/content/rcml/content/authoring/sitetree.xml.rcml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<XPSRevisionControl xmlns="">
+<CheckIn>
+<Identity>lenya</Identity>
+<Time>1142078368329</Time>
+<Version>2</Version>
+<Backup/>
+</CheckIn>
+<CheckOut>
+<Identity>lenya</Identity>
+<Time>1142078368055</Time>
+</CheckOut>
+<CheckIn>
+<Identity>System</Identity>
+<Time>0</Time>
+<Version>1</Version>
+</CheckIn>
+</XPSRevisionControl>
diff --git a/legal/LICENSE.apache b/legal/LICENSE.apache
deleted file mode 100644
index 1fc4c3e..0000000
--- a/legal/LICENSE.apache
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
- 
- Copyright (C) 2002 The Apache Software Foundation. All rights reserved.
- 
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
- 
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
- 
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
- 
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
- 
- 4. The names "Apache Cocoon" and  "Apache Software Foundation" must  not  be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
- 
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
- 
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- 
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation and was  originally created by
- Stefano Mazzocchi  <stefano@apache.org>. For more  information on the Apache 
- Software Foundation, please see <http://www.apache.org/>.
- 
-*/
diff --git a/legal/LICENSE.avalon b/legal/LICENSE.avalon
deleted file mode 100644
index 86f3c8a..0000000
--- a/legal/LICENSE.avalon
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
- 
- Copyright (C) 1997-2001 The Apache Software Foundation. All rights reserved.
- 
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
- 
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
- 
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
- 
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
- 
- 4. The names "Jakarta", "Avalon", "Excalibur", "Avalon Framework" and 
-    "Apache Software Foundation"  must not be used to endorse or promote 
-    products derived  from this  software without  prior written permission. 
-    For written permission, please contact apache@apache.org.
- 
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
- 
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- 
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the 
- Apache Software Foundation, please see <http://www.apache.org/>.
-     
-
diff --git a/legal/LICENSE.batik b/legal/LICENSE.batik
deleted file mode 100644
index 6480f2a..0000000
--- a/legal/LICENSE.batik
+++ /dev/null
@@ -1,45 +0,0 @@
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
- 
- Copyright (C) 2000 The Apache Software Foundation. All rights reserved.
- 
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
- 
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
- 
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
- 
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
- 
- 4. The names "Batik" and  "Apache Software Foundation"  must not be  used to
-    endorse  or promote  products derived  from this  software without  prior
-    written permission. For written permission, please contact
-    apache@apache.org.
- 
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
- 
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- 
- This software  consists of voluntary contributions made  by many individuals
- on  behalf  of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
diff --git a/legal/LICENSE.bxeng b/legal/LICENSE.bxeng
deleted file mode 100644
index 7dd2916..0000000
--- a/legal/LICENSE.bxeng
+++ /dev/null
@@ -1,49 +0,0 @@
-The Bitflux Editor Software License
-
-Copyright (c) 2002, 2003 Bitflux GmbH. All rights reserved.
-
-Redistribution and use in source and binary forms,
-with or without modification, are permitted provided
-that the following conditions are met:
-
-1. Redistributions of source code must retain the
-above copyright notice, this list of conditions and
-the following disclaimer.
-
-2. Redistributions in binary form must reproduce the
-above copyright notice, this list of conditions and
-the following disclaimer in the documentation and/or
-other materials provided with the distribution.
-
-3. All advertising materials mentioning features or
-use of this software must display the following
-acknowledgment: "This product includes software
-developed by Bitflux GmbH (http://www.bitflux.ch)"
-
-4. The name "Bitflux Editor" and "Bitflux" must not be
-used to endorse or promote products derived from this
-software without prior written permission. For written
-permission, please contact editor@bitflux.ch
-
-5. Products derived from this software may not be
-called "Bitflux" or "Bitflux Editor" nor may "Bitflux"
-or "Bitflux Editor" appear in their names without
-prior written permission of Bitflux.
-
-6. Redistributions of any form whatsoever must retain
-the following acknowledgment: "This product includes
-software developed by Bitflux GmbH 
-(http://www.bitflux.ch)"
-
-
-THIS SOFTWARE IS PROVIDED BY Bitflux "AS IS" WITHOUT
-ANY WARRANTY EXPRESS OR IMPLIED, INCLUDING THE
-WARRANTY OF NON-INFRINGEMENT AND THE IMPLIED
-WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A
-PARTICULAR PURPOSE. Bitflux WILL NOT BE LIABLE FOR ANY
-DAMAGES SUFFERED BY YOU AS A RESULT OF USING THIS
-SOFTWARE. IN NO EVENT WILL Bitflux BE LIABLE FOR ANY
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR LOST
-PROFITS EVEN IF Bitflux HAS BEEN ADVISED OF THE
-POSSIBILITY OF THEIR OCCURRENCE. Bitflux WILL NOT BE
-LIABLE FOR ANY THIRD PARTY CLAIMS AGAINST YOU.
diff --git a/legal/LICENSE.forrest b/legal/LICENSE.forrest
deleted file mode 100644
index f376e9b..0000000
--- a/legal/LICENSE.forrest
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
- 
- Copyright (C) 2002 The Apache Software Foundation. All rights reserved.
- 
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
- 
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
- 
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
- 
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
- 
- 4. The names "Apache Forrest" and  "Apache Software Foundation" must  not be
-    used to  endorse or promote  products derived from  this software without
-    prior written permission. For written permission, please contact
-    apache@apache.org.
- 
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
- 
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- 
- This software  consists of voluntary contributions made  by many individuals
- on behalf  of the Apache  Software Foundation. For  more information  on the 
- Apache Software Foundation, please see <http://www.apache.org/>.
- 
-*/
diff --git a/legal/LICENSE.jakarta-commons b/legal/LICENSE.jakarta-commons
deleted file mode 100644
index 5fb9ec1..0000000
--- a/legal/LICENSE.jakarta-commons
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * ====================================================================
- * 
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgement:  
- *       "This product includes software developed by the 
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgement may appear in the software itself,
- *    if and wherever such third-party acknowledgements normally appear.
- *
- * 4. The names "Apache", "The Jakarta Project", "Commons", and "Apache Software
- *    Foundation" must not be used to endorse or promote products derived
- *    from this software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- *    nor may "Apache" appear in their name without prior 
- *    written permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */ 
- 
\ No newline at end of file
diff --git a/legal/LICENSE.jakarta-regexp b/legal/LICENSE.jakarta-regexp
deleted file mode 100644
index 64ea074..0000000
--- a/legal/LICENSE.jakarta-regexp
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * ====================================================================
- * 
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:  
- *       "This product includes software developed by the 
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Jakarta-Regexp", and "Apache Software
- *    Foundation" must not be used to endorse or promote products derived
- *    from this software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- *    nor may "Apache" appear in their names without prior written
- *    permission of the Apache Group.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */ 
diff --git a/legal/LICENSE.jing b/legal/LICENSE.jing
deleted file mode 100644
index f257dcc..0000000
--- a/legal/LICENSE.jing
+++ /dev/null
@@ -1,39 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Jing Copying Conditions</title></head>
-<body>
-<h1>Jing Copying Conditions</h1>
-
-<p>Copyright (c) 2001-2003 Thai Open Source Software Center Ltd<br>
-All rights reserved.</p>
-
-<p>Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:</p>
-
-<ul>
-    <li>Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.</li>
-
-    <li>Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in
-    the documentation and/or other materials provided with the
-    distribution.</li>
-
-    <li>Neither the name of the Thai Open Source Software Center Ltd nor
-    the names of its contributors may be used to endorse or promote
-    products derived from this software without specific prior written
-    permission.</li>
-</ul>
-
-<p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p>
-
-</body></html>
\ No newline at end of file
diff --git a/legal/LICENSE.jtidy b/legal/LICENSE.jtidy
deleted file mode 100644
index 84e366b..0000000
--- a/legal/LICENSE.jtidy
+++ /dev/null
@@ -1,49 +0,0 @@
-  Java HTML Tidy - JTidy
-  HTML parser and pretty printer
-
-  Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
-  Institute of Technology, Institut National de Recherche en
-  Informatique et en Automatique, Keio University). All Rights
-  Reserved.
-
-  Contributing Author(s):
-
-     Dave Raggett <dsr@w3.org>
-     Andy Quick <ac.quick@sympatico.ca> (translation to Java)
-     Gary L Peskin <garyp@firstech.com> (Java development)
-     Sami Lempinen <sami@lempinen.net>  (release management)
-
-  The contributing author(s) would like to thank all those who
-  helped with testing, bug fixes, and patience.  This wouldn't
-  have been possible without all of you.
-
-  COPYRIGHT NOTICE:
- 
-  This software and documentation is provided "as is," and
-  the copyright holders and contributing author(s) make no
-  representations or warranties, express or implied, including
-  but not limited to, warranties of merchantability or fitness
-  for any particular purpose or that the use of the software or
-  documentation will not infringe any third party patents,
-  copyrights, trademarks or other rights. 
-
-  The copyright holders and contributing author(s) will not be
-  liable for any direct, indirect, special or consequential damages
-  arising out of any use of the software or documentation, even if
-  advised of the possibility of such damage.
-
-  Permission is hereby granted to use, copy, modify, and distribute
-  this source code, or portions hereof, documentation and executables,
-  for any purpose, without fee, subject to the following restrictions:
-
-  1. The origin of this source code must not be misrepresented.
-  2. Altered versions must be plainly marked as such and must
-     not be misrepresented as being the original source.
-  3. This Copyright notice may not be removed or altered from any
-     source or altered source distribution.
- 
-  The copyright holders and contributing author(s) specifically
-  permit, without fee, and encourage the use of this source code
-  as a component for supporting the Hypertext Markup Language in
-  commercial products. If you use this source code in a product,
-  acknowledgment is not required but would be appreciated.
diff --git a/legal/LICENSE.junit b/legal/LICENSE.junit
deleted file mode 100644
index cdf887a..0000000
--- a/legal/LICENSE.junit
+++ /dev/null
@@ -1,185 +0,0 @@
-

-IBM Public License Version 1.0 

-THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS IBM PUBLIC 

-LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE 

-PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. 

-1. DEFINITIONS 

-

-"Contribution" means: 

-  a) in the case of International Business Machines Corporation ("IBM"), 

-  the Original Program, and 

-  b) in the case of each Contributor, 

-  i) changes to the Program, and

-  ii) additions to the Program;

-  where such changes and/or additions to the Program originate from and 

-  are distributed by that particular Contributor. A Contribution 

-  'originates' from a Contributor if it was added to the Program by such 

-  Contributor itself or anyone acting on such Contributor's behalf. 

-  Contributions do not include additions to the Program which: (i) are 

-  separate modules of software distributed in conjunction with the Program 

-  under their own license agreement, and (ii) are not derivative works of 

-  the Program.

-"Contributor" means IBM and any other entity that distributes the Program. 

-

-"Licensed Patents " mean patent claims licensable by a Contributor which 

-are necessarily infringed by the use or sale of its Contribution alone or 

-when combined with the Program. 

-"Original Program" means the original version of the software accompanying 

-this Agreement as released by IBM, including source code, object code and 

-documentation, if any. 

-"Program" means the Original Program and Contributions. 

-"Recipient" means anyone who receives the Program under this Agreement, 

-including all Contributors. 

-2. GRANT OF RIGHTS 

-  a) Subject to the terms of this Agreement, each Contributor hereby 

-  grants Recipient a non-exclusive, worldwide, royalty-free copyright 

-  license to reproduce, prepare derivative works of, publicly display, 

-  publicly perform, distribute and sublicense the Contribution of such 

-  Contributor, if any, and such derivative works, in source code and 

-  object code form.

-  b) Subject to the terms of this Agreement, each Contributor hereby 

-  grants Recipient a non-exclusive, worldwide, royalty-free patent license 

-  under Licensed Patents to make, use, sell, offer to sell, import and 

-  otherwise transfer the Contribution of such Contributor, if any, in 

-  source code and object code form. This patent license shall apply to the 

-  combination of the Contribution and the Program if, at the time the 

-  Contribution is added by the Contributor, such addition of the 

-  Contribution causes such combination to be covered by the Licensed 

-  Patents. The patent license shall not apply to any other combinations 

-  which include the Contribution. No hardware per se is licensed 

-  hereunder. 

-  c) Recipient understands that although each Contributor grants the 

-  licenses to its Contributions set forth herein, no assurances are 

-  provided by any Contributor that the Program does not infringe the 

-  patent or other intellectual property rights of any other entity. Each 

-  Contributor disclaims any liability to Recipient for claims brought by 

-  any other entity based on infringement of intellectual property rights 

-  or otherwise. As a condition to exercising the rights and licenses 

-  granted hereunder, each Recipient hereby assumes sole responsibility to 

-  secure any other intellectual property rights needed, if any. For 

-  example, if a third party patent license is required to allow Recipient 

-  to distribute the Program, it is Recipient's responsibility to acquire 

-  that license before distributing the Program.

-  d) Each Contributor represents that to its knowledge it has sufficient 

-  copyright rights in its Contribution, if any, to grant the copyright 

-  license set forth in this Agreement. 

-3. REQUIREMENTS 

-A Contributor may choose to distribute the Program in object code form 

-under its own license agreement, provided that: 

-  a) it complies with the terms and conditions of this Agreement; and

-  b) its license agreement:

-  i) effectively disclaims on behalf of all Contributors all warranties 

-  and conditions, express and implied, including warranties or conditions 

-  of title and non-infringement, and implied warranties or conditions of 

-  merchantability and fitness for a particular purpose; 

-  ii) effectively excludes on behalf of all Contributors all liability for 

-  damages, including direct, indirect, special, incidental and 

-  consequential damages, such as lost profits; 

-  iii) states that any provisions which differ from this Agreement are 

-  offered by that Contributor alone and not by any other party; and

-  iv) states that source code for the Program is available from such 

-  Contributor, and informs licensees how to obtain it in a reasonable 

-  manner on or through a medium customarily used for software exchange.

-When the Program is made available in source code form: 

-  a) it must be made available under this Agreement; and 

-  b) a copy of this Agreement must be included with each copy of the 

-  Program. 

-Each Contributor must include the following in a conspicuous location in 

-the Program: 

-  Copyright © {date here}, International Business Machines Corporation and 

-  others. All Rights Reserved. 

-In addition, each Contributor must identify itself as the originator of 

-its Contribution, if any, in a manner that reasonably allows subsequent 

-Recipients to identify the originator of the Contribution. 

-4. COMMERCIAL DISTRIBUTION 

-Commercial distributors of software may accept certain responsibilities 

-with respect to end users, business partners and the like. While this 

-license is intended to facilitate the commercial use of the Program, the 

-Contributor who includes the Program in a commercial product offering 

-should do so in a manner which does not create potential liability for 

-other Contributors. Therefore, if a Contributor includes the Program in a 

-commercial product offering, such Contributor ("Commercial Contributor") 

-hereby agrees to defend and indemnify every other Contributor 

-("Indemnified Contributor") against any losses, damages and costs 

-(collectively "Losses") arising from claims, lawsuits and other legal 

-actions brought by a third party against the Indemnified Contributor to 

-the extent caused by the acts or omissions of such Commercial Contributor 

-in connection with its distribution of the Program in a commercial product 

-offering. The obligations in this section do not apply to any claims or 

-Losses relating to any actual or alleged intellectual property 

-infringement. In order to qualify, an Indemnified Contributor must: a) 

-promptly notify the Commercial Contributor in writing of such claim, and 

-b) allow the Commercial Contributor to control, and cooperate with the 

-Commercial Contributor in, the defense and any related settlement 

-negotiations. The Indemnified Contributor may participate in any such 

-claim at its own expense. 

-For example, a Contributor might include the Program in a commercial 

-product offering, Product X. That Contributor is then a Commercial 

-Contributor. If that Commercial Contributor then makes performance claims, 

-or offers warranties related to Product X, those performance claims and 

-warranties are such Commercial Contributor's responsibility alone. Under 

-this section, the Commercial Contributor would have to defend claims 

-against the other Contributors related to those performance claims and 

-warranties, and if a court requires any other Contributor to pay any 

-damages as a result, the Commercial Contributor must pay those damages. 

-5. NO WARRANTY 

-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED 

-ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER 

-EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR 

-CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A 

-PARTICULAR PURPOSE. Each Recipient is solely responsible for determining 

-the appropriateness of using and distributing the Program and assumes all 

-risks associated with its exercise of rights under this Agreement, 

-including but not limited to the risks and costs of program errors, 

-compliance with applicable laws, damage to or loss of data, programs or 

-equipment, and unavailability or interruption of operations. 

-6. DISCLAIMER OF LIABILITY 

-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY 

-CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, 

-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING 

-WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF 

-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 

-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION 

-OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF 

-ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 

-7. GENERAL 

-If any provision of this Agreement is invalid or unenforceable under 

-applicable law, it shall not affect the validity or enforceability of the 

-remainder of the terms of this Agreement, and without further action by 

-the parties hereto, such provision shall be reformed to the minimum extent 

-necessary to make such provision valid and enforceable. 

-If Recipient institutes patent litigation against a Contributor with 

-respect to a patent applicable to software (including a cross-claim or 

-counterclaim in a lawsuit), then any patent licenses granted by that 

-Contributor to such Recipient under this Agreement shall terminate as of 

-the date such litigation is filed. In addition, If Recipient institutes 

-patent litigation against any entity (including a cross-claim or 

-counterclaim in a lawsuit) alleging that the Program itself (excluding 

-combinations of the Program with other software or hardware) infringes 

-such Recipient's patent(s), then such Recipient's rights granted under 

-Section 2(b) shall terminate as of the date such litigation is filed. 

-All Recipient's rights under this Agreement shall terminate if it fails to 

-comply with any of the material terms or conditions of this Agreement and 

-does not cure such failure in a reasonable period of time after becoming 

-aware of such noncompliance. If all Recipient's rights under this 

-Agreement terminate, Recipient agrees to cease use and distribution of the 

-Program as soon as reasonably practicable. However, Recipient's 

-obligations under this Agreement and any licenses granted by Recipient 

-relating to the Program shall continue and survive. 

-IBM may publish new versions (including revisions) of this Agreement from 

-time to time. Each new version of the Agreement will be given a 

-distinguishing version number. The Program (including Contributions) may 

-always be distributed subject to the version of the Agreement under which 

-it was received. In addition, after a new version of the Agreement is 

-published, Contributor may elect to distribute the Program (including its 

-Contributions) under the new version. No one other than IBM has the right 

-to modify this Agreement. Except as expressly stated in Sections 2(a) and 

-2(b) above, Recipient receives no rights or licenses to the intellectual 

-property of any Contributor under this Agreement, whether expressly, by 

-implication, estoppel or otherwise. All rights in the Program not 

-expressly granted under this Agreement are reserved. 

-This Agreement is governed by the laws of the State of New York and the 

-intellectual property laws of the United States of America. No party to 

-this Agreement will bring a legal action under this Agreement more than 

-one year after the cause of action arose. Each party waives its rights to 

-a jury trial in any resulting litigation. 

diff --git a/legal/LICENSE.logkit b/legal/LICENSE.logkit
deleted file mode 100644
index b360565..0000000
--- a/legal/LICENSE.logkit
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
- 
- Copyright (C) 1999-2001 The Apache Software Foundation. All rights reserved.
- 
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
- 
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
- 
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
- 
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
- 
- 4. The names "LogKit", "Jakarta" and "Apache Software Foundation"  must not 
-    be used to endorse or promote products derived from this software without
-    prior written permission. For written permission, please contact 
-    apache@apache.org.
- 
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
- 
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- 
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation and was  originally created by
- Stefano Mazzocchi  <stefano@apache.org>. For more  information on the Apache 
- Software Foundation, please see <http://www.apache.org/>.
- 
-*/
diff --git a/legal/LICENSE.quartz b/legal/LICENSE.quartz
deleted file mode 100644
index 4c8db80..0000000
--- a/legal/LICENSE.quartz
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * All source code, binaries, documentation and other files distributed
- * with Quartz Enterprise Job Scheduler are subject to the following 
- * license terms, and are held under the following copyright notice, 
- * unless otherwise noted within the individual files.
- *
- */
-
-
-/*
- *  Copyright James House (c) 2001-2003
- *
- *  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *
- * This product uses and includes within its distribution, 
- * software developed by the Apache Software Foundation 
- *     (http://www.apache.org/)
- *
- */
diff --git a/legal/LICENSE.resolver b/legal/LICENSE.resolver
deleted file mode 100644
index b9f6031..0000000
--- a/legal/LICENSE.resolver
+++ /dev/null
@@ -1,53 +0,0 @@
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
diff --git a/legal/LICENSE.servlet b/legal/LICENSE.servlet
deleted file mode 100644
index 9bace83..0000000
--- a/legal/LICENSE.servlet
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:  
- *       "This product includes software developed by the 
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
- *    Foundation" must not be used to endorse or promote products derived
- *    from this software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- *    nor may "Apache" appear in their names without prior written
- *    permission of the Apache Group.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- * ====================================================================
- *
- * This source code implements specifications defined by the Java
- * Community Process. In order to remain compliant with the specification
- * DO NOT add / change / or delete method signatures!
- */ 
diff --git a/legal/LICENSE.websphinx b/legal/LICENSE.websphinx
deleted file mode 100644
index 3a6c289..0000000
--- a/legal/LICENSE.websphinx
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * WebSphinx web-crawling toolkit
- *
- * Copyright (c) 1998-2002 Carnegie Mellon University.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND
- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
- * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
diff --git a/legal/LICENSE.xalan b/legal/LICENSE.xalan
deleted file mode 100644
index 21156a6..0000000
--- a/legal/LICENSE.xalan
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xalan" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, Lotus
- * Development Corporation., http://www.lotus.com.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
diff --git a/legal/LICENSE.xerces b/legal/LICENSE.xerces
deleted file mode 100644
index b37087c..0000000
--- a/legal/LICENSE.xerces
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.ibm.com.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
diff --git a/legal/LICENSE.xml-apis b/legal/LICENSE.xml-apis
deleted file mode 100644
index 930145f..0000000
--- a/legal/LICENSE.xml-apis
+++ /dev/null
@@ -1,5 +0,0 @@
-
-xml-apis is covered by The Apache Software License, Version 1.1
-
-FIXME: Put license text in here once it is available at
-       http://cvs.apache.org/viewcvs.cgi/xml-commons/
diff --git a/legal/LICENSE.xmldb b/legal/LICENSE.xmldb
deleted file mode 100644
index 6cf5b78..0000000
--- a/legal/LICENSE.xmldb
+++ /dev/null
@@ -1,52 +0,0 @@
-
-   The XML:DB Initiative Software License, Version 1.0
- 
- 
-  Copyright (c) 2000-2001 The XML:DB Initiative.  All rights
-  reserved.
- 
-  Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions
-  are met:
- 
-  1. Redistributions of source code must retain the above copyright
-     notice, this list of conditions and the following disclaimer.
- 
-  2. Redistributions in binary form must reproduce the above copyright
-     notice, this list of conditions and the following disclaimer in
-     the documentation and/or other materials provided with the
-     distribution.
- 
-  3. The end-user documentation included with the redistribution,
-     if any, must include the following acknowledgment:
-        "This product includes software developed by the
-         XML:DB Initiative (http://www.xmldb.org/)."
-     Alternately, this acknowledgment may appear in the software itself,
-     if and wherever such third-party acknowledgments normally appear.
- 
-  4. The name "XML:DB Initiative" must not be used to endorse or
-     promote products derived from this software without prior written
-     permission. For written permission, please contact info@xmldb.org.
- 
-  5. Products derived from this software may not be called "XML:DB",
-     nor may "XML:DB" appear in their name, without prior written
-     permission of the XML:DB Initiative.
- 
-  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
-  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-  DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
-  ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-  SUCH DAMAGE.
-  ====================================================================
- 
-  This software consists of voluntary contributions made by many
-  individuals on behalf of the XML:DB Initiative. For more information
-  on the XML:DB Initiative, please see <http://www.xmldb.org/>.
- 
diff --git a/legal/ant-contrib-0.6.jar.license.txt b/legal/ant-contrib-0.6.jar.license.txt
deleted file mode 100644
index 4d8c2fb..0000000
--- a/legal/ant-contrib-0.6.jar.license.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2001-2003 Ant-Contrib project.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:  
- *       "This product includes software developed by the 
- *        Ant-Contrib project (http://sourceforge.net/projects/ant-contrib)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The name Ant-Contrib must not be used to endorse or promote products 
- *    derived from this software without prior written permission. For
- *    written permission, please contact
- *    ant-contrib-developers@lists.sourceforge.net.
- *
- * 5. Products derived from this software may not be called "Ant-Contrib"
- *    nor may "Ant-Contrib" appear in their names without prior written
- *    permission of the Ant-Contrib project.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE ANT-CONTRIB PROJECT OR ITS
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- */
diff --git a/legal/ant-junit.jar.license.txt b/legal/ant-junit.jar.license.txt
deleted file mode 100644
index f820d4b..0000000
--- a/legal/ant-junit.jar.license.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- *                                 Apache License
- *                           Version 2.0, January 2004
- *                        http://www.apache.org/licenses/
- *
- *   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
- *
- *   1. Definitions.
- *
- *      "License" shall mean the terms and conditions for use, reproduction,
- *      and distribution as defined by Sections 1 through 9 of this document.
- *
- *      "Licensor" shall mean the copyright owner or entity authorized by
- *      the copyright owner that is granting the License.
- *
- *      "Legal Entity" shall mean the union of the acting entity and all
- *      other entities that control, are controlled by, or are under common
- *      control with that entity. For the purposes of this definition,
- *      "control" means (i) the power, direct or indirect, to cause the
- *      direction or management of such entity, whether by contract or
- *      otherwise, or (ii) ownership of fifty percent (50%) or more of the
- *      outstanding shares, or (iii) beneficial ownership of such entity.
- *
- *      "You" (or "Your") shall mean an individual or Legal Entity
- *      exercising permissions granted by this License.
- *
- *      "Source" form shall mean the preferred form for making modifications,
- *      including but not limited to software source code, documentation
- *      source, and configuration files.
- *
- *      "Object" form shall mean any form resulting from mechanical
- *      transformation or translation of a Source form, including but
- *      not limited to compiled object code, generated documentation,
- *      and conversions to other media types.
- *
- *      "Work" shall mean the work of authorship, whether in Source or
- *      Object form, made available under the License, as indicated by a
- *      copyright notice that is included in or attached to the work
- *      (an example is provided in the Appendix below).
- *
- *      "Derivative Works" shall mean any work, whether in Source or Object
- *      form, that is based on (or derived from) the Work and for which the
- *      editorial revisions, annotations, elaborations, or other modifications
- *      represent, as a whole, an original work of authorship. For the purposes
- *      of this License, Derivative Works shall not include works that remain
- *      separable from, or merely link (or bind by name) to the interfaces of,
- *      the Work and Derivative Works thereof.
- *
- *      "Contribution" shall mean any work of authorship, including
- *      the original version of the Work and any modifications or additions
- *      to that Work or Derivative Works thereof, that is intentionally
- *      submitted to Licensor for inclusion in the Work by the copyright owner
- *      or by an individual or Legal Entity authorized to submit on behalf of
- *      the copyright owner. For the purposes of this definition, "submitted"
- *      means any form of electronic, verbal, or written communication sent
- *      to the Licensor or its representatives, including but not limited to
- *      communication on electronic mailing lists, source code control systems,
- *      and issue tracking systems that are managed by, or on behalf of, the
- *      Licensor for the purpose of discussing and improving the Work, but
- *      excluding communication that is conspicuously marked or otherwise
- *      designated in writing by the copyright owner as "Not a Contribution."
- *
- *      "Contributor" shall mean Licensor and any individual or Legal Entity
- *      on behalf of whom a Contribution has been received by Licensor and
- *      subsequently incorporated within the Work.
- *
- *   2. Grant of Copyright License. Subject to the terms and conditions of
- *      this License, each Contributor hereby grants to You a perpetual,
- *      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- *      copyright license to reproduce, prepare Derivative Works of,
- *      publicly display, publicly perform, sublicense, and distribute the
- *      Work and such Derivative Works in Source or Object form.
- *
- *   3. Grant of Patent License. Subject to the terms and conditions of
- *      this License, each Contributor hereby grants to You a perpetual,
- *      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- *      (except as stated in this section) patent license to make, have made,
- *      use, offer to sell, sell, import, and otherwise transfer the Work,
- *      where such license applies only to those patent claims licensable
- *      by such Contributor that are necessarily infringed by their
- *      Contribution(s) alone or by combination of their Contribution(s)
- *      with the Work to which such Contribution(s) was submitted. If You
- *      institute patent litigation against any entity (including a
- *      cross-claim or counterclaim in a lawsuit) alleging that the Work
- *      or a Contribution incorporated within the Work constitutes direct
- *      or contributory patent infringement, then any patent licenses
- *      granted to You under this License for that Work shall terminate
- *      as of the date such litigation is filed.
- *
- *   4. Redistribution. You may reproduce and distribute copies of the
- *      Work or Derivative Works thereof in any medium, with or without
- *      modifications, and in Source or Object form, provided that You
- *      meet the following conditions:
- *
- *      (a) You must give any other recipients of the Work or
- *          Derivative Works a copy of this License; and
- *
- *      (b) You must cause any modified files to carry prominent notices
- *          stating that You changed the files; and
- *
- *      (c) You must retain, in the Source form of any Derivative Works
- *          that You distribute, all copyright, patent, trademark, and
- *          attribution notices from the Source form of the Work,
- *          excluding those notices that do not pertain to any part of
- *          the Derivative Works; and
- *
- *      (d) If the Work includes a "NOTICE" text file as part of its
- *          distribution, then any Derivative Works that You distribute must
- *          include a readable copy of the attribution notices contained
- *          within such NOTICE file, excluding those notices that do not
- *          pertain to any part of the Derivative Works, in at least one
- *          of the following places: within a NOTICE text file distributed
- *          as part of the Derivative Works; within the Source form or
- *          documentation, if provided along with the Derivative Works; or,
- *          within a display generated by the Derivative Works, if and
- *          wherever such third-party notices normally appear. The contents
- *          of the NOTICE file are for informational purposes only and
- *          do not modify the License. You may add Your own attribution
- *          notices within Derivative Works that You distribute, alongside
- *          or as an addendum to the NOTICE text from the Work, provided
- *          that such additional attribution notices cannot be construed
- *          as modifying the License.
- *
- *      You may add Your own copyright statement to Your modifications and
- *      may provide additional or different license terms and conditions
- *      for use, reproduction, or distribution of Your modifications, or
- *      for any such Derivative Works as a whole, provided Your use,
- *      reproduction, and distribution of the Work otherwise complies with
- *      the conditions stated in this License.
- *
- *   5. Submission of Contributions. Unless You explicitly state otherwise,
- *      any Contribution intentionally submitted for inclusion in the Work
- *      by You to the Licensor shall be under the terms and conditions of
- *      this License, without any additional terms or conditions.
- *      Notwithstanding the above, nothing herein shall supersede or modify
- *      the terms of any separate license agreement you may have executed
- *      with Licensor regarding such Contributions.
- *
- *   6. Trademarks. This License does not grant permission to use the trade
- *      names, trademarks, service marks, or product names of the Licensor,
- *      except as required for reasonable and customary use in describing the
- *      origin of the Work and reproducing the content of the NOTICE file.
- *
- *   7. Disclaimer of Warranty. Unless required by applicable law or
- *      agreed to in writing, Licensor provides the Work (and each
- *      Contributor provides its Contributions) on an "AS IS" BASIS,
- *      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- *      implied, including, without limitation, any warranties or conditions
- *      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- *      PARTICULAR PURPOSE. You are solely responsible for determining the
- *      appropriateness of using or redistributing the Work and assume any
- *      risks associated with Your exercise of permissions under this License.
- *
- *   8. Limitation of Liability. In no event and under no legal theory,
- *      whether in tort (including negligence), contract, or otherwise,
- *      unless required by applicable law (such as deliberate and grossly
- *      negligent acts) or agreed to in writing, shall any Contributor be
- *      liable to You for damages, including any direct, indirect, special,
- *      incidental, or consequential damages of any character arising as a
- *      result of this License or out of the use or inability to use the
- *      Work (including but not limited to damages for loss of goodwill,
- *      work stoppage, computer failure or malfunction, or any and all
- *      other commercial damages or losses), even if such Contributor
- *      has been advised of the possibility of such damages.
- *
- *   9. Accepting Warranty or Additional Liability. While redistributing
- *      the Work or Derivative Works thereof, You may choose to offer,
- *      and charge a fee for, acceptance of support, warranty, indemnity,
- *      or other liability obligations and/or rights consistent with this
- *      License. However, in accepting such obligations, You may act only
- *      on Your own behalf and on Your sole responsibility, not on behalf
- *      of any other Contributor, and only if You agree to indemnify,
- *      defend, and hold each Contributor harmless for any liability
- *      incurred by, or claims asserted against, such Contributor by reason
- *      of your accepting any such warranty or additional liability.
- *
- *   END OF TERMS AND CONDITIONS
- *
- *   APPENDIX: How to apply the Apache License to your work.
- *
- *      To apply the Apache License to your work, attach the following
- *      boilerplate notice, with the fields enclosed by brackets "[]"
- *      replaced with your own identifying information. (Don't include
- *      the brackets!)  The text should be enclosed in the appropriate
- *      comment syntax for the file format. We also recommend that a
- *      file or class name and description of purpose be included on the
- *      same "printed page" as the copyright notice for easier
- *      identification within third-party archives.
- *
- *   Copyright [yyyy] [name of copyright owner]
- *
- *   Licensed 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.
- */
diff --git a/legal/ant-launcher.jar.license.txt b/legal/ant-launcher.jar.license.txt
deleted file mode 100644
index f820d4b..0000000
--- a/legal/ant-launcher.jar.license.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- *                                 Apache License
- *                           Version 2.0, January 2004
- *                        http://www.apache.org/licenses/
- *
- *   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
- *
- *   1. Definitions.
- *
- *      "License" shall mean the terms and conditions for use, reproduction,
- *      and distribution as defined by Sections 1 through 9 of this document.
- *
- *      "Licensor" shall mean the copyright owner or entity authorized by
- *      the copyright owner that is granting the License.
- *
- *      "Legal Entity" shall mean the union of the acting entity and all
- *      other entities that control, are controlled by, or are under common
- *      control with that entity. For the purposes of this definition,
- *      "control" means (i) the power, direct or indirect, to cause the
- *      direction or management of such entity, whether by contract or
- *      otherwise, or (ii) ownership of fifty percent (50%) or more of the
- *      outstanding shares, or (iii) beneficial ownership of such entity.
- *
- *      "You" (or "Your") shall mean an individual or Legal Entity
- *      exercising permissions granted by this License.
- *
- *      "Source" form shall mean the preferred form for making modifications,
- *      including but not limited to software source code, documentation
- *      source, and configuration files.
- *
- *      "Object" form shall mean any form resulting from mechanical
- *      transformation or translation of a Source form, including but
- *      not limited to compiled object code, generated documentation,
- *      and conversions to other media types.
- *
- *      "Work" shall mean the work of authorship, whether in Source or
- *      Object form, made available under the License, as indicated by a
- *      copyright notice that is included in or attached to the work
- *      (an example is provided in the Appendix below).
- *
- *      "Derivative Works" shall mean any work, whether in Source or Object
- *      form, that is based on (or derived from) the Work and for which the
- *      editorial revisions, annotations, elaborations, or other modifications
- *      represent, as a whole, an original work of authorship. For the purposes
- *      of this License, Derivative Works shall not include works that remain
- *      separable from, or merely link (or bind by name) to the interfaces of,
- *      the Work and Derivative Works thereof.
- *
- *      "Contribution" shall mean any work of authorship, including
- *      the original version of the Work and any modifications or additions
- *      to that Work or Derivative Works thereof, that is intentionally
- *      submitted to Licensor for inclusion in the Work by the copyright owner
- *      or by an individual or Legal Entity authorized to submit on behalf of
- *      the copyright owner. For the purposes of this definition, "submitted"
- *      means any form of electronic, verbal, or written communication sent
- *      to the Licensor or its representatives, including but not limited to
- *      communication on electronic mailing lists, source code control systems,
- *      and issue tracking systems that are managed by, or on behalf of, the
- *      Licensor for the purpose of discussing and improving the Work, but
- *      excluding communication that is conspicuously marked or otherwise
- *      designated in writing by the copyright owner as "Not a Contribution."
- *
- *      "Contributor" shall mean Licensor and any individual or Legal Entity
- *      on behalf of whom a Contribution has been received by Licensor and
- *      subsequently incorporated within the Work.
- *
- *   2. Grant of Copyright License. Subject to the terms and conditions of
- *      this License, each Contributor hereby grants to You a perpetual,
- *      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- *      copyright license to reproduce, prepare Derivative Works of,
- *      publicly display, publicly perform, sublicense, and distribute the
- *      Work and such Derivative Works in Source or Object form.
- *
- *   3. Grant of Patent License. Subject to the terms and conditions of
- *      this License, each Contributor hereby grants to You a perpetual,
- *      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- *      (except as stated in this section) patent license to make, have made,
- *      use, offer to sell, sell, import, and otherwise transfer the Work,
- *      where such license applies only to those patent claims licensable
- *      by such Contributor that are necessarily infringed by their
- *      Contribution(s) alone or by combination of their Contribution(s)
- *      with the Work to which such Contribution(s) was submitted. If You
- *      institute patent litigation against any entity (including a
- *      cross-claim or counterclaim in a lawsuit) alleging that the Work
- *      or a Contribution incorporated within the Work constitutes direct
- *      or contributory patent infringement, then any patent licenses
- *      granted to You under this License for that Work shall terminate
- *      as of the date such litigation is filed.
- *
- *   4. Redistribution. You may reproduce and distribute copies of the
- *      Work or Derivative Works thereof in any medium, with or without
- *      modifications, and in Source or Object form, provided that You
- *      meet the following conditions:
- *
- *      (a) You must give any other recipients of the Work or
- *          Derivative Works a copy of this License; and
- *
- *      (b) You must cause any modified files to carry prominent notices
- *          stating that You changed the files; and
- *
- *      (c) You must retain, in the Source form of any Derivative Works
- *          that You distribute, all copyright, patent, trademark, and
- *          attribution notices from the Source form of the Work,
- *          excluding those notices that do not pertain to any part of
- *          the Derivative Works; and
- *
- *      (d) If the Work includes a "NOTICE" text file as part of its
- *          distribution, then any Derivative Works that You distribute must
- *          include a readable copy of the attribution notices contained
- *          within such NOTICE file, excluding those notices that do not
- *          pertain to any part of the Derivative Works, in at least one
- *          of the following places: within a NOTICE text file distributed
- *          as part of the Derivative Works; within the Source form or
- *          documentation, if provided along with the Derivative Works; or,
- *          within a display generated by the Derivative Works, if and
- *          wherever such third-party notices normally appear. The contents
- *          of the NOTICE file are for informational purposes only and
- *          do not modify the License. You may add Your own attribution
- *          notices within Derivative Works that You distribute, alongside
- *          or as an addendum to the NOTICE text from the Work, provided
- *          that such additional attribution notices cannot be construed
- *          as modifying the License.
- *
- *      You may add Your own copyright statement to Your modifications and
- *      may provide additional or different license terms and conditions
- *      for use, reproduction, or distribution of Your modifications, or
- *      for any such Derivative Works as a whole, provided Your use,
- *      reproduction, and distribution of the Work otherwise complies with
- *      the conditions stated in this License.
- *
- *   5. Submission of Contributions. Unless You explicitly state otherwise,
- *      any Contribution intentionally submitted for inclusion in the Work
- *      by You to the Licensor shall be under the terms and conditions of
- *      this License, without any additional terms or conditions.
- *      Notwithstanding the above, nothing herein shall supersede or modify
- *      the terms of any separate license agreement you may have executed
- *      with Licensor regarding such Contributions.
- *
- *   6. Trademarks. This License does not grant permission to use the trade
- *      names, trademarks, service marks, or product names of the Licensor,
- *      except as required for reasonable and customary use in describing the
- *      origin of the Work and reproducing the content of the NOTICE file.
- *
- *   7. Disclaimer of Warranty. Unless required by applicable law or
- *      agreed to in writing, Licensor provides the Work (and each
- *      Contributor provides its Contributions) on an "AS IS" BASIS,
- *      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- *      implied, including, without limitation, any warranties or conditions
- *      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- *      PARTICULAR PURPOSE. You are solely responsible for determining the
- *      appropriateness of using or redistributing the Work and assume any
- *      risks associated with Your exercise of permissions under this License.
- *
- *   8. Limitation of Liability. In no event and under no legal theory,
- *      whether in tort (including negligence), contract, or otherwise,
- *      unless required by applicable law (such as deliberate and grossly
- *      negligent acts) or agreed to in writing, shall any Contributor be
- *      liable to You for damages, including any direct, indirect, special,
- *      incidental, or consequential damages of any character arising as a
- *      result of this License or out of the use or inability to use the
- *      Work (including but not limited to damages for loss of goodwill,
- *      work stoppage, computer failure or malfunction, or any and all
- *      other commercial damages or losses), even if such Contributor
- *      has been advised of the possibility of such damages.
- *
- *   9. Accepting Warranty or Additional Liability. While redistributing
- *      the Work or Derivative Works thereof, You may choose to offer,
- *      and charge a fee for, acceptance of support, warranty, indemnity,
- *      or other liability obligations and/or rights consistent with this
- *      License. However, in accepting such obligations, You may act only
- *      on Your own behalf and on Your sole responsibility, not on behalf
- *      of any other Contributor, and only if You agree to indemnify,
- *      defend, and hold each Contributor harmless for any liability
- *      incurred by, or claims asserted against, such Contributor by reason
- *      of your accepting any such warranty or additional liability.
- *
- *   END OF TERMS AND CONDITIONS
- *
- *   APPENDIX: How to apply the Apache License to your work.
- *
- *      To apply the Apache License to your work, attach the following
- *      boilerplate notice, with the fields enclosed by brackets "[]"
- *      replaced with your own identifying information. (Don't include
- *      the brackets!)  The text should be enclosed in the appropriate
- *      comment syntax for the file format. We also recommend that a
- *      file or class name and description of purpose be included on the
- *      same "printed page" as the copyright notice for easier
- *      identification within third-party archives.
- *
- *   Copyright [yyyy] [name of copyright owner]
- *
- *   Licensed 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.
- */
diff --git a/legal/ant-trax.jar.license.txt b/legal/ant-trax.jar.license.txt
deleted file mode 100644
index f820d4b..0000000
--- a/legal/ant-trax.jar.license.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- *                                 Apache License
- *                           Version 2.0, January 2004
- *                        http://www.apache.org/licenses/
- *
- *   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
- *
- *   1. Definitions.
- *
- *      "License" shall mean the terms and conditions for use, reproduction,
- *      and distribution as defined by Sections 1 through 9 of this document.
- *
- *      "Licensor" shall mean the copyright owner or entity authorized by
- *      the copyright owner that is granting the License.
- *
- *      "Legal Entity" shall mean the union of the acting entity and all
- *      other entities that control, are controlled by, or are under common
- *      control with that entity. For the purposes of this definition,
- *      "control" means (i) the power, direct or indirect, to cause the
- *      direction or management of such entity, whether by contract or
- *      otherwise, or (ii) ownership of fifty percent (50%) or more of the
- *      outstanding shares, or (iii) beneficial ownership of such entity.
- *
- *      "You" (or "Your") shall mean an individual or Legal Entity
- *      exercising permissions granted by this License.
- *
- *      "Source" form shall mean the preferred form for making modifications,
- *      including but not limited to software source code, documentation
- *      source, and configuration files.
- *
- *      "Object" form shall mean any form resulting from mechanical
- *      transformation or translation of a Source form, including but
- *      not limited to compiled object code, generated documentation,
- *      and conversions to other media types.
- *
- *      "Work" shall mean the work of authorship, whether in Source or
- *      Object form, made available under the License, as indicated by a
- *      copyright notice that is included in or attached to the work
- *      (an example is provided in the Appendix below).
- *
- *      "Derivative Works" shall mean any work, whether in Source or Object
- *      form, that is based on (or derived from) the Work and for which the
- *      editorial revisions, annotations, elaborations, or other modifications
- *      represent, as a whole, an original work of authorship. For the purposes
- *      of this License, Derivative Works shall not include works that remain
- *      separable from, or merely link (or bind by name) to the interfaces of,
- *      the Work and Derivative Works thereof.
- *
- *      "Contribution" shall mean any work of authorship, including
- *      the original version of the Work and any modifications or additions
- *      to that Work or Derivative Works thereof, that is intentionally
- *      submitted to Licensor for inclusion in the Work by the copyright owner
- *      or by an individual or Legal Entity authorized to submit on behalf of
- *      the copyright owner. For the purposes of this definition, "submitted"
- *      means any form of electronic, verbal, or written communication sent
- *      to the Licensor or its representatives, including but not limited to
- *      communication on electronic mailing lists, source code control systems,
- *      and issue tracking systems that are managed by, or on behalf of, the
- *      Licensor for the purpose of discussing and improving the Work, but
- *      excluding communication that is conspicuously marked or otherwise
- *      designated in writing by the copyright owner as "Not a Contribution."
- *
- *      "Contributor" shall mean Licensor and any individual or Legal Entity
- *      on behalf of whom a Contribution has been received by Licensor and
- *      subsequently incorporated within the Work.
- *
- *   2. Grant of Copyright License. Subject to the terms and conditions of
- *      this License, each Contributor hereby grants to You a perpetual,
- *      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- *      copyright license to reproduce, prepare Derivative Works of,
- *      publicly display, publicly perform, sublicense, and distribute the
- *      Work and such Derivative Works in Source or Object form.
- *
- *   3. Grant of Patent License. Subject to the terms and conditions of
- *      this License, each Contributor hereby grants to You a perpetual,
- *      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- *      (except as stated in this section) patent license to make, have made,
- *      use, offer to sell, sell, import, and otherwise transfer the Work,
- *      where such license applies only to those patent claims licensable
- *      by such Contributor that are necessarily infringed by their
- *      Contribution(s) alone or by combination of their Contribution(s)
- *      with the Work to which such Contribution(s) was submitted. If You
- *      institute patent litigation against any entity (including a
- *      cross-claim or counterclaim in a lawsuit) alleging that the Work
- *      or a Contribution incorporated within the Work constitutes direct
- *      or contributory patent infringement, then any patent licenses
- *      granted to You under this License for that Work shall terminate
- *      as of the date such litigation is filed.
- *
- *   4. Redistribution. You may reproduce and distribute copies of the
- *      Work or Derivative Works thereof in any medium, with or without
- *      modifications, and in Source or Object form, provided that You
- *      meet the following conditions:
- *
- *      (a) You must give any other recipients of the Work or
- *          Derivative Works a copy of this License; and
- *
- *      (b) You must cause any modified files to carry prominent notices
- *          stating that You changed the files; and
- *
- *      (c) You must retain, in the Source form of any Derivative Works
- *          that You distribute, all copyright, patent, trademark, and
- *          attribution notices from the Source form of the Work,
- *          excluding those notices that do not pertain to any part of
- *          the Derivative Works; and
- *
- *      (d) If the Work includes a "NOTICE" text file as part of its
- *          distribution, then any Derivative Works that You distribute must
- *          include a readable copy of the attribution notices contained
- *          within such NOTICE file, excluding those notices that do not
- *          pertain to any part of the Derivative Works, in at least one
- *          of the following places: within a NOTICE text file distributed
- *          as part of the Derivative Works; within the Source form or
- *          documentation, if provided along with the Derivative Works; or,
- *          within a display generated by the Derivative Works, if and
- *          wherever such third-party notices normally appear. The contents
- *          of the NOTICE file are for informational purposes only and
- *          do not modify the License. You may add Your own attribution
- *          notices within Derivative Works that You distribute, alongside
- *          or as an addendum to the NOTICE text from the Work, provided
- *          that such additional attribution notices cannot be construed
- *          as modifying the License.
- *
- *      You may add Your own copyright statement to Your modifications and
- *      may provide additional or different license terms and conditions
- *      for use, reproduction, or distribution of Your modifications, or
- *      for any such Derivative Works as a whole, provided Your use,
- *      reproduction, and distribution of the Work otherwise complies with
- *      the conditions stated in this License.
- *
- *   5. Submission of Contributions. Unless You explicitly state otherwise,
- *      any Contribution intentionally submitted for inclusion in the Work
- *      by You to the Licensor shall be under the terms and conditions of
- *      this License, without any additional terms or conditions.
- *      Notwithstanding the above, nothing herein shall supersede or modify
- *      the terms of any separate license agreement you may have executed
- *      with Licensor regarding such Contributions.
- *
- *   6. Trademarks. This License does not grant permission to use the trade
- *      names, trademarks, service marks, or product names of the Licensor,
- *      except as required for reasonable and customary use in describing the
- *      origin of the Work and reproducing the content of the NOTICE file.
- *
- *   7. Disclaimer of Warranty. Unless required by applicable law or
- *      agreed to in writing, Licensor provides the Work (and each
- *      Contributor provides its Contributions) on an "AS IS" BASIS,
- *      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- *      implied, including, without limitation, any warranties or conditions
- *      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- *      PARTICULAR PURPOSE. You are solely responsible for determining the
- *      appropriateness of using or redistributing the Work and assume any
- *      risks associated with Your exercise of permissions under this License.
- *
- *   8. Limitation of Liability. In no event and under no legal theory,
- *      whether in tort (including negligence), contract, or otherwise,
- *      unless required by applicable law (such as deliberate and grossly
- *      negligent acts) or agreed to in writing, shall any Contributor be
- *      liable to You for damages, including any direct, indirect, special,
- *      incidental, or consequential damages of any character arising as a
- *      result of this License or out of the use or inability to use the
- *      Work (including but not limited to damages for loss of goodwill,
- *      work stoppage, computer failure or malfunction, or any and all
- *      other commercial damages or losses), even if such Contributor
- *      has been advised of the possibility of such damages.
- *
- *   9. Accepting Warranty or Additional Liability. While redistributing
- *      the Work or Derivative Works thereof, You may choose to offer,
- *      and charge a fee for, acceptance of support, warranty, indemnity,
- *      or other liability obligations and/or rights consistent with this
- *      License. However, in accepting such obligations, You may act only
- *      on Your own behalf and on Your sole responsibility, not on behalf
- *      of any other Contributor, and only if You agree to indemnify,
- *      defend, and hold each Contributor harmless for any liability
- *      incurred by, or claims asserted against, such Contributor by reason
- *      of your accepting any such warranty or additional liability.
- *
- *   END OF TERMS AND CONDITIONS
- *
- *   APPENDIX: How to apply the Apache License to your work.
- *
- *      To apply the Apache License to your work, attach the following
- *      boilerplate notice, with the fields enclosed by brackets "[]"
- *      replaced with your own identifying information. (Don't include
- *      the brackets!)  The text should be enclosed in the appropriate
- *      comment syntax for the file format. We also recommend that a
- *      file or class name and description of purpose be included on the
- *      same "printed page" as the copyright notice for easier
- *      identification within third-party archives.
- *
- *   Copyright [yyyy] [name of copyright owner]
- *
- *   Licensed 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.
- */
diff --git a/legal/ant.jar.license.txt b/legal/ant.jar.license.txt
deleted file mode 100644
index f820d4b..0000000
--- a/legal/ant.jar.license.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- *                                 Apache License
- *                           Version 2.0, January 2004
- *                        http://www.apache.org/licenses/
- *
- *   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
- *
- *   1. Definitions.
- *
- *      "License" shall mean the terms and conditions for use, reproduction,
- *      and distribution as defined by Sections 1 through 9 of this document.
- *
- *      "Licensor" shall mean the copyright owner or entity authorized by
- *      the copyright owner that is granting the License.
- *
- *      "Legal Entity" shall mean the union of the acting entity and all
- *      other entities that control, are controlled by, or are under common
- *      control with that entity. For the purposes of this definition,
- *      "control" means (i) the power, direct or indirect, to cause the
- *      direction or management of such entity, whether by contract or
- *      otherwise, or (ii) ownership of fifty percent (50%) or more of the
- *      outstanding shares, or (iii) beneficial ownership of such entity.
- *
- *      "You" (or "Your") shall mean an individual or Legal Entity
- *      exercising permissions granted by this License.
- *
- *      "Source" form shall mean the preferred form for making modifications,
- *      including but not limited to software source code, documentation
- *      source, and configuration files.
- *
- *      "Object" form shall mean any form resulting from mechanical
- *      transformation or translation of a Source form, including but
- *      not limited to compiled object code, generated documentation,
- *      and conversions to other media types.
- *
- *      "Work" shall mean the work of authorship, whether in Source or
- *      Object form, made available under the License, as indicated by a
- *      copyright notice that is included in or attached to the work
- *      (an example is provided in the Appendix below).
- *
- *      "Derivative Works" shall mean any work, whether in Source or Object
- *      form, that is based on (or derived from) the Work and for which the
- *      editorial revisions, annotations, elaborations, or other modifications
- *      represent, as a whole, an original work of authorship. For the purposes
- *      of this License, Derivative Works shall not include works that remain
- *      separable from, or merely link (or bind by name) to the interfaces of,
- *      the Work and Derivative Works thereof.
- *
- *      "Contribution" shall mean any work of authorship, including
- *      the original version of the Work and any modifications or additions
- *      to that Work or Derivative Works thereof, that is intentionally
- *      submitted to Licensor for inclusion in the Work by the copyright owner
- *      or by an individual or Legal Entity authorized to submit on behalf of
- *      the copyright owner. For the purposes of this definition, "submitted"
- *      means any form of electronic, verbal, or written communication sent
- *      to the Licensor or its representatives, including but not limited to
- *      communication on electronic mailing lists, source code control systems,
- *      and issue tracking systems that are managed by, or on behalf of, the
- *      Licensor for the purpose of discussing and improving the Work, but
- *      excluding communication that is conspicuously marked or otherwise
- *      designated in writing by the copyright owner as "Not a Contribution."
- *
- *      "Contributor" shall mean Licensor and any individual or Legal Entity
- *      on behalf of whom a Contribution has been received by Licensor and
- *      subsequently incorporated within the Work.
- *
- *   2. Grant of Copyright License. Subject to the terms and conditions of
- *      this License, each Contributor hereby grants to You a perpetual,
- *      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- *      copyright license to reproduce, prepare Derivative Works of,
- *      publicly display, publicly perform, sublicense, and distribute the
- *      Work and such Derivative Works in Source or Object form.
- *
- *   3. Grant of Patent License. Subject to the terms and conditions of
- *      this License, each Contributor hereby grants to You a perpetual,
- *      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- *      (except as stated in this section) patent license to make, have made,
- *      use, offer to sell, sell, import, and otherwise transfer the Work,
- *      where such license applies only to those patent claims licensable
- *      by such Contributor that are necessarily infringed by their
- *      Contribution(s) alone or by combination of their Contribution(s)
- *      with the Work to which such Contribution(s) was submitted. If You
- *      institute patent litigation against any entity (including a
- *      cross-claim or counterclaim in a lawsuit) alleging that the Work
- *      or a Contribution incorporated within the Work constitutes direct
- *      or contributory patent infringement, then any patent licenses
- *      granted to You under this License for that Work shall terminate
- *      as of the date such litigation is filed.
- *
- *   4. Redistribution. You may reproduce and distribute copies of the
- *      Work or Derivative Works thereof in any medium, with or without
- *      modifications, and in Source or Object form, provided that You
- *      meet the following conditions:
- *
- *      (a) You must give any other recipients of the Work or
- *          Derivative Works a copy of this License; and
- *
- *      (b) You must cause any modified files to carry prominent notices
- *          stating that You changed the files; and
- *
- *      (c) You must retain, in the Source form of any Derivative Works
- *          that You distribute, all copyright, patent, trademark, and
- *          attribution notices from the Source form of the Work,
- *          excluding those notices that do not pertain to any part of
- *          the Derivative Works; and
- *
- *      (d) If the Work includes a "NOTICE" text file as part of its
- *          distribution, then any Derivative Works that You distribute must
- *          include a readable copy of the attribution notices contained
- *          within such NOTICE file, excluding those notices that do not
- *          pertain to any part of the Derivative Works, in at least one
- *          of the following places: within a NOTICE text file distributed
- *          as part of the Derivative Works; within the Source form or
- *          documentation, if provided along with the Derivative Works; or,
- *          within a display generated by the Derivative Works, if and
- *          wherever such third-party notices normally appear. The contents
- *          of the NOTICE file are for informational purposes only and
- *          do not modify the License. You may add Your own attribution
- *          notices within Derivative Works that You distribute, alongside
- *          or as an addendum to the NOTICE text from the Work, provided
- *          that such additional attribution notices cannot be construed
- *          as modifying the License.
- *
- *      You may add Your own copyright statement to Your modifications and
- *      may provide additional or different license terms and conditions
- *      for use, reproduction, or distribution of Your modifications, or
- *      for any such Derivative Works as a whole, provided Your use,
- *      reproduction, and distribution of the Work otherwise complies with
- *      the conditions stated in this License.
- *
- *   5. Submission of Contributions. Unless You explicitly state otherwise,
- *      any Contribution intentionally submitted for inclusion in the Work
- *      by You to the Licensor shall be under the terms and conditions of
- *      this License, without any additional terms or conditions.
- *      Notwithstanding the above, nothing herein shall supersede or modify
- *      the terms of any separate license agreement you may have executed
- *      with Licensor regarding such Contributions.
- *
- *   6. Trademarks. This License does not grant permission to use the trade
- *      names, trademarks, service marks, or product names of the Licensor,
- *      except as required for reasonable and customary use in describing the
- *      origin of the Work and reproducing the content of the NOTICE file.
- *
- *   7. Disclaimer of Warranty. Unless required by applicable law or
- *      agreed to in writing, Licensor provides the Work (and each
- *      Contributor provides its Contributions) on an "AS IS" BASIS,
- *      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- *      implied, including, without limitation, any warranties or conditions
- *      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- *      PARTICULAR PURPOSE. You are solely responsible for determining the
- *      appropriateness of using or redistributing the Work and assume any
- *      risks associated with Your exercise of permissions under this License.
- *
- *   8. Limitation of Liability. In no event and under no legal theory,
- *      whether in tort (including negligence), contract, or otherwise,
- *      unless required by applicable law (such as deliberate and grossly
- *      negligent acts) or agreed to in writing, shall any Contributor be
- *      liable to You for damages, including any direct, indirect, special,
- *      incidental, or consequential damages of any character arising as a
- *      result of this License or out of the use or inability to use the
- *      Work (including but not limited to damages for loss of goodwill,
- *      work stoppage, computer failure or malfunction, or any and all
- *      other commercial damages or losses), even if such Contributor
- *      has been advised of the possibility of such damages.
- *
- *   9. Accepting Warranty or Additional Liability. While redistributing
- *      the Work or Derivative Works thereof, You may choose to offer,
- *      and charge a fee for, acceptance of support, warranty, indemnity,
- *      or other liability obligations and/or rights consistent with this
- *      License. However, in accepting such obligations, You may act only
- *      on Your own behalf and on Your sole responsibility, not on behalf
- *      of any other Contributor, and only if You agree to indemnify,
- *      defend, and hold each Contributor harmless for any liability
- *      incurred by, or claims asserted against, such Contributor by reason
- *      of your accepting any such warranty or additional liability.
- *
- *   END OF TERMS AND CONDITIONS
- *
- *   APPENDIX: How to apply the Apache License to your work.
- *
- *      To apply the Apache License to your work, attach the following
- *      boilerplate notice, with the fields enclosed by brackets "[]"
- *      replaced with your own identifying information. (Don't include
- *      the brackets!)  The text should be enclosed in the appropriate
- *      comment syntax for the file format. We also recommend that a
- *      file or class name and description of purpose be included on the
- *      same "printed page" as the copyright notice for easier
- *      identification within third-party archives.
- *
- *   Copyright [yyyy] [name of copyright owner]
- *
- *   Licensed 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.
- */
diff --git a/legal/jetty-4.2.23.jar.license.html b/legal/jetty-4.2.23.jar.license.html
deleted file mode 100644
index f8710ce..0000000
--- a/legal/jetty-4.2.23.jar.license.html
+++ /dev/null
@@ -1,159 +0,0 @@
-<HTML>
-<HEAD>
-   <TITLE>Jetty License</TITLE>
-</HEAD>
-<BODY BGCOLOR="#FFFFFF">
-<FONT FACE=ARIAL,HELVETICA>
-<CENTER><FONT SIZE=+3><B>Jetty License</B></FONT></CENTER>
-<CENTER><FONT SIZE=-1><B>$Revision: 3.7 $</B></FONT></CENTER>
-
-<B>Preamble:</B><p>
-
-The intent of this document is to state the conditions under which the
-Jetty Package may be copied, such that the Copyright Holder maintains some
-semblance of control over the development of the package, while giving the
-users of the package the right to use, distribute and make reasonable
-modifications to the Package in accordance with the goals and ideals of
-the Open Source concept as described at
-<A HREF="http://www.opensource.org">http://www.opensource.org</A>.
-<P>
-It is the intent of this license to allow commercial usage of the Jetty
-package, so long as the source code is distributed or suitable visible
-credit given or other arrangements made with the copyright holders.
-
-<P><B>Definitions:</B><P>
-
-<UL>
-  <LI> "Jetty" refers to the collection of Java classes that are
-       distributed as a HTTP server with servlet capabilities and
-       associated utilities.<p>
-
-  <LI>	"Package" refers to the collection of files distributed by the
-       Copyright Holder, and derivatives of that collection of files
-       created through textual modification.<P>
-       
-  <LI>	"Standard Version" refers to such a Package if it has not been
-       modified, or has been modified in accordance with the wishes
-       of the Copyright Holder.<P>
-       
-  <LI>	"Copyright Holder" is whoever is named in the copyright or
-       copyrights for the package. <BR>
-       Mort Bay Consulting Pty. Ltd. (Australia) is the "Copyright
-       Holder" for the Jetty package.<P>
-       
-  <LI>	"You" is you, if you're thinking about copying or distributing
-       this Package.<P>
-       
-  <LI>	"Reasonable copying fee" is whatever you can justify on the
-       basis of media cost, duplication charges, time of people involved,
-       and so on.  (You will not be required to justify it to the
-       Copyright Holder, but only to the computing community at large
-       as a market that must bear the fee.)<P>
-       
-  <LI>	"Freely Available" means that no fee is charged for the item
-       itself, though there may be fees involved in handling the item.
-       It also means that recipients of the item may redistribute it
-       under the same conditions they received it.<P>
-</UL>
-
-0. The Jetty Package is Copyright (c) Mort Bay Consulting Pty. Ltd.
-(Australia) and others. Individual files in this package may contain
-additional copyright notices. The javax.servlet packages are copyright
-Sun Microsystems Inc. <P>
-
-1. The Standard Version of the Jetty package is
-available from <A HREF=http://jetty.mortbay.org>http://jetty.mortbay.org</A>.<P>
-
-2. You may make and distribute verbatim copies of the source form 
-of the Standard Version of this Package without restriction, provided that 
-you include this license and all of the original copyright notices
-and associated disclaimers.<P>
-
-3. You may make and distribute verbatim copies of the compiled form of the 
-Standard Version of this Package without restriction, provided that you
-include this license.<P>
-
-4. You may apply bug fixes, portability fixes and other modifications
-derived from the Public Domain or from the Copyright Holder.  A Package
-modified in such a way shall still be considered the Standard Version.<P>
-
-5. You may otherwise modify your copy of this Package in any way, provided
-that you insert a prominent notice in each changed file stating how and
-when you changed that file, and provided that you do at least ONE of the
-following:<P>
-
-<BLOCKQUOTE>
-a) Place your modifications in the Public Domain or otherwise make them
-Freely Available, such as by posting said modifications to Usenet or
-an equivalent medium, or placing the modifications on a major archive
-site such as ftp.uu.net, or by allowing the Copyright Holder to include
-your modifications in the Standard Version of the Package.<P>
-
-b) Use the modified Package only within your corporation or organization.<P>
-
-c) Rename any non-standard classes so the names do not conflict
-with standard classes, which must also be provided, and provide
-a separate manual page for each non-standard class that clearly
-documents how it differs from the Standard Version.<P>
-
-d) Make other arrangements with the Copyright Holder.<P>
-</BLOCKQUOTE>
-
-6. You may distribute modifications or subsets of this Package in source 
-code or compiled form, provided that you do at least ONE of the following:<P>
-
-<BLOCKQUOTE>
-a) Distribute this license and all original copyright messages, together 
-with instructions (in the about dialog, manual page or equivalent) on where 
-to get the complete Standard Version.<P>
-
-b) Accompany the distribution with the machine-readable source of
-the Package with your modifications. The modified package must include
-this license and all of the original copyright notices and associated
-disclaimers, together with instructions on where to get the complete
-Standard Version.<P>
-
-c) Make other arrangements with the Copyright Holder.<P>
-</BLOCKQUOTE>
-
-7. You may charge a reasonable copying fee for any distribution of this
-Package.  You may charge any fee you choose for support of this Package.
-You may not charge a fee for this Package itself.  However,
-you may distribute this Package in aggregate with other (possibly
-commercial) programs as part of a larger (possibly commercial) software
-distribution provided that you meet the other distribution requirements
-of this license.<P>
-
-8. Input to or the output produced from the programs of this Package
-do not automatically fall under the copyright of this Package, but
-belong to whomever generated them, and may be sold commercially, and
-may be aggregated with this Package.<P>
-
-9. Any program subroutines supplied by you and linked into this Package
-shall not be considered part of this Package.<P>
-
-10. The name of the Copyright Holder may not be used to endorse or promote
-products derived from this software without specific prior written
-permission.<P>
-
-11. This license may change with each release of a Standard Version of
-the Package. You may choose to use the license associated with version
-you are using or the license of the latest Standard Version.<P>
-
-12. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.<P>
-
-13. If any superior law implies a warranty, the sole remedy under such shall
-be , at the Copyright Holders option either a) return of any price paid or 
-b) use or reasonable endeavours to repair or replace the software.<P>
-
-14. This license shall be read under the laws of Australia.  <P>
-
-<center>The End</center>
-
-<center><FONT size=-1>This license was derived from the <I>Artistic</I> license published 
-on <a href=http://www.opensource.org>http://www.opensource.com</a></font></center>
-</FONT>
-
-
diff --git a/legal/kupu.license.txt b/legal/kupu.license.txt
deleted file mode 100644
index 124695f..0000000
--- a/legal/kupu.license.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-Copyright (c) 2003-2004, Kupu Contributors
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-
-    * Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-
-    * Redistributions in binary form must reproduce the above
-      copyright notice, this list of conditions and the following
-      disclaimer in the documentation and/or other materials provided
-      with the distribution.
-
-    * Neither the name of Kupu nor the names of its contributors may
-      be used to endorse or promote products derived from this
-      software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/legal/neko.license.txt b/legal/neko.license.txt
deleted file mode 100644
index 760f629..0000000
--- a/legal/neko.license.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-The CyberNeko Software License, Version 1.0
-
- 
-(C) Copyright 2002, Andy Clark.  All rights reserved.
- 
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer. 
-
-2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in
-   the documentation and/or other materials provided with the
-   distribution.
-
-3. The end-user documentation included with the redistribution,
-   if any, must include the following acknowledgment:  
-     "This product includes software developed by Andy Clark."
-   Alternately, this acknowledgment may appear in the software itself,
-   if and wherever such third-party acknowledgments normally appear.
-
-4. The names "CyberNeko" and "NekoHTML" must not be used to endorse
-   or promote products derived from this software without prior 
-   written permission. For written permission, please contact 
-   andy@cyberneko.net.
-
-5. Products derived from this software may not be called "NekoHTML",
-   nor may "NekoHTML" appear in their name, without prior written
-   permission of the author.
-
-THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 
-OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 
-OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-====================================================================
-
-This license is based on the Apache Software License, version 1.1.
\ No newline at end of file
diff --git a/legal/xmlunit1.0.jar.license.txt b/legal/xmlunit1.0.jar.license.txt
deleted file mode 100644
index 0a1439f..0000000
--- a/legal/xmlunit1.0.jar.license.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-******************************************************************
-Copyright (c) 2001, Jeff Martin, Tim Bacon
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-    * Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above
-      copyright notice, this list of conditions and the following
-      disclaimer in the documentation and/or other materials provided
-      with the distribution.
-    * Neither the name of the xmlunit.sourceforge.net nor the names
-      of its contributors may be used to endorse or promote products
-      derived from this software without specific prior written
-      permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
-
-******************************************************************
-*/
diff --git a/lenya.bat b/lenya.bat
deleted file mode 100644
index 055f756..0000000
--- a/lenya.bat
+++ /dev/null
@@ -1,160 +0,0 @@
-:: Copyright 1999-2004 The Apache Software Foundation
-::
-:: Licensed 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.
-
-@echo off
-:: -----------------------------------------------------------------------------
-:: Lenya Win32 Shell Script
-::
-:: $Id$
-:: -----------------------------------------------------------------------------
-
-:: Configuration variables
-::
-:: LENYA_HOME
-::   Folder that points to the root of the Lenya distribution
-::
-:: LENYA_LIB
-::   Folder containing all the library files needed by the Lenya CLI
-::
-:: JAVA_HOME
-::   Home of Java installation.
-::
-:: JAVA_OPTIONS
-::   Extra options to pass to the JVM
-::
-:: JAVA_DEBUG_PORT
-::   The location where the JVM debug server should listen to
-::
-:: JETTY_PORT
-::   Override the default port for Jetty
-::
-:: JETTY_ADMIN_PORT
-::   The port where the jetty web administration should bind
-::
-:: JETTY_WEBAPP
-::   The directory where the webapp that jetty has to execute is located
-::
-
-:: ----- Verify and Set Required Environment Variables -------------------------
-
-if not "%JAVA_HOME%" == "" goto gotJavaHome
-echo You must set JAVA_HOME to point at your Java Development Kit installation
-goto end
-:gotJavaHome
-
-:: ----- Check System Properties -----------------------------------------------
-
-if not "%EXEC%" == "" goto gotExec
-if not "%OS%" == "Windows_NT" goto noExecNT
-set EXEC=start "Apache Lenya" /D. /MAX
-goto gotExec
-:noExecNT
-set EXEC=
-:gotExec
-
-set LENYA_HOME=.
-:: echo lenya.bat: using %LENYA_HOME% as home
-
-set LENYA_LIB=%LENYA_HOME%\build\lenya\webapp\WEB-INF\lib
-:: echo lenya.bat: using %LENYA_LIB% as lib
-
-set JETTY_PORT=8888
-
-set JETTY_ADMIN_PORT=8889
-set JETTY_WEBAPP=%LENYA_HOME%\build\lenya\webapp
-:: echo lenya.bat: using %JETTY_WEBAPP% as the webapp directory
-
-set JAVA_DEBUG_PORT=8000
-
-:: ----- Set Up The Classpath --------------------------------------------------
-
-set CP=%LENYA_HOME%\tools\loader
-
-:: ----- Unpack WAR file if needed --------------------------------------------------
-
-if exist build\lenya\webapp goto action
-
-echo        ###############################################
-echo        #   First start of Lenya. Unpacking now...    #
-echo        ###############################################
-
-mkdir build\lenya\webapp
-cd build\lenya\webapp
-"%JAVA_HOME%\bin\jar.exe" -xf ..\..\..\lenya.war
-cd ..\..\..
-mkdir build\lenya\webapp\WEB-INF\logs
-
-:: ----- Check action ----------------------------------------------------------
-:action
-if ""%1"" == ""cli"" goto doCli
-if ""%1"" == ""servlet"" goto doServlet
-if ""%1"" == ""servlet-admin"" goto doAdmin
-if ""%1"" == ""servlet-debug"" goto doDebug
-IF ""%1"" == ""servlet-profile"" goto doProfile
-goto doServlet
-
-echo Usage: lenya (action)
-echo actions:
-echo   cli             Run Lenya from command line
-echo   servlet         Run Lenya in a servlet container
-echo   servlet-admin   Run Lenya in a servlet container and turn container web administration on
-echo   servlet-debug   Run Lenya in a servlet container and turn on remote JVM debug
-echo   servlet-profile Run Lenya in a servlet container and turn on JVM profiling
-goto end
-
-:: ----- Cli -------------------------------------------------------------------
-
-:doCli
-set param=
-shift
-:cliLoop
-if "%1"=="" goto cliLoopEnd
-if not "%1"=="" set param=%param% %1
-shift
-goto cliLoop
-
-:cliLoopEnd
-
-"%JAVA_HOME%\bin\java.exe" %JAVA_OPTIONS% -classpath %CP% -Djava.endorsed.dirs=%LENYA_LIB%\endorsed -Dloader.jar.repositories=%LENYA_LIB% -Dloader.main.class=org.apache.cocoon.Main Loader %param%
-goto end
-
-:: ----- Servlet ---------------------------------------------------------------
-
-:doServlet
-%EXEC% "%JAVA_HOME%\bin\java.exe" %JAVA_OPTIONS% -classpath %CP% -Djava.endorsed.dirs=%LENYA_LIB%\endorsed -Dwebapp=%JETTY_WEBAPP% -Dorg.xml.sax.parser=org.apache.xerces.parsers.SAXParser -Djetty.port=%JETTY_PORT% -Djetty.admin.port=%JETTY_ADMIN_PORT% -Dhome=%LENYA_HOME% -Dloader.jar.repositories=%LENYA_HOME%\tools\jetty\lib,%LENYA_LIB%\endorsed -Dloader.main.class=org.mortbay.jetty.Server Loader %LENYA_HOME%\tools\jetty\conf\main.xml
-goto end
-
-:: ----- Servlet with Administration Web Interface -----------------------------
-
-:doAdmin
-%EXEC% "%JAVA_HOME%\bin\java.exe" %JAVA_OPTIONS% -classpath %CP% -Djava.endorsed.dirs=%LENYA_LIB%\endorsed -Dwebapp=%JETTY_WEBAPP% -Dorg.xml.sax.parser=org.apache.xerces.parsers.SAXParser -Djetty.port=%JETTY_PORT% -Djetty.admin.port=%JETTY_ADMIN_PORT% -Dhome=%LENYA_HOME% -Dloader.jar.repositories=%LENYA_HOME%\tools\jetty\lib,%LENYA_LIB%\endorsed -Dloader.main.class=org.mortbay.jetty.Server Loader %LENYA_HOME%\tools\jetty\conf\main.xml %LENYA_HOME%\tools\jetty\conf\admin.xml
-goto end
-
-:: ----- Servlet Debug ---------------------------------------------------------
-
-:doDebug
-%EXEC% "%JAVA_HOME%\bin\java.exe" %JAVA_OPTIONS% -Xdebug -Xrunjdwp:transport=dt_socket,address=%JAVA_DEBUG_PORT%,server=y,suspend=n  -classpath %CP% -Djava.endorsed.dirs=%LENYA_LIB%\endorsed -Dwebapp=%JETTY_WEBAPP% -Dhome=%LENYA_HOME% -Dorg.xml.sax.parser=org.apache.xerces.parsers.SAXParser -Djetty.port=%JETTY_PORT% -Djetty.admin.port=%JETTY_ADMIN_PORT% -Dloader.jar.repositories=%LENYA_HOME%\tools\jetty\lib,%LENYA_LIB%\endorsed -Dloader.main.class=org.mortbay.jetty.Server Loader %LENYA_HOME%\tools\jetty\conf\main.xml
-goto end
-
-:: ----- Servlet Profile ---------------------------------------------------------
-
-:doProfile
-%EXEC% "%JAVA_HOME%\bin\java.exe" %JAVA_OPTIONS% -Xrunhprof:heap=all,cpu=samples,thread=y,depth=3 -classpath %CP% -Djava.endorsed.dirs=%LENYA_LIB%\endorsed -Dwebapp=%JETTY_WEBAPP% -Dhome=%LENYA_HOME% -Dorg.xml.sax.parser=org.apache.xerces.parsers.SAXParser -Djetty.port=%JETTY_PORT% -Djetty.admin.port=%JETTY_ADMIN_PORT% -Dloader.jar.repositories=%LENYA_HOME%\tools\jetty\lib,%LENYA_LIB%\endorsed -Dloader.main.class=org.mortbay.jetty.Server Loader %LENYA_HOME%\tools\jetty\conf\main.xml
-
-:: ----- End -------------------------------------------------------------------
-
-:end
-set CP=
-set EXEC=
-
diff --git a/lenya.nsi b/lenya.nsi
deleted file mode 100644
index e095916..0000000
--- a/lenya.nsi
+++ /dev/null
@@ -1,164 +0,0 @@
-;NSIS Lenya Installer script
-
-; Copyright 1999-2004 The Apache Software Foundation
-;
-; Licensed 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.
-
-; $Id$
-
-;--------------------------------
-;Include Modern UI
-
-  !include "MUI.nsh"
-
-;--------------------------------
-;Configuration
-
-  ;General
-  Var product_name
-  Name "Apache Lenya 1.4-dev"
-  OutFile "apache-lenya-1.4-dev-bin.exe"
-  
-  CRCCheck on
-  SetCompress force
-  SetDatablockOptimize on
-
-  ;Folder selection page
-  InstallDir "C:\apache-lenya-1.4-dev"
-  
-;--------------------------------
-;Interface Settings
-
-  !define MUI_ABORTWARNING
-
-;--------------------------------
-;Pages
-
-  !insertmacro MUI_PAGE_LICENSE "LICENSE.txt"
-  !insertmacro MUI_PAGE_COMPONENTS
-  !insertmacro MUI_PAGE_DIRECTORY
-  !insertmacro MUI_PAGE_INSTFILES
-  
-  !insertmacro MUI_UNPAGE_CONFIRM
-  !insertmacro MUI_UNPAGE_INSTFILES
-  
-;--------------------------------
-;Languages
- 
-  !insertmacro MUI_LANGUAGE "English"
-
-;--------------------------------
-;Installer Sections
-
-Section "Apache Lenya 1.4-dev" SecDummy
-
-  Call findJavaPath
-  StrCpy $product_name "Apache Lenya 1.4-dev"
-  SetOutPath $INSTDIR
-  
-  SetOutPath $INSTDIR\build\lenya\webapp
-  File build\lenya\webapp\global-sitemap.xmap
-  File build\lenya\webapp\sitemap.xmap
-  File /r build\lenya\webapp\lenya
-  File /r build\lenya\webapp\WEB-INF
-  
-  SetOutPath $INSTDIR
-  File lenya.bat
-  File build.properties
-  File build.xml
-  File NOTICE.txt
-  File LICENSE.txt
-  File README.txt
-  File CREDITS.txt
-  File /r tools
-  File /r legal
-
-  CreateDirectory "$SMPROGRAMS\$product_name"
-  CreateShortCut "$SMPROGRAMS\$product_name\Apache Lenya Home Page.lnk" \
-                 "http://lenya.apache.org/"
-
-  CreateShortCut "$SMPROGRAMS\$product_name\Welcome to $product_name.lnk" \
-                 "http://127.0.0.1:8888"
-
-  CreateShortCut "$SMPROGRAMS\$product_name\Uninstall $product_name.lnk" \
-                 "$INSTDIR\Uninstall.exe"
-
-  CreateShortCut "$SMPROGRAMS\$product_name\Start $product_name.lnk" \
-                 "$INSTDIR\lenya.bat" \
-                 'servlet' \
-                 "$INSTDIR\lenya.bat" 1 SW_SHOWNORMAL
-
-  ClearErrors
-
-  ;Start Apache Lenya, wait 12 seconds to give it time to start, then launch start page
-  ExecShell "open" '"$INSTDIR\lenya.bat"' 0 SW_SHOWMINIMIZED
-  ;Create uninstaller
-  WriteUninstaller "$INSTDIR\Uninstall.exe"
-  Sleep 12000
-  ExecShell "open" '"http://127.0.0.1:8888"' 0 SW_SHOWNORMAL
-  Quit
-SectionEnd
-
-;--------------------------------
-;Descriptions
-
-  LangString DESC_SecDummy ${LANG_ENGLISH} "Installs the Apache Lenya 1.4-dev Content Management System."
-
-  !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecDummy} $(DESC_SecDummy)
-  !insertmacro MUI_FUNCTION_DESCRIPTION_END
- 
-;--------------------------------
-;Uninstaller Section
-
-Section "Uninstall"
-  RMDir /r "$SMPROGRAMS\Apache Lenya 1.4-dev"
-  RMDir /r "$INSTDIR"
-SectionEnd
-
-; =====================
-; FindJavaPath Function
-; =====================
-;
-; Find the JAVA_HOME used on the system, and put the result on the top of the
-; stack
-; Will exit if the path cannot be determined
-;
-Function findJavaPath
-
-  ClearErrors
-
-  ReadEnvStr $1 JAVA_HOME
-
-  IfErrors 0 FoundJDK
-
-  ClearErrors
-
-  ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Development Kit" "CurrentVersion"
-  ReadRegStr $1 HKLM "SOFTWARE\JavaSoft\Java Development Kit\$2" "JavaHome"
-  ReadRegStr $3 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion"
-  ReadRegStr $4 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$3" "RuntimeLib"
-
-  FoundJDK:
-
-  IfErrors 0 NoAbort
-    MessageBox MB_OK "Couldn't find a Java Development Kit installed on this \
-computer. Please download one from http://java.sun.com. If there is already \ a JDK installed on this computer, set an environment variable JAVA_HOME to the \ pathname of the directory where it is installed."
-    Abort
-
-  NoAbort:
-
-  ; Put the result in the stack
-  Push $1
-
-FunctionEnd
diff --git a/lenya.sh b/lenya.sh
deleted file mode 100755
index ceb1682..0000000
--- a/lenya.sh
+++ /dev/null
@@ -1,195 +0,0 @@
-#!/bin/sh
-
-# Copyright 1999-2004 The Apache Software Foundation
-#
-# Licensed 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.
-
-# -----------------------------------------------------------------------------
-# Lenya Unix Shell Script
-#
-# $Id$
-# -----------------------------------------------------------------------------
-
-# Configuration variables
-#
-# LENYA_HOME
-#   The root of the Lenya distribution
-#
-# LENYA_WEBAPP_HOME
-#   The root of the Lenya web application
-#
-# LENYA_LIB
-#   Folder containing all the library files needed by the Lenya CLI
-#
-# JAVA_HOME
-#   Home of Java installation.
-#
-# JAVA_OPTIONS
-#   Extra options to pass to the JVM
-#
-# JAVA_DEBUG_ARGS
-#   The command line arguments for the internal JVM debugger
-#
-# JAVA_PROFILE_ARGS
-#   The command line arguments for the internal JVM profiler
-#
-# JETTY_PORT
-#   Override the default port for Jetty
-#
-# JETTY_ADMIN_PORT
-#   The port where the jetty web administration should bind
-#
-
-
-usage()
-{
-    echo "Usage: $0 (action)"
-    echo "actions:"
-    echo "  cli               Run Lenya from the command line"
-    echo "  servlet           Run Lenya in a servlet container"
-    echo "  servlet-admin     Run Lenya in a servlet container and turn on container web administration"
-    echo "  servlet-debug     Run Lenya in a servlet container and turn on JVM remote debug"
-    echo "  servlet-profile   Run Lenya in a servlet container and turn on JVM profiling"
-    exit 1
-}
-
-[ $# -gt 0 ] || usage
-
-ACTION=$1
-shift
-ARGS="$*"
-
-# ----- Verify and Set Required Environment Variables -------------------------
-
-if [ "$JAVA_HOME" = "" ] ; then
-  echo You must set JAVA_HOME to point at your Java Development Kit installation
-  exit 1
-fi
-
-if [ "$JAVA_OPTIONS" = "" ] ; then
-  JAVA_OPTIONS='-Xms32M -Xmx512M'
-fi
-
-if [ "$LENYA_HOME" = "" ] ; then
-  LENYA_HOME='.'
-fi
-
-if [ "$LENYA_WEBAPP_HOME" = "" ] ; then
-  STANDALONE_WEBAPP=../webapp
-  if [ -d $STANDALONE_WEBAPP ] ; then
-    # for standalone-webapp setup
-    LENYA_WEBAPP_HOME=$STANDALONE_WEBAPP
-  else
-    # when in the build environment
-    LENYA_WEBAPP_HOME="$LENYA_HOME/build/lenya/webapp"
-  fi
-fi
-echo "$0: using $LENYA_WEBAPP_HOME as the webapp directory"
-
-if [ "$LENYA_LIB" = "" ] ; then
-  LENYA_LIB="$LENYA_WEBAPP_HOME/WEB-INF/lib"
-fi
-
-if [ "$JETTY_PORT" = "" ] ; then
-  JETTY_PORT='8888'
-fi
-
-if [ "$JETTY_ADMIN_PORT" = "" ] ; then
-  JETTY_ADMIN_PORT='8889'
-fi
-
-if [ "$JAVA_DEBUG_ARGS" = "" ] ; then
-  JAVA_DEBUG_ARGS='-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n'
-fi
-
-if [ "$JAVA_PROFILE_ARGS" = "" ] ; then
-  JAVA_PROFILE_ARGS='-Xrunhprof:heap=all,cpu=samples,thread=y,depth=3'
-fi
-
-
-# ----- Set platform specific variables
-
-PATHSEP=":";
-case "`uname`" in
-   CYGWIN*) PATHSEP=";" ;;
-esac
-
-# ----- Set Local Variables ( used to minimize cut/paste) ---------------------
-
-JAVA="$JAVA_HOME/bin/java"
-ENDORSED_LIBS="$LENYA_LIB/endorsed"
-ENDORSED="-Djava.endorsed.dirs=$ENDORSED_LIBS"
-PARSER=-Dorg.xml.sax.parser=org.apache.xerces.parsers.SAXParser
-LOADER=Loader
-LOADER_LIB="${LENYA_HOME}/tools/loader"
-
-CLI=-Dloader.main.class=org.apache.lenya.Main
-CLI_LIBRARIES="-Dloader.jar.repositories=$LENYA_LIB"
-
-JETTY=-Dloader.main.class=org.mortbay.jetty.Server
-JETTY_CONF="$LENYA_HOME/tools/jetty/conf"
-JETTY_MAIN="$JETTY_CONF/main.xml"
-JETTY_ADMIN="$JETTY_CONF/admin.xml"
-JETTY_WEBAPP="-Dwebapp=$LENYA_WEBAPP_HOME"
-JETTY_HOME="-Dhome=$LENYA_HOME"
-JETTY_PORT_ARGS="-Djetty.port=$JETTY_PORT"
-JETTY_ADMIN_ARGS="-Djetty.admin.port=$JETTY_ADMIN_PORT"
-JETTY_LIBRARIES="-Dloader.jar.repositories=$LENYA_HOME/tools/jetty/lib${PATHSEP}${ENDORSED_LIBS}"
-
-# ----- Do the action ----------------------------------------------------------
-
-if [ -d build ]; then
-    echo "INFO: build/lenya/webapp directory already exists."
-else
-    if [ -f lenya.war ]; then
-        echo "INFO: lenya.war will be unpacked ..."
-        mkdir -p build/lenya/webapp
-        cp lenya.war build/lenya/webapp/.
-        cd build/lenya/webapp
-        $JAVA_HOME/bin/jar -xf lenya.war
-        cd ../../..
-        mkdir -p build/lenya/webapp/WEB-INF/logs
-        rm build/lenya/webapp/lenya.war
-    else
-        echo "INFO: No such war file lenya.war or build directory!"
-        exit 1
-    fi
-fi
-
-case "$ACTION" in
-  cli)
-        $JAVA $JAVA_OPTIONS -cp $LOADER_LIB $ENDORSED $CLI_LIBRARIES $CLI $LOADER $ARGS
-        ;;
-
-  servlet)
-        $JAVA $JAVA_OPTIONS -cp $LOADER_LIB $ENDORSED $PARSER $JETTY_PORT_ARGS $JETTY_LIBRARIES $JETTY_WEBAPP $JETTY_HOME $JETTY $LOADER $JETTY_MAIN
-        ;;
-
-  servlet-admin)
-        $JAVA $JAVA_OPTIONS -cp $LOADER_LIB $ENDORSED $PARSER $JETTY_PORT_ARGS $JETTY_ADMIN_ARGS $JETTY_LIBRARIES $JETTY_WEBAPP $JETTY_HOME $JETTY $LOADER $JETTY_MAIN $JETTY_ADMIN
-        ;;
-
-  servlet-debug)
-        $JAVA $JAVA_OPTIONS $JAVA_DEBUG_ARGS -cp $LOADER_LIB $ENDORSED $PARSER $JETTY_PORT_ARGS $JETTY_LIBRARIES $JETTY_WEBAPP $JETTY_HOME $JETTY $LOADER $JETTY_MAIN
-        ;;
-
-  servlet-profile)
-        $JAVA $JAVA_OPTIONS $JAVA_PROFILE_ARGS -cp $LOADER_LIB $ENDORSED $PARSER $JETTY_ARGS $JETTY_LIBRARIES $JETTY_WEBAPP $JETTY_HOME $JETTY $LOADER $JETTY_MAIN
-        ;;
-
-  *)
-        usage
-        ;;
-esac
-
-exit 0
diff --git a/lenya/modules/bxe/resources/misc/content-namespaces.xml b/lenya/modules/bxe/resources/misc/content-namespaces.xml
new file mode 100644
index 0000000..1ca8697
--- /dev/null
+++ b/lenya/modules/bxe/resources/misc/content-namespaces.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<!-- $Id: content-namespaces.xml 56193 2004-11-01 03:51:25Z gregor $ -->
+
+<namespaces>
+  <xmlns>xhtml=http://www.w3.org/1999/xhtml</xmlns>
+  <xmlns>lenya=http://apache.org/cocoon/lenya/page-envelope/1.0</xmlns>
+  <xmlns>dc=http://purl.org/dc/elements/1.1/</xmlns>
+  <xmlns>dcterms=http://purl.org/dc/terms/</xmlns>
+  <xmlns>forrest=http://forrest.apache.org/dtd/document-v20/</xmlns>
+</namespaces>
diff --git a/lib/commons-codec-1.3.jar b/lib/commons-codec-1.3.jar
deleted file mode 100644
index 957b675..0000000
--- a/lib/commons-codec-1.3.jar
+++ /dev/null
Binary files differ
diff --git a/lib/commons-io-1.0.jar b/lib/commons-io-1.0.jar
deleted file mode 100644
index d521aa5..0000000
--- a/lib/commons-io-1.0.jar
+++ /dev/null
Binary files differ
diff --git a/lib/excalibur-testcase-1.0.jar b/lib/excalibur-testcase-1.0.jar
deleted file mode 100644
index 90f651b..0000000
--- a/lib/excalibur-testcase-1.0.jar
+++ /dev/null
Binary files differ
diff --git a/lib/jcifs-mock.jar b/lib/jcifs-mock.jar
deleted file mode 100644
index 2a5fdd3..0000000
--- a/lib/jcifs-mock.jar
+++ /dev/null
Binary files differ
diff --git a/lib/jing-20030619.jar b/lib/jing-20030619.jar
deleted file mode 100644
index 6acbfb0..0000000
--- a/lib/jing-20030619.jar
+++ /dev/null
Binary files differ
diff --git a/lib/junit-3.8.1.jar b/lib/junit-3.8.1.jar
deleted file mode 100644
index 674d71e..0000000
--- a/lib/junit-3.8.1.jar
+++ /dev/null
Binary files differ
diff --git a/lib/nekodtd-0.1.11.jar b/lib/nekodtd-0.1.11.jar
deleted file mode 100644
index 96e0c30..0000000
--- a/lib/nekodtd-0.1.11.jar
+++ /dev/null
Binary files differ
diff --git a/lib/nekopull-0.2.4.jar b/lib/nekopull-0.2.4.jar
deleted file mode 100644
index 49b7c28..0000000
--- a/lib/nekopull-0.2.4.jar
+++ /dev/null
Binary files differ
diff --git a/lib/websphinx-0.5.jar b/lib/websphinx-0.5.jar
deleted file mode 100644
index 0fefd94..0000000
--- a/lib/websphinx-0.5.jar
+++ /dev/null
Binary files differ
diff --git a/lib/xercesImpl-2.6.2.jar b/lib/xercesImpl-2.6.2.jar
deleted file mode 100644
index f0fb0e8..0000000
--- a/lib/xercesImpl-2.6.2.jar
+++ /dev/null
Binary files differ
diff --git a/lib/xml-apis.jar b/lib/xml-apis.jar
deleted file mode 100644
index 2dd8377..0000000
--- a/lib/xml-apis.jar
+++ /dev/null
Binary files differ
diff --git a/lib/xml-forrest-components.jar b/lib/xml-forrest-components.jar
deleted file mode 100644
index d10e2f8..0000000
--- a/lib/xml-forrest-components.jar
+++ /dev/null
Binary files differ
diff --git a/lib/xmldb-common-2003-09-02.jar b/lib/xmldb-common-2003-09-02.jar
deleted file mode 100644
index b9ddb3b..0000000
--- a/lib/xmldb-common-2003-09-02.jar
+++ /dev/null
Binary files differ
diff --git a/lib/xmldb-xupdate-20040205.jar b/lib/xmldb-xupdate-20040205.jar
deleted file mode 100644
index 3b7f931..0000000
--- a/lib/xmldb-xupdate-20040205.jar
+++ /dev/null
Binary files differ
diff --git a/lib/xmlunit1.0.jar b/lib/xmlunit1.0.jar
deleted file mode 100644
index 6e8ed58..0000000
--- a/lib/xmlunit1.0.jar
+++ /dev/null
Binary files differ
diff --git a/modules/xdocs/config/cocoon-xconf/module.xconf b/modules/xdocs/config/cocoon-xconf/module.xconf
new file mode 100644
index 0000000..18e59e9
--- /dev/null
+++ b/modules/xdocs/config/cocoon-xconf/module.xconf
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<!-- $Id:$ -->
+
+<xconf xpath="/cocoon/resource-types" unless="/cocoon/resource-types/component-instance[@name = 'xdocs']">
+
+  <component-instance name="xdocs"
+                      logger="lenya.resourcetypes.xdocs"
+                      class="org.apache.lenya.cms.publication.ResourceTypeImpl">
+    <schema src="fallback://lenya/modules/xdocs/resources/schemas/xdocs.rng" language="http://relaxng.org/ns/structure/0.9"/>
+    <creator src="org.apache.lenya.cms.authoring.DefaultBranchCreator">
+      <sample-name>fallback://lenya/modules/xdocs/samples/xdocs.xml</sample-name>
+    </creator>
+    <link-attribute xpath="//*[namespace-uri() = 'http://www.w3.org/1999/xhtml']/@href"/>
+    <format name="xhtml" uri="cocoon://modules/xdocs/xhtml.xml"/>
+  </component-instance>
+
+</xconf>
diff --git a/modules/xdocs/config/menus/xdocs.xsp b/modules/xdocs/config/menus/xdocs.xsp
new file mode 100644
index 0000000..ca39c9e
--- /dev/null
+++ b/modules/xdocs/config/menus/xdocs.xsp
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<!-- $Id:$ -->
+
+<xsp:page 
+    language="java" 
+    xmlns:xsp="http://apache.org/xsp"
+    xmlns:xsp-request="http://apache.org/xsp/request/2.0"
+    xmlns:input="http://apache.org/cocoon/xsp/input/1.0"
+    xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
+    xmlns:wf="http://apache.org/cocoon/lenya/workflow/1.0"
+    xmlns:uc="http://apache.org/cocoon/lenya/usecase/1.0"
+    xmlns="http://apache.org/cocoon/lenya/menubar/1.0"
+>
+
+  <xsp:structure>
+    <xsp:include>org.apache.lenya.cms.publication.Document</xsp:include>
+    <xsp:include>org.apache.lenya.cms.publication.Publication</xsp:include>
+  </xsp:structure>
+  
+  <menu>
+
+    <menus>
+      <menu i18n:attr="name" name="File">
+        <block admin="false">
+          <item uc:usecase="site.create" href="?doctype=xdocs"><i18n:text>New xdocs page</i18n:text></item>
+        </block>
+      </menu>
+      <menu i18n:attr="name" name="Edit">
+          <xsp:logic>
+            String doctype = <input:get-attribute module="page-envelope" as="string" name="document-type"/>;
+            if ("xdocs".equals(doctype)) {
+                <block info="false">
+                  <item wf:event="edit" uc:usecase="edit.bxe" href="?"><i18n:text>With BXE</i18n:text></item>
+                  <item wf:event="edit" uc:usecase="edit.oneform" href="?"><i18n:text>With one Form</i18n:text></item>
+                </block>
+            }
+          </xsp:logic>
+      </menu>
+      
+    </menus>
+    
+  </menu>
+</xsp:page>
diff --git a/modules/xdocs/menus.xmap b/modules/xdocs/menus.xmap
new file mode 100644
index 0000000..7838721
--- /dev/null
+++ b/modules/xdocs/menus.xmap
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!--
+Copyright 1999-2004 The Apache Software Foundation
+
+Licensed 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.
+-->
+
+<!-- $Id:$ -->
+
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+  
+  <map:pipelines>
+    
+    <map:pipeline>
+      
+      <map:match pattern="**">
+        <map:generate type="serverpages" src="config/menus/xdocs.xsp"/>
+        <map:serialize type="xml"/>
+      </map:match>
+      
+    </map:pipeline>
+    
+  </map:pipelines>
+</map:sitemap>
\ No newline at end of file
diff --git a/modules/xdocs/module.xml b/modules/xdocs/module.xml
new file mode 100644
index 0000000..858cd88
--- /dev/null
+++ b/modules/xdocs/module.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id: publication.xml 374687 2006-02-03 15:24:55Z michi $ -->
+
+<lenya:module xmlns:lenya="http://apache.org/lenya/module/1.0">
+  <lenya:id>org.wyona.lenya.modules.xdocs</lenya:id>
+  <lenya:package>org.wyona.lenya.modules</lenya:package>
+  <lenya:version>0.1-dev</lenya:version>
+  <lenya:name>Template/Blank Module</lenya:name>
+  <lenya:lenya-version>@lenya.version@</lenya:lenya-version>
+  <lenya:description>A template module to help create new modules from scratch</lenya:description>
+</lenya:module>
diff --git a/modules/xdocs/resources/schemas/document-v20.mod.rng b/modules/xdocs/resources/schemas/document-v20.mod.rng
new file mode 100644
index 0000000..e84e2be
--- /dev/null
+++ b/modules/xdocs/resources/schemas/document-v20.mod.rng
@@ -0,0 +1,1014 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation or its licensors,
+  as applicable.
+  
+  Licensed 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.
+-->
+<!--
+  ===================================================================
+  
+       Apache Common Documentation elements (Version 2.0)
+  
+  PURPOSE:
+    This DTD was developed to create a simple yet powerful document
+    type for software documentation for use with the Apache projects.
+  
+  TYPICAL INVOCATION:
+  
+    <!ENTITY % document PUBLIC
+        "-//APACHE//ENTITIES Documentation Vxy//EN"
+        "document-vxy.mod">
+    %document;
+  
+    where
+  
+      x := major version
+      y := minor version
+  
+  NOTES:
+  
+  FIXME:
+  
+  CHANGE HISTORY:
+  [Version 2.0a]
+    20030505  Add a meta element to the header, for generic metadata
+    20030505  Zap jump and fork, and rename 'link' to 'a' for better HTMLness
+    20030510  Fix bug which allowed nested lists like <ol><ol>. Now lists can only contain li's.
+  
+  ====================================================================
+-->
+<!-- =============================================================== -->
+<!-- Useful entities for increased DTD readability -->
+<!-- =============================================================== -->
+<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+  <define name="text">
+    <text/>
+  </define>
+  <!-- Entities referred to later on are defined up front -->
+  <define name="markup">
+    <choice>
+      <ref name="strong"/>
+      <ref name="em"/>
+      <ref name="code"/>
+      <ref name="sub"/>
+      <ref name="sup"/>
+    </choice>
+  </define>
+  <define name="special-inline">
+    <choice>
+      <ref name="br"/>
+      <ref name="img"/>
+      <ref name="icon"/>
+      <ref name="acronym"/>
+      <ref name="map"/>
+    </choice>
+  </define>
+  <define name="links">
+    <ref name="a"/>
+  </define>
+  <define name="paragraphs">
+    <choice>
+      <ref name="p"/>
+      <ref name="source"/>
+      <ref name="note"/>
+      <ref name="warning"/>
+      <ref name="fixme"/>
+    </choice>
+  </define>
+  <define name="tables">
+    <ref name="table"/>
+  </define>
+  <define name="lists">
+    <choice>
+      <ref name="ol"/>
+      <ref name="ul"/>
+      <ref name="dl"/>
+    </choice>
+  </define>
+  <define name="special-blocks">
+    <choice>
+      <ref name="figure"/>
+      <ref name="anchor"/>
+    </choice>
+  </define>
+  <!-- these are used for image maps -->
+  <define name="Shape">
+    <choice>
+      <value>rect</value>
+      <value>circle</value>
+      <value>poly</value>
+      <value>default</value>
+    </choice>
+  </define>
+  <define name="Coords">
+    <data type="string" datatypeLibrary=""/>
+  </define>
+  <!-- =============================================================== -->
+  <!-- Entities for general XML compliance -->
+  <!-- =============================================================== -->
+  <!--
+    Common attributes
+    Every element has an ID attribute (sometimes required,
+    but usually optional) for links. %common.att;
+    is for common attributes where the ID is optional, and
+    %common-idreq.att; is for common attributes where the
+    ID is required.
+  -->
+  <define name="common.att">
+    <optional>
+      <attribute name="id">
+        <data type="ID"/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="class">
+        <data type="NMTOKEN"/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="xml:lang">
+        <data type="NMTOKEN"/>
+      </attribute>
+    </optional>
+  </define>
+  <define name="common-idreq.att">
+    <attribute name="id">
+      <data type="ID"/>
+    </attribute>
+    <optional>
+      <attribute name="class">
+        <data type="NMTOKEN"/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="xml:lang">
+        <data type="NMTOKEN"/>
+      </attribute>
+    </optional>
+  </define>
+  <!--
+    xml:space attribute ===============================================
+            Indicates that the element contains white space
+            that the formatter or other application should retain,
+            as appropriate to its function.
+    ====================================================================
+  -->
+  <define name="xmlspace.att">
+    <optional>
+      <attribute name="xml:space" a:defaultValue="preserve">
+        <value>preserve</value>
+      </attribute>
+    </optional>
+  </define>
+  <!--
+    def attribute =====================================================
+            Points to the element where the relevant definition can be
+            found, using the IDREF mechanism.  %def.att; is for optional
+            def attributes, and %def-req.att; is for required def
+            attributes.
+    ====================================================================
+  -->
+  <!--
+    ref attribute =====================================================
+            Points to the element where more information can be found,
+            using the IDREF mechanism.  %ref.att; is for optional
+            ref attributes, and %ref-req.att; is for required ref
+            attributes.
+    ==================================================================
+  -->
+  <!-- =============================================================== -->
+  <!-- Entities for general usage -->
+  <!-- =============================================================== -->
+  <!--
+    Key attribute =====================================================
+            Optionally provides a sorting or indexing key, for cases when
+            the element content is inappropriate for this purpose.
+    ====================================================================
+  -->
+  <!--
+    Title attributes ==================================================
+            Indicates that the element requires to have a title attribute.
+    ====================================================================
+  -->
+  <!--
+    Name attributes ==================================================
+            Indicates that the element requires to have a name attribute.
+    ====================================================================
+  -->
+  <define name="name.att">
+    <attribute name="name"/>
+  </define>
+  <!--
+    Email attributes ==================================================
+            Indicates that the element requires to have an email attribute.
+    ====================================================================
+  -->
+  <define name="email.att">
+    <attribute name="email"/>
+  </define>
+  <!--
+    Link attributes ===================================================
+            Indicates that the element requires to have hyperlink attributes.
+    ====================================================================
+  -->
+  <define name="link.att">
+    <attribute name="href"/>
+    <optional>
+      <attribute name="title"/>
+    </optional>
+  </define>
+  <!-- =============================================================== -->
+  <!-- General definitions -->
+  <!-- =============================================================== -->
+  <!-- A person is a general unparsed human entity -->
+  <define name="person">
+    <element name="person">
+      <ref name="person.attlist"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="person.attlist" combine="interleave">
+    <ref name="common.att"/>
+    <ref name="name.att"/>
+    <ref name="email.att"/>
+  </define>
+  <!-- =============================================================== -->
+  <!-- Content definitions -->
+  <!-- =============================================================== -->
+  <define name="local.inline">
+    <notAllowed/>
+  </define>
+  <define name="link-content.mix">
+    <choice>
+      <ref name="text"/>
+      <ref name="markup"/>
+      <ref name="special-inline"/>
+      <!--<ref name="local.inline"/>-->
+    </choice>
+  </define>
+  <define name="content.mix">
+    <choice>
+      <ref name="link-content.mix"/>
+      <ref name="links"/>
+    </choice>
+  </define>
+  <!-- ==================================================== -->
+  <!-- Phrase Markup -->
+  <!-- ==================================================== -->
+  <!-- Strong (typically bold) -->
+  <define name="strong">
+    <element name="strong">
+      <ref name="strong.attlist"/>
+      <zeroOrMore>
+        <ref name="content.mix"/>
+      </zeroOrMore>
+    </element>
+  </define>
+  <define name="strong.attlist" combine="interleave">
+    <ref name="common.att"/>
+  </define>
+  <!-- Emphasis (typically italic) -->
+  <define name="em">
+    <element name="em">
+      <ref name="em.attlist"/>
+      <zeroOrMore>
+        <ref name="content.mix"/>
+      </zeroOrMore>
+    </element>
+  </define>
+  <define name="em.attlist" combine="interleave">
+    <ref name="common.att"/>
+  </define>
+  <!-- Code (typically monospaced) -->
+  <define name="code">
+    <element name="code">
+      <ref name="code.attlist"/>
+      <ref name="text"/>
+    </element>
+  </define>
+  <define name="code.attlist" combine="interleave">
+    <ref name="common.att"/>
+  </define>
+  <!-- Superscript (typically smaller and higher) -->
+  <define name="sup">
+    <element name="sup">
+      <ref name="sup.attlist"/>
+      <ref name="text"/>
+    </element>
+  </define>
+  <define name="sup.attlist" combine="interleave">
+    <ref name="common.att"/>
+  </define>
+  <!-- Subscript (typically smaller and lower) -->
+  <define name="sub">
+    <element name="sub">
+      <ref name="sub.attlist"/>
+      <ref name="text"/>
+    </element>
+  </define>
+  <define name="sub.attlist" combine="interleave">
+    <ref name="common.att"/>
+  </define>
+  <!-- ==================================================== -->
+  <!-- Hypertextual Links -->
+  <!-- ==================================================== -->
+  <!-- hyperlink (equivalent of <a ...>) -->
+  <!-- http://www.w3.org/TR/xhtml2/mod-hypertext.html#s_hypertextmodule -->
+  <define name="a">
+    <element name="a">
+      <ref name="a.attlist"/>
+      <zeroOrMore>
+        <ref name="link-content.mix"/>
+      </zeroOrMore>
+    </element>
+  </define>
+  <define name="a.attlist" combine="interleave">
+    <ref name="common.att"/>
+    <ref name="link.att"/>
+  </define>
+  <!-- ==================================================== -->
+  <!-- Specials -->
+  <!-- ==================================================== -->
+  <!-- Breakline Object (typically forces line break) -->
+  <define name="br">
+    <element name="br">
+      <ref name="br.attlist"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="br.attlist" combine="interleave">
+    <ref name="common.att"/>
+  </define>
+  <!-- Image Object (typically an inlined image) -->
+  <define name="img">
+    <element name="img">
+      <ref name="img.attlist"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="img.attlist" combine="interleave">
+    <attribute name="src"/>
+    <attribute name="alt"/>
+    <optional>
+      <attribute name="height"/>
+    </optional>
+    <optional>
+      <attribute name="width"/>
+    </optional>
+    <optional>
+      <attribute name="usemap"/>
+    </optional>
+    <optional>
+      <attribute name="ismap">
+        <choice>
+          <value>ismap</value>
+        </choice>
+      </attribute>
+    </optional>
+    <ref name="common.att"/>
+  </define>
+  <!-- support the img usemap attribute -->
+  <define name="map">
+    <element name="map">
+      <ref name="map.attlist"/>
+      <oneOrMore>
+        <ref name="area"/>
+      </oneOrMore>
+    </element>
+  </define>
+  <define name="map.attlist" combine="interleave">
+    <optional>
+      <attribute name="name"/>
+    </optional>
+  </define>
+  <define name="area">
+    <element name="area">
+      <ref name="area.attlist"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="area.attlist" combine="interleave">
+    <optional>
+      <attribute name="shape" a:defaultValue="rect">
+        <ref name="Shape"/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="coords">
+        <ref name="Coords"/>
+      </attribute>
+    </optional>
+    <ref name="link.att"/>
+    <optional>
+      <attribute name="nohref">
+        <choice>
+          <value>nohref</value>
+        </choice>
+      </attribute>
+    </optional>
+    <attribute name="alt"/>
+  </define>
+  <!-- Image Icon (typically an inlined image placed as graphical item) -->
+  <define name="icon">
+    <element name="icon">
+      <ref name="icon.attlist"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="icon.attlist" combine="interleave">
+    <attribute name="src"/>
+    <attribute name="alt"/>
+    <optional>
+      <attribute name="height"/>
+    </optional>
+    <optional>
+      <attribute name="width"/>
+    </optional>
+    <ref name="common.att"/>
+  </define>
+  <!-- Acronym (in modern browsers, will have rollover text) -->
+  <define name="acronym">
+    <element name="acronym">
+      <ref name="acronym.attlist"/>
+      <zeroOrMore>
+        <ref name="text"/>
+      </zeroOrMore>
+    </element>
+  </define>
+  <define name="acronym.attlist" combine="interleave">
+    <attribute name="title"/>
+    <ref name="common.att"/>
+  </define>
+  <!-- =============================================================== -->
+  <!-- Blocks definitions -->
+  <!-- =============================================================== -->
+  <define name="local.blocks">
+    <notAllowed/>
+  </define>
+  <define name="blocks">
+    <choice>
+      <ref name="paragraphs"/>
+      <ref name="tables"/>
+      <ref name="lists"/>
+      <ref name="special-blocks"/>
+      <!--<ref name="local.blocks"/>-->
+    </choice>
+  </define>
+  <!-- Flow mixes block and inline -->
+  <define name="flow">
+    <choice>
+      <ref name="content.mix"/>
+      <ref name="blocks"/>
+    </choice>
+  </define>
+  <!-- ==================================================== -->
+  <!-- Paragraphs -->
+  <!-- ==================================================== -->
+  <!-- Text Paragraph (normally vertically space delimited. Space can be preserved.) -->
+  <define name="p">
+    <element name="p">
+      <ref name="p.attlist"/>
+      <zeroOrMore>
+        <ref name="content.mix"/>
+      </zeroOrMore>
+    </element>
+  </define>
+  <define name="p.attlist" combine="interleave">
+    <ref name="common.att"/>
+    <optional>
+      <attribute name="xml:space">
+        <choice>
+          <value>default</value>
+          <value>preserve</value>
+        </choice>
+      </attribute>
+    </optional>
+  </define>
+  <!-- Source Paragraph (normally space is preserved) -->
+  <define name="source">
+    <element name="source">
+      <ref name="source.attlist"/>
+      <zeroOrMore>
+        <ref name="content.mix"/>
+      </zeroOrMore>
+    </element>
+  </define>
+  <define name="source.attlist" combine="interleave">
+    <ref name="common.att"/>
+    <ref name="xmlspace.att"/>
+  </define>
+  <!-- Note Paragraph (normally shown encapsulated) -->
+  <define name="note">
+    <element name="note">
+      <ref name="note.attlist"/>
+      <zeroOrMore>
+        <ref name="content.mix"/>
+      </zeroOrMore>
+    </element>
+  </define>
+  <define name="note.attlist" combine="interleave">
+    <optional>
+      <attribute name="label"/>
+    </optional>
+    <ref name="common.att"/>
+  </define>
+  <!-- Warning Paragraph (normally shown with eye-catching colors) -->
+  <define name="warning">
+    <element name="warning">
+      <ref name="warning.attlist"/>
+      <zeroOrMore>
+        <ref name="content.mix"/>
+      </zeroOrMore>
+    </element>
+  </define>
+  <define name="warning.attlist" combine="interleave">
+    <optional>
+      <attribute name="label"/>
+    </optional>
+    <ref name="common.att"/>
+  </define>
+  <!-- Fixme Paragraph (normally not shown) -->
+  <define name="fixme">
+    <element name="fixme">
+      <ref name="fixme.attlist"/>
+      <zeroOrMore>
+        <ref name="content.mix"/>
+      </zeroOrMore>
+    </element>
+  </define>
+  <define name="fixme.attlist" combine="interleave">
+    <attribute name="author"/>
+    <ref name="common.att"/>
+  </define>
+  <!-- ==================================================== -->
+  <!-- Tables -->
+  <!-- ==================================================== -->
+  <!-- Attributes that indicate the spanning of the table cell -->
+  <define name="cell.span">
+    <optional>
+      <attribute name="colspan" a:defaultValue="1"/>
+    </optional>
+    <optional>
+      <attribute name="rowspan" a:defaultValue="1"/>
+    </optional>
+  </define>
+  <!-- Table element -->
+  <define name="table">
+    <element name="table">
+      <ref name="table.attlist"/>
+      <optional>
+        <ref name="caption"/>
+      </optional>
+      <oneOrMore>
+        <ref name="tr"/>
+      </oneOrMore>
+    </element>
+  </define>
+  <define name="table.attlist" combine="interleave">
+    <ref name="common.att"/>
+  </define>
+  <!-- The table title -->
+  <define name="caption">
+    <element name="caption">
+      <ref name="caption.attlist"/>
+      <zeroOrMore>
+        <ref name="content.mix"/>
+      </zeroOrMore>
+    </element>
+  </define>
+  <define name="caption.attlist" combine="interleave">
+    <ref name="common.att"/>
+  </define>
+  <!-- The table row element -->
+  <define name="tr">
+    <element name="tr">
+      <ref name="tr.attlist"/>
+      <oneOrMore>
+        <choice>
+          <ref name="th"/>
+          <ref name="td"/>
+        </choice>
+      </oneOrMore>
+    </element>
+  </define>
+  <define name="tr.attlist" combine="interleave">
+    <ref name="common.att"/>
+  </define>
+  <!-- The table row header element -->
+  <define name="th">
+    <element name="th">
+      <ref name="th.attlist"/>
+      <zeroOrMore>
+        <ref name="flow"/>
+      </zeroOrMore>
+    </element>
+  </define>
+  <define name="th.attlist" combine="interleave">
+    <ref name="common.att"/>
+    <ref name="cell.span"/>
+  </define>
+  <!-- The table row description element -->
+  <define name="td">
+    <element name="td">
+      <ref name="td.attlist"/>
+      <zeroOrMore>
+        <ref name="flow"/>
+      </zeroOrMore>
+    </element>
+  </define>
+  <define name="td.attlist" combine="interleave">
+    <ref name="common.att"/>
+    <ref name="cell.span"/>
+  </define>
+  <!-- ==================================================== -->
+  <!-- Lists -->
+  <!-- ==================================================== -->
+  <!-- List item -->
+  <define name="li">
+    <element name="li">
+      <ref name="li.attlist"/>
+      <zeroOrMore>
+        <ref name="flow"/>
+      </zeroOrMore>
+    </element>
+  </define>
+  <define name="li.attlist" combine="interleave">
+    <ref name="common.att"/>
+  </define>
+  <!-- Unordered list (typically bulleted) -->
+  <define name="ul">
+    <element name="ul">
+      <ref name="ul.attlist"/>
+      <oneOrMore>
+        <ref name="li"/>
+      </oneOrMore>
+    </element>
+  </define>
+  <!--
+    spacing attribute:
+    Use "normal" to get normal vertical spacing for items;
+    use "compact" to get less spacing.  The default is dependent
+    on the stylesheet.
+  -->
+  <define name="ul.attlist" combine="interleave">
+    <ref name="common.att"/>
+    <optional>
+      <attribute name="spacing">
+        <choice>
+          <value>normal</value>
+          <value>compact</value>
+        </choice>
+      </attribute>
+    </optional>
+  </define>
+  <!-- Ordered list (typically numbered) -->
+  <define name="ol">
+    <element name="ol">
+      <ref name="ol.attlist"/>
+      <oneOrMore>
+        <ref name="li"/>
+      </oneOrMore>
+    </element>
+  </define>
+  <!--
+    spacing attribute:
+    Use "normal" to get normal vertical spacing for items;
+    use "compact" to get less spacing.  The default is dependent
+    on the stylesheet.
+  -->
+  <define name="ol.attlist" combine="interleave">
+    <ref name="common.att"/>
+    <optional>
+      <attribute name="spacing">
+        <choice>
+          <value>normal</value>
+          <value>compact</value>
+        </choice>
+      </attribute>
+    </optional>
+  </define>
+  <!-- Definition list (typically two-column) -->
+  <define name="dl">
+    <element name="dl">
+      <ref name="dl.attlist"/>
+      <oneOrMore>
+        <ref name="dt"/>
+        <ref name="dd"/>
+      </oneOrMore>
+    </element>
+  </define>
+  <define name="dl.attlist" combine="interleave">
+    <ref name="common.att"/>
+  </define>
+  <!-- Definition term -->
+  <define name="dt">
+    <element name="dt">
+      <ref name="dt.attlist"/>
+      <zeroOrMore>
+        <ref name="content.mix"/>
+      </zeroOrMore>
+    </element>
+  </define>
+  <define name="dt.attlist" combine="interleave">
+    <ref name="common.att"/>
+  </define>
+  <!-- Definition description -->
+  <define name="dd">
+    <element name="dd">
+      <ref name="dd.attlist"/>
+      <zeroOrMore>
+        <ref name="flow"/>
+      </zeroOrMore>
+    </element>
+  </define>
+  <define name="dd.attlist" combine="interleave">
+    <ref name="common.att"/>
+  </define>
+  <!-- ==================================================== -->
+  <!-- Special Blocks -->
+  <!-- ==================================================== -->
+  <!-- Image Block (typically a separated and centered image) -->
+  <define name="figure">
+    <element name="figure">
+      <ref name="figure.attlist"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="figure.attlist" combine="interleave">
+    <attribute name="src"/>
+    <attribute name="alt"/>
+    <optional>
+      <attribute name="height"/>
+    </optional>
+    <optional>
+      <attribute name="width"/>
+    </optional>
+    <optional>
+      <attribute name="usemap"/>
+    </optional>
+    <optional>
+      <attribute name="ismap">
+        <choice>
+          <value>ismap</value>
+        </choice>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="align"/>
+    </optional>
+    <ref name="common.att"/>
+  </define>
+  <!-- anchor point (equivalent of <a name="...">, typically not rendered) -->
+  <define name="anchor">
+    <element name="anchor">
+      <ref name="anchor.attlist"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="anchor.attlist" combine="interleave">
+    <ref name="common-idreq.att"/>
+  </define>
+  <!-- =============================================================== -->
+  <!-- Document -->
+  <!-- =============================================================== -->
+  <define name="document">
+    <element name="document">
+      <ref name="document.attlist"/>
+      <ref name="header"/>
+      <ref name="body"/>
+      <optional>
+        <ref name="footer"/>
+      </optional>
+    </element>
+  </define>
+  <define name="document.attlist" combine="interleave">
+    <ref name="common.att"/>
+  </define>
+  <!-- ==================================================== -->
+  <!-- Header -->
+  <!-- ==================================================== -->
+  <define name="local.headers">
+    <empty/>
+  </define>
+  <define name="header">
+    <element name="header">
+      <ref name="header.attlist"/>
+      <ref name="title"/>
+      <optional>
+        <ref name="subtitle"/>
+      </optional>
+      <optional>
+        <ref name="version"/>
+      </optional>
+      <optional>
+        <ref name="type"/>
+      </optional>
+      <optional>
+        <ref name="authors"/>
+      </optional>
+      <zeroOrMore>
+        <ref name="notice"/>
+      </zeroOrMore>
+      <optional>
+        <ref name="abstract"/>
+      </optional>
+      <zeroOrMore>
+        <ref name="meta"/>
+      </zeroOrMore>
+      <ref name="local.headers"/>
+    </element>
+  </define>
+  <define name="header.attlist" combine="interleave">
+    <ref name="common.att"/>
+  </define>
+  <define name="title">
+    <element name="title">
+      <ref name="title.attlist"/>
+      <zeroOrMore>
+        <choice>
+          <ref name="text"/>
+          <ref name="markup"/>
+          <ref name="links"/>
+          <ref name="special-inline"/>
+        </choice>
+      </zeroOrMore>
+    </element>
+  </define>
+  <define name="title.attlist" combine="interleave">
+    <ref name="common.att"/>
+  </define>
+  <define name="subtitle">
+    <element name="subtitle">
+      <ref name="subtitle.attlist"/>
+      <zeroOrMore>
+        <choice>
+          <ref name="text"/>
+          <ref name="markup"/>
+        </choice>
+      </zeroOrMore>
+    </element>
+  </define>
+  <define name="subtitle.attlist" combine="interleave">
+    <ref name="common.att"/>
+  </define>
+  <define name="version">
+    <element name="version">
+      <ref name="version.attlist"/>
+      <ref name="text"/>
+    </element>
+  </define>
+  <define name="version.attlist" combine="interleave">
+    <ref name="common.att"/>
+    <optional>
+      <attribute name="major"/>
+    </optional>
+    <optional>
+      <attribute name="minor"/>
+    </optional>
+    <optional>
+      <attribute name="fix"/>
+    </optional>
+    <optional>
+      <attribute name="tag"/>
+    </optional>
+  </define>
+  <define name="type">
+    <element name="type">
+      <ref name="type.attlist"/>
+      <ref name="text"/>
+    </element>
+  </define>
+  <define name="type.attlist" combine="interleave">
+    <ref name="common.att"/>
+  </define>
+  <define name="authors">
+    <element name="authors">
+      <ref name="authors.attlist"/>
+      <oneOrMore>
+        <ref name="person"/>
+      </oneOrMore>
+    </element>
+  </define>
+  <define name="authors.attlist" combine="interleave">
+    <ref name="common.att"/>
+  </define>
+  <define name="notice">
+    <element name="notice">
+      <ref name="notice.attlist"/>
+      <zeroOrMore>
+        <ref name="content.mix"/>
+      </zeroOrMore>
+    </element>
+  </define>
+  <define name="notice.attlist" combine="interleave">
+    <ref name="common.att"/>
+  </define>
+  <define name="abstract">
+    <element name="abstract">
+      <ref name="abstract.attlist"/>
+      <zeroOrMore>
+        <ref name="content.mix"/>
+      </zeroOrMore>
+    </element>
+  </define>
+  <define name="abstract.attlist" combine="interleave">
+    <ref name="common.att"/>
+  </define>
+  <!-- See http://www.w3.org/TR/xhtml2/mod-meta.html#s_metamodule -->
+  <define name="meta">
+    <element name="meta">
+      <ref name="meta.attlist"/>
+      <text/>
+    </element>
+  </define>
+  <define name="meta.attlist" combine="interleave">
+    <attribute name="name">
+      <data type="NMTOKEN"/>
+    </attribute>
+    <ref name="common.att"/>
+  </define>
+  <!-- ==================================================== -->
+  <!-- Body -->
+  <!-- ==================================================== -->
+  <define name="local.sections">
+    <notAllowed/>
+  </define>
+  <define name="sections">
+    <choice>
+      <ref name="section"/>
+      <!--<ref name="local.sections"/>-->
+    </choice>
+  </define>
+  <define name="body">
+    <element name="body">
+      <ref name="body.attlist"/>
+      <oneOrMore>
+        <choice>
+          <ref name="sections"/>
+          <ref name="blocks"/>
+        </choice>
+      </oneOrMore>
+    </element>
+  </define>
+  <define name="body.attlist" combine="interleave">
+    <ref name="common.att"/>
+  </define>
+  <define name="section">
+    <element name="section">
+      <ref name="section.attlist"/>
+      <ref name="title"/>
+      <zeroOrMore>
+        <choice>
+          <ref name="sections"/>
+          <ref name="blocks"/>
+        </choice>
+      </zeroOrMore>
+    </element>
+  </define>
+  <define name="section.attlist" combine="interleave">
+    <ref name="common.att"/>
+  </define>
+  <!-- ==================================================== -->
+  <!-- Footer -->
+  <!-- ==================================================== -->
+  <define name="local.footers">
+    <notAllowed/>
+  </define>
+  <define name="footer">
+    <element name="footer">
+      <ref name="footer.attlist"/>
+      <choice>
+        <ref name="legal"/>
+        <!--<ref name="local.footers"/>-->
+      </choice>
+    </element>
+  </define>
+  <define name="footer.attlist" combine="interleave">
+    <empty/>
+  </define>
+  <define name="legal">
+    <element name="legal">
+      <ref name="legal.attlist"/>
+      <zeroOrMore>
+        <ref name="content.mix"/>
+      </zeroOrMore>
+    </element>
+  </define>
+  <define name="legal.attlist" combine="interleave">
+    <ref name="common.att"/>
+  </define>
+</grammar>
+<!-- =============================================================== -->
+<!-- End of DTD -->
+<!-- =============================================================== -->
diff --git a/modules/xdocs/resources/schemas/xdocs.rng b/modules/xdocs/resources/schemas/xdocs.rng
new file mode 100644
index 0000000..404e6ca
--- /dev/null
+++ b/modules/xdocs/resources/schemas/xdocs.rng
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation or its licensors,
+  as applicable.
+  
+  Licensed 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.
+-->
+<!--
+  ===================================================================
+  
+       Apache Documentation DTD (Version 2.0)
+  
+  PURPOSE:
+    This DTD was developed to create a simple yet powerful document
+    type for software documentation for use with the Apache projects.
+    It is an XML-compliant DTD and it's maintained by the Apache XML
+    project.
+  
+    The v2.x series of this DTD is an evolution of the 1.x series, incorporating
+    lessons learned. Various new much-needed elements have been added, some unused
+    features removed, and some renamed (link -> a). 2.x is not
+    backwards-compatible, although a stylesheet can probably do the conversion.
+  
+  TYPICAL INVOCATION:
+  
+    <!DOCTYPE document PUBLIC
+         "-//APACHE//DTD Documentation V2.1a//EN"
+         "document-vxy.dtd">
+  
+    where
+  
+      x := major version
+      y := minor version
+  
+  NOTES:
+    Many of the design patterns used in this DTD were take from the
+    W3C XML Specification DTD edited by Eve Maler <elm@arbortext.com>.
+  
+    Where possible, great care has been used to reuse HTML tag
+    names to reduce learning efforts and to allow HTML editors to be
+    used for complex authorings like tables and lists.
+  
+  EXTENSIBILITY:
+    This DTD includes several empty placeholders that can be used to
+    extend it. These placeholders are implemented with empty entities. Here
+    is the list of those empty entities and what they are used for:
+  
+      - local.inline: this entity should contain extended definitions of
+                      elements that can be used 'inline', or directly inside
+                      the content. An example for this entity could be
+  
+                          <!ENTITY % local.inline "|citation">
+  
+      - local.blocks: this entity should contain extended definitions of
+                      elements that behave as 'blocks', thus can be visually
+                      rendered as areas on the canvas. An example for this
+                      entity could be:
+  
+                          <!ENTITY % local.blocks "|poem">
+  
+      - local.sections: this entity should contain extended definitions of
+                        elements that behave as 'sections', thus can be considered
+                        containers of block-level elements. An example for
+                        this entity could be:
+  
+                          <!ENTITY % local.sections "|chapter">
+  
+      - local.headers: this entity should contain extended definitions of
+                       elements that behave as parts of the document header.
+                       An example for this header could be:
+  
+                          <!ENTITY % local.headers ", notes?">
+  
+      - local.footers: this entity should contain extended definitions of
+                       elements that behave as parts of the document footer.
+                       An example for this header could be:
+  
+                          <!ENTITY % local.footers ", annotations*">
+  
+  ====================================================================
+-->
+<!-- =============================================================== -->
+<!-- Include the Common ISO Character Entity Sets -->
+<!-- =============================================================== -->
+<!-- =============================================================== -->
+<!-- Document -->
+<!-- =============================================================== -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+  <start>
+    <ref name="document"/>
+  </start>
+  <include href="fallback://lenya/modules/xdocs/resources/schemas/document-v20.mod.rng"/>
+</grammar>
+<!-- =============================================================== -->
+<!-- End of DTD -->
+<!-- =============================================================== -->
diff --git a/modules/xdocs/samples/xdocs.xml b/modules/xdocs/samples/xdocs.xml
new file mode 100644
index 0000000..783be24
--- /dev/null
+++ b/modules/xdocs/samples/xdocs.xml
@@ -0,0 +1,407 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2005 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  Licensed 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.
+-->
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+<document> 
+  <header> 
+    <title>The Apache Forrest xdocs document-v2.0 DTD</title> 
+    <notice>The content of this document doesn't make any sense at all.</notice>
+    <abstract>This is a demonstration document using all possible elements in
+      the current Apache Forrest xdocs <code>document-v20.dtd</code>
+    </abstract> 
+  </header> 
+  <body> 
+    <note>
+      This is a demonstration document using all possible elements in the
+      current Apache Forrest xdocs <code>document-v20.dtd</code>
+      (See the <a href="#changes">DTD changes</a> section at the bottom.)
+    </note>
+    <section id="sample">
+      <title>Sample Content</title>
+      <p><strong>Hint:</strong> See the xml source to see how the various
+      elements are used and see the
+<!-- FOR-321 workaround
+      <a href="ext:dtd-docs">DTD reference documentation</a>.
+-->
+      <a href="http://forrest.apache.org/docs/dtd-docs.html">DTD reference documentation</a>.
+      </p>
+      <section id="block-inline">
+        <title>Block and inline elements</title>
+      <p>This is a simple paragraph. Most documents contain a fair amount of
+        paragraphs. Paragraphs are called <code>&lt;p&gt;</code>.</p> 
+      <p xml:space="preserve"
+        >With the <code>&lt;p xml:space="preserve"&gt;</code> attribute, you can declare
+        that whitespace should    be   preserved, without implying it is in any other
+        way special.</p>
+      <p>
+        This next paragraph has a class attribute of 'quote'.  CSS can
+        be used to present this <code>&lt;p class='quote'&gt;</code> in
+        a different style than the other paragraphs.  The handling of
+        this quoted paragraph is defined in the &lt;extra-css&gt;
+        element in the skinconf.xml.
+      </p>
+      <p class="quote">
+        Anyway, like I was sayin', shrimp is the fruit of the sea. You can
+        barbecue it, boil it, broil it, bake it, sautee it. Dey's uh,
+        shrimp-kabobs, shrimp creole, shrimp gumbo. Pan fried, deep fried,
+        stir-fried. There's pineapple shrimp, lemon shrimp, coconut shrimp,
+        pepper shrimp, shrimp soup, shrimp stew, shrimp salad, shrimp and
+        potatoes, shrimp burger, shrimp sandwich. That- that's about it.
+      </p>
+      <p>A number of in-line elements are available in the DTD, we will show them
+        inside an unordered list (<code>&lt;ul&gt;</code>):</p> 
+      <ul> 
+        <li>Here is a simple list item (<code>&lt;li&gt;</code>).</li> 
+        <li>Have you seen the use of the <code>&lt;code&gt;</code> element in the
+          previous item?</li> 
+        <li>Also, we have <code>&lt;sub&gt;</code> and <code>&lt;sup&gt;</code>
+          elements to show content <sup>above</sup> or <sub>below</sub> the text
+          baseline.</li> 
+        <li>There is a facility to <em>emphasize</em> certain words using the
+          <code>&lt;em&gt;</code> <strong><code>&lt;strong&gt;</code></strong>
+          elements.</li> 
+        <li>We can use
+          <icon height="22" width="26" src="../images/icon.png" alt="feather"/>
+          <code>&lt;icon&gt;</code>s too.</li> 
+        <li>Another possibility is the <code>&lt;img&gt;</code> element:
+          <img src="../images/icon.png" alt="another feather" height="22" width="26"/>,
+          which offers the ability to refer to an image map.</li> 
+        <li>We have elements for hyperlinking: 
+          <dl> 
+            <dt><code>&lt;a href="faq.html"&gt;</code></dt> 
+            <dd>Use this to
+              <a href="faq.html" title="Example of a document via link">link</a>
+              to another document. As per normal, this will open the new document
+              in the same browser window.</dd> 
+
+            <dt><code>&lt;a href="#section"&gt;</code></dt> 
+            <dd>Use this to
+              <a href="#section" title="Example of a document via local anchor">link</a>
+              to the named anchor in the current document.
+            </dd> 
+
+            <dt><code>&lt;a href="faq.html#forrest"&gt;</code></dt> 
+            <dd>Use this to
+              <a href="faq.html#forrest" title="Example of a document via link and anchor">link</a>
+              to another document and go to the named anchor. This will open
+              the new document in the same browser window.
+            </dd> 
+            <dt>Targetted window control with jump and fork.</dt> 
+            <dd>See demonstration
+             <a href="#link-class">using class attribute on links</a>.
+            </dd> 
+        </dl></li> 
+
+        <li>Oh, by the way, a definition list <code>&lt;dl&gt;</code> was used inside
+          the previous list item. We could put another 
+          <ul> 
+            <li>unordered list</li> 
+            <li>inside the list item</li> 
+          </ul>
+          <table>
+            <caption>A sample nested table</caption>
+            <tr><td>Or even tables.. </td><td>
+                <table><tr><td>inside tables..</td></tr></table>
+            </td></tr>
+            <tr><td>or inside lists, but I believe this liberty gets quickly quite
+                hairy as you see.</td></tr>
+          </table>
+        </li>
+      </ul> 
+      <p>So far for the in-line elements, let's look at some paragraph-level
+        elements.</p> 
+      <fixme author="SN">The <code>&lt;fixme&gt;</code> element is used for stuff
+        which still needs work. Mind the <code>author</code> attribute!</fixme> 
+      <note>Use the <code>&lt;note&gt;</code> element to draw attention to something, e.g. ...The <code>&lt;code&gt;</code> element is used when the author can't
+        express himself clearly using normal sentences ;-)</note>
+      <warning>Sleep deprivation can be the result of being involved in an open
+        source project. (a.k.a. the <code>&lt;warning&gt;</code> element).
+      </warning>
+      <note label="Important">If you want your own labels for notes and
+        warnings, specify them using the <code>label</code> attribute.
+      </note>
+      <p>Apart from unordered lists, we have ordered lists too, of course.</p> 
+      <ol> 
+        <li>Item 1</li> 
+        <li>Item 2</li> 
+        <li>This should be 3 if my math is still OK.</li> 
+      </ol>
+      </section>
+
+      <section id="presentations">
+        <title>Various presentation formats</title>
+
+        <p>This sample document, written in document-v20 XML can be presented
+        via Forrest in a number of different formats. The links in the
+        following list show this document in each of the currently available
+        formats.</p>
+
+        <p>Each of the formats can be made available as a link near the top of
+        the page. Actual placement of those links depends on the skin
+        currently in use. Those links are enabled in the skinconf.xml via the
+        &#60;disable-XXX-link&#62; elements in the skinconf.xml</p>
+
+        <table>
+          <tr>
+            <th>Presentation Format</th>
+
+            <th>Description</th>
+
+            <th>skinconf.xml Element</th>
+          </tr>
+
+          <tr>
+            <td><a href="sample.html">HTML</a></td>
+
+            <td>This document in HTML format. </td>
+
+            <td>Always generated by default. Cannot be turned off.</td>
+          </tr>
+
+          <tr>
+            <td><a href="sample.xml">XML</a></td>
+
+            <td>This document in its raw XML format.</td>
+
+            <td>&#60;disable-xml-link&#62;. By default, set to true, meaning
+            that this link will not be shown.</td>
+          </tr>
+
+          <tr>
+            <td><a href="sample.pdf">PDF</a></td>
+
+            <td>This document as Adobe PDF</td>
+
+            <td>&#60;disable-pdf-link&#62;. By default, set to false, meaning
+            that this link will be shown.</td>
+          </tr>
+
+          <tr>
+            <td>Text</td>
+
+            <td><p>This document as straight text.</p>
+            <p>For additional information see the Forrest text-output
+            plugin.</p></td>
+
+            <td>&#60;disable-txt-link&#62;. By default, set to true, meaning
+            that this link will not be shown.</td>
+          </tr>
+
+          <tr>
+            <td>POD</td>
+
+            <td><p>This document as Perl POD (Plain Old Documentation). Text
+            with minimal formatting directives. If on a *nix system with perl
+            installed, see &#34;man perlpod&#34;.</p>
+            <p>For additional information see the Forrest pod-output
+            plugin.</p></td>
+
+            <td>&#60;disable-pod-link&#62;. By default, set to true, meaning
+            that this link will not be shown.</td>
+          </tr>
+        </table>
+      </section>
+      <section id="section"> 
+        <title>Using sections</title>
+        <p>You can use sections to put some structure in your document. For some
+          strange historical reason, the section title is an attribute of the
+          <code>&lt;section&gt;</code> element.</p> 
+      </section> 
+      <section id="sub-section">
+        <title>Sections, the sequel</title>
+        <p>Just some second section.</p> 
+        <section id="sub-sub-section">
+          <title>Section 2.1</title>
+          <p>Which contains a subsection (2.1).</p> 
+        </section> 
+      </section> 
+
+      <section id="source">
+        <title>Showing preformatted source code</title> 
+        <p>Enough about these sections. Let's have a look at more interesting
+          elements, <code>&lt;source&gt;</code> for instance:</p> 
+        <source>
+// This example is from the book _Java in a Nutshell_ by David Flanagan.
+// Written by David Flanagan.  Copyright (c) 1996 O'Reilly &amp; Associates.
+// You may study, use, modify, and distribute this example for any purpose.
+// This example is provided WITHOUT WARRANTY either expressed or implied.
+
+import java.applet.*;    // Don't forget these import statements!
+import java.awt.*;
+
+public class FirstApplet extends Applet {
+    // This method displays the applet.
+    // The Graphics class is how you do all drawing in Java.
+    public void paint(Graphics g) {
+        g.drawString("Hello World", 25, 50);
+    }
+}</source>
+        <p>CDATA sections are used within 
+          <code>&lt;source&gt;</code> elements so that you can write pointy
+           brackets without needing to escape them with messy
+          <code>&amp;lt;</code> entities ...
+        </p> 
+        <source><![CDATA[
+<pointy>
+  easy
+</pointy>
+]]></source>
+        <p>Please take care to still use a sensible line-length within your
+          source elements.</p>
+      </section>
+
+      <section id="table">
+        <title>Using tables</title>
+        <p>And now for a table:</p>
+        <table>
+          <caption>Table caption</caption>
+          <tr>
+            <th>heading cell 1</th>
+            <th>heading cell 2</th>
+            <th>heading cell 3</th>
+          </tr>
+          <tr>
+            <td>data cell</td>
+            <td colspan="2">this data cell spans two columns</td>
+          </tr>
+          <tr>
+            <td>
+              Tables can be nested:
+            </td>
+            <td>
+              <table>
+                <tr>
+                  <th>column 1</th>
+                  <th>column 2</th>
+                </tr> 
+                <tr>
+                  <td>cell A</td>
+                  <td>cell B</td>
+                </tr>
+              </table>
+            </td>
+            <td>
+              <ul><li>and can include most other elements</li><li>such as lists</li></ul>
+            </td>
+          </tr>
+        </table> 
+      </section>
+
+      <anchor id="second-figure-anchor"/>
+      <section id="figure"> 
+        <title>Using figures</title>
+        <p>And a <code>&lt;figure&gt;</code> to end all of this.
+          Note that this can also be implemented with an
+          <code>&lt;img&gt;</code> element.
+        </p>
+        <figure src="../images/project.png" alt="The fine Forrest logo" width="220" height="65"/>	
+      </section>
+      <section id="link-class">
+        <title>Using class attribute on links</title>
+
+        <p>The document-v13 had elements &lt;fork&gt; and &lt;jump&gt;. In
+        document-v20, those elements no longer exist but the functionality can
+        be duplicated by using the @class attribute.
+        Even though the opening of separate windows should be under the
+        control of the user, these techniques can still be employed.</p>
+
+        <table>
+          <tr>
+            <th><p>Document V1.3</p></th>
+
+            <th><p>Document V2.0</p></th>
+          </tr>
+
+          <tr>
+            <td><p>&lt;fork href="faq.html"&gt;</p></td>
+
+            <td><a class="fork" href="faq.html">&lt;a class="fork"
+            href="faq.html"&gt;</a></td>
+          </tr>
+
+          <tr>
+            <td><p>&lt;jump href="faq.html"&gt;</p></td>
+
+            <td><p><a class="jump" href="faq.html">&lt;a class="jump"
+            href="faq.html"&gt;</a></p></td>
+          </tr>
+        </table>
+      </section>
+    </section>
+
+    <section id="changes">
+      <title>DTD changes</title>
+      <p>See the generated
+<!-- FOR-321 workaround
+      <a href="ext:dtd-docs">DTD reference documentation</a>.
+-->
+      <a href="http://forrest.apache.org/docs/dtd-docs.html">DTD reference documentation</a>.
+      </p>
+      <section id="changes-20">
+        <title>Changes between document-v13 and document-v20</title>
+        <ul>
+          <li>Renamed <strong>&lt;link&gt;</strong>
+             to <strong>&lt;a&gt;</strong>
+          </li>
+          <li>Removed <strong>&lt;fork&gt;</strong>
+             and <strong>&lt;jump&gt;</strong> in favour of the
+             <strong>&lt;a&gt;</strong> element. See demonstration
+             <a href="#link-class">using class attribute on links</a>.
+          </li>
+        </ul>
+      </section>
+      <section id="changes-13">
+        <title>Changes between document-v12 and document-v13</title>
+        <p>
+          All v1.2 docs will work fine as v1.3 DTD. The main change is the
+          addition of a @class attribute to every element, which enables the
+          "extra-css" section in the skinconf to be put to good use.
+        </p>
+      </section>
+      <section id="changes-12">
+        <title>Changes between document-v11 and document-v12</title>
+        <p>
+          doc-v12 enhances doc-v11 by relaxing various restrictions that were
+          found to be unnecessary.
+        </p>
+        <ul>
+          <li>
+            Links ((link|jump|fork) and inline elements (br|img|icon|acronym) are
+            allowed inside title.
+          </li>
+          <li>
+            Paragraphs (p|source|note|warning|fixme), table and figure|anchor are
+            allowed inside li.
+          </li>
+          <li>
+            Paragraphs (p|source|note|warning|fixme), lists (ol|ul|dl), table,
+            figure|anchor are allowed inside definition lists (dd) and tables (td
+            and dh).
+          </li>
+          <li>
+            Inline content
+            (strong|em|code|sub|sup|br|img|icon|acronym|link|jump|fork) is
+            allowed in strong and em.
+          </li>
+        </ul>
+      </section>
+    </section>
+  </body> 
+  <footer> 
+    <legal>This is a legal notice, so it is <strong>important</strong>.</legal> 
+  </footer>
+</document>
diff --git a/modules/xdocs/sitemap.xmap b/modules/xdocs/sitemap.xmap
new file mode 100644
index 0000000..79f0595
--- /dev/null
+++ b/modules/xdocs/sitemap.xmap
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<!-- $Id: doctypes.xmap 179488 2005-06-02 02:29:39Z gregor $ -->
+
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+
+  <map:pipelines>
+
+    <map:pipeline>
+      <!-- View Revision? -->
+      <map:match pattern="*.xml">
+        <map:match type="step" pattern="view-revision">
+          <map:generate type="serverpages" src="fallback://lenya/content/rc/view.xsp">
+          </map:generate>
+          <map:transform src="fallback://lenya/xslt/rc/toDoc.xsl"/>
+          <map:transform src="fallback://lenya/modules/xdocs/xslt/xdocs2xhtml.xsl">
+            <map:parameter name="rendertype" value="{1}"/>
+            <map:parameter name="nodeid" value="{page-envelope:document-name}"/>
+            <map:parameter name="language" value="{page-envelope:document-language}"/>
+          </map:transform>
+          <map:serialize type="xml"/>
+        </map:match>
+      </map:match>
+
+      <!-- parametrized doctype matcher -->
+      <!-- pattern="{rendertype}" -->
+      <map:match pattern="*.xml">
+        <map:generate src="lenyadoc:/{page-envelope:document-language}/{page-envelope:document-id}"/>
+        <map:transform src="fallback://lenya/modules/xdocs/xslt/xdocs2xhtml.xsl">
+          <map:parameter name="rendertype" value="{1}"/>
+          <map:parameter name="nodeid" value="{page-envelope:document-name}"/>
+          <map:parameter name="language" value="{page-envelope:document-language}"/>
+        </map:transform>
+        <map:serialize type="xml"/>
+      </map:match>
+
+    </map:pipeline>
+    
+  </map:pipelines>
+</map:sitemap>
diff --git a/modules/xdocs/xslt/xdocs2xhtml.xsl b/modules/xdocs/xslt/xdocs2xhtml.xsl
new file mode 100644
index 0000000..fbb8c99
--- /dev/null
+++ b/modules/xdocs/xslt/xdocs2xhtml.xsl
@@ -0,0 +1,298 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
+  <xsl:template match="document">
+    <div id="forrest-doc">
+      <div id="forrest-doc-header">
+        <xsl:if test="normalize-space(header/title)!=''">
+          <h1>
+            <xsl:value-of select="header/title"/>
+          </h1>
+        </xsl:if>
+      </div>
+      <xsl:apply-templates select="header/type"/>
+      <xsl:apply-templates select="header/notice"/>
+      <xsl:apply-templates select="header/abstract"/>
+      <xsl:apply-templates select="body"/>
+      <div class="attribution">
+        <xsl:apply-templates select="header/authors"/>
+        <xsl:if test="header/authors and header/version">
+          <xsl:text>; </xsl:text>
+        </xsl:if>
+        <xsl:apply-templates select="header/version"/>
+      </div>
+    </div>
+  </xsl:template>
+    <xsl:template match="body">
+      <xsl:apply-templates/>
+    </xsl:template>
+  <xsl:template match="@id">
+    <xsl:if test="normalize-space(.)!=''">
+      <a name="{.}"/>
+    </xsl:if>
+  </xsl:template>
+  <xsl:template match="section">
+    <!-- count the number of section in the ancestor-or-self axis to compute
+         the title element name later on -->
+    <xsl:variable name="sectiondepth" 
+      select="count(ancestor-or-self::section)"/>
+    <a name="{generate-id()}"/>
+    <xsl:apply-templates select="@id"/>
+    <div id="{@id} ">
+      <xsl:apply-templates select="*[not(self::title)]"/>
+    </div>
+  </xsl:template>
+  <xsl:template match="note | warning | fixme">
+    <xsl:apply-templates select="@id"/>
+    <div>
+      <xsl:call-template name="add.class">
+        <xsl:with-param name="class">
+          <xsl:value-of select="local-name()"/>
+        </xsl:with-param>
+      </xsl:call-template>
+      <div class="label">
+        <xsl:choose>
+          <!-- FIXME: i18n Transformer here -->
+          <xsl:when test="@label">
+            <xsl:value-of select="@label"/>
+          </xsl:when>
+          <xsl:when test="local-name() = 'note'">Note</xsl:when>
+          <xsl:when test="local-name() = 'warning'">Warning</xsl:when>
+          <xsl:otherwise>Fixme (<xsl:value-of 
+            select="@author"/>)</xsl:otherwise>
+        </xsl:choose>
+      </div>
+      <div class="content">
+        <xsl:apply-templates/>
+      </div>
+    </div>
+  </xsl:template>
+  <xsl:template match="notice">
+    <div class="notice">
+    <!-- FIXME: i18n Transformer here -->
+    <xsl:text>Notice: </xsl:text>
+      <xsl:apply-templates/>
+    </div>
+  </xsl:template>
+
+  <xsl:template match="link">
+    <xsl:apply-templates select="@id"/>
+    <a>
+      <xsl:if test="@class='jump'">
+        <xsl:attribute name="target">_top</xsl:attribute>
+      </xsl:if>
+      <xsl:if test="@class='fork'">
+        <xsl:attribute name="target">_blank</xsl:attribute>
+      </xsl:if>
+      <xsl:copy-of select="@*"/>
+      <xsl:apply-templates/>
+    </a>
+  </xsl:template>
+
+  <xsl:template match="jump">
+    <xsl:apply-templates select="@id"/>
+    <a href="{@href}" target="_top">
+      <xsl:apply-templates/>
+    </a>
+  </xsl:template>
+
+  <xsl:template match="fork">
+    <xsl:apply-templates select="@id"/>
+    <a href="{@href}" target="_blank">
+      <xsl:apply-templates/>
+    </a>
+  </xsl:template>
+   <xsl:template match="p[@xml:space='preserve']">
+    <xsl:apply-templates select="@id"/>
+    <div class="pre">
+      <xsl:copy-of select="@id"/>
+      <xsl:apply-templates/>
+    </div>
+  </xsl:template>
+  <xsl:template match="source">
+    <xsl:apply-templates select="@id"/>
+    <pre class="code">
+<!-- Temporarily removed long-line-splitter ... gives out-of-memory problems -->
+      <xsl:copy-of select="@id"/>
+      <xsl:apply-templates/>
+    </pre>
+  </xsl:template>
+
+  <xsl:template match="anchor">
+    <a name="{@id}">
+      <xsl:copy-of select="@id"/>
+    </a>
+  </xsl:template>
+  <xsl:template match="icon">
+    <xsl:apply-templates select="@id"/>
+    <img class="icon">
+      <xsl:copy-of select="@height | @width | @src | @alt | @id"/>
+    </img>
+  </xsl:template>
+
+  <xsl:template match="code">
+    <xsl:apply-templates select="@id"/>
+    <span>
+      <xsl:call-template name="add.class">
+        <xsl:with-param name="class">codefrag</xsl:with-param>
+      </xsl:call-template>
+      <xsl:copy-of select="@id"/>
+      <xsl:value-of select="."/>
+    </span>
+  </xsl:template>
+
+  <xsl:template match="figure">
+    <xsl:apply-templates select="@id"/>
+    
+    <div align="center">
+      <xsl:copy-of select="@id"/>
+      <img class="figure">
+        <xsl:copy-of select="@height | @width | @src | @alt | @id"/>
+      </img>
+    </div>
+  </xsl:template>
+
+  <xsl:template match="table">
+    <xsl:apply-templates select="@id"/>
+    <xsl:choose>
+      <!-- Limit Forrest specific processing to tables without class -->
+      <xsl:when test="not(@class) or @class=''">
+        <table cellpadding="4" cellspacing="1" class="ForrestTable">
+          <xsl:copy-of select="@cellspacing | @cellpadding | @border | @class | @bgcolor |@id"/>
+          <xsl:apply-templates/>
+        </table>    
+      </xsl:when>
+      <xsl:otherwise>
+        <!-- Tables with class are passed without change -->
+        <xsl:copy>
+          <xsl:copy-of select="@*"/>
+          <xsl:apply-templates/>
+        </xsl:copy>    
+        
+      </xsl:otherwise>
+    </xsl:choose>
+    <xsl:if test="@class = ''">
+      
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="acronym/@title">
+    <xsl:attribute name="title">
+      <xsl:value-of select="normalize-space(.)"/>
+    </xsl:attribute>
+  </xsl:template>
+
+  <xsl:template match="header/authors">
+    <xsl:for-each select="person">
+      <xsl:choose>
+        <xsl:when test="position()=1">by</xsl:when>
+        <xsl:otherwise>,</xsl:otherwise>
+      </xsl:choose>
+      <xsl:text> </xsl:text>
+      <xsl:value-of select="@name"/>
+    </xsl:for-each>
+  </xsl:template>
+
+  <xsl:template match="version">
+    <span class="version">
+      <xsl:apply-templates select="@major"/>
+      <xsl:apply-templates select="@minor"/>
+      <xsl:apply-templates select="@fix"/>
+      <xsl:apply-templates select="@tag"/>
+      <xsl:choose>
+        <xsl:when test="starts-with(., '$Revision: ')">
+          version <xsl:value-of select="substring(., 12, string-length(.) -11-2)"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="."/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </span>
+  </xsl:template>
+
+  <xsl:template match="@major">
+     v<xsl:value-of select="."/>
+  </xsl:template>
+
+  <xsl:template match="@minor | @fix">
+     <xsl:value-of select="concat('.',.)"/>
+  </xsl:template>
+
+  <xsl:template match="@tag">
+     <xsl:value-of select="concat('-',.)"/>
+  </xsl:template>
+
+  <xsl:template match="type">
+    <p class="type">
+    <!-- FIXME: i18n Transformer here -->
+    <xsl:text>Type: </xsl:text>
+    <xsl:value-of select="."/>
+    </p>
+  </xsl:template>
+
+  <xsl:template match="abstract">
+    <p>
+      <xsl:apply-templates/>
+    </p>
+  </xsl:template>
+
+  <xsl:template name="email">
+    <a>
+      <xsl:attribute name="href">
+        <xsl:value-of select="concat('mailto:',@email)"/>
+      </xsl:attribute>
+       <xsl:value-of select="@name"/>
+    </a>
+  </xsl:template>
+
+  <xsl:template name="generate-id">
+    <xsl:choose>
+      <xsl:when test="@id">
+        <xsl:value-of select="@id"/>
+      </xsl:when>
+      <xsl:when test="@title">
+        <xsl:value-of select="@title"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="generate-id(.)"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  <xsl:template name="add.class">
+    <!-- use the parameter to set class attribute -->
+    <!-- if there are already classes set, adds to them -->
+    <xsl:param name="class"/> 
+    <xsl:attribute name="class">
+      <xsl:choose>
+        <xsl:when test="@class">
+          <xsl:value-of select="$class"/>
+          <xsl:text> </xsl:text>
+          <xsl:value-of select="@class"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$class"/>
+        </xsl:otherwise>
+      </xsl:choose> 
+    </xsl:attribute>
+  </xsl:template>
+  <xsl:template match="@*|node()" priority="-1">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+</xsl:stylesheet>
diff --git a/publication.xml b/publication.xml
new file mode 100644
index 0000000..3481378
--- /dev/null
+++ b/publication.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed 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.
+-->
+<!-- $Id: publication.xml 374687 2006-02-03 15:24:55Z michi $ -->
+<lenya:publication xmlns:lenya="http://apache.org/cocoon/lenya/publication/1.0">
+  <lenya:name>doco</lenya:name>
+  <lenya:pub-version>1.4-dev</lenya:pub-version>
+  <lenya:lenya-version>1.4-dev</lenya:lenya-version>
+  <lenya:cocoon-version>2.1.8 or 2.1.9-dev</lenya:cocoon-version>
+  <lenya:description>This publication is a best practice, getting started publication.</lenya:description>
+  <lenya:credits>Special thanks to </lenya:credits>
+  <lenya:help/>
+  <lenya:changelog>changes.xml</lenya:changelog>
+  <lenya:license/>
+  <lenya:readme>
+    <ol>
+      <li>
+<a href="live/index.html">Reader`s View</a> (Live)</li>
+      <li>
+<a href="authoring/index.html">Editor`s View</a> (Authoring)</li>
+    </ol>
+
+    <h4>Enable JCR</h4>
+    <ul>
+      <li>Build Lenya and start it</li>
+      <li>Import content from filesystem into JCR Repository by executing: <a href="../index.html?lenya.usecase=jcr.import">../index.html?lenya.usecase=jcr.import</a>
+      </li>
+      <li>Stop Lenya</li>
+      <li>Switch the NodeFactory within <i>build/lenya/webapp/WEB-INF/classes/org/apache/lenya/lenya.roles</i> to <i>org.apache.lenya.cms.jcr.JCRNodeFactory</i>
+      </li>
+      <li>Optional: The JCR implementation can be configured within local.build.properties resp. build.properties</li>
+      <li>Start Lenya</li>
+    </ul>
+
+    <h4>JCR Tests and content migration</h4>
+    <ul>
+      <li>./build.sh modules.test</li>
+      <li>./build.sh migrate-14</li>
+    </ul>
+  </lenya:readme>
+</lenya:publication>
diff --git a/src/cocoon/local.blocks.properties b/src/cocoon/local.blocks.properties
deleted file mode 100644
index 579ecd8..0000000
--- a/src/cocoon/local.blocks.properties
+++ /dev/null
@@ -1,167 +0,0 @@
-
-#  Copyright 1999-2004 The Apache Software Foundation
-#
-#  Licensed 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.
-#
-
-#------------------------------------------------------------------------------#
-#                             Cocoon Blocks                                    #
-#------------------------------------------------------------------------------#
-
-# Remove blocks from your cocoon distribution by setting the corresponding
-# include property to true or false. The blocks are included by default, i.e. if
-# no property was set.
-
-# NOTE: Don't modify this file directly but make a copy named
-# 'local.blocks.properties' and modify that. The build system will first load
-# 'local.blocks.properties' and properties are immutable in Ant.
-
-# NOTE: "[dependency]" indicates blocks that are required by other blocks.
-# Disabling batik, for example, will result in a RuntimeException when using
-# fop. Dependencies only needed for the block's samples are marked explicitely.
-# This latter information was introduced only short time ago, so do not expect
-# it to be complete.
-
-# NOTE: (to Cocoon committers): blocks.properties is generated from gump.xml
-# using "build generate-blocks.properties". Any changes to blocks definitions
-# must be made in gump.xml, not here.
-
-
-# Stable blocks ----------------------------------------------------------------
-
-# Stable blocks are those that can be considered ready for production and
-# will contain components and API that will remain stable and where
-# developers are committed to back compatibility. In short, stuff that you
-# can depend on.
-
-#-----[dependency]: "authentication-fw" depends on "session-fw".
-#-----[dependency]: "authentication-fw" is needed by "portal", "portal-fw".
-include.block.authentication-fw=false
-#-----[dependency]: "batik" is needed by "fop", "scratchpad", "tour".
-#include.block.batik=false
-include.block.bsf=false
-#-----[dependency]: "chaperon" depends on "xsp" (for samples).
-#include.block.chaperon=false
-#-----[dependency]: "databases" depends on "xsp".
-#-----[dependency]: "databases" is needed by "hsqldb", "jms", "ojb", "petstore", "repository", "xmldb".
-#include.block.databases=false
-#-----[dependency]: "fop" depends on "batik".
-#-----[dependency]: "fop" is needed by "tour".
-#include.block.fop=false
-#-----[dependency]: "hsqldb" depends on "databases".
-#-----[dependency]: "hsqldb" is needed by "jms", "ojb", "petstore".
-#include.block.hsqldb=false
-#-----[dependency]: "html" is needed by "portal".
-#include.block.html=false
-include.block.itext=false
-include.block.jfor=false
-include.block.jsp=false
-#-----[dependency]: "linkrewriter" depends on "xsp".
-#include.block.linkrewriter=false
-#-----[dependency]: "lucene" depends on "forms" (for samples), "xsp" (for samples).
-#include.block.lucene=false
-#include.block.naming=false
-include.block.paranoid=false
-include.block.php=false
-include.block.poi=false
-#-----[dependency]: "portal" depends on "authentication-fw", "html", "session-fw".
-#-----[dependency]: "portal" is needed by "faces".
-include.block.portal=false
-#include.block.profiler=false
-#-----[dependency]: "python" depends on "xsp".
-include.block.python=false
-#-----[dependency]: "session-fw" depends on "xsp".
-#-----[dependency]: "session-fw" is needed by "authentication-fw", "portal", "portal-fw".
-#include.block.session-fw=false
-#-----[dependency]: "velocity" is needed by "petstore".
-include.block.velocity=false
-include.block.web3=false
-#-----[dependency]: "xmldb" depends on "databases".
-# TODO: Including the xmldb block might cause a conflict with the patched xmldb libraries lib/xmldb-common-2003-09-02.jar and lib/xmldb-xupdate-2003-10-14.jar
-include.block.xmldb=false
-#-----[dependency]: "xsp" is needed by "chaperon", "databases", "eventcache", "forms", "linkrewriter", "lucene", "python", "scratchpad", "session-fw", "woody".
-#include.block.xsp=false
-
-# Unstable blocks --------------------------------------------------------------
-
-# Unstable blocks are currently under development and do not guarantee that the
-# contracts they expose (API, xml schema, properties, behavior) will remain
-# constant in time. Developers are not committed to back-compatibility just yet.
-# This doesn't necessarily mean the blocks implementation is unstable or
-# the code can't be trusted for production, but use with care and watch
-# its development as things might change over time before they are marked
-# stable.
-
-#-----[dependency]: "apples" depends on "forms" (for samples).
-include.block.apples=false
-#-----[dependency]: "asciiart" is needed by "mail".
-include.block.asciiart=false
-#-----[dependency]: "axis" is needed by "scratchpad".
-include.block.axis=false
-#-----[dependency]: "cron" is needed by "scratchpad".
-include.block.cron=true
-#include.block.deli=false
-#-----[dependency]: "eventcache" depends on "jms", "xsp" (for samples).
-#-----[dependency]: "eventcache" is needed by "repository", "scratchpad".
-include.block.eventcache=false
-#-----[dependency]: "faces" depends on "portal", "taglib".
-include.block.faces=false
-#-----[dependency]: "forms" depends on "xsp" (for samples).
-#-----[dependency]: "forms" is needed by "apples", "javaflow", "lucene", "ojb", "petstore", "tour".
-#include.block.forms=false
-#-----[dependency]: "javaflow" depends on "forms", "ojb".
-include.block.javaflow=false
-#-----[dependency]: "jms" depends on "databases" (for samples), "hsqldb".
-#-----[dependency]: "jms" is needed by "eventcache", "slide".
-include.block.jms=false
-include.block.linotype=false
-#-----[dependency]: "mail" depends on "asciiart".
-include.block.mail=false
-include.block.midi=false
-#-----[dependency]: "ojb" depends on "databases" (for samples), "forms" (for samples), "hsqldb" (for samples).
-#-----[dependency]: "ojb" is needed by "javaflow".
-include.block.ojb=false
-#-----[dependency]: "petstore" depends on "databases", "forms", "hsqldb", "velocity".
-include.block.petstore=false
-#include.block.proxy=false
-include.block.qdox=false
-#-----[dependency]: "repository" depends on "databases", "eventcache".
-#-----[dependency]: "repository" is needed by "scratchpad", "slide", "webdav".
-include.block.repository=false
-#-----[dependency]: "scratchpad" depends on "axis", "batik" (for samples), "cron", "eventcache", "repository", "xsp".
-include.block.scratchpad=false
-#include.block.serializers=false
-#-----[dependency]: "slide" depends on "jms", "repository".
-include.block.slide=false
-include.block.slop=false
-include.block.stx=false
-#-----[dependency]: "taglib" is needed by "faces".
-include.block.taglib=false
-#-----[dependency]: "tour" depends on "batik", "fop", "forms".
-include.block.tour=false
-#-----[dependency]: "webdav" depends on "repository".
-include.block.webdav=false
-
-# Deprecated blocks ------------------------------------------------------------
-
-# Although some of these blocks may have been stable, they are now deprecated
-# in favour of other blocks and therefore are excluded by default from the build.
-# For including one of them you have to set the exclude property into comment in
-# blocks.properties.
-
-include.block.php=false
-#-----[dependency]: "portal-fw" depends on "authentication-fw", "session-fw".
-include.block.portal-fw=false
-include.block.swf=false
-#-----[dependency]: "woody" depends on "xsp" (for samples).
-include.block.woody=false
diff --git a/src/cocoon/local.build.properties b/src/cocoon/local.build.properties
deleted file mode 100644
index b08db98..0000000
--- a/src/cocoon/local.build.properties
+++ /dev/null
@@ -1,189 +0,0 @@
-# Copyright 1999-2004 The Apache Software Foundation
-#
-# Licensed 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.
-#
-#----------------------------------------------
-#  Cocoon Build Properties
-#----------------------------------------------
-
-# NOTE: don't modify this file directly but copy the properties you need
-# to modify over to a file named 'local.build.properties' and modify that.
-# The build system will override these properties with the ones in the
-# 'local.build.properties' file.
-
-# ---- Webapp ------------------------------------------------------------------
-
-exclude.webapp.documentation=true
-exclude.webapp.javadocs=true
-exclude.webapp.idldocs=true
-exclude.webapp.samples=true
-
-# ---- Build Exclusions --------------------------------------------------------
-
-exclude.deprecated=true
-exclude.documentation=true
-exclude.javadocs=true
-#include.sources-in-jars=true
-
-# ---- Configuration -----------------------------------------------------------
-
-#include.driver.oracle=true
-#include.driver.postgre=true
-#include.driver.odbc=true
-config.allow-reloads=true
-config.enable-uploads=true
-#config.enable-instrumentation=true
-
-# ---- Validation --------------------------------------------------------------
-
-#exclude.validate.config=true
-exclude.validate.xdocs=true
-#exclude.validate.jars=true
-
-# ---- Forrest -----------------------------------------------------------------
-
-# set $FORREST_HOME and $PATH as instructed by Forrest
-
-# ---- Anteater ----------------------------------------------------------------
-
-anteater.home = /default-from-build.properties/anteater-0.9.16
-anteater.target.host = localhost
-anteater.target.port = 8888
-anteater.target.base.path = /
-anteater.option.haltonerror = true
-
-# disable some long-running tests by default
-# anteater.test.bug26186InternalRequestMemoryLeak.enabled = true
-
-# ---- JUnit -------------------------------------------------------------------
-
-junit.test.debugport=8000
-#junit.testcase=org.apache.cocoon.util.test.NetUtilsTestCase
-
-# ---- Build -------------------------------------------------------------------
-
-build.root=build
-build=${build.root}/${name}-${version}
-build.dest=${build}/classes
-build.mocks=${build}/mocks
-build.test=${build}/test
-build.test.output=${build.test}/output
-build.docs=${build}/docs
-build.docs.printer=${build}/printer-docs
-build.site=${build}/site
-build.xdocs=${build}/xdocs
-build.javadocs=${build}/javadocs
-build.context=${build}/documentation
-build.context.printer=${build}/printer-documentation
-build.blocks=${build}/blocks
-build.deprecated=${build}/deprecated
-build.samples=${build}/samples
-build.temp=${build}/temp
-build.mounttable=../../mount-table.xml
-
-build.docs.loglevel=ERROR
-build.docs.printer.loglevel=ERROR
-
-# ------ Webapp Build Properties -----------------------------------------------
-
-build.webapp=${build.root}/webapp
-build.webapp.webinf=${build.webapp}/WEB-INF
-build.webapp.classes=${build.webapp.webinf}/classes
-build.webapp.lib=${build.webapp.webinf}/lib
-build.webapp.samples=${build.webapp}/samples
-build.webapp.test-suite=${build.webapp}/test-suite
-build.webapp.docs=${build.webapp}/docs
-build.webapp.javadocs=${build.webapp}/api/java
-build.webapp.loglevel=INFO
-build.war=${build}/${name}.war
-
-# ------ Standalone-demo Build Properties --------------------------------------
-build.standalone.demo=${build.root}/standalone-demo
-
-# ---- Compilation -------------------------------------------------------------
-
-compiler=modern
-compiler.debug=on
-compiler.optimize=on
-compiler.deprecation=off
-compiler.nowarn=on
-source.vm=1.4
-
-
-# ------ System Properties -----------------------------------------------------
-
-# WARNING: you shouldn't need to modify anything below here since there is a
-# very high change of breaking the build system. Do it only if you know what
-# you're doing.
-
-packages=org.apache
-
-# Project descriptor
-gump.descriptor=gump.xml
-
-# Directory Layout
-src=src
-java=${src}/java
-mocks=${src}/mocks
-test=${src}/test
-resources=${src}/resources
-resources.styles=${resources}/styles
-resources.logos=${resources}/logos
-resources.javadoc=${resources}/javadoc
-documentation=${src}/documentation
-docs=${documentation}/xdocs
-images=${documentation}/images
-blocks=${src}${file.separator}blocks
-samples=${src}/samples
-webapp=${src}/webapp
-webapp.samples=${webapp}/samples
-webapp.test-suite=${webapp}/test-suite
-customconf=${src}/confpatch
-
-# Deprecated Stuff
-deprecated=${src}/deprecated
-deprecated.src=${deprecated}/java
-deprecated.conf=${deprecated}/conf
-
-# Tools
-tools=tools
-tools.lib=${tools}/lib
-tools.src=${tools}/src
-tools.tasks.src=${tools.src}/anttasks
-tools.tasks.dest=${tools}/anttasks
-tools.loader.src=${tools.src}/loader
-tools.loader.dest=${tools}/loader
-tools.jetty=${tools}/jetty
-
-# IDE
-ide.eclipse.outputdir=${build.root}/eclipse/classes
-ide.eclipse.export.libs=false
-
-# Libraries
-lib=lib
-lib.core=${lib}/core
-lib.endorsed=${lib}/endorsed
-lib.optional=${lib}/optional
-lib.local=${lib}/local
-
-# Distribution Directories
-dist.root=dist
-dist=${dist.root}/${name}-${version}
-dist.name=${name}-${version}
-dist.target=${dist.root}
-
-# Site Directory
-site=../cocoon-site/site/2.1
-
-# Legal
-legal=legal
diff --git a/src/confpatch/actions.xmap b/src/confpatch/actions.xmap
deleted file mode 100644
index 9a30400..0000000
--- a/src/confpatch/actions.xmap
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$  -->
-
-<xmap xpath="/sitemap/components/actions" unless="/sitemap/components/actions/action[@name = 'authenticator']">
-   <map:action name="authenticator" src="org.apache.lenya.cms.cocoon.acting.DelegatingAuthenticatorAction" logger="lenya.sitemap.action.authenticator"/>
-   <map:action name="authorizer" src="org.apache.lenya.cms.cocoon.acting.DelegatingAuthorizerAction" logger="lenya.sitemap.action.authorizer"/>
-   <map:action name="language-exists" logger="lenya.sitemap.action.language-exists" src="org.apache.lenya.cms.cocoon.acting.LanguageExistsAction"/>
-   <map:action name="request-parameter-exists" logger="sitemap.action.requestParameterExists" src="org.apache.cocoon.acting.RequestParameterExistsAction" />
-   <map:action name="reserved-checkin" src="org.apache.lenya.cms.cocoon.acting.ReservedCheckinAction" logger="sitemap.action.reserved-checkin"/>
-   <map:action name="reserved-checkout" src="org.apache.lenya.cms.cocoon.acting.ReservedCheckoutAction" logger="sitemap.action.reserved-checkout"/>
-   <map:action name="reserved-checkout-test" src="org.apache.lenya.cms.cocoon.acting.ReservedCheckoutTestAction" logger="sitemap.action.reserved-checkout-test"/>
-   <map:action name="discover-checkout" src="org.apache.lenya.cms.cocoon.acting.DiscoverCheckoutAction" logger="sitemap.action.discover-checkout"/>
-   <map:action name="set-header" logger="sitemap.action.set-header" src="org.apache.cocoon.acting.HttpHeaderAction"/>
-   <map:action name="resource-exists" logger="sitemap.action.resource-exists" src="org.apache.cocoon.acting.ResourceExistsAction"/>
-   <map:action name="resource-exists-enhanced" logger="sitemap.action.resource-exists-enhanced" src="org.apache.lenya.cms.cocoon.acting.ResourceExistsAction"/>
-   <map:action name="rollback" src="org.apache.lenya.cms.cocoon.acting.RollbackAction"/>
-   <map:action name="task" logger="sitemap.action.task" src="org.apache.lenya.cms.cocoon.acting.TaskAction"/>
-   <map:action name="workflow" logger="sitemap.action.workflow" src="org.apache.lenya.cms.cocoon.acting.WorkflowInvokerAction"/>
-   <map:action name="session-propagator" logger="sitemap.action.session-propagator" src="org.apache.cocoon.acting.SessionPropagatorAction"/>
-</xmap>
\ No newline at end of file
diff --git a/src/confpatch/comments.xmap b/src/confpatch/comments.xmap
deleted file mode 100644
index 677648c..0000000
--- a/src/confpatch/comments.xmap
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0"?>

-<!--

-  Copyright 1999-2004 The Apache Software Foundation

-

-  Licensed 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.

--->

-

-<xmap xpath="/sitemap" remove="//comment()"/>
\ No newline at end of file
diff --git a/src/confpatch/enable-uploads.xweb b/src/confpatch/enable-uploads.xweb
deleted file mode 100644
index 42f2082..0000000
--- a/src/confpatch/enable-uploads.xweb
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-<xweb xpath="/web-app/servlet/init-param[param-name='enable-uploads']/param-value"
-	if-prop="enable-uploads"
-	remove="/web-app/servlet/init-param[param-name='enable-uploads']/param-value/text()"
->true</xweb>
\ No newline at end of file
diff --git a/src/confpatch/exceptionselector.xmap b/src/confpatch/exceptionselector.xmap
deleted file mode 100644
index c6b4ce9..0000000
--- a/src/confpatch/exceptionselector.xmap
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0"?>

-<!--

-  Copyright 1999-2004 The Apache Software Foundation

-

-  Licensed 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.

--->

-

-<xmap xpath="/sitemap/components/selectors/selector[@name = 'exception']" 

-      unless="/sitemap/components/selectors/selector[@name = 'exception']/exception[@name = 'document-does-not-exist']"

-      insert-before="/sitemap/components/selectors/selector[@name = 'exception']/exception[@class = 'java.lang.Throwable']">

-    <exception name="document-does-not-exist" class="org.apache.lenya.cms.publication.DocumentDoesNotExistException"/>

-    <exception class="org.apache.lenya.cms.task.ExecutionException" name="execution" unroll="true"/>

-    <exception class="org.apache.tools.ant.BuildException" name="build" unroll="true"/>

-    <exception class="org.xml.sax.SAXParseException" name="sax-parsing"/>

-    <exception class="org.xml.sax.SAXException" name="sax" unroll="true"/>

-    <exception class="org.apache.cocoon.ProcessingException" name="processing" unroll="true"/>

-    <!--         <exception class="org.apache.lenya.cms.site.SiteException" name="sitetree"/> -->

-</xmap>      

diff --git a/src/confpatch/form-encoding.xweb b/src/confpatch/form-encoding.xweb
deleted file mode 100644
index d8c85df..0000000
--- a/src/confpatch/form-encoding.xweb
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-<xweb xpath="/web-app/servlet/init-param[param-name='form-encoding']/param-value"
-	remove="/web-app/servlet/init-param[param-name='form-encoding']/param-value/text()"
->UTF-8</xweb>
\ No newline at end of file
diff --git a/src/confpatch/logger-class.xweb b/src/confpatch/logger-class.xweb
deleted file mode 100644
index 738b83a..0000000
--- a/src/confpatch/logger-class.xweb
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-<xweb unless="/web-app/servlet/init-param[param-name = 'logger-class'][contains(param-value,'org.apache.avalon.excalibur.logger.Log4JLoggerManager')]" 
-      xpath="/web-app/servlet"
-      insert-after="init-param[position()=last()]">
-    <init-param>
-      <param-name>logger-class</param-name>
-      <param-value>org.apache.avalon.excalibur.logger.Log4JLoggerManager</param-value>
-    </init-param>
-    <init-param>
-      <param-name>log4j-config</param-name>
-      <param-value>/WEB-INF/log4j.xconf</param-value>
-    </init-param>
-</xweb>
\ No newline at end of file
diff --git a/src/confpatch/logkit-categories.xconf b/src/confpatch/logkit-categories.xconf
deleted file mode 100644
index 411706d..0000000
--- a/src/confpatch/logkit-categories.xconf
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<xconf xpath="/logkit/categories" unless="category[@name='lenya']">
-    <category name="lenya" log-level="INFO">
-      <log-target id-ref="lenya"/>
-      <log-target id-ref="error"/>
-    </category>
-</xconf>
diff --git a/src/confpatch/logkit-targets.xconf b/src/confpatch/logkit-targets.xconf
deleted file mode 100644
index 644ffa4..0000000
--- a/src/confpatch/logkit-targets.xconf
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<xconf xpath="/logkit/targets" unless="cocoon[@id='lenya']">
-	<cocoon id="lenya">
-	  <filename>${context-root}/WEB-INF/logs/lenya.log</filename>
-	  <format type="cocoon">
-	    %7.7{priority} %{time}   [%{category}] (%{uri}) %{thread}/%{class:short}: %{message}\n%{throwable}
-	  </format>
-	  <append>false</append>
-	</cocoon>
-</xconf>
diff --git a/src/confpatch/matchers.xmap b/src/confpatch/matchers.xmap
deleted file mode 100644
index 913b168..0000000
--- a/src/confpatch/matchers.xmap
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0"?>

-<!--

-  Copyright 1999-2004 The Apache Software Foundation

-

-  Licensed 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.

--->

-

-<xmap xpath="/sitemap/components/matchers" unless="/sitemap/components/matchers/matcher[@name = 'usecase']">

-     <map:matcher name="agent-match" logger="sitemap.matcher.referer-match" src="org.apache.cocoon.matching.WildcardHeaderMatcher">

-        <header-name>User-Agent</header-name>

-    </map:matcher>

-    <map:matcher name="usecase" logger="sitemap.matcher.usecase" src="org.apache.cocoon.matching.WildcardRequestParameterMatcher">

-      <parameter-name>lenya.usecase</parameter-name>

-    </map:matcher>

-    <map:matcher name="step" logger="sitemap.matcher.step" src="org.apache.cocoon.matching.WildcardRequestParameterMatcher">

-      <parameter-name>lenya.step</parameter-name>

-    </map:matcher>

-    <map:matcher name="registered-usecase" logger="sitemap.matcher.registered-usecase" src="org.apache.lenya.cms.cocoon.matching.UsecaseRegistrationMatcher"/>

-</xmap>      

diff --git a/src/confpatch/overwrite-uploads.xweb b/src/confpatch/overwrite-uploads.xweb
deleted file mode 100644
index d90da6a..0000000
--- a/src/confpatch/overwrite-uploads.xweb
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-<xweb xpath="/web-app/servlet/init-param[param-name='overwrite-uploads']/param-value"
-	remove="/web-app/servlet/init-param[param-name='overwrite-uploads']/param-value/text()"
->allow</xweb>
\ No newline at end of file
diff --git a/src/confpatch/pipelines.xmap b/src/confpatch/pipelines.xmap
deleted file mode 100644
index 45bb9c0..0000000
--- a/src/confpatch/pipelines.xmap
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0"?>

-<!--

-  Copyright 1999-2004 The Apache Software Foundation

-

-  Licensed 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.

--->

-

-<xmap remove="/sitemap/pipelines" xpath="/sitemap" insert-after="/sitemap/resources">

-

-<!-- =========================== Pipelines ================================= -->

-

-  <map:pipelines>

-

-    <!-- I18N  -->

-    <map:pipeline>

-      <map:match pattern="i18n-catalogue/**">

-        <map:mount uri-prefix="" src="lenya/i18n.xmap" check-reload="true" reload-method="synchron"/>

-      </map:match>

-    </map:pipeline>

-

-    <map:pipeline>  

-        

-      <!-- Lenya GUI screen -->

-      <map:match pattern="lenya-screen.xsl">

-        <map:generate src="fallback://lenya/xslt/util/page2xhtml.xsl"/>

-        <map:transform src="lenya/xslt/util/page2xslt.xsl">

-          <map:parameter name="contextprefix" value="{request:contextPath}"/>

-        </map:transform>

-        <map:serialize type="xml"/>

-      </map:match>

-      

-      <map:match pattern="ac.login" type="usecase">

-        <map:mount src="lenya/usecases/usecase.xmap" uri-prefix="" check-reload="yes" reload-method="synchron"/>

-      </map:match>

-      <map:match pattern="ac.logout" type="usecase">

-        <map:mount src="lenya/usecases/usecase.xmap" uri-prefix="" check-reload="yes" reload-method="synchron"/>

-      </map:match>

-

-    <!-- favicon -->

-    <map:match pattern="favicon.ico">

-      <map:read mime-type="image/x-icon" src="lenya/resources/images/lenya.ico"/>

-    </map:match>

-    </map:pipeline>

-

-    <map:pipeline internal-only="true">

-      <map:match pattern="**">

-        <map:mount uri-prefix="" src="global-sitemap.xmap" check-reload="true" reload-method="synchron"/>

-      </map:match>

-    </map:pipeline>

-      

-    <map:pipeline>

-

-    <map:match pattern="**">

-      <map:select type="client">

-        <map:when test="webdav">

-            <map:act type="authenticator">

-              <map:act type="authorizer">

-                <map:mount uri-prefix="" src="global-sitemap.xmap" check-reload="true" reload-method="synchron"/> 

-              </map:act>

-              <map:act type="set-header">

-                <map:parameter name="WWW-Authenticate" value="Basic Realm=lenya" />

-                <map:generate type="html" src="fallback://lenya/usecases/webdav/401error.html"/>

-                <map:serialize type="xhtml" status-code="401"/>

-              </map:act>

-            </map:act>

-            <map:act type="set-header">

-              <map:parameter name="WWW-Authenticate" value="Basic Realm=lenya" />

-              <map:generate type="html" src="fallback://lenya/usecases/webdav/401error.html"/>

-              <map:serialize type="xhtml" status-code="401"/>

-            </map:act>

-        </map:when>

-        <map:otherwise>

-          <map:act type="authorizer">

-            <map:mount uri-prefix="" src="global-sitemap.xmap" check-reload="true" reload-method="synchron"/>

-          </map:act>

-          <map:redirect-to uri="{request:requestURI}?lenya.usecase=ac.login&amp;referrerQueryString={request:queryString}" session="true"/>        

-        </map:otherwise>

-      </map:select>

-    </map:match>

-

-    </map:pipeline>

-

-     <!-- this is the default error handler -->

-      <map:handle-errors>

-        <map:select type="exception">

-          <map:when test="document-does-not-exist">

-            <map:generate src="lenya/content/util/empty.xml"/>

-            <map:transform src="fallback://lenya/xslt/exception/document-does-not-exist.xsl">

-              <map:parameter name="documentid" value="{page-envelope:document-id}"/>

-              <map:parameter name="documenturl" value="{page-envelope:document-url}"/>

-            </map:transform>

-            <map:call resource="style-cms-page">

-              <map:parameter name="statusCode" value="404"/>

-            </map:call>

-          </map:when>

-           <map:when test="not-found">

-             <map:generate src="lenya/content/util/empty.xml" />

-            <map:transform src="fallback://lenya/xslt/exception/document-does-not-exist.xsl">

-              <map:parameter name="documentid" value="{page-envelope:document-id}"/>

-              <map:parameter name="documenturl" value="{page-envelope:document-url}"/>

-            </map:transform>

-            <map:call resource="style-cms-page">

-              <map:parameter name="statusCode" value="404"/>

-            </map:call>

-          </map:when>

-	      <map:otherwise>

-	        <map:generate type="notifying"/>

-	        <map:transform src="fallback://lenya/xslt/exception/generic.xsl">

-	          <map:parameter name="documentid" value="{page-envelope:document-id}"/>

-	          <map:parameter name="documenturl" value="{page-envelope:document-url}"/>

-	          <map:parameter name="contextPath" value="{request:contextPath}"/>

-	        </map:transform>

-            <map:call resource="style-cms-page">

-              <map:parameter name="statusCode" value="500"/>

-            </map:call>

-	      </map:otherwise>

-        </map:select>

-        <map:transform src="fallback://lenya/xslt/util/strip_namespaces.xsl"/>

-        <map:serialize type="xhtml"/>

-      </map:handle-errors>    

-

-  </map:pipelines></xmap>
\ No newline at end of file
diff --git a/src/confpatch/resources.xmap b/src/confpatch/resources.xmap
deleted file mode 100644
index edfb259..0000000
--- a/src/confpatch/resources.xmap
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0"?>

-<!--

-  Copyright 1999-2004 The Apache Software Foundation

-

-  Licensed 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.

--->

-

-<xmap remove="/sitemap/resources" xpath="/sitemap" insert-after="/sitemap/views">

-<!-- =========================== Resources ================================= -->

-

-  <map:resources>

-    <map:resource name="style-cms-page">

-      <map:transform type="i18n">      

-        <map:parameter name="locale" value="{request:locale}"/>

-      </map:transform>    

-      <map:transform src="fallback://lenya/xslt/util/page2xhtml.xsl">

-        <map:parameter name="contextprefix" value="{request:contextPath}"/>

-      </map:transform>

-      <map:transform src="lenya/xslt/util/strip_namespaces.xsl"/>

-      <map:select type="parameter">

-        <map:parameter name="statusCode" value="{statusCode}"/>

-        <map:when test="">

-          <map:serialize/>

-        </map:when>

-        <!-- FIXME workaround for http://issues.apache.org/bugzilla/show_bug.cgi?id=32336 -->

-        <map:when test="404">

-          <map:serialize status-code="404"/>

-        </map:when>

-        <map:otherwise>

-          <map:serialize status-code="{statusCode}"/>

-        </map:otherwise>

-      </map:select>

-    </map:resource>

-  </map:resources>

-

-</xmap>
\ No newline at end of file
diff --git a/src/confpatch/selectors.xmap b/src/confpatch/selectors.xmap
deleted file mode 100644
index afdd069..0000000
--- a/src/confpatch/selectors.xmap
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0"?>

-<!--

-  Copyright 1999-2004 The Apache Software Foundation

-

-  Licensed 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.

--->

-

-<xmap xpath="/sitemap/components/selectors">

-    <map:selector logger="sitemap.selector.browser" name="client" src="org.apache.cocoon.selection.BrowserSelector">

-      <browser name="webdav" useragent="UCI DAV Explorer/0.91 RPT-HTTPClient/0.3-3E"/>

-      <browser name="webdav" useragent="Microsoft Data Access Internet Publishing Provider Protocol Discovery"/>

-      <browser name="webdav" useragent="UCI"/>

-      <browser name="webdav" useragent="DAV"/>

-      <browser name="webdav" useragent="dav"/>

-      <browser name="explorer" useragent="MSIE"/>

-      <browser name="mozilla5" useragent="Mozilla/5"/>

-      <browser name="mozilla5" useragent="Netscape6/"/>

-      <browser name="netscape" useragent="Mozilla"/>

-    </map:selector>

-

-</xmap>      

diff --git a/src/confpatch/serializers.xmap b/src/confpatch/serializers.xmap
deleted file mode 100644
index 33cb490..0000000
--- a/src/confpatch/serializers.xmap
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0"?>

-<!--

-  Copyright 1999-2004 The Apache Software Foundation

-

-  Licensed 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.

--->

-

-<xmap remove="/sitemap/components/serializers" xpath="/sitemap/components" insert-after="/sitemap/components/transformers">

-  <map:serializers default="xhtml">

-

-    <map:serializer name="html" logger="sitemap.serializer.html" mime-type="text/html; charset=utf-8" pool-grow="4" pool-max="32" 

-    pool-min="4" src="org.apache.cocoon.components.serializers.HTMLSerializer">

-      <encoding>UTF-8</encoding>

-    </map:serializer>

-    

-    <map:serializer name="html-no-dtd" logger="sitemap.serializer.html-no-dtd" mime-type="text/html; charset=utf-8" pool-grow="4" pool-max="32" pool-min="4" src="org.apache.cocoon.serialization.HTMLSerializer">

-      <buffer-size>1024</buffer-size>

-    </map:serializer>

-    

-    <map:serializer name="htmlnoi" logger="sitemap.serializer.htmlnoi" mime-type="text/html; charset=utf-8" pool-grow="4" pool-max="32" pool-min="4" src="org.apache.cocoon.serialization.HTMLSerializer"> 

-      <indent>no</indent>

-      <doctype-public>-//W3C//DTD HTML 4.01 Transitional//EN</doctype-public>

-      <doctype-system>http://www.w3.org/TR/html4/loose.dtd</doctype-system>

-      <encoding>UTF-8</encoding>

-    </map:serializer>

-    

-    <map:serializer name="xhtml" src="org.apache.cocoon.serialization.XMLSerializer" mime-type="text/html; charset=utf-8" logger="sitemap.serializer.xhtml" pool-grow="2" pool-max="64" pool-min="2"> 

-      <doctype-public>-//W3C//DTD XHTML 1.0 Strict//EN</doctype-public>

-      <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</doctype-system>

-      <encoding>UTF-8</encoding>

-    </map:serializer>

-    

-    <map:serializer name="xml" logger="sitemap.serializer.xml" mime-type="text/xml; charset=utf-8" src="org.apache.cocoon.components.serializers.XMLSerializer">

-       <encoding>UTF-8</encoding>

-    </map:serializer>

-    

-    <map:serializer name="links" logger="sitemap.serializer.links" src="org.apache.cocoon.serialization.LinkSerializer"/>

-    

-    <map:serializer name="wml" logger="sitemap.serializer.wml" mime-type="text/vnd.wap.wml" src="org.apache.cocoon.serialization.XMLSerializer">

-     <doctype-public>-//WAPFORUM//DTD WML 1.1//EN</doctype-public>

-     <doctype-system>http://www.wapforum.org/DTD/wml_1.1.xml</doctype-system>

-     <encoding>ASCII</encoding>

-     <omit-xml-declaration>yes</omit-xml-declaration>

-    </map:serializer>

-    

-    <map:serializer name="svgxml" logger="sitemap.serializer.svgxml" mime-type="image/svg-xml" src="org.apache.cocoon.serialization.XMLSerializer">

-     <doctype-public>-//W3C//DTD SVG 20000303 Stylable//EN</doctype-public>

-     <doctype-system>http://www.w3.org/TR/2000/03/WD-SVG-20000303/</doctype-system>

-    </map:serializer>

-    

-    <map:serializer name="text" logger="sitemap.serializer.text" mime-type="text/plain" src="org.apache.cocoon.serialization.TextSerializer">

-      <encoding>UTF-8</encoding>

-    </map:serializer>

-

-    <map:serializer name="fo2pdf" logger="sitemap.serializer.fo2pdf" mime-type="application/pdf" src="org.apache.cocoon.serialization.FOPSerializer"/>

-    <map:serializer name="fo2ps" logger="sitemap.serializer.fo2ps" mime-type="application/postscript" src="org.apache.cocoon.serialization.FOPSerializer"/>

-    <map:serializer name="fo2pcl" logger="sitemap.serializer.fo2pcl" mime-type="vnd.hp-PCL" src="org.apache.cocoon.serialization.FOPSerializer"/>

-    <map:serializer name="svgxml" logger="sitemap.serializer.svgxml" mime-type="image/svg-xml" src="org.apache.cocoon.serialization.XMLSerializer">

-      <doctype-public>-//W3C//DTD SVG 20000303 Stylable//EN</doctype-public>

-      <doctype-system>http://www.w3.org/TR/2000/03/WD-SVG-20000303/</doctype-system>

-    </map:serializer>

-    <map:serializer name="svg2jpeg" logger="sitemap.serializer.svg2png" mime-type="image/jpeg" src="org.apache.cocoon.serialization.SVGSerializer">

-      <parameter name="quality" type="float" value="0.9"/>

-    </map:serializer>

-    <map:serializer name="svg2png" logger="sitemap.serializer.svg2png" mime-type="image/png" src="org.apache.cocoon.serialization.SVGSerializer"/>

-

-  </map:serializers></xmap>

diff --git a/src/confpatch/transformers.xmap b/src/confpatch/transformers.xmap
deleted file mode 100644
index 3b36932..0000000
--- a/src/confpatch/transformers.xmap
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0"?>

-<!--

-  Copyright 1999-2004 The Apache Software Foundation

-

-  Licensed 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.

--->

-

-<xmap xpath="/sitemap/components/transformers" 

-    unless="/sitemap/components/transformers/transformer[@name = 'access-control-sitetree']">

-    <map:transformer name="access-control-sitetree" logger="lenya.sitemap.transformer.accesscontrolsitetree" src="org.apache.lenya.cms.cocoon.transformation.AccessControlSitetreeTransformer"/>

-    <map:transformer name="index" logger="lenya.sitemap.transformer.index" src="org.apache.lenya.cms.cocoon.transformation.DocumentIndexTransformer"/>

-    <map:transformer name="link-rewrite" logger="lenya.sitemap.transformer.link-rewrite" src="org.apache.lenya.cms.cocoon.transformation.LinkRewritingTransformer"/>

-    <map:transformer name="usecasemenu" logger="lenya.sitemap.transformer.usecasemenu" src="org.apache.lenya.cms.cocoon.transformation.UsecaseMenuTransformer"/>

-    <map:transformer name="workflowmenu" logger="lenya.sitemap.transformer.workflowmenu" src="org.apache.lenya.cms.cocoon.transformation.WorkflowMenuTransformer"/>

-    <map:transformer name="i18n" logger="sitemap.transformer.i18n" src="org.apache.cocoon.transformation.I18nTransformer">

-      <catalogues default="cmsui">

-         <catalogue id="cmsui" name="cmsui" location="cocoon://i18n-catalogue/"/>

-       </catalogues>

-       <untranslated-text>untranslated</untranslated-text>

-       <cache-at-startup>true</cache-at-startup>

-    </map:transformer>

-</xmap>
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/ac/AccessControlException.java b/src/java/org/apache/lenya/ac/AccessControlException.java
deleted file mode 100644
index 2ba6c74..0000000
--- a/src/java/org/apache/lenya/ac/AccessControlException.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac;
-
-/**
- * Access control exception.
- * @version $Id$
- */
-public class AccessControlException extends Exception {
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/**
-     * Create an AccessControlException
-     *
-     */
-    public AccessControlException() {
-        super();
-    }
-
-    /**
-     * Create an AccessControlException
-     *
-     * @param message The message.
-     */
-    public AccessControlException(String message) {
-        super(message);
-    }
-
-    /**
-     * Create an AccessControlException
-     *
-     * @param message The message.
-     * @param cause The cause.
-     */
-    public AccessControlException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    /**
-     * Create an AccessControlException.
-     *
-     * @param cause The cause.
-     */
-    public AccessControlException(Throwable cause) {
-        super(cause);
-    }
-}
diff --git a/src/java/org/apache/lenya/ac/AccessController.java b/src/java/org/apache/lenya/ac/AccessController.java
deleted file mode 100644
index b6a6526..0000000
--- a/src/java/org/apache/lenya/ac/AccessController.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac;
-
-import org.apache.avalon.framework.component.Component;
-import org.apache.cocoon.environment.Request;
-
-/**
- * An access controller allows authenticating and authorizing identities.
- * @version $Id$
- */
-public interface AccessController extends Component {
-
-    /**
-     * The access control namespace URI.
-     */
-    String NAMESPACE = "http://apache.org/cocoon/lenya/ac/1.0";
-
-    /**
-     * The default prefix for the access control namespace.
-     */
-    String DEFAULT_PREFIX = "ac";
-
-    /**
-     * The Avalon role.
-     */
-    String ROLE = AccessController.class.getName();
-
-    /**
-     * Authenticates a request.
-     * @param request A request.
-     * @return A boolean value.
-     * @throws AccessControlException when something went wrong.
-     */
-    boolean authenticate(Request request) throws AccessControlException;
-
-    /**
-     * Authorizes a request inside a publication.
-     * @param request A request.
-     * @return A boolean value.
-     * @throws AccessControlException when something went wrong.
-     */
-    boolean authorize(Request request) throws AccessControlException;
-
-    /**
-     * Initializes the identity for this access controller.
-     * @param request The request that contains the identity information.
-     * @throws AccessControlException when something went wrong.
-     */
-    void setupIdentity(Request request) throws AccessControlException;
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/ac/AccessControllerResolver.java b/src/java/org/apache/lenya/ac/AccessControllerResolver.java
deleted file mode 100644
index e5ef3bf..0000000
--- a/src/java/org/apache/lenya/ac/AccessControllerResolver.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac;
-
-import org.apache.avalon.framework.component.Component;
-
-/**
- * An access controller resolver resolves the appropriate access controller
- * for a given Cocoon object model.
- */
-public interface AccessControllerResolver extends Component {
-    
-    /**
-     * The Avalon role.
-     */
-    String ROLE = AccessControllerResolver.class.getName();
-    
-    /**
-     * The name of the default resolver to use.
-     */
-    String DEFAULT_RESOLVER = "publication";
-
-    /**
-     * Resolves an access controller for a certain URL.
-     * @param webappUrl The URL within the web application (without context prefix).
-     * @return An access controller or <code>null</code> if no controller could be resolved.
-     * @throws AccessControlException when something went wrong.
-     */
-    AccessController resolveAccessController(String webappUrl) throws AccessControlException;
-    
-    /**
-     * Releases a resolved access controller. 
-     * @param controller The access controller to release.
-     */
-    void release(AccessController controller);
-
-}
diff --git a/src/java/org/apache/lenya/ac/Accreditable.java b/src/java/org/apache/lenya/ac/Accreditable.java
deleted file mode 100644
index 06872db..0000000
--- a/src/java/org/apache/lenya/ac/Accreditable.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac;
-
-
-/**
- * An Accreditable can be accredited with roles on a certain URI
- * using a {@link org.apache.lenya.ac.impl.Credential}.
- */
-public interface Accreditable {
-    /**
-     * Returns the set of accreditables of this accreditable.
-     * The set contains the accreditable itself and all collections it belongs to.
-     * @return An array of accreditables.
-     */
-    Accreditable[] getAccreditables();
-}
diff --git a/src/java/org/apache/lenya/ac/AccreditableManager.java b/src/java/org/apache/lenya/ac/AccreditableManager.java
deleted file mode 100644
index 5c0be35..0000000
--- a/src/java/org/apache/lenya/ac/AccreditableManager.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac;
-
-import org.apache.avalon.framework.component.Component;
-
-/**
- * An AccreditableManager combines a UserManager, a GroupManager, an IPRangeManager and a
- * RoleManager.
- * @version $Id$
- */
-public interface AccreditableManager extends Component {
-
-    /**
-     * Avalon role.
-     */
-    String ROLE = AccreditableManager.class.getName();
-
-    /**
-     * Returns the user manager of this access controller.
-     * @return A user manager.
-     * @throws AccessControlException when something went wrong.
-     */
-    UserManager getUserManager() throws AccessControlException;
-
-    /**
-     * Returns the group manager of this access controller.
-     * @return A group manager.
-     * @throws AccessControlException when something went wrong.
-     */
-    GroupManager getGroupManager() throws AccessControlException;
-
-    /**
-     * Returns the role manager of this access controller.
-     * @return A role manager.
-     * @throws AccessControlException when something went wrong.
-     */
-    RoleManager getRoleManager() throws AccessControlException;
-
-    /**
-     * Returns the IP range manager of this access controller.
-     * @return An IP range manager.
-     * @throws AccessControlException when something went wrong.
-     */
-    IPRangeManager getIPRangeManager() throws AccessControlException;
-
-    /**
-     * Attaches an item manager listener to this accreditable manager.
-     * @param listener An item manager listener.
-     */
-    void addItemManagerListener(ItemManagerListener listener);
-
-    /**
-     * Removes an item manager listener from this accreditable manager.
-     * @param listener An item manager listener.
-     */
-    void removeItemManagerListener(ItemManagerListener listener);
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/ac/Authenticator.java b/src/java/org/apache/lenya/ac/Authenticator.java
deleted file mode 100644
index eb9fd4b..0000000
--- a/src/java/org/apache/lenya/ac/Authenticator.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac;
-
-import org.apache.avalon.framework.component.Component;
-import org.apache.cocoon.environment.Request;
-
-/**
- * An authenticator.
- * @version $Id$
- */
-public interface Authenticator extends Component {
-
-    /**
-     * Avalon role.
-     */
-    String ROLE = Authenticator.class.getName();
-
-    /**
-     * Authenticates a request.
-     * @param accreditableManager The accreditable manager to use.
-     * @param request The request.
-     * @return <code>true</code> if the request is authenticated, <code>false</code> otherwise.
-     * @throws AccessControlException when something went wrong.
-     */
-    boolean authenticate(AccreditableManager accreditableManager, Request request)
-        throws AccessControlException;
-}
diff --git a/src/java/org/apache/lenya/ac/Authorizer.java b/src/java/org/apache/lenya/ac/Authorizer.java
deleted file mode 100644
index 5815b7a..0000000
--- a/src/java/org/apache/lenya/ac/Authorizer.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac;
-
-import org.apache.avalon.framework.component.Component;
-import org.apache.cocoon.environment.Request;
-
-/**
- * An Authorizer checks if an Identity is authorized to invoke a certain request.
- * @version $Id$
- */
-public interface Authorizer extends Component {
-    
-    /**
-     * The Avalon role.
-     */
-    String ROLE = Authorizer.class.getName();
-
-    /**
-     * Authorizes an identity at a URL.
-     * @param request The request.
-     * @return <code>true</code> if the identity is authorized, <code>false</code> otherwise.
-     * @throws AccessControlException when something went wrong.
-     */
-    boolean authorize(Request request)
-        throws AccessControlException;
-
-}
diff --git a/src/java/org/apache/lenya/ac/Group.java b/src/java/org/apache/lenya/ac/Group.java
deleted file mode 100644
index b2ece52..0000000
--- a/src/java/org/apache/lenya/ac/Group.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac;
-
-/**
- * A group.
- * @version $Id$
- */
-public interface Group extends Identifiable, Item {
-    
-    /**
-     * Returns the members of this group.
-     * @return An array of {@link Groupable}s.
-     */
-    Groupable[] getMembers();
-    
-    /**
-     * Adds a member to this group.
-     * @param member The member to add.
-     */
-    void add(Groupable member);
-    
-    /**
-     * Removes a member from this group.
-     * @param member The member to remove.
-     */
-    void remove(Groupable member);
-    
-    /**
-     * Removes all members from this group.
-     */
-    void removeAllMembers();
-    
-    /**
-     * Returns if this group contains this member.
-     * @param member The member to check.
-     * @return A boolean value.
-     */
-    boolean contains(Groupable member);
-    
-    /**
-     * Delete a group.
-     * @throws AccessControlException if the delete failed
-     */
-    void delete() throws AccessControlException;
-    
-    /**
-     * Saves this group.
-     * @throws AccessControlException when saving failed.
-     */
-    void save() throws AccessControlException;
-    
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/ac/GroupManager.java b/src/java/org/apache/lenya/ac/GroupManager.java
deleted file mode 100644
index 327499c..0000000
--- a/src/java/org/apache/lenya/ac/GroupManager.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac;
-
-/**
- * A group manager.
- * @version $Id$
- */
-public interface GroupManager extends ItemManager {
-    
-    /**
-     * Get all groups.
-     * @return an array of groups.
-     */
-    Group[] getGroups();
-    
-    /**
-     * Add a group to this manager.
-     * @param group the group to be added.
-     * @throws AccessControlException when the group is already contained.
-     */
-    void add(Group group) throws AccessControlException;
-    
-    /**
-     * Remove a group from this manager.
-     * @param group the group to be removed.
-     * @throws AccessControlException when the group is not contained.
-     */
-    void remove(Group group) throws AccessControlException;
-    
-    /**
-     * Get the group with the given group name.
-     *
-     * @param groupId the id of the requested group.
-     * @return a <code>Group</code> or null if there is no group with the given name
-     */
-    Group getGroup(String groupId);
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/ac/Groupable.java b/src/java/org/apache/lenya/ac/Groupable.java
deleted file mode 100644
index b79f7ba..0000000
--- a/src/java/org/apache/lenya/ac/Groupable.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac;
-
-/**
- * Generalized interface of group member objects.
- * @version $Id$
- */
-public interface Groupable {
-    
-    /**
-     * Notifies this Groupable of being added to a group.
-     * @param group The group.
-     */
-    void addedToGroup(Group group);
-
-    /**
-     * Notifies this Groupable of being removed from a group.
-     * @param group The group.
-     */
-    void removedFromGroup(Group group);
-
-    /**
-     * Returns all groups that contain this Groupable.
-     * @return A {@link Group} array.
-     */
-    Group[] getGroups();
-    
-    /**
-     * Removes this Groupable from all groups.
-     */
-    void removeFromAllGroups();
-}
diff --git a/src/java/org/apache/lenya/ac/IPRange.java b/src/java/org/apache/lenya/ac/IPRange.java
deleted file mode 100644
index 71bd930..0000000
--- a/src/java/org/apache/lenya/ac/IPRange.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac;
-
-import java.net.InetAddress;
-
-
-/**
- * An IP range.
- */
-public interface IPRange extends Accreditable, Item, Groupable {
-    
-    /**
-     * Sets the network address.
-     * 
-     * @param address A string, e.g. 192.168.0.32
-     * 
-     * @throws AccessControlException when the conversion of the String to an
-     * InetAddress failed.
-     */
-    void setNetworkAddress(String address) throws AccessControlException;
-    
-    /**
-     * Sets the network address.
-     * 
-     * @param address A byte array of the length 4.
-     * 
-     * @throws AccessControlException when the conversion of the byte array to an
-     * InetAddress failed.
-     */
-    void setNetworkAddress(byte[] address) throws AccessControlException;
-    
-    /**
-     * Returns the network address.
-     * @return An InetAddress value.
-     */
-    InetAddress getNetworkAddress();
-    
-    /**
-     * Sets the subnet mask.
-     * 
-     * @param mask A string, e.g. 192.168.0.32
-     * 
-     * @throws AccessControlException when the conversion of the String to an
-     * InetAddress failed.
-     */
-    void setSubnetMask(String mask) throws AccessControlException;
-    
-    /**
-     * Sets the subnet mask.
-     * 
-     * @param mask A byte array of the length 4.
-     * 
-     * @throws AccessControlException when the conversion of the byte array to an
-     * InetAddress failed.
-     */
-    void setSubnetMask(byte[] mask) throws AccessControlException;
-    
-    /**
-     * Returns the subnet mask.
-     * @return An InetAddress value.
-     */
-    InetAddress getSubnetMask();
-    
-    /**
-     * Checks if this IP range contains a certain machine.
-     * @param machine The machine to check for.
-     * @return A boolean value.
-     */
-    boolean contains(Machine machine);
-
-    /**
-     * Save the IP range.
-     * @throws AccessControlException if the save failed
-     */
-    void save() throws AccessControlException;
-    
-    /**
-     * Delete an IP range.
-     * @throws AccessControlException if the delete failed
-     */
-    void delete() throws AccessControlException;
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/ac/IPRangeManager.java b/src/java/org/apache/lenya/ac/IPRangeManager.java
deleted file mode 100644
index f6cb00e..0000000
--- a/src/java/org/apache/lenya/ac/IPRangeManager.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac;
-
-/**
- * An IP range manager.
- */
-public interface IPRangeManager extends ItemManager {
-    
-    /**
-     * Get all IP ranges.
-     *
-     * @return an array of IP ranges.
-     */
-    IPRange[] getIPRanges();
-    
-    /**
-     * Add the given IP range
-     *
-     * @param range IP range that is to be added
-     * @throws AccessControlException when the IP range is already contained.
-     */
-    void add(IPRange range) throws AccessControlException;
-    
-    /**
-     * Remove the given IP range
-     *
-     * @param range IP range that is to be removed
-     * @throws AccessControlException when the IP range is not contained.
-     */
-    void remove(IPRange range) throws AccessControlException;
-    
-    /**
-     * Get the IPRange with the given id.
-     *
-     * @param rangeId user id of requested IP range
-     * @return the requested IP range or null if there is
-     * no IP range with the given id
-     */
-    IPRange getIPRange(String rangeId);
-    
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/ac/Identifiable.java b/src/java/org/apache/lenya/ac/Identifiable.java
deleted file mode 100644
index 1fb7bc8..0000000
--- a/src/java/org/apache/lenya/ac/Identifiable.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac;
-
-/**
- * A marker interface to mark an {@link Accreditable} as identifiable.
- */
-public interface Identifiable extends Accreditable {
-    // implement here
-}
diff --git a/src/java/org/apache/lenya/ac/Identity.java b/src/java/org/apache/lenya/ac/Identity.java
deleted file mode 100644
index 4258519..0000000
--- a/src/java/org/apache/lenya/ac/Identity.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.Serializable;
-
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.cocoon.environment.Session;
-
-/**
- * Identity object. Used to store the authenticated accreditables in the session.
- */
-public class Identity extends AbstractLogEnabled implements Identifiable, Serializable {
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-	private Set identifiables = new HashSet();
-
-    /**
-     * Ctor.
-     */
-    public Identity() {
-	    // do nothing
-    }
-    
-    /**
-     * Initializes this identity.
-     */
-    public void initialize() {
-        addIdentifiable(World.getInstance());
-    }
-
-    /**
-     * In the case of Tomcat the object will be serialized to TOMCAT/work/Standalone/localhost/lenya/SESSIONS.ser
-     * @param out OutputStream to hold the serialized identity
-     * @throws IOException
-     */
-    private void writeObject(ObjectOutputStream out) throws IOException {
-        out.defaultWriteObject();
-        out.writeObject(this.identifiables);
-    }
-
-    /**
-     * In case of Tomcat the object will be restored from TOMCAT/work/Standalone/localhost/lenya/SESSIONS.ser
-     * @param in InputStream that holds the serialized identity
-     * @throws IOException
-     * @throws ClassNotFoundException
-     */
-    private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
-        in.defaultReadObject();
-        this.identifiables = (Set) in.readObject();
-    }
-
-    /**
-     * Returns the identifiables of this identity.
-     * @return An array of identifiables.
-     */
-    public Identifiable[] getIdentifiables() {
-        return (Identifiable[]) this.identifiables.toArray(new Identifiable[this.identifiables.size()]);
-    }
-
-    /**
-     * Adds a new identifiable to this identity.
-     * @param identifiable The identifiable to add.
-     */
-    public void addIdentifiable(Identifiable identifiable) {
-        assert identifiable != null;
-        assert identifiable != this;
-        assert !this.identifiables.contains(identifiable);
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Adding identifiable: [" + identifiable + "]");
-        }
-
-        this.identifiables.add(identifiable);
-    }
-
-    /**
-     * @see Accreditable#getAccreditables()
-     */
-    public Accreditable[] getAccreditables() {
-        Set accreditables = new HashSet();
-        Identifiable[] _identifiables = getIdentifiables();
-
-        for (int i = 0; i < _identifiables.length; i++) {
-            Accreditable[] groupAccreditables = _identifiables[i].getAccreditables();
-            accreditables.addAll(Arrays.asList(groupAccreditables));
-        }
-
-        return (Accreditable[]) accreditables.toArray(new Accreditable[accreditables.size()]);
-    }
-
-    /**
-     * @see java.lang.Object#toString()
-     */
-    public String toString() {
-        StringBuffer buf = new StringBuffer();
-        Accreditable[] accreditables = getAccreditables();
-
-        for (int i = 0; i < accreditables.length; i++) {
-            buf.append(" " + accreditables[i]);
-        }
-
-        String string = "[identity:" + buf.toString() + "]";
-
-        return string;
-    }
-
-    /**
-     * Checks if this identity belongs to a certain accreditable manager.
-     * @param manager The accreditable manager to check for.
-     * @return A boolean value.
-     * @throws AccessControlException if an error occurs
-     */
-    public boolean belongsTo(AccreditableManager manager) throws AccessControlException {
-
-        boolean belongs = true;
-
-        Identifiable _identifiables[] = getIdentifiables();
-        int i = 0;
-        while (belongs && i < _identifiables.length) {
-            if (_identifiables[i] instanceof User) {
-                User user = (User) _identifiables[i];
-                User otherUser = manager.getUserManager().getUser(user.getId());
-                belongs = belongs && user == otherUser;
-            }
-            i++;
-        }
-
-        return belongs;
-    }
-
-    /**
-     * Returns the user of this identity.
-     * @return A user.
-     */
-    public User getUser() {
-        User user = null;
-        Identifiable[] _identifiables = getIdentifiables();
-        int i = 0;
-        while (user == null && i < _identifiables.length) {
-            if (_identifiables[i] instanceof User) {
-                user = (User) _identifiables[i];
-            }
-            i++;
-        }
-        return user;
-    }
-
-    /**
-     * Returns the machine of this identity.
-     * @return A machine.
-     */
-    public Machine getMachine() {
-        Machine machine = null;
-        Identifiable[] _identifiables = getIdentifiables();
-        int i = 0;
-        while (machine == null && i < _identifiables.length) {
-            if (_identifiables[i] instanceof Machine) {
-                machine = (Machine) _identifiables[i];
-            }
-            i++;
-        }
-        return machine;
-    }
-
-    /**
-     * Checks if this identity contains a certain identifiable.
-     * @param identifiable The identifiable to look for.
-     * @return A boolean value.
-     */
-    public boolean contains(Identifiable identifiable) {
-        return this.identifiables.contains(identifiable);
-    }
-
-    /**
-     * Fetches the identity from a session.
-     * @param session The session.
-     * @return An identity.
-     */
-    public static Identity getIdentity(Session session) {
-        Identity identity = (Identity) session.getAttribute(Identity.class.getName());
-        return identity;
-    }
-
-    /**
-     * Removes a certain identifiable from the idenity.
-     * @param identifiable An identifiable.
-     */
-    public void removeIdentifiable(Identifiable identifiable) {
-        assert this.identifiables.contains(identifiable);
-        this.identifiables.remove(identifiable);
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/ac/Item.java b/src/java/org/apache/lenya/ac/Item.java
deleted file mode 100644
index 8925391..0000000
--- a/src/java/org/apache/lenya/ac/Item.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac;
-
-import java.io.File;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.logger.LogEnabled;
-
-
-/**
- * An item can be initialized from a configuration.
- */
-public interface Item extends LogEnabled {
-    
-    /**
-     * Returns the ID.
-     * @return A string.
-     */
-    String getId();
-    
-    /**
-     * Returns the name.
-     * @return A string.
-     */
-    String getName();
-    
-    /**
-     * Sets the name.
-     * @param name A string.
-     */
-    void setName(String name);
-    
-    /**
-     * Returns the description.
-     * @return A string.
-     */
-    String getDescription();
-
-    /**
-     * Sets the description.
-     * @param description A string.
-     */
-    void setDescription(String description);
-    
-    /**
-     * Sets the configuration directory of this item.
-     * @param configurationDirectory The configuration directory.
-     */
-    void setConfigurationDirectory(File configurationDirectory);
-
-    /**
-     * Configures this item.
-     * @param configuration The configuration.
-     * @throws ConfigurationException when something went wrong.
-     */
-    void configure(Configuration configuration) throws ConfigurationException;
-    
-}
diff --git a/src/java/org/apache/lenya/ac/ItemManager.java b/src/java/org/apache/lenya/ac/ItemManager.java
deleted file mode 100644
index 18e2e73..0000000
--- a/src/java/org/apache/lenya/ac/ItemManager.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac;
-
-/**
- * Item manager.
- * @version $Id$
- */
-public interface ItemManager {
-
-    /**
-     * Adds an item manager listener.
-     * @param listener The listener to add.
-     */
-    void addItemManagerListener(ItemManagerListener listener);
-    
-    /**
-     * Removes an item manager listener.
-     * @param listener The listener to remove.
-     */
-    void removeItemManagerListener(ItemManagerListener listener);
-    
-}
diff --git a/src/java/org/apache/lenya/ac/ItemManagerListener.java b/src/java/org/apache/lenya/ac/ItemManagerListener.java
deleted file mode 100644
index 4c99dea..0000000
--- a/src/java/org/apache/lenya/ac/ItemManagerListener.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac;
-
-/**
- * This class allows listening to objects that manages items.
- */
-public interface ItemManagerListener {
-
-    /**
-	 * Called when an accreditable was added.
-	 * 
-	 * @param item The item that was added.
-	 * @throws AccessControlException when an error occurs.
-	 */
-    void itemAdded(Item item) throws AccessControlException;
-
-    /**
-	 * Called when an accreditable was removed.
-	 * 
-	 * @param item The item that was removed.
-	 * @throws AccessControlException when an error occurs.
-	 */
-    void itemRemoved(Item item) throws AccessControlException;
-
-}
diff --git a/src/java/org/apache/lenya/ac/Machine.java b/src/java/org/apache/lenya/ac/Machine.java
deleted file mode 100644
index 2335b87..0000000
--- a/src/java/org/apache/lenya/ac/Machine.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac;
-
-import java.io.Serializable;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * A machine (representing an IP address).
- * @version $Id$
- */
-public class Machine implements Identifiable, Serializable {
-
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/**
-     * Creates a new machine object. This method accepts
-     * numeric IPv4 addresses like <code>"129.168.0.32"</code>,
-     * numeric IPv6 addresses like <code>"1080::8:800:200C:417A"</code>
-     * as well as hostnames (if DNS resolution is available) like
-     * <code>"localhost"</code> or <code>"www.apache.com"</code>.
-     * 
-     * @param ip a <code>String</code> like <code>"192.168.0.32"</code>,
-     *      <code>"::1"</code>, ...
-     * .
-     * @throws AccessControlException when the conversion of the
-     *      <code>String</code> to an <code>InetAddress</code> failed
-     */
-    public Machine(String ip) throws AccessControlException {
-        try {
-            setAddress(InetAddress.getByName(ip));
-        } catch(UnknownHostException uhe) {
-            throw new AccessControlException
-                ("Failed to convert address [" + ip + "]: ", uhe);
-        }
-    }
-
-    private InetAddress address;
-
-    /**
-     * @see java.lang.Object#equals(Object)
-     */
-    public boolean equals(Object otherObject) {
-        boolean equals = false;
-
-        if (otherObject instanceof Machine) {
-            Machine otherMachine = (Machine) otherObject;
-            equals = getAddress().equals(otherMachine.getAddress());
-        }
-
-        return equals;
-    }
-
-    /**
-     * @see java.lang.Object#hashCode()
-     */
-    public int hashCode() {
-        return getAddress().hashCode();
-    }
-
-    /**
-     * @see org.apache.lenya.ac.Accreditable#getAccreditables()
-     */
-    public Accreditable[] getAccreditables() {
-        Accreditable[] ranges = getIPRanges();
-        Accreditable[] accreditables = new Accreditable[ranges.length + 1];
-        accreditables[0] = this;
-        for (int i = 0; i < ranges.length; i++) {
-            accreditables[i+1] = ranges[i];
-        }
-        return accreditables;
-    }
-
-    /**
-     * Returns the IP address.
-     * @return The IP address.
-     */
-    public String getIp() {
-        return getAddress().getHostAddress();
-    }
-
-    /**
-     * Converts a string to an IP addres.
-     * @param string The IP address, represented by a string.
-     * @return An InetAddress object.
-     * @throws AccessControlException when something went wrong.
-     * @deprecated This method is unnecessary and does not work for IPv6.
-     *      Use <code>InetAddress.getByName(string)</code> instead!
-     */
-    public static InetAddress getAddress(String string)
-        throws AccessControlException {
-        String[] strings = string.split("\\.");
-
-        InetAddress address;
-        try {
-            byte[] numbers = new byte[strings.length];
-            for (int i = 0; i < strings.length; i++) {
-                int number = Integer.parseInt(strings[i]);
-                if (number > 127) {
-                    number = number - 256;
-                }
-                numbers[i] = (byte) number;
-            }
-
-            address = InetAddress.getByAddress(numbers);
-        } catch (final NumberFormatException e1) {
-            throw new AccessControlException(
-                    "Failed to convert address [" + string + "]: ",
-                    e1);
-        } catch (final UnknownHostException e1) {
-            throw new AccessControlException(
-                    "Failed to convert address [" + string + "]: ",
-                    e1);
-        }
-        return address;
-    }
-
-    /**
-     * @see java.lang.Object#toString()
-     */
-    public String toString() {
-        return getIp();
-    }
-
-    /**
-     * Returns the IP address.
-     * @return An IP address.
-     */
-    public InetAddress getAddress() {
-        return this.address;
-    }
-
-    /**
-     * Sets the IP address.
-     * @param _address An IP address.
-     */
-    public void setAddress(InetAddress _address) {
-        this.address = _address;
-    }
-
-    private List ipRanges = new ArrayList();
-    
-    /**
-     * Adds an IP range to this machine.
-     * @param range An IP range this machine belongs to.
-     */
-    public void addIPRange(IPRange range) {
-        assert range != null;
-        assert !this.ipRanges.contains(range);
-        this.ipRanges.add(range);
-    }
-    
-    /**
-     * Returns the IP ranges this machine belongs to.
-     * @return An array of IP ranges.
-     */
-    public IPRange[] getIPRanges() {
-        return (IPRange[]) this.ipRanges.toArray(new IPRange[this.ipRanges.size()]);
-    }
-    
-}
diff --git a/src/java/org/apache/lenya/ac/Password.java b/src/java/org/apache/lenya/ac/Password.java
deleted file mode 100644
index e26c60e..0000000
--- a/src/java/org/apache/lenya/ac/Password.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac;
-
-import java.security.MessageDigest;
-
-/**
- * Encrypt plain text password
- * Example: "message digest" becomes "f96b697d7cb7938d525a2f31aaf161d0" (hexadecimal notation (32 characters))
- */
-public class Password {
-
-    /**
-     * Encrypt plain text password
-     *
-     * @param plain plain text password
-     * @return encrypted password
-     */
-    public static String encrypt(String plain) {
-        return getMD5(plain);
-    }
-
-    /**
-     * Returns the MD5 representation of a string.
-     * @param plain The plain string.
-     * @return A string.
-     */
-    public static String getMD5(String plain) {
-        MessageDigest md = null;
-        try {
-            md = MessageDigest.getInstance("MD5");
-        } catch (java.security.NoSuchAlgorithmException e) {
-            throw new RuntimeException(e);
-        }
-        return stringify(md.digest(plain.getBytes()));
-    }
-
-    /**
-     * Converts a byte buffer to a string.
-     * @param buf The buffer.
-     * @return A string.
-     */
-    private static String stringify(byte[] buf) {
-        StringBuffer sb = new StringBuffer(2 * buf.length);
-
-        for (int i = 0; i < buf.length; i++) {
-            int h = (buf[i] & 0xf0) >> 4;
-            int l = (buf[i] & 0x0f);
-            sb.append(new Character((char) ((h > 9) ? (('a' + h) - 10) : ('0' + h))));
-            sb.append(new Character((char) ((l > 9) ? (('a' + l) - 10) : ('0' + l))));
-        }
-
-        return sb.toString();
-    }
-}
diff --git a/src/java/org/apache/lenya/ac/Policy.java b/src/java/org/apache/lenya/ac/Policy.java
deleted file mode 100644
index 325717f..0000000
--- a/src/java/org/apache/lenya/ac/Policy.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac;
-
-/**
- * A policy assigns roles to accreditables using credentials.
- * Additionally, SSL protection is defined.
- * 
- * @version $Id$
- */
-public interface Policy {
-    /**
-     * Returns all roles of a certain identity.
-     * @param identity The identity.
-     * @return An array of roles.
-     * @throws AccessControlException when something went wrong.
-     */
-    Role[] getRoles(Identity identity) throws AccessControlException;
-    
-    /**
-     * Returns if this policy requires SSL protection.
-     * @return A boolean value.
-     * @throws AccessControlException when something went wrong.
-     */
-    boolean isSSLProtected() throws AccessControlException;
-    
-    /**
-     * Returns if the policy is empty. A policy is empty if it does
-     * not contain any credentials.
-     * @return A boolean value.
-     * @throws AccessControlException when something went wrong.
-     */
-    boolean isEmpty() throws AccessControlException;
-}
diff --git a/src/java/org/apache/lenya/ac/PolicyManager.java b/src/java/org/apache/lenya/ac/PolicyManager.java
deleted file mode 100644
index 84911c1..0000000
--- a/src/java/org/apache/lenya/ac/PolicyManager.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac;
-
-import org.apache.avalon.framework.component.Component;
-
-/**
- * A policy manager.
- * @version $Id$
- */
-public interface PolicyManager extends Component {
-
-    /**
-     * The Avalon role.
-     */
-    String ROLE = PolicyManager.class.getName();
-
-    /**
-	 * Returns the policy for a given page.
-	 * 
-	 * @param controller The access controller.
-	 * @param url The url inside the web application.
-	 * @return The policy.
-	 * @throws AccessControlException when something went wrong.
-	 */
-    Policy getPolicy(AccreditableManager controller, String url) throws AccessControlException;
-
-    /**
-     * Called when an accreditable was added. Used to create the admin interface policy.
-     * 
-     * @param manager The accreditable manager the accreditable belonged to.
-     * @param accreditable The accreditable that was removed.
-     * @throws AccessControlException when something went wrong.
-     */
-    void accreditableAdded(AccreditableManager manager, Accreditable accreditable) throws AccessControlException;
-
-    /**
-	 * Called when an accreditable was removed. Used to clean up the policies
-     * and to remove the admin interface policy.
-	 * 
-     * @param manager The accreditable manager the accreditable belonged to.
-	 * @param accreditable The accreditable that was removed.
-     * @throws AccessControlException when something went wrong.
-	 */
-    void accreditableRemoved(AccreditableManager manager, Accreditable accreditable) throws AccessControlException;
-
-}
diff --git a/src/java/org/apache/lenya/ac/Role.java b/src/java/org/apache/lenya/ac/Role.java
deleted file mode 100644
index 233968d..0000000
--- a/src/java/org/apache/lenya/ac/Role.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac;
-
-/**
- * The role interface.
- * @version $Id$
- */
-public interface Role extends Item {
-    // do nothing
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/ac/RoleManager.java b/src/java/org/apache/lenya/ac/RoleManager.java
deleted file mode 100644
index 5cb803b..0000000
--- a/src/java/org/apache/lenya/ac/RoleManager.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac;
-
-/**
- * Role manager.
- * @version $Id$
- */
-public interface RoleManager extends ItemManager {
-    
-    /**
-     * Get the role for the given ID.
-     *
-     * @param roleId The name of the role requested.
-     * @return a <code>Role</code> or null if no role with the given name found
-     */
-    Role getRole(String roleId);
-    
-    /**
-     * Get all roles
-     *
-     * @return an array of roles
-     */
-    Role[] getRoles();
-    
-    /**
-     * Add a role
-     *
-     * @param role Role to add
-     * @throws AccessControlException when the role is already contained.
-     */
-    void add(Role role) throws AccessControlException;
-    
-    /**
-     * Remove a role
-     *
-     * @param role Role to remove
-     * @throws AccessControlException when the role is not contained.
-     */
-    void remove(Role role) throws AccessControlException;
-    
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/ac/User.java b/src/java/org/apache/lenya/ac/User.java
deleted file mode 100644
index cf8b2c6..0000000
--- a/src/java/org/apache/lenya/ac/User.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac;
-
-/**
- * A user.
- * @version $Id$
- */
-public interface User extends Identifiable, Item, Groupable {
-    
-    /**
-     * Get the email address
-     *
-     * @return a <code>String</code>
-     */
-    String getEmail();
-    
-    /**
-     * Set the email address
-     *
-     * @param email the new email address
-     */
-    void setEmail(String email);
-    
-    /**
-     * Sets the password.
-     * @param plainTextPassword The plain text password.
-     */
-    void setPassword(String plainTextPassword);
-    
-    /**
-     * Returns the user's preferred locale for the Lenya
-     * CMS menus and CMS screens.
-     * 
-     * The locale can either be a 2 letter country code 
-     * (de, en) or a locale code according to RFC 1766 /
-     * ISO 639 / ISO 3166 (de_DE, de_CH, de_AT, en_US, ...)  
-     */
-    String getDefaultMenuLocale();
-    
-    /**
-     * Sets the user's preferred locale for the Lenya
-     * menu and CMS screens.
-     * 
-     * The locale can either be a 2 letter country code 
-     * (de, en) or a locale code according to RFC 1766 /
-     * ISO 639 / ISO 3166 (de_DE, de_CH, de_AT, en_US, ...)
-     */
-    void setDefaultMenuLocale(String menuLocale);
-    
-    /**
-     * Returns the user's default locale of documents
-     * to be created or edited.
-     * 
-     * The locale can either be a 2 letter country code 
-     * (de, en) or a locale code according to RFC 1766 /
-     * ISO 639 / ISO 3166 (de_DE, de_CH, de_AT, en_US, ...)
-     */
-    String getDefaultDocumentLocale();
-    
-    /**
-     * Sets the user's default locale of documents
-     * to be created or edited.
-     * 
-     * The locale can either be a 2 letter country code 
-     * (de, en) or a locale code according to RFC 1766 /
-     * ISO 639 / ISO 3166 (de_DE, de_CH, de_AT, en_US, ...)
-     */
-    void setDefaultDocumentLocale(String documentLocale); 
-    
-    /**
-     * Save the user
-     *
-     * @throws AccessControlException if the save failed
-     */
-    void save() throws AccessControlException;
-    
-    /**
-     * Delete a user
-     *
-     * @throws AccessControlException if the delete failed
-     */
-    void delete() throws AccessControlException;
-    
-    /**
-     * Authenticate a user. This is done by encrypting
-     * the given password and comparing this to the
-     * encryptedPassword.
-     *
-     * @param password to authenticate with
-     * @return true if the given password matches the password for this user
-     */
-    boolean authenticate(String password);
-    
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/ac/UserManager.java b/src/java/org/apache/lenya/ac/UserManager.java
deleted file mode 100644
index 11255a9..0000000
--- a/src/java/org/apache/lenya/ac/UserManager.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac;
-
-/**
- * User manager.
- * @version $Id$
- */
-public interface UserManager extends ItemManager {
-    
-    /**
-     * Get all users.
-     *
-     * @return an array of users
-     */
-    User[] getUsers();
-    
-    /**
-     * Get all supported user types
-     *
-     * @return a collection of user types
-     */
-    UserType[] getUserTypes();
-
-    /**
-     * Add the given user
-     *
-     * @param user User that is to be added
-     * @throws AccessControlException when the user is already contained.
-     */
-    void add(User user) throws AccessControlException;
-    
-    /**
-     * Remove the given user
-     *
-     * @param user User that is to be removed
-     * @throws AccessControlException when the user is not contained.
-     */
-    void remove(User user) throws AccessControlException;
-    
-    /**
-     * Get the user with the given user id.
-     *
-     * @param userId user id of requested user
-     * @return the requested user or null if there is
-     * no user with the given user id
-     */
-    User getUser(String userId);
-    
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/ac/UserType.java b/src/java/org/apache/lenya/ac/UserType.java
deleted file mode 100644
index fb01cdc..0000000
--- a/src/java/org/apache/lenya/ac/UserType.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac;
-
-/**
- * A user type to be supported by the UserManager
- * Note: the types are configured through access control (ac.xconf)
- * 
- * @version $Id$
- */
-public class UserType  {
-    private String key;
-    private String className;
-    private String createUseCase;
-
-    /**
-     * Ctor.
-     */
-    public UserType() {
-	    // do nothing
-    }
-
-    /**
-     * Ctor.
-     * @param _key The key.
-     * @param _className The class name.
-     * @param _createUseCase The create usecase.
-     */
-    public UserType(String _key, String _className, String _createUseCase) {
-	  this.key = _key;
-	  this.className = _className;
-	  this.createUseCase = _createUseCase;
-    }
-
-    /**
-     * Get the key to be used for this type. 
-     * This key can be used for a dictionary entry for the user interface.
-     * @return a <code>String</code>
-     */
-    public String getKey() {
-	  return this.key;
-    }
-    
-    /**
-     * Set the key to be used for this type. 
-     * This key can be used for a dictionary entry for the user interface.
-     * @param _key the new key
-     */
-    public void setKey(String _key) {
-	  this.key = _key;
-    }
-    
-    /**
-     * Get the name of the class responsible for implementing this
-     * type of user. Note that in current version, this field is for
-     * information only; in later versions, it might be used for
-     * introspection and dynamic script creation.
-     * @see org.apache.lenya.ac.file.FileUser
-     * @see org.apache.lenya.ac.ldap.LDAPUser
-     * @return a <code>String</code> the name of the class
-     */
-    public String getClassName() {
-	  return this.className;
-    }
-    
-    /**
-     * Set the name of the class responsible for implementing this
-     * type of user. Note that in current version, this field is for
-     * information only; in later versions, it might be used for
-     * introspection and dynamic flowscript creation.
-     * @param _className the new className
-     */
-    public void setClassName(String _className) {
-	  this.className = _className;
-    }
-    
-    /**
-     * Get the createUseCase name to be used when a user of this type
-     * is to be created. 
-     * This name will be used in the flowscript (currently: user-admin.js),
-     * in order to distinguish between different types.
-     * @return a <code>String</code> the name of the use case in the flowscript
-     */
-    public String getCreateUseCase() {
-	  return this.createUseCase;
-    }
-    
-    /**
-     * Set the createUseCase name to be used when a user of this type
-     * is to be created. 
-     * This name will be used in the flowscript (currently: user-admin.js),
-     * in order to distinguish between different types.
-     * @param _createUseCase the new createUseCase
-     */
-    public void setCreateUseCase(String _createUseCase) {
-	  this.createUseCase = _createUseCase;
-    }
-    
-}
diff --git a/src/java/org/apache/lenya/ac/World.java b/src/java/org/apache/lenya/ac/World.java
deleted file mode 100644
index fdfdf12..0000000
--- a/src/java/org/apache/lenya/ac/World.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac;
-
-import java.io.Serializable;
-import java.util.Collections;
-
-/**
- * The world.
- * @version $Id$
- */
-public final class World implements Identifiable, Serializable {
-    
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/**
-     * Creates a new World object.
-     */
-    private World() {
-	    // do nothing
-    }
-
-    private static World instance;
-
-    /**
-     * Returns the singleton world object.
-     * @return A world object.
-     */
-    public static World getInstance() {
-        if (instance == null) {
-            instance = new World();
-        }
-
-        return instance;
-    }
-
-    /**
-     * @see org.apache.lenya.ac.Accreditable#getAccreditables()
-     */
-    public Accreditable[] getAccreditables() {
-        return (Accreditable[]) Collections.singleton(this).toArray(new Accreditable[1]);
-    }
-}
diff --git a/src/java/org/apache/lenya/ac/cache/BuildException.java b/src/java/org/apache/lenya/ac/cache/BuildException.java
deleted file mode 100644
index 48eb33e..0000000
--- a/src/java/org/apache/lenya/ac/cache/BuildException.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac.cache;
-
-/**
- * Exception for problems when cacheable objects are built.
- */
-public class BuildException extends Exception {
-
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/**
-     * Ctor.
-     */
-    public BuildException() {
-        super();
-    }
-
-    /**
-     * Ctor.
-     * @param message The message.
-     */
-    public BuildException(String message) {
-        super(message);
-    }
-
-    /**
-     * Ctor.
-     * @param message The message.
-     * @param cause The cause.
-     */
-    public BuildException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    /**
-     * Ctor.
-     * @param cause The cause.
-     */
-    public BuildException(Throwable cause) {
-        super(cause);
-    }
-
-}
diff --git a/src/java/org/apache/lenya/ac/cache/CachedObject.java b/src/java/org/apache/lenya/ac/cache/CachedObject.java
deleted file mode 100644
index 83cbc50..0000000
--- a/src/java/org/apache/lenya/ac/cache/CachedObject.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac.cache;
-
-import org.apache.excalibur.source.SourceValidity;
-
-/**
- * Cached object.
- * @version $Id$
- */
-public class CachedObject {
-
-    private SourceValidity validityObject;
-    private Object value;
-    
-    /**
-     * Returns the value.
-     * @return An object.
-     */
-    public Object getValue() {
-        return this.value;
-    }
-
-    /**
-     * Returns the source validity.
-     * @return A source validity.
-     */
-    public SourceValidity getValidityObject() {
-        return this.validityObject;
-    }
-
-    /**
-     * Ctor.
-     * @param validity The source validity.
-     * @param _value The value.
-     */
-    public CachedObject(SourceValidity validity, Object _value) {
-        this.validityObject = validity;
-        this.value = _value;
-    }
-
-}
diff --git a/src/java/org/apache/lenya/ac/cache/CachingException.java b/src/java/org/apache/lenya/ac/cache/CachingException.java
deleted file mode 100644
index 74f3390..0000000
--- a/src/java/org/apache/lenya/ac/cache/CachingException.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac.cache;
-
-/**
- * Caching exception.
- * @version $Id$
- */
-public class CachingException extends Exception {
-
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/**
-     * Ctor.
-     */
-    public CachingException() {
-        super();
-    }
-
-    /**
-     * Ctor.
-     * @param message The message.
-     */
-    public CachingException(String message) {
-        super(message);
-    }
-
-    /**
-     * Ctor.
-     * @param message The message.
-     * @param cause The cause.
-     */
-    public CachingException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    /**
-     * Ctor.
-     * @param cause The cause.
-     */
-    public CachingException(Throwable cause) {
-        super(cause);
-    }
-
-}
diff --git a/src/java/org/apache/lenya/ac/cache/InputStreamBuilder.java b/src/java/org/apache/lenya/ac/cache/InputStreamBuilder.java
deleted file mode 100644
index a346ec4..0000000
--- a/src/java/org/apache/lenya/ac/cache/InputStreamBuilder.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac.cache;
-
-import java.io.InputStream;
-
-/**
- * Interface for objects capable of building objects from input streams.
- * @version $Id$
- */
-public interface InputStreamBuilder {
-
-    /**
-     * Builds an object from an input stream.
-     * @param stream An input stream.
-     * @return An object.
-     * @throws BuildException when building the object failed.
-     */
-    Object build(InputStream stream) throws BuildException;
-
-}
diff --git a/src/java/org/apache/lenya/ac/cache/SourceCache.java b/src/java/org/apache/lenya/ac/cache/SourceCache.java
deleted file mode 100644
index 367ec4a..0000000
--- a/src/java/org/apache/lenya/ac/cache/SourceCache.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac.cache;
-
-import org.apache.avalon.framework.component.Component;
-
-/**
- * Source cache component.
- * @version $Id$
- */
-public interface SourceCache extends Component {
-
-    /**
-     * Avalon role of the SourceCache interface.
-     */
-    String ROLE = SourceCache.class.getName();
-
-    /**
-     * Returns a cached object or builds a new object when the cached
-     * object does not exist or is not up to date.
-     * @param sourceUri The URI to build the source from.
-     * @param builder The builder to create a new object if needed.
-     * @return An object.
-     * @throws CachingException when something went wrong.
-     */
-    Object get(String sourceUri, InputStreamBuilder builder) throws CachingException;
-    
-}
diff --git a/src/java/org/apache/lenya/ac/cache/SourceCacheImpl.java b/src/java/org/apache/lenya/ac/cache/SourceCacheImpl.java
deleted file mode 100644
index 784fa5f..0000000
--- a/src/java/org/apache/lenya/ac/cache/SourceCacheImpl.java
+++ /dev/null
@@ -1,252 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac.cache;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-
-import org.apache.avalon.framework.activity.Disposable;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceNotFoundException;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.excalibur.source.SourceValidity;
-import org.apache.lenya.util.CacheMap;
-
-/**
- * Basic implementation of a source cache.
- * @version $Id$
- */
-public class SourceCacheImpl
-    extends AbstractLogEnabled
-    implements SourceCache, Serviceable, Disposable {
-
-    /**
-     * Returns the service manager.
-     * @return A service manager.
-     */
-    public ServiceManager getManager() {
-        return this.manager;
-    }
-
-    /**
-     * Returns the source resolver.
-     * @return A source resolver.
-     */
-    public SourceResolver getResolver() {
-        return this.resolver;
-    }
-
-    /**
-     * Ctor.
-     */
-    public SourceCacheImpl() {
-        this.cache = new CacheMap(CAPACITY);
-    }
-
-    protected static final int CAPACITY = 1000;
-    private CacheMap cache;
-
-    /**
-     * Returns the cache.
-     * @return A cache object.
-     */
-    protected CacheMap getCache() {
-        return this.cache;
-    }
-
-    /**
-     * @see org.apache.lenya.ac.cache.SourceCache#get(java.lang.String, org.apache.lenya.ac.cache.InputStreamBuilder)
-     */
-    public Object get(String sourceUri, InputStreamBuilder builder) throws CachingException {
-
-        String key = sourceUri;
-        Object value = null;
-
-        CachedObject cachedObject = (CachedObject) getCache().get(key);
-        boolean usedCache = false;
-        SourceValidity sourceValidity = null;
-
-        try {
-            if (cachedObject != null) {
-                if (getLogger().isDebugEnabled()){
-                    getLogger().debug("Found cached object [" + cachedObject + "]"); 
-                }
-                SourceValidity cachedValidity = cachedObject.getValidityObject();
-
-                int result = cachedValidity.isValid();
-                boolean valid = false;
-                if (result == 0) {
-
-                    // get source validity and compare
-
-                    sourceValidity = getSourceValidity(sourceUri);
-
-                    if (sourceValidity != null) {
-                        result = cachedValidity.isValid(sourceValidity);
-                        if (result == 0) {
-                            sourceValidity = null;
-                        } else {
-                            valid = (result == 1);
-                        }
-                    }
-                } else {
-                    valid = (result > 0);
-                }
-
-                if (valid) {
-                    if (this.getLogger().isDebugEnabled()) {
-                        this.getLogger().debug(
-                            "Using valid cached source for '" + sourceUri + "'.");
-                    }
-                    usedCache = true;
-                    value = cachedObject.getValue();
-                } else {
-                    if (this.getLogger().isDebugEnabled()) {
-                        this.getLogger().debug(
-                            "Cached content is invalid for '" + sourceUri + "'.");
-                    }
-                    // remove invalid cached object
-                    getCache().remove(key);
-                }
-
-            } else {
-                getLogger().debug("Did not find cached object.");
-            }
-
-            if (!usedCache) {
-                getLogger().debug("Did not use cache.");
-                if (key != null) {
-                    if (sourceValidity == null) {
-                        sourceValidity = getSourceValidity(sourceUri);
-                    }
-                    if (sourceValidity != null) {
-                        if (getLogger().isDebugEnabled()) {
-                            getLogger().debug("Source validity is not null.");
-                        }
-                    } else {
-                        if (getLogger().isDebugEnabled()) {
-                            getLogger().debug("Source validity is null - not caching.");
-                        }
-                        key = null;
-                    }
-                }
-
-                value = buildObject(sourceUri, builder);
-
-                // store the response
-                if (key != null) {
-                    if (this.getLogger().isDebugEnabled()) {
-                        this.getLogger().debug(
-                            "Caching object ["
-                                + value
-                                + "] for further requests of ["
-                                + sourceUri
-                                + "].");
-                    }
-                    getCache().put(key, new CachedObject(sourceValidity, value));
-                }
-            }
-        } catch (final SourceNotFoundException e1) {
-            throw new CachingException(e1);
-        } catch (final MalformedURLException e1) {
-            throw new CachingException(e1);
-        } catch (final IOException e1) {
-            throw new CachingException(e1);
-        } catch (final BuildException e1) {
-            throw new CachingException(e1);
-        }
-
-        return value;
-    }
-
-    /**
-     * Returns the input stream to read a source from.
-     * @param sourceUri The URI of the source.
-     * @param builder The input stream builder that should be used.
-     * @return An object.
-     * @throws MalformedURLException when an error occurs.
-     * @throws IOException when an error occurs.
-     * @throws SourceNotFoundException when an error occurs.
-     * @throws BuildException if an error occurs.
-     */
-    protected Object buildObject(String sourceUri, InputStreamBuilder builder)
-        throws MalformedURLException, IOException, SourceNotFoundException, BuildException {
-        Object value = null;
-        Source source = null;
-        try {
-            source = getResolver().resolveURI(sourceUri);
-            if (source.exists()) {
-                InputStream stream = source.getInputStream();
-                value = builder.build(stream);
-            }
-        } finally {
-            if (source != null) {
-                getResolver().release(source);
-            }
-        }
-        return value;
-    }
-
-    /**
-     * Returns the validity of a source.
-     * @param sourceUri The URI of the source.
-     * @return A source validity object.
-     * @throws MalformedURLException when an error occurs.
-     * @throws IOException when an error occurs.
-     */
-    protected SourceValidity getSourceValidity(String sourceUri)
-        throws MalformedURLException, IOException {
-        SourceValidity sourceValidity;
-        Source source = null;
-        try {
-            source = getResolver().resolveURI(sourceUri);
-            sourceValidity = source.getValidity();
-        } finally {
-            if (source != null) {
-                getResolver().release(source);
-            }
-        }
-        return sourceValidity;
-    }
-
-    private ServiceManager manager;
-    private SourceResolver resolver;
-
-    /**
-     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service(ServiceManager _manager) throws ServiceException {
-        this.manager = _manager;
-        this.resolver = (SourceResolver) _manager.lookup(SourceResolver.ROLE);
-    }
-
-    /**
-     * @see org.apache.avalon.framework.activity.Disposable#dispose()
-     */
-    public void dispose() {
-        if (getResolver() != null) {
-            getManager().release(getResolver());
-        }
-    }
-
-}
diff --git a/src/java/org/apache/lenya/ac/cache/URLKeyUtil.java b/src/java/org/apache/lenya/ac/cache/URLKeyUtil.java
deleted file mode 100644
index 909cd68..0000000
--- a/src/java/org/apache/lenya/ac/cache/URLKeyUtil.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac.cache;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceResolver;
-
-/**
- * Utility class to generate String cache keys from webapp URLs.
- * @version $Id$
- */
-public final class URLKeyUtil {
-
-    /**
-     * Ctor.
-     */
-    private URLKeyUtil() {
-	    // do nothing
-    }
-
-    /**
-     * Generates a cache key for a context and a webapp URL.
-     * @param resolver The resolver of the context.
-     * @param webappUrl The webapp Url.
-     * @return A String.
-     * @throws MalformedURLException when something went wrong.
-     * @throws IOException when something went wrong.
-     */
-    public static String generateKey(SourceResolver resolver, String webappUrl)
-        throws MalformedURLException, IOException {
-        Source source = null;
-        String key;
-        try {
-            source = resolver.resolveURI("context:///");
-            key = source.getURI() + "_" + webappUrl;
-        }
-        finally {
-            if (source != null) {
-                resolver.release(source);
-            }
-        }
-        return key;
-    }
-
-}
diff --git a/src/java/org/apache/lenya/ac/cifs/CIFSUser.java b/src/java/org/apache/lenya/ac/cifs/CIFSUser.java
deleted file mode 100644
index 2109ab9..0000000
--- a/src/java/org/apache/lenya/ac/cifs/CIFSUser.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation
- * 
- * Licensed 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.
- *  
- */
-
-package org.apache.lenya.ac.cifs;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.util.Properties;
-
-import org.apache.lenya.ac.file.FileUser;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-
-import jcifs.smb.NtlmPasswordAuthentication;
-import jcifs.smb.SmbAuthException;
-import jcifs.smb.SmbException;
-import jcifs.smb.SmbSession;
-
-import jcifs.UniAddress;
-import java.net.UnknownHostException;
-
-/**
- * CIFS user.
- * @version $Id$
- */
-public class CIFSUser extends FileUser {
-
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	private static Properties defaultProperties = null;
-
-    // The name for the cifs.properties domain controller lookup
-    private static final String DOMAIN_CONTROLLER = "domain-controller";
-
-    // The name for the cifs.properties domain name lookup
-    private static final String DOMAIN = "domain";
-
-
-    /**
-    * Creates a new CIFSUser object.
-    */
-    public CIFSUser() {
-
-    }
-
-    /**
-    * Create a CIFSUser
-    */
-    public CIFSUser(File configurationDirectory, String id,
-                    String fullName,String email,String password) {
-        super(configurationDirectory, id, fullName, email, password);
-
-    }
-
-    /**
-     * Initializes this user.
-     * @throws ConfigurationException when something went wrong.
-     */
-    protected void initialize() throws ConfigurationException {
-       try {
-            readProperties(super.getConfigurationDirectory());
-        } catch (final IOException ioe) {
-            throw new ConfigurationException("Reading cifs.properties file in ["+
-                        super.getConfigurationDirectory()+"] failed", ioe);
-        }
-    }
-
-    /**
-     * Create a new CIFSUser from a configuration
-     * @param config the <code>Configuration</code> specifying the user details
-     * @throws ConfigurationException if the user could not be instantiated
-     */
-    public void configure(Configuration config) throws ConfigurationException {
-        super.configure(config);
-        initialize();
-    }
-
-    /**
-     * Authenticate a user. This is done by NTDomain Authentication
-     *  using jcifs
-     * @param password to authenticate with
-     * @return true if the given password matches the password for this user
-     */
-    public boolean authenticate(String password) {
-
-        System.setProperty("jcifs.smb.client.disablePlainTextPasswords",
-                            "false" );
-        try {
-            UniAddress mydomaincontroller = UniAddress.getByName(
-                                                getDomainController());
-            NtlmPasswordAuthentication mycreds = new
-                                NtlmPasswordAuthentication(
-                                        getDomainName(),
-                                        super.getId(),
-                                        password);
-            SmbSession.logon( mydomaincontroller, mycreds );
-            // SUCCESS
-            return true;
-        } catch( final SmbAuthException sae ) {
-            // AUTHENTICATION FAILURE
-			if (getLogger().isInfoEnabled()) {
-	            getLogger().info("Authentication against [" + getDomainController() +"]" +
-                         " failed for " + getDomainName() + "/" +  super.getId());
-            }
-            return false;
-        } catch(final SmbException se ) {
-            // NETWORK PROBLEMS?
-			return false;
-        } catch(final  UnknownHostException unho) {
-            return false;
-        }
-
-    }
-
-    /**
-     * Read the properties
-     * @throws IOException if the properties cannot be found.
-     */
-    private void readProperties(File configurationDirectory) throws IOException {
-        // create and load default properties
-        File propertiesFile = new File(configurationDirectory, "cifs.properties");
-
-        if (defaultProperties == null) {
-            defaultProperties = new Properties();
-
-            FileInputStream in = null;
-            try {
-                in = new FileInputStream(propertiesFile);
-                defaultProperties.load(in);
-            } finally {
-                if (in != null) {
-                    in.close();
-                }
-            }
-
-        }
-    }
-
-    /**
-     * Get the domain controller we want to authenticate against
-     * @return the name of the domain controller
-     */
-     private String getDomainController() {
-         return (String)defaultProperties.get(DOMAIN_CONTROLLER);
-     }
-
-    /**
-     * Get the domain name
-     * @return the domain name
-     */
-     private String getDomainName() {
-         return (String)defaultProperties.get(DOMAIN);
-     }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/ac/file/FileAccreditableManager.java b/src/java/org/apache/lenya/ac/file/FileAccreditableManager.java
deleted file mode 100644
index ab2a575..0000000
--- a/src/java/org/apache/lenya/ac/file/FileAccreditableManager.java
+++ /dev/null
@@ -1,264 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac.file;
-
-import java.io.File;
-import java.net.URI;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.parameters.ParameterException;
-import org.apache.avalon.framework.parameters.Parameterizable;
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.cocoon.util.NetUtils;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.GroupManager;
-import org.apache.lenya.ac.IPRangeManager;
-import org.apache.lenya.ac.RoleManager;
-import org.apache.lenya.ac.UserManager;
-import org.apache.lenya.ac.UserType;
-import org.apache.lenya.ac.impl.AbstractAccreditableManager;
-
-/**
- * File-based accreditable manager.
- */
-public class FileAccreditableManager extends AbstractAccreditableManager implements Serviceable,
-        Configurable, Parameterizable {
-
-    /**
-     * Creates a new FileAccreditableManager. If you use this constructor, you have to set the
-     * configuration directory either by calling {@link #setConfigurationDirectory(File)}or by
-     * calling {@link #parameterize(Parameters)}.
-     */
-    public FileAccreditableManager() {
-	    // do nothing
-    }
-
-    /**
-     * Creates a new FileAccessController based on a configuration directory.
-     * @param _configurationDirectory The configuration directory.
-     * @param _userTypes The supported user types.
-     */
-    public FileAccreditableManager(File _configurationDirectory, UserType[] _userTypes) {
-        assert _configurationDirectory != null;
-        assert _configurationDirectory.exists();
-        assert _configurationDirectory.isDirectory();
-        this.configurationDirectory = _configurationDirectory;
-        this.userTypes = new HashSet(Arrays.asList(_userTypes));
-    }
-
-    private File configurationDirectory;
-    private Set userTypes;
-
-    /**
-     * Returns the supported user types.
-     * @return An array of user types.
-     * @throws AccessControlException if an error occurs.
-     */
-    public UserType[] getUserTypes() throws AccessControlException {
-        if (this.userTypes == null)
-            throw new AccessControlException("User types not initialized");
-        return (UserType[]) this.userTypes.toArray(new UserType[this.userTypes.size()]);
-    }
-
-    /**
-     * Returns the configuration directory.
-     * @return The configuration directory.
-     * @throws AccessControlException when something went wrong.
-     */
-    public File getConfigurationDirectory() throws AccessControlException {
-
-        if (this.configurationDirectory == null) {
-
-            if (this.configurationDirectoryPath == null) {
-                throw new AccessControlException("Configuration directory not set!");
-            }
-
-            Source source = null;
-            SourceResolver resolver = null;
-            File directory;
-            try {
-
-                getLogger().debug(
-                        "Configuration directory Path: [" + this.configurationDirectoryPath + "]");
-
-                resolver = (SourceResolver) getManager().lookup(SourceResolver.ROLE);
-                source = resolver.resolveURI(this.configurationDirectoryPath);
-
-                getLogger().debug("Configuration directory URI: " + source.getURI());
-                directory = new File(new URI(NetUtils.encodePath(source.getURI())));
-            } catch (Exception e) {
-                throw new AccessControlException(e);
-            } finally {
-                if (resolver != null) {
-                    if (source != null) {
-                        resolver.release(source);
-                    }
-                    getManager().release(resolver);
-                }
-            }
-            setConfigurationDirectory(directory);
-        }
-
-        return this.configurationDirectory;
-    }
-
-    protected static final String DIRECTORY = "directory";
-
-    /**
-     * @see org.apache.avalon.framework.parameters.Parameterizable#parameterize(org.apache.avalon.framework.parameters.Parameters)
-     */
-    public void parameterize(Parameters parameters) throws ParameterException {
-        if (parameters.isParameter(DIRECTORY)) {
-            this.configurationDirectoryPath = parameters.getParameter(DIRECTORY);
-            getLogger().debug("Configuration directory: [" + this.configurationDirectoryPath + "]");
-        }
-    }
-
-    protected static final String A_M_TAG = "accreditable-manager";
-    protected static final String U_M_CHILD_TAG = "user-manager";
-    protected static final String U_T_CHILD_TAG = "user-type";
-    protected static final String U_T_CLASS_ATTRIBUTE = "class";
-    protected static final String U_T_CREATE_ATTRIBUTE = "create-use-case";
-    // provided for backward compatibility
-    protected static final String DEFAULT_USER_TYPE_CLASS = FileUser.class.getName();
-    protected static final String DEFAULT_USER_TYPE_KEY = "Local User";
-    protected static final String DEFAULT_USER_CREATE_USE_CASE = "userAddUser";
-
-    /**
-     * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
-     *      added to read new user-manager block within accreditable-manager
-     */
-    public void configure(Configuration configuration) throws ConfigurationException {
-        // note:
-        // we need to distinguish the case where configure is called from
-        // somewhere else (i.e. not due to the reading of ac.xconf),
-        // from the case where the child user-manager does not exist,
-        // for instance when reading an old ac.xconf which does not yet
-        // have this configuration. So for backward compatibility, we need
-        // to distinguish the 2 cases
-        if (A_M_TAG.equals(configuration.getName())) {
-            this.userTypes = new HashSet();
-            Configuration umConf = configuration.getChild(U_M_CHILD_TAG, false);
-            if (umConf != null) {
-                Configuration[] typeConfs = umConf.getChildren();
-                for (int i = 0; i < typeConfs.length; i++) {
-                    this.userTypes.add(new UserType(typeConfs[i].getValue(), typeConfs[i]
-                            .getAttribute(U_T_CLASS_ATTRIBUTE), typeConfs[i]
-                            .getAttribute(U_T_CREATE_ATTRIBUTE)));
-                }
-            } else {
-                getLogger().debug(
-                        "FileAccreditableManager: using default configuration for user types");
-                // no "user-manager" block in access control: provide
-                // a default for backward compatibility
-                this.userTypes.add(getDefaultUserType());
-            }
-            // maybe todo (or is it overkill?) : validate the parametrized user
-            // types, for example, check if the classes are in the classpath ?
-        }
-    }
-
-    /**
-     * Returns the default user type.
-     * @return A user type.
-     */
-    public static UserType getDefaultUserType() {
-        return new UserType(DEFAULT_USER_TYPE_KEY, DEFAULT_USER_TYPE_CLASS,
-                DEFAULT_USER_CREATE_USE_CASE);
-    }
-
-    private String configurationDirectoryPath;
-
-    /**
-     * Sets the configuration directory.
-     * @param file The configuration directory.
-     * @throws AccessControlException if an error occurs
-     */
-    public void setConfigurationDirectory(File file) throws AccessControlException {
-        if (file == null || !file.isDirectory()) {
-            throw new AccessControlException("Configuration directory [" + file
-                    + "] does not exist!");
-        }
-        this.configurationDirectory = file;
-    }
-
-    private ServiceManager manager;
-
-    /**
-     * Set the global component manager.
-     * @param _manager The global component manager
-     * @throws ServiceException when something went wrong.
-     */
-    public void service(ServiceManager _manager) throws ServiceException {
-        this.manager = _manager;
-    }
-
-    /**
-     * Returns the service manager.
-     * @return A service manager.
-     */
-    protected ServiceManager getManager() {
-        return this.manager;
-    }
-
-    /**
-     * @see org.apache.lenya.ac.impl.AbstractAccreditableManager#initializeGroupManager()
-     */
-    protected GroupManager initializeGroupManager() throws AccessControlException {
-        FileGroupManager _manager = FileGroupManager.instance(getConfigurationDirectory(), getLogger());
-        return _manager;
-    }
-
-    /**
-     * @see org.apache.lenya.ac.impl.AbstractAccreditableManager#initializeIPRangeManager()
-     */
-    protected IPRangeManager initializeIPRangeManager() throws AccessControlException {
-        FileIPRangeManager _manager = FileIPRangeManager.instance(getConfigurationDirectory(), getLogger());
-        return _manager;
-    }
-
-    /**
-     * @see org.apache.lenya.ac.impl.AbstractAccreditableManager#initializeRoleManager()
-     */
-    protected RoleManager initializeRoleManager() throws AccessControlException {
-        FileRoleManager _manager = FileRoleManager.instance(getConfigurationDirectory(), getLogger());
-        return _manager;
-    }
-
-    /**
-     * @see org.apache.lenya.ac.impl.AbstractAccreditableManager#initializeUserManager()
-     */
-    protected UserManager initializeUserManager() throws AccessControlException {
-        FileUserManager _manager = FileUserManager.instance(getConfigurationDirectory(),
-                getUserTypes(), getLogger());
-        return _manager;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/ac/file/FileGroup.java b/src/java/org/apache/lenya/ac/file/FileGroup.java
deleted file mode 100644
index 0254851..0000000
--- a/src/java/org/apache/lenya/ac/file/FileGroup.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac.file;
-
-import java.io.File;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.configuration.DefaultConfiguration;
-import org.apache.avalon.framework.configuration.DefaultConfigurationSerializer;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.Item;
-import org.apache.lenya.ac.impl.AbstractGroup;
-import org.apache.lenya.ac.impl.ItemConfiguration;
-
-/**
- * File-based group implementation.
- */
-public class FileGroup extends AbstractGroup implements Item {
-
-    /**
-     * @see org.apache.lenya.ac.Group#delete()
-     */
-    public void delete() throws AccessControlException {
-        super.delete();
-        getFile().delete();
-    }
-
-    /**
-     * Creates a new FileGroup object.
-     */
-    public FileGroup() {
-	    // do nothing
-    }
-
-    /**
-     * Create a new instance of <code>FileGroup</code>
-     * @param _configurationDirectory to which the group will be attached to
-     * @param id the ID of the group
-     */
-    public FileGroup(File _configurationDirectory, String id) {
-        super(id);
-        setConfigurationDirectory(_configurationDirectory);
-    }
-
-    /**
-     * Configures this file group.
-     * @param config The configuration.
-     * @throws ConfigurationException when something went wrong.
-     */
-    public void configure(Configuration config) throws ConfigurationException {
-        new ItemConfiguration().configure(this, config);
-    }
-
-    /**
-     * Returns the configuration file.
-     * @return A file object.
-     */
-    protected File getFile() {
-        File xmlPath = getConfigurationDirectory();
-        File xmlFile = new File(xmlPath, getId() + FileGroupManager.SUFFIX);
-        return xmlFile;
-    }
-
-    /**
-     * Save this group
-     * @throws AccessControlException if the save failed
-     */
-    public void save() throws AccessControlException {
-        DefaultConfigurationSerializer serializer = new DefaultConfigurationSerializer();
-        Configuration config = createConfiguration();
-        File xmlfile = getFile();
-
-        try {
-            serializer.serializeToFile(xmlfile, config);
-        } catch (Exception e) {
-            throw new AccessControlException(e);
-        }
-    }
-
-    /**
-     * Group configuration element.
-     */
-    public static final String GROUP = "group";
-
-    /**
-     * Create a configuration containing the group details
-     * @return a <code>Configuration</code>
-     */
-    private Configuration createConfiguration() {
-        DefaultConfiguration config = new DefaultConfiguration(GROUP);
-        new ItemConfiguration().save(this, config);
-
-        return config;
-    }
-
-    private File configurationDirectory;
-
-    /**
-     * Returns the configuration directory.
-     * @return A file object.
-     */
-    protected File getConfigurationDirectory() {
-        return this.configurationDirectory;
-    }
-
-    /**
-     * @see org.apache.lenya.ac.Item#setConfigurationDirectory(java.io.File)
-     */
-    public void setConfigurationDirectory(File _configurationDirectory) {
-        assert (_configurationDirectory != null) && _configurationDirectory.isDirectory();
-        this.configurationDirectory = _configurationDirectory;
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/ac/file/FileGroupManager.java b/src/java/org/apache/lenya/ac/file/FileGroupManager.java
deleted file mode 100644
index eefa101..0000000
--- a/src/java/org/apache/lenya/ac/file/FileGroupManager.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac.file;
-
-import java.io.File;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.Group;
-import org.apache.lenya.ac.GroupManager;
-import org.apache.lenya.ac.Item;
-
-/**
- * File-based group manager.
- */
-public final class FileGroupManager extends FileItemManager implements GroupManager {
-
-    private static Map instances = new HashMap();
-
-    /**
-     * Ctor.
-     */
-    private FileGroupManager() {
-        super();
-    }
-    
-    /**
-     * Return the <code>GroupManager</code> for the given publication.
-     * The <code>GroupManager</code> is a singleton.
-     *
-     * @param configurationDirectory for which the GroupManager is requested
-     * @param logger The logger.
-     * @return a <code>GroupManager</code>
-     * @throws AccessControlException if no GroupManager could be instanciated
-     */
-    public static FileGroupManager instance(File configurationDirectory, Logger logger)
-        throws AccessControlException {
-        assert configurationDirectory != null;
-
-        if (!instances.containsKey(configurationDirectory)) {
-            FileGroupManager manager = new FileGroupManager();
-            manager.enableLogging(logger);
-            manager.configure(configurationDirectory);
-            instances.put(configurationDirectory, manager);
-        }
-
-        return (FileGroupManager) instances.get(configurationDirectory);
-    }
-
-    /**
-     * Get all groups
-     *
-     * @return an array of groups.
-     */
-    public Group[] getGroups() {
-        Item[] items = super.getItems();
-        Group[] groups = new Group[items.length];
-        for (int i = 0; i < groups.length; i++) {
-            groups[i] = (Group) items[i];
-        }
-        return groups;
-    }
-
-    /**
-     * Add a group to this manager
-     *
-     * @param group the group to be added
-     * @throws AccessControlException when the notification failed.
-     */
-    public void add(Group group) throws AccessControlException {
-        super.add(group);
-    }
-
-    /**
-     * Remove a group from this manager
-     *
-     * @param group the group to be removed
-     * @throws AccessControlException when the notification failed.
-     */
-    public void remove(Group group) throws AccessControlException {
-        super.remove(group);
-    }
-
-    /**
-     * Get the group with the given group name.
-     *
-     * @param groupId the id of the requested group
-     * @return a <code>Group</code> or null if there is no group with the given name
-     */
-    public Group getGroup(String groupId) {
-        return (Group) getItem(groupId);
-    }
-
-    protected static final String SUFFIX = ".gml";
-    
-    /**
-     * @see org.apache.lenya.ac.file.FileItemManager#getSuffix()
-     */
-    protected String getSuffix() {
-        return SUFFIX;
-    }
-
-}
diff --git a/src/java/org/apache/lenya/ac/file/FileIPRange.java b/src/java/org/apache/lenya/ac/file/FileIPRange.java
deleted file mode 100644
index 435dc9c..0000000
--- a/src/java/org/apache/lenya/ac/file/FileIPRange.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac.file;
-
-import java.io.File;
-import java.io.Serializable;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.configuration.DefaultConfiguration;
-import org.apache.avalon.framework.configuration.DefaultConfigurationSerializer;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.Machine;
-import org.apache.lenya.ac.impl.AbstractIPRange;
-import org.apache.lenya.ac.impl.ItemConfiguration;
-import org.apache.lenya.net.InetAddressUtil;
-
-/**
- * IP range that is stored in a file.
- */
-public class FileIPRange extends AbstractIPRange implements Serializable {
-
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/**
-     * Main method.
-     * @param args The command-line arguments.
-     * @deprecated This should be moved to a JUnit test.
-     */
-    public static void main(String[] args) {
-        if (args.length == 0) {
-            System.out
-                    .println("Usage: network, netmask, ip (e.g. 192.168.0.64 255.255.255.240 192.168.0.70)");
-            return;
-        }
-        try {
-            InetAddress networkAddress = InetAddress.getByName(args[0]);
-            InetAddress subnetMask = InetAddress.getByName(args[1]);
-            Machine machine = new Machine(args[2]);
-
-            if (InetAddressUtil.contains(networkAddress, subnetMask, machine.getAddress())) {
-                System.out.println("true");
-            } else {
-                System.out.println("false");
-            }
-        } catch (final UnknownHostException e) {
-            System.err.println(e);
-        } catch (final AccessControlException e) {
-            System.err.println(e);
-        }
-    }
-
-    /**
-     * Ctor.
-     */
-    public FileIPRange() {
-	    // do nothing
-   }
-
-    /**
-     * Ctor.
-     * @param configurationDirectory The configuration directory.
-     * @param id The IP range ID.
-     */
-    public FileIPRange(File configurationDirectory, String id) {
-        super(id);
-        setConfigurationDirectory(configurationDirectory);
-    }
-
-    /**
-     * @see org.apache.lenya.ac.impl.AbstractIPRange#save()
-     */
-    public void save() throws AccessControlException {
-        DefaultConfigurationSerializer serializer = new DefaultConfigurationSerializer();
-        Configuration config = createConfiguration();
-
-        try {
-            serializer.serializeToFile(getFile(), config);
-        } catch (Exception e) {
-            throw new AccessControlException(e);
-        }
-    }
-
-    /**
-     * Returns the configuration file.
-     * @return A file object.
-     */
-    protected File getFile() {
-        File xmlPath = getConfigurationDirectory();
-        File xmlFile = new File(xmlPath, getId() + FileIPRangeManager.SUFFIX);
-        return xmlFile;
-    }
-
-    /**
-     * @see org.apache.lenya.ac.Item#configure(org.apache.avalon.framework.configuration.Configuration)
-     */
-    public void configure(Configuration config) throws ConfigurationException {
-        new ItemConfiguration().configure(this, config);
-
-        String networkAddress = config.getChild(ELEMENT_NETWORK_ADDRESS).getValue();
-        String subnetMask = config.getChild(ELEMENT_SUBNET_MASK).getValue();
-
-        try {
-            setNetworkAddress(networkAddress);
-            setSubnetMask(subnetMask);
-        } catch (AccessControlException e) {
-            throw new ConfigurationException("Configuring IP range [" + getId() + "] failed: ", e);
-        }
-
-    }
-
-    protected static final String IP_RANGE = "ip-range";
-    protected static final String ELEMENT_NETWORK_ADDRESS = "network-address";
-    protected static final String ELEMENT_SUBNET_MASK = "subnet-mask";
-
-    /**
-     * Create a configuration from the current user details. Can be used for saving.
-     * @return a <code>Configuration</code>
-     */
-    protected Configuration createConfiguration() {
-        DefaultConfiguration config = new DefaultConfiguration(IP_RANGE);
-        new ItemConfiguration().save(this, config);
-
-        DefaultConfiguration networkAddressConfig = new DefaultConfiguration(
-                ELEMENT_NETWORK_ADDRESS);
-        networkAddressConfig.setValue(getNetworkAddress().getHostAddress());
-        config.addChild(networkAddressConfig);
-
-        DefaultConfiguration subnetMaskConfig = new DefaultConfiguration(ELEMENT_SUBNET_MASK);
-        subnetMaskConfig.setValue(getSubnetMask().getHostAddress());
-        config.addChild(subnetMaskConfig);
-
-        return config;
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/ac/file/FileIPRangeManager.java b/src/java/org/apache/lenya/ac/file/FileIPRangeManager.java
deleted file mode 100644
index 135184f..0000000
--- a/src/java/org/apache/lenya/ac/file/FileIPRangeManager.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac.file;
-
-import java.io.File;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.IPRange;
-import org.apache.lenya.ac.IPRangeManager;
-import org.apache.lenya.ac.Item;
-
-/**
- * Manager for IP address ranges.
- */
-public class FileIPRangeManager extends FileItemManager implements IPRangeManager {
-
-    /**
-     * Ctor.
-     */
-    private FileIPRangeManager() {
-	    // do nothing
-    }
-
-    protected static final String SUFFIX = ".ipml";
-
-    /**
-     * @see org.apache.lenya.ac.file.FileItemManager#getSuffix()
-     */
-    protected String getSuffix() {
-        return SUFFIX;
-    }
-
-    private static Map instances = new HashMap();
-
-    /**
-     * Return an instance of FileIPRangeManager
-     * @param configurationDirectory a directory
-     * @param logger The logger.
-     * @return an <code>IPRangeManager</code> value
-     * @exception AccessControlException if an error occurs
-     */
-    public static FileIPRangeManager instance(File configurationDirectory, Logger logger)
-            throws AccessControlException {
-
-        assert configurationDirectory != null;
-        if (!configurationDirectory.isDirectory()) {
-            throw new AccessControlException("Configuration directory [" + configurationDirectory
-                    + "] does not exist!");
-        }
-
-        if (!instances.containsKey(configurationDirectory)) {
-            FileIPRangeManager manager = new FileIPRangeManager();
-            manager.enableLogging(logger);
-            manager.configure(configurationDirectory);
-            instances.put(configurationDirectory, manager);
-        }
-
-        return (FileIPRangeManager) instances.get(configurationDirectory);
-    }
-
-    /**
-     * Get all IP ranges.
-     * @return an array of IP ranges.
-     */
-    public IPRange[] getIPRanges() {
-        Item[] items = super.getItems();
-        IPRange[] ranges = new IPRange[items.length];
-        for (int i = 0; i < ranges.length; i++) {
-            ranges[i] = (IPRange) items[i];
-        }
-        return ranges;
-    }
-
-    /**
-     * Add the given IP range
-     * @param range IP range that is to be added
-     * @throws AccessControlException when the notification failed.
-     */
-    public void add(IPRange range) throws AccessControlException {
-        super.add(range);
-    }
-
-    /**
-     * Remove the given IP range
-     * @param range IP range that is to be removed
-     * @throws AccessControlException when the notification failed.
-     */
-    public void remove(IPRange range) throws AccessControlException {
-        super.remove(range);
-    }
-
-    /**
-     * Get the IPRange with the given id.
-     * @param rangeId user id of requested IP range
-     * @return the requested IP range or null if there is no IP range with the given id
-     */
-    public IPRange getIPRange(String rangeId) {
-        return (IPRange) getItem(rangeId);
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/ac/file/FileItemManager.java b/src/java/org/apache/lenya/ac/file/FileItemManager.java
deleted file mode 100644
index d130d50..0000000
--- a/src/java/org/apache/lenya/ac/file/FileItemManager.java
+++ /dev/null
@@ -1,481 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac.file;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.Group;
-import org.apache.lenya.ac.Groupable;
-import org.apache.lenya.ac.Item;
-import org.apache.lenya.ac.ItemManagerListener;
-import org.apache.lenya.ac.impl.ItemConfiguration;
-
-/**
- * Abstract superclass for classes that manage items loaded from configuration files.
- */
-public abstract class FileItemManager extends AbstractLogEnabled {
-
-    protected static final String PATH = "config" + File.separator + "ac" + File.separator
-            + "passwd";
-
-    private Map items = new HashMap();
-    private File configurationDirectory;
-    private DirectoryChangeNotifier notifier;
-
-    /**
-     * Create a new ItemManager.
-     */
-    protected FileItemManager() {
-	    // do nothing
-    }
-
-    /**
-     * Configures the item manager.
-     * @param _configurationDirectory where the items are fetched from
-     * @throws AccessControlException if the item manager cannot be instantiated
-     */
-    public void configure(File _configurationDirectory) throws AccessControlException {
-        assert _configurationDirectory != null;
-
-        if (!_configurationDirectory.exists() || !_configurationDirectory.isDirectory()) {
-            throw new AccessControlException("The directory ["
-                    + _configurationDirectory.getAbsolutePath() + "] does not exist!");
-        }
-
-        this.configurationDirectory = _configurationDirectory;
-        this.notifier = new DirectoryChangeNotifier(_configurationDirectory, getFileFilter());
-        this.notifier.enableLogging(getLogger());
-        loadItems();
-    }
-
-    /**
-     * Reloads the items if an item was changed / added / removed.
-     * @throws AccessControlException when something went wrong.
-     */
-    protected void loadItems() throws AccessControlException {
-
-        boolean changed;
-        try {
-            changed = this.notifier.hasChanged();
-        } catch (IOException e) {
-            throw new AccessControlException(e);
-        }
-
-        if (changed) {
-
-            if (getLogger().isDebugEnabled()) {
-                getLogger().debug("Item configuration has changed - reloading.");
-            }
-
-            File[] addedFiles = this.notifier.getAddedFiles();
-
-            for (int i = 0; i < addedFiles.length; i++) {
-                Item item = loadItem(addedFiles[i]);
-                add(item);
-            }
-
-            File[] removedFiles = this.notifier.getRemovedFiles();
-            for (int i = 0; i < removedFiles.length; i++) {
-                String fileName = removedFiles[i].getName();
-                String id = fileName.substring(0, fileName.length() - getSuffix().length());
-
-                Item item = (Item) this.items.get(id);
-
-                if (item != null) {
-
-                    if (item instanceof Groupable) {
-                        ((Groupable) item).removeFromAllGroups();
-                    }
-                    if (item instanceof Group) {
-                        ((Group) item).removeAllMembers();
-                    }
-
-                    remove(item);
-                }
-            }
-
-            File[] changedFiles = this.notifier.getChangedFiles();
-            for (int i = 0; i < changedFiles.length; i++) {
-                Item item = loadItem(changedFiles[i]);
-                update(item);
-            }
-
-        }
-
-    }
-
-    /**
-     * Loads an item from a file.
-     * @param file The file.
-     * @return An item.
-     * @throws AccessControlException when something went wrong.
-     */
-    protected Item loadItem(File file) throws AccessControlException {
-        Configuration config = getItemConfiguration(file);
-
-        String fileName = file.getName();
-        String id = fileName.substring(0, fileName.length() - getSuffix().length());
-        Item item = (Item) this.items.get(id);
-
-        String klass = ItemConfiguration.getItemClass(config);
-        if (item == null) {
-            try {
-                item = (Item) Class.forName(klass).newInstance();
-                item.enableLogging(getLogger());
-            } catch (Exception e) {
-                String errorMsg = "Exception when trying to instanciate: " + klass
-                        + " with exception: " + e.fillInStackTrace();
-
-                // an exception occured when trying to instanciate
-                // a user.
-                getLogger().error(errorMsg);
-                throw new AccessControlException(errorMsg, e);
-            }
-            item.setConfigurationDirectory(this.configurationDirectory);
-        }
-
-        try {
-            item.configure(config);
-        } catch (ConfigurationException e) {
-            String errorMsg = "Exception when trying to configure: " + klass;
-            throw new AccessControlException(errorMsg, e);
-        }
-        return item;
-    }
-
-    /**
-     * Loads teh configuration of an item from a file.
-     * @param file The file.
-     * @return A configuration.
-     * @throws AccessControlException when something went wrong.
-     */
-    protected Configuration getItemConfiguration(File file) throws AccessControlException {
-        DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
-        Configuration config = null;
-
-        try {
-            assert file.exists();
-            config = builder.buildFromFile(file);
-        } catch (Exception e) {
-            String errorMsg = "Exception when reading the configuration from file: "
-                    + file.getName();
-
-            // an exception occured when trying to read the configuration
-            // from the identity file.
-            getLogger().error(errorMsg);
-            throw new AccessControlException(errorMsg, e);
-        }
-        return config;
-    }
-
-    protected void removeItem(File file) {
-	    // do nothing
-    }
-
-    /**
-     * Returns an item for a given ID.
-     * @param id The id.
-     * @return An item.
-     */
-    public Item getItem(String id) {
-        try {
-            loadItems();
-        } catch (AccessControlException e) {
-            throw new IllegalStateException(e.getMessage());
-        }
-        return (Item) this.items.get(id);
-    }
-
-    /**
-     * get all items
-     * @return an array of items
-     */
-    public Item[] getItems() {
-        try {
-            loadItems();
-        } catch (AccessControlException e) {
-            throw new IllegalStateException(e.getMessage());
-        }
-        return (Item[]) this.items.values().toArray(new Item[this.items.values().size()]);
-    }
-
-    /**
-     * Add an Item to this manager
-     * @param item to be added
-     * @throws AccessControlException when the notification threw this exception.
-     */
-    public void add(Item item) throws AccessControlException {
-        assert item != null;
-        this.items.put(item.getId(), item);
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Item [" + item + "] added.");
-        }
-        notifyAdded(item);
-    }
-
-    /**
-     * Remove an item from this manager
-     * @param item to be removed
-     * @throws AccessControlException when the notification threw this exception.
-     */
-    public void remove(Item item) throws AccessControlException {
-        this.items.remove(item.getId());
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Item [" + item + "] removed.");
-        }
-        notifyRemoved(item);
-    }
-
-    /**
-     * Update an item.
-     * @param newItem The new version of the item.
-     * @throws AccessControlException when the notification threw this exception.
-     */
-    public void update(Item newItem) throws AccessControlException {
-        this.items.remove(newItem.getId());
-        this.items.put(newItem.getId(), newItem);
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Item [" + newItem + "] updated.");
-        }
-    }
-
-    /**
-     * Returns if the ItemManager contains an object.
-     * @param item The object.
-     * @return A boolean value.
-     */
-    public boolean contains(Item item) {
-        try {
-            loadItems();
-        } catch (AccessControlException e) {
-            throw new IllegalStateException(e.getMessage());
-        }
-        return this.items.containsValue(item);
-    }
-
-    /**
-     * Get the directory where the items are located.
-     * @return a <code>File</code>
-     */
-    public File getConfigurationDirectory() {
-        return this.configurationDirectory;
-    }
-
-    /**
-     * Get a file filter which filters for files containing items.
-     * @return a <code>FileFilter</code>
-     */
-    protected FileFilter getFileFilter() {
-        FileFilter filter = new FileFilter() {
-            public boolean accept(File pathname) {
-                return (pathname.getName().endsWith(getSuffix()));
-            }
-        };
-
-        return filter;
-    }
-
-    /**
-     * Returns the file extension to be used.
-     * @return A string.
-     */
-    protected abstract String getSuffix();
-
-    private List itemManagerListeners = new ArrayList();
-
-    /**
-     * Attaches an item manager listener to this item manager.
-     * @param listener An item manager listener.
-     */
-    public void addItemManagerListener(ItemManagerListener listener) {
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Adding listener: [" + listener + "]");
-        }
-        if (!this.itemManagerListeners.contains(listener)) {
-            this.itemManagerListeners.add(listener);
-        }
-    }
-
-    /**
-     * Removes an item manager listener from this item manager.
-     * @param listener An item manager listener.
-     */
-    public void removeItemManagerListener(ItemManagerListener listener) {
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Removing listener: [" + listener + "]");
-        }
-        this.itemManagerListeners.remove(listener);
-    }
-
-    /**
-     * Notifies the listeners that an item was added.
-     * @param item The item that was added.
-     * @throws AccessControlException if an error occurs.
-     */
-    protected void notifyAdded(Item item) throws AccessControlException {
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Item was added: [" + item + "]");
-        }
-        List clone = new ArrayList(this.itemManagerListeners);
-        for (Iterator i = clone.iterator(); i.hasNext();) {
-            ItemManagerListener listener = (ItemManagerListener) i.next();
-            listener.itemAdded(item);
-        }
-    }
-
-    /**
-     * Notifies the listeners that an item was removed.
-     * @param item The item that was removed.
-     * @throws AccessControlException if an error occurs.
-     */
-    protected void notifyRemoved(Item item) throws AccessControlException {
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Item was removed: [" + item + "]");
-        }
-        List clone = new ArrayList(this.itemManagerListeners);
-        for (Iterator i = clone.iterator(); i.hasNext();) {
-            ItemManagerListener listener = (ItemManagerListener) i.next();
-            if (getLogger().isDebugEnabled()) {
-                getLogger().debug("Notifying listener: [" + listener + "]");
-            }
-            listener.itemRemoved(item);
-        }
-    }
-
-    /**
-     * Helper class to observe a directory for changes.
-     */
-    public static class DirectoryChangeNotifier extends AbstractLogEnabled {
-
-        /**
-         * Ctor.
-         * @param _directory The directory to observe.
-         * @param _filter A filter to specify the file type to observe.
-         */
-        public DirectoryChangeNotifier(File _directory, FileFilter _filter) {
-            this.directory = _directory;
-            this.filter = _filter;
-        }
-
-        private File directory;
-        private FileFilter filter;
-        private Map canonicalPath2LastModified = new HashMap();
-
-        private Set addedFiles = new HashSet();
-        private Set removedFiles = new HashSet();
-        private Set changedFiles = new HashSet();
-
-        /**
-         * Checks if the directory has changed (a new file was added, a file was removed, a file has
-         * changed).
-         * @return A boolean value.
-         * @throws IOException when something went wrong.
-         */
-        public boolean hasChanged() throws IOException {
-
-            this.addedFiles.clear();
-            this.removedFiles.clear();
-            this.changedFiles.clear();
-
-            File[] files = this.directory.listFiles(this.filter);
-
-            Set newPathSet = new HashSet();
-
-            for (int i = 0; i < files.length; i++) {
-                String canonicalPath = files[i].getCanonicalPath();
-                newPathSet.add(canonicalPath);
-
-                if (!this.canonicalPath2LastModified.containsKey(canonicalPath)) {
-                    this.addedFiles.add(new File(canonicalPath));
-
-                    if (getLogger().isDebugEnabled()) {
-                        getLogger().debug("New file: [" + canonicalPath + "]");
-                    }
-
-                } else {
-                    Long lastModifiedObject = (Long) this.canonicalPath2LastModified.get(canonicalPath);
-                    long lastModified = lastModifiedObject.longValue();
-                    if (lastModified < files[i].lastModified()) {
-                        this.changedFiles.add(files[i]);
-                        if (getLogger().isDebugEnabled()) {
-                            getLogger().debug("File has changed: [" + canonicalPath + "]");
-                        }
-                    }
-                }
-                Long lastModified = new Long(files[i].lastModified());
-                this.canonicalPath2LastModified.put(canonicalPath, lastModified);
-            }
-
-            Set oldPathSet = this.canonicalPath2LastModified.keySet();
-            String[] oldPaths = (String[]) oldPathSet.toArray(new String[oldPathSet.size()]);
-            for (int i = 0; i < oldPaths.length; i++) {
-                if (!newPathSet.contains(oldPaths[i])) {
-                    this.removedFiles.add(new File(oldPaths[i]));
-                    this.canonicalPath2LastModified.remove(oldPaths[i]);
-                    if (getLogger().isDebugEnabled()) {
-                        getLogger().debug("File removed: [" + oldPaths[i] + "]");
-                    }
-                }
-            }
-
-            return !this.addedFiles.isEmpty() || !this.removedFiles.isEmpty() || !this.changedFiles.isEmpty();
-        }
-
-        /**
-         * Returns the added files.
-         * @return An array of files.
-         */
-        public File[] getAddedFiles() {
-            return (File[]) this.addedFiles.toArray(new File[this.addedFiles.size()]);
-        }
-
-        /**
-         * Returns the removed files.
-         * @return An array of files.
-         */
-        public File[] getRemovedFiles() {
-            return (File[]) this.removedFiles.toArray(new File[this.removedFiles.size()]);
-        }
-
-        /**
-         * Returns the changed files.
-         * @return An array of files.
-         */
-        public File[] getChangedFiles() {
-            return (File[]) this.changedFiles.toArray(new File[this.changedFiles.size()]);
-        }
-
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/ac/file/FilePolicyManager.java b/src/java/org/apache/lenya/ac/file/FilePolicyManager.java
deleted file mode 100644
index 631fea6..0000000
--- a/src/java/org/apache/lenya/ac/file/FilePolicyManager.java
+++ /dev/null
@@ -1,498 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac.file;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.InputStream;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.avalon.framework.activity.Disposable;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.parameters.ParameterException;
-import org.apache.avalon.framework.parameters.Parameterizable;
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.cocoon.util.NetUtils;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.Accreditable;
-import org.apache.lenya.ac.AccreditableManager;
-import org.apache.lenya.ac.Policy;
-import org.apache.lenya.ac.Role;
-import org.apache.lenya.ac.User;
-import org.apache.lenya.ac.cache.CachingException;
-import org.apache.lenya.ac.cache.SourceCache;
-import org.apache.lenya.ac.impl.Credential;
-import org.apache.lenya.ac.impl.DefaultPolicy;
-import org.apache.lenya.ac.impl.InheritingPolicyManager;
-import org.apache.lenya.ac.impl.PolicyBuilder;
-import org.apache.lenya.ac.impl.RemovedAccreditablePolicyBuilder;
-import org.apache.lenya.ac.impl.URLPolicy;
-import org.apache.lenya.xml.DocumentHelper;
-import org.w3c.dom.Document;
-
-/**
- * A PolicyBuilder is used to build policies.
- */
-public class FilePolicyManager extends AbstractLogEnabled implements InheritingPolicyManager,
-        Parameterizable, Disposable, Serviceable {
-
-    private static final class SubtreeFileFilter implements FileFilter {
-        private final String url;
-        private final String subtree;
-
-        private SubtreeFileFilter(String _url, String _subtree) {
-            super();
-            this.url = _url;
-            this.subtree = _subtree;
-        }
-
-        /**
-         * @see java.io.FileFilter#accept(java.io.File)
-         */
-        public boolean accept(File file) {
-            return file.getName().equals(this.subtree)
-                    || file.getName().equals(this.url);
-        }
-    }
-
-    private static final class IsDirectoryFileFilter implements FileFilter {
-        /**
-         * @see java.io.FileFilter#accept(java.io.File)
-         */
-        public boolean accept(File file) {
-            return file.isDirectory();
-        }
-    }
-
-    /**
-     * Creates a new FilePolicyManager.
-     */
-    public FilePolicyManager() {
-	    // do nothing
-    }
-
-    /**
-     * Returns the source cache.
-     * @return A source cache.
-     */
-    protected SourceCache getCache() {
-        return this.cache;
-    }
-
-    private SourceCache cache;
-
-    protected static final String URL_FILENAME = "url-policy.acml";
-    protected static final String SUBTREE_FILENAME = "subtree-policy.acml";
-    protected static final String USER_ADMIN_URL = "/admin/users/";
-
-    /**
-     * Builds the URL policy for a URL from a file. When the file is not present, an empty policy is
-     * returned.
-     * @param controller The access controller to use.
-     * @param url The URL inside the web application.
-     * @return A policy.
-     * @throws AccessControlException when something went wrong.
-     */
-    public DefaultPolicy buildURLPolicy(AccreditableManager controller, String url)
-            throws AccessControlException {
-        return buildPolicy(controller, url, URL_FILENAME);
-    }
-
-    /**
-     * Builds a subtree policy from a file. When the file is not present, an empty policy is
-     * returned.
-     * @param controller The access controller to use.
-     * @param url The URL inside the web application.
-     * @return A policy.
-     * @throws AccessControlException when something went wrong.
-     */
-    public DefaultPolicy buildSubtreePolicy(AccreditableManager controller, String url)
-            throws AccessControlException {
-        return buildPolicy(controller, url, SUBTREE_FILENAME);
-    }
-
-    /**
-     * Builds a policy from a file. When the file is not present, an empty policy is returned.
-     * @param controller The access controller to use.
-     * @param url The url.
-     * @param policyFilename The policy filename.
-     * @return A policy.
-     * @throws AccessControlException when something went wrong.
-     */
-    protected DefaultPolicy buildPolicy(AccreditableManager controller, String url,
-            String policyFilename) throws AccessControlException {
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Building policy for URL [" + url + "]");
-        }
-
-        DefaultPolicy policy = null;
-
-        String policyUri = getPolicySourceURI(url, policyFilename);
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Policy source URI resolved to: " + policyUri);
-        }
-
-        try {
-            PolicyBuilder builder = new PolicyBuilder(controller);
-            policy = (DefaultPolicy) getCache().get(policyUri, builder);
-        } catch (CachingException e) {
-            throw new AccessControlException(e);
-        }
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Policy exists: [" + (policy != null) + "]");
-        }
-
-        if (policy == null) {
-            policy = new DefaultPolicy();
-        }
-        return policy;
-    }
-
-    /**
-     * Returns the policy file URI for a URL and a policy filename.
-     * @param url The url to get the file for.
-     * @param policyFilename The name of the policy file.
-     * @return A String.
-     * @throws AccessControlException if an error occurs
-     */
-    protected String getPolicySourceURI(String url, String policyFilename)
-            throws AccessControlException {
-        if (url.startsWith("/")) {
-            url = url.substring(1);
-        }
-
-        File policyFile = new File(getPoliciesDirectory(), url + File.separator + policyFilename);
-        String policyUri = policyFile.toURI().toString();
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Computing policy URI [" + policyUri + "]");
-        }
-        return policyUri;
-    }
-
-    /**
-     * Returns the policy file for a certain URL.
-     * @param url The URL to get the policy for.
-     * @param policyFilename The policy filename.
-     * @return A file.
-     * @throws AccessControlException when an error occurs.
-     */
-    protected File getPolicyFile(String url, String policyFilename) throws AccessControlException {
-        String fileUri = getPolicySourceURI(url, policyFilename);
-        File file;
-        try {
-            file = new File(new URI(NetUtils.encodePath(fileUri)));
-        } catch (final Exception e) {
-            throw new AccessControlException(e);
-        }
-        return file;
-    }
-
-    /**
-     * Saves a URL policy.
-     * @param url The URL to save the policy for.
-     * @param policy The policy to save.
-     * @throws AccessControlException when something went wrong.
-     */
-    public void saveURLPolicy(String url, DefaultPolicy policy) throws AccessControlException {
-        getLogger().debug("Saving URL policy for URL [" + url + "]");
-        savePolicy(url, policy, URL_FILENAME);
-    }
-
-    /**
-     * Saves a Subtree policy.
-     * @param url The url to save the policy for.
-     * @param policy The policy to save.
-     * @throws AccessControlException when something went wrong.
-     */
-    public void saveSubtreePolicy(String url, DefaultPolicy policy) throws AccessControlException {
-        getLogger().debug("Saving subtree policy for URL [" + url + "]");
-        savePolicy(url, policy, SUBTREE_FILENAME);
-    }
-
-    /**
-     * Saves a policy to a file.
-     * @param url The URL to save the policy for.
-     * @param policy The policy.
-     * @param filename The file.
-     * @throws AccessControlException if something goes wrong.
-     */
-    protected void savePolicy(String url, DefaultPolicy policy, String filename)
-            throws AccessControlException {
-
-        File file = getPolicyFile(url, filename);
-        savePolicy(policy, file);
-    }
-
-    /**
-     * Saves a policy to a file.
-     * @param policy The policy to save.
-     * @param file The file.
-     * @throws AccessControlException when an error occurs.
-     */
-    protected void savePolicy(DefaultPolicy policy, File file) throws AccessControlException {
-        Document document = PolicyBuilder.savePolicy(policy);
-
-        try {
-            if (!file.exists()) {
-                file.getParentFile().mkdirs();
-                if (!file.createNewFile()) {
-                    throw new AccessControlException("File [" + file + "] could not be created.");
-                }
-            }
-            DocumentHelper.writeDocument(document, file);
-        } catch (AccessControlException e) {
-            throw e;
-        } catch (Exception e) {
-            throw new AccessControlException("Path: [" + file.getAbsolutePath() + "]", e);
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.ac.PolicyManager#getPolicy(org.apache.lenya.ac.AccreditableManager,
-     *      java.lang.String)
-     */
-    public Policy getPolicy(AccreditableManager controller, String url)
-            throws AccessControlException {
-
-        return new URLPolicy(controller, url, this);
-    }
-
-    protected static final String DIRECTORY_PARAMETER = "directory";
-
-    private String policiesDirectoryUri;
-    private File policiesDirectory;
-
-    /**
-     * @see org.apache.avalon.framework.parameters.Parameterizable#parameterize(org.apache.avalon.framework.parameters.Parameters)
-     */
-    public void parameterize(Parameters parameters) throws ParameterException {
-        if (parameters.isParameter(DIRECTORY_PARAMETER)) {
-            this.policiesDirectoryUri = parameters.getParameter(DIRECTORY_PARAMETER);
-            if (getLogger().isDebugEnabled()) {
-                getLogger().debug("Policies directory URI: " + this.policiesDirectoryUri);
-            }
-        }
-    }
-
-    /**
-     * Get the path to the policies directory.
-     * @return the path to the policies directory
-     * @throws AccessControlException if an error occurs
-     */
-    public File getPoliciesDirectory() throws AccessControlException {
-
-        if (this.policiesDirectory == null) {
-            SourceResolver resolver = null;
-            Source source = null;
-            File directory;
-
-            try {
-                resolver = (SourceResolver) getServiceManager().lookup(SourceResolver.ROLE);
-                source = resolver.resolveURI(this.policiesDirectoryUri);
-                getLogger().debug("Policies directory source: [" + source.getURI() + "]");
-                directory = new File(new URI(NetUtils.encodePath(source.getURI())));
-            } catch (final Exception e) {
-                throw new AccessControlException("Resolving policies directory failed: ", e);
-            } finally {
-                if (resolver != null) {
-                    if (source != null) {
-                        resolver.release(source);
-                    }
-                    getServiceManager().release(resolver);
-                }
-            }
-
-            getLogger().debug(
-                    "Policies directory resolved to [" + directory.getAbsolutePath() + "]");
-            setPoliciesDirectory(directory);
-        }
-
-        return this.policiesDirectory;
-    }
-
-    /**
-     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service(ServiceManager manager) throws ServiceException {
-        this.serviceManager = manager;
-        this.cache = (SourceCache) manager.lookup(SourceCache.ROLE);
-    }
-
-    /**
-     * Sets the policies directory.
-     * @param directory The directory.
-     * @throws AccessControlException if the directory is not a directory
-     */
-    public void setPoliciesDirectory(File directory) throws AccessControlException {
-        getLogger().debug("Setting policies directory [" + directory.getAbsolutePath() + "]");
-        if (!directory.isDirectory()) {
-            throw new AccessControlException("Policies directory invalid: ["
-                    + directory.getAbsolutePath() + "]");
-        }
-        this.policiesDirectory = directory;
-    }
-
-    /**
-     * @see org.apache.lenya.ac.impl.InheritingPolicyManager#getPolicies(org.apache.lenya.ac.AccreditableManager,
-     *      java.lang.String)
-     */
-    public DefaultPolicy[] getPolicies(AccreditableManager controller, String url)
-            throws AccessControlException {
-
-        List policies = new ArrayList();
-
-        Policy policy = buildURLPolicy(controller, url);
-        policies.add(policy);
-
-        String[] directories = url.split("/");
-        url = "";
-
-        for (int i = 0; i < directories.length; i++) {
-            url += directories[i] + "/";
-            policy = buildSubtreePolicy(controller, url);
-            policies.add(policy);
-        }
-
-        return (DefaultPolicy[]) policies.toArray(new DefaultPolicy[policies.size()]);
-    }
-
-    /**
-     * @see org.apache.avalon.framework.activity.Disposable#dispose()
-     */
-    public void dispose() {
-
-        if (getCache() != null) {
-            getServiceManager().release(getCache());
-        }
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Disposing [" + this + "]");
-        }
-    }
-
-    /**
-     * Removes an accreditable from all policies within a certain directory tree.
-     * @param manager The accreditable manager which owns the accreditable.
-     * @param accreditable The accreditable to remove.
-     * @param policyDirectory The directory where the policies are located.
-     * @throws AccessControlException when an error occurs.
-     */
-    protected void removeAccreditable(AccreditableManager manager, Accreditable accreditable,
-            File policyDirectory) throws AccessControlException {
-
-        File[] policyFiles = policyDirectory.listFiles(new SubtreeFileFilter(URL_FILENAME, SUBTREE_FILENAME));
-
-        try {
-            RemovedAccreditablePolicyBuilder builder = new RemovedAccreditablePolicyBuilder(manager);
-            builder.setRemovedAccreditable(accreditable);
-            for (int i = 0; i < policyFiles.length; i++) {
-
-                if (getLogger().isDebugEnabled()) {
-                    getLogger().debug("Removing roles");
-                    getLogger().debug("    Accreditable: [" + accreditable + "]");
-                    getLogger().debug(
-                            "    File:         [" + policyFiles[i].getAbsolutePath() + "]");
-                }
-
-                InputStream stream = new FileInputStream(policyFiles[i]);
-                DefaultPolicy policy = builder.buildPolicy(stream);
-                policy.removeRoles(accreditable);
-                savePolicy(policy, policyFiles[i]);
-            }
-        } catch (final FileNotFoundException e1) {
-            throw new AccessControlException(e1);
-        } catch (final AccessControlException e1) {
-            throw new AccessControlException(e1);
-        }
-
-        File[] directories = policyDirectory.listFiles(new IsDirectoryFileFilter());
-
-        for (int i = 0; i < directories.length; i++) {
-            removeAccreditable(manager, accreditable, directories[i]);
-        }
-
-    }
-
-    /**
-     * @see org.apache.lenya.ac.PolicyManager#accreditableRemoved(org.apache.lenya.ac.AccreditableManager,
-     *      org.apache.lenya.ac.Accreditable)
-     */
-    public void accreditableRemoved(AccreditableManager manager, Accreditable accreditable)
-            throws AccessControlException {
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("An accreditable was removed: [" + accreditable + "]");
-        }
-
-        removeAccreditable(manager, accreditable, getPoliciesDirectory());
-
-        if (accreditable instanceof User) {
-            Role role = URLPolicy.getAuthorRole(manager);
-            if (role != null) {
-                String url = USER_ADMIN_URL + ((User) accreditable).getId() + ".html";
-                DefaultPolicy policy = buildSubtreePolicy(manager, url);
-                Credential credential = policy.getCredential(accreditable);
-                if (credential != null && credential.contains(role)) {
-                    policy.removeRole(accreditable, role);
-                }
-                saveSubtreePolicy(url, policy);
-            }
-        }
-    }
-
-    private ServiceManager serviceManager;
-
-    /**
-     * Returns the service manager.
-     * @return A service manager.
-     */
-    protected ServiceManager getServiceManager() {
-        return this.serviceManager;
-    }
-
-    /**
-     * @see org.apache.lenya.ac.PolicyManager#accreditableAdded(org.apache.lenya.ac.AccreditableManager,
-     *      org.apache.lenya.ac.Accreditable)
-     */
-    public void accreditableAdded(AccreditableManager manager, Accreditable accreditable)
-            throws AccessControlException {
-        if (accreditable instanceof User) {
-            Role role = URLPolicy.getAuthorRole(manager);
-            if (role != null) {
-                String url = USER_ADMIN_URL + ((User) accreditable).getId() + ".html";
-                DefaultPolicy policy = buildSubtreePolicy(manager, url);
-                policy.addRole(accreditable, role);
-                saveSubtreePolicy(url, policy);
-            }
-        }
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/ac/file/FileRole.java b/src/java/org/apache/lenya/ac/file/FileRole.java
deleted file mode 100644
index 01df317..0000000
--- a/src/java/org/apache/lenya/ac/file/FileRole.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac.file;
-
-import java.io.File;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.configuration.DefaultConfiguration;
-import org.apache.avalon.framework.configuration.DefaultConfigurationSerializer;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.Item;
-import org.apache.lenya.ac.impl.AbstractRole;
-import org.apache.lenya.ac.impl.ItemConfiguration;
-
-/**
- * File-based role implementation.
- * @version $Id$
- */
-public class FileRole extends AbstractRole implements Item {
-
-    /**
-     * Creates a new file role.
-     * @param _configurationDirectory The configuration directory.
-     * @param id The role ID.
-     */
-    public FileRole(File _configurationDirectory, String id) {
-        setId(id);
-        setConfigurationDirectory(_configurationDirectory);
-    }
-
-    protected static final String ROLE = "role";
-
-    /**
-     * Creates a new FileRole object.
-     */
-    public FileRole() {
-	    // do nothing
-    }
-
-    /**
-     * Configure this instance of <code>FileRole</code>
-     * @param config containing the role details
-     * @throws ConfigurationException if the <code>FileRole</code> could not be configured
-     */
-    public void configure(Configuration config) throws ConfigurationException {
-        new ItemConfiguration().configure(this, config);
-    }
-
-    /**
-     * Save the role
-     * @throws AccessControlException if the save fails
-     */
-    public void save() throws AccessControlException {
-        DefaultConfigurationSerializer serializer = new DefaultConfigurationSerializer();
-        Configuration config = createConfiguration();
-        File xmlPath = getConfigurationDirectory();
-        File xmlfile = new File(xmlPath, getId() + FileRoleManager.SUFFIX);
-
-        try {
-            serializer.serializeToFile(xmlfile, config);
-        } catch (Exception e) {
-            throw new AccessControlException(e);
-        }
-    }
-
-    /**
-     * Create a configuration containing the role details
-     * @return a <code>Configuration</code>
-     */
-    private Configuration createConfiguration() {
-        DefaultConfiguration config = new DefaultConfiguration(ROLE);
-        new ItemConfiguration().save(this, config);
-        return config;
-    }
-
-    private File configurationDirectory;
-
-    /**
-     * Returns the configuration directory.
-     * @return A file object.
-     */
-    public File getConfigurationDirectory() {
-        return this.configurationDirectory;
-    }
-
-    /**
-     * @see org.apache.lenya.ac.Item#setConfigurationDirectory(java.io.File)
-     */
-    public void setConfigurationDirectory(File file) {
-        this.configurationDirectory = file;
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/ac/file/FileRoleManager.java b/src/java/org/apache/lenya/ac/file/FileRoleManager.java
deleted file mode 100644
index ef61a2c..0000000
--- a/src/java/org/apache/lenya/ac/file/FileRoleManager.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac.file;
-
-import java.io.File;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.Item;
-import org.apache.lenya.ac.Role;
-import org.apache.lenya.ac.RoleManager;
-
-/**
- * File-based role manager implementation.
- * @version $Id$
- */
-public final class FileRoleManager extends FileItemManager implements RoleManager {
-    protected static final String SUFFIX = ".rml";
-    private static Map instances = new HashMap();
-
-    /**
-     * Return the <code>RoleManager</code> for this configuration directory. The
-     * <code>RoleManager</code> is a singleton.
-     */
-    protected FileRoleManager() {
-	    // do nothing
-    }
-
-    /**
-     * Returns the role manager for this configuration directory.
-     * @param configurationDirectory The configuration directory.
-     * @param logger The logger.
-     * @return A role manager.
-     * @throws AccessControlException when something went wrong.
-     */
-    public static FileRoleManager instance(File configurationDirectory, Logger logger)
-            throws AccessControlException {
-        if (!instances.containsKey(configurationDirectory)) {
-            FileRoleManager manager = new FileRoleManager();
-            manager.enableLogging(logger);
-            manager.configure(configurationDirectory);
-            instances.put(configurationDirectory, manager);
-        }
-
-        return (FileRoleManager) instances.get(configurationDirectory);
-    }
-
-    /**
-     * Get the role for the given ID.
-     * @param roleId The name of the role requested.
-     * @return a <code>Role</code> or null if no role with the given name found
-     */
-    public Role getRole(String roleId) {
-        return (Role) getItem(roleId);
-    }
-
-    /**
-     * @see org.apache.lenya.ac.file.FileItemManager#getSuffix()
-     */
-    protected String getSuffix() {
-        return SUFFIX;
-    }
-
-    /**
-     * Get all roles
-     * @return an array of roles.
-     */
-    public Role[] getRoles() {
-        Item[] items = super.getItems();
-        Role[] roles = new Role[items.length];
-        for (int i = 0; i < roles.length; i++) {
-            roles[i] = (Role) items[i];
-        }
-        return roles;
-    }
-
-    /**
-     * Add a role
-     * @param role The role to add.
-     * @throws AccessControlException if an error occurs.
-     */
-    public void add(Role role) throws AccessControlException {
-        super.add(role);
-    }
-
-    /**
-     * Remove a role
-     * @param role The role to remove.
-     * @throws AccessControlException if an error occurs.
-     */
-    public void remove(Role role) throws AccessControlException {
-        super.remove(role);
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/ac/file/FileUser.java b/src/java/org/apache/lenya/ac/file/FileUser.java
deleted file mode 100644
index b343618..0000000
--- a/src/java/org/apache/lenya/ac/file/FileUser.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac.file;
-
-import java.io.File;
-import java.io.Serializable;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.configuration.DefaultConfiguration;
-import org.apache.avalon.framework.configuration.DefaultConfigurationSerializer;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.Group;
-import org.apache.lenya.ac.Item;
-import org.apache.lenya.ac.impl.AbstractUser;
-import org.apache.lenya.ac.impl.ItemConfiguration;
-
-/**
- * File-based user implementation.
- * @version $Id$
- */
-public class FileUser extends AbstractUser implements Item, Serializable {
-
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-	protected static final String ID = "identity";
-    protected static final String EMAIL = "email";
-    protected static final String MENU_LOCALE = "default-menu-locale";
-    protected static final String DOCUMENT_LOCALE = "default-document-locale";
-    protected static final String PASSWORD = "password";
-    protected static final String GROUPS = "groups";
-    protected static final String GROUP = "group";
-    protected static final String PASSWORD_ATTRIBUTE = "type";
-
-    /**
-     * Creates a new FileUser object.
-     */
-    public FileUser() {
-	    // do nothing
-    }
-
-    /**
-     * Create a FileUser
-     * @param _configurationDirectory where the user will be attached to
-     * @param id the user id
-     * @param fullName the full name of the user
-     * @param email the users email address
-     * @param password the users password
-     */
-    public FileUser(File _configurationDirectory, String id, String fullName, String email,
-            String password) {
-        super(id, fullName, email, password);
-        setConfigurationDirectory(_configurationDirectory);
-    }
-
-    /**
-     * Configure this FileUser.
-     * @param config where the user details are specified
-     * @throws ConfigurationException if the necessary details aren't specified in the config
-     */
-    public void configure(Configuration config) throws ConfigurationException {
-        new ItemConfiguration().configure(this, config);
-        setEmail(config.getChild(EMAIL).getValue(""));
-        setDefaultMenuLocale(config.getChild(MENU_LOCALE).getValue(""));
-        setDefaultDocumentLocale(config.getChild(DOCUMENT_LOCALE).getValue(""));
-        setEncryptedPassword(config.getChild(PASSWORD).getValue(null));
-
-        removeFromAllGroups();
-        Configuration[] groups = config.getChildren(GROUPS);
-
-        if (groups.length == 1) {
-            groups = groups[0].getChildren(GROUP);
-
-            FileGroupManager manager = null;
-
-            try {
-                manager = FileGroupManager.instance(this.configurationDirectory, getLogger());
-            } catch (AccessControlException e) {
-                throw new ConfigurationException(
-                        "Exception when trying to fetch GroupManager for directory: ["
-                                + this.configurationDirectory + "]", e);
-            }
-
-            for (int i = 0; i < groups.length; i++) {
-                String groupId = groups[i].getValue();
-                Group group = manager.getGroup(groupId);
-
-                if (group == null) {
-                    throw new ConfigurationException("Couldn't find Group for group name ["
-                            + groupId + "]");
-                }
-
-                if (!group.contains(this)) {
-                    group.add(this);
-                }
-
-            }
-        } else {
-            // strange, it should have groups
-            getLogger().error("User " + getId() + " doesn't seem to have any groups");
-        }
-    }
-
-    /**
-     * Create a configuration from the current user details. Can be used for saving.
-     * @return a <code>Configuration</code>
-     */
-    protected Configuration createConfiguration() {
-        DefaultConfiguration config = new DefaultConfiguration(ID);
-        new ItemConfiguration().save(this, config);
-
-        DefaultConfiguration child = null;
-
-        // add email node
-        child = new DefaultConfiguration(EMAIL);
-        child.setValue(getEmail());
-        config.addChild(child);
-
-        // add defaultMenuLocale node
-        child = new DefaultConfiguration(MENU_LOCALE);
-        child.setValue(getDefaultMenuLocale());
-        config.addChild(child);
-
-        // add defaultDocumentLocale node
-        child = new DefaultConfiguration(DOCUMENT_LOCALE);
-        child.setValue(getDefaultDocumentLocale());
-        config.addChild(child);
-        
-        // add password node
-        child = new DefaultConfiguration(PASSWORD);
-        child.setValue(getEncryptedPassword());
-        child.setAttribute(PASSWORD_ATTRIBUTE, "md5");
-        config.addChild(child);
-
-        // add group nodes
-        child = new DefaultConfiguration(GROUPS);
-        config.addChild(child);
-
-        Group[] groups = getGroups();
-
-        for (int i = 0; i < groups.length; i++) {
-            DefaultConfiguration groupNode = new DefaultConfiguration(GROUP);
-            groupNode.setValue(groups[i].getId());
-            child.addChild(groupNode);
-        }
-
-        return config;
-    }
-
-    /**
-     * @see org.apache.lenya.ac.User#save()
-     */
-    public void save() throws AccessControlException {
-        DefaultConfigurationSerializer serializer = new DefaultConfigurationSerializer();
-        Configuration config = createConfiguration();
-
-        try {
-            serializer.serializeToFile(getFile(), config);
-        } catch (Exception e) {
-            throw new AccessControlException(e);
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.ac.User#delete()
-     */
-    public void delete() throws AccessControlException {
-        super.delete();
-        getFile().delete();
-    }
-
-    /**
-     * Returns the configuration file.
-     * @return A file object.
-     */
-    protected File getFile() {
-        File xmlPath = getConfigurationDirectory();
-        File xmlFile = new File(xmlPath, getId() + FileUserManager.SUFFIX);
-        return xmlFile;
-    }
-
-    private File configurationDirectory;
-
-    /**
-     * Returns the configuration directory.
-     * @return A file object.
-     */
-    protected File getConfigurationDirectory() {
-        return this.configurationDirectory;
-    }
-
-    /**
-     * @see org.apache.lenya.ac.Item#setConfigurationDirectory(java.io.File)
-     */
-    public void setConfigurationDirectory(File _configurationDirectory) {
-        assert (_configurationDirectory != null) && _configurationDirectory.isDirectory();
-        this.configurationDirectory = _configurationDirectory;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/ac/file/FileUserManager.java b/src/java/org/apache/lenya/ac/file/FileUserManager.java
deleted file mode 100644
index 8e07f67..0000000
--- a/src/java/org/apache/lenya/ac/file/FileUserManager.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac.file;
-
-import java.io.File;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.Item;
-import org.apache.lenya.ac.User;
-import org.apache.lenya.ac.UserManager;
-import org.apache.lenya.ac.UserType;
-
-/**
- * File-based user manager implementation.
- * @version $Id$
- */
-public class FileUserManager extends FileItemManager implements UserManager {
-
-    private static Map instances = new HashMap();
-    private Set userTypes;
-
-    /**
-     * Create a UserManager
-     * 
-     * @param _userTypes The supported user types.
-     * @throws AccessControlException if the UserManager could not be instantiated.
-     */
-    private FileUserManager(UserType[] _userTypes)
-            throws AccessControlException {
-        this.userTypes = new HashSet(Arrays.asList(_userTypes));
-    }
-
-    /**
-     * Describe <code>instance</code> method here.
-     * 
-     * @param configurationDirectory a directory
-     * @param userTypes The supported user types.
-     * @param logger The logger.
-     * @return an <code>UserManager</code> value
-     * @exception AccessControlException if an error occurs
-     */
-    public static FileUserManager instance(File configurationDirectory, UserType[] userTypes, Logger logger)
-            throws AccessControlException {
-
-        assert configurationDirectory != null;
-        if (!configurationDirectory.isDirectory()) {
-            throw new AccessControlException("Configuration directory [" + configurationDirectory
-                    + "] does not exist!");
-        }
-
-        if (!instances.containsKey(configurationDirectory)) {
-            FileUserManager manager = new FileUserManager(userTypes);
-            manager.enableLogging(logger);
-            manager.configure(configurationDirectory);
-            instances.put(configurationDirectory, manager);
-        }
-
-        return (FileUserManager) instances.get(configurationDirectory);
-    }
-
-    /**
-     * Get all users.
-     * 
-     * @return an Iterator to iterate over all users
-     */
-    public User[] getUsers() {
-        Item[] items = super.getItems();
-        User[] users = new User[items.length];
-        for (int i = 0; i < users.length; i++) {
-            users[i] = (User) items[i];
-        }
-        return users;
-    }
-
-    /**
-     * @see org.apache.lenya.ac.UserManager#add(org.apache.lenya.ac.User)
-     */
-    public void add(User user) throws AccessControlException {
-        super.add(user);
-    }
-
-    /**
-     * @see org.apache.lenya.ac.UserManager#remove(org.apache.lenya.ac.User)
-     */
-    public void remove(User user) throws AccessControlException {
-        super.remove(user);
-    }
-
-    /**
-     * Get the user with the given user id.
-     * 
-     * @param userId user id of requested user
-     * @return the requested user or null if there is no user with the given user id
-     */
-    public User getUser(String userId) {
-        return (User) getItem(userId);
-    }
-
-    /**
-     * @see org.apache.lenya.ac.UserManager#getUserTypes()
-     */
-    public UserType[] getUserTypes() {
-        return (UserType[]) this.userTypes.toArray(new UserType[this.userTypes.size()]);
-    }
-
-    protected static final String SUFFIX = ".iml";
-
-    /**
-     * @see org.apache.lenya.ac.file.FileItemManager#getSuffix()
-     */
-    protected String getSuffix() {
-        return SUFFIX;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/ac/impl/AbstractAccessControllerResolver.java b/src/java/org/apache/lenya/ac/impl/AbstractAccessControllerResolver.java
deleted file mode 100644
index 8e6740c..0000000
--- a/src/java/org/apache/lenya/ac/impl/AbstractAccessControllerResolver.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac.impl;
-
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.avalon.framework.thread.ThreadSafe;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.AccessController;
-import org.apache.lenya.ac.AccessControllerResolver;
-import org.apache.lenya.ac.cache.URLKeyUtil;
-import org.apache.lenya.util.CacheMap;
-
-/**
- * Abstract implementation for access controller resolvers.
- * @version $Id$
- */
-public abstract class AbstractAccessControllerResolver
-    extends AbstractLogEnabled
-    implements AccessControllerResolver, Serviceable, ThreadSafe {
-
-    protected static final int CAPACITY = 1000;
-    private CacheMap cache = new CacheMap(CAPACITY);
-
-    /**
-     * @see org.apache.lenya.ac.AccessControllerResolver#resolveAccessController(java.lang.String)
-     */
-    public AccessController resolveAccessController(String webappUrl)
-        throws AccessControlException {
-
-        SourceResolver resolver = null;
-        AccessController controller = null;
-        Object key = null;
-
-        try {
-            resolver = (SourceResolver) getManager().lookup(SourceResolver.ROLE);
-            key = generateCacheKey(webappUrl, resolver);
-            getLogger().debug("Access controller cache key: [" + key + "]");
-
-        } catch (Exception e) {
-            throw new AccessControlException(e);
-        } finally {
-            if (resolver != null) {
-                getManager().release(resolver);
-            }
-        }
-
-        synchronized (this.cache) {
-            controller = (AccessController) this.cache.get(key);
-            if (controller == null) {
-                getLogger().debug("No access controller in cache.");
-                controller = doResolveAccessController(webappUrl);
-                this.cache.put(key, controller);
-            } else {
-                getLogger().debug("Getting access controller from cache.");
-            }
-        }
-
-        return controller;
-    }
-
-    /**
-     * Generates a cache key for the access controller.
-     * @param webappUrl The webapp URL.
-     * @param resolver The source resolver.
-     * @return An object.
-     * @throws AccessControlException when something went wrong.
-     */
-    protected Object generateCacheKey(String webappUrl, SourceResolver resolver)
-        throws AccessControlException {
-        Object key;
-        try {
-            key = URLKeyUtil.generateKey(resolver, webappUrl);
-        } catch (Exception e) {
-            throw new AccessControlException(e);
-        }
-        return key;
-    }
-
-    /**
-     * The actual resolving method.
-     * @param webappUrl The URL within the web application.
-     * @return An access controller.
-     * @throws AccessControlException when something went wrong.
-     */
-    protected abstract AccessController doResolveAccessController(String webappUrl)
-        throws AccessControlException;
-
-    /**
-     * @see org.apache.lenya.ac.AccessControllerResolver#release(org.apache.lenya.ac.AccessController)
-     */
-    public void release(AccessController controller) {
-        /*
-        if (controller != null) {
-            getManager().release(controller);
-        }
-        */
-    }
-
-    private ServiceManager manager;
-
-    /**
-     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service(ServiceManager _manager) throws ServiceException {
-        getLogger().debug("Servicing [" + getClass().getName() + "]");
-        this.manager = _manager;
-    }
-
-    /**
-     * Returns the service manager of this Serviceable.
-     * @return A service manager.
-     */
-    public ServiceManager getManager() {
-        return this.manager;
-    }
-
-}
diff --git a/src/java/org/apache/lenya/ac/impl/AbstractAccreditableManager.java b/src/java/org/apache/lenya/ac/impl/AbstractAccreditableManager.java
deleted file mode 100644
index b858d78..0000000
--- a/src/java/org/apache/lenya/ac/impl/AbstractAccreditableManager.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac.impl;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.avalon.framework.activity.Disposable;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.AccreditableManager;
-import org.apache.lenya.ac.GroupManager;
-import org.apache.lenya.ac.IPRangeManager;
-import org.apache.lenya.ac.Item;
-import org.apache.lenya.ac.ItemManagerListener;
-import org.apache.lenya.ac.RoleManager;
-import org.apache.lenya.ac.UserManager;
-
-/**
- * Abstract base class for accreditable managers.
- */
-public abstract class AbstractAccreditableManager
-    extends AbstractLogEnabled
-    implements AccreditableManager, ItemManagerListener, Disposable {
-
-    private UserManager userManager = null;
-    private GroupManager groupManager = null;
-    private IPRangeManager ipRangeManager = null;
-    private RoleManager roleManager = null;
-
-    private List itemManagerListeners = new ArrayList();
-
-    /**
-	 * Attaches an item manager listener to this accreditable manager.
-	 * @param listener An item manager listener.
-	 */
-    public void addItemManagerListener(ItemManagerListener listener) {
-        if (!this.itemManagerListeners.contains(listener)) {
-            
-            if (getLogger().isDebugEnabled()) {
-                getLogger().debug("Adding listener: [" + listener + "]");
-            }
-            
-            this.itemManagerListeners.add(listener);
-        }
-    }
-
-    /**
-	 * Removes an item manager listener from this accreditable manager.
-	 * @param listener An item manager listener.
-	 */
-    public void removeItemManagerListener(ItemManagerListener listener) {
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Removing listener: [" + listener + "]");
-        }
-            
-        this.itemManagerListeners.remove(listener);
-    }
-
-    /**
-	 * Notifies the listeners that an item was added.
-	 * @param item The item that was added.
-	 * @throws AccessControlException when a notified listener threw this exception.
-	 */
-    protected void notifyAdded(Item item) throws AccessControlException {
-        List clone = new ArrayList(this.itemManagerListeners);
-        for (Iterator i = clone.iterator(); i.hasNext();) {
-            ItemManagerListener listener = (ItemManagerListener) i.next();
-            listener.itemAdded(item);
-        }
-    }
-
-    /**
-	 * Notifies the listeners that an item was removed.
-	 * @param item The item that was removed.
-	 * @throws AccessControlException when a notified listener threw this exception.
-	 */
-    protected void notifyRemoved(Item item) throws AccessControlException {
-        List clone = new ArrayList(this.itemManagerListeners);
-        for (Iterator i = clone.iterator(); i.hasNext();) {
-            ItemManagerListener listener = (ItemManagerListener) i.next();
-            listener.itemRemoved(item);
-        }
-    }
-
-    /**
-	 * @see org.apache.lenya.ac.ItemManagerListener#itemAdded(org.apache.lenya.ac.Item)
-	 */
-    public void itemAdded(Item item) throws AccessControlException {
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Item was added: [" + item + "] - notifying listeners");
-        }
-        notifyAdded(item);
-    }
-
-    /**
-	 * @see org.apache.lenya.ac.ItemManagerListener#itemRemoved(org.apache.lenya.ac.Item)
-	 */
-    public void itemRemoved(Item item) throws AccessControlException {
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Item was removed: [" + item + "] - notifying listeners");
-        }
-        notifyRemoved(item);
-    }
-
-    /**
-	 * @see org.apache.avalon.framework.activity.Disposable#dispose()
-	 */
-    public void dispose() {
-        if (this.userManager != null) {
-            this.userManager.removeItemManagerListener(this);
-        }
-        if (this.groupManager != null) {
-            this.groupManager.removeItemManagerListener(this);
-        }
-        if (this.ipRangeManager != null) {
-            this.ipRangeManager.removeItemManagerListener(this);
-        }
-        if (this.roleManager != null) {
-            this.roleManager.removeItemManagerListener(this);
-        }
-        
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Disposing [" + this + "]");
-        }
-    }
-
-    /**
-	 * @see org.apache.lenya.ac.AccreditableManager#getUserManager()
-	 */
-    public UserManager getUserManager() throws AccessControlException {
-        if (this.userManager == null) {
-            this.userManager = initializeUserManager();
-            this.userManager.addItemManagerListener(this);
-        }
-        return this.userManager;
-    }
-
-    /**
-	 * @see org.apache.lenya.ac.AccreditableManager#getGroupManager()
-	 */
-    public GroupManager getGroupManager() throws AccessControlException {
-        if (this.groupManager == null) {
-            this.groupManager = initializeGroupManager();
-            this.groupManager.addItemManagerListener(this);
-        }
-        return this.groupManager;
-    }
-
-    /**
-	 * @see org.apache.lenya.ac.AccreditableManager#getRoleManager()
-	 */
-    public RoleManager getRoleManager() throws AccessControlException {
-        if (this.roleManager == null) {
-            this.roleManager = initializeRoleManager();
-            this.roleManager.addItemManagerListener(this);
-        }
-        return this.roleManager;
-    }
-
-    /**
-	 * @see org.apache.lenya.ac.AccreditableManager#getIPRangeManager()
-	 */
-    public IPRangeManager getIPRangeManager() throws AccessControlException {
-        if (this.ipRangeManager == null) {
-            this.ipRangeManager = initializeIPRangeManager();
-            this.ipRangeManager.addItemManagerListener(this);
-        }
-        return this.ipRangeManager;
-    }
-
-    /**
-	 * Initializes the group manager.
-	 * 
-     * @return A group manager.
-	 * @throws AccessControlException when something went wrong.
-	 */
-    protected abstract GroupManager initializeGroupManager() throws AccessControlException;
-
-    /**
-	 * Initializes the IP range manager.
-	 * 
-     * @return An IP range manager.
-	 * @throws AccessControlException when something went wrong.
-	 */
-    protected abstract IPRangeManager initializeIPRangeManager() throws AccessControlException;
-
-    /**
-	 * Initializes the role manager.
-	 * 
-     * @return A role manager.
-	 * @throws AccessControlException when something went wrong.
-	 */
-    protected abstract RoleManager initializeRoleManager() throws AccessControlException;
-
-    /**
-	 * Initializes the user manager.
-	 * 
-     * @return A user manager.
-	 * @throws AccessControlException when something went wrong.
-	 */
-    protected abstract UserManager initializeUserManager() throws AccessControlException;
-
-}
diff --git a/src/java/org/apache/lenya/ac/impl/AbstractGroup.java b/src/java/org/apache/lenya/ac/impl/AbstractGroup.java
deleted file mode 100644
index 353a0e9..0000000
--- a/src/java/org/apache/lenya/ac/impl/AbstractGroup.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac.impl;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.Accreditable;
-import org.apache.lenya.ac.Group;
-import org.apache.lenya.ac.Groupable;
-
-
-/**
- * A group is a set of {@link Groupable}s.
- */
-public abstract class AbstractGroup extends AbstractItem implements Accreditable, Group {
-    
-    /**
-     * Creates a new group.
-     */
-    public AbstractGroup() {
-	    // do nothing
-    }
-
-    /**
-     * Creates a new group.
-     * @param id The group ID.
-     */
-    public AbstractGroup(String id) {
-        setId(id);
-    }
-
-    private Set members = new HashSet();
-
-    /**
-     * Returns the members of this group.
-     * @return An array of {@link Groupable}s.
-     */
-    public Groupable[] getMembers() {
-        return (Groupable[]) this.members.toArray(new Groupable[this.members.size()]);
-    }
-
-    /**
-    * Adds a member to this group.
-     * @param member The member to add.
-     */
-    public void add(Groupable member) {
-        assert (member != null) && !this.members.contains(member);
-        this.members.add(member);
-        member.addedToGroup(this);
-    }
-
-    /**
-     * Removes a member from this group.
-     * @param member The member to remove.
-     */
-    public void remove(Groupable member) {
-        assert (member != null) && this.members.contains(member);
-        this.members.remove(member);
-        member.removedFromGroup(this);
-    }
-    
-    /**
-     * Removes all members from this group.
-     */
-    public void removeAllMembers() {
-        Groupable[] _members = getMembers();
-        for (int i = 0; i < _members.length; i++) {
-            remove(_members[i]); 
-        }
-    }
-
-    /**
-     * Returns if this group contains this member.
-     * @param member The member to check.
-     * @return A boolean value.
-     */
-    public boolean contains(Groupable member) {
-        return this.members.contains(member);
-    }
-
-    /**
-     * @see org.apache.lenya.ac.Accreditable#getAccreditables()
-     */
-    public Accreditable[] getAccreditables() {
-        Accreditable[] accreditables = { this };
-        return accreditables;
-    }
-    
-    /**
-     * Delete a group
-     * @throws AccessControlException if the delete failed
-     */
-    public void delete() throws AccessControlException {
-        removeAllMembers();
-    }
-
-}
diff --git a/src/java/org/apache/lenya/ac/impl/AbstractGroupable.java b/src/java/org/apache/lenya/ac/impl/AbstractGroupable.java
deleted file mode 100644
index 199dd73..0000000
--- a/src/java/org/apache/lenya/ac/impl/AbstractGroupable.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac.impl;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.apache.lenya.ac.Accreditable;
-import org.apache.lenya.ac.Group;
-import org.apache.lenya.ac.Groupable;
-
-/**
- * Abstract implementation for group members.
- * @version $Id$
- */
-public abstract class AbstractGroupable extends AbstractItem implements Groupable, Accreditable {
-    
-    /**
-     * Ctor.
-     */
-    public AbstractGroupable() {
-	    // do nothing
-    }
-
-    private Set groups = new HashSet();
-
-    /**
-     * @see org.apache.lenya.ac.Groupable#addedToGroup(org.apache.lenya.ac.Group)
-     */
-    public void addedToGroup(Group group) {
-        assert group != null;
-        assert group.contains(this);
-        this.groups.add(group);
-    }
-
-    /**
-     * @see org.apache.lenya.ac.Groupable#removedFromGroup(org.apache.lenya.ac.Group)
-     */
-    public void removedFromGroup(Group group) {
-        assert group != null;
-        assert !group.contains(this);
-        this.groups.remove(group);
-    }
-
-    /**
-     * @see org.apache.lenya.ac.Groupable#getGroups()
-     */
-    public Group[] getGroups() {
-        return (Group[]) this.groups.toArray(new Group[this.groups.size()]);
-    }
-
-    /**
-     * Removes this groupable from all its groups.
-     */
-    public void removeFromAllGroups() {
-        Group[] _groups = getGroups();
-
-        for (int i = 0; i < _groups.length; i++) {
-            _groups[i].remove(this);
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.ac.Accreditable#getAccreditables()
-     */
-    public Accreditable[] getAccreditables() {
-        Set accreditables = new HashSet();
-        accreditables.add(this);
-
-        Group[] _groups = getGroups();
-
-        for (int i = 0; i < _groups.length; i++) {
-            Accreditable[] groupAccreditables = _groups[i].getAccreditables();
-            accreditables.addAll(Arrays.asList(groupAccreditables));
-        }
-
-        return (Accreditable[]) accreditables.toArray(new Accreditable[accreditables.size()]);
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/ac/impl/AbstractIPRange.java b/src/java/org/apache/lenya/ac/impl/AbstractIPRange.java
deleted file mode 100644
index cd37c54..0000000
--- a/src/java/org/apache/lenya/ac/impl/AbstractIPRange.java
+++ /dev/null
@@ -1,358 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac.impl;
-
-import java.io.File;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Arrays;
-
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.IPRange;
-import org.apache.lenya.ac.Machine;
-import org.apache.lenya.net.InetAddressUtil;
-
-/**
- * <p>
- * A range of IP addresses, expressed by a network address and a subnet mask.
- * </p>
- * <p>
- * Note: this class does not enforce that the network address and the subnet mask have the same size
- * (i.e. either both IPv4 or both IPv6 addresses). If the the network address and subnet mask have
- * different sizes, the range does not contain any hosts, that is {@link #contains(Machine)} will
- * always return <code>false</code>.
- * </p>
- */
-public abstract class AbstractIPRange extends AbstractGroupable implements IPRange {
-    /*
-     * FIXME by zisch@dals.ch: Fixed this class for IPv6. However there are still some general
-     * flaws, partly coming from the IPRange interface. A redesign of (Abstract/File)IPRange and
-     * it's helper class org.apache.lenya.net.InetAddressUtil would be a good idea. Some problems of
-     * this implementation are:
-     *  - The whole initialization seems flawed. Objects can be in an unitialized state and the
-     * class seems not to be aware of this.
-     *  - Network-address and -mask can be set independently. Therefore it cannot be enforced that
-     * these have the same size (i.e. that both are IPv4 or both are IPv6). This shows up in
-     * InetAddressUtil.contains(...), where in a case of mismatch there is no good way to inform the
-     * user about the problem. This should be done once when the AbstractIPRange object is
-     * initialized.
-     *  - Unless this functionality would be needed by other parts of Lenya or external software
-     * (which seems not to be the case ;-), InetAddressUtil should be removed (resp. deprecated)
-     * altogether, because it's mostly an internal implementation detail of AbstractIPRange.
-     * AbstractIPRange should implement the contains(...)-method internally to make use of the fact
-     * that the network- addresses and -masks validity and compatibility has already been checked
-     * when setting these. (Once the above problems have been fixed. ;-)
-     *  - Especially for IPv6 it would be nice to have the possibility to specify the netmask as the
-     * number of bits (as in "::1/128" or "127.0.0.1/24").
-     * 
-     * FIXME II (from the previous version): why are we in the business of implementing IP ranges??
-     */
-
-    /**
-     * Initializes the the IP range with the local host (127.0.0.1/24 for IPv4, ::1/128 for IPv6).
-     */
-    public AbstractIPRange() {
-        try {
-            this.networkAddress = InetAddress.getLocalHost();
-            byte[] mask = null;
-            int masklen = this.networkAddress.getAddress().length;
-            if (masklen == 4) {
-                /* IPv4: */
-                /*
-                 * FIXME? by zisch@dals.ch: Should this be { -1, 0, 0, 0 }??
-                 */
-                mask = new byte[] { -1, -1, -1, 0 };
-            } else {
-                /* IPv6 (and others ;-): */
-                mask = new byte[masklen];
-                Arrays.fill(mask, (byte) -1);
-            }
-            this.subnetMask = InetAddress.getByAddress(mask);
-        } catch (UnknownHostException ignore) {
-            /*
-             * FIXME? by zisch@dals.ch: Is it safe to ignore the exception and just leave the
-             * IPRange uninitialized!?
-             */
-        }
-    }
-
-    /**
-     * Ctor.
-     * @param id The IP range ID.
-     */
-    public AbstractIPRange(String id) {
-        setId(id);
-    }
-
-    private File configurationDirectory;
-
-    /**
-     * Returns the configuration directory.
-     * @return A file object.
-     */
-    public File getConfigurationDirectory() {
-        return this.configurationDirectory;
-    }
-
-    /**
-     * @see org.apache.lenya.ac.Item#setConfigurationDirectory(java.io.File)
-     */
-    public void setConfigurationDirectory(File _configurationDirectory) {
-        this.configurationDirectory = _configurationDirectory;
-    }
-
-    /**
-     * Save the IP range
-     * @throws AccessControlException if the save failed
-     */
-    public abstract void save() throws AccessControlException;
-
-    /**
-     * Delete an IP range
-     * @throws AccessControlException if the delete failed
-     */
-    public void delete() throws AccessControlException {
-        removeFromAllGroups();
-    }
-
-    private InetAddress networkAddress;
-
-    /**
-     * Sets the network address. This method accepts numeric IPv4 addresses like
-     * <code>"129.168.0.32"</code>, numeric IPv6 addresses like
-     * <code>"1080::8:800:200C:417A"</code> as well as hostnames (if DNS resolution is available)
-     * like <code>"localhost"</code> or <code>"www.apache.com"</code>.
-     * @param address a <code>String</code> like <code>"192.168.0.32"</code>,
-     *            <code>"::1"</code>, ...
-     * @throws AccessControlException when the conversion of the <code>String</code> to an
-     *             <code>InetAddress</code> failed
-     * @see #setNetworkAddress(byte[])
-     */
-    public void setNetworkAddress(String address) throws AccessControlException {
-        try {
-            this.networkAddress = InetAddress.getByName(address);
-        } catch (UnknownHostException e) {
-            throw new AccessControlException("Failed to convert address [" + address + "]: ", e);
-        }
-    }
-
-    /**
-     * Sets the network address. The method accepts numeric IPv4 addresses (specified by byte arrays
-     * of length 4) or IPv6 addresses (specified by byte arrays of length 16).
-     * @param address a byte array of the length 4 or 16
-     * @throws AccessControlException when the conversion of the byte array to an InetAddress
-     *             failed.
-     * @see #setNetworkAddress(String)
-     */
-    public void setNetworkAddress(byte[] address) throws AccessControlException {
-        try {
-            this.networkAddress = InetAddress.getByAddress(address);
-        } catch (UnknownHostException e) {
-            throw new AccessControlException("Failed to convert address [" + addr2string(address)
-                    + "]: ", e);
-        }
-    }
-
-    /**
-     * Returns the network address.
-     * @return an <code>InetAddress</code> representing the network address
-     */
-    public InetAddress getNetworkAddress() {
-        return this.networkAddress;
-    }
-
-    private InetAddress subnetMask;
-
-    /**
-     * Sets the subnet mask. See {@link #setNetworkAddress(String)} for the allowed formats of the
-     * <code>mask</code> string. (However, the hostname format will usually not be of much use for
-     * setting the mask.)
-     * <p>
-     * Only valid subnet masks are accepted, for which the binary representation is a sequence of
-     * 1-bits followed by a sequence of 0-bits. For example <code>"255.128.0.0"</code> is valid
-     * while <code>"255.128.0.1"</code> is not.
-     * @param mask a <code>String</code> like <code>"255.255.255.0"</code>
-     * @throws AccessControlException when the conversion of the String to an
-     *             <code>InetAddress</code> failed.
-     * @see #setSubnetMask(byte[])
-     */
-    public void setSubnetMask(String mask) throws AccessControlException {
-        try {
-            /* use setSubnetMask(...) to check the mask-format: */
-            setSubnetMask(InetAddress.getByName(mask).getAddress());
-        } catch (final UnknownHostException e) {
-            throw new AccessControlException("Failed to convert mask [" + mask + "]: ", e);
-        }
-
-    }
-
-    /**
-     * Sets the subnet mask.
-     * <p>
-     * Only valid subnet masks are accepted, for which the binary representation is a sequence of
-     * 1-bits followed by a sequence of 0-bits. For example <code>{ 255, 128, 0, 0 }</code> is
-     * valid while <code>{ 255, 128, 0, 1 }</code> is not.
-     * @param mask A byte array of the length 4.
-     * @throws AccessControlException when the conversion of the byte array to an InetAddress
-     *             failed.
-     * @see #setSubnetMask(String)
-     */
-    public void setSubnetMask(byte[] mask) throws AccessControlException {
-        /*
-         * check for correct netmask (i.e. any number of 1-bits followed by 0-bits filling the right
-         * part of the mask) ...
-         * 
-         * FIXME: This "algorithm" is rather unelegant. There should be a better way to do it! ;-)
-         */
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("CHECK_NETMASK: check " + addr2string(mask));
-        }
-        int i = 0;
-        CHECK_NETMASK: while (i < mask.length) {
-            int b = mask[i++] & 0xff;
-            /* the initial byte(s) must be 255: */
-            if (b != 0xff) {
-                /* first byte != 255, test all possibilities: */
-                if (getLogger().isDebugEnabled()) {
-                    getLogger().debug("CHECK_NETMASK: first byte != 255: idx: " + (i - 1)
-                            + ", mask[idx]: 0x" + b);
-                }
-                /* check if 0: */
-                if (b == 0) {
-                    break CHECK_NETMASK;
-                }
-                for (int tst = 0xfe; tst != 0; tst = (tst << 1) & 0xff) {
-                    getLogger().debug("CHECK_NETMASK: tst == 0x" + Integer.toHexString(tst));
-                    if (b == tst) {
-                        break CHECK_NETMASK;
-                    }
-                }
-                /*
-                 * Invalid byte found, i.e. one which is not element of { 11111111, 11111110,
-                 * 11111100, 11111000, ..., 00000000 }
-                 */
-                throw new AccessControlException("Invalid byte in mask [" + addr2string(mask) + "]");
-            }
-        }
-        /* the remaining byte(s) (if any) must be 0: */
-        while (++i < mask.length) {
-            if (mask[i] != 0) {
-                /*
-                 * Invalid byte found, i.e. some non-zero byte right of the first non-zero byte.
-                 */
-                throw new AccessControlException("Invalid non-zero byte in mask ["
-                        + addr2string(mask) + "]");
-            }
-        }
-
-        /* convert the checked mask to InetAddress: */
-        try {
-            this.subnetMask = InetAddress.getByAddress(mask);
-        } catch (final UnknownHostException e) {
-            throw new AccessControlException(
-                    "Failed to convert mask [" + addr2string(mask) + "]: ", e);
-        }
-    }
-
-    /**
-     * Returns the subnet mask.
-     * @return An InetAddress value.
-     */
-    public InetAddress getSubnetMask() {
-        return this.subnetMask;
-    }
-
-    /**
-     * Checks if a network address / subnet mask combination describes a valid subnet.
-     * @param networkAddress The network address.
-     * @param subnetMask The subnet mask.
-     * @return A boolean value.
-     * @deprecated This method is currently not implemented, probably not necessary.and could be
-     *             removed in the future. Therefore it should not be used.
-     */
-    public static boolean isValidSubnet(InetAddress networkAddress, InetAddress subnetMask) {
-        /*
-         * FIXME? by zisch@dals.ch: Is this method really necessary (what for?) and (if so)
-         * shouldn't it be an internal (private) utility-method??
-         */
-        // TODO implement class
-        return false;
-    }
-
-    /**
-     * Checks if this IP range contains a certain machine.
-     * <p>
-     * Note: if the network address and the subnet mask of this IP range have different sizes (i.e.
-     * one is IPv4 and one is IPv6), this method will always return <code>false</code>, no matter
-     * what machine has been specified!
-     * <p>
-     * Further, if the machine address and the IP range (i.e. network address and subnet mask) have
-     * different sizes, the method will return <code>false</code>. (In other words: an IPv4 range
-     * never contains an IPv6 address and the other way round.)
-     * <p>
-     * Note that the above can lead to confusion. For example the local subnet in IPv4 (
-     * <code>127.0.0.0/8</code>) will <b>not </b> contain the localhost in IPv6 (
-     * <code>::1</code>), and the localhost in IPv4 (<code>127.0.0.1</code>) will <b>not </b>
-     * be contained in the local subnet in IPv6 (<code>::1/128</code>).
-     * @param machine the machine to check for
-     * @return a boolean value
-     * @see InetAddressUtil#contains
-     */
-    public boolean contains(Machine machine) {
-        /*
-         * FIXME? by zisch@dals.ch: Maybe some mapping between IPv4/v6 should be done here, p.e. for
-         * the localhost (see the javdoc comment above)? (I'm not a TCP/IP-guru, so I'm not sure
-         * about this. ;-)
-         */
-        getLogger().debug("Checking IP range: [" + getId() + "]");
-        return InetAddressUtil.contains(this.networkAddress, this.subnetMask, machine.getAddress());
-    }
-
-    /**
-     * Format the specified numeric IP address.
-     * @param addr the raw numeric IP address
-     * @return the formatted address
-     */
-    private static String addr2string(byte[] addr) {
-        StringBuffer buf = new StringBuffer();
-        if (addr.length > 4) {
-            /* IPv6-format if more than 4 bytes: */
-            for (int i = 0; i < addr.length; i++) {
-                if (i > 0 && (i & 1) == 0) {
-                    buf.append(':');
-                }
-                String hex = Integer.toHexString(addr[i] & 0xff);
-                if (hex.length() == 1) {
-                    buf.append('0');
-                }
-                buf.append(hex);
-            }
-        } else {
-            /* IPv4-format: */
-            for (int i = 0; i < addr.length; i++) {
-                if (i > 0) {
-                    buf.append('.');
-                }
-                buf.append(addr[i] & 0xff);
-            }
-        }
-        return buf.toString();
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/ac/impl/AbstractItem.java b/src/java/org/apache/lenya/ac/impl/AbstractItem.java
deleted file mode 100644
index 309b158..0000000
--- a/src/java/org/apache/lenya/ac/impl/AbstractItem.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac.impl;
-
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.lenya.ac.Item;
-
-/**
- * Abstract superclass for all access control objects that can be managed by an
- * {@link org.apache.lenya.ac.ItemManager}. It is only used for code reuse.
- * @version $Id$
- */
-public abstract class AbstractItem extends AbstractLogEnabled implements Item, Comparable {
-
-    private String id;
-    private String description = "";
-    private String name = "";
-
-    /**
-     * Ctor.
-     */
-    public AbstractItem() {
-        // do nothing
-    }
-
-    /**
-     * Sets the ID.
-     * @param string The ID.
-     */
-    protected void setId(String string) {
-        assert isValidId(string);
-        this.id = string;
-    }
-
-    /**
-     * Returns the ID.
-     * @return The ID.
-     */
-    public String getId() {
-        return this.id;
-    }
-
-    /**
-     * Returns the description of this object.
-     * @return A string.
-     */
-    public String getDescription() {
-        return this.description;
-    }
-
-    /**
-     * Sets the description of this object.
-     * @param _description A string.
-     */
-    public void setDescription(String _description) {
-        assert _description != null;
-        this.description = _description;
-    }
-
-    /**
-     * @see java.lang.Object#toString()
-     */
-    public String toString() {
-        return getId();
-
-    }
-
-    /**
-     * Returns the name of this object.
-     * @return A <code>String</code>.
-     */
-    public String getName() {
-        return this.name;
-    }
-
-    /**
-     * Set the full name
-     * @param _name the new full name
-     */
-    public void setName(String _name) {
-        assert _name != null;
-        this.name = _name;
-    }
-
-    /**
-     * Checks if a string is a valid ID.
-     * @param id The string to test.
-     * @return A boolean value.
-     */
-    public static boolean isValidId(String id) {
-        return id != null && id.matches("\\w+");
-    }
-
-    /**
-     * @see java.lang.Object#equals(Object)
-     */
-    public boolean equals(Object otherObject) {
-        boolean equals = false;
-
-        if (getClass().isInstance(otherObject)) {
-            AbstractItem otherManageable = (AbstractItem) otherObject;
-            equals = getId().equals(otherManageable.getId());
-        }
-        return equals;
-    }
-
-    /**
-     * @see java.lang.Object#hashCode()
-     */
-    public int hashCode() {
-        return getId().hashCode();
-    }
-
-    /**
-     * @see java.lang.Comparable#compareTo(java.lang.Object)
-     */
-    public int compareTo(Object obj) {
-        if (obj instanceof AbstractItem) {
-            return getId().compareTo(((AbstractItem) obj).getId());
-        }
-        return 0;
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/ac/impl/AbstractRole.java b/src/java/org/apache/lenya/ac/impl/AbstractRole.java
deleted file mode 100644
index 10d5148..0000000
--- a/src/java/org/apache/lenya/ac/impl/AbstractRole.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac.impl;
-
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.lenya.ac.Role;
-
-
-/**
- * A Role embodies the privilege to do certain things.
- */
-public abstract class AbstractRole extends AbstractItem implements Role {
-    
-    /**
-     * Creates a new instance of Role.
-     */
-    public AbstractRole() {
-	    // do nothing
-    }
-
-    /**
-     * Creates a new instance of Role.
-     * @param name The role name.
-     * @param logger The logger.
-     */
-    public AbstractRole(String name, Logger logger) {
-        assert name != null;
-        setName(name);
-    }
-
-}
diff --git a/src/java/org/apache/lenya/ac/impl/AbstractUser.java b/src/java/org/apache/lenya/ac/impl/AbstractUser.java
deleted file mode 100644
index 531cd8a..0000000
--- a/src/java/org/apache/lenya/ac/impl/AbstractUser.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac.impl;
-
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.Password;
-import org.apache.lenya.ac.User;
-
-/**
- * Abstract user implementation.
- * @version $Id$
- */
-public abstract class AbstractUser extends AbstractGroupable implements User {
-
-    private String email;
-    private String encryptedPassword;
-    private	String defaultMenuLocale;
-    private String defaultDocumentLocale;
-
-    /**
-     * Creates a new User.
-     */
-    public AbstractUser() {
-	    // do nothing
-    }
-
-    /**
-     * Create a User instance
-     * @param id the user id
-     * @param fullName the full name of the user
-     * @param _email the users email address
-     * @param password the users password
-     */
-    public AbstractUser(String id, String fullName, String _email, String password) {
-        setId(id);
-        setName(fullName);
-        this.email = _email;
-        setPassword(password);
-    }
-
-    /**
-     * Get the email address
-     * @return a <code>String</code>
-     */
-    public String getEmail() {
-        return this.email;
-    }
-
-
-    /**
-     * Set the email address
-     * @param _email the new email address
-     */
-    public void setEmail(String _email) {
-        this.email = _email;
-    }
-
-    /**
-     * Sets the password.
-     * @param plainTextPassword The plain text passwrod.
-     */
-    public void setPassword(String plainTextPassword) {
-        this.encryptedPassword = Password.encrypt(plainTextPassword);
-    }
-
-    /**
-     * This method can be used for subclasses to set the password without it being encrypted again.
-     * Some subclass might have knowledge of the encrypted password and needs to be able to set it.
-     * @param _encryptedPassword the encrypted password
-     */
-    protected void setEncryptedPassword(String _encryptedPassword) {
-        this.encryptedPassword = _encryptedPassword;
-    }
-
-    /**
-     * Get the encrypted password
-     * @return the encrypted password
-     */
-    protected String getEncryptedPassword() {
-        return this.encryptedPassword;
-    }
-
-	/**
-	 * @return Returns the defaultDocumentLocale.
-	 */
-	public String getDefaultDocumentLocale() {
-		return defaultDocumentLocale;
-	}
-	/**
-	 * @param defaultDocumentLocale The defaultDocumentLocale to set.
-	 */
-	public void setDefaultDocumentLocale(String defaultDocumentLocale) {
-		this.defaultDocumentLocale = defaultDocumentLocale;
-	}
-	/**
-	 * @return Returns the defaultMenuLocale.
-	 */
-	public String getDefaultMenuLocale() {
-		return defaultMenuLocale;
-	}
-	/**
-	 * @param defaultMenuLocale The defaultMenuLocale to set.
-	 */
-	public void setDefaultMenuLocale(String defaultMenuLocale) {
-		this.defaultMenuLocale = defaultMenuLocale;
-	}
-    /**
-     * Save the user
-     * @throws AccessControlException if the save failed
-     */
-    public abstract void save() throws AccessControlException;
-
-    /**
-     * Delete a user
-     * @throws AccessControlException if the delete failed
-     */
-    public void delete() throws AccessControlException {
-        removeFromAllGroups();
-    }
-
-    /**
-     * Authenticate a user. This is done by encrypting the given password and comparing this to the
-     * encryptedPassword.
-     * @param password to authenticate with
-     * @return true if the given password matches the password for this user
-     */
-    public boolean authenticate(String password) {
-        getLogger().debug("LDAP Password: " + password);
-        getLogger().debug("LDAP pw encypted: " + Password.encrypt(password));
-        getLogger().debug("LDAP orig encrypted pw: " + this.encryptedPassword);
-
-        return this.encryptedPassword.equals(Password.encrypt(password));
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/ac/impl/AnonymousAuthenticator.java b/src/java/org/apache/lenya/ac/impl/AnonymousAuthenticator.java
deleted file mode 100644
index 3452464..0000000
--- a/src/java/org/apache/lenya/ac/impl/AnonymousAuthenticator.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation
- * 
- * Licensed 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.
- *  
- */
-
-package org.apache.lenya.ac.impl;
-
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.cocoon.environment.Request;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.AccreditableManager;
-import org.apache.lenya.ac.Authenticator;
-import org.apache.lenya.ac.Identity;
-import org.apache.lenya.ac.User;
-
-
-/**
- * The anonymous authenticator authenticates to an anonymous user with no password 
- * (you just have to add a user named 'anonymous' with an arbitrary password and the permissions
- * you'd like via the admin screen). This is useful in conjunction with client certificates.
- * @version $Id$
- */
-public class AnonymousAuthenticator extends AbstractLogEnabled implements Authenticator {
-
-    
-    /**
-     * @see org.apache.lenya.ac.Authenticator#authenticate(org.apache.lenya.ac.AccreditableManager,
-     *      org.apache.cocoon.environment.Request)
-     */
-    public boolean authenticate(AccreditableManager accreditableManager, Request request)
-            throws AccessControlException {
-
-	String username = "anonymous";
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug(
-                    "Authenticating username [" + username + "]");
-        }
-
-        Identity identity = (Identity) request.getSession(false).getAttribute(Identity.class.getName());
-
-        User user = accreditableManager.getUserManager().getUser(username);
-
-        boolean authenticated = false;
-        if (user != null) {
-            if (getLogger().isDebugEnabled()) {
-                getLogger().debug("User [" + user + "] authenticated.");
-            }
-
-            if (!identity.contains(user)) {
-                User oldUser = identity.getUser();
-                if (oldUser != null) {
-                    if (getLogger().isDebugEnabled()) {
-                        getLogger().debug("Removing user [" + oldUser + "] from identity.");
-                    }
-                    identity.removeIdentifiable(oldUser);
-                }
-                identity.addIdentifiable(user);
-            }
-            authenticated = true;
-        } else {
-            if (getLogger().isDebugEnabled()) {
-                if (user == null) {
-                    getLogger().debug("No such user: [" + username + "]");
-                }
-                getLogger().debug("User [" + username + "] not authenticated.");
-            }
-        }
-        return authenticated;
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/ac/impl/BypassableAccessController.java b/src/java/org/apache/lenya/ac/impl/BypassableAccessController.java
deleted file mode 100644
index 37f4c81..0000000
--- a/src/java/org/apache/lenya/ac/impl/BypassableAccessController.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac.impl;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.sitemap.PatternException;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.regexp.RE;
-import org.apache.regexp.RECompiler;
-import org.apache.regexp.REProgram;
-import org.apache.regexp.RESyntaxException;
-
-/**
- * AccessController that can be bypassed for certain URL patterns.
- */
-public class BypassableAccessController extends DefaultAccessController {
-
-    /**
-     * Ctor.
-     */
-    public BypassableAccessController() {
-	    // do nothing
-    }
-
-    private List publicMatchers = new ArrayList();
-
-    /**
-     * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
-     */
-    public void configure(Configuration conf) throws ConfigurationException {
-        super.configure(conf);
-        
-        getLogger().debug("Configuring bypass patterns");
-        
-        Configuration[] publics = conf.getChildren("public");
-
-        for (int i = 0; i < publics.length; i++) {
-            String publicHref = publics[i].getValue(null);
-
-            try {
-                this.publicMatchers.add(preparePattern(publicHref));
-            } catch (PatternException pe) {
-                throw new ConfigurationException("invalid pattern for public hrefs", pe);
-            }
-
-            if (getLogger().isDebugEnabled()) {
-                getLogger().debug("CONFIGURATION: public: " + publicHref);
-            }
-        }
-
-    }
-
-    /**
-     * Compile the pattern in a <code>org.apache.regexp.REProgram</code>.
-     * @param pattern The pattern to compile.
-     * @return A RE program representing the pattern.
-     * @throws PatternException when something went wrong.
-     */
-    protected REProgram preparePattern(String pattern)
-        throws PatternException {
-        if (pattern == null) {
-            throw new PatternException("null passed as a pattern", null);
-        }
-
-        if (pattern.length() == 0) {
-            pattern = "^$";
-
-            if (getLogger().isWarnEnabled()) {
-                getLogger().warn("The empty pattern string was rewritten to '^$'" +
-                    " to match for empty strings.  If you intended" +
-                    " to match all strings, please change your" + " pattern to '.*'");
-            }
-        }
-
-        try {
-            RECompiler compiler = new RECompiler();
-            REProgram program = compiler.compile(pattern);
-
-            return program;
-        } catch (RESyntaxException rse) {
-            getLogger().debug("Failed to compile the pattern '" + pattern + "'", rse);
-            throw new PatternException(rse.getMessage(), rse);
-        }
-    }
-
-    /**
-     * Matches a string using a prepared pattern program.
-     * @param preparedPattern The pattern program.
-     * @param match The string to match.
-     * @return <code>true</code> if the string matched the pattern, <code>false</code> otherwise.
-     */
-    protected boolean preparedMatch(REProgram preparedPattern, String match) {
-        boolean result = false;
-        
-        if (match != null) {
-            RE re = new RE(preparedPattern);
-            result = re.match(match);
-        }
-        return result;
-    }
-
-    /**
-     * @see org.apache.lenya.ac.AccessController#authorize(org.apache.cocoon.environment.Request)
-     */
-    public boolean authorize(Request request)
-        throws AccessControlException {
-        
-        assert request != null;
-        
-        boolean authorized = false;
-        
-        String uri = request.getRequestURI();
-        String context = request.getContextPath();
-        if (context == null) {
-            context = "";
-        }
-        uri = uri.substring(context.length());
-        
-        // Check public uris from configuration above. Should only be used during development before the implementation of a concrete authorizer.
-        int i = 0;
-        while (!authorized && i < this.publicMatchers.size()) {
-            getLogger().debug("Trying pattern: [" + this.publicMatchers.get(i) + "] with URL [" + uri + "]");
-            if (preparedMatch((REProgram) this.publicMatchers.get(i), uri)) {
-                if (getLogger().isDebugEnabled()) {
-                    getLogger().debug("Permission granted for free: [" + uri + "]");
-                }
-                authorized = true;
-            }
-            i++;
-        }
-        
-        if (!authorized) {
-            authorized = super.authorize(request);
-        }
-        
-        return authorized;
-    }
-
-}
diff --git a/src/java/org/apache/lenya/ac/impl/ComposableAccessControllerResolver.java b/src/java/org/apache/lenya/ac/impl/ComposableAccessControllerResolver.java
deleted file mode 100644
index f2a17ee..0000000
--- a/src/java/org/apache/lenya/ac/impl/ComposableAccessControllerResolver.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac.impl;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.avalon.framework.activity.Disposable;
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.AccessController;
-import org.apache.lenya.ac.AccessControllerResolver;
-
-/**
- * Access controller resolver composed of other access controller resolvers.
- * The member resolvers are called one after the other to resolve the access controllers.
- * 
- * @version $Id$
- */
-public class ComposableAccessControllerResolver
-    extends AbstractAccessControllerResolver
-    implements Configurable, Disposable {
-
-    /**
-     * @see org.apache.lenya.ac.impl.AbstractAccessControllerResolver#doResolveAccessController(java.lang.String)
-     */
-    public AccessController doResolveAccessController(String url) throws AccessControlException {
-
-        AccessController controller = null;
-
-        try {
-            
-            if (this.selector == null) {
-                this.selector =
-                    (ServiceSelector) getManager().lookup(AccessControllerResolver.ROLE + "Selector");
-            }
-
-            String[] types = getResolverTypes();
-            int i = 0;
-            while (controller == null && i < types.length) {
-
-                getLogger().debug("Trying to resolve AC resolver for type [" + types[i] + "]");
-                AccessControllerResolver resolver =
-                    (AccessControllerResolver) this.selector.select(types[i]);
-                controller = resolver.resolveAccessController(url);
-                setResolver(controller, resolver);
-                getLogger().debug("Resolved access controller [" + controller + "]");
-                i++;
-            }
-
-        } catch (ServiceException e) {
-            throw new AccessControlException(e);
-        }
-
-        return controller;
-    }
-
-    private Map controllerToResolver = new HashMap();
-
-    /**
-     * @see org.apache.lenya.ac.AccessControllerResolver#release(org.apache.lenya.ac.AccessController)
-     */
-    public void release(AccessController controller) {
-        assert controller != null;
-        AccessControllerResolver resolver = getResolver(controller);
-        resolver.release(controller);
-        this.selector.release(resolver);
-    }
-
-    /**
-     * Returns the access controller resolver that was used to resolve a
-     * specific access controller.
-     * @param controller The access controller.
-     * @return An AC resolver.
-     */
-    protected AccessControllerResolver getResolver(AccessController controller) {
-        AccessControllerResolver resolver =
-            (AccessControllerResolver) this.controllerToResolver.get(controller);
-        return resolver;
-    }
-    
-    /**
-     * Sets the access controller resolver that was used to resolve a
-     * specific access controller.
-     * @param controller The access controller.
-     * @param resolver An AC resolver.
-     */
-    protected void setResolver(AccessController controller, AccessControllerResolver resolver) {
-        this.controllerToResolver.put(controller, resolver);
-    }
-
-    protected static final String RESOLVER_ELEMENT = "resolver";
-    protected static final String TYPE_ATTRIBUTE = "type";
-
-    private String[] resolverTypes;
-    private ServiceSelector selector;
-
-    /**
-     * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
-     */
-    public void configure(Configuration configuration) throws ConfigurationException {
-        Configuration[] accessControllerConfigs = configuration.getChildren(RESOLVER_ELEMENT);
-        this.resolverTypes = new String[accessControllerConfigs.length];
-        for (int i = 0; i < accessControllerConfigs.length; i++) {
-            this.resolverTypes[i] = accessControllerConfigs[i].getAttribute(TYPE_ATTRIBUTE);
-        }
-    }
-
-    /**
-     * Returns the access controller types.
-     * @return A string array.
-     */
-    protected String[] getResolverTypes() {
-        return this.resolverTypes;
-    }
-
-    /**
-     * @see org.apache.avalon.framework.activity.Disposable#dispose()
-     */
-    public void dispose() {
-        if (this.selector != null) {
-            getManager().release(this.selector);
-        }
-    }
-
-}
diff --git a/src/java/org/apache/lenya/ac/impl/ConfigurableAccessControllerResolver.java b/src/java/org/apache/lenya/ac/impl/ConfigurableAccessControllerResolver.java
deleted file mode 100644
index 867b1f1..0000000
--- a/src/java/org/apache/lenya/ac/impl/ConfigurableAccessControllerResolver.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac.impl;
-
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.AccessController;
-
-/**
- * Configurable access controller resolver.
- * @version $Id$
- */
-public class ConfigurableAccessControllerResolver
-    extends AbstractAccessControllerResolver
-    implements Configurable {
-
-    /**
-     * @see org.apache.lenya.ac.impl.AbstractAccessControllerResolver#doResolveAccessController(java.lang.String)
-     */
-    public AccessController doResolveAccessController(String webappUrl)
-        throws AccessControlException {
-        AccessController accessController = null;
-
-        try {
-            accessController =
-                (AccessController) getManager().lookup(
-                    AccessController.ROLE + "/" + this.accessControllerType);
-
-            if (accessController instanceof Configurable) {
-                ((Configurable) accessController).configure(this.accessControllerConfiguration);
-            }
-
-        } catch (Exception e) {
-            throw new AccessControlException(e);
-        }
-
-        return accessController;
-    }
-
-    protected static final String ACCESS_CONTROLLER_ELEMENT = "access-controller";
-    protected static final String TYPE_ATTRIBUTE = "type";
-    private String accessControllerType;
-
-    private Configuration accessControllerConfiguration;
-
-    /**
-     * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
-     */
-    public void configure(Configuration configuration) throws ConfigurationException {
-        this.accessControllerConfiguration = configuration.getChild(ACCESS_CONTROLLER_ELEMENT);
-        this.accessControllerType = this.accessControllerConfiguration.getAttribute(TYPE_ATTRIBUTE);
-    }
-
-}
diff --git a/src/java/org/apache/lenya/ac/impl/Credential.java b/src/java/org/apache/lenya/ac/impl/Credential.java
deleted file mode 100644
index ca249f4..0000000
--- a/src/java/org/apache/lenya/ac/impl/Credential.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac.impl;
-
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.apache.lenya.ac.Accreditable;
-import org.apache.lenya.ac.Role;
-
-
-/**
- * A credential assigns a set of {@link Role}s to an {@link Accreditable}.
- */
-public class Credential {
-    private Accreditable accreditable;
-    private Set roles = new HashSet();
-
-    /**
-     * Creates a new credential object.
-     * @param _accreditable The accreditable.
-     */
-    public Credential(Accreditable _accreditable) {
-        setAccreditable(_accreditable);
-    }
-
-    /**
-     * Sets the accreditable for this credential.
-     * @param _accreditable The accreditable.
-     */
-    protected void setAccreditable(Accreditable _accreditable) {
-        assert _accreditable != null;
-        this.accreditable = _accreditable;
-    }
-
-    /**
-     * Returns all roles of this credential.
-     * @return An array of roles.
-     */
-    public Role[] getRoles() {
-        return (Role[]) this.roles.toArray(new Role[this.roles.size()]);
-    }
-
-    /**
-     * Adds a role to this credential.
-     * @param role The role to add.
-     */
-    public void addRole(Role role) {
-        assert role != null;
-        assert !this.roles.contains(role);
-        this.roles.add(role);
-    }
-
-    /**
-     * Removes a role from this credential.
-     * @param role The role to remove.
-     */
-    public void removeRole(Role role) {
-        assert role != null;
-        assert this.roles.contains(role);
-        this.roles.remove(role);
-    }
-
-    /**
-     * Returns the accreditable of this credential.
-     * @return An accreditable.
-     */
-    public Accreditable getAccreditable() {
-        return this.accreditable;
-    }
-
-    /**
-     * @see java.lang.Object#toString()
-     */
-    public String toString() {
-        return "[credential of: " + getAccreditable() + "]";
-    }
-    
-    /**
-     * Returns if a role is contained.
-     * @param role A role.
-     * @return A boolean value.
-     */
-    public boolean contains(Role role) {
-        return this.roles.contains(role);
-    }
-    
-    /**
-     * Returns if the credential is empty (contains no roles).
-     * @return A boolean value.
-     */
-    public boolean isEmpty() {
-    	return this.roles.isEmpty();
-    }
-}
diff --git a/src/java/org/apache/lenya/ac/impl/DefaultAccessController.java b/src/java/org/apache/lenya/ac/impl/DefaultAccessController.java
deleted file mode 100644
index 46e4669..0000000
--- a/src/java/org/apache/lenya/ac/impl/DefaultAccessController.java
+++ /dev/null
@@ -1,452 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation
- * 
- * Licensed 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.
- *  
- */
-
-package org.apache.lenya.ac.impl;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.regex.*;
-
-import org.apache.avalon.framework.activity.Disposable;
-import org.apache.avalon.framework.component.Component;
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.parameters.ParameterException;
-import org.apache.avalon.framework.parameters.Parameterizable;
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.environment.Session;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.AccessController;
-import org.apache.lenya.ac.Accreditable;
-import org.apache.lenya.ac.AccreditableManager;
-import org.apache.lenya.ac.Authenticator;
-import org.apache.lenya.ac.Authorizer;
-import org.apache.lenya.ac.IPRange;
-import org.apache.lenya.ac.Identity;
-import org.apache.lenya.ac.Item;
-import org.apache.lenya.ac.ItemManagerListener;
-import org.apache.lenya.ac.Machine;
-import org.apache.lenya.ac.PolicyManager;
-
-/**
- * Default access controller implementation.
- * @version $Id$
- */
-public class DefaultAccessController extends AbstractLogEnabled implements AccessController,
-        Configurable, Serviceable, Disposable, ItemManagerListener {
-
-    protected static final String AUTHORIZER_ELEMENT = "authorizer";
-    protected static final String TYPE_ATTRIBUTE = "type";
-    protected static final String ACCREDITABLE_MANAGER_ELEMENT = "accreditable-manager";
-    protected static final String POLICY_MANAGER_ELEMENT = "policy-manager";
-
-    private static final String REGEX = "([0-9]{1,3}\\.){3}[0-9]{1,3}";
-    private ServiceSelector accreditableManagerSelector;
-    private AccreditableManager accreditableManager;
-    private ServiceSelector authorizerSelector;
-    private Map authorizers = new HashMap();
-    private List authorizerKeys = new ArrayList();
-    private ServiceSelector policyManagerSelector;
-    private PolicyManager policyManager;
-    private Authenticator authenticator;
-
-    /**
-     * @see org.apache.lenya.ac.AccessController#authenticate(org.apache.cocoon.environment.Request)
-     */
-    public boolean authenticate(Request request) throws AccessControlException {
-
-        assert request != null;
-        boolean authenticated = getAuthenticator().authenticate(getAccreditableManager(), request);
-
-        return authenticated;
-    }
-
-    /**
-     * @see org.apache.lenya.ac.AccessController#authorize(org.apache.cocoon.environment.Request)
-     */
-    public boolean authorize(Request request) throws AccessControlException {
-        assert request != null;
-
-        boolean authorized = false;
-
-        getLogger().debug("=========================================================");
-        getLogger().debug("Beginning authorization.");
-
-        if (hasAuthorizers()) {
-            Authorizer[] _authorizers = getAuthorizers();
-            int i = 0;
-            authorized = true;
-
-            while ((i < _authorizers.length) && authorized) {
-
-                if (getLogger().isDebugEnabled()) {
-                    getLogger().debug("---------------------------------------------------------");
-                    getLogger().debug("Invoking authorizer [" + _authorizers[i] + "]");
-                }
-
-                if (_authorizers[i] instanceof PolicyAuthorizer) {
-                    PolicyAuthorizer authorizer = (PolicyAuthorizer) _authorizers[i];
-                    authorizer.setAccreditableManager(this.accreditableManager);
-                    authorizer.setPolicyManager(this.policyManager);
-                }
-
-                authorized = authorized && _authorizers[i].authorize(request);
-
-                if (getLogger().isDebugEnabled()) {
-                    getLogger().debug(
-                            "Authorizer [" + _authorizers[i] + "] returned [" + authorized + "]");
-                }
-
-                i++;
-            }
-        }
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("=========================================================");
-            getLogger().debug("Authorization complete, result: [" + authorized + "]");
-            getLogger().debug("=========================================================");
-        }
-
-        return authorized;
-    }
-
-    /**
-     * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
-     */
-    public void configure(Configuration conf) throws ConfigurationException {
-
-        try {
-            setupAccreditableManager(conf);
-            setupAuthorizers(conf);
-            setupPolicyManager(conf);
-            setupAuthenticator();
-        } catch (ConfigurationException e) {
-            throw e;
-        } catch (Exception e) {
-            throw new ConfigurationException("Configuration failed: ", e);
-        }
-    }
-
-    /**
-     * Configures or parameterizes a component, depending on the implementation
-     * as Configurable or Parameterizable.
-     * @param component The component.
-     * @param configuration The configuration to use.
-     * @throws ConfigurationException when an error occurs during configuration.
-     * @throws ParameterException when an error occurs during parameterization.
-     */
-    public static void configureOrParameterize(Component component, Configuration configuration)
-            throws ConfigurationException, ParameterException {
-        if (component instanceof Configurable) {
-            ((Configurable) component).configure(configuration);
-        }
-        if (component instanceof Parameterizable) {
-            Parameters parameters = Parameters.fromConfiguration(configuration);
-            ((Parameterizable) component).parameterize(parameters);
-        }
-    }
-
-    /**
-     * Creates the accreditable manager.
-     * 
-     * @param configuration The access controller configuration.
-     * @throws ConfigurationException when the configuration failed.
-     * @throws ServiceException when something went wrong.
-     * @throws ParameterException when something went wrong.
-     */
-    protected void setupAccreditableManager(Configuration configuration)
-            throws ConfigurationException, ServiceException, ParameterException {
-
-        Configuration accreditableManagerConfiguration = configuration.getChild(
-                ACCREDITABLE_MANAGER_ELEMENT, false);
-        if (accreditableManagerConfiguration != null) {
-            String accreditableManagerType = accreditableManagerConfiguration
-                    .getAttribute(TYPE_ATTRIBUTE);
-            if (getLogger().isDebugEnabled()) {
-                getLogger().debug("AccreditableManager type: [" + accreditableManagerType + "]");
-            }
-
-            this.accreditableManagerSelector = (ServiceSelector) this.manager.lookup(AccreditableManager.ROLE
-                    + "Selector");
-            this.accreditableManager = (AccreditableManager) this.accreditableManagerSelector
-                    .select(accreditableManagerType);
-            this.accreditableManager.addItemManagerListener(this);
-            configureOrParameterize(this.accreditableManager, accreditableManagerConfiguration);
-        }
-    }
-
-    /**
-     * Creates the authorizers.
-     * 
-     * @param configuration The access controller configuration.
-     * @throws ConfigurationException when the configuration failed.
-     * @throws ServiceException when something went wrong.
-     * @throws ParameterException when something went wrong.
-     */
-    protected void setupAuthorizers(Configuration configuration) throws ServiceException,
-            ConfigurationException, ParameterException {
-        Configuration[] authorizerConfigurations = configuration.getChildren(AUTHORIZER_ELEMENT);
-        if (authorizerConfigurations.length > 0) {
-            this.authorizerSelector = (ServiceSelector) this.manager.lookup(Authorizer.ROLE + "Selector");
-
-            for (int i = 0; i < authorizerConfigurations.length; i++) {
-                String type = authorizerConfigurations[i].getAttribute(TYPE_ATTRIBUTE);
-                if (getLogger().isDebugEnabled()) {
-                    getLogger().debug("Adding authorizer [" + type + "]");
-                }
-
-                Authorizer authorizer = (Authorizer) this.authorizerSelector.select(type);
-                this.authorizerKeys.add(type);
-                this.authorizers.put(type, authorizer);
-                configureOrParameterize(authorizer, authorizerConfigurations[i]);
-            }
-        }
-    }
-
-    /**
-     * Creates the policy manager.
-     * 
-     * @param configuration The access controller configuration.
-     * @throws ConfigurationException when the configuration failed.
-     * @throws ServiceException when something went wrong.
-     * @throws ParameterException when something went wrong.
-     */
-    protected void setupPolicyManager(Configuration configuration) throws ServiceException,
-            ConfigurationException, ParameterException {
-        Configuration policyManagerConfiguration = configuration.getChild(POLICY_MANAGER_ELEMENT,
-                false);
-        if (policyManagerConfiguration != null) {
-            String policyManagerType = policyManagerConfiguration.getAttribute(TYPE_ATTRIBUTE);
-            if (getLogger().isDebugEnabled()) {
-                getLogger().debug("Adding policy manager type: [" + policyManagerType + "]");
-            }
-            this.policyManagerSelector = (ServiceSelector) this.manager.lookup(PolicyManager.ROLE
-                    + "Selector");
-            this.policyManager = (PolicyManager) this.policyManagerSelector.select(policyManagerType);
-            configureOrParameterize(this.policyManager, policyManagerConfiguration);
-        }
-    }
-
-    /**
-     * Sets up the authenticator.
-     * @throws ServiceException when something went wrong.
-     */
-    protected void setupAuthenticator() throws ServiceException {
-        this.authenticator = (Authenticator) this.manager.lookup(Authenticator.ROLE);
-    }
-
-    private ServiceManager manager;
-
-    /**
-     * Set the global component manager.
-     * 
-     * @param _manager The global component manager
-     * @throws ServiceException when something went wrong.
-     */
-    public void service(ServiceManager _manager) throws ServiceException {
-        this.manager = _manager;
-    }
-
-    /**
-     * Returns the service manager.
-     * @return A service manager.
-     */
-    protected ServiceManager getManager() {
-        return this.manager;
-    }
-
-    /**
-     * Returns the authorizers of this action.
-     * @return An array of authorizers.
-     */
-    public Authorizer[] getAuthorizers() {
-
-        Authorizer[] authorizerArray = new Authorizer[this.authorizers.size()];
-        for (int i = 0; i < this.authorizers.size(); i++) {
-            String key = (String) this.authorizerKeys.get(i);
-            authorizerArray[i] = (Authorizer) this.authorizers.get(key);
-        }
-        return authorizerArray;
-    }
-
-    /**
-     * Returns if this action has authorizers.
-     * @return A boolean value.
-     */
-    protected boolean hasAuthorizers() {
-        return !this.authorizers.isEmpty();
-    }
-
-    /**
-     * @see org.apache.avalon.framework.activity.Disposable#dispose()
-     */
-    public void dispose() {
-
-        if (this.accreditableManagerSelector != null) {
-            if (this.accreditableManager != null) {
-                this.accreditableManager.removeItemManagerListener(this);
-                this.accreditableManagerSelector.release(this.accreditableManager);
-            }
-            getManager().release(this.accreditableManagerSelector);
-        }
-
-        if (this.policyManagerSelector != null) {
-            if (this.policyManager != null) {
-                this.policyManagerSelector.release(this.policyManager);
-            }
-            getManager().release(this.policyManagerSelector);
-        }
-
-        if (this.authorizerSelector != null) {
-            Authorizer[] _authorizers = getAuthorizers();
-            for (int i = 0; i < _authorizers.length; i++) {
-                this.authorizerSelector.release(_authorizers[i]);
-            }
-            getManager().release(this.authorizerSelector);
-        }
-
-        if (this.authenticator != null) {
-            getManager().release(this.authenticator);
-        }
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Disposing [" + this + "]");
-        }
-    }
-
-    /**
-     * Returns the accreditable manager.
-     * @return An accreditable manager.
-     */
-    public AccreditableManager getAccreditableManager() {
-        return this.accreditableManager;
-    }
-
-    /**
-     * Returns the policy manager.
-     * @return A policy manager.
-     */
-    public PolicyManager getPolicyManager() {
-        return this.policyManager;
-    }
-
-    /**
-     * Returns the authenticator.
-     * @return The authenticator.
-     */
-    public Authenticator getAuthenticator() {
-        return this.authenticator;
-    }
-
-    /**
-     * Checks if this identity was initialized by this access controller.
-     * 
-     * @param identity An identity.
-     * @return A boolean value.
-     * @throws AccessControlException when something went wrong.
-     */
-    public boolean ownsIdenity(Identity identity) throws AccessControlException {
-        return identity.belongsTo(getAccreditableManager());
-    }
-
-    /**
-     * @see org.apache.lenya.ac.AccessController#setupIdentity(org.apache.cocoon.environment.Request)
-     */
-    public void setupIdentity(Request request) throws AccessControlException {
-        Session session = request.getSession(true);
-        if (!hasValidIdentity(session)) {
-            Identity identity = new Identity();
-            identity.enableLogging(getLogger());
-            identity.initialize();
-            String remoteAddress = request.getRemoteAddr();
-            String clientAddress = request.getHeader("x-forwarded-for");
-
-            if (clientAddress != null) {
-                Pattern p = Pattern.compile(REGEX);
-                Matcher m = p.matcher(clientAddress);
-
-                if (m.find()) {
-                    remoteAddress = m.group();
-                }
-            }
-
-            getLogger().info("Remote Address to use: [" + remoteAddress + "]");
-
-            Machine machine = new Machine(remoteAddress);
-            IPRange[] ranges = this.accreditableManager.getIPRangeManager().getIPRanges();
-            for (int i = 0; i < ranges.length; i++) {
-                if (ranges[i].contains(machine)) {
-                    machine.addIPRange(ranges[i]);
-                }
-            }
-
-            identity.addIdentifiable(machine);
-            session.setAttribute(Identity.class.getName(), identity);
-        }
-    }
-
-    /**
-     * Checks if the session contains an identity that is not null and belongs
-     * to the used access controller.
-     * 
-     * @param session The current session.
-     * @return A boolean value.
-     * @throws AccessControlException when something went wrong.
-     */
-    protected boolean hasValidIdentity(Session session) throws AccessControlException {
-        boolean valid = true;
-        Identity identity = (Identity) session.getAttribute(Identity.class.getName());
-        if (identity == null || !ownsIdenity(identity)) {
-            valid = false;
-        }
-        return valid;
-    }
-
-    /**
-     * @see org.apache.lenya.ac.ItemManagerListener#itemAdded(org.apache.lenya.ac.Item)
-     */
-    public void itemAdded(Item item) throws AccessControlException {
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Item was added: [" + item + "]");
-            getLogger().debug("Notifying policy manager");
-        }
-        if (item instanceof Accreditable) {
-            getPolicyManager().accreditableAdded(getAccreditableManager(), (Accreditable) item);
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.ac.ItemManagerListener#itemRemoved(org.apache.lenya.ac.Item)
-     */
-    public void itemRemoved(Item item) throws AccessControlException {
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Item was removed: [" + item + "]");
-            getLogger().debug("Notifying policy manager");
-        }
-        getPolicyManager().accreditableRemoved(getAccreditableManager(), (Accreditable) item);
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/ac/impl/DefaultPolicy.java b/src/java/org/apache/lenya/ac/impl/DefaultPolicy.java
deleted file mode 100644
index 3bb25f7..0000000
--- a/src/java/org/apache/lenya/ac/impl/DefaultPolicy.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac.impl;
-
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.Accreditable;
-import org.apache.lenya.ac.Identity;
-import org.apache.lenya.ac.Policy;
-import org.apache.lenya.ac.Role;
-
-/**
- * A DefaultPolicy is the own policy of a certain URL (not merged).
- */
-public class DefaultPolicy implements Policy {
-
-    private Map accreditableToCredential = new HashMap();
-
-    /**
-	 * Adds a credential to this policy.
-	 * @param credential A credential.
-	 */
-    public void addCredential(Credential credential) {
-        assert credential != null;
-        assert !this.accreditableToCredential.containsKey(credential.getAccreditable());
-        this.accreditableToCredential.put(credential.getAccreditable(), credential);
-    }
-
-    /**
-	 * Adds a role to this policy for a certain accreditable and a certain role. If a credenital
-	 * exists for the accreditable, the role is added to this credential. Otherwise, a new
-	 * credential is created.
-	 * @param accreditable An accreditable.
-	 * @param role A role.
-	 */
-    public void addRole(Accreditable accreditable, Role role) {
-        assert accreditable != null;
-        assert role != null;
-
-        Credential credential = getCredential(accreditable);
-        if (credential == null) {
-            credential = new Credential(accreditable);
-            addCredential(credential);
-        }
-        if (!credential.contains(role)) {
-            credential.addRole(role);
-        }
-    }
-
-    /**
-	 * Removes a role from this policy for a certain accreditable and a certain role.
-	 * @param accreditable An accreditable.
-	 * @param role A role.
-	 * @throws AccessControlException if the accreditable-role pair is not contained.
-	 */
-    public void removeRole(Accreditable accreditable, Role role) throws AccessControlException {
-        assert accreditable != null;
-        assert role != null;
-        Credential credential = getCredential(accreditable);
-        if (credential == null) {
-            throw new AccessControlException(
-                "No credential for accreditable ["
-                    + accreditable
-                    + "] ["
-                    + this.accreditableToCredential.keySet().size()
-                    + "]");
-        }
-        if (!credential.contains(role)) {
-            throw new AccessControlException(
-                "Credential for accreditable ["
-                    + accreditable
-                    + "] does not contain role ["
-                    + role
-                    + "]");
-        }
-        credential.removeRole(role);
-
-        if (credential.isEmpty()) {
-            removeCredential(credential);
-        }
-    }
-
-    /**
-	 * Returns the credentials of this policy.
-	 * @return An array of credentials.
-	 */
-    public Credential[] getCredentials() {
-        Collection values = this.accreditableToCredential.values();
-        return (Credential[]) values.toArray(new Credential[values.size()]);
-    }
-
-    /**
-	 * @see org.apache.lenya.ac.Policy#getRoles(org.apache.lenya.ac.Identity)
-	 */
-    public Role[] getRoles(Identity identity) {
-        Accreditable[] accreditables = identity.getAccreditables();
-        Credential[] credentials = getCredentials();
-
-        Set roles = new HashSet();
-
-        for (int credIndex = 0; credIndex < credentials.length; credIndex++) {
-            for (int accrIndex = 0; accrIndex < accreditables.length; accrIndex++) {
-                Credential credential = credentials[credIndex];
-                Accreditable accreditable = accreditables[accrIndex];
-
-                if (credential.getAccreditable().equals(accreditable)) {
-                    roles.addAll(Arrays.asList(credential.getRoles()));
-                }
-            }
-        }
-
-        return (Role[]) roles.toArray(new Role[roles.size()]);
-    }
-
-    /**
-	 * Returns the credential for a certain accreditable.
-	 * 
-	 * @param accreditable An accreditable.
-	 * @return A credential.
-	 */
-    public Credential getCredential(Accreditable accreditable) {
-        return (Credential) this.accreditableToCredential.get(accreditable);
-    }
-
-    private boolean isSSL;
-
-    /**
-	 * @see org.apache.lenya.ac.Policy#isSSLProtected()
-	 */
-    public boolean isSSLProtected() throws AccessControlException {
-        return this.isSSL;
-    }
-
-    /**
-	 * Sets if this policy requires SSL protection.
-	 * @param ssl A boolean value.
-	 */
-    public void setSSL(boolean ssl) {
-        this.isSSL = ssl;
-    }
-
-    /**
-	 * @see org.apache.lenya.ac.Policy#isEmpty()
-	 */
-    public boolean isEmpty() throws AccessControlException {
-        return getCredentials().length == 0;
-    }
-
-    /**
-	 * Removes a credential.
-	 * @param credential The credential to remove.
-	 * @throws AccessControlException If the credential does not exist.
-	 */
-    protected void removeCredential(Credential credential) throws AccessControlException {
-        if (!this.accreditableToCredential.containsValue(credential)) {
-            throw new AccessControlException("Credential [" + credential + "] does not exist!");
-        }
-        this.accreditableToCredential.remove(credential.getAccreditable());
-    }
-
-    /**
-	 * Removes all roles for a certain accreditable.
-	 * @param accreditable The accreditable to remove all roles for.
-	 * @throws AccessControlException If no credential exists for this accreditable.
-	 */
-    public void removeRoles(Accreditable accreditable) throws AccessControlException {
-        if (this.accreditableToCredential.containsKey(accreditable)) {
-            Credential credential = getCredential(accreditable);
-            removeCredential(credential);
-        }
-    }
-
-}
diff --git a/src/java/org/apache/lenya/ac/impl/InheritingPolicyManager.java b/src/java/org/apache/lenya/ac/impl/InheritingPolicyManager.java
deleted file mode 100644
index a40c0aa..0000000
--- a/src/java/org/apache/lenya/ac/impl/InheritingPolicyManager.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac.impl;
-
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.AccreditableManager;
-import org.apache.lenya.ac.PolicyManager;
-
-/**
- * Policy manager which inherits credentials in a policy tree.
- * @version $Id$
- */
-public interface InheritingPolicyManager extends PolicyManager {
-
-    /**
-     * Builds the URL policy for a URL from a file.
-     * When the file is not present, an empty policy is returned.
-     * @param controller The access controller to use.
-     * @param url The URL inside the web application.
-     * @return A policy.
-     * @throws AccessControlException when something went wrong.
-     */
-    DefaultPolicy buildURLPolicy(AccreditableManager controller, String url)
-        throws AccessControlException;
-
-    /**
-    * Builds a subtree policy from a file. When the file is not present, an empty policy is returned.
-    * @param controller The access controller to use.
-    * @param url The URL inside the web application.
-    * @return A policy.
-    * @throws AccessControlException when something went wrong.
-    */
-    DefaultPolicy buildSubtreePolicy(AccreditableManager controller, String url)
-        throws AccessControlException;
-        
-    /**
-     * Returns the existing policies for all URL steps, beginning with the root policy.
-     * @param controller The accreditable manager to use.
-     * @param url The URL inside the web application.
-     * @return An array of policies.
-     * @throws AccessControlException when something went wrong.
-     */
-    DefaultPolicy[] getPolicies(AccreditableManager controller, String url)
-        throws AccessControlException;
-
-    /**
-     * Saves a URL policy.
-     * @param url The URL to save the policy for.
-     * @param policy The policy to save.
-     * @throws AccessControlException when something went wrong.
-     */
-    void saveURLPolicy(String url, DefaultPolicy policy) throws AccessControlException;
-
-    /**
-     * Saves a Subtree policy.
-     * @param url The url to save the policy for.
-     * @param policy The policy to save.
-     * @throws AccessControlException when something went wrong.
-     */
-    void saveSubtreePolicy(String url, DefaultPolicy policy) throws AccessControlException;
-
-}
diff --git a/src/java/org/apache/lenya/ac/impl/ItemConfiguration.java b/src/java/org/apache/lenya/ac/impl/ItemConfiguration.java
deleted file mode 100644
index e09b2ae..0000000
--- a/src/java/org/apache/lenya/ac/impl/ItemConfiguration.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac.impl;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.configuration.DefaultConfiguration;
-import org.apache.lenya.ac.AccessControlException;
-
-/**
- * Use this class to create configurations from {@link AbstractItem}s or
- * to build {@link AbstractItem}s from configurations.
- */
-public class ItemConfiguration {
-    
-    /**
-     * Ctor.
-     */
-    public ItemConfiguration() {
-	    // do nothing
-    }
-    
-    /**
-     * Saves the ID, name and description of the Manageable to the configuration.
-     * @param manageable A manageable.
-     * @param configuration A configuration.
-     */
-    public void save(AbstractItem manageable, DefaultConfiguration configuration) {
-        configuration.setAttribute(ATTRIBUTE_CLASS, manageable.getClass().getName());
-        configuration.setAttribute(ATTRIBUTE_ID, manageable.getId());
-
-        DefaultConfiguration child = null;
-
-        // add name node
-        child = new DefaultConfiguration(ELEMENT_NAME);
-        child.setValue(manageable.getName());
-        configuration.addChild(child);
-
-        // add description node
-        child = new DefaultConfiguration(ELEMENT_DESCRIPTION);
-        child.setValue(manageable.getDescription());
-        configuration.addChild(child);
-
-    }
-
-    protected static final String ELEMENT_NAME = "name";
-    protected static final String ELEMENT_DESCRIPTION = "description";
-    protected static final String ATTRIBUTE_ID = "id";
-    protected static final String ATTRIBUTE_CLASS = "class";
-
-    /**
-     * Configures a Manageable.
-     * @param manageable The manageable.
-     * @param configuration The configuration.
-     * @throws ConfigurationException when something went wrong.
-     */    
-    public void configure(AbstractItem manageable, Configuration configuration) throws ConfigurationException {
-        manageable.setId(configuration.getAttribute(ATTRIBUTE_ID));
-        manageable.setName(configuration.getChild(ELEMENT_NAME).getValue(""));
-        manageable.setDescription(configuration.getChild(ELEMENT_DESCRIPTION).getValue(""));
-    }
-
-    /**
-     * Returns the class name of an item.
-     * @param config The item configuration.
-     * @return The class name.
-     * @throws AccessControlException when something went wrong.
-     */
-    public static String getItemClass(Configuration config) throws AccessControlException {
-        String klass = null;
-
-        try {
-            klass = config.getAttribute(ItemConfiguration.ATTRIBUTE_CLASS);
-        } catch (ConfigurationException e) {
-            String errorMsg =
-                "Exception when extracting class name from identity file: "
-                    + klass
-                    + config.getAttributeNames();
-            throw new AccessControlException(errorMsg, e);
-        }
-        return klass;
-    }
-
-}
diff --git a/src/java/org/apache/lenya/ac/impl/PolicyAuthorizer.java b/src/java/org/apache/lenya/ac/impl/PolicyAuthorizer.java
deleted file mode 100644
index 0f886c7..0000000
--- a/src/java/org/apache/lenya/ac/impl/PolicyAuthorizer.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac.impl;
-
-import java.util.Arrays;
-import java.util.Enumeration;
-import java.util.List;
-
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.environment.Session;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.AccreditableManager;
-import org.apache.lenya.ac.Authorizer;
-import org.apache.lenya.ac.Identity;
-import org.apache.lenya.ac.Policy;
-import org.apache.lenya.ac.PolicyManager;
-import org.apache.lenya.ac.Role;
-import org.apache.lenya.util.ServletHelper;
-
-/**
- * Policy-based authorizer.
- * @version $Id$
- */
-public class PolicyAuthorizer extends AbstractLogEnabled implements Authorizer {
-
-    /**
-     * Returns the accreditable manager.
-     * @return An accreditable manager.
-     */
-    public AccreditableManager getAccreditableManager() {
-        return this.accreditableManager;
-    }
-
-    /**
-     * Returns the policy manager.
-     * @return A policy manager.
-     */
-    public PolicyManager getPolicyManager() {
-        return this.policyManager;
-    }
-
-    /**
-     * Creates a new policy authorizer.
-     */
-    public PolicyAuthorizer() {
-	    // do nothing
-    }
-    
-    private PolicyManager policyManager;
-    
-    /**
-     * Sets the policy manager.
-     * @param manager A policy manager.
-     */
-    public void setPolicyManager(PolicyManager manager) {
-        assert manager != null;
-        this.policyManager = manager;
-    }
-    
-    private AccreditableManager accreditableManager;
-    
-    /**
-     * Sets the accreditable manager.
-     * @param manager An accreditable manager.
-     */
-    public void setAccreditableManager(AccreditableManager manager) {
-        assert manager != null;
-        this.accreditableManager = manager;
-    }
-
-    /**
-     * @see org.apache.lenya.ac.Authorizer#authorize(org.apache.cocoon.environment.Request)
-     */
-    public boolean authorize(Request request)
-        throws AccessControlException {
-        return authorize(request, ServletHelper.getWebappURI(request));
-    }
-
-    /**
-     * Authorizes an request for an identity depending on a policy.
-     * @param identity The identity to authorize.
-     * @param request The request to authorize.
-     * @param webappUrl The web application URL.
-     * @return A boolean value.
-     * @throws AccessControlException when something went wrong.
-     */
-    protected boolean authorizePolicy(
-        Identity identity,
-        Request request,
-        String webappUrl)
-        throws AccessControlException {
-
-        Policy policy = getPolicyManager().getPolicy(getAccreditableManager(), webappUrl);
-        Role[] roles = policy.getRoles(identity);
-        saveRoles(request, roles);
-
-        boolean authorized = roles.length > 0;
-        return authorized;
-    }
-
-    /**
-     * Saves the roles of the current identity to the request.
-     * @param request The request.
-     * @param roles The roles.
-     */
-    protected void saveRoles(Request request, Role[] roles) {
-        String rolesString = "";
-        for (int i = 0; i < roles.length; i++) {
-            rolesString += " " + roles[i];
-        }
-        getLogger().debug("Adding roles [" + rolesString + " ] to request [" + request + "]");
-        request.setAttribute(AbstractRole.class.getName(), Arrays.asList(roles));
-    }
-    
-    /**
-     * Fetches the stored roles from the request.
-     * @param request The request.
-     * @return A role array.
-     * @throws AccessControlException If the request does not contain the roles list.
-     */
-    public static Role[] getRoles(Request request) throws AccessControlException {
-        List roleList = (List) request.getAttribute(AbstractRole.class.getName());
-
-        if (roleList == null) {
-            StringBuffer buf = new StringBuffer();
-            buf.append("    URI: [" + request.getRequestURI() + "]\n");
-            for (Enumeration e = request.getParameterNames(); e.hasMoreElements(); ) {
-                String key = (String) e.nextElement();
-                buf.append("    Parameter: [" + key + "] = [" + request.getParameter(key) + "]\n");
-            }
-            
-            throw new AccessControlException("Request [" + request + "] does not contain roles: \n" + buf.toString());
-        }
-        
-        Role[] roles = (Role[]) roleList.toArray(new Role[roleList.size()]);
-        return roles;
-    }
-
-    /**
-     * FIXME: Should this be exposed publically now that this method signature has been removed
-     * from Authorizer?
-     */
-    public boolean authorize(Request request, String webappUrl) throws AccessControlException {
-        Session session = request.getSession(true);
-        Identity identity = (Identity) session.getAttribute(Identity.class.getName());
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Trying to authorize identity: " + identity);
-        }
-
-        boolean authorized;
-
-        if (identity.belongsTo(getAccreditableManager())) {
-            authorized = authorizePolicy(identity, request, webappUrl);
-        } else {
-            getLogger().debug(
-                "Identity ["
-                    + identity
-                    + "] not authorized - belongs to wrong accreditable manager.");
-            authorized = false;
-        }
-
-        getLogger().debug("Authorized: " + authorized);
-
-        return authorized;
-    }
-
-}
diff --git a/src/java/org/apache/lenya/ac/impl/PolicyBuilder.java b/src/java/org/apache/lenya/ac/impl/PolicyBuilder.java
deleted file mode 100644
index 005e8e4..0000000
--- a/src/java/org/apache/lenya/ac/impl/PolicyBuilder.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac.impl;
-
-import java.io.InputStream;
-
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.AccessController;
-import org.apache.lenya.ac.Accreditable;
-import org.apache.lenya.ac.AccreditableManager;
-import org.apache.lenya.ac.Role;
-import org.apache.lenya.ac.User;
-import org.apache.lenya.ac.World;
-import org.apache.lenya.ac.cache.BuildException;
-import org.apache.lenya.ac.cache.InputStreamBuilder;
-import org.apache.lenya.xml.DocumentHelper;
-import org.apache.lenya.xml.NamespaceHelper;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-/**
- * Builds policies from input streams.
- * @version $Id$
- */
-public class PolicyBuilder implements InputStreamBuilder {
-
-    /**
-     * Ctor.
-     * @param _accreditableManager An accreditable manager.
-     */
-    public PolicyBuilder(AccreditableManager _accreditableManager) {
-        assert _accreditableManager != null;
-        this.accreditableManager = _accreditableManager;
-    }
-    
-    /**
-     * Returns the accreditable manager.
-     * @return An accreditable manager.
-     */
-    public AccreditableManager getAccreditableManager() {
-        return this.accreditableManager;
-    }
-
-    private AccreditableManager accreditableManager;
-
-    protected static final String POLICY_ELEMENT = "policy";
-    protected static final String GROUP_ELEMENT = "group";
-    protected static final String USER_ELEMENT = "user";
-    protected static final String ROLE_ELEMENT = "role";
-    protected static final String WORLD_ELEMENT = "world";
-    protected static final String IP_RANGE_ELEMENT = "ip-range";
-    protected static final String ID_ATTRIBUTE = "id";
-    protected static final String SSL_ATTRIBUTE = "ssl";
-    
-    /**
-     * Builds a policy from an input stream.
-     * @param stream The input stream to read the policy from.
-     * @return A policy.
-     * @throws AccessControlException when something went wrong.
-     */
-    public DefaultPolicy buildPolicy(InputStream stream)
-        throws AccessControlException {
-
-        Document document;
-
-        try {
-            document = DocumentHelper.readDocument(stream);
-        } catch (Exception e) {
-            throw new AccessControlException(e);
-        }
-
-        return buildPolicy(document);
-    }
-
-    /**
-     * Builds a policy from an XML document.
-     * @param document The XML document.
-     * @return A policy.
-     * @throws AccessControlException when something went wrong.
-     */
-    public DefaultPolicy buildPolicy(Document document)
-        throws AccessControlException {
-
-        DefaultPolicy policy = new DefaultPolicy();
-        Element policyElement = document.getDocumentElement();
-        assert policyElement.getLocalName().equals(POLICY_ELEMENT);
-
-        NamespaceHelper helper =
-            new NamespaceHelper(
-                AccessController.NAMESPACE,
-                AccessController.DEFAULT_PREFIX,
-                document);
-
-        Element[] credentialElements = helper.getChildren(policyElement);
-
-        for (int i = 0; i < credentialElements.length; i++) {
-            Accreditable accreditable = null;
-
-            String id = credentialElements[i].getAttribute(ID_ATTRIBUTE);
-            accreditable = getAccreditable(credentialElements[i].getLocalName(), id);
-
-            Credential credential = new Credential(accreditable);
-
-            Element[] roleElements = helper.getChildren(credentialElements[i], ROLE_ELEMENT);
-
-            for (int j = 0; j < roleElements.length; j++) {
-                String roleId = roleElements[j].getAttribute(ID_ATTRIBUTE);
-                Role role = getAccreditableManager().getRoleManager().getRole(roleId);
-                credential.addRole(role);
-            }
-
-            policy.addCredential(credential);
-        }
-        
-        boolean ssl = false;
-        String sslString = policyElement.getAttribute(SSL_ATTRIBUTE);
-        if (sslString != null) {
-            ssl = Boolean.valueOf(sslString).booleanValue();
-        }
-        policy.setSSL(ssl);
-
-        return policy;
-    }
-
-    /**
-     * Creates an accredtiable for an element.
-     * @param elementName The elment name.
-     * @param id The ID of the accreditable.
-     * @return An accreditable.
-     * @throws AccessControlException when something went wrong.
-     */
-    protected Accreditable getAccreditable(
-        String elementName,
-        String id)
-        throws AccessControlException {
-        Accreditable accreditable = null;
-
-        if (elementName.equals(USER_ELEMENT)) {
-            accreditable = getAccreditableManager().getUserManager().getUser(id);
-        } else if (elementName.equals(GROUP_ELEMENT)) {
-            accreditable = getAccreditableManager().getGroupManager().getGroup(id);
-        } else if (elementName.equals(WORLD_ELEMENT)) {
-            accreditable = World.getInstance();
-        } else if (elementName.equals(IP_RANGE_ELEMENT)) {
-            accreditable = getAccreditableManager().getIPRangeManager().getIPRange(id);
-        }
-
-        if (accreditable == null) {
-            throw new AccessControlException(
-                "Unknown accreditable [" + elementName + "] with ID [" + id + "]");
-        }
-
-        return accreditable;
-    }
-
-    /**
-     * Saves a policy to an XML document.
-     * @param policy The policy to save.
-     * @return A DOM document.
-     * @throws AccessControlException when something went wrong.
-     */
-    public static Document savePolicy(DefaultPolicy policy) throws AccessControlException {
-        NamespaceHelper helper;
-
-        try {
-            helper =
-                new NamespaceHelper(
-                    AccessController.NAMESPACE,
-                    AccessController.DEFAULT_PREFIX,
-                    POLICY_ELEMENT);
-        } catch (ParserConfigurationException e) {
-            throw new AccessControlException(e);
-        }
-
-        Credential[] credentials = policy.getCredentials();
-        Element policyElement = helper.getDocument().getDocumentElement();
-
-        for (int i = 0; i < credentials.length; i++) {
-            Accreditable accreditable = credentials[i].getAccreditable();
-            Element accreditableElement = save(accreditable, helper);
-            
-            Role[] roles = credentials[i].getRoles();
-            for (int j = 0; j < roles.length; j++) {
-                Element roleElement = helper.createElement(ROLE_ELEMENT);
-                roleElement.setAttribute(ID_ATTRIBUTE, roles[j].getId());
-                accreditableElement.appendChild(roleElement);
-            }
-            
-            policyElement.appendChild(accreditableElement);
-        }
-        
-        policyElement.setAttribute(SSL_ATTRIBUTE, Boolean.toString(policy.isSSLProtected()));
-
-        return helper.getDocument();
-    }
-
-    /**
-     * Saves an accreditable to an XML element.
-     * @param accreditable The accreditable.
-     * @param helper The namespace helper to be used.
-     * @return An XML element.
-     * @throws AccessControlException when something went wrong.
-     */
-    protected static Element save(Accreditable accreditable, NamespaceHelper helper)
-        throws AccessControlException {
-        String localName = null;
-        String id = null;
-
-        if (accreditable instanceof User) {
-            localName = USER_ELEMENT;
-            id = ((User) accreditable).getId();
-        } else if (accreditable instanceof AbstractGroup) {
-            localName = GROUP_ELEMENT;
-            id = ((AbstractGroup) accreditable).getId();
-        } else if (accreditable instanceof World) {
-            localName = WORLD_ELEMENT;
-        } else if (accreditable instanceof AbstractIPRange) {
-            localName = IP_RANGE_ELEMENT;
-            id = ((AbstractIPRange) accreditable).getId();
-        }
-
-        if (localName == null) {
-            throw new AccessControlException("Could not save accreditable [" + accreditable + "]");
-        }
-
-        Element element = helper.createElement(localName);
-
-        if (id != null) {
-            element.setAttribute(ID_ATTRIBUTE, id);
-        }
-
-        return element;
-    }
-
-    /**
-     * @see org.apache.lenya.ac.cache.InputStreamBuilder#build(java.io.InputStream)
-     */
-    public Object build(InputStream stream) throws BuildException {
-        Object value = null;
-        try {
-            value = buildPolicy(stream);
-        } catch (AccessControlException e) {
-            throw new BuildException(e);
-        }
-        return value;
-    }
-
-}
diff --git a/src/java/org/apache/lenya/ac/impl/RemovedAccreditablePolicyBuilder.java b/src/java/org/apache/lenya/ac/impl/RemovedAccreditablePolicyBuilder.java
deleted file mode 100644
index ab7c775..0000000
--- a/src/java/org/apache/lenya/ac/impl/RemovedAccreditablePolicyBuilder.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac.impl;
-
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.Accreditable;
-import org.apache.lenya.ac.AccreditableManager;
-import org.apache.lenya.ac.Group;
-import org.apache.lenya.ac.IPRange;
-import org.apache.lenya.ac.User;
-
-/**
- * A PolicyBuilder which can be used after an accreditable was removed.
- */
-public class RemovedAccreditablePolicyBuilder extends PolicyBuilder {
-
-    /**
-     * Ctor.
-     * @param accreditableManager The accreditable manager.
-     */
-    public RemovedAccreditablePolicyBuilder(AccreditableManager accreditableManager) {
-        super(accreditableManager);
-    }
-
-    private Accreditable removedAccreditable;
-
-    /**
-     * Sets the removed accreditable.
-     * 
-     * @param accreditable An accreditable.
-     */
-    public void setRemovedAccreditable(Accreditable accreditable) {
-        this.removedAccreditable = accreditable;
-    }
-
-    /**
-     * @see org.apache.lenya.ac.impl.PolicyBuilder#getAccreditable(java.lang.String, java.lang.String)
-     */
-    protected Accreditable getAccreditable(String elementName, String id)
-        throws AccessControlException {
-
-        Accreditable accreditable;
-
-        if (this.removedAccreditable instanceof User
-            && elementName.equals(USER_ELEMENT)
-            && ((User) this.removedAccreditable).getId().equals(id)) {
-            accreditable = this.removedAccreditable;
-        } else if (
-            this.removedAccreditable instanceof Group
-                && elementName.equals(GROUP_ELEMENT)
-                && ((Group) this.removedAccreditable).getId().equals(id)) {
-            accreditable = this.removedAccreditable;
-        } else if (
-            this.removedAccreditable instanceof IPRange
-                && elementName.equals(IP_RANGE_ELEMENT)
-                && ((IPRange) this.removedAccreditable).getId().equals(id)) {
-            accreditable = this.removedAccreditable;
-        } else {
-
-            accreditable = super.getAccreditable(elementName, id);
-        }
-        return accreditable;
-    }
-
-}
diff --git a/src/java/org/apache/lenya/ac/impl/URLPolicy.java b/src/java/org/apache/lenya/ac/impl/URLPolicy.java
deleted file mode 100644
index 578f98b..0000000
--- a/src/java/org/apache/lenya/ac/impl/URLPolicy.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac.impl;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.AccreditableManager;
-import org.apache.lenya.ac.Identity;
-import org.apache.lenya.ac.Policy;
-import org.apache.lenya.ac.Role;
-
-/**
- * A policy at a certain URL. The final policy is computed by merging the subtree
- * policies of all ancestor-or-self directories with the URL policy of the actual URL.  
- */
-public class URLPolicy implements Policy {
-
-    /**
-     * Returns the resulting policy for a certain URL.
-     * @param controller The acccess controller.
-     * @param _url The URL.
-     * @param manager The policy manager.
-     */
-    public URLPolicy(AccreditableManager controller, String _url, InheritingPolicyManager manager) {
-        assert _url != null;
-        this.url = _url;
-
-        assert manager != null;
-        this.policyManager = manager;
-
-        assert controller != null;
-        this.accreditableManager = controller;
-    }
-
-    private String url;
-    private InheritingPolicyManager policyManager;
-    private AccreditableManager accreditableManager;
-    private Policy[] policies = null;
-
-    /**
-     * Obtains the policies from the policy manager.
-     * This method is expensive and therefore only called when needed.
-     * @throws AccessControlException when something went wrong.
-     */
-    protected void obtainPolicies() throws AccessControlException {
-        if (this.policies == null) {
-            this.policies = getPolicyManager().getPolicies(getAccreditableManager(), getUrl());
-        }
-    }
-
-    static final String[] VISITOR_ROLES = { "visitor", "visit" };
-    static final String[] ADMINISTRATOR_ROLES = { "administrator", "admin", "organize" };
-    static final String[] AUTHOR_ROLES = { "author", "edit" };
-
-    /**
-     * @see org.apache.lenya.ac.Policy#getRoles(org.apache.lenya.ac.Identity)
-     */
-    public Role[] getRoles(Identity identity) throws AccessControlException {
-        obtainPolicies();
-        Set roles = new HashSet();
-
-        // no policies defined: return "visit" or "visitor" role
-        if (isEmpty()) {
-            Role visitorRole = getVisitorRole(getAccreditableManager());
-            if (visitorRole != null) {
-                roles.add(visitorRole);
-            }
-        } else {
-            for (int i = 0; i < this.policies.length; i++) {
-                addRoles(this.policies[i], identity, roles);
-            }
-        }
-        return (Role[]) roles.toArray(new Role[roles.size()]);
-    }
-
-    /**
-     * Returns the visitor role.
-     * @param manager The accreditable manager.
-     * @return A role.
-     * @throws AccessControlException when something went wrong.
-     */
-    public static Role getVisitorRole(AccreditableManager manager) throws AccessControlException {
-        Role visitorRole = null;
-        for (int i = 0; i < VISITOR_ROLES.length; i++) {
-            Role role = manager.getRoleManager().getRole(VISITOR_ROLES[i]);
-            if (role != null) {
-                visitorRole = role;
-            }
-        }
-        return visitorRole;
-    }
-
-    /**
-     * Returns the administrator role.
-     * @param manager The accreditable manager.
-     * @return A role.
-     * @throws AccessControlException when something went wrong.
-     */
-    public static Role getAdministratorRole(AccreditableManager manager) throws AccessControlException {
-        Role administratorRole = null;
-        for (int i = 0; i < ADMINISTRATOR_ROLES.length; i++) {
-            Role role = manager.getRoleManager().getRole(ADMINISTRATOR_ROLES[i]);
-            if (role != null) {
-                administratorRole = role;
-            }
-        }
-        return administratorRole;
-    }
-
-    /**
-     * Returns the author role.
-     * @param manager The accreditable manager.
-     * @return A role.
-     * @throws AccessControlException when something went wrong.
-     */
-    public static Role getAuthorRole(AccreditableManager manager) throws AccessControlException {
-        Role administratorRole = null;
-        for (int i = 0; i < AUTHOR_ROLES.length; i++) {
-            Role role = manager.getRoleManager().getRole(AUTHOR_ROLES[i]);
-            if (role != null) {
-                administratorRole = role;
-            }
-        }
-        return administratorRole;
-    }
-
-    /**
-     * Adds the roles of an identity of a policy to a role set.
-     * @param policy The policy.
-     * @param identity The identity.
-     * @param roles The role set.
-     * @throws AccessControlException when something went wrong.
-     */
-    protected void addRoles(Policy policy, Identity identity, Set roles)
-        throws AccessControlException {
-        roles.addAll(Arrays.asList(policy.getRoles(identity)));
-    }
-
-    /**
-     * Returns the URL of this policy.
-     * @return The URL of this policy.
-     */
-    public String getUrl() {
-        return this.url;
-    }
-
-    /**
-     * Returns the policy builder.
-     * @return A policy builder.
-     */
-    public InheritingPolicyManager getPolicyManager() {
-        return this.policyManager;
-    }
-
-    /**
-     * Returns the access controller.
-     * @return An access controller.
-     */
-    public AccreditableManager getAccreditableManager() {
-        return this.accreditableManager;
-    }
-
-    /**
-     * The URL policy requires SSL protection if one of its
-     * member policies requires SSL protection.
-     * @see org.apache.lenya.ac.Policy#isSSLProtected()
-     */
-    public boolean isSSLProtected() throws AccessControlException {
-        obtainPolicies();
-
-        boolean ssl = false;
-
-        int i = 0;
-        while (!ssl && i < this.policies.length) {
-            ssl = ssl || this.policies[i].isSSLProtected();
-            i++;
-        }
-
-        return ssl;
-    }
-
-    /**
-     * @see org.apache.lenya.ac.Policy#isEmpty()
-     */
-    public boolean isEmpty() throws AccessControlException {
-        boolean empty = true;
-
-        int i = 0;
-        while (empty && i < this.policies.length) {
-            empty = empty && this.policies[i].isEmpty();
-            i++;
-        }
-
-        return empty;
-    }
-
-}
diff --git a/src/java/org/apache/lenya/ac/impl/UserAuthenticator.java b/src/java/org/apache/lenya/ac/impl/UserAuthenticator.java
deleted file mode 100644
index bf6f2c8..0000000
--- a/src/java/org/apache/lenya/ac/impl/UserAuthenticator.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation
- * 
- * Licensed 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.
- *  
- */
-
-package org.apache.lenya.ac.impl;
-
-import org.apache.commons.codec.binary.Base64;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.cocoon.environment.Request;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.AccreditableManager;
-import org.apache.lenya.ac.Authenticator;
-import org.apache.lenya.ac.Identity;
-import org.apache.lenya.ac.User;
-
-/**
- * User authenticator.
- * @version $Id$
- */
-public class UserAuthenticator extends AbstractLogEnabled implements Authenticator {
-
-    /**
-     * @see org.apache.lenya.ac.Authenticator#authenticate(org.apache.lenya.ac.AccreditableManager,
-     *      org.apache.cocoon.environment.Request)
-     *      Note that this implementation first checks if the user has authenticated over basic
-     *      HTTP authentication. If yes, it uses these credentials.
-     */
-    public boolean authenticate(AccreditableManager accreditableManager, Request request)
-            throws AccessControlException {
-
-        String encoded = "";
-        String unencoded = "";
-        String username = "";
-        String password = "";
-        if (request.getHeader("Authorization") != null) {
-          encoded = request.getHeader("Authorization");
-        }
-        if(encoded.indexOf("Basic") > -1) {
-          encoded = encoded.trim();
-          encoded = encoded.substring(encoded.indexOf(' ')+1);
-            unencoded = new String(Base64.decodeBase64(encoded.getBytes()));
-        }
-        if (unencoded.indexOf(":")-1 > -1 ) {
-          username = unencoded.substring(0,unencoded.indexOf(":"));
-          password = unencoded.substring(unencoded.indexOf(":")+1);
-        }
-
-        if (encoded.length() == 0 && request.getParameter("username") != null) {
-                username = request.getParameter("username");
-                password = request.getParameter("password");
-        }
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug(
-                    "Authenticating username [" + username + "] with password [" + password + "]");
-        }
-
-        if (username == null || password == null) {
-            throw new AccessControlException("Username or password is null!");
-        }
-
-        Identity identity = (Identity) request.getSession(false).getAttribute(
-                Identity.class.getName());
-
-        if (identity == null) {
-            throw new AccessControlException("The session does not contain the identity!");
-        }
-
-        boolean authenticated = authenticate(accreditableManager, username, password, identity);
-        return authenticated;
-    }
-
-    /**
-     * Authenticates a user with a given username and password. When the authentication is
-     * successful, the user is added to the identity.
-     * @param accreditableManager The accreditable manager.
-     * @param username The username.
-     * @param password The password.
-     * @param identity The identity to add the user to.
-     * @throws AccessControlException when something went wrong.
-     * @return <code>true</code> if the user was authenticated, <code>false</code> otherwise.
-     */
-    protected boolean authenticate(AccreditableManager accreditableManager, String username,
-            String password, Identity identity) throws AccessControlException {
-
-        User user = accreditableManager.getUserManager().getUser(username);
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Authenticating user: [" + user + "]");
-        }
-
-        boolean authenticated = false;
-        if (user != null && user.authenticate(password)) {
-            if (getLogger().isDebugEnabled()) {
-                getLogger().debug("User [" + user + "] authenticated.");
-            }
-
-            if (!identity.contains(user)) {
-                User oldUser = identity.getUser();
-                if (oldUser != null) {
-                    if (getLogger().isDebugEnabled()) {
-                        getLogger().debug("Removing user [" + oldUser + "] from identity.");
-                    }
-                    identity.removeIdentifiable(oldUser);
-                }
-                identity.addIdentifiable(user);
-            }
-            authenticated = true;
-        } else {
-            if (getLogger().isDebugEnabled()) {
-                if (user == null) {
-                    getLogger().debug("No such user: [" + username + "]");
-                }
-                getLogger().debug("User [" + username + "] not authenticated.");
-            }
-        }
-
-        return authenticated;
-    }
-
-}
diff --git a/src/java/org/apache/lenya/ac/ldap/LDAPUser.java b/src/java/org/apache/lenya/ac/ldap/LDAPUser.java
deleted file mode 100644
index f0f8110..0000000
--- a/src/java/org/apache/lenya/ac/ldap/LDAPUser.java
+++ /dev/null
@@ -1,560 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac.ldap;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.util.Hashtable;
-import java.util.Properties;
-
-import javax.naming.AuthenticationException;
-import javax.naming.Context;
-import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.Attributes;
-import javax.naming.directory.DirContext;
-import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
-import javax.naming.ldap.InitialLdapContext;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.configuration.DefaultConfiguration;
-import org.apache.avalon.framework.container.ContainerUtil;
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.file.FileUser;
-
-import com.sun.jndi.ldap.LdapCtxFactory;
-
-/**
- * LDAP user.
- * @version $Id$
- */
-public class LDAPUser extends FileUser {
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	private static Properties defaultProperties = null;
-
-    /**
-     * <code>LDAP_ID</code> The LDAP id
-     */
-    public static final String LDAP_ID = "ldapid";
-    private static String LDAP_PROPERTIES_FILE = "ldap.properties"; 
-    private static String PROVIDER_URL_PROP = "provider-url";
-    private static String MGR_DN_PROP = "mgr-dn";
-    private static String MGR_PW_PROP = "mgr-pw";
-    private static String KEY_STORE_PROP = "key-store";
-    private static String SECURITY_PROTOCOL_PROP = "security-protocol";
-    private static String SECURITY_AUTHENTICATION_PROP = "security-authentication";
-    private static String USR_ATTR_PROP = "usr-attr";
-    private static String USR_ATTR_DEFAULT = "uid";
-    private static String USR_NAME_ATTR_PROP = "usr-name-attr";
-    private static String USR_NAME_ATTR_DEFAULT = "gecos";
-    private static String USR_BRANCH_PROP = "usr-branch";
-    private static String USR_BRANCH_DEFAULT = "ou=People";
-    private static String USR_AUTH_TYPE_PROP = "usr-authentication";
-    private static String USR_AUTH_TYPE_DEFAULT = "simple";
-    private static String BASE_DN_PROP = "base-dn";
-    private static String DOMAIN_NAME_PROP = "domain-name";
-
-    private String ldapId;
-    private String ldapName;
-
-    // deprecated: for backwards compatibility only !
-    private static String PARTIAL_USER_DN_PROP = "partial-user-dn";
-
-    /**
-     * Creates a new LDAPUser object.
-     */
-    public LDAPUser() {
-        // do nothing
-    }
-
-    /**
-     * Creates a new LDAPUser object.
-     * @param configurationDirectory The configuration directory.
-     */
-    public LDAPUser(File configurationDirectory) {
-        setConfigurationDirectory(configurationDirectory);
-    }
-
-    /**
-     * Create an LDAPUser
-     * @param configurationDirectory where the user will be attached to
-     * @param id user id of LDAPUser
-     * @param email of LDAPUser
-     * @param _ldapId of LDAPUser
-     * @throws ConfigurationException if the properties could not be read
-     */
-    public LDAPUser(File configurationDirectory, String id, String email, String _ldapId, Logger _logger)
-            throws ConfigurationException {
-        super(configurationDirectory, id, null, email, null);
-        ContainerUtil.enableLogging(this, _logger);
-        this.ldapId = _ldapId;
-
-        initialize();
-    }
-
-    /**
-     * Create a new LDAPUser from a configuration
-     * @param config the <code>Configuration</code> specifying the user details
-     * @throws ConfigurationException if the user could not be instantiated
-     */
-    public void configure(Configuration config) throws ConfigurationException {
-        super.configure(config);
-        this.ldapId = config.getChild(LDAP_ID).getValue();
-
-        initialize();
-    }
-
-    /**
-     * Checks if a user exists.
-     * @param _ldapId The LDAP id.
-     * @return A boolean value indicating whether the user is found in the directory
-     * @throws AccessControlException when an error occurs. 
-     */
-    public boolean existsUser(String _ldapId) throws AccessControlException {
-
-        if (getLogger().isDebugEnabled())
-            getLogger().debug("existsUser() checking id " + _ldapId);
-
-        boolean exists = false;
-
-        try {
-            readProperties();
-            SearchResult entry = getDirectoryEntry(_ldapId);
-
-            exists = (entry != null);
-        } catch (final IOException e) {
-            if (getLogger().isDebugEnabled())
-                getLogger().debug("existsUser() for id " + _ldapId + " got exception: " + e);
-            throw new AccessControlException("Exception during search: ", e);
-        } catch (final NamingException e) {
-            if (getLogger().isDebugEnabled())
-                getLogger().debug("existsUser() for id " + _ldapId + " got exception: " + e);
-            throw new AccessControlException("Exception during search: ", e);
-        }
-
-        return exists;
-    }
-
-    /**
-     * Initializes this user.
-     * The current (already authenticated) ldapId is queried in the directory, 
-     * in order to retrieve additional information, such as the user name.
-     * In current implementation, only the user name is actually retrieved, but
-     * other attributes may be used in the future (such as groups ?)
-     * TODO: should the code be changed to not throw an exception when something
-     * goes wrong ? After all, it's only used to get additional info for display?
-     * This is a design decision, I'm not sure what's best.
-     * @throws ConfigurationException when something went wrong.
-     */
-    protected void initialize() throws ConfigurationException {
-
-        try {
-            if (getLogger().isDebugEnabled())
-                getLogger().debug("initialize() getting entry ...");
-
-            SearchResult entry = getDirectoryEntry(this.ldapId);
-            if (entry != null) {
-                StringBuffer name = new StringBuffer();
-                /* users full name */
-                String usrNameAttr = 
-                    defaultProperties.getProperty(USR_NAME_ATTR_PROP, USR_NAME_ATTR_DEFAULT);
-
-                if (getLogger().isDebugEnabled())
-                    getLogger().debug("initialize() got entry, going to look for attribute " + usrNameAttr + " in entry, which is: " + entry);
-            
-                Attributes attributes = entry.getAttributes();
-                if (attributes != null) {
-                    Attribute userNames = attributes.get(usrNameAttr);
-                    if (userNames != null)
-            	       for (NamingEnumeration enumeration = userNames.getAll(); enumeration.hasMore(); enumeration.next())
-            	           name.append((String)userNames.get());
-                }
-                this.ldapName = name.toString();
-                if (getLogger().isDebugEnabled())
-                    getLogger().debug("initialize() set name to " + this.ldapName);
-            }
-            else {
-                this.ldapName = "";
-            }
-        } catch (final NamingException e1) {
-            throw new ConfigurationException("Could not read properties", e1);
-        } catch (final IOException e1) {
-            throw new ConfigurationException("Could not read properties", e1);
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.ac.file.FileUser#createConfiguration()
-     */
-    protected Configuration createConfiguration() {
-        DefaultConfiguration config = (DefaultConfiguration) super.createConfiguration();
-
-        // add ldap_id node
-        DefaultConfiguration child = new DefaultConfiguration(LDAP_ID);
-        child.setValue(this.ldapId);
-        config.addChild(child);
-
-        return config;
-    }
-
-    /**
-     * Get the ldap id
-     * @return the ldap id
-     */
-    public String getLdapId() {
-        return this.ldapId;
-    }
-
-    /**
-     * Set the ldap id
-     * @param string the new ldap id
-     */
-    public void setLdapId(String string) {
-        this.ldapId = string;
-    }
-
-    /**
-     * Authenticate a user against the directory.
-     * The principal to be authenticated is either constructed by use of the
-     * configured properties, or by lookup of this ID in the directory. 
-     * This principal then attempts to authenticate against the directory with
-     * the provided password.
-     * @see org.apache.lenya.ac.User#authenticate(java.lang.String)
-     */
-    public boolean authenticate(String password) {
-
-        boolean authenticated = false;
-        String principal = "";
-        Context ctx = null;
-
-        try {
-            principal = getPrincipal();
-	    
-            if (getLogger().isDebugEnabled())
-                getLogger().debug("Authenticating with principal [" + principal + "]");
-
-            ctx = bind(principal, password,
-                       defaultProperties.getProperty(USR_AUTH_TYPE_PROP, 
-                                                     USR_AUTH_TYPE_DEFAULT));
-            authenticated = true;
-            close(ctx);
-            if (getLogger().isDebugEnabled())
-                getLogger().debug("Context closed.");
-        } catch (IOException e) {
-            getLogger().warn("authenticate handling IOException, check your setup: " + e);
-        } catch (AuthenticationException e) {
-            getLogger().info("authenticate failed for principal " + principal + ", exception " + e);
-        } catch (NamingException e) {
-            // log this failure
-            if (getLogger().isInfoEnabled()) {
-                getLogger().info("Bind for user " + principal + " to Ldap server failed: ", e);
-            }
-        }
-
-        return authenticated;
-
-    }
-
-    /**
-     * @see org.apache.lenya.ac.Item#getName()
-     */
-    public String getName() {
-        return this.ldapName;
-    }
-
-    /**
-     * LDAP Users fetch their name information from the LDAP server, so we don't store it locally.
-     * Since we only have read access we basically can't set the name, i.e. any request to change
-     * the name is ignored.
-     * @param string is ignored
-     */
-    public void setName(String string) {
-        // we do not have write access to LDAP, so we ignore
-        // change request to the name.
-    }
-
-    /**
-     * The LDAPUser doesn't store any passwords as they are handled by LDAP
-     * @param plainTextPassword is ignored
-     */
-    public void setPassword(String plainTextPassword) {
-        setEncryptedPassword(null);
-    }
-
-    /**
-     * The LDAPUser doesn't store any passwords as they are handled by LDAP
-     * @param encryptedPassword is ignored
-     */
-    protected void setEncryptedPassword(String encryptedPassword) {
-        encryptedPassword = null;
-    }
-
-    /**
-     * Connect to the LDAP server
-     * @param principal the principal string for the LDAP connection
-     * @param credentials the credentials for the LDAP connection
-     * @param authMethod the authentication method
-     * @return a <code>DirContext</code>
-     * @throws NamingException if there are problems establishing the Ldap connection
-     */
-    private DirContext bind(String principal, String credentials, String authMethod) throws NamingException {
-
-        if (getLogger().isInfoEnabled())
-            getLogger().info("Binding principal: [" + principal + "]");
-
-        Hashtable env = new Hashtable();
-
-        System.setProperty("javax.net.ssl.trustStore", getConfigurationDirectory()
-                .getAbsolutePath()
-                + File.separator + defaultProperties.getProperty(KEY_STORE_PROP));
-
-        env.put(Context.INITIAL_CONTEXT_FACTORY, LdapCtxFactory.class.getName());
-        env.put(Context.PROVIDER_URL, defaultProperties.getProperty(PROVIDER_URL_PROP));
-        env.put(Context.SECURITY_PROTOCOL, defaultProperties.getProperty(SECURITY_PROTOCOL_PROP));
-
-        env.put(Context.SECURITY_AUTHENTICATION, authMethod);
-        if (authMethod != null && ! authMethod.equals("none")) {
-            env.put(Context.SECURITY_PRINCIPAL, principal);
-            env.put(Context.SECURITY_CREDENTIALS, credentials);
-        }
-
-        DirContext ctx = new InitialLdapContext(env, null);
-
-        if (getLogger().isInfoEnabled())
-            getLogger().info("Finished binding principal.");
-
-        return ctx;
-    }
-
-    /**
-     * Close the connection to the LDAP server
-     * @param ctx the context that was returned from the bind
-     * @throws NamingException if there is a problem communicating to the LDAP server
-     */
-    private void close(Context ctx) throws NamingException {
-        if (ctx != null)
-            ctx.close();
-    }
-
-    /**
-     * Read the properties
-     * @throws IOException if the properties cannot be found.
-     */
-    private void readProperties() throws IOException {
-        // create and load default properties
-        File propertiesFile = new File(getConfigurationDirectory(), LDAP_PROPERTIES_FILE);
-
-        if (defaultProperties == null) {
-            defaultProperties = new Properties();
-
-            FileInputStream in = null;
-            try {
-                in = new FileInputStream(propertiesFile);
-                defaultProperties.load(in);
-            } finally {
-                if (in != null) {
-                    in.close();
-                }
-            }
-        }
-    }
-
-    /** 
-     * Wrapping of the decision whether a recursive search is wanted or not.
-     * Implementation: 
-     * If the USR_BRANCH_PROP is present, this is the new style of configuration
-     * (starting Lenya 1.2.2); if it has a value, then a specific branch is wanted:
-     * no recursive search. If the property is present, but has no value,
-     * search recursively.
-     * @return Recursive search
-     */
-    private boolean isSubtreeSearch() {
-	boolean recurse = false;
-	String usrBranchProp = defaultProperties.getProperty(USR_BRANCH_PROP);
-	if (usrBranchProp != null)
-	    if (usrBranchProp.trim().length() == 0)
-		recurse = true;
-	
-	return recurse;
-    }
-
-
-    private SearchResult getDirectoryEntry(String userId) 
-        throws NamingException, IOException
-    {
-        DirContext context = null;
-        String searchFilter = "";
-        String objectName = "";
-        boolean recursiveSearch;
-        SearchResult result = null;
- 
-        try {
-            readProperties();
-	    
-            context = bind(defaultProperties.getProperty(MGR_DN_PROP), 
-                           defaultProperties.getProperty(MGR_PW_PROP),
-                           defaultProperties.getProperty(SECURITY_AUTHENTICATION_PROP));
-
-            // Get search information and user attribute from properties
-            // provide defaults if not present (backward compatibility)
-            String userAttribute = 
-               defaultProperties.getProperty(USR_ATTR_PROP, USR_ATTR_DEFAULT);
-            searchFilter = "(" + userAttribute + "=" + userId + ")";
-            SearchControls scope = new SearchControls();
-
-            recursiveSearch = isSubtreeSearch();
-            if (recursiveSearch) {
-                scope.setSearchScope(SearchControls.SUBTREE_SCOPE);
-                objectName = defaultProperties.getProperty(PROVIDER_URL_PROP);
-            }
-            else {
-                scope.setSearchScope(SearchControls.ONELEVEL_SCOPE);
-                objectName = defaultProperties.getProperty(USR_BRANCH_PROP, USR_BRANCH_DEFAULT);
-	    }
-	
-            if (getLogger().isDebugEnabled())
-                getLogger().debug("searching object " + objectName + " filtering with " + searchFilter + ", recursive search ? " + recursiveSearch);
-
-            NamingEnumeration results = context.search(objectName, searchFilter, scope);
-            if (results != null && results.hasMore())
-                result = (SearchResult)results.next();
-
-	    // sanity check: if more than one entry is returned
-	    // for a user-id, then the directory is probably flawed,
-	    // so it would be nice to warn the administrator.
-	    //
-	    // This block is commented out for now, because of possible
-	    // side-effects, such as unexpected exceptions.
-// 		try {
-// 		    if (results.hasMore()) {
-// 			getLogger().warn("Found more than one entry in the directory for user " + userId + ". You probably should deactivate recursive searches. The first entry was used as a work-around.");
-// 		    }
-// 		}
-// 		catch (javax.naming.PartialResultException e) {
-// 		    if (getLogger().isDebugEnabled())
-// 			getLogger().debug("Catching and ignoring PartialResultException, as this means LDAP server does not support our sanity check");
-// 		}
-
-        }
-        catch (NamingException e) {
-            if (getLogger().isDebugEnabled())
-                getLogger().debug("NamingException caught when searching on objectName = " + objectName + " and searchFilter=" + searchFilter + ", this exception will be propagated: " + e);
-            throw e;
-        } 
-        finally {
-            try {
-                if (context != null) {
-                    close(context);
-                }
-            } catch (NamingException e) {
-                getLogger().warn("this should not happen: exception closing context " + e);
-            }
-        }
-        return result;
-    }
-
-    /**
-     * Encapsulation of the creation of a principal: we need to distinguish
-     * three cases, in order to support different modes of using a directory.
-     * The first is the use of a domain-name (requirement of MS Active Directory):
-     * if this property is set, this is used to construct the principal.
-     * The second case is where a user-id is somewhere in a domain, but not in a
-     * specific branch: in this case, a subtree search is performed to retrieve
-     * the complete path.
-     * The third case is where a specific branch of the directory is to be used;
-     * this is the case where usr-branch is set to a value. In this case, this branch
-     * is used to construct the principal.
-     * @return The principal
-     * @throws IOException
-     * @throws NamingException
-     */
-    private String getPrincipal() throws IOException, NamingException {
-
-        String principal;
-
-        // 1. Check if domain-name is to be supported
-        String domainProp = defaultProperties.getProperty(DOMAIN_NAME_PROP);
-        if (domainProp != null && domainProp.trim().length() > 0) {
-            principal = domainProp + "\\" + getLdapId();
-        }
-        else {
-            if (isSubtreeSearch()) {
-                // 2. Principal is constructed from directory entry
-                SearchResult entry = getDirectoryEntry(getLdapId());
-                principal = entry.getName();
-                if (entry.isRelative())
-                    if (principal.length() > 0)
-                        principal = principal +","+ defaultProperties.getProperty(BASE_DN_PROP);
-            }
-	    else
-                // 3. Principal is constructed from properties
-                principal = constructPrincipal(getLdapId());
-        }
-
-        return principal;
-    }
-
-    /**
-     * Construct the principal for a user, by using the given userId along
-     * with the configured properties.
-     * @param userId The user id
-     * @return The principal
-     */
-    private String constructPrincipal(String userId) {
-        StringBuffer principal = new StringBuffer();
-        principal
-            .append(defaultProperties.getProperty(USR_ATTR_PROP, USR_ATTR_DEFAULT))
-            .append("=")
-            .append(userId)
-            .append(",");
-
-        String baseDn = defaultProperties.getProperty(BASE_DN_PROP);
-        if (baseDn != null && baseDn.length() > 0) {
-            // USR_BRANCH_PROP may be empty, so only append when not-empty
-            String usrBranch = defaultProperties.getProperty(USR_BRANCH_PROP);
-            if (usrBranch != null) {
-                if (usrBranch.trim().length() > 0)
-                    principal.append(usrBranch).append(",");
-            }
-            else
-                principal.append(USR_BRANCH_DEFAULT).append(",");
-		
-            principal.append(defaultProperties.getProperty(BASE_DN_PROP));
-        }
-        else {
-            // try for backwards compatibility of ldap properties
-            getLogger().warn("getPrincipal() read a deprecated format in ldap properties, please update");
-            principal.append(defaultProperties.getProperty(PARTIAL_USER_DN_PROP));
-        }
-
-        if (getLogger().isDebugEnabled())
-            getLogger().debug("getPrincipal() returning " + principal.toString());
-
-        return principal.toString();
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/ac/DocumentPolicyManagerWrapper.java b/src/java/org/apache/lenya/cms/ac/DocumentPolicyManagerWrapper.java
deleted file mode 100644
index a01a4b7..0000000
--- a/src/java/org/apache/lenya/cms/ac/DocumentPolicyManagerWrapper.java
+++ /dev/null
@@ -1,308 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.ac;
-
-import java.io.File;
-
-import org.apache.avalon.framework.activity.Disposable;
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.parameters.ParameterException;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.excalibur.source.SourceUtil;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.Accreditable;
-import org.apache.lenya.ac.AccreditableManager;
-import org.apache.lenya.ac.Policy;
-import org.apache.lenya.ac.PolicyManager;
-import org.apache.lenya.ac.impl.DefaultAccessController;
-import org.apache.lenya.ac.impl.DefaultPolicy;
-import org.apache.lenya.ac.impl.InheritingPolicyManager;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationFactory;
-
-/**
- * A PolicyManager which is capable of mapping all URLs of a document to the appropriate canonical
- * URL, e.g. <code>/foo/bar_de.print.html</code> is mapped to <code>/foo/bar</code>.
- */
-public class DocumentPolicyManagerWrapper extends AbstractLogEnabled implements
-        InheritingPolicyManager, Serviceable, Configurable, Disposable {
-
-    /**
-     * Ctor.
-     */
-    public DocumentPolicyManagerWrapper() {
-        // do nothing
-    }
-
-    private InheritingPolicyManager policyManager;
-    private ServiceSelector policyManagerSelector;
-
-    /**
-     * Returns the URI which is used to obtain the policy for a webapp URL.
-     * @param webappUrl The webapp URL.
-     * @return A string.
-     * @throws AccessControlException when something went wrong.
-     */
-    protected String getPolicyURL(String webappUrl) throws AccessControlException {
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Resolving policy for webapp URL [" + webappUrl + "]");
-        }
-
-        Publication publication = getPublication(webappUrl);
-        String url = null;
-        try {
-            DocumentIdentityMap map = new DocumentIdentityMap(getServiceManager(), getLogger());
-            if (map.isDocument(webappUrl)) {
-                Document document = map.getFromURL(webappUrl);
-                if (document.existsInAnyLanguage()) {
-                    url = "/" + document.getArea() + document.getId();
-                    if (getLogger().isDebugEnabled()) {
-                        getLogger().debug("    Document exists");
-                        getLogger().debug("    Document ID: [" + document.getId() + "]");
-                    }
-                }
-            }
-        } catch (Exception e) {
-            throw new AccessControlException(e);
-        }
-
-        if (url == null) {
-            if (getLogger().isDebugEnabled()) {
-                getLogger().debug("    Document does not exist.");
-            }
-            url = webappUrl.substring(("/" + publication.getId()).length());
-        }
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("    Using URL: [" + url + "]");
-        }
-        return url;
-    }
-
-    /**
-     * Returns the publication for a certain URL.
-     * @param url The webapp url.
-     * @return A publication.
-     * @throws AccessControlException when the publication could not be created.
-     */
-    protected Publication getPublication(String url) throws AccessControlException {
-        getLogger().debug("Building publication");
-
-        Publication publication;
-        Source source = null;
-        SourceResolver resolver = null;
-
-        try {
-            resolver = (SourceResolver) this.serviceManager.lookup(SourceResolver.ROLE);
-            source = resolver.resolveURI("context:///");
-            File servletContext = SourceUtil.getFile(source);
-            getLogger().debug("    Webapp URL:      [" + url + "]");
-            getLogger().debug("    Serlvet context: [" + servletContext.getAbsolutePath() + "]");
-            PublicationFactory factory = PublicationFactory.getInstance(getLogger());
-            publication = factory.getPublication(url, servletContext);
-        } catch (Exception e) {
-            throw new AccessControlException(e);
-        } finally {
-            if (resolver != null) {
-                if (source != null) {
-                    resolver.release(source);
-                }
-                this.serviceManager.release(resolver);
-            }
-        }
-        return publication;
-    }
-
-    private ServiceManager serviceManager;
-
-    /**
-     * Returns the service manager.
-     * @return A service manager.
-     */
-    protected ServiceManager getServiceManager() {
-        return this.serviceManager;
-    }
-
-    /**
-     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service(ServiceManager manager) throws ServiceException {
-        this.serviceManager = manager;
-    }
-
-    /**
-     * @return Returns the policyManager.
-     */
-    public InheritingPolicyManager getPolicyManager() {
-        return this.policyManager;
-    }
-
-    /**
-     * @param _policyManager The policyManager to set.
-     */
-    public void setPolicyManager(InheritingPolicyManager _policyManager) {
-        this.policyManager = _policyManager;
-    }
-
-    /**
-     * @see org.apache.lenya.ac.impl.InheritingPolicyManager#buildURLPolicy(org.apache.lenya.ac.AccreditableManager,
-     *      java.lang.String)
-     */
-    public DefaultPolicy buildURLPolicy(AccreditableManager controller, String url)
-            throws AccessControlException {
-        return getPolicyManager().buildURLPolicy(controller, getPolicyURL(url));
-    }
-
-    /**
-     * @see org.apache.lenya.ac.impl.InheritingPolicyManager#buildSubtreePolicy(org.apache.lenya.ac.AccreditableManager,
-     *      java.lang.String)
-     */
-    public DefaultPolicy buildSubtreePolicy(AccreditableManager controller, String url)
-            throws AccessControlException {
-        return getPolicyManager().buildSubtreePolicy(controller, getPolicyURL(url));
-    }
-
-    /**
-     * @see org.apache.lenya.ac.impl.InheritingPolicyManager#getPolicies(org.apache.lenya.ac.AccreditableManager,
-     *      java.lang.String)
-     */
-    public DefaultPolicy[] getPolicies(AccreditableManager controller, String url)
-            throws AccessControlException {
-        return getPolicyManager().getPolicies(controller, getPolicyURL(url));
-    }
-
-    /**
-     * @see org.apache.lenya.ac.impl.InheritingPolicyManager#saveURLPolicy(java.lang.String,
-     *      org.apache.lenya.ac.impl.DefaultPolicy)
-     */
-    public void saveURLPolicy(String url, DefaultPolicy policy) throws AccessControlException {
-        getPolicyManager().saveURLPolicy(getPolicyURL(url), policy);
-
-    }
-
-    /**
-     * @see org.apache.lenya.ac.impl.InheritingPolicyManager#saveSubtreePolicy(java.lang.String,
-     *      org.apache.lenya.ac.impl.DefaultPolicy)
-     */
-    public void saveSubtreePolicy(String url, DefaultPolicy policy) throws AccessControlException {
-        getPolicyManager().saveSubtreePolicy(getPolicyURL(url), policy);
-    }
-
-    /**
-     * @see org.apache.lenya.ac.PolicyManager#getPolicy(org.apache.lenya.ac.AccreditableManager,
-     *      java.lang.String)
-     */
-    public Policy getPolicy(AccreditableManager controller, String url)
-            throws AccessControlException {
-        return getPolicyManager().getPolicy(controller, getPolicyURL(url));
-    }
-
-    /**
-     * @see org.apache.lenya.ac.PolicyManager#accreditableRemoved(org.apache.lenya.ac.AccreditableManager,
-     *      org.apache.lenya.ac.Accreditable)
-     */
-    public void accreditableRemoved(AccreditableManager manager, Accreditable accreditable)
-            throws AccessControlException {
-        getPolicyManager().accreditableRemoved(manager, accreditable);
-
-    }
-
-    String ELEMENT_POLICY_MANAGER = "policy-manager";
-    String ATTRIBUTE_TYPE = "type";
-
-    /**
-     * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
-     */
-    public void configure(Configuration configuration) throws ConfigurationException {
-        Configuration policyManagerConfiguration = configuration
-                .getChild(this.ELEMENT_POLICY_MANAGER, false);
-        if (policyManagerConfiguration != null) {
-            String type = null;
-            try {
-                type = policyManagerConfiguration.getAttribute(this.ATTRIBUTE_TYPE);
-
-                this.policyManagerSelector = (ServiceSelector) getServiceManager()
-                        .lookup(PolicyManager.ROLE + "Selector");
-
-                PolicyManager _policyManager = (PolicyManager) this.policyManagerSelector
-                        .select(type);
-
-                if (!(_policyManager instanceof InheritingPolicyManager)) {
-                    throw new AccessControlException("The " + getClass().getName()
-                            + " can only be used with an "
-                            + InheritingPolicyManager.class.getName() + ".");
-                }
-
-                DefaultAccessController.configureOrParameterize(_policyManager,
-                        policyManagerConfiguration);
-                setPolicyManager((InheritingPolicyManager) _policyManager);
-            } catch (final ConfigurationException e1) {
-                throw new ConfigurationException("Obtaining policy manager for type [" + type
-                        + "] failed: ", e1);
-            } catch (final ServiceException e1) {
-                throw new ConfigurationException("Obtaining policy manager for type [" + type
-                        + "] failed: ", e1);
-            } catch (final ParameterException e1) {
-                throw new ConfigurationException("Obtaining policy manager for type [" + type
-                        + "] failed: ", e1);
-            } catch (final AccessControlException e1) {
-                throw new ConfigurationException("Obtaining policy manager for type [" + type
-                        + "] failed: ", e1);
-            }
-        }
-    }
-
-    /**
-     * @see org.apache.avalon.framework.activity.Disposable#dispose()
-     */
-    public void dispose() {
-        if (this.policyManagerSelector != null) {
-            if (getPolicyManager() != null) {
-                this.policyManagerSelector.release(getPolicyManager());
-            }
-            getServiceManager().release(this.policyManagerSelector);
-        }
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Disposing [" + this + "]");
-        }
-
-    }
-
-    /**
-     * @see org.apache.lenya.ac.PolicyManager#accreditableAdded(org.apache.lenya.ac.AccreditableManager,
-     *      org.apache.lenya.ac.Accreditable)
-     */
-    public void accreditableAdded(AccreditableManager manager, Accreditable accreditable)
-            throws AccessControlException {
-        getPolicyManager().accreditableAdded(manager, accreditable);
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/ac/PublicationAccessControllerResolver.java b/src/java/org/apache/lenya/cms/ac/PublicationAccessControllerResolver.java
deleted file mode 100644
index 125950a..0000000
--- a/src/java/org/apache/lenya/cms/ac/PublicationAccessControllerResolver.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.ac;
-
-import java.io.File;
-
-import org.apache.avalon.framework.activity.Initializable;
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.excalibur.source.SourceUtil;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.AccessController;
-import org.apache.lenya.ac.impl.AbstractAccessControllerResolver;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationException;
-import org.apache.lenya.cms.publication.PublicationFactory;
-import org.apache.lenya.cms.publication.URLInformation;
-
-/**
- * Resolves the access controller according to the <code>ac.xconf</code> file
- * of a publication.
- */
-public class PublicationAccessControllerResolver extends AbstractAccessControllerResolver implements
-        Initializable {
-
-    protected static final String CONFIGURATION_FILE = "config/ac/ac.xconf".replace('/',
-            File.separatorChar);
-    protected static final String TYPE_ATTRIBUTE = "type";
-
-    /**
-     * This implementation uses the publication ID in combination with the
-     * context path as cache key.
-     * @see org.apache.lenya.ac.impl.AbstractAccessControllerResolver#generateCacheKey(java.lang.String,
-     *      org.apache.excalibur.source.SourceResolver)
-     */
-    protected Object generateCacheKey(String webappUrl, SourceResolver resolver)
-            throws AccessControlException {
-
-        URLInformation info = new URLInformation(webappUrl);
-
-        String publicationId = info.getPublicationId();
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Using first URL step (might be publication ID) as cache key: ["
-                    + publicationId + "]");
-        }
-
-        return super.generateCacheKey(publicationId, resolver);
-    }
-
-    /**
-     * @see org.apache.lenya.ac.impl.AbstractAccessControllerResolver#doResolveAccessController(java.lang.String)
-     */
-    public AccessController doResolveAccessController(String webappUrl)
-            throws AccessControlException {
-        getLogger().debug("Resolving controller for URL [" + webappUrl + "]");
-
-        AccessController controller = null;
-        Publication publication = getPublication(webappUrl);
-
-        if (publication != null) {
-            String publicationUrl = webappUrl.substring(("/" + publication.getId()).length());
-            controller = resolveAccessController(publication, publicationUrl);
-        }
-        return controller;
-    }
-
-    /**
-     * Returns the publication for the webapp URL or null if the URL is not
-     * included in a publication.
-     * @param webappUrl The webapp URL.
-     * @return A publication.
-     * @throws AccessControlException when something went wrong.
-     */
-    protected Publication getPublication(String webappUrl) throws AccessControlException {
-        Publication publication = null;
-
-        assert webappUrl.startsWith("/");
-        // remove leading slash
-        String url = webappUrl.substring(1);
-
-        if (url.length() > 0) {
-
-            URLInformation info = new URLInformation(webappUrl);
-            String publicationId = info.getPublicationId();
-
-            File contextDir = getContext();
-            PublicationFactory factory = PublicationFactory.getInstance(getLogger());
-            try {
-                publication = factory.getPublication(webappUrl, contextDir);
-            } catch (PublicationException e) {
-                throw new AccessControlException(e);
-            }
-            if (publication.exists()) {
-                getLogger().debug("Publication [" + publicationId + "] exists.");
-            } else {
-                getLogger().debug("Publication [" + publicationId + "] does not exist.");
-                publication = null;
-            }
-        }
-        return publication;
-    }
-
-    /**
-     * Returns the servlet context.
-     * @return A file.
-     */
-    protected File getContext() {
-        return this.context;
-    }
-
-    private File context;
-
-    /**
-     * Resolves an access controller for a certain URL within a publication.
-     * @param publication The publication.
-     * @param url The url within the publication.
-     * @return An access controller.
-     * @throws AccessControlException when something went wrong.
-     */
-    public AccessController resolveAccessController(Publication publication, String url)
-            throws AccessControlException {
-
-        assert publication != null;
-
-        AccessController accessController = null;
-        File configurationFile = new File(publication.getDirectory(), CONFIGURATION_FILE);
-
-        if (configurationFile.isFile()) {
-            try {
-                Configuration configuration = new DefaultConfigurationBuilder()
-                        .buildFromFile(configurationFile);
-                String type = configuration.getAttribute(TYPE_ATTRIBUTE);
-
-                accessController = (AccessController) getManager().lookup(AccessController.ROLE
-                        + "/" + type);
-
-                if (accessController instanceof Configurable) {
-                    ((Configurable) accessController).configure(configuration);
-                }
-
-            } catch (Exception e) {
-                throw new AccessControlException(e);
-            }
-        }
-
-        return accessController;
-    }
-
-    /**
-     * @see org.apache.avalon.framework.activity.Initializable#initialize()
-     */
-    public void initialize() throws Exception {
-        SourceResolver resolver = null;
-        Source contextSource = null;
-        File contextDir;
-        try {
-            resolver = (SourceResolver) getManager().lookup(SourceResolver.ROLE);
-            contextSource = resolver.resolveURI("context:///");
-            contextDir = SourceUtil.getFile(contextSource);
-
-            if (contextDir == null || !contextDir.isDirectory()) {
-                throw new AccessControlException("The servlet context is not a directory!");
-            }
-
-        } finally {
-            if (resolver != null) {
-                if (contextSource != null) {
-                    resolver.release(contextSource);
-                }
-                getManager().release(resolver);
-            }
-        }
-        this.context = contextDir;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/ac/SitemapPolicyManager.java b/src/java/org/apache/lenya/cms/ac/SitemapPolicyManager.java
deleted file mode 100644
index 902fa9b..0000000
--- a/src/java/org/apache/lenya/cms/ac/SitemapPolicyManager.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.ac;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceNotFoundException;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.Accreditable;
-import org.apache.lenya.ac.AccreditableManager;
-import org.apache.lenya.ac.Policy;
-import org.apache.lenya.ac.PolicyManager;
-import org.apache.lenya.ac.impl.PolicyBuilder;
-import org.apache.lenya.xml.DocumentHelper;
-import org.w3c.dom.Document;
-import org.xml.sax.SAXException;
-
-/**
- * Policy manager based on Cocoon sitemaps.
- * @version $Id$
- */
-public class SitemapPolicyManager extends AbstractLogEnabled implements PolicyManager, Serviceable {
-
-    /**
-     * @see org.apache.lenya.ac.PolicyManager#getPolicy(org.apache.lenya.ac.AccreditableManager,
-     *      java.lang.String)
-     */
-    public Policy getPolicy(AccreditableManager accreditableManager, String url)
-            throws AccessControlException {
-
-        url = url.substring(1);
-
-        int slashIndex = url.indexOf("/");
-        if (slashIndex == -1) {
-            slashIndex = url.length();
-        }
-
-        String publicationId = url.substring(0, slashIndex);
-        url = url.substring(publicationId.length());
-
-        SourceResolver resolver = null;
-        Policy policy = null;
-        Source source = null;
-        try {
-            resolver = (SourceResolver) getManager().lookup(SourceResolver.ROLE);
-
-            String policyUrl = publicationId + "/policies" + url + ".acml";
-            getLogger().debug("Policy URL: " + policyUrl);
-            source = resolver.resolveURI("cocoon://" + policyUrl);
-            Document document = DocumentHelper.readDocument(source.getInputStream());
-            policy = new PolicyBuilder(accreditableManager).buildPolicy(document);
-        } catch (SourceNotFoundException e) {
-            throw new AccessControlException(e);
-        } catch (ServiceException e) {
-            throw new AccessControlException(e);
-        } catch (MalformedURLException e) {
-            throw new AccessControlException(e);
-        } catch (IOException e) {
-            throw new AccessControlException(e);
-        } catch (ParserConfigurationException e) {
-            throw new AccessControlException(e);
-        } catch (SAXException e) {
-            throw new AccessControlException(e);
-        } catch (AccessControlException e) {
-            throw new AccessControlException(e);
-        } finally {
-            if (resolver != null) {
-                if (source != null) {
-                    resolver.release(source);
-                }
-                getManager().release(resolver);
-            }
-        }
-
-        return policy;
-    }
-
-    private ServiceManager manager;
-
-    /**
-     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service(ServiceManager _manager) throws ServiceException {
-        this.manager = _manager;
-    }
-
-    /**
-     * Returns the service manager.
-     * @return A service manager.
-     */
-    public ServiceManager getManager() {
-        return this.manager;
-    }
-
-    /**
-     * @see org.apache.lenya.ac.PolicyManager#accreditableRemoved(org.apache.lenya.ac.AccreditableManager,
-     *      org.apache.lenya.ac.Accreditable)
-     */
-    public void accreditableRemoved(AccreditableManager _manager, Accreditable accreditable)
-            throws AccessControlException {
-	    // do nothing
-    }
-
-    /**
-     * @see org.apache.lenya.ac.PolicyManager#accreditableAdded(org.apache.lenya.ac.AccreditableManager,
-     *      org.apache.lenya.ac.Accreditable)
-     */
-    public void accreditableAdded(AccreditableManager _manager, Accreditable accreditable)
-            throws AccessControlException {
-	    // do nothing
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/ac/usecase/UsecaseAuthorizer.java b/src/java/org/apache/lenya/cms/ac/usecase/UsecaseAuthorizer.java
deleted file mode 100644
index 4ead4a6..0000000
--- a/src/java/org/apache/lenya/cms/ac/usecase/UsecaseAuthorizer.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.ac.usecase;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.avalon.framework.activity.Disposable;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.parameters.ParameterException;
-import org.apache.avalon.framework.parameters.Parameterizable;
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.cocoon.environment.Request;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.Authorizer;
-import org.apache.lenya.ac.Role;
-import org.apache.lenya.ac.cache.CachingException;
-import org.apache.lenya.ac.cache.SourceCache;
-import org.apache.lenya.ac.impl.PolicyAuthorizer;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationException;
-import org.apache.lenya.cms.publication.PublicationFactory;
-
-/**
- * Authorizer for usecases.
- * @version $Id$
- */
-public class UsecaseAuthorizer
-    extends AbstractLogEnabled
-    implements Authorizer, Serviceable, Disposable, Parameterizable {
-
-    protected static final String TYPE = "usecase";
-    protected static final String USECASE_PARAMETER = "lenya.usecase";
-
-    private SourceCache cache;
-    private String configurationUri;
-
-    /**
-	 * Returns the configuration source cache.
-	 * @return A source cache.
-	 */
-    public SourceCache getCache() {
-        return this.cache;
-    }
-
-    /**
-	 * Returns the source URI of the usecase role configuration file for a certain publication.
-	 * 
-	 * @param publication The publication.
-	 * @return A string representing a URI.
-	 */
-    protected String getConfigurationURI(Publication publication) {
-        return "context:///"
-            + Publication.PUBLICATION_PREFIX_URI
-            + "/"
-            + publication.getId()
-            + CONFIGURATION_FILE;
-    }
-
-    /**
-     * @see org.apache.lenya.ac.Authorizer#authorize(org.apache.cocoon.environment.Request)
-     */
-    public boolean authorize(Request request) throws AccessControlException {
-
-        String usecase = request.getParameter(USECASE_PARAMETER);
-        boolean authorized = true;
-
-        SourceResolver resolver = null;
-
-        try {
-            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-            if (usecase != null) {
-
-                String _configurationUri;
-                if (getConfigurationURI() != null) {
-                    _configurationUri = getConfigurationURI();
-                } else {
-                    PublicationFactory factory = PublicationFactory.getInstance(getLogger());
-                    Publication publication = factory.getPublication(resolver, request);
-                    _configurationUri = getConfigurationURI(publication);
-                }
-
-                Role[] roles = PolicyAuthorizer.getRoles(request);
-                authorized = authorizeUsecase(usecase, roles, _configurationUri);
-            } else {
-                getLogger().debug("No usecase to authorize. Granting access.");
-            }
-        } catch (final ServiceException e) {
-            throw new AccessControlException(e);
-        } catch (final PublicationException e) {
-            throw new AccessControlException(e);
-        } catch (final AccessControlException e) {
-            throw new AccessControlException(e);
-        } finally {
-            if (resolver != null) {
-                this.manager.release(resolver);
-            }
-        }
-
-        return authorized;
-    }
-
-    /**
-	 * Authorizes a usecase.
-	 * 
-	 * @param usecase The usecase ID.
-	 * @param roles The roles of the current identity.
-	 * @param _configurationUri The URI to retrieve the policy configuration from.
-	 * @return A boolean value.
-	 * @throws AccessControlException when something went wrong.
-	 */
-    public boolean authorizeUsecase(String usecase, Role[] roles, String _configurationUri)
-        throws AccessControlException {
-        getLogger().debug("Authorizing usecase [" + usecase + "]");
-        boolean authorized = true;
-
-        UsecaseRolesBuilder builder = new UsecaseRolesBuilder();
-        UsecaseRoles usecaseRoles;
-        try {
-            usecaseRoles = (UsecaseRoles) getCache().get(_configurationUri, builder);
-        } catch (CachingException e) {
-            throw new AccessControlException(e);
-        }
-        
-        if (usecaseRoles == null) {
-            throw new AccessControlException("Usecase policies configuration not found at [" + _configurationUri + "]");
-        }
-        
-        if (usecaseRoles.hasRoles(usecase)) {
-
-            getLogger().debug("Roles for usecase found.");
-
-            List usecaseRoleIds = Arrays.asList(usecaseRoles.getRoles(usecase));
-
-            int i = 0;
-            authorized = false;
-            while (!authorized && i < roles.length) {
-                authorized = usecaseRoleIds.contains(roles[i].getId());
-                getLogger().debug(
-                    "Authorization for role [" + roles[i].getId() + "] is [" + authorized + "]");
-                i++;
-            }
-        } else {
-            getLogger().debug("No roles for usecase found. Granting access.");
-        }
-        return authorized;
-    }
-
-    private ServiceManager manager;
-
-    /**
-	 * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-	 */
-    public void service(ServiceManager _manager) throws ServiceException {
-        getLogger().debug("Servicing [" + getClass().getName() + "]");
-        this.manager = _manager;
-        this.cache = (SourceCache) _manager.lookup(SourceCache.ROLE);
-    }
-
-    /**
-	 * @see org.apache.avalon.framework.activity.Disposable#dispose()
-	 */
-    public void dispose() {
-        if (getCache() != null) {
-            this.manager.release(getCache());
-        }
-    }
-
-    protected static final String CONFIGURATION_FILE = "/config/ac/usecase-policies.xml";
-    protected static final String PARAMETER_CONFIGURATION = "configuration";
-
-    /**
-	 * @see org.apache.avalon.framework.parameters.Parameterizable#parameterize(org.apache.avalon.framework.parameters.Parameters)
-	 */
-    public void parameterize(Parameters parameters) throws ParameterException {
-        if (parameters.isParameter(PARAMETER_CONFIGURATION)) {
-            this.configurationUri = parameters.getParameter(PARAMETER_CONFIGURATION);
-        }
-    }
-
-    /**
-	 * Returns the configuration URL.
-	 * @return The configuration URL.
-	 */
-    public String getConfigurationURI() {
-        return this.configurationUri;
-    }
-
-    /**
-	 * Authorizes a usecase.
-	 * 
-	 * @param usecase The usecase to authorize.
-	 * @param roles The roles of the identity.
-	 * @param publication The publication.
-     * @return A boolean value.
-     * @throws AccessControlException when something went wrong.
-	 */
-    public boolean authorizeUsecase(String usecase, Role[] roles, Publication publication)
-        throws AccessControlException {
-        return authorizeUsecase(usecase, roles, getConfigurationURI(publication));
-    }
-
-    /**
-     * FIXME: Should this be exposed publically now that this method signature has been removed
-     * from Authorizer?
-     */
-    public boolean authorize(Request request, String webappUrl) throws AccessControlException {
-        return authorize(request);
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/ac/usecase/UsecaseRoles.java b/src/java/org/apache/lenya/cms/ac/usecase/UsecaseRoles.java
deleted file mode 100644
index d366b21..0000000
--- a/src/java/org/apache/lenya/cms/ac/usecase/UsecaseRoles.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.ac.usecase;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Class to manage roles for a usecase.
- *
- * @version $Id$
- */
-public class UsecaseRoles {
-    
-    private Map usecaseToRoles = new HashMap();
-    
-    /**
-     * Ctor.
-     */
-    public UsecaseRoles() {
-	    // do nothing
-    }
-    
-    /**
-     * Sets the roles for a usecase.
-     * @param usecaseId The usecase ID.
-     * @param roleIds The role IDs.
-     */
-    public void setRoles(String usecaseId, String[] roleIds) {
-        this.usecaseToRoles.put(usecaseId, roleIds);
-    }
-    
-    /**
-     * Returns the roles for a usecase.
-     * If no roles are defined for this usecase, an array of size 0 is returned.
-     * @param usecaseId The usecase ID.
-     * @return A role array.
-     */
-    public String[] getRoles(String usecaseId) {
-        String[] usecaseRoles;
-        if (this.usecaseToRoles.containsKey(usecaseId)) {
-            usecaseRoles = (String[]) this.usecaseToRoles.get(usecaseId);
-        } else {
-            usecaseRoles = new String[0];
-        }
-        return usecaseRoles;
-    }
-    
-    /**
-     * Checks if a usecase has roles.
-     * @param usecaseId The usecase ID.
-     * @return A boolean value.
-     */
-    public boolean hasRoles(String usecaseId) {
-        return this.usecaseToRoles.containsKey(usecaseId);
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/ac/usecase/UsecaseRolesBuilder.java b/src/java/org/apache/lenya/cms/ac/usecase/UsecaseRolesBuilder.java
deleted file mode 100644
index 0b84cd3..0000000
--- a/src/java/org/apache/lenya/cms/ac/usecase/UsecaseRolesBuilder.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.ac.usecase;
-
-import java.io.InputStream;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.apache.lenya.ac.AccessController;
-import org.apache.lenya.ac.cache.BuildException;
-import org.apache.lenya.ac.cache.InputStreamBuilder;
-import org.apache.lenya.xml.DocumentHelper;
-import org.apache.lenya.xml.NamespaceHelper;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-/**
- * Builder for usecase roles.
- *
- * @version $Id$
- */
-public class UsecaseRolesBuilder implements InputStreamBuilder {
-
-    protected static final String USECASES_ELEMENT = "usecases";
-    protected static final String USECASE_ELEMENT = "usecase";
-    protected static final String ROLE_ELEMENT = "role";
-    protected static final String ID_ATTRIBUTE = "id";
-
-    /**
-     * @see org.apache.lenya.ac.cache.InputStreamBuilder#build(java.io.InputStream)
-     */
-    public Object build(InputStream stream) throws BuildException {
-
-        UsecaseRoles usecaseRoles = new UsecaseRoles();
-
-        Document document;
-        try {
-            document = DocumentHelper.readDocument(stream);
-        } catch (Exception e) {
-            throw new BuildException(e);
-        }
-        assert document.getDocumentElement().getLocalName().equals(USECASES_ELEMENT);
-
-        NamespaceHelper helper =
-            new NamespaceHelper(
-                AccessController.NAMESPACE,
-                AccessController.DEFAULT_PREFIX,
-                document);
-
-        Element[] usecaseElements =
-            helper.getChildren(document.getDocumentElement(), USECASE_ELEMENT);
-        for (int i = 0; i < usecaseElements.length; i++) {
-            String usecaseId = usecaseElements[i].getAttribute(ID_ATTRIBUTE);
-            Element[] roleElements = helper.getChildren(usecaseElements[i], ROLE_ELEMENT);
-            Set roleIds = new HashSet();
-            for (int j = 0; j < roleElements.length; j++) {
-                String roleId = roleElements[j].getAttribute(ID_ATTRIBUTE);
-                roleIds.add(roleId);
-            }
-            String[] roleIdArray = (String[]) roleIds.toArray(new String[roleIds.size()]);
-            usecaseRoles.setRoles(usecaseId, roleIdArray);
-        }
-        return usecaseRoles;
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/ac/usecases/AccessControl.java b/src/java/org/apache/lenya/cms/ac/usecases/AccessControl.java
deleted file mode 100644
index 86dff3d..0000000
--- a/src/java/org/apache/lenya/cms/ac/usecases/AccessControl.java
+++ /dev/null
@@ -1,417 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.ac.usecases;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.cocoon.ProcessingException;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.URLInformation;
-import org.apache.lenya.cms.usecase.UsecaseException;
-
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.Accreditable;
-import org.apache.lenya.ac.AccreditableManager;
-import org.apache.lenya.ac.Group;
-import org.apache.lenya.ac.IPRange;
-import org.apache.lenya.ac.Item;
-import org.apache.lenya.ac.Policy;
-import org.apache.lenya.ac.Role;
-import org.apache.lenya.ac.User;
-import org.apache.lenya.ac.impl.Credential;
-import org.apache.lenya.ac.impl.DefaultAccessController;
-import org.apache.lenya.ac.impl.DefaultPolicy;
-import org.apache.lenya.ac.impl.InheritingPolicyManager;
-
-/**
- * Usecase to display the AccessControl tab in the site area for a document. This is a mix-in class
- * that ideally would inherit both from AccessControlUsecase and DocumentUsecase. FIXME i just took
- * the appropriate code from DocumentUsecase, maybe its possible to have a saner inheritance?
- * 
- * @version $Id$
- */
-
-public class AccessControl extends AccessControlUsecase {
-
-    private Item[] items = null;
-
-    protected static final String ADD = "add";
-    protected static final String DELETE = "delete";
-
-    protected static final String USER = "user";
-    protected static final String GROUP = "group";
-    protected static final String IPRANGE = "ipRange";
-    protected static final String ROLE = "role";
-    private static String[] types = { USER, GROUP, IPRANGE };
-    private static String[] operations = { ADD, DELETE };
-
-    protected static final String SSL = "ssl";
-    protected static final String ANCESTOR_SSL = "ancestorSsl";
-    protected static final String DOCUMENT = "document";
-    protected static final String URL_CREDENTIALS = "urlCredentials";
-    protected static final String PARENT_CREDENTIALS = "parentCredentials";
-    private String COMPLETE_AREA = "private.completeArea";
-
-    /**
-     * Ctor.
-     */
-    public AccessControl() {
-        super();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#initParameters()
-     */
-    protected void initParameters() {
-        super.initParameters();
-
-        try {
-            URLInformation info = new URLInformation(getSourceURL());
-            setParameter(COMPLETE_AREA, info.getCompleteArea());
-
-            DocumentIdentityMap map = (DocumentIdentityMap) getUnitOfWork().getIdentityMap();
-            Document sourceDocument = map.getFromURL(getSourceURL());
-            setParameter(DOCUMENT, sourceDocument);
-
-            setParameter(SSL, Boolean.toString(isSSLProtected()));
-            setParameter(ANCESTOR_SSL, Boolean.toString(isAncestorSSLProtected()));
-
-            User[] users = getUserManager().getUsers();
-            String[] userIds = new String[users.length];
-            for (int i = 0; i < users.length; i++) {
-                userIds[i] = users[i].getId();
-            }
-            Arrays.sort(userIds);
-            setParameter("users", userIds);
-
-            Group[] groups = getGroupManager().getGroups();
-            String[] groupIds = new String[groups.length];
-            for (int i = 0; i < groups.length; i++) {
-                groupIds[i] = groups[i].getId();
-            }
-            Arrays.sort(groupIds);
-            setParameter("groups", groupIds);
-
-            IPRange[] ipRanges = getIpRangeManager().getIPRanges();
-            String[] ipRangeIds = new String[ipRanges.length];
-            for (int i = 0; i < ipRanges.length; i++) {
-                ipRangeIds[i] = ipRanges[i].getId();
-            }
-            Arrays.sort(ipRangeIds);
-            setParameter("ipRanges", ipRangeIds);
-
-            Role[] roles = getRoleManager().getRoles();
-            String visitorRole = "";
-            String[] roleIds = new String[roles.length];
-            for (int i = 0; i < roles.length; i++) {
-                roleIds[i] = roles[i].getId();
-                if (roles[i].getId().equals("visit")) {
-                    visitorRole = roles[i].getId();
-                }
-            }
-            Arrays.sort(roleIds);
-            setParameter("roles", roleIds);
-            setParameter("visitorRole", visitorRole);
-
-            setParameter(URL_CREDENTIALS, getURICredentials());
-            setParameter(PARENT_CREDENTIALS, getParentCredentials());
-
-        } catch (final Exception e) {
-            addErrorMessage("Could not read a value.");
-            getLogger().error("Could not read value for AccessControl usecase. ", e);
-        }
-
-    }
-
-    /**
-     * Validates the request parameters.
-     * @throws UsecaseException if an error occurs.
-     */
-    void validate() throws UsecaseException {
-        // do nothing
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckExecutionConditions()
-     */
-    protected void doCheckExecutionConditions() throws Exception {
-        validate();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    public void doExecute() throws Exception {
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#advance()
-     */
-    public void advance() throws UsecaseException {
-        super.advance();
-        try {
-            if (getParameterAsString("change_ssl") != null) {
-                String ssl = getParameterAsString("ssl");
-                if (ssl != null && ssl.equalsIgnoreCase(Boolean.toString(true))) {
-                    setSSLProtected(true);
-                } else {
-                    setSSLProtected(false);
-                }
-                deleteParameter("change_ssl");
-                deleteParameter("ssl");
-            }
-
-            for (int i = 0; i < types.length; i++) {
-                for (int j = 0; j < operations.length; j++) {
-                    String paramName = operations[j] + "Credential_" + types[i];
-                    if (getParameterAsString(paramName) != null) {
-                        String roleId = getParameterAsString(ROLE);
-
-                        String id = getParameterAsString(types[i]);
-                        Item item = null;
-                        if (types[i].equals(USER)) {
-                            item = getUserManager().getUser(id);
-                        } else if (types[i].equals(GROUP)) {
-                            item = getGroupManager().getGroup(id);
-                        } else if (types[i].equals(IPRANGE)) {
-                            item = getIpRangeManager().getIPRange(id);
-                        }
-                        if (item == null) {
-                            addErrorMessage("no_such_accreditable", new String[] { types[i], id });
-                        } else {
-                            Role role = getRoleManager().getRole(roleId);
-                            if (role == null) {
-                                addErrorMessage("role_no_such_role", new String[] { roleId });
-                            }
-                            manipulateCredential(item, role, operations[j]);
-                            setParameter(URL_CREDENTIALS, getURICredentials());
-                        }
-                        deleteParameter(paramName);
-                    }
-                }
-            }
-
-        } catch (Exception e) {
-            throw new UsecaseException(e);
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#setParameter(java.lang.String, java.lang.Object)
-     */
-    public void setParameter(String name, Object value) {
-        super.setParameter(name, value);
-    }
-
-    /**
-     * @return Item the item
-     */
-    public Item[] getItems() {
-        return this.items;
-    }
-
-    /**
-     * Returns if one of the ancestors of this URL is SSL protected.
-     * @return A boolean value.
-     * @throws ProcessingException when something went wrong.
-     */
-    protected boolean isAncestorSSLProtected() throws ProcessingException {
-        boolean ssl;
-        try {
-            String ancestorUrl = "";
-            int lastSlashIndex = getPolicyURL().lastIndexOf("/");
-            if (lastSlashIndex != -1) {
-                ancestorUrl = getPolicyURL().substring(0, lastSlashIndex);
-            }
-
-            Policy policy = getPolicyManager().getPolicy(getAccreditableManager(), ancestorUrl);
-            ssl = policy.isSSLProtected();
-        } catch (AccessControlException e) {
-            throw new ProcessingException("Resolving policy failed: ", e);
-        }
-        return ssl;
-    }
-
-    /**
-     * Returns if one of the ancestors of this URL is SSL protected.
-     * @return A boolean value.
-     * @throws ProcessingException when something went wrong.
-     */
-    protected boolean isSSLProtected() throws ProcessingException {
-        boolean ssl;
-        try {
-            Policy policy = getPolicyManager().getPolicy(getAccreditableManager(), getPolicyURL());
-            ssl = policy.isSSLProtected();
-        } catch (AccessControlException e) {
-            throw new ProcessingException("Resolving policy failed: ", e);
-        }
-        return ssl;
-    }
-
-    /**
-     * Sets if this URL is SSL protected.
-     * @param ssl A boolean value.
-     * @throws ProcessingException when something went wrong.
-     */
-    protected void setSSLProtected(boolean ssl) throws ProcessingException {
-        try {
-            DefaultPolicy policy = getPolicyManager().buildSubtreePolicy(getAccreditableManager(),
-                    getPolicyURL());
-            policy.setSSL(ssl);
-            getPolicyManager().saveSubtreePolicy(getPolicyURL(), policy);
-        } catch (AccessControlException e) {
-            throw new ProcessingException("Resolving policy failed: ", e);
-        }
-    }
-
-    protected InheritingPolicyManager getPolicyManager() {
-        return (InheritingPolicyManager) ((DefaultAccessController) getAccessController())
-                .getPolicyManager();
-    }
-
-    protected AccreditableManager getAccreditableManager() {
-        return ((DefaultAccessController) getAccessController()).getAccreditableManager();
-    }
-
-    /**
-     * Changes a credential by adding or deleting an item for a role.
-     * @param item The item to add or delete.
-     * @param role The role.
-     * @param operation The operation, either {@link #ADD}or {@link #DELETE}.
-     * @throws ProcessingException when something went wrong.
-     */
-    protected void manipulateCredential(Item item, Role role, String operation)
-            throws ProcessingException {
-
-        try {
-            DefaultPolicy policy = getPolicyManager().buildSubtreePolicy(getAccreditableManager(),
-                    getPolicyURL());
-            Accreditable accreditable = (Accreditable) item;
-
-            if (operation.equals(ADD)) {
-                policy.addRole(accreditable, role);
-            } else if (operation.equals(DELETE)) {
-                policy.removeRole(accreditable, role);
-            }
-
-            getPolicyManager().saveSubtreePolicy(getPolicyURL(), policy);
-
-        } catch (Exception e) {
-            throw new ProcessingException("Manipulating credential failed: ", e);
-        }
-    }
-
-    /**
-     * Returns the URI credential wrappers for the request of this object model.
-     * @return An array of CredentialWrappers.
-     * @throws ProcessingException when something went wrong.
-     */
-    public CredentialWrapper[] getURICredentials() throws ProcessingException {
-        return getCredentials(true);
-    }
-
-    /**
-     * Returns the credential wrappers for the parent URI of the URL belonging to the request of
-     * this object model.
-     * @return An array of CredentialWrappers.
-     * @throws ProcessingException when something went wrong.
-     */
-    public CredentialWrapper[] getParentCredentials() throws ProcessingException {
-        return getCredentials(false);
-    }
-
-    /**
-     * Returns the credentials of the policy of the selected URL.
-     * @param urlOnly If true, the URL policy credentials are returned. If false, the credentials of
-     *            all ancestor policies are returned.
-     * @return An array of CredentialWrappers.
-     * @throws ProcessingException when something went wrong.
-     */
-    public CredentialWrapper[] getCredentials(boolean urlOnly) throws ProcessingException {
-
-        List credentials = new ArrayList();
-
-        DefaultPolicy policies[] = getPolicies(urlOnly);
-        List policyCredentials = new ArrayList();
-        for (int i = 0; i < policies.length; i++) {
-            Credential[] creds = policies[i].getCredentials();
-            for (int j = 0; j < creds.length; j++) {
-                policyCredentials.add(creds[j]);
-            }
-        }
-        for (Iterator i = policyCredentials.iterator(); i.hasNext();) {
-            Credential credential = (Credential) i.next();
-            Accreditable accreditable = credential.getAccreditable();
-            Role[] roles = credential.getRoles();
-            for (int j = 0; j < roles.length; j++) {
-                credentials.add(new CredentialWrapper(accreditable, roles[j]));
-            }
-        }
-        return (CredentialWrapper[]) credentials.toArray(new CredentialWrapper[credentials.size()]);
-    }
-
-    /**
-     * Returns the policies for a certain URL.
-     * @param onlyUrl If true, only the URL policies are returned. Otherwise, all ancestor policies
-     *            are returned.
-     * @return An array of DefaultPolicy objects.
-     * @throws ProcessingException when something went wrong.
-     */
-    protected DefaultPolicy[] getPolicies(boolean onlyUrl) throws ProcessingException {
-
-        DefaultPolicy[] policies;
-
-        try {
-            if (onlyUrl) {
-                policies = new DefaultPolicy[1];
-                AccreditableManager policyManager = getAccreditableManager();
-                policies[0] = getPolicyManager().buildSubtreePolicy(policyManager, getPolicyURL());
-            } else {
-                String ancestorUrl = "";
-
-                String currentUrl = getPolicyURL();
-                if (currentUrl.endsWith("/")) {
-                    currentUrl = currentUrl.substring(0, currentUrl.length() - 1);
-                }
-
-                int lastSlashIndex = currentUrl.lastIndexOf("/");
-                if (lastSlashIndex != -1) {
-                    ancestorUrl = currentUrl.substring(0, lastSlashIndex);
-                }
-                policies = getPolicyManager().getPolicies(getAccreditableManager(), ancestorUrl);
-            }
-        } catch (AccessControlException e) {
-            throw new ProcessingException(e);
-        }
-
-        return policies;
-    }
-
-    protected String getPolicyURL() {
-        String infoUrl = getSourceURL();
-        URLInformation info = new URLInformation(infoUrl);
-
-        String area = getParameterAsString("acArea");
-        String url = "/" + info.getPublicationId() + "/" + area + info.getDocumentUrl();
-        return url;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/ac/usecases/AccessControlUsecase.java b/src/java/org/apache/lenya/cms/ac/usecases/AccessControlUsecase.java
deleted file mode 100644
index a3b0f95..0000000
--- a/src/java/org/apache/lenya/cms/ac/usecases/AccessControlUsecase.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.ac.usecases;
-
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.lenya.ac.AccessController;
-import org.apache.lenya.ac.AccessControllerResolver;
-import org.apache.lenya.ac.AccreditableManager;
-import org.apache.lenya.ac.GroupManager;
-import org.apache.lenya.ac.IPRangeManager;
-import org.apache.lenya.ac.RoleManager;
-import org.apache.lenya.ac.UserManager;
-import org.apache.lenya.ac.impl.DefaultAccessController;
-import org.apache.lenya.cms.usecase.AbstractUsecase;
-
-/**
- * Super class for access-control related usecases.
- * 
- * @version $Id$
- */
-public class AccessControlUsecase extends AbstractUsecase {
-
-    /**
-     * Ctor.
-     */
-    public AccessControlUsecase() {
-        super();
-    }
-    
-    private UserManager userManager;
-    private GroupManager groupManager;
-    private IPRangeManager ipRangeManager;
-    private RoleManager roleManager;
-    private AccessController accessController;
-
-    /**
-     * Initializes the accreditable managers.
-     * FIXME: This method resolves the AccessController, it has to be released after it is used!
-     */
-    protected void initializeAccessController() {
-        super.doInitialize();
-        
-        if (getLogger().isDebugEnabled())
-            getLogger().debug("initializeAccessController() called");
-
-        this.accessController = null;
-        ServiceSelector selector = null;
-        AccessControllerResolver resolver = null;
-        
-        try {
-            selector = (ServiceSelector) this.manager.lookup(AccessControllerResolver.ROLE + "Selector");
-            resolver =
-                (AccessControllerResolver) selector.select(
-                    AccessControllerResolver.DEFAULT_RESOLVER);
-
-            this.accessController = resolver.resolveAccessController(getSourceURL());
-
-            AccreditableManager accreditableManager =
-                ((DefaultAccessController) this.accessController).getAccreditableManager();
-
-            this.userManager = accreditableManager.getUserManager();
-            this.groupManager = accreditableManager.getGroupManager();
-            this.roleManager = accreditableManager.getRoleManager();
-            this.ipRangeManager = accreditableManager.getIPRangeManager();
-
-        } catch (Exception e) {
-            throw new RuntimeException("Initialization failed: ", e);
-        } finally {
-            if (selector != null) {
-                if (resolver != null) {
-                    selector.release(resolver);
-                }
-                this.manager.release(selector);
-            }
-        }
-
-    }
-    
-    
-    /**
-     * @return Returns the groupManager.
-     */
-    protected GroupManager getGroupManager() {
-        if (this.groupManager == null) {
-            initializeAccessController();
-        }
-        return this.groupManager;
-    }
-    
-    /**
-     * @return Returns the ipRangeManager.
-     */
-    protected IPRangeManager getIpRangeManager() {
-        if (this.ipRangeManager == null) {
-            initializeAccessController();
-        }
-        return this.ipRangeManager;
-    }
-    
-    /**
-     * @return Returns the roleManager.
-     */
-    protected RoleManager getRoleManager() {
-        if (this.roleManager == null) {
-            initializeAccessController();
-        }
-        return this.roleManager;
-    }
-    
-    /**
-     * @return Returns the userManager.
-     */
-    protected UserManager getUserManager() {
-        if (this.userManager == null) {
-            if (getLogger().isDebugEnabled())
-               getLogger().debug("getUserManager() accessed, is null, so calling initializeAccessController");
-            initializeAccessController();
-        }
-        return this.userManager;
-    }
-    
-    /**
-     * @return Returns the accessController.
-     */
-    protected AccessController getAccessController() {
-        if (this.accessController == null) {
-            initializeAccessController();
-        }
-        return this.accessController;
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/ac/usecases/AddGroup.java b/src/java/org/apache/lenya/cms/ac/usecases/AddGroup.java
deleted file mode 100644
index 90118aa..0000000
--- a/src/java/org/apache/lenya/cms/ac/usecases/AddGroup.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.ac.usecases;
-
-import java.io.File;
-
-import org.apache.lenya.ac.Group;
-import org.apache.lenya.ac.file.FileGroup;
-import org.apache.lenya.ac.file.FileGroupManager;
-import org.apache.lenya.ac.impl.AbstractItem;
-import org.apache.lenya.cms.usecase.UsecaseException;
-
-/**
- * Usecase to add a group.
- *
- * @version $Id$ 
- */
-public class AddGroup extends AccessControlUsecase {
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckExecutionConditions()
-     */
-    protected void doCheckExecutionConditions() throws Exception {
-        validate();
-    }
-
-    /**
-     * Validates the request parameters.
-     * @throws UsecaseException if an error occurs.
-     */
-    void validate() throws UsecaseException {
-
-        String groupId = getParameterAsString(GroupProfile.ID);
-
-        Group existingGroup = getGroupManager().getGroup(groupId);
-
-        if (existingGroup != null) {
-            addErrorMessage("This group already exists.");
-        }
-
-        if (!AbstractItem.isValidId(groupId)) {
-            addErrorMessage("This is not a valid group ID.");
-        }
-
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-
-        String id = getParameterAsString(GroupProfile.ID);
-        String name = getParameterAsString(GroupProfile.NAME);
-        String description = getParameterAsString(GroupProfile.DESCRIPTION);
-
-        File configDir = ((FileGroupManager) getGroupManager()).getConfigurationDirectory();
-        Group group = new FileGroup(configDir, id);
-        group.setName(name);
-        group.setDescription(description);
-        
-        group.save();
-        getGroupManager().add(group);
-        
-        setExitParameter(GroupProfile.ID, id);
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/ac/usecases/AddIPRange.java b/src/java/org/apache/lenya/cms/ac/usecases/AddIPRange.java
deleted file mode 100644
index df3ff24..0000000
--- a/src/java/org/apache/lenya/cms/ac/usecases/AddIPRange.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.ac.usecases;
-
-import java.io.File;
-import java.net.InetAddress;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.avalon.framework.container.ContainerUtil;
-import org.apache.lenya.ac.IPRange;
-import org.apache.lenya.ac.file.FileIPRange;
-import org.apache.lenya.ac.file.FileIPRangeManager;
-import org.apache.lenya.ac.impl.AbstractItem;
-import org.apache.lenya.cms.ac.usecases.IPRangeProfile.Part;
-
-/**
- * Usecase to add an IP range.
- */
-public class AddIPRange extends AccessControlUsecase {
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckExecutionConditions()
-     */
-    protected void doCheckExecutionConditions() throws Exception {
-        String id = getParameterAsString(IPRangeProfile.ID);
-
-        IPRange existingIPRange = getIpRangeManager().getIPRange(id);
-
-        if (existingIPRange != null) {
-            addErrorMessage("This IP range already exists.");
-        }
-
-        if (!AbstractItem.isValidId(id)) {
-            addErrorMessage("This is not a valid IP range ID.");
-        }
-
-        IPRangeProfile.validateAddresses(this);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        File configDir = ((FileIPRangeManager) getIpRangeManager()).getConfigurationDirectory();
-
-        String id = getParameterAsString(IPRangeProfile.ID);
-        String name = getParameterAsString(IPRangeProfile.NAME);
-        String description = getParameterAsString(IPRangeProfile.DESCRIPTION);
-
-        IPRange ipRange = new FileIPRange(configDir, id);
-        ContainerUtil.enableLogging(ipRange, getLogger());
-
-        ipRange.setName(name);
-        ipRange.setDescription(description);
-
-        String networkString = "";
-        String subnetString = "";
-
-        for (int i = 0; i < 4; i++) {
-            if (i > 0) {
-                networkString += ".";
-                subnetString += ".";
-            }
-            Part netPart = (Part) getParameter(IPRangeProfile.NETWORK_ADDRESS + "-" + i);
-            networkString += netPart.getValue();
-            Part subPart = (Part) getParameter(IPRangeProfile.SUBNET_MASK + "-" + i);
-            subnetString += subPart.getValue();
-        }
-
-        InetAddress networkAddress = InetAddress.getByName(networkString);
-        ipRange.setNetworkAddress(networkAddress.getAddress());
-
-        InetAddress subnetMask = InetAddress.getByName(subnetString);
-        ipRange.setSubnetMask(subnetMask.getAddress());
-
-        ipRange.save();
-        getIpRangeManager().add(ipRange);
-        
-        setExitParameter(IPRangeProfile.ID, id);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#initParameters()
-     */
-    protected void initParameters() {
-        super.initParameters();
-        List partNumbers = new ArrayList();
-        for (byte i = 0; i < 4; i++) {
-            setParameter(IPRangeProfile.NETWORK_ADDRESS + "-" + i, new Part(i));
-            setParameter(IPRangeProfile.SUBNET_MASK + "-" + i, new Part(i));
-            partNumbers.add(new Integer(i));
-        }
-        setParameter(IPRangeProfile.PART_NUMBERS, partNumbers);
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/ac/usecases/AddUser.java b/src/java/org/apache/lenya/cms/ac/usecases/AddUser.java
deleted file mode 100644
index 49ee558..0000000
--- a/src/java/org/apache/lenya/cms/ac/usecases/AddUser.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.ac.usecases;
-
-import java.io.File;
-
-import org.apache.avalon.framework.container.ContainerUtil;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.User;
-import org.apache.lenya.ac.file.FileUser;
-import org.apache.lenya.ac.file.FileUserManager;
-import org.apache.lenya.ac.impl.AbstractItem;
-import org.apache.lenya.ac.ldap.LDAPUser;
-import org.apache.lenya.cms.usecase.UsecaseException;
-
-/**
- * Usecase to add a user.
- * 
- * @version $Id$
- */
-public class AddUser extends AccessControlUsecase {
-
-    protected static final String CLASS_NAME = "className";
-    protected static final String LDAP_ID = "ldapId";
-
-    /**
-     * Validates the request parameters.
-     * @throws UsecaseException if an error occurs.
-     */
-    void validate() throws UsecaseException {
-
-        String userId = getParameterAsString(UserProfile.USER_ID);
-        String email = getParameterAsString(UserProfile.EMAIL);
-        String className = getParameterAsString(CLASS_NAME);
-        String ldapId = getParameterAsString(LDAP_ID);
-
-        User existingUser = getUserManager().getUser(userId);
-
-        if (existingUser != null) {
-            addErrorMessage("This user already exists.");
-        }
-
-        if (!AbstractItem.isValidId(userId)) {
-            addErrorMessage("This is not a valid user ID.");
-        }
-
-        if (email.length() == 0) {
-            addErrorMessage("Please enter an e-mail address.");
-        }
-
-        if (className.equals(LDAPUser.class.getName())) {
-            LDAPUser ldapUser = new LDAPUser(((FileUserManager) getUserManager())
-                    .getConfigurationDirectory());
-            ContainerUtil.enableLogging(ldapUser, getLogger());
-
-            try {
-                if (!ldapUser.existsUser(ldapId)) {
-                    addErrorMessage("ldap_no_such_user", new String[]{ldapId});
-                }
-            } catch (AccessControlException e) {
-                throw new UsecaseException(e);
-            }
-        }
-
-        else {
-            UserPassword.checkNewPassword(this);
-        }
-
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckExecutionConditions()
-     */
-    protected void doCheckExecutionConditions() throws Exception {
-        if (getLogger().isDebugEnabled())
-            getLogger().debug("AddUser.doCheckExecutionConditions() called");
-
-        validate();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        File configDir = ((FileUserManager) getUserManager()).getConfigurationDirectory();
-
-        String userId = getParameterAsString(UserProfile.USER_ID);
-        String fullName = getParameterAsString(UserProfile.FULL_NAME);
-        String description = getParameterAsString(UserProfile.DESCRIPTION);
-        String email = getParameterAsString(UserProfile.EMAIL);
-        String className = getParameterAsString(CLASS_NAME);
-
-        User user;
-        if (className.equals(LDAPUser.class.getName())) {
-            String ldapId = getParameterAsString(LDAP_ID);
-            user = new LDAPUser(configDir, userId, email, ldapId, getLogger());
-        } else {
-            String password = getParameterAsString(UserPassword.NEW_PASSWORD);
-            user = new FileUser(configDir, userId, fullName, email, "");
-            user.setName(fullName);
-            user.setPassword(password);
-        }
-        ContainerUtil.enableLogging(user, getLogger());
-        user.setDescription(description);
-        user.save();
-        getUserManager().add(user);
-        
-        setExitParameter(UserProfile.USER_ID, userId);
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/ac/usecases/CredentialWrapper.java b/src/java/org/apache/lenya/cms/ac/usecases/CredentialWrapper.java
deleted file mode 100644
index 39115d1..0000000
--- a/src/java/org/apache/lenya/cms/ac/usecases/CredentialWrapper.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.ac.usecases;
-
-import org.apache.lenya.ac.Accreditable;
-import org.apache.lenya.ac.Group;
-import org.apache.lenya.ac.IPRange;
-import org.apache.lenya.ac.Item;
-import org.apache.lenya.ac.Role;
-import org.apache.lenya.ac.User;
-
-/**
- * Wrapper class for credentials.
- * @version $Id$
- */
-public class CredentialWrapper {
-
-    /**
-     * Returns the accreditable ID.
-     * @return A string.
-     */
-    public String getAccreditableId() {
-        return this.accreditableId;
-    }
-
-    /**
-     * Returns the accreditable name.
-     * @return A string.
-     */
-    public String getAccreditableName() {
-        return this.accreditableName;
-    }
-
-    /**
-     * Returns the role ID.
-     * @return A string.
-     */
-    public String getRoleId() {
-        return this.roleId;
-    }
-
-    /**
-     * Returns the role name.
-     * @return A string.
-     */
-    public String getRoleName() {
-        return this.roleName;
-    }
-
-    /**
-     * Returns the accreditable type ({@link #USER}, {@link #GROUP}, or {@link #IPRANGE})
-     * @return A string.
-     */
-    public String getType() {
-        return this.type;
-    }
-
-    /**
-     * Ctor.
-     * @param accreditable The accreditable of the credential to wrap.
-     * @param role The role of the credential to wrap.
-     */
-    public CredentialWrapper(Accreditable accreditable, Role role) {
-        if (accreditable instanceof Item) {
-            Item item = (Item) accreditable;
-            this.accreditableId = item.getId();
-            this.accreditableName = item.getName();
-        
-            if (item instanceof User) {
-                this.type = USER;
-            }
-            else if (item instanceof Group) {
-                this.type = GROUP;
-            }
-            else if (item instanceof IPRange) {
-                this.type = IPRANGE;
-            }
-        }
-        else {
-            this.accreditableId = "world";
-            this.accreditableName = "the world";
-            this.type = "world";
-        }
-        this.roleId = role.getId();
-        this.roleName = role.getName();
-        
-    }
-    
-    protected static final String USER = "user";
-    protected static final String GROUP = "group";
-    protected static final String IPRANGE = "iprange";
-    
-    private String type;
-    private String accreditableId;
-    private String accreditableName;
-    private String roleId;
-    private String roleName;
-
-}
diff --git a/src/java/org/apache/lenya/cms/ac/usecases/DeleteGroup.java b/src/java/org/apache/lenya/cms/ac/usecases/DeleteGroup.java
deleted file mode 100644
index c0d7100..0000000
--- a/src/java/org/apache/lenya/cms/ac/usecases/DeleteGroup.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.ac.usecases;
-
-import org.apache.lenya.ac.Group;
-
-/**
- * Usecase to delete a group.
- *
- * @version $Id$
- */
-public class DeleteGroup extends AccessControlUsecase {
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-
-        String groupId = getParameterAsString(GroupProfile.ID);
-        Group group = getGroupManager().getGroup(groupId);
-        if (group == null) {
-            throw new RuntimeException("Group [" + groupId + "] not found.");
-        }
-        
-        getGroupManager().remove(group);
-        group.delete();
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/ac/usecases/DeleteIPRange.java b/src/java/org/apache/lenya/cms/ac/usecases/DeleteIPRange.java
deleted file mode 100644
index ddf2313..0000000
--- a/src/java/org/apache/lenya/cms/ac/usecases/DeleteIPRange.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.ac.usecases;
-
-/**
- * Delete an IP range.
- *
- * @version $Id$
- */
-public class DeleteIPRange extends AccessControlUsecase {
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-
-        String id = getParameterAsString(IPRangeProfile.ID);
-        org.apache.lenya.ac.IPRange ipRange = getIpRangeManager().getIPRange(id);
-        if (ipRange == null) {
-            throw new RuntimeException("IP range [" + ipRange + "] not found.");
-        }
-        
-        getIpRangeManager().remove(ipRange);
-        ipRange.delete();
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/ac/usecases/DeleteUser.java b/src/java/org/apache/lenya/cms/ac/usecases/DeleteUser.java
deleted file mode 100644
index 32fc2f9..0000000
--- a/src/java/org/apache/lenya/cms/ac/usecases/DeleteUser.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.ac.usecases;
-
-import org.apache.lenya.ac.User;
-
-/**
- * Usecase to delete a user.
- *
- * @version $Id$
- */
-public class DeleteUser extends AccessControlUsecase {
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-
-        String userId = getParameterAsString(UserProfile.USER_ID);
-        User user = getUserManager().getUser(userId);
-        if (user == null) {
-            throw new RuntimeException("User [" + userId + "] not found.");
-        }
-        
-        getUserManager().remove(user);
-        user.delete();
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/ac/usecases/Group.java b/src/java/org/apache/lenya/cms/ac/usecases/Group.java
deleted file mode 100644
index a6cd5dd..0000000
--- a/src/java/org/apache/lenya/cms/ac/usecases/Group.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.ac.usecases;
-
-/**
- * Display group information.
- *
- * @version $Id$
- */
-public class Group extends AccessControlUsecase {
-
-    protected static final String GROUP_ID = "groupId";
-    protected static final String GROUP = "group";
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#setParameter(java.lang.String, java.lang.Object)
-     */
-    public void setParameter(String name, Object value) {
-        super.setParameter(name, value);
-
-        if (name.equals(GROUP_ID)) {
-            String groupId = (String) value;
-            org.apache.lenya.ac.Group group = getGroupManager().getGroup(groupId);
-            if (group == null) {
-                addErrorMessage("group_no_such_entry", new String[]{groupId});
-            } else {
-                setParameter(GROUP, group);
-            }
-        }
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/ac/usecases/GroupMembers.java b/src/java/org/apache/lenya/cms/ac/usecases/GroupMembers.java
deleted file mode 100644
index f063314..0000000
--- a/src/java/org/apache/lenya/cms/ac/usecases/GroupMembers.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.ac.usecases;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.lenya.ac.Group;
-import org.apache.lenya.ac.Groupable;
-import org.apache.lenya.ac.User;
-import org.apache.lenya.cms.usecase.UsecaseException;
-
-/**
- * Usecase to change the members of a group.
- * 
- * @version $Id$
- */
-public class GroupMembers extends AccessControlUsecase {
-
-    private Group group;
-
-    protected static final String GROUP_USERS = "groupUsers";
-    protected static final String OTHER_USERS = "otherUsers";
-    protected static final String ADD = "add";
-    protected static final String REMOVE = "remove";
-    protected static final String GROUP_USER = "groupUser";
-    protected static final String OTHER_USER = "otherUser";
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#initParameters()
-     */
-    protected void initParameters() {
-        super.initParameters();
-        setExitParameter(GroupProfile.ID, getParameterAsString(GroupProfile.ID));
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-
-        this.group.removeAllMembers();
-
-        List groupUsers = (List) getParameter(GROUP_USERS);
-        for (Iterator i = groupUsers.iterator(); i.hasNext();) {
-            User user = (User) i.next();
-            this.group.add(user);
-            user.save();
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#advance()
-     */
-    public void advance() throws UsecaseException {
-        super.advance();
-
-        String add = getParameterAsString(ADD);
-        String remove = getParameterAsString(REMOVE);
-        if (add != null || remove != null) {
-
-            List groupUsers = (List) getParameter(GROUP_USERS);
-            List otherUsers = (List) getParameter(OTHER_USERS);
-
-            if (add != null) {
-                String userId = getParameterAsString(OTHER_USER);
-                if (userId != null) {
-                    if (getLogger().isDebugEnabled()) {
-                        getLogger().debug("add user [" + userId + "]");
-                    }
-                    User user = getUserManager().getUser(userId);
-                    groupUsers.add(user);
-                    otherUsers.remove(user);
-                }
-            }
-
-            if (remove != null) {
-                String userId = getParameterAsString(GROUP_USER);
-                if (userId != null) {
-                    if (getLogger().isDebugEnabled()) {
-                        getLogger().debug("remove user [" + userId + "]");
-                    }
-                    User user = getUserManager().getUser(userId);
-                    otherUsers.add(user);
-                    groupUsers.remove(user);
-                }
-            }
-
-            deleteParameter(ADD);
-            deleteParameter(REMOVE);
-            deleteParameter(GROUP_USER);
-            deleteParameter(OTHER_USER);
-        }
-
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#setParameter(java.lang.String, java.lang.Object)
-     */
-    public void setParameter(String name, Object value) {
-        super.setParameter(name, value);
-        if (name.equals(GroupProfile.ID)) {
-            String groupId = (String) value;
-            this.group = getGroupManager().getGroup(groupId);
-            if (this.group == null) {
-                throw new RuntimeException("Group [" + groupId + "] not found.");
-            }
-
-            Groupable[] members = this.group.getMembers();
-            List groupUsers = new ArrayList();
-            for (int i = 0; i < members.length; i++) {
-                if (members[i] instanceof User) {
-                    groupUsers.add(members[i]);
-                }
-            }
-            setParameter(GROUP_USERS, groupUsers);
-
-            User[] allUsers = getUserManager().getUsers();
-
-            List otherUsers = new ArrayList();
-
-            for (int i = 0; i < allUsers.length; i++) {
-                if (!groupUsers.contains(allUsers[i])) {
-                    otherUsers.add(allUsers[i]);
-                }
-            }
-
-            setParameter(OTHER_USERS, otherUsers);
-        }
-
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/ac/usecases/GroupProfile.java b/src/java/org/apache/lenya/cms/ac/usecases/GroupProfile.java
deleted file mode 100644
index 6036de6..0000000
--- a/src/java/org/apache/lenya/cms/ac/usecases/GroupProfile.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.ac.usecases;
-
-import org.apache.lenya.ac.Group;
-
-/**
- * Usecase to change the profile of a group.
- * 
- * @version $Id:$
- */
-public class GroupProfile extends AccessControlUsecase {
-
-    protected static final String ID = "groupId";
-    protected static final String NAME = "name";
-    protected static final String DESCRIPTION = "description";
-
-    private Group group;
-
-    protected void doExecute() throws Exception {
-        super.doExecute();
-
-        String name = getParameterAsString(NAME);
-        String description = getParameterAsString(DESCRIPTION);
-
-        this.group.setName(name);
-        this.group.setDescription(description);
-
-        this.group.save();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#setParameter(java.lang.String, java.lang.Object)
-     */
-    public void setParameter(String name, Object value) {
-        super.setParameter(name, value);
-
-        if (name.equals(ID)) {
-            String id = (String) value;
-            this.group = getGroupManager().getGroup(id);
-            if (this.group == null) {
-                throw new RuntimeException("Group [" + id + "] not found.");
-            }
-
-            setParameter(DESCRIPTION, this.group.getDescription());
-            setParameter(NAME, this.group.getName());
-        }
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/ac/usecases/Groups.java b/src/java/org/apache/lenya/cms/ac/usecases/Groups.java
deleted file mode 100644
index 3dcc6ba..0000000
--- a/src/java/org/apache/lenya/cms/ac/usecases/Groups.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.ac.usecases;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.lenya.ac.Group;
-
-/**
- * Manage groups.
- * 
- * @version $Id$
- */
-public class Groups extends AccessControlUsecase {
-    
-    protected static final String GROUPS = "groups";
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#initParameters()
-     */
-    protected void initParameters() {
-        super.initParameters();
-        
-        Group[] groups = getGroupManager().getGroups();
-        List groupList = new ArrayList();
-        groupList.addAll(Arrays.asList(groups));
-        Collections.sort(groupList);
-        setParameter(GROUPS, groupList);
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/ac/usecases/IPRange.java b/src/java/org/apache/lenya/cms/ac/usecases/IPRange.java
deleted file mode 100644
index 59f4aea..0000000
--- a/src/java/org/apache/lenya/cms/ac/usecases/IPRange.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.ac.usecases;
-
-/**
- * Show information about an IP range.
- * 
- * @version $Id:$
- */
-public class IPRange extends AccessControlUsecase {
-
-    protected static final String IP_RANGE_ID = "ipRangeId";
-    protected static final String IP_RANGE = "ipRange";
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#setParameter(java.lang.String, java.lang.Object)
-     */
-    public void setParameter(String name, Object value) {
-        super.setParameter(name, value);
-
-        if (name.equals(IP_RANGE_ID)) {
-            String ipRangeId = (String) value;
-            org.apache.lenya.ac.IPRange ipRange = getIpRangeManager().getIPRange(ipRangeId);
-            if (ipRange == null) {
-                addErrorMessage("iprange_no_such_iprange", new String[] { ipRangeId });
-            } else {
-                setParameter(IP_RANGE, ipRange);
-            }
-        }
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/ac/usecases/IPRangeGroups.java b/src/java/org/apache/lenya/cms/ac/usecases/IPRangeGroups.java
deleted file mode 100644
index 49f9d3a..0000000
--- a/src/java/org/apache/lenya/cms/ac/usecases/IPRangeGroups.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.ac.usecases;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.lenya.ac.Group;
-import org.apache.lenya.ac.IPRange;
-import org.apache.lenya.cms.usecase.UsecaseException;
-
-/**
- * Usecase to edit a IP range's group affiliation.
- */
-public class IPRangeGroups extends AccessControlUsecase {
-
-    private IPRange ipRange;
-
-    protected static final String IP_RANGE_GROUPS = "ipRangeGroups";
-    protected static final String OTHER_GROUPS = "otherGroups";
-    protected static final String ADD = "add";
-    protected static final String REMOVE = "remove";
-    protected static final String IP_RANGE_GROUP = "ipRangeGroup";
-    protected static final String OTHER_GROUP = "otherGroup";
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-        
-        this.ipRange.removeFromAllGroups();
-        
-        List ipRangeGroups = (List) getParameter(IP_RANGE_GROUPS);
-        for (Iterator i = ipRangeGroups.iterator(); i.hasNext(); ) {
-            Group group = (Group) i.next();
-            group.add(this.ipRange);
-        }
-        ipRange.save();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#advance()
-     */
-    public void advance() throws UsecaseException {
-        super.advance();
-
-        String add = getParameterAsString(ADD);
-        String remove = getParameterAsString(REMOVE);
-        if (add != null || remove != null) {
-
-            List ipRangeGroups = (List) getParameter(IP_RANGE_GROUPS);
-            List otherGroups = (List) getParameter(OTHER_GROUPS);
-            
-            if (add != null) {
-                String groupId = getParameterAsString(OTHER_GROUP);
-                if (groupId != null) {
-                    if (getLogger().isDebugEnabled()) {
-                        getLogger().debug("add group [" + groupId + "]");
-                    }
-                    Group group = getGroupManager().getGroup(groupId);
-                    ipRangeGroups.add(group);
-                    otherGroups.remove(group);
-                }
-            }
-
-            if (remove != null) {
-                String groupId = getParameterAsString(IP_RANGE_GROUP);
-                if (groupId != null) {
-                    if (getLogger().isDebugEnabled()) {
-                        getLogger().debug("remove group [" + groupId + "]");
-                    }
-                    Group group = getGroupManager().getGroup(groupId);
-                    otherGroups.add(group);
-                    ipRangeGroups.remove(group);
-                }
-            }
-            
-            deleteParameter(ADD);
-            deleteParameter(REMOVE);
-            deleteParameter(IP_RANGE_GROUP);
-            deleteParameter(OTHER_GROUP);
-        }
-
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#setParameter(java.lang.String,
-     *      java.lang.Object)
-     */
-    public void setParameter(String name, Object value) {
-        super.setParameter(name, value);
-        if (name.equals(IPRangeProfile.ID)) {
-            String ipRangeId = (String) value;
-            this.ipRange = getIpRangeManager().getIPRange(ipRangeId);
-            if (this.ipRange == null) {
-                throw new RuntimeException("IP range [" + ipRangeId + "] not found.");
-            }
-
-            Group[] ipRangeGroupArray = this.ipRange.getGroups();
-            List ipRangeGroups = new ArrayList(Arrays.asList(ipRangeGroupArray));
-
-            setParameter(IP_RANGE_GROUPS, ipRangeGroups);
-
-            Group[] allGroups = getGroupManager().getGroups();
-
-            List otherGroups = new ArrayList();
-
-            for (int i = 0; i < allGroups.length; i++) {
-                if (!ipRangeGroups.contains(allGroups[i])) {
-                    otherGroups.add(allGroups[i]);
-                }
-            }
-
-            setParameter(OTHER_GROUPS, otherGroups);
-        }
-
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/ac/usecases/IPRangeProfile.java b/src/java/org/apache/lenya/cms/ac/usecases/IPRangeProfile.java
deleted file mode 100644
index d6bfa46..0000000
--- a/src/java/org/apache/lenya/cms/ac/usecases/IPRangeProfile.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.ac.usecases;
-
-import java.net.InetAddress;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.lenya.ac.IPRange;
-import org.apache.lenya.cms.usecase.AbstractUsecase;
-
-/**
- * Usecase to change the profile of an IP range.
- */
-public class IPRangeProfile extends AccessControlUsecase {
-
-    protected static final String ID = "ipRangeId";
-    protected static final String NAME = "name";
-    protected static final String DESCRIPTION = "description";
-    protected static final String NETWORK_ADDRESS = "networkAddress";
-    protected static final String SUBNET_MASK = "subnetMask";
-    protected static final String PART_NUMBERS = "partNumbers";
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckExecutionConditions()
-     */
-    protected void doCheckExecutionConditions() throws Exception {
-        IPRangeProfile.validateAddresses(this);
-    }
-    
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-
-        String name = getParameterAsString(NAME);
-        String description = getParameterAsString(DESCRIPTION);
-        
-        IPRange ipRange = getIPRange();
-
-        ipRange.setName(name);
-        ipRange.setDescription(description);
-        
-        String networkString = "";
-        String subnetString = "";
-        
-        for (int i = 0; i < 4; i++) {
-            if (i > 0) {
-                networkString += ".";
-                subnetString += ".";
-            }
-            Part netPart = (Part) getParameter(IPRangeProfile.NETWORK_ADDRESS + "-" + i);
-            networkString += netPart.getValue();
-            Part subPart = (Part) getParameter(IPRangeProfile.SUBNET_MASK + "-" + i);
-            subnetString += subPart.getValue();
-        }
-
-        InetAddress networkAddress = InetAddress.getByName(networkString);
-        ipRange.setNetworkAddress(networkAddress.getAddress());
-
-        InetAddress subnetMask = InetAddress.getByName(subnetString);
-        ipRange.setSubnetMask(subnetMask.getAddress());
-
-        ipRange.save();
-
-    }
-
-    private IPRange ipRange;
-
-    /**
-     * @return The IP range.
-     */
-    protected IPRange getIPRange() {
-        return this.ipRange;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#setParameter(java.lang.String, java.lang.Object)
-     */
-    public void setParameter(String name, Object value) {
-        super.setParameter(name, value);
-
-        if (name.equals(ID)) {
-            String id = (String) value;
-            this.ipRange = getIpRangeManager().getIPRange(id);
-            if (this.ipRange == null) {
-                throw new RuntimeException("IP range [" + id + "] not found.");
-            }
-
-            setParameter(NAME, this.ipRange.getName());
-            setParameter(DESCRIPTION, this.ipRange.getDescription());
-
-            InetAddress networkAddress = this.ipRange.getNetworkAddress();
-            InetAddress subnetMask = this.ipRange.getSubnetMask();
-
-            List partNumbers = new ArrayList();
-            for (byte i = 0; i < 4; i++) {
-                setParameter(NETWORK_ADDRESS + "-" + i, new Part(i, ""
-                        + networkAddress.getAddress()[i]));
-                setParameter(SUBNET_MASK + "-" + i, new Part(i, "" + subnetMask.getAddress()[i]));
-                partNumbers.add(new Integer(i));
-            }
-            setParameter(IPRangeProfile.PART_NUMBERS, partNumbers);
-
-        }
-    }
-
-    protected static void validateAddresses(AbstractUsecase usecase) {
-        String[] names = { "network address", "subnet mask" };
-        String[] params = { IPRangeProfile.NETWORK_ADDRESS, IPRangeProfile.SUBNET_MASK };
-
-        for (byte type = 0; type < names.length; type++) {
-            for (byte i = 0; i < 4; i++) {
-                String paramName = params[type] + "-" + i;
-                Part part = new Part(i);
-                part.setValue(usecase.getParameterAsString(paramName));
-                if (!part.isValid()) {
-                    usecase.addErrorMessage("Part " + (i + 1) + " of the " + names[type]
-                            + " is not valid.");
-                }
-                usecase.setParameter(paramName, part);
-            }
-        }
-    }
-
-    /**
-     * IP address part holder.
-     */
-    public static class Part {
-        private String value;
-        private byte position;
-
-        /**
-         * Ctor.
-         * @param _position The position.
-         * @param _value The value.
-         */
-        public Part(byte _position, String _value) {
-            this.value = _value;
-            this.position = _position;
-        }
-
-        /**
-         * Ctor.
-         * @param _position The position.
-         */
-        public Part(byte _position) {
-            this(_position, "0");
-        }
-
-        /**
-         * Returns the position
-         * @return The position
-         */
-        public byte getPosition() {
-            return this.position;
-        }
-
-        /**
-         * Returns the value
-         * @return The value
-         */
-        public String getValue() {
-            return this.value;
-        }
-
-        /**
-         * @param _value The value.
-         */
-        public void setValue(String _value) {
-            this.value = _value;
-        }
-
-        /**
-         * Checks if the part is valid.
-         * @return A boolean value.
-         */
-        public boolean isValid() {
-
-            boolean valid = true;
-            try {
-                int i = Integer.parseInt(this.value);
-                if (!(0 <= i && i <= 255)) {
-                    valid = false;
-                }
-            } catch (NumberFormatException e) {
-                valid = false;
-            }
-
-            return valid;
-        }
-
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/ac/usecases/IPRanges.java b/src/java/org/apache/lenya/cms/ac/usecases/IPRanges.java
deleted file mode 100644
index 09369ce..0000000
--- a/src/java/org/apache/lenya/cms/ac/usecases/IPRanges.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.ac.usecases;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.lenya.ac.IPRange;
-
-/**
- * Manage IP ranges.
- * 
- * @version $Id$
- */
-public class IPRanges extends AccessControlUsecase {
-
-    protected static final String IP_RANGES = "ipRanges";
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#initParameters()
-     */
-    protected void initParameters() {
-        super.initParameters();
-        
-        IPRange[] ipRanges = getIpRangeManager().getIPRanges();
-        List ipRangeList = new ArrayList();
-        ipRangeList.addAll(Arrays.asList(ipRanges));
-        Collections.sort(ipRangeList);
-        setParameter(IP_RANGES, ipRangeList);
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/ac/usecases/Login.java b/src/java/org/apache/lenya/cms/ac/usecases/Login.java
deleted file mode 100644
index d2dad2b..0000000
--- a/src/java/org/apache/lenya/cms/ac/usecases/Login.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.ac.usecases;
-
-import java.util.Map;
-
-import org.apache.lenya.cms.usecase.UsecaseException;
-import org.apache.cocoon.components.ContextHelper;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Request;
-
-/**
- * Usecase to login a user.
- * 
- * @version $Id$
- */
-public class Login extends AccessControlUsecase {
-
-    protected static final String REFERRER_QUERY_STRING = "referrerQueryString";
-
-    /**
-     * Ctor.
-     */
-    public Login() {
-        super();
-    }
-
-    /**
-     * Validates the request parameters.
-     * @throws UsecaseException if an error occurs.
-     */
-    void validate() throws UsecaseException {
-
-        String userId = getParameterAsString("username");
-        String password = getParameterAsString("password");
-
-        if (userId.length() == 0) {
-            addErrorMessage("Please enter a user name.");
-        }
-        if (password.length() == 0) {
-            addErrorMessage("Please enter a password.");
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckExecutionConditions()
-     */
-    protected void doCheckExecutionConditions() throws Exception {
-        validate();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        Map objectModel = ContextHelper.getObjectModel(getContext());
-        Request request = ObjectModelHelper.getRequest(objectModel);
-        request.getSession(true);
-        if (getAccessController().authenticate(request)) {
-            setTargetURL(request.getRequestURI());
-        } else {
-            addErrorMessage("Authentication failed");
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#getExitQueryString()
-     */
-    protected String getExitQueryString() {
-        String queryString = getParameterAsString(REFERRER_QUERY_STRING);
-        if (queryString != null && !queryString.equals("")) {
-            queryString = "?" + queryString;
-        }
-        return queryString;
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/ac/usecases/Logout.java b/src/java/org/apache/lenya/cms/ac/usecases/Logout.java
deleted file mode 100644
index 9107310..0000000
--- a/src/java/org/apache/lenya/cms/ac/usecases/Logout.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.ac.usecases;
-
-import java.util.Map;
-import java.util.Vector;
-
-import org.apache.lenya.ac.Identity;
-import org.apache.cocoon.components.ContextHelper;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.environment.Session;
-
-/**
- * Usecase to log a user out.
- * 
- * @version $Id$
- */
-public class Logout extends AccessControlUsecase {
-
-    /**
-     * Ctor.
-     */
-    public Logout() {
-        super();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#initParameters()
-     */
-    protected void initParameters() {
-        super.initParameters();
-        Map objectModel = ContextHelper.getObjectModel(getContext());
-        Request request = ObjectModelHelper.getRequest(objectModel);
-        Session session = request.getSession(false);
-
-        if (session != null) {
-            Vector history = (Vector) session
-                    .getAttribute("org.apache.lenya.cms.cocoon.acting.History");
-            setParameter("history", history.toArray());
-        }
-    }
-    
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-
-        Map objectModel = ContextHelper.getObjectModel(getContext());
-        Request request = ObjectModelHelper.getRequest(objectModel);
-        Session session = request.getSession(false);
-
-        if (session != null) {
-            session.removeAttribute(Identity.class.getName());
-        }
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/ac/usecases/User.java b/src/java/org/apache/lenya/cms/ac/usecases/User.java
deleted file mode 100644
index c8889e1..0000000
--- a/src/java/org/apache/lenya/cms/ac/usecases/User.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.ac.usecases;
-
-/**
- * Display user information.
- * 
- * @version $Id:$
- */
-public class User extends AccessControlUsecase {
-
-    protected static final String USER_ID = "userId";
-    protected static final String USER = "user";
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#setParameter(java.lang.String, java.lang.Object)
-     */
-    public void setParameter(String name, Object value) {
-        super.setParameter(name, value);
-
-        if (name.equals(USER_ID)) {
-            String userId = (String) value;
-            org.apache.lenya.ac.User user = getUserManager().getUser(userId);
-            if (user == null) {
-                addErrorMessage("user_no_such_user", new String[]{userId});
-            } else {
-                setParameter(USER, user);
-            }
-        }
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/ac/usecases/UserGroups.java b/src/java/org/apache/lenya/cms/ac/usecases/UserGroups.java
deleted file mode 100644
index 48ee456..0000000
--- a/src/java/org/apache/lenya/cms/ac/usecases/UserGroups.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.ac.usecases;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.lenya.ac.Group;
-import org.apache.lenya.ac.User;
-import org.apache.lenya.cms.usecase.UsecaseException;
-
-/**
- * Usecase to edit a user's group affiliation.
- */
-public class UserGroups extends AccessControlUsecase {
-
-    private User user;
-
-    protected static final String USER_GROUPS = "userGroups";
-    protected static final String OTHER_GROUPS = "otherGroups";
-    protected static final String ADD = "add";
-    protected static final String REMOVE = "remove";
-    protected static final String USER_GROUP = "userGroup";
-    protected static final String OTHER_GROUP = "otherGroup";
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-        
-        this.user.removeFromAllGroups();
-        
-        List userGroups = (List) getParameter(USER_GROUPS);
-        for (Iterator i = userGroups.iterator(); i.hasNext(); ) {
-            Group group = (Group) i.next();
-            group.add(this.user);
-        }
-        user.save();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#advance()
-     */
-    public void advance() throws UsecaseException {
-        super.advance();
-
-        String add = getParameterAsString(ADD);
-        String remove = getParameterAsString(REMOVE);
-        if (add != null || remove != null) {
-
-            List userGroups = (List) getParameter(USER_GROUPS);
-            List otherGroups = (List) getParameter(OTHER_GROUPS);
-            
-            if (add != null) {
-                String groupId = getParameterAsString(OTHER_GROUP);
-                if (groupId != null) {
-                    if (getLogger().isDebugEnabled()) {
-                        getLogger().debug("add group [" + groupId + "]");
-                    }
-                    Group group = getGroupManager().getGroup(groupId);
-                    userGroups.add(group);
-                    otherGroups.remove(group);
-                }
-            }
-
-            if (remove != null) {
-                String groupId = getParameterAsString(USER_GROUP);
-                if (groupId != null) {
-                    if (getLogger().isDebugEnabled()) {
-                        getLogger().debug("remove group [" + groupId + "]");
-                    }
-                    Group group = getGroupManager().getGroup(groupId);
-                    otherGroups.add(group);
-                    userGroups.remove(group);
-                }
-            }
-            
-            deleteParameter(ADD);
-            deleteParameter(REMOVE);
-            deleteParameter(USER_GROUP);
-            deleteParameter(OTHER_GROUP);
-        }
-
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#setParameter(java.lang.String,
-     *      java.lang.Object)
-     */
-    public void setParameter(String name, Object value) {
-        super.setParameter(name, value);
-        if (name.equals(UserProfile.USER_ID)) {
-            String userId = (String) value;
-            this.user = getUserManager().getUser(userId);
-            if (this.user == null) {
-                throw new RuntimeException("User [" + userId + "] not found.");
-            }
-
-            Group[] userGroupArray = this.user.getGroups();
-            List userGroups = new ArrayList(Arrays.asList(userGroupArray));
-
-            setParameter(USER_GROUPS, userGroups);
-
-            Group[] allGroups = getGroupManager().getGroups();
-
-            List otherGroups = new ArrayList();
-
-            for (int i = 0; i < allGroups.length; i++) {
-                if (!userGroups.contains(allGroups[i])) {
-                    otherGroups.add(allGroups[i]);
-                }
-            }
-
-            setParameter(OTHER_GROUPS, otherGroups);
-        }
-
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/ac/usecases/UserPassword.java b/src/java/org/apache/lenya/cms/ac/usecases/UserPassword.java
deleted file mode 100644
index 837b264..0000000
--- a/src/java/org/apache/lenya/cms/ac/usecases/UserPassword.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.ac.usecases;
-
-import org.apache.lenya.ac.User;
-
-/**
- * Usecase to change a user's password.
- */
-public class UserPassword extends AccessControlUsecase {
-
-    protected static final String OLD_PASSWORD = "oldPassword";
-    protected static final String NEW_PASSWORD = "password";
-    protected static final String CONFIRM_PASSWORD = "confirmPassword";
-    
-    protected static final String CHECK_PASSWORD = "checkPassword";
-
-    /**
-     * Ctor.
-     */
-    public UserPassword() {
-        super();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckExecutionConditions()
-     */
-    protected void doCheckExecutionConditions() throws Exception {
-        super.doCheckExecutionConditions();
-        
-        String checkOldPassword = getParameterAsString(CHECK_PASSWORD);
-        if (checkOldPassword != null && checkOldPassword.equals(Boolean.toString(true))) {
-            String oldPassword = getParameterAsString(OLD_PASSWORD);
-            boolean authenticated = this.user.authenticate(oldPassword);
-            if (!authenticated) {
-                addErrorMessage("The old password is not correct.");
-            }
-        }
-        
-        checkNewPassword(this);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-        this.user.setPassword(getParameterAsString(NEW_PASSWORD));
-    }
-
-    private User user;
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#setParameter(java.lang.String, java.lang.Object)
-     */
-    public void setParameter(String name, Object value) {
-        super.setParameter(name, value);
-
-        if (name.equals(UserProfile.USER_ID)) {
-            String userId = (String) value;
-            this.user = getUserManager().getUser(userId);
-            if (this.user == null) {
-                throw new RuntimeException("User [" + userId + "] not found.");
-            }
-
-        }
-    }
-
-    /**
-     * Checks a password and a confirmed password.
-     * @param usecase The usecase.
-     */
-    protected static void checkNewPassword(AccessControlUsecase usecase) {
-        String password = usecase.getParameterAsString(UserPassword.NEW_PASSWORD);
-        String confirmPassword = usecase.getParameterAsString(UserPassword.CONFIRM_PASSWORD);
-
-        if (!password.equals(confirmPassword)) {
-            usecase.addErrorMessage("Password and confirmed password are not equal.");
-        }
-
-        if (password.length() < 6) {
-            usecase.addErrorMessage("The password must be at least six characters long.");
-        }
-
-        if (!password.matches(".*\\d.*")) {
-            usecase.addErrorMessage("The password must contain at least one number.");
-        }
-    }
-
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/ac/usecases/UserProfile.java b/src/java/org/apache/lenya/cms/ac/usecases/UserProfile.java
deleted file mode 100644
index 4cf15bf..0000000
--- a/src/java/org/apache/lenya/cms/ac/usecases/UserProfile.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.ac.usecases;
-
-import org.apache.lenya.ac.User;
-
-/**
- * Usecase to edit a user's profile.
- */
-public class UserProfile extends AccessControlUsecase {
-
-    protected static final String USER_ID = "userId";
-    protected static final String FULL_NAME = "fullName";
-    protected static final String EMAIL = "email";
-    protected static final String DESCRIPTION = "description";
-    protected static final String MENU_LOCALE = "defaultMenuLocale";
-    protected static final String DOCUMENT_LOCALE = "defaultDocumentLocale";
-    
-    /**
-     * Ctor.
-     */
-    public UserProfile() {
-        super();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckExecutionConditions()
-     */
-    protected void doCheckExecutionConditions() throws Exception {
-        
-        String email = getParameterAsString(UserProfile.EMAIL);
-        if (email.length() == 0) {
-            addErrorMessage("Please enter an e-mail address.");
-        }
-    }
-    
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-        
-        String fullName = getParameterAsString(UserProfile.FULL_NAME);
-        String description = getParameterAsString(UserProfile.DESCRIPTION);
-        String email = getParameterAsString(UserProfile.EMAIL);
-        String defaultMenuLocale = getParameterAsString(UserProfile.MENU_LOCALE);
-        String defaultDocumentLocale = getParameterAsString(UserProfile.DOCUMENT_LOCALE);
-        
-        getUser().setEmail(email);
-        getUser().setName(fullName);
-        getUser().setDescription(description);
-        getUser().setDefaultMenuLocale(defaultMenuLocale);
-        getUser().setDefaultDocumentLocale(defaultDocumentLocale);
-        getUser().save();
-        
-    }
-    
-    private User user;
-    
-    /**
-     * Returns the currently edited user.
-     * @return A user.
-     */
-    protected User getUser() {
-        return this.user;
-    }
-    
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#setParameter(java.lang.String, java.lang.Object)
-     */
-    public void setParameter(String name, Object value) {
-        super.setParameter(name, value);
-        
-        if (name.equals(USER_ID)) {
-            String userId = (String) value;
-            this.user = getUserManager().getUser(userId);
-            if (this.user == null) {
-                throw new RuntimeException("User [" + userId + "] not found.");
-            }
-            
-            setParameter(EMAIL, this.user.getEmail());
-            setParameter(DESCRIPTION, this.user.getDescription());
-            setParameter(MENU_LOCALE, this.user.getDefaultMenuLocale());
-            setParameter(DOCUMENT_LOCALE, this.user.getDefaultDocumentLocale());
-            setParameter(FULL_NAME, this.user.getName());
-        }
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/ac/usecases/Users.java b/src/java/org/apache/lenya/cms/ac/usecases/Users.java
deleted file mode 100644
index 3f3153b..0000000
--- a/src/java/org/apache/lenya/cms/ac/usecases/Users.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.ac.usecases;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.cocoon.components.ContextHelper;
-import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.environment.Session;
-import org.apache.lenya.ac.Identity;
-import org.apache.lenya.ac.User;
-import org.apache.lenya.ac.UserType;
-
-/**
- * Manage users.
- * 
- * @version $Id$
- */
-public class Users extends AccessControlUsecase {
-
-    protected static final String USERS = "users";
-    protected static final String CURRENT_USER = "currentUser";
-    protected static final String USER_TYPES = "userTypes";
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#initParameters()
-     */
-    protected void initParameters() {
-        super.initParameters();
-        
-        User[] users = getUserManager().getUsers();
-        List userList = new ArrayList();
-        userList.addAll(Arrays.asList(users));
-        Collections.sort(userList);
-        setParameter(USERS, userList);
-        
-        Request request = ContextHelper.getRequest(getContext());
-        Session session = request.getSession(false);
-        if (session != null) {
-            Identity identity = (Identity) session.getAttribute(Identity.class.getName());
-            if (identity != null) {
-                setParameter(CURRENT_USER, identity.getUser());
-            }
-        }
-        
-        UserType[] types = getUserManager().getUserTypes();
-        setParameter(USER_TYPES, Arrays.asList(types));
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/ac/workflow/WorkflowAuthorizer.java b/src/java/org/apache/lenya/cms/ac/workflow/WorkflowAuthorizer.java
deleted file mode 100644
index a4dd4c7..0000000
--- a/src/java/org/apache/lenya/cms/ac/workflow/WorkflowAuthorizer.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.ac.workflow;
-
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.cocoon.environment.Request;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.Authorizer;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.workflow.WorkflowUtil;
-import org.apache.lenya.util.ServletHelper;
-
-/**
- * If the client requested invoking a workflow event, this authorizer checks if the current document
- * state and identity roles allow this transition.
- */
-public class WorkflowAuthorizer extends AbstractLogEnabled implements Authorizer, Serviceable {
-
-    protected static final String EVENT_PARAMETER = "lenya.event";
-
-    /**
-     * @see org.apache.lenya.ac.Authorizer#authorize(org.apache.cocoon.environment.Request)
-     */
-    public boolean authorize(Request request) throws AccessControlException {
-        return authorize(request, ServletHelper.getWebappURI(request));
-    }
-
-    private ServiceManager manager;
-
-    /**
-     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service(ServiceManager _manager) throws ServiceException {
-        this.manager = _manager;
-    }
-
-    /**
-     * Authorizes a request.
-     * @param request The request.
-     * @param webappUrl The URL to authorize.
-     * @return A boolean value.
-     * @throws AccessControlException if an error occurs.
-     */
-    public boolean authorize(Request request, String webappUrl) throws AccessControlException {
-        boolean authorized = true;
-
-        String event = request.getParameter(EVENT_PARAMETER);
-        SourceResolver resolver = null;
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Authorizing workflow for event [" + event + "]");
-        }
-
-        if (event != null) {
-
-            try {
-                resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-                DocumentIdentityMap map = new DocumentIdentityMap(this.manager, getLogger());
-                if (map.isDocument(webappUrl)) {
-                    Document document = map.getFromURL(webappUrl);
-                    authorized = WorkflowUtil.canInvoke(this.manager, getLogger(), document, event);
-                }
-            } catch (final Exception e) {
-                throw new AccessControlException(e);
-            } finally {
-                if (resolver != null) {
-                    this.manager.release(resolver);
-                }
-            }
-
-        }
-
-        return authorized;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/ant/LenyaProject.java b/src/java/org/apache/lenya/cms/ant/LenyaProject.java
deleted file mode 100644
index 60c1a65..0000000
--- a/src/java/org/apache/lenya/cms/ant/LenyaProject.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*

- * Copyright  1999-2004 The Apache Software Foundation

- *

- *  Licensed 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.

- *

- */

-package org.apache.lenya.cms.ant;

-

-import org.apache.avalon.framework.service.ServiceManager;

-import org.apache.tools.ant.Project;

-

-/**

- * Ant project that provides access to the service manager.

- * 

- * @version $Id:$

- */

-public class LenyaProject extends Project {

-

-    private ServiceManager manager;

-    

-    /**

-     * Ctor.

-     * @param manager The service manager.

-     */

-    public LenyaProject(ServiceManager manager) {

-        this.manager = manager;

-    }

-    

-    /**

-     * @return The service manager.

-     */

-    public ServiceManager getServiceManager() {

-        return this.manager;

-    }

-    

-}

diff --git a/src/java/org/apache/lenya/cms/authoring/CreatorException.java b/src/java/org/apache/lenya/cms/authoring/CreatorException.java
deleted file mode 100644
index 5b2ad3d..0000000
--- a/src/java/org/apache/lenya/cms/authoring/CreatorException.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.authoring;
-
-/**
- * The creator exception
- */
-public class CreatorException extends Exception {
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/**
-     * The Constructor
-     */
-    public CreatorException() {
-        super();
-    }
-
-    /**
-     * Create an instance of <code>CreatorException</code>
-     * @param message the exception message
-     */
-    public CreatorException(String message) {
-        super(message);
-    }
-
-    /**
-     * Create an instance of <code>CreatorException</code>
-     * @param cause the cause of the exception
-     */
-    public CreatorException(Throwable cause) {
-        super(cause);
-    }
-
-    /**
-     * Create an instance of <code>CreatorException</code>
-     * @param message the exception message
-     * @param cause the cause of the exception
-     */
-    public CreatorException(String message, Throwable cause) {
-        super(message, cause);
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/authoring/DefaultBranchCreator.java b/src/java/org/apache/lenya/cms/authoring/DefaultBranchCreator.java
deleted file mode 100644
index 849d965..0000000
--- a/src/java/org/apache/lenya/cms/authoring/DefaultBranchCreator.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.authoring;
-
-/**
- * Default creator for Documents of type branch (ie, they can have child documents)
- */
-public class DefaultBranchCreator extends DefaultCreator {
-
-}
diff --git a/src/java/org/apache/lenya/cms/authoring/DefaultCreator.java b/src/java/org/apache/lenya/cms/authoring/DefaultCreator.java
deleted file mode 100644
index 40531ae..0000000
--- a/src/java/org/apache/lenya/cms/authoring/DefaultCreator.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.authoring;
-
-import java.util.Map;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.container.ContainerUtil;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.lenya.cms.cocoon.source.SourceUtil;
-import org.apache.lenya.cms.publication.DocumentBuildException;
-import org.apache.lenya.cms.publication.DocumentException;
-import org.w3c.dom.Document;
-
-/**
- * Base creator for creating documents
- * @version $Id$
- */
-public abstract class DefaultCreator extends AbstractLogEnabled implements NodeCreatorInterface {
-
-    private String sampleResourceName = null;
-    private ServiceManager manager;
-
-    /**
-     * @see org.apache.lenya.cms.authoring.NodeCreatorInterface#init(Configuration, ServiceManager,
-     *      Logger)
-     */
-    public void init(Configuration conf, ServiceManager _manager, Logger _logger) {
-        // parameter conf ignored: nothing to configure in current implementation
-        this.manager = _manager;
-        ContainerUtil.enableLogging(this, _logger);
-    }
-
-    /**
-     * Create Child Name for tree entry
-     * @param childname a <code>String</code> value
-     * @return a <code>String</code> for Child Name for tree entry
-     * @exception Exception if an error occurs
-     */
-    public String getChildName(String childname) throws Exception {
-        if (childname.length() != 0) {
-            return childname;
-        }
-        return "abstract_default";
-    }
-
-    /**
-     * @see NodeCreatorInterface#create(String, org.apache.lenya.cms.publication.Document, Map)
-     */
-    public void create(String initialContentsURI,
-            org.apache.lenya.cms.publication.Document document,
-            Map parameters) throws Exception {
-
-        if (getLogger().isDebugEnabled())
-            getLogger().debug("DefaultCreator::create() called with\n" + "\t initialContentsURI ["
-                    + initialContentsURI + "]\n" + "\t document [" + document + "]\n"
-                    + "\t non-empty parameters [" + (parameters != null) + "]\n");
-
-        // Read initial contents as DOM
-        if (getLogger().isDebugEnabled())
-            getLogger().debug("DefaultCreator::create(), ready to read initial contents from URI ["
-                    + initialContentsURI + "]");
-
-        Document xmlDoc = null;
-        try {
-            xmlDoc = SourceUtil.readDOM(initialContentsURI, manager);
-        } catch (Exception e) {
-            throw new DocumentException("could not read document at location [ "
-                    + initialContentsURI + "]", e);
-        }
-
-        if (getLogger().isDebugEnabled())
-            getLogger().debug("transform sample file: ");
-
-        // transform the xml if needed
-        transformXML(xmlDoc, document, parameters);
-
-        // write the document
-        try {
-            SourceUtil.writeDOM(xmlDoc, document.getSourceURI(), manager);
-        } catch (Exception e) {
-            throw new DocumentBuildException("could not write document [" + document
-                    + "], exception " + e.toString(), e);
-        }
-    }
-
-    /**
-     * Create the language suffix for a file name given a language string
-     * @param language the language
-     * @return the suffix for the language dependant file name
-     */
-    protected String getLanguageSuffix(String language) {
-        return (language != null) ? "_" + language : "";
-    }
-
-    /**
-     * Apply some transformation on the newly created document.
-     * @param doc the xml document
-     * @param document the Lenya document
-     * @param parameters additional parameters that can be used in the transformation
-     * @throws Exception if the transformation fails
-     */
-    protected void transformXML(Document doc,
-            org.apache.lenya.cms.publication.Document document,
-            Map parameters) throws Exception {
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/authoring/NodeCreatorInterface.java b/src/java/org/apache/lenya/cms/authoring/NodeCreatorInterface.java
deleted file mode 100644
index 341c380..0000000
--- a/src/java/org/apache/lenya/cms/authoring/NodeCreatorInterface.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.authoring;
-
-import java.util.Map;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.avalon.framework.service.ServiceManager;
-
-/**
- * Interface for creation of nodes in the document hierarchy
- * @version $Id$
- * @deprecated This interface and it's implementations will be removed during the 1.4 development cycle
- */
-public interface NodeCreatorInterface {
-
-    /**
-     * Configures the Creator, based on a configuration file.
-     * 
-     * @param doctypeConf A configuration.
-     * @param manager the service manager
-     * @param logger A logger
-     */
-    void init(Configuration doctypeConf, ServiceManager manager, Logger logger);
-
-    /**
-     * Describe <code>getChildName</code> method here.
-     * 
-     * @param childname a <code>String</code> value
-     * @return a <code>String</code> value
-     * @exception Exception if an error occurs
-     */
-    String getChildName(String childname) throws Exception;
-
-    /**
-     * Create a physical representation for a new document.
-     * 
-     * @param initialContentsURI the URI where initial content for this document can be found.
-     * @param document The document to create.
-     * @param parameters additional parameters that can be used when creating the document
-     * 
-     * @exception Exception if an error occurs
-     */
-    void create(String initialContentsURI,
-            org.apache.lenya.cms.publication.Document document,
-            Map parameters) throws Exception;
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/cocoon/acting/AccessControlAction.java b/src/java/org/apache/lenya/cms/cocoon/acting/AccessControlAction.java
deleted file mode 100644
index 4180186..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/acting/AccessControlAction.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.cocoon.acting;
-
-import java.util.Collections;
-import java.util.Map;
-
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.cocoon.acting.ConfigurableServiceableAction;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Redirector;
-import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.environment.SourceResolver;
-import org.apache.lenya.ac.AccessController;
-import org.apache.lenya.ac.AccessControllerResolver;
-import org.apache.lenya.util.ServletHelper;
-
-/**
- * Super class for access control actions.
- * 
- * @version $Id$
- */
-public abstract class AccessControlAction extends ConfigurableServiceableAction {
-
-    private AccessController accessController;
-
-    /**
-     * <p>
-     * Invokes the access control functionality.
-     * If no access controller was found for the requested URL, an empty map is returned.
-     * </p>
-     * <p>
-     * This is a template method. Implement doAct() to add your functionality.
-     * </p>
-     * @see org.apache.cocoon.acting.Action#act(org.apache.cocoon.environment.Redirector, org.apache.cocoon.environment.SourceResolver, java.util.Map, java.lang.String, org.apache.avalon.framework.parameters.Parameters)
-     */
-    public Map act(
-        Redirector redirector,
-        SourceResolver sourceResolver,
-        Map objectModel,
-        String source,
-        Parameters parameters)
-        throws Exception {
-
-        ServiceSelector selector = null;
-        AccessControllerResolver resolver = null;
-        this.accessController = null;
-
-        Request request = ObjectModelHelper.getRequest(objectModel);
-
-        Map result = null;
-
-        try {
-            selector =
-                (ServiceSelector) this.manager.lookup(AccessControllerResolver.ROLE + "Selector");
-                
-            getLogger().debug("Resolving AC resolver for type [" + AccessControllerResolver.DEFAULT_RESOLVER + "]");
-            resolver =
-                (AccessControllerResolver) selector.select(
-                    AccessControllerResolver.DEFAULT_RESOLVER);
-            getLogger().debug("Resolved AC resolver [" + resolver + "]");
-
-            String webappUrl = ServletHelper.getWebappURI(request);
-            this.accessController = resolver.resolveAccessController(webappUrl);
-
-            if (this.accessController == null) {
-                result = Collections.EMPTY_MAP;
-            } else {
-                this.accessController.setupIdentity(request);
-                result = doAct(redirector, sourceResolver, objectModel, source, parameters);
-            }
-
-        } finally {
-            if (selector != null) {
-                if (resolver != null) {
-                    selector.release(resolver);
-                }
-                this.manager.release(selector);
-            }
-        }
-        return result;
-    }
-
-    /**
-     * The actual act method.
-     * @param redirector  The <code>Redirector</code> in charge
-     * @param resolver    The <code>SourceResolver</code> in charge
-     * @param objectModel The <code>Map</code> with object of the
-     *                    calling environment which can be used
-     *                    to select values this controller may need
-     *                    (ie Request, Response).
-     * @param source      A source <code>String</code> to the Action
-     * @param parameters  The <code>Parameters</code> for this invocation
-     * @return Map        The returned <code>Map</code> object with
-     *                    sitemap substitution values which can be used
-     *                    in subsequent elements attributes like src=
-     *                    using a xpath like expression: src="mydir/{myval}/foo"
-     *                    If the return value is null the processing inside
-     *                    the <map:act> element of the sitemap will
-     *                    be skipped.
-     * @exception Exception Indicates something is totally wrong
-     */
-    protected abstract Map doAct(
-        Redirector redirector,
-        SourceResolver resolver,
-        Map objectModel,
-        String source,
-        Parameters parameters)
-        throws Exception;
-
-    /**
-     * Returns the access controller.
-     * @return An access controller.
-     */
-    public AccessController getAccessController() {
-        return this.accessController;
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/cocoon/acting/DelegatingAuthenticatorAction.java b/src/java/org/apache/lenya/cms/cocoon/acting/DelegatingAuthenticatorAction.java
deleted file mode 100644
index f67ad8e..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/acting/DelegatingAuthenticatorAction.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*

- * Copyright  1999-2004 The Apache Software Foundation

- *

- *  Licensed 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.

- *

- */

-

-/* $Id: DelegatingAuthenticatorAction.java 42616 2004-03-03 12:56:33Z gregor $  */

-

-package org.apache.lenya.cms.cocoon.acting;

-

-import java.util.Collections;

-import java.util.Map;

-

-import org.apache.avalon.framework.parameters.Parameters;

-import org.apache.cocoon.environment.ObjectModelHelper;

-import org.apache.cocoon.environment.Redirector;

-import org.apache.cocoon.environment.Request;

-import org.apache.cocoon.environment.SourceResolver;

-

-/**

- * Authenticator action that delegates the authentication to an access controller.

- */

-public class DelegatingAuthenticatorAction extends AccessControlAction {

-

-    /**

-     * @see org.apache.lenya.cms.cocoon.acting.AccessControlAction#doAct(org.apache.cocoon.environment.Redirector, org.apache.cocoon.environment.SourceResolver, java.util.Map, java.lang.String, org.apache.avalon.framework.parameters.Parameters)

-     */

-    protected Map doAct(

-        Redirector redirector,

-        SourceResolver resolver,

-        Map objectModel,

-        String source,

-        Parameters parameters)

-        throws Exception {

-

-        getLogger().debug("Authenticating request");

-

-        Request request = ObjectModelHelper.getRequest(objectModel);

-        Map result = null;

-        if (getAccessController().authenticate(request)) {

-            getLogger().debug("Authentication successful.");

-            result = Collections.EMPTY_MAP;

-        }

-        else {

-            getLogger().debug("Authentication failed.");

-        }

-        return result;

-    }

-

-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/cocoon/acting/DelegatingAuthorizerAction.java b/src/java/org/apache/lenya/cms/cocoon/acting/DelegatingAuthorizerAction.java
deleted file mode 100644
index 1f74494..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/acting/DelegatingAuthorizerAction.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.cocoon.acting;
-
-import java.util.Collections;
-import java.util.Map;
-
-import org.apache.avalon.excalibur.pool.Poolable;
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Redirector;
-import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.environment.Session;
-import org.apache.cocoon.environment.SourceResolver;
-import org.apache.lenya.util.Stack;
-
-/**
- * AuthorizerAction that delegates the authorizing to an AccessController.
- */
-public class DelegatingAuthorizerAction extends AccessControlAction implements Poolable {
-
-    /**
-     * @see org.apache.cocoon.acting.Action#act(org.apache.cocoon.environment.Redirector, org.apache.cocoon.environment.SourceResolver, java.util.Map, java.lang.String, org.apache.avalon.framework.parameters.Parameters)
-     */
-    public Map act(
-        Redirector redirector,
-        SourceResolver resolver,
-        Map objectModel,
-        String src,
-        Parameters parameters)
-        throws Exception {
-
-        return super.act(redirector, resolver, objectModel, src, parameters);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.cocoon.acting.AccessControlAction#doAct(org.apache.cocoon.environment.Redirector, org.apache.cocoon.environment.SourceResolver, java.util.Map, java.lang.String, org.apache.avalon.framework.parameters.Parameters)
-     */
-    protected Map doAct(
-        Redirector redirector,
-        SourceResolver resolver,
-        Map objectModel,
-        String source,
-        Parameters parameters)
-        throws Exception {
-
-        Request request = ObjectModelHelper.getRequest(objectModel);
-        
-        setHistory(request);
-
-        boolean authorized = getAccessController().authorize(request);
-
-        Map result = null;
-        if (authorized) {
-            result = Collections.EMPTY_MAP;
-        }
-
-        return result;
-    }
-
-    /**
-     * <code>HISTORY</code> Name of the session attribute that holds the history
-     */
-    public static final String HISTORY =
-        DelegatingAuthorizerAction.class.getPackage().getName() + ".History";
-
-    /**
-     * Adds the current URL to the history.
-     * @param request The request.
-     */
-    protected void setHistory(Request request) {
-        Session session = request.getSession(true);
-
-        Stack history = (Stack) session.getAttribute(HISTORY);
-
-        if (history == null) {
-            history = new Stack(10);
-            session.setAttribute(HISTORY, history);
-        }
-        
-        String url = request.getRequestURI();
-        String context = request.getContextPath();
-        if (context == null) {
-            context = "";
-        }
-        url = url.substring(context.length());
-
-        history.push(url);
-
-    }
-    
-}
diff --git a/src/java/org/apache/lenya/cms/cocoon/acting/DiscoverCheckoutAction.java b/src/java/org/apache/lenya/cms/cocoon/acting/DiscoverCheckoutAction.java
deleted file mode 100644
index 7faa926..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/acting/DiscoverCheckoutAction.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Copyright  1999-2004 The Apache Software Foundation

- *

- *  Licensed 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.

- *

- */

-

-package org.apache.lenya.cms.cocoon.acting;

-

-import java.util.HashMap;

-import java.util.Map;

-

-import org.apache.avalon.framework.parameters.Parameters;

-import org.apache.cocoon.environment.Redirector;

-import org.apache.cocoon.environment.SourceResolver;

-import org.apache.lenya.cms.rc.RCML;

-import org.apache.lenya.cms.rc.RCMLEntry;

-

-

-/**

- * An action that tests if a document is already checked out by a given user.

- * If it isn't, a check out will be tried.

- */

-public class DiscoverCheckoutAction extends RevisionControllerAction {

-

-    /**

-	 * @see org.apache.cocoon.acting.Action#act(org.apache.cocoon.environment.Redirector, org.apache.cocoon.environment.SourceResolver, java.util.Map, java.lang.String, org.apache.avalon.framework.parameters.Parameters)

-	 */

-	public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String src,

-        Parameters parameters) throws Exception {

-        super.act(redirector, resolver, objectModel, src, parameters);

-

-        HashMap actionMap = new HashMap();

-        final RCMLEntry entry =getRc().getRCML(getFilename()).getLatestEntry();

-

-        if ((entry != null) && (entry.getType() == RCML.co) ) {

-            actionMap.put("filename", getFilename());

-            actionMap.put("user", entry.getIdentity());

-            return actionMap;

-        }

-        return null;

-    }

-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/cocoon/acting/LanguageExistsAction.java b/src/java/org/apache/lenya/cms/cocoon/acting/LanguageExistsAction.java
deleted file mode 100644
index 3a0c259..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/acting/LanguageExistsAction.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.cocoon.acting;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.cocoon.acting.ServiceableAction;
-import org.apache.cocoon.environment.Redirector;
-import org.apache.cocoon.environment.SourceResolver;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentDoesNotExistException;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.PageEnvelope;
-import org.apache.lenya.cms.publication.PageEnvelopeFactory;
-
-/**
- * Action that checks the sitetree if there is a node with the current document-id and the current
- * language, i.e. if the current document has a version in the current language.
- */
-public class LanguageExistsAction extends ServiceableAction {
-
-    /**
-     * Check if the current document-id has a document for the currently requested language.
-     * 
-     * If yes return an empty map, if not return null.
-     * 
-     * @param redirector a <code>Redirector</code> value
-     * @param resolver a <code>SourceResolver</code> value
-     * @param objectModel a <code>Map</code> value
-     * @param source a <code>String</code> value
-     * @param parameters a <code>Parameters</code> value
-     * 
-     * @return an empty <code>Map</code> if there is a version of this document for the current
-     *         language, null otherwiese
-     * @throws Exception if an error occurs
-     * 
-     * @exception DocumentDoesNotExistException if there is no document with the specified
-     *                document-id.
-     * @exception PageEnvelopeException if the PageEnvelope could not be created.
-     * @exception DocumentException if the language information could not be fetched from the
-     *                document.
-     */
-    public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source,
-            Parameters parameters) throws Exception {
-
-        DocumentIdentityMap map = new DocumentIdentityMap(this.manager, getLogger());
-        PageEnvelope pageEnvelope = PageEnvelopeFactory.getInstance().getPageEnvelope(map,
-                objectModel);
-
-        Document doc = pageEnvelope.getDocument();
-        String language = doc.getLanguage();
-
-        if (!doc.existsInAnyLanguage()) {
-            throw new DocumentDoesNotExistException("Document " + doc.getId()
-                    + " does not exist. Check sitetree, it might need to be reloaded.");
-        }
-        List availableLanguages = Arrays.asList(doc.getLanguages());
-
-        if (availableLanguages.contains(language)) {
-            return Collections.unmodifiableMap(Collections.EMPTY_MAP);
-        }
-        return null;
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/cocoon/acting/ReservedCheckinAction.java b/src/java/org/apache/lenya/cms/cocoon/acting/ReservedCheckinAction.java
deleted file mode 100644
index 339cef8..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/acting/ReservedCheckinAction.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.cocoon.acting;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.cocoon.environment.Redirector;
-import org.apache.cocoon.environment.SourceResolver;
-import org.apache.lenya.cms.rc.FileReservedCheckInException;
-
-/**
- * Checkin document
- */
-public class ReservedCheckinAction extends RevisionControllerAction {
-    /**
-     * Checkin document
-     * @return HashMap with checkin parameters
-     * @see org.apache.cocoon.acting.Action#act(org.apache.cocoon.environment.Redirector,
-     *      org.apache.cocoon.environment.SourceResolver, java.util.Map, java.lang.String,
-     *      org.apache.avalon.framework.parameters.Parameters)
-     */
-    public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String src,
-            Parameters parameters) throws Exception {
-        super.act(redirector, resolver, objectModel, src, parameters);
-
-        HashMap actionMap = new HashMap();
-
-        boolean backup = true;
-        if (parameters.getParameter("backup", "true").equals("false"))
-            backup = false;
-        getLogger().debug("Backup: " + backup);
-
-        try {
-            getRc().reservedCheckIn(getFilename(), getUsername(), backup, true);
-        } catch (FileReservedCheckInException e) {
-            actionMap.put("exception", "fileReservedCheckInException");
-            actionMap.put("filename", getFilename());
-            actionMap.put("checkType", e.getTypeString());
-            actionMap.put("user", e.getUsername());
-            actionMap.put("date", e.getDate());
-            getLogger().warn(e.getMessage());
-
-            return actionMap;
-        } catch (Exception e) {
-            actionMap.put("exception", "genericException");
-            actionMap.put("filename", getFilename());
-            actionMap.put("message", e.getMessage());
-            getLogger().warn("The document " + getFilename() + " couldn't be checked in");
-
-            return actionMap;
-        }
-
-        return null;
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/cocoon/acting/ReservedCheckoutAction.java b/src/java/org/apache/lenya/cms/cocoon/acting/ReservedCheckoutAction.java
deleted file mode 100644
index d78b927..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/acting/ReservedCheckoutAction.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.cocoon.acting;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.cocoon.environment.Redirector;
-import org.apache.cocoon.environment.SourceResolver;
-import org.apache.lenya.cms.rc.FileReservedCheckOutException;
-
-/**
- * Action doing reserved checkout
- */
-public class ReservedCheckoutAction extends RevisionControllerAction {
-
-    /**
-     * @see org.apache.cocoon.acting.Action#act(org.apache.cocoon.environment.Redirector, org.apache.cocoon.environment.SourceResolver, java.util.Map, java.lang.String, org.apache.avalon.framework.parameters.Parameters)
-     */
-    public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String src,
-            Parameters parameters) throws Exception {
-        super.act(redirector, resolver, objectModel, src, parameters);
-
-        HashMap actionMap = new HashMap();
-
-        //check out
-        try {
-            getLogger().debug(".act(): Filename: " + getFilename());
-            getLogger().debug(".act(): Username: " + getUsername());
-
-            if (getFilename() == null) {
-                throw new Exception("Filename is null");
-            }
-
-            if (getUsername() == null) {
-                throw new Exception("Username is null");
-            }
-
-            getRc().reservedCheckOut(getFilename(), getUsername());
-        } catch (FileReservedCheckOutException e) {
-            actionMap.put("exception", "fileReservedCheckOutException");
-            actionMap.put("filename", getFilename());
-            actionMap.put("user", e.getCheckOutUsername());
-            actionMap.put("date", e.getCheckOutDate());
-            getLogger().warn(
-                    "Document " + getFilename() + " already checked-out by "
-                            + e.getCheckOutUsername() + " since " + e.getCheckOutDate());
-
-            return actionMap;
-        } catch (Exception e) {
-            actionMap.put("exception", "genericException");
-            actionMap.put("filename", getFilename());
-            actionMap.put("message", "" + e.getMessage());
-            getLogger().error("The document " + getFilename() + " couldn't be checked out: ", e);
-
-            return actionMap;
-        }
-
-        return null;
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/cocoon/acting/ReservedCheckoutTestAction.java b/src/java/org/apache/lenya/cms/cocoon/acting/ReservedCheckoutTestAction.java
deleted file mode 100644
index 2df1c15..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/acting/ReservedCheckoutTestAction.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.cocoon.acting;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.cocoon.environment.Redirector;
-import org.apache.cocoon.environment.SourceResolver;
-import org.apache.lenya.cms.rc.FileReservedCheckOutException;
-import org.apache.lenya.cms.rc.RCML;
-import org.apache.lenya.cms.rc.RCMLEntry;
-
-
-/**
- * An action that tests if a document is already checked out by a given user.
- * If it isn't, a check out will be tried.
- */
-
-public class ReservedCheckoutTestAction extends RevisionControllerAction {
-
-    /**
-	 * @see org.apache.cocoon.acting.Action#act(org.apache.cocoon.environment.Redirector, org.apache.cocoon.environment.SourceResolver, java.util.Map, java.lang.String, org.apache.avalon.framework.parameters.Parameters)
-	 */
-	public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String src,
-        Parameters parameters) throws Exception {
-        super.act(redirector, resolver, objectModel, src, parameters);
-
-        HashMap actionMap = new HashMap();
-
-        try {
-            RCMLEntry entry =getRc().getRCML(getFilename()).getLatestEntry();
-
-			if ((entry == null) || (entry.getType() != RCML.co) || !entry.getIdentity().equals(getUsername())) {
-				//check out
-	            getRc().reservedCheckOut(getFilename(),getUsername());   
-			}
-		} catch (FileReservedCheckOutException e) {
-			actionMap.put("exception", "fileReservedCheckOutException");
-			actionMap.put("filename", getFilename());
-			actionMap.put("user", e.getCheckOutUsername());
-			actionMap.put("date", e.getCheckOutDate());
-			getLogger().warn("Document " + getFilename() + " already checked-out by " + e.getCheckOutUsername() + " since " + e.getCheckOutDate());
-
-			return actionMap;
-		} catch (Exception e) {
-			actionMap.put("exception", "genericException");
-			actionMap.put("filename", getFilename());
-			actionMap.put("message", e.getMessage());
-			getLogger().error(".act(): The document " + getFilename() + " couldn't be checked out: ", e);
-
-			return actionMap;
-		}
-        return null;
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/cocoon/acting/ResourceExistsAction.java b/src/java/org/apache/lenya/cms/cocoon/acting/ResourceExistsAction.java
deleted file mode 100644
index 7253675..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/acting/ResourceExistsAction.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.cocoon.acting;
-
-import java.io.File;
-import java.net.URL;
-import java.util.Map;
-
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.avalon.framework.thread.ThreadSafe;
-import org.apache.cocoon.acting.ServiceableAction;
-import org.apache.cocoon.environment.Redirector;
-import org.apache.cocoon.environment.SourceResolver;
-import org.apache.excalibur.source.Source;
-
-
-/**
- * This action simply checks to see if a given resource exists. It checks
- * whether the specified in the src attribute source exists or not.
- * The action returns empty <code>Map</code> if it exists, null otherwise.
- * <p>Instead of src attribute, source can be specified using
- * parameter named 'url' (this is old syntax).
- * <p>In order to differentiate between files and directories, the type can be specified
- * using the parameter 'type' (&lt;map:parameter name="type" value="file"/&gt; or
- * &lt;map:parameter name="type" value="directory"/&gt;). The parameter 'type' is optional.
- * <p>
- * <strong>Note:</strong> {@link org.apache.cocoon.selection.ResourceExistsSelector}
- * should be preferred to this component, as the semantics of a Selector better
- * match the supplied functionality.
- */
-public class ResourceExistsAction extends ServiceableAction implements ThreadSafe {
-    /**
-     * @see org.apache.cocoon.acting.Action#act(org.apache.cocoon.environment.Redirector, org.apache.cocoon.environment.SourceResolver, java.util.Map, java.lang.String, org.apache.avalon.framework.parameters.Parameters)
-     */
-    public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source,
-        Parameters parameters) throws Exception {
-        String urlstring = parameters.getParameter("url", source);
-        String typestring = parameters.getParameter("type", "resource");
-        Source src = null;
-
-        try {
-            src = resolver.resolveURI(urlstring);
-
-            File resource = new File(new URL(src.getURI()).getFile());
-
-            if (typestring.equals("resource") && src.exists()) {
-                getLogger().debug(".act(): Resource (file or directory) exists: " + src.getURI());
-
-                return EMPTY_MAP;
-            } else if (typestring.equals("file") && resource.isFile()) {
-                getLogger().debug(".act(): File exists: " + resource);
-
-                return EMPTY_MAP;
-            } else if (typestring.equals("directory") && resource.isDirectory()) {
-                getLogger().debug(".act(): Directory exists: " + resource);
-
-                return EMPTY_MAP;
-            } else {
-                getLogger().debug(".act(): Resource " + resource + " as type \"" + typestring +
-                    "\" does not exist");
-            }
-        } catch (Exception e) {
-            getLogger().warn(".act(): Exception", e);
-        } finally {
-            resolver.release(src);
-        }
-
-        return null;
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/cocoon/acting/RevisionControllerAction.java b/src/java/org/apache/lenya/cms/cocoon/acting/RevisionControllerAction.java
deleted file mode 100644
index b6f978a..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/acting/RevisionControllerAction.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.cocoon.acting;
-
-import java.io.File;
-import java.util.Map;
-
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.cocoon.acting.ServiceableAction;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Redirector;
-import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.environment.Session;
-import org.apache.cocoon.environment.SourceResolver;
-import org.apache.lenya.ac.Identity;
-import org.apache.lenya.ac.User;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.PageEnvelope;
-import org.apache.lenya.cms.publication.PageEnvelopeFactory;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationFactory;
-import org.apache.lenya.cms.rc.RCEnvironment;
-import org.apache.lenya.cms.rc.RevisionController;
-
-/**
- * Revision controller action.
- * 
- * @version $Id$
- */
-public class RevisionControllerAction extends ServiceableAction {
-
-    private String rcmlDirectory = null;
-    private String backupDirectory = null;
-    private RevisionController rc = null;
-    private String username = null;
-    private String filename = null;
-
-    /**
-     * @see org.apache.cocoon.acting.Action#act(org.apache.cocoon.environment.Redirector,
-     *      org.apache.cocoon.environment.SourceResolver, java.util.Map, java.lang.String,
-     *      org.apache.avalon.framework.parameters.Parameters)
-     */
-    public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String src,
-            Parameters parameters) throws Exception {
-        // Get request object
-        Request request = ObjectModelHelper.getRequest(objectModel);
-
-        if (request == null) {
-            getLogger().error(".act(): No request object");
-
-            return null;
-        }
-
-        PageEnvelope envelope = null;
-        PublicationFactory factory = PublicationFactory.getInstance(getLogger());
-        Publication publication = factory.getPublication(objectModel);
-        DocumentIdentityMap map = new DocumentIdentityMap(this.manager, getLogger());
-        Document document = null;
-
-        try {
-            envelope = PageEnvelopeFactory.getInstance().getPageEnvelope(map, objectModel);
-            publication = envelope.getPublication();
-            document = envelope.getDocument();
-        } catch (Exception e) {
-            getLogger().error("Resolving page envelope failed: ", e);
-            throw e;
-        }
-
-        //get Parameters for RC
-        String publicationPath = publication.getDirectory().getCanonicalPath();
-        RCEnvironment rcEnvironment = RCEnvironment.getInstance(publication.getServletContext()
-                .getCanonicalPath());
-        this.rcmlDirectory = rcEnvironment.getRCMLDirectory();
-        this.rcmlDirectory = publicationPath + File.separator + this.rcmlDirectory;
-        this.backupDirectory = rcEnvironment.getBackupDirectory();
-        this.backupDirectory = publicationPath + File.separator + this.backupDirectory;
-
-        // Initialize Revision Controller
-        this.rc = new RevisionController(this.rcmlDirectory, this.backupDirectory, publicationPath);
-        getLogger().debug("revision controller" + this.rc);
-
-        // /Initialize Revision Controller
-        // Get session
-        Session session = request.getSession(false);
-
-        if (session == null) {
-            getLogger().error(".act(): No session object");
-
-            return null;
-        }
-
-        Identity identity = (Identity) session.getAttribute(Identity.class.getName());
-        getLogger().debug(".act(): Identity: " + identity);
-
-        //FIXME: hack because of the uri for the editor bitflux. The filename
-        // cannot be get from
-        // the page-envelope
-
-        String documentid = document.getId();
-        int bx = documentid.lastIndexOf("-bxe");
-
-        if (bx > 0) {
-            String language = document.getLanguage();
-
-            int l = documentid.length();
-            int bxLength = "-bxe".length();
-            int lang = documentid.lastIndexOf("_", bx);
-            int langLength = bx - lang;
-
-            if (bx > 0 && bx + bxLength <= l) {
-                documentid = documentid.substring(0, bx) + documentid.substring(bx + bxLength, l);
-
-                if (lang > 0 && langLength + lang < l) {
-                    language = documentid.substring(lang + 1, lang + langLength);
-                    documentid = documentid.substring(0, lang)
-                            + documentid.substring(lang + langLength, l - bxLength);
-                }
-            }
-
-            Document srcDoc = map.get(publication, document.getArea(), documentid, language);
-            File newFile = srcDoc.getFile();
-            this.filename = newFile.getCanonicalPath();
-
-        } else {
-            this.filename = document.getFile().getCanonicalPath();
-        }
-
-        this.filename = this.filename.substring(publicationPath.length());
-
-        this.username = null;
-
-        if (identity != null) {
-            User user = identity.getUser();
-            if (user != null) {
-                this.username = user.getId();
-            }
-        } else {
-            getLogger().error(".act(): No identity yet");
-        }
-
-        getLogger().debug(".act(): Username: " + this.username);
-
-        return null;
-    }
-
-    /**
-     * Get the filename.
-     * @return the filename
-     */
-    protected String getFilename() {
-        return this.filename;
-    }
-
-    /**
-     * Get the revision controller.
-     * @return the revision controller
-     */
-    protected RevisionController getRc() {
-        return this.rc;
-    }
-
-    /**
-     * Get the user name.
-     * @return the user name
-     */
-    protected String getUsername() {
-        return this.username;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/cocoon/acting/RollbackAction.java b/src/java/org/apache/lenya/cms/cocoon/acting/RollbackAction.java
deleted file mode 100644
index 24876fa..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/acting/RollbackAction.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.cocoon.acting;
-
-import java.io.FileNotFoundException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Redirector;
-import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.environment.SourceResolver;
-
-
-/**
- * Action to roll back a document to a prior version
- */
-public class RollbackAction extends RevisionControllerAction {
-    /**
-     * This action rolls back a document to a prior version
-     *
-     * @param redirector The redirector
-     * @param resolver The resolver
-     * @param objectModel The object model
-     * @param src The source
-     * @param parameters The parameters
-     *
-     * @return null on failure, the location of the redirect on success
-     *
-     * @throws Exception if an error occurs
-     */
-    public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String src,
-        Parameters parameters) throws Exception {
-        super.act(redirector, resolver, objectModel, src, parameters);
-
-        HashMap actionMap = new HashMap();
-
-        // Get request object
-        Request request = ObjectModelHelper.getRequest(objectModel);
-
-        if (request == null) {
-            getLogger().error("No request object");
-            return null;
-        }
-
-        // Get parameters                                                                                                                       
-        String rollbackTime = request.getParameter("rollbackTime");
-
-        // Do the rollback to an earlier version
-        long newtime = 0;
-
-        try {
-            newtime = getRc().rollback(getFilename(), getUsername(), true, new Long(rollbackTime).longValue());
-        } catch (FileNotFoundException e) {
-            getLogger().error("Unable to roll back!" + e);
-            return null;
-        } catch (Exception e) {
-            getLogger().error("Unable to roll back!" + e);
-            return null;
-        }
-
-        getLogger().debug("rollback complete, old (and now current) time was " + rollbackTime +
-            " backup time is " + newtime);
-
-        String location = request.getHeader("Referer");
-
-        getLogger().debug("redirect to " + location);
-        actionMap.put("location", location);
-
-        return actionMap;
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/cocoon/acting/TaskAction.java b/src/java/org/apache/lenya/cms/cocoon/acting/TaskAction.java
deleted file mode 100644
index f83ee9d..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/acting/TaskAction.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.cocoon.acting;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.cocoon.acting.ServiceableAction;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Redirector;
-import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.environment.Session;
-import org.apache.cocoon.environment.SourceResolver;
-import org.apache.lenya.cms.cocoon.task.CocoonTaskWrapper;
-import org.apache.lenya.cms.task.TaskWrapper;
-
-/**
- * An action that executes a task.
- */
-public class TaskAction extends ServiceableAction {
-    
-    /**
-     * @see org.apache.cocoon.acting.Action#act(org.apache.cocoon.environment.Redirector, org.apache.cocoon.environment.SourceResolver, java.util.Map, java.lang.String, org.apache.avalon.framework.parameters.Parameters)
-     */
-    public java.util.Map act(
-        Redirector redirector,
-        SourceResolver sourceResolver,
-        Map objectModel,
-        String str,
-        Parameters parameters)
-        throws java.lang.Exception {
-
-        TaskWrapper wrapper = new CocoonTaskWrapper(objectModel, parameters, this.manager);
-        wrapper.execute();
-
-        Request request = ObjectModelHelper.getRequest(objectModel);
-
-        //------------------------------------------------------------
-        // get session
-        //------------------------------------------------------------
-        Session session = request.getSession(true);
-
-        if (session == null) {
-            getLogger().error("No session object");
-
-            return null;
-        }
-
-        //------------------------------------------------------------
-        // Return referer
-        //------------------------------------------------------------
-        String parent_uri =
-            (String) session.getAttribute(
-                "org.apache.lenya.cms.cocoon.acting.TaskAction.parent_uri");
-        HashMap actionMap = new HashMap();
-        actionMap.put("parent_uri", parent_uri);
-        session.removeAttribute("org.apache.lenya.cms.cocoon.acting.TaskAction.parent_uri");
-
-        return actionMap;
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/cocoon/acting/WorkflowInvokerAction.java b/src/java/org/apache/lenya/cms/cocoon/acting/WorkflowInvokerAction.java
deleted file mode 100644
index 8d515b7..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/acting/WorkflowInvokerAction.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.cocoon.acting;
-
-import java.util.Collections;
-import java.util.Map;
-
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.cocoon.acting.ServiceableAction;
-import org.apache.cocoon.environment.Redirector;
-import org.apache.cocoon.environment.SourceResolver;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationFactory;
-import org.apache.lenya.cms.workflow.WorkflowUtil;
-
-/**
- * Action to invoke a workflow transition independently from the request document URL. Parameters:
- * <ul>
- * <li><strong>area: </strong> The area.</li>
- * <li><strong>document-id: </strong> The document id.</li>
- * <li><strong>language: </strong> The language.</li>
- * <li><strong>event: </strong> The event to invoke.</li>
- * </ul>
- */
-public class WorkflowInvokerAction extends ServiceableAction {
-
-    /**
-     * <code>AREA</code> The area
-     */
-    public static final String AREA = "area";
-    /**
-     * <code>DOCUMENT_ID</code> The document id
-     */
-    public static final String DOCUMENT_ID = "document-id";
-    /**
-     * <code>LANGUAGE</code> The language
-     */
-    public static final String LANGUAGE = "language";
-    /**
-     * <code>EVENT</code> The event
-     */
-    public static final String EVENT = "event";
-
-    /**
-     * @see org.apache.cocoon.acting.Action#act(org.apache.cocoon.environment.Redirector,
-     *      org.apache.cocoon.environment.SourceResolver, java.util.Map, java.lang.String,
-     *      org.apache.avalon.framework.parameters.Parameters)
-     */
-    public Map act(Redirector redirector,
-            SourceResolver resolver,
-            Map objectModel,
-            String source,
-            Parameters parameters) throws Exception {
-
-        String area = parameters.getParameter(AREA);
-        String documentId = parameters.getParameter(DOCUMENT_ID);
-        String language = parameters.getParameter(LANGUAGE);
-        String eventName = parameters.getParameter(EVENT);
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug(getClass().getName() + " invoked.");
-            getLogger().debug("    Area:        [" + area + "]");
-            getLogger().debug("    Document ID: [" + documentId + "]");
-            getLogger().debug("    Language:    [" + language + "]");
-            getLogger().debug("    Event:       [" + eventName + "]");
-        }
-
-        PublicationFactory pubFactory = PublicationFactory.getInstance(getLogger());
-        Publication pub = pubFactory.getPublication(objectModel);
-        DocumentIdentityMap map = new DocumentIdentityMap(this.manager, getLogger());
-        Document document = map.get(pub, area, documentId, language);
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("    Invoking workflow event");
-        }
-        WorkflowUtil.invoke(this.manager, getLogger(), document, eventName);
-
-        return Collections.EMPTY_MAP;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/cocoon/components/modules/input/AbstractPageEnvelopeModule.java b/src/java/org/apache/lenya/cms/cocoon/components/modules/input/AbstractPageEnvelopeModule.java
deleted file mode 100644
index 827cd09..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/components/modules/input/AbstractPageEnvelopeModule.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.cocoon.components.modules.input;
-
-import java.io.File;
-import java.util.Map;
-
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.cocoon.environment.Context;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Request;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.PageEnvelope;
-import org.apache.lenya.cms.publication.PageEnvelopeFactory;
-import org.apache.lenya.util.ServletHelper;
-
-/**
- * Abstract superclass for classes which need access to the page envelope.
- * 
- * The web application URL can be provided in the attribute name, separated by a colon (":").
- */
-public abstract class AbstractPageEnvelopeModule extends OperationModule {
-
-    /**
-     * Get the the page envelope for the given objectModel.
-     * @param objectModel the objectModel for which the page enevelope is requested.
-     * @param name The attribute name.
-     * @return a <code>PageEnvelope</code>
-     * @throws ConfigurationException if the page envelope could not be instantiated.
-     */
-    protected PageEnvelope getEnvelope(Map objectModel, String name) throws ConfigurationException {
-
-        PageEnvelope envelope = null;
-        String webappUrl = null;
-        Request request = ObjectModelHelper.getRequest(objectModel);
-
-        String[] snippets = name.split(":");
-        if (snippets.length > 1) {
-            webappUrl = snippets[1];
-        } else {
-            webappUrl = ServletHelper.getWebappURI(request);
-        }
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Resolving page envelope for URL [" + webappUrl + "]");
-        }
-
-        String contextPath = request.getContextPath();
-        Context context = ObjectModelHelper.getContext(objectModel);
-        String servletContextPath = context.getRealPath("");
-
-        try {
-            DocumentIdentityMap map = getDocumentIdentityMap();
-            envelope = PageEnvelopeFactory.getInstance().getPageEnvelope(map,
-                    contextPath,
-                    webappUrl,
-                    new File(servletContextPath));
-        } catch (Exception e) {
-            throw new ConfigurationException("Resolving page envelope failed: ", e);
-        }
-
-        return envelope;
-    }
-
-    /**
-     * @param name The original attribute name.
-     * @return The attribute name without URL attachment.
-     */
-    protected String getAttributeName(String name) {
-        final String[] snippets = name.split(":");
-        return snippets[0];
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/cocoon/components/modules/input/AccessControlModule.java b/src/java/org/apache/lenya/cms/cocoon/components/modules/input/AccessControlModule.java
deleted file mode 100644
index c0be5a7..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/components/modules/input/AccessControlModule.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.cocoon.components.modules.input;
-
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.cocoon.components.modules.input.AbstractInputModule;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.environment.Session;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.AccessController;
-import org.apache.lenya.ac.AccessControllerResolver;
-import org.apache.lenya.ac.AccreditableManager;
-import org.apache.lenya.ac.Identity;
-import org.apache.lenya.ac.ItemManager;
-import org.apache.lenya.ac.Machine;
-import org.apache.lenya.ac.Role;
-import org.apache.lenya.ac.User;
-import org.apache.lenya.ac.impl.DefaultAccessController;
-import org.apache.lenya.ac.impl.PolicyAuthorizer;
-
-/**
- * Input module for access control attributes.
- */
-public class AccessControlModule extends AbstractInputModule implements Serviceable {
-
-    /**
-     * <code>USER_ID</code> The user id
-     */
-    public static final String USER_ID = "user-id";
-    /**
-     * <code>USER_NAME</code> The user name
-     */
-    public static final String USER_NAME = "user-name";
-    /**
-     * <code>USER_EMAIL</code> The user email
-     */
-    public static final String USER_EMAIL = "user-email";
-    /**
-     * <code>IP_ADDRESS</code> The IP address
-     */
-    public static final String IP_ADDRESS = "ip-address";
-    /**
-     * <code>ROLE_IDS</code> The role ids
-     */
-    public static final String ROLE_IDS = "role-ids";
-    /**
-     * <code>USER_MANAGER</code> The user manager
-     */
-    public static final String USER_MANAGER = "user-manager";
-    /**
-     * <code>GROUP_MANAGER</code> The group manager
-     */
-    public static final String GROUP_MANAGER = "group-manager";
-    /**
-     * <code>ROLE_MANAGER</code> The role manager
-     */
-    public static final String ROLE_MANAGER = "role-manager";
-    /**
-     * <code>IP_RANGE_MANAGER</code> The IP range manager
-     */
-    public static final String IP_RANGE_MANAGER = "iprange-manager";
-
-    /**
-      * The names of the AccessControlModule parameters.
-      */
-    static final String[] PARAMETER_NAMES =
-        {
-            IP_ADDRESS,
-            USER_ID,
-            USER_NAME,
-            USER_EMAIL,
-            ROLE_IDS,
-            USER_MANAGER,
-            GROUP_MANAGER,
-            ROLE_MANAGER,
-            IP_RANGE_MANAGER };
-
-    /**
-     *
-     * @see org.apache.cocoon.components.modules.input.InputModule#getAttribute(java.lang.String, org.apache.avalon.framework.configuration.Configuration, java.util.Map)
-     */
-    public Object getAttribute(String name, Configuration modeConf, Map objectModel)
-        throws ConfigurationException {
-
-        Request request = ObjectModelHelper.getRequest(objectModel);
-        Session session = request.getSession();
-        Object value = null;
-
-        if (!Arrays.asList(PARAMETER_NAMES).contains(name)) {
-            throw new ConfigurationException("The attribute [" + name + "] is not supported!");
-        }
-
-        if (session != null) {
-            Identity identity = (Identity) session.getAttribute(Identity.class.getName());
-            if (identity != null) {
-                if (name.equals(USER_ID)) {
-                    User user = identity.getUser();
-                    if (user != null) {
-                        value = user.getId();
-                    }
-                } else if (name.equals(USER_NAME)) {
-                    User user = identity.getUser();
-                    if (user != null) {
-                        value = user.getName();
-                    }
-                } else if (name.equals(USER_EMAIL)) {
-                    User user = identity.getUser();
-                    if (user != null) {
-                        value = user.getEmail();
-                    }
-                } else if (name.equals(IP_ADDRESS)) {
-                    Machine machine = identity.getMachine();
-                    if (machine != null) {
-                        value = machine.getIp();
-                    }
-                } else if (name.equals(ROLE_IDS)) {
-                    try {
-                        Role[] roles = PolicyAuthorizer.getRoles(request);
-                        StringBuffer buf = new StringBuffer();
-                        for (int i = 0; i < roles.length; i++) {
-                            if (i > 0) {
-                                buf.append(",");
-                            }
-                            buf.append(roles[i].getId());
-                        }
-                        value = buf.toString();
-                    } catch (AccessControlException e) {
-                        throw new ConfigurationException(
-                            "Obtaining value for attribute [" + name + "] failed: ",
-                            e);
-                    }
-                }
-            }
-        }
-
-        if (name.equals(USER_MANAGER)
-            || name.equals(GROUP_MANAGER)
-            || name.equals(ROLE_MANAGER)
-            || name.equals(IP_RANGE_MANAGER)) {
-            value = getItemManager(request, name);
-        }
-
-        return value;
-    }
-
-    /**
-     * @see org.apache.cocoon.components.modules.input.InputModule#getAttributeNames(org.apache.avalon.framework.configuration.Configuration, java.util.Map)
-     */
-    public Iterator getAttributeNames(Configuration modeConf, Map objectModel)
-        throws ConfigurationException {
-        return Arrays.asList(PARAMETER_NAMES).iterator();
-    }
-
-    /**
-     * @see org.apache.cocoon.components.modules.input.InputModule#getAttributeValues(java.lang.String, org.apache.avalon.framework.configuration.Configuration, java.util.Map)
-     */
-    public Object[] getAttributeValues(String name, Configuration modeConf, Map objectModel)
-        throws ConfigurationException {
-        Object[] objects = { getAttribute(name, modeConf, objectModel)};
-
-        return objects;
-    }
-
-    /**
-     * Returns the item manager for a certain name.
-     * @param request The request.
-     * @param name The name of the manager ({@link #USER_MANAGER},
-     * {@link #ROLE_MANAGER}, {@link #GROUP_MANAGER}, or {@link #IP_RANGE_MANAGER}
-     * @return An item manager.
-     * @throws ConfigurationException when something went wrong.
-     */
-    protected ItemManager getItemManager(Request request, String name)
-        throws ConfigurationException {
-        AccessController accessController = null;
-        ServiceSelector selector = null;
-        AccessControllerResolver resolver = null;
-        ItemManager itemManager = null;
-
-        try {
-            selector = (ServiceSelector) this.manager.lookup(AccessControllerResolver.ROLE + "Selector");
-            resolver =
-                (AccessControllerResolver) selector.select(
-                    AccessControllerResolver.DEFAULT_RESOLVER);
-
-            String requestURI = request.getRequestURI();
-            String context = request.getContextPath();
-            if (context == null) {
-                context = "";
-            }
-            String url = requestURI.substring(context.length());
-            accessController = resolver.resolveAccessController(url);
-
-            AccreditableManager accreditableManager =
-                ((DefaultAccessController) accessController).getAccreditableManager();
-
-            if (name.equals(USER_MANAGER)) {
-                itemManager = accreditableManager.getUserManager();
-            } else if (name.equals(GROUP_MANAGER)) {
-                itemManager = accreditableManager.getGroupManager();
-            } else if (name.equals(ROLE_MANAGER)) {
-                itemManager = accreditableManager.getRoleManager();
-            } else if (name.equals(IP_RANGE_MANAGER)) {
-                itemManager = accreditableManager.getIPRangeManager();
-            }
-
-        } catch (Exception e) {
-            throw new ConfigurationException("Obtaining item manager failed: ", e);
-        } finally {
-            if (selector != null) {
-                if (resolver != null) {
-                    if (accessController != null) {
-                        resolver.release(accessController);
-                    }
-                    selector.release(resolver);
-                }
-                this.manager.release(selector);
-            }
-        }
-
-        return itemManager;
-    }
-
-    private ServiceManager manager;
-
-    /**
-     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service(ServiceManager _manager) throws ServiceException {
-        this.manager = _manager;
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/cocoon/components/modules/input/DocumentURLModule.java b/src/java/org/apache/lenya/cms/cocoon/components/modules/input/DocumentURLModule.java
deleted file mode 100644
index d99689d..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/components/modules/input/DocumentURLModule.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.cocoon.components.modules.input;
-
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.lenya.cms.publication.util.DocumentHelper;
-
-/**
- * <p>
- * This module constructs the document url taking into account difference in the language .version
- * being created and used.
- * </p>
- * <p>
- * Example:
- * <code>{document-url:{page-envelope:area}:{page-envelope:document-id}:{page-envelope:document-language}}</code>
- * </p>
- * @version $Id$
- */
-public class DocumentURLModule extends AbstractPageEnvelopeModule {
-
-    /**
-     * @see org.apache.cocoon.components.modules.input.InputModule#getAttribute(java.lang.String,
-     *      org.apache.avalon.framework.configuration.Configuration, java.util.Map)
-     */
-    public Object getAttribute(String name, Configuration modeConf, Map objectModel)
-            throws ConfigurationException {
-
-        String url;
-
-        final String[] attributes = name.split(":");
-
-        if (attributes.length < 3) {
-            throw new ConfigurationException("Invalid number of parameters: " + attributes.length
-                    + ". Expected 3 (area, document-id, language)");
-        }
-
-        final String area = attributes[0];
-        final String documentId = attributes[1];
-        final String language = attributes[2];
-
-        try {
-            DocumentHelper helper = new DocumentHelper(this.manager, objectModel);
-            url = helper.getDocumentUrl(documentId, area, language);
-        } catch (Exception e) {
-            throw new ConfigurationException("Resolving attribute [" + name + "] failed: ", e);
-        }
-
-        return url;
-    }
-
-    /**
-     * @see org.apache.cocoon.components.modules.input.InputModule#getAttributeNames(org.apache.avalon.framework.configuration.Configuration,
-     *      java.util.Map)
-     */
-    public Iterator getAttributeNames(Configuration modeConf, Map objectModel)
-            throws ConfigurationException {
-        return Collections.EMPTY_SET.iterator();
-    }
-
-    /**
-     * @see org.apache.cocoon.components.modules.input.InputModule#getAttributeValues(java.lang.String,
-     *      org.apache.avalon.framework.configuration.Configuration, java.util.Map)
-     */
-    public Object[] getAttributeValues(String name, Configuration modeConf, Map objectModel)
-            throws ConfigurationException {
-        Object[] objects = { getAttribute(name, modeConf, objectModel) };
-        return objects;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/cocoon/components/modules/input/DublinCoreModule.java b/src/java/org/apache/lenya/cms/cocoon/components/modules/input/DublinCoreModule.java
deleted file mode 100644
index 4efb6d5..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/components/modules/input/DublinCoreModule.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.cocoon.components.modules.input;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.lenya.cms.metadata.MetaData;
-import org.apache.lenya.cms.metadata.dublincore.DublinCoreImpl;
-import org.apache.lenya.cms.publication.Document;
-
-/**
- * Input module to access the dublin core values.
- */
-public class DublinCoreModule extends AbstractPageEnvelopeModule {
-
-    /**
-     * @see org.apache.cocoon.components.modules.input.InputModule#getAttribute(java.lang.String,
-     *      org.apache.avalon.framework.configuration.Configuration,
-     *      java.util.Map)
-     */
-    public Object getAttribute(String name, Configuration modeConf, Map objectModel)
-            throws ConfigurationException {
-
-        Object value;
-        try {
-            Document document = getEnvelope(objectModel, name).getDocument();
-            if (document == null) {
-                throw new ConfigurationException("There is no document for this page envelope!");
-            }
-            MetaData dc = document.getMetaDataManager().getDublinCoreMetaData();
-
-            if (! dc.isValidAttribute(name)) {
-                throw new ConfigurationException("The attribute [" + name + "] is not supported!");
-            }
-
-            value = dc.getFirstValue(name);
-        } catch (Exception e) {
-            throw new ConfigurationException("Obtaining dublin core value for [" + name
-                    + "] failed: ", e);
-        }
-
-        return value;
-    }
-
-    /**
-     * @see org.apache.cocoon.components.modules.input.InputModule#getAttributeNames(org.apache.avalon.framework.configuration.Configuration,
-     *      java.util.Map)
-     */
-    public Iterator getAttributeNames(Configuration modeConf, Map objectModel)
-            throws ConfigurationException {
-
-        // calling static method on DublinCoreImpl is a work-around
-        // because we do not have access to an instance here, because
-        // the page envelope cannot be read here.
-        List names = DublinCoreImpl.getAttributeNames();
-
-        return names.iterator();
-    }
-
-    /**
-     * @see org.apache.cocoon.components.modules.input.InputModule#getAttributeValues(java.lang.String,
-     *      org.apache.avalon.framework.configuration.Configuration,
-     *      java.util.Map)
-     */
-    public Object[] getAttributeValues(String name, Configuration modeConf, Map objectModel)
-            throws ConfigurationException {
-        Object[] objects = { getAttribute(name, modeConf, objectModel) };
-        return objects;
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/cocoon/components/modules/input/FallbackModule.java b/src/java/org/apache/lenya/cms/cocoon/components/modules/input/FallbackModule.java
deleted file mode 100644
index d775c7f..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/components/modules/input/FallbackModule.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.cocoon.components.modules.input;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.excalibur.source.SourceUtil;
-
-/**
- * <p>
- * This module checks if a file exists in a publiation, and if not, it chooses the core file. The
- * attribute name must a path relatively to the <code>webapps/lenya/lenya</code> directory.
- * </p>
- * <p>
- * Example: <code>{fallback:xslt/style.xsl}</code> looks if
- * <code>lenya/pubs/(publication-id)/lenya/xslt/style.xsl</code> exists, and if not, it uses
- * <code>lenya/xslt/style.xsl</code>.
- * 
- * @version $Id$
- */
-public class FallbackModule extends AbstractPageEnvelopeModule {
-
-    private String[] baseUris;
-
-    /**
-     * <code>PATH_PREFIX</code> The path prefix from the webapp
-     */
-    public static final String PATH_PREFIX = "lenya/";
-
-    protected static final String ELEMENT_PATH = "directory";
-
-    protected static final String ATTRIBUTE_SRC = "src";
-
-    /**
-     * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
-     */
-    public void configure(Configuration conf) throws ConfigurationException {
-        super.configure(conf);
-
-        Configuration[] pathConfigs = conf.getChildren(ELEMENT_PATH);
-        List baseUriList = new ArrayList();
-
-        SourceResolver resolver = null;
-        try {
-            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-            Source source = null;
-            for (int i = 0; i < pathConfigs.length; i++) {
-                String uri = pathConfigs[i].getAttribute(ATTRIBUTE_SRC);
-                try {
-                    source = resolver.resolveURI(uri);
-                    if (source.exists()) {
-                        File file = SourceUtil.getFile(source);
-                        if (file.isDirectory()) {
-                            baseUriList.add(uri);
-                        } else {
-                            getLogger().warn("Omitting path [" + uri + "] (not a directory).");
-                        }
-                    } else {
-                        getLogger().warn("Omitting path [" + uri + "] (does not exist).");
-                    }
-                } catch (Exception e) {
-                    getLogger().error("Could not resolve path [" + uri + "]: ", e);
-                    throw e;
-                } finally {
-                    if (source != null) {
-                        resolver.release(source);
-                    }
-                }
-            }
-        } catch (Exception e) {
-            throw new ConfigurationException("Configuring failed: ", e);
-        } finally {
-            if (resolver != null) {
-                this.manager.release(resolver);
-            }
-        }
-
-        this.baseUris = (String[]) baseUriList.toArray(new String[baseUriList.size()]);
-    }
-
-    /**
-     * @see org.apache.cocoon.components.modules.input.InputModule#getAttribute(java.lang.String,
-     *      org.apache.avalon.framework.configuration.Configuration, java.util.Map)
-     */
-    public Object getAttribute(String name, Configuration modeConf, Map objectModel)
-            throws ConfigurationException {
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Resolving file for path [" + name + "]");
-        }
-
-        String resolvedUri = resolveURI(name, objectModel);
-        return resolvedUri;
-    }
-
-    /**
-     * Resolves the URI for a certain path.
-     * @param path The path.
-     * @param objectModel The object model.
-     * @return A string.
-     * @throws ConfigurationException if an error occurs.
-     */
-    protected String resolveURI(final String path, Map objectModel) throws ConfigurationException {
-        String resolvedUri = null;
-        String checkedUris = "\n";
-
-        SourceResolver resolver = null;
-        try {
-            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-
-            String[] _baseUris = getBaseURIs(objectModel, path);
-            Source source = null;
-            int i = 0;
-            while (resolvedUri == null && i < _baseUris.length) {
-                String uri = _baseUris[i] + "/" + path;
-
-                checkedUris += uri + "\n";
-
-                if (getLogger().isDebugEnabled()) {
-                    getLogger().debug("Trying to resolve URI [" + uri + "]");
-                }
-
-                try {
-                    source = resolver.resolveURI(uri);
-                    if (source.exists()) {
-                        resolvedUri = uri;
-                    } else {
-                        if (getLogger().isDebugEnabled()) {
-                            getLogger().debug("Skipping URI [" + uri + "] (does not exist).");
-                        }
-                    }
-                } catch (Exception e) {
-                    getLogger().error("Could not resolve URI [" + uri + "]: ", e);
-                    throw e;
-                } finally {
-                    if (source != null) {
-                        resolver.release(source);
-                    }
-                }
-                i++;
-            }
-
-        } catch (Exception e) {
-            throw new ConfigurationException("Resolving attribute [" + path + "] failed: ", e);
-        } finally {
-            if (resolver != null) {
-                this.manager.release(resolver);
-            }
-        }
-
-        if (resolvedUri == null) {
-            /*
-            throw new ConfigurationException("Could not resolve file for path [" + path + "]."
-                    + "\nChecked URIs:" + checkedUris);
-            */
-            resolvedUri = this.baseUris[this.baseUris.length - 1] + "/" + path;
-            if (getLogger().isDebugEnabled()) {
-                getLogger().debug("No URI resolved, choosing last defined URI: [" + resolvedUri + "]");
-            }
-        }
-        else {
-            if (getLogger().isDebugEnabled()) {
-                getLogger().debug("Resolved URI: [" + resolvedUri + "]");
-            }
-        }
-        return resolvedUri;
-    }
-
-    /**
-     * Returns the base directory URIs in the order they should be traversed.
-     * @param objectModel The object model.
-     * @param attributeName The name of the module attribute.
-     * @return An array of strings.
-     * @throws ConfigurationException if an error occurs.
-     */
-    protected String[] getBaseURIs(Map objectModel, String attributeName) throws ConfigurationException {
-        return this.baseUris;
-    }
-
-    /**
-     * @see org.apache.cocoon.components.modules.input.InputModule#getAttributeNames(org.apache.avalon.framework.configuration.Configuration,
-     *      java.util.Map)
-     */
-    public Iterator getAttributeNames(Configuration modeConf, Map objectModel)
-            throws ConfigurationException {
-        return Collections.EMPTY_SET.iterator();
-    }
-
-    /**
-     * @see org.apache.cocoon.components.modules.input.InputModule#getAttributeValues(java.lang.String,
-     *      org.apache.avalon.framework.configuration.Configuration, java.util.Map)
-     */
-    public Object[] getAttributeValues(String name, Configuration modeConf, Map objectModel)
-            throws ConfigurationException {
-        Object[] objects = { getAttribute(name, modeConf, objectModel) };
-
-        return objects;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/cocoon/components/modules/input/OperationModule.java b/src/java/org/apache/lenya/cms/cocoon/components/modules/input/OperationModule.java
deleted file mode 100644
index f5c3acd..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/components/modules/input/OperationModule.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.cocoon.components.modules.input;
-
-import org.apache.avalon.framework.activity.Initializable;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.cocoon.components.modules.input.AbstractInputModule;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.transaction.Operation;
-import org.apache.lenya.transaction.UnitOfWork;
-import org.apache.lenya.transaction.UnitOfWorkImpl;
-
-/**
- * Super class for operation-based input modules.
- *
- * @version $Id$ 
- */
-public class OperationModule extends AbstractInputModule implements Operation, Serviceable, Initializable {
-
-    /**
-     * Ctor.
-     */
-    public OperationModule() {
-        super();
-    }
-
-    private UnitOfWork unitOfWork;
-    
-    private DocumentIdentityMap documentIdentityMap;
-    
-    protected DocumentIdentityMap getDocumentIdentityMap() {
-        if (this.documentIdentityMap == null) {
-            this.documentIdentityMap = new DocumentIdentityMap(this.manager, getLogger());
-        }
-        return this.documentIdentityMap;
-    }
-
-    /**
-     * Retrieves a unit-of-work, which gives the operation access to business
-     * objects affected by the operation.
-     *
-     * @return a UnitOfWork, the interface to access the objects
-     * @throws ServiceException if the unit-of-work component can not be initialized by the component framework
-     *
-     * @see org.apache.lenya.transaction.Operation#getUnitOfWork()
-     */
-    public UnitOfWork getUnitOfWork() throws ServiceException {
-        if (this.unitOfWork == null) {
-           if (getLogger().isDebugEnabled())
-               getLogger().debug("OperationModule.getUnitOfWork() does not yet have instance.");
-
-           this.unitOfWork = new UnitOfWorkImpl();
-           this.unitOfWork.setIdentityMap(getDocumentIdentityMap());
-        }
-
-        return this.unitOfWork;
-    }
-
-
-    protected ServiceManager manager;
-
-    /**
-     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service(ServiceManager _manager) throws ServiceException {
-        this.manager = _manager;
-    }
-
-    /**
-     * @see org.apache.avalon.framework.activity.Initializable#initialize()
-     */
-    public void initialize() throws Exception {
-       // do nothing
-    }
-
-    /**
-     * @see org.apache.avalon.framework.activity.Disposable#dispose()
-     */
-    public void dispose() {
-        if (this.manager != null) {
-            if (this.unitOfWork != null) {
-                this.manager.release(this.unitOfWork);
-            }
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.transaction.Operation#setUnitOfWork(org.apache.lenya.transaction.UnitOfWork)
-     */
-    public void setUnitOfWork(UnitOfWork unit) {
-        this.unitOfWork = unit;
-    }
-    
-}
diff --git a/src/java/org/apache/lenya/cms/cocoon/components/modules/input/PageEnvelopeModule.java b/src/java/org/apache/lenya/cms/cocoon/components/modules/input/PageEnvelopeModule.java
deleted file mode 100644
index 615d5f0..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/components/modules/input/PageEnvelopeModule.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.cocoon.components.modules.input;
-
-import java.text.SimpleDateFormat;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.commons.lang.StringUtils;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentException;
-import org.apache.lenya.cms.publication.DocumentType;
-import org.apache.lenya.cms.publication.PageEnvelope;
-
-/**
- * Input module wrapping the page envelope. This module provides publication
- * related information such as document-id, area, publication-id.
- * 
- * @see org.apache.lenya.cms.publication.PageEnvelope
- */
-public class PageEnvelopeModule extends AbstractPageEnvelopeModule {
-
-    protected static final String URI_PARAMETER_DOCTYPE = "doctype";
-
-    /**
-     * @see org.apache.cocoon.components.modules.input.InputModule#getAttribute(java.lang.String,
-     *      org.apache.avalon.framework.configuration.Configuration,
-     *      java.util.Map)
-     */
-    public Object getAttribute(final String attributeName, Configuration modeConf, Map objectModel)
-            throws ConfigurationException {
-        
-        final String name = getAttributeName(attributeName);
-
-        if (!Arrays.asList(PageEnvelope.PARAMETER_NAMES).contains(name)) {
-            throw new ConfigurationException("The attribute [" + name + "] is not supported!");
-        }
-
-        PageEnvelope envelope = getEnvelope(objectModel, attributeName);
-        Object value = null;
-
-        try {
-            if (name.equals(PageEnvelope.AREA)) {
-                value = envelope.getArea();
-            } else if (name.equals(PageEnvelope.CONTEXT)) {
-                value = envelope.getContext();
-            } else if (name.equals(PageEnvelope.PUBLICATION_ID)) {
-                value = envelope.getPublication().getId();
-            } else if (name.equals(PageEnvelope.PUBLICATION)) {
-                value = envelope.getPublication();
-            } else if (name.equals(PageEnvelope.PUBLICATION_LANGUAGES_CSV)) {
-                value = StringUtils.join(envelope.getPublication().getLanguages(), ',');
-            } else if (name.equals(PageEnvelope.DEFAULT_LANGUAGE)) {
-                value = envelope.getPublication().getDefaultLanguage();
-            } else if (name.equals(PageEnvelope.BREADCRUMB_PREFIX)) {
-                value = envelope.getPublication().getBreadcrumbPrefix();
-            }
-
-            Document document = envelope.getDocument();
-            if (document != null) {
-                if (name.equals(PageEnvelope.DOCUMENT)) {
-                    value = document;
-                } else if (name.equals(PageEnvelope.DOCUMENT_ID)) {
-                    value = document.getId();
-                } else if (name.equals(PageEnvelope.DOCUMENT_NAME)) {
-                    value = document.getName();
-                } else if (name.equals(PageEnvelope.DOCUMENT_LABEL)) {
-                    value = document.getLabel();
-                } else if (name.equals(PageEnvelope.DOCUMENT_URL)) {
-                    value = document.getCanonicalDocumentURL();
-                } else if (name.equals(PageEnvelope.DOCUMENT_URL_WITHOUT_LANGUAGE)) {
-                    value = document.getCanonicalWebappURL();
-                } else if (name.equals(PageEnvelope.DOCUMENT_PATH)) {
-                    value = envelope.getDocumentPath();
-                } else if (name.equals(PageEnvelope.DOCUMENT_FILE)) {
-                    value = document.getFile();
-                } else if (name.equals(PageEnvelope.DOCUMENT_EXTENSION)) {
-                    value = document.getExtension();
-                } else if (name.equals(PageEnvelope.DOCUMENT_LANGUAGE)) {
-                    value = document.getLanguage();
-                } else if (name.equals(PageEnvelope.DOCUMENT_LANGUAGES)) {
-                    value = document.getLanguages();
-                } else if (name.equals(PageEnvelope.DOCUMENT_LANGUAGES_CSV)) {
-                    value = StringUtils.join(document.getLanguages(), ',');
-                } else if (name.equals(PageEnvelope.DOCUMENT_LASTMODIFIED)) {
-                    Date date = document.getLastModified();
-                    value = new SimpleDateFormat(DATE_FORMAT).format(date);
-                } else if (name.equals(PageEnvelope.DOCUMENT_TYPE)) {
-                    DocumentType resourceType = document.getResourceType();
-                    if (resourceType == null) {
-                        value = null;
-                    }
-                    else {
-                        value = resourceType.getName();
-                    }
-                }
-            }
-        } catch (final DocumentException e) {
-            throw new ConfigurationException("Getting attribute for name [" + name + "] failed: ",
-                    e);
-        }
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Returning [" + name + "] = [" + value + "]");
-        }
-
-        return value;
-    }
-
-    /**
-     * <code>DATE_FORMAT</code> The date format
-     */
-    public static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
-
-    /**
-     * @see org.apache.cocoon.components.modules.input.InputModule#getAttributeNames(org.apache.avalon.framework.configuration.Configuration,
-     *      java.util.Map)
-     */
-    public Iterator getAttributeNames(Configuration modeConf, Map objectModel)
-            throws ConfigurationException {
-        return Arrays.asList(PageEnvelope.PARAMETER_NAMES).iterator();
-    }
-
-    /**
-     * @see org.apache.cocoon.components.modules.input.InputModule#getAttributeValues(java.lang.String,
-     *      org.apache.avalon.framework.configuration.Configuration,
-     *      java.util.Map)
-     */
-    public Object[] getAttributeValues(String name, Configuration modeConf, Map objectModel)
-            throws ConfigurationException {
-        Object[] objects = { getAttribute(name, modeConf, objectModel) };
-
-        return objects;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/cocoon/components/modules/input/ProxyUrlModule.java b/src/java/org/apache/lenya/cms/cocoon/components/modules/input/ProxyUrlModule.java
deleted file mode 100644
index 3bfa8e0..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/components/modules/input/ProxyUrlModule.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.cocoon.components.modules.input;
-
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.cocoon.components.modules.input.AbstractInputModule;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Request;
-import org.apache.lenya.ac.AccessController;
-import org.apache.lenya.ac.AccessControllerResolver;
-import org.apache.lenya.ac.AccreditableManager;
-import org.apache.lenya.ac.Authorizer;
-import org.apache.lenya.ac.Policy;
-import org.apache.lenya.ac.PolicyManager;
-import org.apache.lenya.ac.impl.DefaultAccessController;
-import org.apache.lenya.ac.impl.PolicyAuthorizer;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.PageEnvelope;
-import org.apache.lenya.cms.publication.PageEnvelopeFactory;
-import org.apache.lenya.cms.publication.Proxy;
-import org.apache.lenya.cms.publication.Publication;
-
-/**
- * Input module for getting the proxied URL of a document.
- * 
- * <p>
- * Usage: <code>{proxy-url:{area}:{document-id}:{language}}</code>
- * </p>
- * 
- * <p>
- * If there are no proxy settings in the file conf/publication.xconf, the values of the request
- * parameters 'server name' and 'port' will be used to construct the URL.
- * </p>
- * 
- * @version $Id:$
- */
-public class ProxyUrlModule extends AbstractInputModule implements Serviceable {
-
-    private ServiceManager manager;
-
-    /**
-     * @see org.apache.cocoon.components.modules.input.InputModule#getAttribute(java.lang.String,
-     *      org.apache.avalon.framework.configuration.Configuration, java.util.Map)
-     */
-    public Object getAttribute(String name, Configuration modeConf, Map objectModel)
-            throws ConfigurationException {
-
-        ServiceSelector serviceSelector = null;
-        PolicyManager policyManager = null;
-        AccessControllerResolver acResolver = null;
-        AccreditableManager accreditableManager = null;
-
-        // Get parameters
-        final String[] attributes = name.split(":");
-
-        if (attributes.length < 3) {
-            throw new ConfigurationException("Invalid number of parameters: " + attributes.length
-                    + ". Expected area, document-id, language.");
-        }
-
-        final String area = attributes[0];
-        final String documentId = attributes[1];
-        final String language = attributes[2];
-
-        String value = null;
-        try {
-            DocumentIdentityMap map = new DocumentIdentityMap(this.manager, getLogger());
-            PageEnvelope envelope = PageEnvelopeFactory.getInstance().getPageEnvelope(map,
-                    objectModel);
-            Publication publication = envelope.getPublication();
-
-            Document doc = map.get(publication, area, documentId, language);
-
-            // Get proxy for document
-            serviceSelector = (ServiceSelector) this.manager.lookup(AccessControllerResolver.ROLE
-                    + "Selector");
-            acResolver = (AccessControllerResolver) serviceSelector
-                    .select(AccessControllerResolver.DEFAULT_RESOLVER);
-
-            String url = doc.getCanonicalWebappURL();
-            AccessController accessController = acResolver.resolveAccessController(url);
-            if (accessController instanceof DefaultAccessController) {
-                DefaultAccessController defaultAccessController = (DefaultAccessController) accessController;
-                accreditableManager = defaultAccessController.getAccreditableManager();
-                Authorizer[] authorizers = defaultAccessController.getAuthorizers();
-                for (int i = 0; i < authorizers.length; i++) {
-                    if (authorizers[i] instanceof PolicyAuthorizer) {
-                        PolicyAuthorizer policyAuthorizer = (PolicyAuthorizer) authorizers[i];
-                        policyManager = policyAuthorizer.getPolicyManager();
-                    }
-                }
-            }
-
-            Policy policy = policyManager.getPolicy(accreditableManager, url);
-
-            Proxy proxy = doc.getPublication().getProxy(doc, policy.isSSLProtected());
-
-            if (proxy != null) {
-                value = proxy.getURL(doc);
-            } else {
-                // Take server name and port from request.
-                Request request = ObjectModelHelper.getRequest(objectModel);
-                value = "http://" + request.getServerName() + ":" + request.getServerPort()
-                        + request.getContextPath() + doc.getCanonicalWebappURL();
-            }
-
-        } catch (Exception e) {
-            throw new ConfigurationException("Obtaining value for [" + name + "] failed: ", e);
-        }
-        return value;
-    }
-
-    /**
-     * @see org.apache.cocoon.components.modules.input.InputModule#getAttributeNames(org.apache.avalon.framework.configuration.Configuration,
-     *      java.util.Map)
-     */
-    public Iterator getAttributeNames(Configuration modeConf, Map objectModel)
-            throws ConfigurationException {
-        return Collections.EMPTY_SET.iterator();
-    }
-
-    /**
-     * @see org.apache.cocoon.components.modules.input.InputModule#getAttributeValues(java.lang.String,
-     *      org.apache.avalon.framework.configuration.Configuration, java.util.Map)
-     */
-    public Object[] getAttributeValues(String name, Configuration modeConf, Map objectModel)
-            throws ConfigurationException {
-        Object[] objects = { getAttribute(name, modeConf, objectModel) };
-        return objects;
-    }
-
-    /**
-     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service(ServiceManager manager) throws ServiceException {
-        this.manager = manager;
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/cocoon/components/modules/input/PublicationFallbackModule.java b/src/java/org/apache/lenya/cms/cocoon/components/modules/input/PublicationFallbackModule.java
deleted file mode 100644
index 15c90da..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/components/modules/input/PublicationFallbackModule.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.cocoon.components.modules.input;
-
-import java.util.Map;
-
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.lenya.cms.publication.PageEnvelope;
-import org.apache.lenya.cms.publication.Publication;
-
-/**
- * Publication Fallback Module
- */
-public class PublicationFallbackModule extends FallbackModule {
-
-    /**
-     * Ctor.
-     */
-    public PublicationFallbackModule() {
-        super();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.cocoon.components.modules.input.FallbackModule#getBaseURIs(java.util.Map,
-     *      java.lang.String)
-     */
-    protected String[] getBaseURIs(Map objectModel, String name) throws ConfigurationException {
-        String[] superUris = super.getBaseURIs(objectModel, name);
-        String[] uris = new String[superUris.length + 1];
-
-        PageEnvelope envelope = getEnvelope(objectModel, name);
-        String publicationId = envelope.getPublication().getId();
-
-        String publicationUri = "context://" + Publication.PUBLICATION_PREFIX_URI + "/"
-                + publicationId + "/lenya";
-        uris[0] = publicationUri;
-
-        for (int i = 0; i < superUris.length; i++) {
-            uris[i + 1] = superUris[i];
-        }
-
-        return uris;
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/cocoon/components/modules/input/PublicationTemplateFallbackModule.java b/src/java/org/apache/lenya/cms/cocoon/components/modules/input/PublicationTemplateFallbackModule.java
deleted file mode 100644
index 676edad..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/components/modules/input/PublicationTemplateFallbackModule.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.cocoon.components.modules.input;
-
-import java.util.Map;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.excalibur.source.SourceUtil;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationFactory;
-import org.apache.lenya.cms.publication.templating.ExistingSourceResolver;
-import org.apache.lenya.cms.publication.templating.PublicationTemplateManager;
-
-/**
- * This module uses publication templating to resolve the real path for a resource. The current
- * publication ID can be provided as a parameter: <code>{fallback:{pub-id}:foo/bar}</code>. This
- * is especially useful for cocoon:// request which are triggered from non-environment components
- * (e.g. the scheduler).
- * 
- * @version $Id$
- */
-public class PublicationTemplateFallbackModule extends AbstractPageEnvelopeModule {
-
-    /**
-     * Ctor.
-     */
-    public PublicationTemplateFallbackModule() {
-        super();
-    }
-
-    /**
-     * @see org.apache.cocoon.components.modules.input.InputModule#getAttribute(java.lang.String,
-     *      org.apache.avalon.framework.configuration.Configuration, java.util.Map)
-     */
-    public Object getAttribute(final String name, Configuration modeConf, Map objectModel)
-            throws ConfigurationException {
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Resolving publication template for file [" + name + "]");
-        }
-
-        String resolvedUri = null;
-        PublicationTemplateManager templateManager = null;
-
-        try {
-            templateManager = (PublicationTemplateManager) this.manager
-                    .lookup(PublicationTemplateManager.ROLE);
-            PublicationFactory factory = PublicationFactory.getInstance(getLogger());
-            Publication publication;
-            String targetUri = null;
-
-            // check if publication ID is provided in attribute name
-            if (name.indexOf(":") > -1) {
-                String[] parts = name.split(":");
-                if (parts.length > 2) {
-                    throw new RuntimeException(
-                            "The attribute may not contain more than one colons!");
-                }
-                String publicationId = parts[0];
-                targetUri = parts[1];
-
-                if (getLogger().isDebugEnabled()) {
-                    getLogger().debug("Publication ID provided explicitely: [" + publicationId
-                            + "]");
-                }
-
-                SourceResolver resolver = null;
-                Source source = null;
-                try {
-                    resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-                    source = resolver.resolveURI("context://");
-                    String contextPath = SourceUtil.getFile(source).getAbsolutePath();
-                    publication = factory.getPublication(publicationId, contextPath);
-                } finally {
-                    if (resolver != null) {
-                        if (source != null) {
-                            resolver.release(source);
-                        }
-                        this.manager.release(resolver);
-                    }
-                }
-            } else {
-                publication = factory.getPublication(objectModel);
-                targetUri = name;
-                if (getLogger().isDebugEnabled()) {
-                    getLogger().debug("Publication resolved from request: [" + publication.getId()
-                            + "]");
-                }
-            }
-            ExistingSourceResolver resolver = new ExistingSourceResolver();
-            templateManager.visit(publication, targetUri, resolver);
-            resolvedUri = resolver.getURI();
-
-        } catch (final Exception e) {
-            String message = "Resolving path [" + name + "] failed: ";
-            getLogger().error(message, e);
-            throw new ConfigurationException(message, e);
-        } finally {
-            if (templateManager != null) {
-                this.manager.release(templateManager);
-            }
-        }
-        return resolvedUri;
-    }
-
-    /**
-     * Returns the base URI for a certain publication.
-     * @param publication The publication.
-     * @return A string.
-     */
-    public static String getBaseURI(Publication publication) {
-        String publicationUri = "context://" + Publication.PUBLICATION_PREFIX_URI + "/"
-                + publication.getId();
-        return publicationUri;
-    }
-
-    /**
-     * Returns the base URI for a certain publication including the prefix "lenya".
-     * @param publication The publication.
-     * @return A string.
-     */
-    protected String getLenyaBaseURI(Publication publication) {
-        String publicationUri = "context://" + Publication.PUBLICATION_PREFIX_URI + "/"
-                + publication.getId() + "/lenya";
-        return publicationUri;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/cocoon/components/modules/input/ResourceExistsModule.java b/src/java/org/apache/lenya/cms/cocoon/components/modules/input/ResourceExistsModule.java
deleted file mode 100644
index 5ce1c28..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/components/modules/input/ResourceExistsModule.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.cocoon.components.modules.input;
-
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.apache.avalon.framework.activity.Disposable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.cocoon.components.modules.input.AbstractInputModule;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceNotFoundException;
-import org.apache.excalibur.source.SourceResolver;
-
-/**
- * Checks if a certain resource exists and returns either the string "true" or "false".
- * @version $Id$
- */
-public class ResourceExistsModule extends AbstractInputModule implements Serviceable, Disposable {
-
-    /**
-     * @see org.apache.cocoon.components.modules.input.InputModule#getAttribute(java.lang.String,
-     *      org.apache.avalon.framework.configuration.Configuration, java.util.Map)
-     */
-    public Object getAttribute(String name, Configuration modeConf, Map objectModel)
-            throws ConfigurationException {
-
-        String resourceURI = name;
-
-        Source source = null;
-        boolean exists = false;
-        try {
-            source = this.resolver.resolveURI(resourceURI);
-            exists = source.exists();
-        } catch (SourceNotFoundException e) {
-            exists = false;
-        } catch (Exception e) {
-            getLogger().warn("Exception resolving resource [" + resourceURI + "]", e);
-            exists = false;
-        } finally {
-            if (source != null) {
-                this.resolver.release(source);
-            }
-        }
-
-        return Boolean.toString(exists);
-    }
-
-    /**
-     * @see org.apache.cocoon.components.modules.input.InputModule#getAttributeNames(org.apache.avalon.framework.configuration.Configuration,
-     *      java.util.Map)
-     */
-    public Iterator getAttributeNames(Configuration modeConf, Map objectModel)
-            throws ConfigurationException {
-        return Collections.EMPTY_SET.iterator();
-    }
-
-    private ServiceManager manager;
-    private SourceResolver resolver;
-
-    /**
-     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service(ServiceManager _manager) throws ServiceException {
-        this.manager = _manager;
-        this.resolver = (SourceResolver) _manager.lookup(SourceResolver.ROLE);
-    }
-
-    /**
-     * @see org.apache.avalon.framework.activity.Disposable#dispose()
-     */
-    public void dispose() {
-        super.dispose();
-        this.manager.release(this.resolver);
-        this.resolver = null;
-        this.manager = null;
-    }
-
-    /**
-     * @see org.apache.cocoon.components.modules.input.InputModule#getAttributeValues(java.lang.String,
-     *      org.apache.avalon.framework.configuration.Configuration, java.util.Map)
-     */
-    public Object[] getAttributeValues(String name, Configuration modeConf, Map objectModel)
-            throws ConfigurationException {
-        Object result = this.getAttribute(name, modeConf, objectModel);
-        return (result == null ? null : new Object[] { result });
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/cocoon/components/modules/input/SitetreeModule.java b/src/java/org/apache/lenya/cms/cocoon/components/modules/input/SitetreeModule.java
deleted file mode 100644
index c0fef6b..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/components/modules/input/SitetreeModule.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.cocoon.components.modules.input;
-
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.PageEnvelope;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.site.SiteManager;
-import org.apache.lenya.cms.site.tree.SiteTree;
-import org.apache.lenya.cms.site.tree.TreeSiteManager;
-
-/**
- * Module for sitetree access.
- * 
- * @version $Id$
- */
-public class SitetreeModule extends AbstractPageEnvelopeModule {
-
-    /**
-     * <code>AUTHORING_NODE</code> The authoring node
-     */
-    public static final String AUTHORING_NODE = "authoring-node";
-    /**
-     * <code>LIVE_NODE</code> The live node
-     */
-    public static final String LIVE_NODE = "live-node";
-    /**
-     * <code>TRASH_NODE</code> The trash node
-     */
-    public static final String TRASH_NODE = "trash-node";
-    /**
-     * <code>ARCHIVE_NODE</code> The archive node
-     */
-    public static final String ARCHIVE_NODE = "archive-node";
-
-    protected static final String[] PARAMETER_NAMES = { AUTHORING_NODE, LIVE_NODE, TRASH_NODE,
-            ARCHIVE_NODE };
-
-    /**
-     * @see org.apache.cocoon.components.modules.input.InputModule#getAttribute(java.lang.String,
-     *      org.apache.avalon.framework.configuration.Configuration,
-     *      java.util.Map)
-     */
-    public Object getAttribute(String name, Configuration modeConf, Map objectModel)
-            throws ConfigurationException {
-
-        Object value = null;
-        ServiceSelector selector = null;
-        TreeSiteManager _manager = null;
-
-        try {
-            PageEnvelope envelope = getEnvelope(objectModel, name);
-            Publication publication = envelope.getPublication();
-            
-            selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
-            _manager = (TreeSiteManager) selector.select(publication.getSiteManagerHint());
-            
-            DocumentIdentityMap map = new DocumentIdentityMap(this.manager, getLogger());
-
-            if (name.equals(AUTHORING_NODE)) {
-                SiteTree authoringTree = _manager.getTree(map,
-                        publication,
-                        Publication.AUTHORING_AREA);
-                value = authoringTree.getNode(envelope.getDocument().getId());
-            }
-
-            if (name.equals(LIVE_NODE)) {
-                SiteTree liveTree = _manager.getTree(map, publication, Publication.LIVE_AREA);
-                value = liveTree.getNode(envelope.getDocument().getId());
-            }
-
-            if (name.equals(TRASH_NODE)) {
-                SiteTree trashTree = _manager.getTree(map, publication, Publication.TRASH_AREA);
-                value = trashTree.getNode(envelope.getDocument().getId());
-            }
-
-            if (name.equals(ARCHIVE_NODE)) {
-                SiteTree archiveTree = _manager.getTree(map, publication, Publication.ARCHIVE_AREA);
-                value = archiveTree.getNode(envelope.getDocument().getId());
-            }
-        } catch (Exception e) {
-            throw new ConfigurationException("Obtaining value for [" + name + "] failed: ", e);
-        }
-        finally {
-            if (selector != null) {
-                if (_manager != null) {
-                    selector.release(_manager);
-                }
-                this.manager.release(selector);
-            }
-        }
-
-        return value;
-    }
-
-    /**
-     * @see org.apache.cocoon.components.modules.input.InputModule#getAttributeNames(org.apache.avalon.framework.configuration.Configuration,
-     *      java.util.Map)
-     */
-    public Iterator getAttributeNames(Configuration modeConf, Map objectModel)
-            throws ConfigurationException {
-        return Arrays.asList(PARAMETER_NAMES).iterator();
-    }
-
-    /**
-     * @see org.apache.cocoon.components.modules.input.InputModule#getAttributeValues(java.lang.String,
-     *      org.apache.avalon.framework.configuration.Configuration,
-     *      java.util.Map)
-     */
-    public Object[] getAttributeValues(String name, Configuration modeConf, Map objectModel)
-            throws ConfigurationException {
-        Object[] objects = { getAttribute(name, modeConf, objectModel) };
-        return objects;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/cocoon/components/modules/input/UsecaseFallbackModule.java b/src/java/org/apache/lenya/cms/cocoon/components/modules/input/UsecaseFallbackModule.java
deleted file mode 100644
index e0d2b76..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/components/modules/input/UsecaseFallbackModule.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* @version $Id$ */
-
-package org.apache.lenya.cms.cocoon.components.modules.input;
-
-import java.util.Map;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.lenya.cms.publication.PageEnvelope;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.templating.ExistingUsecaseResolver;
-import org.apache.lenya.cms.publication.templating.PublicationTemplateManager;
-import org.apache.lenya.cms.publication.templating.PublicationTemplateManagerImpl;
-
-/**
- * Input module to resolve fallback usecases
- */
-public class UsecaseFallbackModule extends AbstractPageEnvelopeModule implements Serviceable {
-
-    /**
-     * Ctor.
-     */
-    public UsecaseFallbackModule() {
-        super();
-    }
-
-    protected static final String USECASE_SITEMAP = "usecase.xmap";
-
-    /**
-     * @see org.apache.cocoon.components.modules.input.InputModule#getAttribute(java.lang.String,
-     *      org.apache.avalon.framework.configuration.Configuration, java.util.Map)
-     */
-    public Object getAttribute(String name, Configuration modeConf, Map objectModel)
-            throws ConfigurationException {
-
-        String resolvedSitemapUri = null;
-
-        try {
-            PublicationTemplateManager templateManager = (PublicationTemplateManager) this._manager
-                    .lookup(PublicationTemplateManager.ROLE);
-            PageEnvelope envelope = getEnvelope(objectModel, name);
-
-            ExistingUsecaseResolver resolver = new ExistingUsecaseResolver(name);
-            templateManager.visit(envelope.getPublication(), resolver);
-
-            Publication publication = resolver.getPublication();
-            if (publication != null) {
-                resolvedSitemapUri = PublicationTemplateManagerImpl.getBaseURI(publication) + "/"
-                        + USECASE_SITEMAP;
-            } else {
-                resolvedSitemapUri = "context://lenya/" + USECASE_SITEMAP;
-            }
-        } catch (Exception e) {
-            throw new ConfigurationException("Resolving sitemap URI for usecase [" + name
-                    + "] failed: ", e);
-        }
-        return resolvedSitemapUri;
-    }
- 
-    private ServiceManager _manager;
-
-    /**
-     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service(ServiceManager mymanager) throws ServiceException {
-        this._manager = mymanager;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/cocoon/components/modules/input/WorkflowModule.java b/src/java/org/apache/lenya/cms/cocoon/components/modules/input/WorkflowModule.java
deleted file mode 100644
index 6d5431b..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/components/modules/input/WorkflowModule.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.cocoon.components.modules.input;
-
-import java.io.File;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.PageEnvelope;
-import org.apache.lenya.cms.workflow.DocumentWorkflowable;
-import org.apache.lenya.workflow.Version;
-import org.apache.lenya.workflow.Workflow;
-import org.apache.lenya.workflow.WorkflowManager;
-
-/**
- * Module for workflow access.
- * 
- * @version $Id$
- */
-public class WorkflowModule extends AbstractPageEnvelopeModule {
-
-    /**
-     * <code>STATE</code> The state
-     */
-    public static final String STATE = "state";
-    /**
-     * <code>VARIABLE_PREFIX</code> The variable prefix
-     */
-    public static final String VARIABLE_PREFIX = "variable.";
-    /**
-     * <code>HISTORY_PATH</code> The history path
-     * @deprecated Exposes implementation details.
-     */
-    public static final String HISTORY_PATH = "history-path";
-
-    static final String[] PARAMETER_NAMES = { STATE, HISTORY_PATH };
-
-    /**
-     * @see org.apache.cocoon.components.modules.input.InputModule#getAttribute(java.lang.String,
-     *      org.apache.avalon.framework.configuration.Configuration, java.util.Map)
-     */
-    public Object getAttribute(String name, Configuration modeConf, Map objectModel)
-            throws ConfigurationException {
-
-        Object value = null;
-        WorkflowManager wfManager = null;
-
-        try {
-            PageEnvelope envelope = getEnvelope(objectModel, name);
-            Document document = envelope.getDocument();
-            if (document != null) {
-                wfManager = (WorkflowManager) this.manager.lookup(WorkflowManager.ROLE);
-                DocumentWorkflowable workflowable = new DocumentWorkflowable(document,
-                        getLogger());
-                if (wfManager.hasWorkflow(workflowable)) {
-
-                    Version latestVersion = workflowable.getLatestVersion();
-
-                    if (name.equals(STATE)) {
-                        if (latestVersion == null) {
-                            Workflow workflow = wfManager.getWorkflowSchema(workflowable);
-                            value = workflow.getInitialState();
-                        } else {
-                            value = latestVersion.getState();
-                        }
-                    } else if (name.startsWith(VARIABLE_PREFIX)) {
-                        String variableName = name.substring(VARIABLE_PREFIX.length());
-                        Workflow workflow = wfManager.getWorkflowSchema(workflowable);
-                        String[] variableNames = workflow.getVariableNames();
-                        if (Arrays.asList(variableNames).contains(variableName)) {
-                            if (latestVersion == null) {
-                                value = Boolean.valueOf(workflow.getInitialValue(variableName));
-                            } else {
-                                value = Boolean.valueOf(latestVersion.getValue(variableName));
-                            }
-                        }
-                    } else if (name.equals(HISTORY_PATH)) {
-                        final String path = document.getPublication().getPathMapper()
-                                .getPath(document.getId(), document.getLanguage());
-                        final String uri = "content/workflow/history/" + path;
-                        final File pubDir = document.getPublication().getDirectory();
-                        final File workflowFile = new File(pubDir, uri.replace('/',
-                                File.separatorChar));
-                        value = workflowFile.getAbsolutePath();
-                    } else {
-                        throw new ConfigurationException("The attribute [" + name
-                                + "] is not supported!");
-                    }
-                }
-            }
-        } catch (ConfigurationException e) {
-            throw e;
-        } catch (Exception e) {
-            throw new ConfigurationException("Resolving attribute failed: ", e);
-        } finally {
-            if (wfManager != null) {
-                this.manager.release(wfManager);
-            }
-        }
-        return value;
-    }
-
-    /**
-     * @see org.apache.cocoon.components.modules.input.InputModule#getAttributeNames(org.apache.avalon.framework.configuration.Configuration,
-     *      java.util.Map)
-     */
-    public Iterator getAttributeNames(Configuration modeConf, Map objectModel)
-            throws ConfigurationException {
-        return Arrays.asList(PARAMETER_NAMES).iterator();
-    }
-
-    /**
-     * @see org.apache.cocoon.components.modules.input.InputModule#getAttributeValues(java.lang.String,
-     *      org.apache.avalon.framework.configuration.Configuration, java.util.Map)
-     */
-    public Object[] getAttributeValues(String name, Configuration modeConf, Map objectModel)
-            throws ConfigurationException {
-        Object[] objects = { getAttribute(name, modeConf, objectModel) };
-
-        return objects;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/cocoon/flow/FlowHelper.java b/src/java/org/apache/lenya/cms/cocoon/flow/FlowHelper.java
deleted file mode 100644
index c04f321..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/flow/FlowHelper.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.cocoon.flow;
-
-import java.io.IOException;
-import java.util.Map;
-
-import org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon;
-import org.apache.cocoon.environment.Request;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.cms.publication.PageEnvelope;
-import org.apache.lenya.cms.publication.PageEnvelopeException;
-import org.apache.lenya.cms.publication.util.DocumentHelper;
-import org.apache.lenya.cms.rc.FileReservedCheckInException;
-import org.apache.lenya.cms.rc.RevisionController;
-import org.apache.lenya.workflow.Situation;
-import org.apache.lenya.workflow.WorkflowException;
-
-/**
- * Flowscript utility class.
- * @version $Id$
- */
-public interface FlowHelper {
-	
-    /**
-     * The Avalon Role.
-     */
-    String ROLE = FlowHelper.class.getName();
-
-    /**
-     * Returns the current workflow situation.
-     * @param cocoon The FOM_Cocoon object.
-     * @return A situation.
-     * @throws AccessControlException when something went wrong.
-     */
-    Situation getSituation(FOM_Cocoon cocoon) throws AccessControlException;
-
-    /**
-     * Returns the current page envelope.
-     * @param cocoon The FOM_Cocoon object.
-     * @return A page envelope.
-     * @throws PageEnvelopeException when something went wrong.
-     */
-    PageEnvelope getPageEnvelope(FOM_Cocoon cocoon) throws PageEnvelopeException;
-
-    /**
-     * Returns the request URI of the current request.
-     * @param cocoon The FOM_Cocoon object.
-     * @return A string.
-     */
-    String getRequestURI(FOM_Cocoon cocoon);
-
-    /**
-     * Returns the request object of the current request.
-     * @param cocoon The FOM_Cocoon object.
-     * @return A request object.
-     */
-    Request getRequest(FOM_Cocoon cocoon);
-
-    /**
-     * Returns the Cocoon Object Model
-     * @param cocoon The Flow Object Model of Cocoon
-     * @return The object model
-     */
-    Map getObjectModel(FOM_Cocoon cocoon);
-
-    /**
-     * Returns a DocumentHelper instance.
-     * @param cocoon The Flow Object Model of Cocoon
-     * @return The document helper
-     * @see DocumentHelper
-     */
-    DocumentHelper getDocumentHelper(FOM_Cocoon cocoon);
-
-    /**
-     * Resolves the request parameter value for a specific name. The parameter
-     * names are encoded as <code>{name}:{value}.{axis}</code>. This is a
-     * workaround for the &lt;input type="image"/&gt; bug in Internet Explorer.
-     * @param cocoon The FOM_Cocoon object.
-     * @param parameterName The request parameter name.
-     * @return A string.
-     */
-    String getImageParameterValue(FOM_Cocoon cocoon, String parameterName);
-
-    /**
-     * Trigger a workflow event for the document associated with the current
-     * PageEnvelope.
-     * @param cocoon The Cocoon Flow Object Model
-     * @param event The name of the workflow event to trigger.
-     * @throws WorkflowException If an workflow error occurs
-     * @throws PageEnvelopeException Page envelope can not operate properly.
-     * @throws AccessControlException If an access control violation occurs.
-     */
-    void triggerWorkflow(FOM_Cocoon cocoon, String event) throws WorkflowException,
-            PageEnvelopeException, AccessControlException;
-
-    /**
-     * Get a RevisionController instance.
-     * @param cocoon The Cocoon Flow Object Model
-     * @return A RevisionController
-     * @throws PageEnvelopeException Page envelope can not operate properly.
-     * @throws IOException If an IOException occurs.
-     * @see PageEnvelope
-     * @see RevisionController
-     */
-    RevisionController getRevisionController(FOM_Cocoon cocoon) throws PageEnvelopeException,
-            IOException;
-
-    /**
-     * Checkis in the current document from the PageEnvelope context.
-     * @param cocoon The Cocoon Flow Object Model
-     * @param backup Wether a new revision should be created.
-     * @throws FileReservedCheckInException
-     * @throws Exception
-     * @see RevisionController#reservedCheckIn(String, String, boolean, boolean)
-     */
-    void reservedCheckIn(FOM_Cocoon cocoon, boolean backup) throws FileReservedCheckInException,
-            Exception;
-}
diff --git a/src/java/org/apache/lenya/cms/cocoon/flow/FlowHelperImpl.java b/src/java/org/apache/lenya/cms/cocoon/flow/FlowHelperImpl.java
deleted file mode 100644
index 26343df..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/flow/FlowHelperImpl.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.cocoon.flow;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Enumeration;
-import java.util.Map;
-
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Request;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.Identity;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.PageEnvelope;
-import org.apache.lenya.cms.publication.PageEnvelopeException;
-import org.apache.lenya.cms.publication.PageEnvelopeFactory;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.util.DocumentHelper;
-import org.apache.lenya.cms.rc.FileReservedCheckInException;
-import org.apache.lenya.cms.rc.RCEnvironment;
-import org.apache.lenya.cms.rc.RevisionController;
-import org.apache.lenya.cms.workflow.WorkflowUtil;
-import org.apache.lenya.workflow.Situation;
-import org.apache.lenya.workflow.WorkflowException;
-import org.apache.lenya.workflow.WorkflowManager;
-
-/**
- * Flowscript utility class. The FOM_Cocoon object is not passed in the constructor to avoid errors.
- * This way, not the initial, but the current FOM_Cocoon object is used by the methods.
- */
-public class FlowHelperImpl extends AbstractLogEnabled implements FlowHelper, Serviceable {
-
-    /**
-     * Ctor.
-     */
-    public FlowHelperImpl() {
-        // do nothing
-    }
-
-    /**
-     * @see org.apache.lenya.cms.cocoon.flow.FlowHelper#getSituation(org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon)
-     */
-    public Situation getSituation(FOM_Cocoon cocoon) throws AccessControlException {
-        Situation situation;
-        WorkflowManager wfManager = null;
-        try {
-            wfManager = (WorkflowManager) this.manager.lookup(WorkflowManager.ROLE);
-            situation = wfManager.getSituation();
-        } catch (ServiceException e) {
-            throw new RuntimeException(e);
-        } finally {
-            this.manager.release(wfManager);
-        }
-        return situation;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.cocoon.flow.FlowHelper#getPageEnvelope(org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon)
-     */
-    public PageEnvelope getPageEnvelope(FOM_Cocoon cocoon) throws PageEnvelopeException {
-        DocumentIdentityMap map = new DocumentIdentityMap(this.manager, getLogger());
-        PageEnvelopeFactory factory = PageEnvelopeFactory.getInstance();
-        return factory.getPageEnvelope(map, cocoon.getObjectModel());
-    }
-
-    /**
-     * @see org.apache.lenya.cms.cocoon.flow.FlowHelper#getRequestURI(org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon)
-     */
-    public String getRequestURI(FOM_Cocoon cocoon) {
-        return cocoon.getRequest().getRequestURI();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.cocoon.flow.FlowHelper#getRequest(org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon)
-     */
-    public Request getRequest(FOM_Cocoon cocoon) {
-        return cocoon.getRequest();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.cocoon.flow.FlowHelper#getObjectModel(org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon)
-     */
-    public Map getObjectModel(FOM_Cocoon cocoon) {
-        return cocoon.getObjectModel();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.cocoon.flow.FlowHelper#getDocumentHelper(org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon)
-     */
-    public DocumentHelper getDocumentHelper(FOM_Cocoon cocoon) {
-        return new DocumentHelper(this.manager, cocoon.getObjectModel());
-    }
-
-    /**
-     * <code>SEPARATOR</code> The separator
-     */
-    public static final String SEPARATOR = ":";
-
-    /**
-     * @see org.apache.lenya.cms.cocoon.flow.FlowHelper#getImageParameterValue(org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon,
-     *      java.lang.String)
-     */
-    public String getImageParameterValue(FOM_Cocoon cocoon, String parameterName) {
-
-        getLogger().debug("Resolving parameter value for name [" + parameterName + "]");
-
-        Request request = cocoon.getRequest();
-        String value = request.getParameter(parameterName);
-
-        if (value == null) {
-            String prefix = parameterName + SEPARATOR;
-            Enumeration e = request.getParameterNames();
-            while (e.hasMoreElements() && value == null) {
-                String name = (String) e.nextElement();
-                if (name.startsWith(prefix)) {
-                    getLogger().debug("Complete parameter name: [" + name + "]");
-                    value = name.substring(prefix.length(), name.length() - 2);
-                    getLogger().debug("Resolved value: [" + value + "]");
-                }
-            }
-        }
-
-        return value;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.cocoon.flow.FlowHelper#triggerWorkflow(org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon,
-     *      java.lang.String)
-     */
-    public void triggerWorkflow(FOM_Cocoon cocoon, String event) throws WorkflowException,
-            PageEnvelopeException, AccessControlException {
-        Document document = getPageEnvelope(cocoon).getDocument();
-        WorkflowUtil.invoke(this.manager, getLogger(), document, event);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.cocoon.flow.FlowHelper#getRevisionController(org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon)
-     */
-    public RevisionController getRevisionController(FOM_Cocoon cocoon)
-            throws PageEnvelopeException, IOException {
-        final Publication publication = getPageEnvelope(cocoon).getPublication();
-        final String publicationPath = publication.getDirectory().getCanonicalPath();
-        final RCEnvironment rcEnvironment = RCEnvironment.getInstance(publication
-                .getServletContext().getCanonicalPath());
-        String rcmlDirectory = rcEnvironment.getRCMLDirectory();
-        rcmlDirectory = publicationPath + File.separator + rcmlDirectory;
-        String backupDirectory = rcEnvironment.getBackupDirectory();
-        backupDirectory = publicationPath + File.separator + backupDirectory;
-
-        return new RevisionController(rcmlDirectory, backupDirectory, publicationPath);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.cocoon.flow.FlowHelper#reservedCheckIn(org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon,
-     *      boolean)
-     */
-    public void reservedCheckIn(FOM_Cocoon cocoon, boolean backup)
-            throws FileReservedCheckInException, Exception {
-        final Identity identity = (Identity) ObjectModelHelper.getRequest(cocoon.getObjectModel())
-                .getSession().getAttribute(Identity.class.getName());
-        final PageEnvelope pageEnvelope = getPageEnvelope(cocoon);
-        final Publication publication = getPageEnvelope(cocoon).getPublication();
-        final String filename = pageEnvelope.getDocument().getFile().getCanonicalPath()
-                .substring(publication.getDirectory().getCanonicalPath().length());
-        getRevisionController(cocoon).reservedCheckIn(filename,
-                identity.getUser().getId(),
-                backup,
-                true);
-    }
-
-    private ServiceManager manager;
-
-    /**
-     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service(ServiceManager manager) throws ServiceException {
-        this.manager = manager;
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/cocoon/generation/SitetreeFragmentGenerator.java b/src/java/org/apache/lenya/cms/cocoon/generation/SitetreeFragmentGenerator.java
deleted file mode 100644
index 1329d96..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/generation/SitetreeFragmentGenerator.java
+++ /dev/null
@@ -1,472 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* @version $Id$*/
-
-package org.apache.lenya.cms.cocoon.generation;
-
-import java.io.IOException;
-import java.util.Map;
-
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.cocoon.ProcessingException;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.environment.SourceResolver;
-import org.apache.cocoon.generation.ServiceableGenerator;
-import org.apache.lenya.cms.publication.PageEnvelope;
-import org.apache.lenya.cms.publication.PageEnvelopeException;
-import org.apache.lenya.cms.publication.PageEnvelopeFactory;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.site.Label;
-import org.apache.lenya.cms.site.SiteManager;
-import org.apache.lenya.cms.site.tree.SiteTree;
-import org.apache.lenya.cms.site.tree.TreeSiteManager;
-import org.apache.lenya.cms.site.SiteException;
-import org.apache.lenya.cms.site.tree.SiteTreeNode;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.AttributesImpl;
-
-/**
- * Generates a fragment of the navigation XML from the sitetree, corresponding to a given node. The
- * node is specified by the sitemap parameters area/documentid. If the sitemap parameter initialTree
- * is true, the top nodes of the tree will be generated and the node given by the sitemap parameters
- * area/documentid will be unfolded. If initialTree is false, only the children of the selected node
- * will be generated.
- */
-public class SitetreeFragmentGenerator extends ServiceableGenerator {
-
-    protected Publication publication;
-    private DocumentIdentityMap identityMap;
-
-    /** Parameter which denotes the documentid of the clicked node */
-    protected String documentid;
-
-    /** Parameter which denotes the area of the clicked node */
-    protected String area;
-
-    /**
-     * Parameter which decides if the initial tree with the root nodes is generated
-     */
-    protected boolean initialTree;
-
-    /** FIXME: should pass this as a parameter */
-    protected String[] areas = null;
-
-    /**
-     * Convenience object, so we don't need to create an AttributesImpl for every element.
-     */
-    protected AttributesImpl attributes;
-
-    protected static final String PARAM_AREA = "area";
-    protected static final String PARAM_DOCUMENTID = "documentid";
-    protected static final String PARAM_INITIAL = "initial";
-    protected static final String PARAM_AREAS = "areas";
-
-    /** The URI of the namespace of this generator. */
-    protected static final String URI = "http://apache.org/cocoon/lenya/sitetree/1.0";
-    protected static final String XML_URI = "http://www.w3.org/XML/1998/namespace";
-
-    /** The namespace prefix for this namespace. */
-    protected static final String PREFIX = "site";
-    protected static final String XML_PREFIX = "xml";
-
-    protected static final String NODE_NODE = "node";
-    protected static final String NODE_LABEL = "label";
-    protected static final String NODE_SITE = "site";
-    protected static final String NODE_FRAGMENT = "fragment";
-
-    protected static final String ATTR_ID = "id";
-    protected static final String ATTR_FOLDER = "folder";
-    protected static final String ATTR_AREA = "area";
-    protected static final String ATTR_LABEL = "label";
-    protected static final String ATTR_VISIBLEINNAV = "visibleinnav";
-    protected static final String ATTR_LINK = "link";
-    protected static final String ATTR_BASE = "base";
-    protected static final String ATTR_SUFFIX = "suffix";
-    protected static final String ATTR_HREF = "href";
-    protected static final String ATTR_LANG = "lang";
-
-    /**
-     * @see org.apache.cocoon.sitemap.SitemapModelComponent#setup(org.apache.cocoon.environment.SourceResolver,
-     *      java.util.Map, java.lang.String, org.apache.avalon.framework.parameters.Parameters)
-     */
-    public void setup(SourceResolver _resolver, Map _objectModel, String src, Parameters par)
-            throws ProcessingException, SAXException, IOException {
-        super.setup(_resolver, _objectModel, src, par);
-
-        PageEnvelope envelope = null;
-
-        if (getLogger().isDebugEnabled()) {
-            Request request = ObjectModelHelper.getRequest(_objectModel);
-            getLogger().debug("Resolving page envelope for URL [" + request.getRequestURI() + "]");
-        }
-
-        this.area = par.getParameter(PARAM_AREA, null);
-        this.documentid = par.getParameter(PARAM_DOCUMENTID, null);
-
-        if (par.isParameter(PARAM_INITIAL)) {
-            this.initialTree = Boolean.valueOf(par.getParameter(PARAM_INITIAL, null))
-                    .booleanValue();
-        } else {
-            this.initialTree = false;
-        }
-
-        if (par.isParameter(PARAM_AREAS)) {
-            String parAreas = par.getParameter(PARAM_AREAS, null);
-            this.areas = parAreas.split(",");
-        } else {
-            String temp[] = { "authoring", "archive", "trash" };
-            this.areas = temp;
-        }
-
-        if (this.getLogger().isDebugEnabled()) {
-            this.getLogger().debug("Parameter area: " + this.area);
-            this.getLogger().debug("Parameter documentid: " + this.documentid);
-            this.getLogger().debug("Parameter initialTree: " + this.initialTree);
-            String areasStr = "";
-            for (int i = 0; i < this.areas.length; i++) {
-                areasStr += this.areas[i] + " ";
-            }
-            this.getLogger().debug("Parameter areas: " + areasStr);
-        }
-
-        try {
-            this.identityMap = new DocumentIdentityMap(this.manager, getLogger());
-            envelope = PageEnvelopeFactory.getInstance().getPageEnvelope(this.identityMap,
-                    _objectModel);
-        } catch (final PageEnvelopeException e) {
-            throw new ProcessingException("Resolving page envelope failed: ", e);
-        }
-
-        this.publication = envelope.getPublication();
-        this.attributes = new AttributesImpl();
-
-    }
-
-    /**
-     * @see org.apache.cocoon.generation.Generator#generate()
-     */
-    public void generate() throws IOException, SAXException, ProcessingException {
-
-        try {
-
-            this.contentHandler.startDocument();
-            this.contentHandler.startPrefixMapping(PREFIX, URI);
-
-            this.attributes.clear();
-            if (!this.initialTree) {
-                this.attributes.addAttribute("", ATTR_AREA, ATTR_AREA, "CDATA", this.area);
-                this.attributes.addAttribute("", ATTR_BASE, ATTR_BASE, "CDATA", this.documentid);
-            }
-
-            this.contentHandler.startElement(URI,
-                    NODE_FRAGMENT,
-                    PREFIX + ':' + NODE_FRAGMENT,
-                    this.attributes);
-
-            if (this.initialTree) {
-                for (int i = 0; i < this.areas.length; i++) {
-                    generateFragmentInitial(this.areas[i]);
-                }
-            } else {
-                generateFragment();
-            }
-
-            this.contentHandler.endElement(URI, NODE_FRAGMENT, PREFIX + ':' + NODE_FRAGMENT);
-
-            this.contentHandler.endPrefixMapping(PREFIX);
-            this.contentHandler.endDocument();
-
-        } catch (final SAXException e) {
-            throw new ProcessingException(e);
-        } catch (final SiteException e) {
-            throw new ProcessingException(e);
-        }
-
-    }
-
-    /**
-     * Generates a fragment of the tree which contains the children of a given node.
-     * @throws SiteException
-     * @throws SAXException
-     * @throws ProcessingException
-     */
-    protected void generateFragment() throws SiteException, SAXException, ProcessingException {
-
-        if (!this.area.equals(Publication.AUTHORING_AREA)
-                && !this.area.equals(Publication.ARCHIVE_AREA)
-                && !this.area.equals(Publication.TRASH_AREA)
-                && !this.area.equals(Publication.LIVE_AREA)
-                && !this.area.equals(Publication.STAGING_AREA)) {
-            throw new ProcessingException("Invalid area: " + this.area);
-        }
-
-        ServiceSelector selector = null;
-        TreeSiteManager siteManager = null;
-        try {
-            selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
-            siteManager = (TreeSiteManager) selector.select(this.publication.getSiteManagerHint());
-
-            SiteTree siteTree = siteManager.getTree(this.identityMap, this.publication, this.area);
-
-            SiteTreeNode node = siteTree.getNode(this.documentid);
-            if (this.getLogger().isDebugEnabled()) {
-                this.getLogger().debug("Node with documentid " + this.documentid + " found.");
-            }
-            if (node == null)
-                throw new SiteException("Node with documentid " + this.documentid + " not found.");
-
-            SiteTreeNode[] children = node.getChildren();
-
-            for (int i = 0; i < children.length; i++) {
-                startNode(NODE_NODE, children[i]);
-                addLabels(children[i]);
-                endNode(NODE_NODE);
-            }
-        } catch (ServiceException e) {
-            throw new ProcessingException(e);
-        } finally {
-            if (selector != null) {
-                if (siteManager != null) {
-                    selector.release(siteManager);
-                }
-                this.manager.release(selector);
-            }
-        }
-    }
-
-    /**
-     * Generates the top node of the given area and then calls a recursive method to traverse the
-     * tree, if the node given by area/documentid is in this area.
-     * @param siteArea
-     * @throws SiteException
-     * @throws SAXException
-     * @throws ProcessingException
-     */
-    protected void generateFragmentInitial(String siteArea) throws SiteException, SAXException,
-            ProcessingException {
-
-        ServiceSelector selector = null;
-        TreeSiteManager siteManager = null;
-        try {
-            selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
-            siteManager = (TreeSiteManager) selector.select(this.publication.getSiteManagerHint());
-            SiteTree siteTree = siteManager.getTree(this.identityMap, this.publication, siteArea);
-
-            String label = "";
-            String isFolder = "";
-
-            // FIXME: don't hardcode area label
-            if (siteArea.equals(Publication.AUTHORING_AREA))
-                label = "Authoring";
-            if (siteArea.equals(Publication.ARCHIVE_AREA))
-                label = "Archive";
-            if (siteArea.equals(Publication.TRASH_AREA))
-                label = "Trash";
-            if (siteArea.equals(Publication.LIVE_AREA))
-                label = "Live";
-            if (siteArea.equals(Publication.STAGING_AREA))
-                label = "Staging";
-
-            if (siteTree.getTopNodes().length > 0)
-                isFolder = "true";
-            else
-                isFolder = "false";
-
-            this.attributes.clear();
-            this.attributes.addAttribute("", ATTR_AREA, ATTR_AREA, "CDATA", siteArea);
-            this.attributes.addAttribute("", ATTR_FOLDER, ATTR_FOLDER, "CDATA", isFolder);
-            this.attributes.addAttribute("", ATTR_LABEL, ATTR_LABEL, "CDATA", label);
-
-            startNode(NODE_SITE);
-
-            if (this.area.equals(siteArea)) {
-                generateFragmentRecursive(siteTree.getTopNodes(), this.documentid);
-            }
-
-            endNode(NODE_SITE);
-        } catch (ServiceException e) {
-            throw new ProcessingException(e);
-        } finally {
-            if (selector != null) {
-                if (siteManager != null) {
-                    selector.release(siteManager);
-                }
-                this.manager.release(selector);
-            }
-        }
-    }
-
-    /**
-     * Follows the documentid to find the way in the sitetree to the specified node and opens all
-     * folders on its way.
-     * @param nodes
-     * @param docid
-     * @throws SiteException
-     * @throws SAXException
-     */
-    protected void generateFragmentRecursive(SiteTreeNode[] nodes, String docid)
-            throws SiteException, SAXException {
-        String nodeid;
-        String childid;
-
-        if (nodes == null)
-            return;
-        if (docid.startsWith("/"))
-            docid = docid.substring(1);
-        if (docid.indexOf("/") != -1) {
-            nodeid = docid.substring(0, docid.indexOf("/"));
-            childid = docid.substring(docid.indexOf("/") + 1);
-        } else {
-            nodeid = docid;
-            childid = "";
-        }
-
-        for (int i = 0; i < nodes.length; i++) {
-            startNode(NODE_NODE, nodes[i]);
-            addLabels(nodes[i]);
-            if (nodes[i].getId().equals(nodeid)) {
-                generateFragmentRecursive(nodes[i].getChildren(), childid);
-            }
-            endNode(NODE_NODE);
-        }
-    }
-
-    /**
-     * Begins a named node and calls setNodeAttributes to set its attributes.
-     * @param nodeName the name of the new node
-     * @throws SAXException if an error occurs while creating the node
-     */
-    protected void startNode(String nodeName) throws SAXException {
-        this.contentHandler.startElement(URI, nodeName, PREFIX + ':' + nodeName, this.attributes);
-    }
-
-    /**
-     * Begins a named node and calls setNodeAttributes to set its attributes.
-     * @param nodeName the name of the new node
-     * @param node The attributes are taken from this node
-     * @throws SAXException if an error occurs while creating the node
-     */
-    protected void startNode(String nodeName, SiteTreeNode node) throws SAXException {
-        setNodeAttributes(node);
-        this.contentHandler.startElement(URI, nodeName, PREFIX + ':' + nodeName, this.attributes);
-    }
-
-    /**
-     * Sets the attributes for a given node. Sets attributes id, href, folder, suffix, basic-url,
-     * language-suffix.
-     * @param node
-     * @throws SAXException if an error occurs while setting the attributes
-     */
-    protected void setNodeAttributes(SiteTreeNode node) throws SAXException {
-        this.attributes.clear();
-
-        String id = node.getId();
-        //String isVisible = Boolean.toString(node.visibleInNav());
-        String hasLink = Boolean.toString(node.hasLink());
-        String href = node.getHref();
-        String suffix = node.getSuffix();
-        String isFolder = isFolder(node);
-
-        if (this.getLogger().isDebugEnabled()) {
-            this.getLogger().debug("adding attribute id: " + id);
-            //this.getLogger().debug("adding attribute visibleinnav: " +
-            // isVisible);
-            this.getLogger().debug("adding attribute link: " + hasLink);
-            if (href != null)
-                this.getLogger().debug("adding attribute href: " + href);
-            if (suffix != null)
-                this.getLogger().debug("adding attribute suffix: " + suffix);
-            this.getLogger().debug("adding attribute folder: " + isFolder);
-        }
-        this.attributes.addAttribute("", ATTR_ID, ATTR_ID, "CDATA", id);
-        //attributes.addAttribute("", ATTR_VISIBLEINNAV, ATTR_VISIBLEINNAV,
-        // "CDATA", isVisible);
-        this.attributes.addAttribute("", ATTR_LINK, ATTR_LINK, "CDATA", hasLink);
-        if (href != null)
-            this.attributes.addAttribute("", ATTR_HREF, ATTR_HREF, "CDATA", href);
-        if (suffix != null)
-            this.attributes.addAttribute("", ATTR_SUFFIX, ATTR_SUFFIX, "CDATA", suffix);
-        this.attributes.addAttribute("", ATTR_FOLDER, ATTR_FOLDER, "CDATA", isFolder);
-    }
-
-    /**
-     * Returns a value to indicate whether a node is a folder (contains subnodes). With the
-     * incremental sitetree loading, we sometimes load nodes which are folders, but we don't load
-     * their children. But we still have to know if it's a folder or not, i.e. if it can be opened.
-     * @param node
-     * @return "true" or "false"
-     */
-    protected String isFolder(SiteTreeNode node) {
-        if (node.getChildren().length > 0)
-            return "true";
-        return "false";
-    }
-
-    /**
-     * Ends the named node.
-     * @param nodeName the name of the new node
-     * @throws SAXException if an error occurs while closing the node
-     */
-    protected void endNode(String nodeName) throws SAXException {
-        this.contentHandler.endElement(URI, nodeName, PREFIX + ':' + nodeName);
-    }
-
-    /**
-     * Finds all the label children of a node and adds them to the nav xml.
-     * @param node
-     * @throws SAXException
-     */
-    protected void addLabels(SiteTreeNode node) throws SAXException {
-        Label[] labels = node.getLabels();
-
-        for (int i = 0; i < labels.length; i++) {
-            String lang = labels[i].getLanguage();
-            if (lang == null)
-                lang = "";
-            addLabel(labels[i].getLabel(), lang);
-        }
-    }
-
-    /**
-     * Adds a label element of a given language.
-     * @param label the value of the label
-     * @param language the language of the label
-     * @throws SAXException
-     */
-    protected void addLabel(String label, String language) throws SAXException {
-        this.attributes.clear();
-        this.attributes.addAttribute(XML_URI,
-                ATTR_LANG,
-                XML_PREFIX + ":" + ATTR_LANG,
-                "CDATA",
-                language);
-
-        this.contentHandler.startElement(URI,
-                NODE_LABEL,
-                PREFIX + ':' + NODE_LABEL,
-                this.attributes);
-        char[] labelArray = label.toCharArray();
-        this.contentHandler.characters(labelArray, 0, labelArray.length);
-        this.contentHandler.endElement(URI, NODE_LABEL, PREFIX + ':' + NODE_LABEL);
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/cocoon/matching/UsecaseRegistrationMatcher.java b/src/java/org/apache/lenya/cms/cocoon/matching/UsecaseRegistrationMatcher.java
deleted file mode 100644
index dc42357..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/matching/UsecaseRegistrationMatcher.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.cocoon.matching;
-
-import java.util.Collections;
-import java.util.Map;
-
-import org.apache.avalon.excalibur.pool.Poolable;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.matching.Matcher;
-import org.apache.cocoon.sitemap.PatternException;
-import org.apache.lenya.cms.usecase.UsecaseResolver;
-
-/**
- * Matches if the request calls a usecase which is registered for the Usecase Framework.
- */
-public class UsecaseRegistrationMatcher extends AbstractLogEnabled implements Matcher, Serviceable, Poolable {
-
-    /**
-     * @see org.apache.cocoon.matching.Matcher#match(java.lang.String,
-     *      java.util.Map, org.apache.avalon.framework.parameters.Parameters)
-     */
-    public Map match(String pattern, Map objectModel, Parameters parameters)
-            throws PatternException {
-
-        Request request = ObjectModelHelper.getRequest(objectModel);
-        String usecaseName = request.getParameter("lenya.usecase");
-
-        Map result = null;
-
-        if (usecaseName == null) {
-            if (getLogger().isDebugEnabled()) {
-               getLogger().debug("match() called, usecase parameter is empty - returning false");
-            }
-        }
-        else {
-            if (getLogger().isDebugEnabled()) {
-               getLogger().debug("match() called for request parameter lenya.usecase = [" + usecaseName + "]; note that pattern is not relevant for this matcher");
-            }
-            // Parameter for usecase is set, see if this is a registered component
-            UsecaseResolver resolver = null;
-            try {
-               resolver = (UsecaseResolver) this.manager.lookup(UsecaseResolver.ROLE);
-               if (resolver.isRegistered(usecaseName)) {
-                   result = Collections.EMPTY_MAP;
-               }
-               if (getLogger().isDebugEnabled()) {
-                   getLogger().debug("Usecase [" + usecaseName + "] exists: [" + !(result == null) + "]");
-               }
-            } catch (ServiceException e) {
-               throw new PatternException(e);
-            } finally {
-               if (resolver != null) {
-                  this.manager.release(resolver);
-               }
-            }
-        }
-        return result;
-    }
-
-    private ServiceManager manager;
-
-    /**
-     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service(ServiceManager _manager) throws ServiceException {
-        this.manager = _manager;
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/cocoon/scheduler/SchedulerHelper.java b/src/java/org/apache/lenya/cms/cocoon/scheduler/SchedulerHelper.java
deleted file mode 100644
index 05ca240..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/scheduler/SchedulerHelper.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation
- * 
- * Licensed 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.
- *  
- */
-
-/* $Id$ */
-
-package org.apache.lenya.cms.cocoon.scheduler;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.cocoon.ProcessingException;
-import org.apache.lenya.cms.cocoon.task.CocoonTaskWrapper;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.PageEnvelope;
-import org.apache.lenya.cms.publication.PageEnvelopeException;
-import org.apache.lenya.cms.publication.PageEnvelopeFactory;
-import org.apache.lenya.cms.scheduler.LoadQuartzServlet;
-import org.apache.lenya.cms.scheduler.ServletJob;
-import org.apache.lenya.cms.task.ExecutionException;
-import org.apache.lenya.cms.task.TaskWrapper;
-import org.apache.lenya.util.NamespaceMap;
-
-/**
- * Scheduler helper
- */
-public class SchedulerHelper {
-
-    /**
-     * Ctor.
-     * @param _objectModel The Cocoon component object model.
-     * @param _parameters The Cocoon component parameters.
-     * @param _logger The logger to use.
-     */
-    public SchedulerHelper(Map _objectModel, Parameters _parameters, Logger _logger) {
-        this.objectModel = _objectModel;
-        this.parameters = _parameters;
-        this.logger = _logger;
-    }
-
-    private Logger logger;
-    private Parameters parameters;
-    private Map objectModel;
-
-    /**
-     * Creates the scheduler parameters.
-     * @return A map.
-     * @throws ProcessingException when something went wrong.
-     */
-    public Map createParameters() throws ProcessingException {
-
-        Map map = new HashMap();
-
-        try {
-            TaskWrapper wrapper = new CocoonTaskWrapper(this.objectModel, this.parameters, null);
-
-            this.logger.debug("Adding task wrapper parameters");
-            Map wrapperParameters = wrapper.getParameters();
-            map.putAll(wrapperParameters);
-
-            NamespaceMap schedulerParameters = new NamespaceMap(LoadQuartzServlet.PREFIX);
-
-            DocumentIdentityMap identityMap = new DocumentIdentityMap(null, null);
-            PageEnvelope envelope = PageEnvelopeFactory.getInstance().getPageEnvelope(identityMap,
-                    this.objectModel);
-
-            schedulerParameters.put(ServletJob.PARAMETER_DOCUMENT_URL, envelope.getDocument()
-                    .getCanonicalWebappURL());
-            schedulerParameters.put(LoadQuartzServlet.PARAMETER_PUBLICATION_ID, envelope
-                    .getPublication().getId());
-            map.putAll(schedulerParameters.getPrefixedMap());
-        } catch (final ExecutionException e) {
-            throw new ProcessingException(e);
-        } catch (final PageEnvelopeException e) {
-            throw new ProcessingException(e);
-        }
-
-        return map;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/cocoon/source/FallbackSourceFactory.java b/src/java/org/apache/lenya/cms/cocoon/source/FallbackSourceFactory.java
deleted file mode 100644
index 6decd90..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/source/FallbackSourceFactory.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.cocoon.source;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.Map;
-
-import org.apache.avalon.framework.context.ContextException;
-import org.apache.avalon.framework.context.Contextualizable;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.cocoon.components.ContextHelper;
-import org.apache.cocoon.environment.Request;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceFactory;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.excalibur.source.SourceUtil;
-import org.apache.excalibur.source.URIAbsolutizer;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationFactory;
-import org.apache.lenya.cms.publication.URLInformation;
-import org.apache.lenya.cms.publication.templating.ExistingSourceResolver;
-import org.apache.lenya.cms.publication.templating.PublicationTemplateManager;
-import org.apache.lenya.transaction.AbstractOperation;
-
-/**
- * Source factory following the fallback principle.
- * 
- * @version $Id$
- */
-public class FallbackSourceFactory extends AbstractOperation implements SourceFactory, Serviceable,
-        Contextualizable, URIAbsolutizer {
-
-    /**
-     * Ctor.
-     */
-    public FallbackSourceFactory() {
-        super();
-    }
-
-    /**
-     * @see org.apache.excalibur.source.SourceFactory#getSource(java.lang.String,
-     *      java.util.Map)
-     */
-    public Source getSource(final String location, Map parameters) throws IOException,
-            MalformedURLException {
-
-        String resolvedUri = null;
-
-        long startTime = new GregorianCalendar().getTimeInMillis();
-
-        // Remove the protocol and the first '//'
-        final int pos = location.indexOf("://");
-
-        if (pos == -1) {
-            throw new RuntimeException("The location [" + location
-                    + "] does not contain the string '://'");
-        }
-
-        final String path = location.substring(pos + 3);
-
-        if (path.length() == 0) {
-            throw new RuntimeException("The path after the protocol must not be empty!");
-        }
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Location:     [" + location + "]");
-            getLogger().debug("Path:         [" + path + "]");
-        }
-
-        PublicationTemplateManager templateManager = null;
-        SourceResolver sourceResolver = null;
-        Source contextSource = null;
-        Source source;
-        try {
-            sourceResolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-            
-            templateManager = (PublicationTemplateManager) this.manager
-                    .lookup(PublicationTemplateManager.ROLE);
-
-            contextSource = sourceResolver.resolveURI("context://");
-            Request request = ContextHelper.getRequest(this.context);
-            String webappUrl = request.getRequestURI().substring(request.getContextPath().length());
-
-            PublicationFactory factory = PublicationFactory.getInstance(getLogger());
-            
-            String contextPath = SourceUtil.getFile(contextSource).getAbsolutePath();
-            URLInformation info = new URLInformation(webappUrl);
-            String publicationId = info.getPublicationId();
-            
-            Publication pub = factory.getPublication(publicationId, contextPath);
-            if (pub.exists()) {
-                ExistingSourceResolver resolver = new ExistingSourceResolver();
-                templateManager.visit(pub, path, resolver);
-                resolvedUri = resolver.getURI();
-            }
-
-            if (getLogger().isDebugEnabled()) {
-                getLogger().debug("Resolved URI:  [" + resolvedUri + "]");
-            }
-
-            if (resolvedUri == null) {
-                final String contextUri = "context://" + location.substring("fallback://".length());
-                resolvedUri = contextUri;
-            }
-
-            source = sourceResolver.resolveURI(resolvedUri);
-
-        } catch (Exception e) {
-            throw new RuntimeException("Resolving path [" + location + "] failed: ", e);
-        } finally {
-            if (templateManager != null) {
-                this.manager.release(templateManager);
-            }
-            if (sourceResolver != null) {
-                if (contextSource != null) {
-                    sourceResolver.release(contextSource);
-                }
-                this.manager.release(sourceResolver);
-            }
-        }
-
-        if (getLogger().isDebugEnabled()) {
-            long endTime = new GregorianCalendar().getTimeInMillis();
-            long time = endTime - startTime;
-            getLogger().debug("Processing time: "
-                    + new SimpleDateFormat("hh:mm:ss.S").format(new Date(time)));
-        }
-
-        return source;
-    }
-
-    private org.apache.avalon.framework.context.Context context;
-
-    /** The ServiceManager */
-    private ServiceManager manager;
-
-    /**
-     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service(ServiceManager _manager) throws ServiceException {
-        super.service(_manager);
-        this.manager = _manager;
-    }
-
-    /**
-     * @see org.apache.avalon.framework.context.Contextualizable#contextualize(org.apache.avalon.framework.context.Context)
-     */
-    public void contextualize(org.apache.avalon.framework.context.Context _context)
-            throws ContextException {
-        this.context = _context;
-    }
-
-    /**
-     * @see org.apache.excalibur.source.SourceFactory#release(org.apache.excalibur.source.Source)
-     */
-    public void release(Source source) {
-        // In fact, this method should never be called as this factory
-        // returns a source object from a different factory. So that
-        // factory should release the source
-        if (null != source) {
-            if (this.getLogger().isDebugEnabled()) {
-                this.getLogger().debug("Releasing source " + source.getURI());
-            }
-            SourceResolver resolver = null;
-            try {
-                resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-                resolver.release(source);
-            } catch (ServiceException ignore) {
-                // ignore the exception
-            } finally {
-                this.manager.release(resolver);
-            }
-        }
-    }
-
-    /**
-     * @see org.apache.excalibur.source.URIAbsolutizer#absolutize(java.lang.String,
-     *      java.lang.String)
-     */
-    public String absolutize(String baseURI, String location) {
-        return SourceUtil.absolutize(baseURI, location, true);
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/cocoon/source/LenyaSourceFactory.java b/src/java/org/apache/lenya/cms/cocoon/source/LenyaSourceFactory.java
deleted file mode 100644
index 22cc0ef..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/source/LenyaSourceFactory.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation.
- * 
- * Licensed 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.
- */
-package org.apache.lenya.cms.cocoon.source;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.util.Map;
-
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.context.Context;
-import org.apache.avalon.framework.context.ContextException;
-import org.apache.avalon.framework.context.Contextualizable;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.avalon.framework.thread.ThreadSafe;
-import org.apache.cocoon.components.ContextHelper;
-import org.apache.cocoon.environment.Request;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceException;
-import org.apache.excalibur.source.SourceFactory;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.PageEnvelope;
-import org.apache.lenya.cms.publication.PageEnvelopeException;
-import org.apache.lenya.cms.publication.PageEnvelopeFactory;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.transaction.IdentityMap;
-import org.apache.lenya.transaction.UnitOfWork;
-
-/**
- * A factory for the "lenya" scheme (virtual protocol), which is used to resolve any src="lenya:..."
- * attributes in sitemaps. This implementation constructs the path to the source document from the
- * page envelope and delegates any further resolving to the "context" source resolver of Cocoon.
- * 
- * @version $Id$
- */
-public class LenyaSourceFactory extends AbstractLogEnabled implements SourceFactory, ThreadSafe,
-        Contextualizable, Serviceable, Configurable {
-
-    protected static final String SCHEME = "lenya:";
-
-    /** fallback if no configuration is available */
-    protected static final String DEFAULT_DELEGATION_SCHEME = "context:";
-    protected static final String DEFAULT_DELEGATION_PREFIX = "/"
-            + Publication.PUBLICATION_PREFIX_URI;
-
-    private Context context;
-    private ServiceManager manager;
-    private String delegationScheme;
-    private String delegationPrefix;
-
-    /**
-     * Used for resolving the object model.
-     * @see org.apache.avalon.framework.context.Contextualizable#contextualize(org.apache.avalon.framework.context.Context)
-     */
-    public void contextualize(Context _context) throws ContextException {
-        this.context = _context;
-    }
-
-    /**
-     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service(ServiceManager _manager) throws ServiceException {
-        this.manager = _manager;
-    }
-
-    /**
-     * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
-     */
-    public void configure(Configuration configuration) throws ConfigurationException {
-        this.delegationScheme = configuration.getAttribute("scheme", DEFAULT_DELEGATION_SCHEME);
-        this.delegationPrefix = configuration.getAttribute("prefix", DEFAULT_DELEGATION_PREFIX);
-    }
-
-    /**
-     * @see org.apache.excalibur.source.SourceFactory#getSource(java.lang.String, java.util.Map)
-     */
-    public Source getSource(final String location, final Map parameters)
-            throws MalformedURLException, IOException, SourceException {
-
-        SourceResolver sourceResolver = null;
-
-        try {
-            sourceResolver = (SourceResolver) this.manager
-                    .lookup(org.apache.excalibur.source.SourceResolver.ROLE);
-
-            String path = location.substring(SCHEME.length());
-
-            if (!path.startsWith("//")) {
-
-                Map objectModel = ContextHelper.getObjectModel(this.context);
-                try {
-                    DocumentIdentityMap map = new DocumentIdentityMap(this.manager, getLogger());
-                    PageEnvelopeFactory pageEnvelopeFactory = PageEnvelopeFactory.getInstance();
-
-                    if (pageEnvelopeFactory != null) {
-                        PageEnvelope pageEnvelope = pageEnvelopeFactory.getPageEnvelope(map,
-                                objectModel);
-
-                        if (pageEnvelope != null) {
-                            String publicationID = pageEnvelope.getPublication().getId();
-                            String area = pageEnvelope.getDocument().getArea();
-                            path = "/" + publicationID + "/" + Publication.CONTENT_PATH + "/"
-                                    + area + path;
-                        }
-                    }
-                } catch (final PageEnvelopeException e1) {
-                    throw new SourceException(
-                            "Cannot attach publication-id and/or area to " + path, e1);
-                }
-            }
-
-            while (path.startsWith("/")) {
-                path = path.substring(1);
-            }
-
-            IdentityMap map = null;
-
-            Request request = ContextHelper.getRequest(this.context);
-            UnitOfWork unit = (UnitOfWork) request.getAttribute(UnitOfWork.class.getName());
-            if (unit != null) {
-                map = unit.getIdentityMap();
-            } else {
-                map = new DocumentIdentityMap(this.manager, getLogger());
-            }
-
-            if (getLogger().isDebugEnabled()) {
-                getLogger().debug("Creating repository source for URI [" + location + "]");
-            }
-
-            //            path = this.delegationScheme + this.delegationPrefix + path;
-            return new RepositorySource(this.manager, location, map, getLogger());
-
-            //            return sourceResolver.resolveURI(path);
-
-        } catch (final ServiceException e) {
-            throw new SourceException(e.getMessage(), e);
-        } finally {
-            this.manager.release(sourceResolver);
-        }
-    }
-
-    /**
-     * Does nothing because the delegated factory does this.
-     * @see org.apache.excalibur.source.SourceFactory#release(org.apache.excalibur.source.Source)
-     */
-    public void release(Source source) {
-        // do nothing
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/cocoon/source/RepositorySource.java b/src/java/org/apache/lenya/cms/cocoon/source/RepositorySource.java
deleted file mode 100644
index ddce7e4..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/source/RepositorySource.java
+++ /dev/null
@@ -1,296 +0,0 @@
-/*
- * Created on 03.04.2005
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.apache.lenya.cms.cocoon.source;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.PipedInputStream;
-import java.io.PipedOutputStream;
-import java.net.MalformedURLException;
-
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.excalibur.source.ModifiableSource;
-import org.apache.excalibur.source.SourceException;
-import org.apache.excalibur.source.SourceNotFoundException;
-import org.apache.excalibur.source.impl.AbstractSource;
-import org.apache.lenya.cms.repository.Node;
-import org.apache.lenya.cms.repository.SourceNodeFactory;
-import org.apache.lenya.transaction.IdentityMap;
-import org.apache.lenya.transaction.TransactionException;
-
-/**
- * Repository source.
- * 
- * @version $Id:$
- */
-public class RepositorySource extends AbstractSource implements ModifiableSource,
-        TransactionableSource {
-
-    private ServiceManager manager;
-    private Node node;
-    private IdentityMap identityMap;
-    private Logger logger;
-    protected static final String SCHEME = "lenya";
-
-    /**
-     * @param manager The service manager.
-     * @param uri The source URI.
-     * @param map The identity map.
-     * @param logger The logger.
-     * @throws SourceException if an error occurs.
-     * @throws MalformedURLException if an error occurs.
-     */
-    public RepositorySource(ServiceManager manager, String uri, IdentityMap map, Logger logger)
-            throws SourceException, MalformedURLException {
-        this.manager = manager;
-        this.logger = logger;
-        this.identityMap = map;
-
-        if (uri == null) {
-            throw new MalformedURLException("The source URI must not be null!");
-        }
-
-        setSystemId(uri);
-
-        // Scheme
-        int start = 0;
-        int end = uri.indexOf(':');
-        if (end == -1)
-            throw new MalformedURLException(
-                    "Malformed uri for xmodule source (cannot find scheme) : " + uri);
-
-        String scheme = uri.substring(start, end);
-        if (!SCHEME.equals(scheme))
-            throw new MalformedURLException("Malformed uri for a xmodule source : " + uri);
-
-        setScheme(scheme);
-
-        if (map.getFactory(Node.IDENTIFIABLE_TYPE) == null) {
-            map.setFactory(Node.IDENTIFIABLE_TYPE, new SourceNodeFactory(this.manager, logger));
-        }
-
-        this.node = (Node) map.get(Node.IDENTIFIABLE_TYPE, uri);
-    }
-
-    /**
-     * @return The repository node which is accessed by this source.
-     */
-    public Node getNode() {
-        return this.node;
-    }
-
-    protected Logger getLogger() {
-        return this.logger;
-    }
-
-    /**
-     * @see org.apache.excalibur.source.ModifiableSource#getOutputStream()
-     */
-    public OutputStream getOutputStream() throws IOException {
-        try {
-            if (!this.node.isLocked()) {
-                throw new RuntimeException("Cannot write to source [" + getURI() + "]: not locked!");
-            }
-            this.identityMap.getUnitOfWork().registerDirty(this.node);
-            return this.node.getOutputStream();
-        } catch (TransactionException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    /**
-     * @see org.apache.excalibur.source.ModifiableSource#delete()
-     */
-    public void delete() {
-        try {
-            if (!this.node.isLocked()) {
-                throw new RuntimeException("Cannot delete source [" + getURI() + "]: not locked!");
-            } else {
-                this.identityMap.getUnitOfWork().registerRemoved(this.node);
-            }
-        } catch (TransactionException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    /**
-     * @see org.apache.excalibur.source.ModifiableSource#canCancel(java.io.OutputStream)
-     */
-    public boolean canCancel(OutputStream arg0) {
-        return false;
-    }
-
-    /**
-     * @see org.apache.excalibur.source.ModifiableSource#cancel(java.io.OutputStream)
-     */
-    public void cancel(OutputStream arg0) throws IOException {
-    }
-
-    /**
-     * @see org.apache.excalibur.source.Source#exists()
-     */
-    public boolean exists() {
-        try {
-            return this.node.exists();
-        } catch (TransactionException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    /**
-     * @see org.apache.excalibur.source.Source#getInputStream()
-     */
-    public InputStream getInputStream() throws IOException, SourceNotFoundException {
-        if (!exists()) {
-            throw new SourceNotFoundException("The source [" + getURI() + "] does not exist!");
-        }
-        try {
-            return this.node.getInputStream();
-        } catch (TransactionException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    protected InputStream convert(org.w3c.dom.Document edoc) throws IOException {
-
-        final org.w3c.dom.Document doc = edoc;
-        final PipedOutputStream pos = new PipedOutputStream();
-        PipedInputStream pis = new PipedInputStream();
-        pis.connect(pos);
-
-        (new Thread(new Runnable() {
-
-            public void run() {
-                try {
-                    transform(doc, pos);
-                } catch (TransformerException e) {
-                    throw new RuntimeException(
-                            "Failed to tranform org.w3c.dom.Document to PipedOutputStream", e);
-                } finally {
-                    try {
-                        pos.close();
-                    } catch (Exception ignore) {
-                        ignore.printStackTrace();
-                    }
-                }
-            }
-        }, getClass().getName() + ".convert(org.w3c.dom.Document edoc)")).start();
-
-        return pis;
-    }
-
-    void transform(org.w3c.dom.Document edoc, PipedOutputStream pos)
-            throws TransformerException {
-
-        TransformerFactory tFactory = TransformerFactory.newInstance();
-        Transformer transformer = tFactory.newTransformer();
-
-        transformer.setOutputProperty("encoding", "UTF-8");
-        transformer.setOutputProperty("indent", "yes");
-
-        transformer.transform(new DOMSource(edoc), new StreamResult(pos));
-
-    }
-
-    /**
-     * @see org.apache.lenya.cms.cocoon.source.TransactionableSource#checkout()
-     */
-    public void checkout() throws TransactionException {
-    }
-
-    /**
-     * @see org.apache.lenya.cms.cocoon.source.TransactionableSource#checkin()
-     */
-    public void checkin() throws TransactionException {
-    }
-
-    /**
-     * @see org.apache.lenya.cms.cocoon.source.TransactionableSource#lock()
-     */
-    public void lock() throws TransactionException {
-        if (this.identityMap.getUnitOfWork() != null) {
-            try {
-                this.node.lock();
-            } catch (TransactionException e) {
-                throw new RuntimeException("Locking source [" + getURI() + "] failed.");
-            }
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.cocoon.source.TransactionableSource#unlock()
-     */
-    public void unlock() throws TransactionException {
-        if (this.identityMap.getUnitOfWork() != null) {
-            try {
-                this.node.unlock();
-            } catch (TransactionException e) {
-                throw new RuntimeException("Locking source [" + getURI() + "] failed.");
-            }
-        }
-    }
-
-    protected boolean isLocked() throws TransactionException {
-        if (this.identityMap.getUnitOfWork() != null) {
-            try {
-                return this.node.isLocked();
-            } catch (TransactionException e) {
-                throw new RuntimeException("Locking source [" + getURI() + "] failed.");
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Registerns the source as dirty.
-     * @throws TransactionException if an error occurs.
-     */
-    public void registerDirty() throws TransactionException {
-        this.identityMap.getUnitOfWork().registerDirty(this.node);
-    }
-
-    /**
-     * @see org.apache.excalibur.source.Source#getContentLength()
-     */
-    public long getContentLength() {
-        try {
-            return this.node.getContentLength();
-        } catch (TransactionException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    /**
-     * @see org.apache.excalibur.source.Source#getLastModified()
-     */
-    public long getLastModified() {
-        try {
-            return this.node.getLastModified();
-        } catch (TransactionException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    /**
-     * @see org.apache.excalibur.source.Source#getMimeType()
-     */
-    public String getMimeType() {
-        try {
-            return this.node.getMimeType();
-        } catch (TransactionException e) {
-            throw new RuntimeException(e);
-        }
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/cocoon/source/SourceUtil.java b/src/java/org/apache/lenya/cms/cocoon/source/SourceUtil.java
deleted file mode 100644
index 6cf5762..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/source/SourceUtil.java
+++ /dev/null
@@ -1,416 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.cocoon.source;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.net.MalformedURLException;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.commons.io.CopyUtils;
-import org.apache.commons.io.output.ByteArrayOutputStream;
-import org.apache.excalibur.source.ModifiableSource;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceException;
-import org.apache.excalibur.source.SourceNotFoundException;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.lenya.transaction.TransactionException;
-import org.apache.lenya.xml.DocumentHelper;
-import org.w3c.dom.Document;
-import org.xml.sax.SAXException;
-
-/**
- * @version $Id$
- */
-public final class SourceUtil {
-
-    /**
-     * <p>
-     * Copies one Source to another using a source buffer i.e. the source Source is buffered before
-     * it is copied to its final destination.
-     * </p>
-     * <p>
-     * The optional buffering is sometimes useful, if the source Source somehow depends on the
-     * destination Source. This situation may occur e.g. if source Source is a Cocoon pipeline.
-     * </p>
-     * <p>
-     * <em>NOTE:</em> o.a.e..s.SourceUtil.copy does not close streams on an exception!!
-     * </p>
-     * @param source
-     * @param destination
-     * @param useBuffer If true, the source data will be read into a buffer before it is written to
-     *            the final destination.
-     * @throws IOException If an error occures.
-     */
-    public static void copy(Source source, ModifiableSource destination, boolean useBuffer)
-            throws IOException {
-        InputStream sourceInputStream = null;
-        OutputStream destOutputStream = null;
-        try {
-            sourceInputStream = source.getInputStream();
-            destOutputStream = destination.getOutputStream();
-
-            if (useBuffer) {
-                final ByteArrayOutputStream sourceBos = new ByteArrayOutputStream();
-                CopyUtils.copy(sourceInputStream, sourceBos);
-                CopyUtils.copy(sourceBos.toByteArray(), destOutputStream);
-            } else {
-                CopyUtils.copy(sourceInputStream, destOutputStream);
-            }
-        } finally {
-            if (destOutputStream != null) {
-                destOutputStream.flush();
-                destOutputStream.close();
-            }
-            if (sourceInputStream != null) {
-                sourceInputStream.close();
-            }
-        }
-    }
-
-    /**
-     * Copies one Source to another. The source Source is optionally buffered.
-     * @param resolver The SourceResolver to use for lookin up Sources.
-     * @param sourceUri The source to be copied.
-     * @param destUri The URI to copy to.
-     * @param useBuffer If true, the source Source is buffered before copied to the final
-     *            destination.
-     * @throws IOException If an error occures.
-     * @throws SourceException If the destination is not modifiable.
-     * @see #copy(Source, ModifiableSource, boolean)
-     */
-    public static void copy(SourceResolver resolver, String sourceUri, String destUri,
-            boolean useBuffer) throws IOException, SourceException {
-        Source source = null;
-        Source dest = null;
-        try {
-            source = resolver.resolveURI(sourceUri);
-            dest = resolver.resolveURI(destUri);
-
-            if (!(dest instanceof ModifiableSource))
-                throw new SourceException("Destination '" + dest.getURI() + "' is not modifiable.");
-
-            copy(source, (ModifiableSource) dest, useBuffer);
-        } finally {
-            if (source != null)
-                resolver.release(source);
-            if (dest != null)
-                resolver.release(dest);
-        }
-    }
-
-    /**
-     * Copies a Source without buffering.
-     * @param resolver A SourceResolver instance.
-     * @param sourceUri The source URI to copy from.
-     * @param destUri The destination URI to copy to.
-     * @throws IOException If an error occures.
-     * @see #copy(SourceResolver, String, String, boolean)
-     */
-    public static void copy(SourceResolver resolver, String sourceUri, String destUri)
-            throws IOException {
-        copy(resolver, sourceUri, destUri, false);
-    }
-
-    /**
-     * Reads a DOM from a source.
-     * @param sourceUri The source URI.
-     * @param manager The service manager.
-     * @return A document or <code>null</code> if the source does not exist.
-     * @throws ServiceException if an error occurs.
-     * @throws SourceNotFoundException if an error occurs.
-     * @throws ParserConfigurationException if an error occurs.
-     * @throws SAXException if an error occurs.
-     * @throws IOException if an error occurs.
-     */
-    public static Document readDOM(String sourceUri, ServiceManager manager)
-            throws ServiceException, SourceNotFoundException, ParserConfigurationException,
-            SAXException, IOException {
-        SourceResolver resolver = null;
-        Source source = null;
-        Document document = null;
-        try {
-
-            resolver = (SourceResolver) manager.lookup(SourceResolver.ROLE);
-            source = resolver.resolveURI(sourceUri);
-
-            if (source.exists()) {
-                document = DocumentHelper.readDocument(source.getInputStream());
-            }
-        } finally {
-            if (resolver != null) {
-                if (source != null) {
-                    resolver.release(source);
-                }
-                manager.release(resolver);
-            }
-        }
-        return document;
-    }
-
-    /**
-     * Writes a DOM to a source.
-     * @param document The document.
-     * @param sourceUri The source URI.
-     * @param manager The service manager.
-     * @throws TransformerConfigurationException if an error occurs.
-     * @throws TransformerException if an error occurs.
-     * @throws ServiceException if the source resolver could not be obtained.
-     * @throws MalformedURLException if the source URI is not valid.
-     * @throws IOException if an error occurs.
-     */
-    public static void writeDOM(Document document, String sourceUri, ServiceManager manager)
-            throws TransformerConfigurationException, TransformerException, ServiceException,
-            MalformedURLException, IOException {
-        SourceResolver resolver = null;
-        ModifiableSource source = null;
-        try {
-
-            resolver = (SourceResolver) manager.lookup(SourceResolver.ROLE);
-            source = (ModifiableSource) resolver.resolveURI(sourceUri);
-
-            OutputStream oStream = source.getOutputStream();
-            Writer writer = new OutputStreamWriter(oStream);
-            DocumentHelper.writeDocument(document, writer);
-            if (oStream != null) {
-                oStream.flush();
-                try {
-                    oStream.close();
-                } catch (Throwable t) {
-                    throw new RuntimeException("Could not write document: ", t);
-                }
-            }
-        } finally {
-            if (resolver != null) {
-                if (source != null) {
-                    resolver.release(source);
-                }
-                manager.release(resolver);
-            }
-        }
-    }
-
-    /**
-     * Deletes a source if it exists.
-     * @param sourceUri The source URI.
-     * @param manager The service manager.
-     * @throws ServiceException if an error occurs.
-     * @throws MalformedURLException if an error occurs.
-     * @throws IOException if an error occurs.
-     */
-    public static void delete(String sourceUri, ServiceManager manager) throws ServiceException,
-            MalformedURLException, IOException {
-        SourceResolver resolver = null;
-        ModifiableSource source = null;
-        try {
-
-            resolver = (SourceResolver) manager.lookup(SourceResolver.ROLE);
-            source = (ModifiableSource) resolver.resolveURI(sourceUri);
-            if (source.exists()) {
-                source.delete();
-            }
-        } finally {
-            if (resolver != null) {
-                if (source != null) {
-                    resolver.release(source);
-                }
-                manager.release(resolver);
-            }
-        }
-    }
-
-    /**
-     * Checks if a source exists.
-     * @param sourceUri The source URI.
-     * @param manager The service manager.
-     * @return A boolean value.
-     * @throws ServiceException if an error occurs.
-     * @throws MalformedURLException if an error occurs.
-     * @throws IOException if an error occurs.
-     */
-    public static boolean exists(String sourceUri, ServiceManager manager) throws ServiceException,
-            MalformedURLException, IOException {
-        SourceResolver resolver = null;
-        Source source = null;
-        try {
-
-            resolver = (SourceResolver) manager.lookup(SourceResolver.ROLE);
-            source = resolver.resolveURI(sourceUri);
-
-            return source.exists();
-        } finally {
-            if (resolver != null) {
-                if (source != null) {
-                    resolver.release(source);
-                }
-                manager.release(resolver);
-            }
-        }
-    }
-
-    /**
-     * Checks out a transactionable source.
-     * @param sourceUri The source URI.
-     * @param manager The service manager.
-     * @throws TransactionException If an error occurs.
-     * @throws ServiceException If an error occurs.
-     * @throws MalformedURLException If an error occurs.
-     * @throws IOException If an error occurs.
-     */
-    public static void checkout(String sourceUri, ServiceManager manager)
-            throws TransactionException, ServiceException, MalformedURLException, IOException {
-        SourceResolver resolver = null;
-        TransactionableSource source = null;
-        try {
-
-            resolver = (SourceResolver) manager.lookup(SourceResolver.ROLE);
-            source = (TransactionableSource) resolver.resolveURI(sourceUri);
-
-            source.checkout();
-
-        } finally {
-            if (resolver != null) {
-                if (source != null) {
-                    resolver.release(source);
-                }
-                manager.release(resolver);
-            }
-        }
-    }
-
-    /**
-     * Checks in a transactionable source.
-     * @param sourceUri The source URI.
-     * @param manager The service manager.
-     * @throws TransactionException If an error occurs.
-     * @throws ServiceException If an error occurs.
-     * @throws MalformedURLException If an error occurs.
-     * @throws IOException If an error occurs.
-     */
-    public static void checkin(String sourceUri, ServiceManager manager)
-            throws TransactionException, ServiceException, MalformedURLException, IOException {
-        SourceResolver resolver = null;
-        TransactionableSource source = null;
-        try {
-
-            resolver = (SourceResolver) manager.lookup(SourceResolver.ROLE);
-            source = (TransactionableSource) resolver.resolveURI(sourceUri);
-
-            source.checkin();
-
-        } finally {
-            if (resolver != null) {
-                if (source != null) {
-                    resolver.release(source);
-                }
-                manager.release(resolver);
-            }
-        }
-    }
-
-    /**
-     * Locks a transactionable source.
-     * @param sourceUri The source URI.
-     * @param manager The service manager.
-     * @throws TransactionException If an error occurs.
-     */
-    public static void lock(String sourceUri, ServiceManager manager) throws TransactionException {
-        SourceResolver resolver = null;
-        TransactionableSource source = null;
-        try {
-
-            resolver = (SourceResolver) manager.lookup(SourceResolver.ROLE);
-            source = (TransactionableSource) resolver.resolveURI(sourceUri);
-
-            source.lock();
-
-        } catch (Exception e) {
-            throw new TransactionException(e);
-        } finally {
-            if (resolver != null) {
-                if (source != null) {
-                    resolver.release(source);
-                }
-                manager.release(resolver);
-            }
-        }
-    }
-
-    /**
-     * Unlocks a transactionable source.
-     * @param sourceUri The source URI.
-     * @param manager The service manager.
-     * @throws TransactionException If an error occurs.
-     */
-    public static void unlock(String sourceUri, ServiceManager manager) throws TransactionException {
-        SourceResolver resolver = null;
-        TransactionableSource source = null;
-        try {
-
-            resolver = (SourceResolver) manager.lookup(SourceResolver.ROLE);
-            source = (TransactionableSource) resolver.resolveURI(sourceUri);
-
-            source.unlock();
-
-        } catch (Exception e) {
-            throw new TransactionException(e);
-        } finally {
-            if (resolver != null) {
-                if (source != null) {
-                    resolver.release(source);
-                }
-                manager.release(resolver);
-            }
-        }
-    }
-
-    /**
-     * Registers a source as dirty.
-     * @param sourceUri The source URI.
-     * @param manager The service manager.
-     */
-    public static void registerDirty(String sourceUri, ServiceManager manager) {
-        SourceResolver resolver = null;
-        RepositorySource source = null;
-        try {
-
-            resolver = (SourceResolver) manager.lookup(SourceResolver.ROLE);
-            source = (RepositorySource) resolver.resolveURI(sourceUri);
-
-            source.registerDirty();
-
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (resolver != null) {
-                if (source != null) {
-                    resolver.release(source);
-                }
-                manager.release(resolver);
-            }
-        }
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/cocoon/source/TransactionableSource.java b/src/java/org/apache/lenya/cms/cocoon/source/TransactionableSource.java
deleted file mode 100644
index 11d2b0f..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/source/TransactionableSource.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Created on 03.04.2005
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.apache.lenya.cms.cocoon.source;
-
-import org.apache.excalibur.source.Source;
-import org.apache.lenya.transaction.TransactionException;
-
-/**
- * Transactionable source.
- *
- * @version $Id:$
- */
-public interface TransactionableSource extends Source {
-
-    /**
-     * Checks the source out.
-     * @throws TransactionException if an error occurs.
-     */
-    void checkout() throws TransactionException;
-    
-    /**
-     * Checks the source in.
-     * @throws TransactionException if an error occurs.
-     */
-    void checkin() throws TransactionException;
-    
-    void lock() throws TransactionException;
-    
-    void unlock() throws TransactionException;
-    
-}
diff --git a/src/java/org/apache/lenya/cms/cocoon/task/CocoonTaskWrapper.java b/src/java/org/apache/lenya/cms/cocoon/task/CocoonTaskWrapper.java
deleted file mode 100644
index 2c3269f..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/task/CocoonTaskWrapper.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.cocoon.task;
-
-import java.util.Iterator;
-import java.util.Map;
-
-import org.apache.avalon.framework.logger.ConsoleLogger;
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.environment.Session;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.Identity;
-import org.apache.lenya.ac.Role;
-import org.apache.lenya.ac.User;
-import org.apache.lenya.ac.impl.PolicyAuthorizer;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationException;
-import org.apache.lenya.cms.publication.PublicationFactory;
-import org.apache.lenya.cms.task.DefaultTaskWrapper;
-import org.apache.lenya.cms.task.ExecutionException;
-import org.apache.lenya.cms.task.Notifier;
-import org.apache.lenya.cms.task.TaskWrapperParameters;
-import org.apache.lenya.cms.task.WorkflowInvoker;
-import org.apache.lenya.util.NamespaceMap;
-import org.apache.lenya.util.ServletHelper;
-import org.apache.log4j.Logger;
-
-/**
- * Task wrapper to be used from Cocoon components.
- */
-public class CocoonTaskWrapper extends DefaultTaskWrapper {
-
-    private static Logger log = Logger.getLogger(CocoonTaskWrapper.class);
-
-    /**
-     * Ctor to be called from a Cocoon component.
-     * @param objectModel A Cocoon object model.
-     * @param parameters A parameters object.
-     * @param manager The service manager to use.
-     * @throws ExecutionException when something went wrong.
-     */
-    public CocoonTaskWrapper(Map objectModel, Parameters parameters, ServiceManager manager)
-            throws ExecutionException {
-        super(manager);
-
-        log.debug("Creating CocoonTaskWrapper");
-
-        Publication publication;
-        try {
-            PublicationFactory factory = PublicationFactory.getInstance(new ConsoleLogger());
-            publication = factory.getPublication(objectModel);
-        } catch (PublicationException e) {
-            throw new ExecutionException(e);
-        }
-        Request request = ObjectModelHelper.getRequest(objectModel);
-
-        initialize(parameters, publication, request);
-    }
-
-    /**
-     * Ctor.
-     */
-    protected CocoonTaskWrapper(ServiceManager manager) {
-        super(manager);
-    }
-
-    /**
-     * Initializes this wrapper.
-     * @param parameters The task parameters.
-     * @param publication The publication.
-     * @param request The request.
-     * @throws ExecutionException when something went wrong.
-     */
-    protected void initialize(Parameters parameters, Publication publication, Request request)
-            throws ExecutionException {
-        setNotifying(request);
-
-        Parameters taskParameters = extractTaskParameters(parameters, publication, request);
-        getTaskParameters().parameterize(taskParameters);
-
-        String taskId = request.getParameter(TaskWrapperParameters.TASK_ID);
-        taskId = parameters.getParameter(TaskWrapperParameters.TASK_ID, taskId);
-
-        String webappUrl = ServletHelper.getWebappURI(request);
-        initialize(taskId, publication, webappUrl, taskParameters);
-
-        String eventName = request.getParameter(WorkflowInvoker.EVENT_REQUEST_PARAMETER);
-        if (eventName == null) {
-            eventName = request.getParameter(WorkflowInvoker.LENYA_EVENT_REQUEST_PARAMETER);
-        }
-        if (eventName != null) {
-            Session session = request.getSession(false);
-            if (session == null) {
-                log.debug("No session found - not enabling workflow handling.");
-            } else {
-                Identity identity = Identity.getIdentity(session);
-                if (identity == null) {
-                    log.debug("No identity found - not enabling workflow handling.");
-                } else {
-                    log.debug("Identity found - enabling workflow handling.");
-                    Role[] roles;
-                    try {
-                        roles = PolicyAuthorizer.getRoles(request);
-                    } catch (AccessControlException e) {
-                        throw new ExecutionException(e);
-                    }
-                    setWorkflowAware(eventName, identity, roles);
-                }
-            }
-        }
-
-    }
-
-    /**
-     * Enables notification if the corresponding request parameters exist.
-     * @param request The request.
-     */
-    protected void setNotifying(Request request) {
-
-        log.debug("Trying to initialize notification ...");
-
-        Map requestParameters = ServletHelper.getParameterMap(request);
-        String key;
-        String value;
-        Map.Entry entry;
-
-        log.debug("    Request parameters:");
-        for (Iterator iter = requestParameters.entrySet().iterator(); iter.hasNext();) {
-            entry = (Map.Entry) iter.next();
-            key = (String) entry.getKey();
-            value = (String) entry.getValue();
-            log.debug("        [" + key + "] = [" + value + "]");
-        }
-
-        NamespaceMap notificationMap = new NamespaceMap(requestParameters, Notifier.PREFIX);
-
-        log.debug("    Notification parameters:");
-        for (Iterator iter = notificationMap.getMap().entrySet().iterator(); iter.hasNext();) {
-            entry = (Map.Entry) iter.next();
-            key = (String) entry.getKey();
-            value = (String) entry.getValue();
-            log.debug("        [" + key + "] = [" + value + "]");
-        }
-
-        if (notificationMap.getMap().isEmpty()) {
-            log.debug("    No notification parameters found.");
-        } else {
-            log.debug("    Initializing notification");
-
-            Identity identity = Identity.getIdentity(request.getSession());
-            User user = identity.getUser();
-            String eMail = user.getEmail();
-            notificationMap.put(Notifier.PARAMETER_FROM, eMail);
-            log.debug("    Setting from address [" + Notifier.PARAMETER_FROM + "] = [" + eMail
-                    + "]");
-
-            String toKey = NamespaceMap.getFullName(Notifier.PREFIX, Notifier.PARAMETER_TO);
-            StringBuffer buf = new StringBuffer();
-            String[] toValues = request.getParameterValues(toKey);
-
-            if (toValues == null) {
-                throw new IllegalStateException(
-                        "You must specify at least one [notification.tolist] request parameter!");
-            }
-
-            for (int i = 0; i < toValues.length; i++) {
-                if (i > 0 && !"".equals(buf.toString())) {
-                    buf.append(",");
-                }
-                log.debug("    Adding notification address [" + toValues[i].trim() + "]");
-                buf.append(toValues[i].trim());
-            }
-
-            notificationMap.put(Notifier.PARAMETER_TO, buf.toString());
-            setNotifying(notificationMap);
-        }
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/cocoon/transformation/AccessControlSitetreeTransformer.java b/src/java/org/apache/lenya/cms/cocoon/transformation/AccessControlSitetreeTransformer.java
deleted file mode 100644
index 3f42874..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/transformation/AccessControlSitetreeTransformer.java
+++ /dev/null
@@ -1,263 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.cocoon.transformation;
-
-import java.io.IOException;
-import java.util.Map;
-
-import org.apache.avalon.framework.activity.Disposable;
-import org.apache.avalon.framework.parameters.ParameterException;
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.cocoon.ProcessingException;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.environment.SourceResolver;
-import org.apache.cocoon.transformation.AbstractSAXTransformer;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.AccessController;
-import org.apache.lenya.ac.AccessControllerResolver;
-import org.apache.lenya.ac.AccreditableManager;
-import org.apache.lenya.ac.Authorizer;
-import org.apache.lenya.ac.Identity;
-import org.apache.lenya.ac.Policy;
-import org.apache.lenya.ac.PolicyManager;
-import org.apache.lenya.ac.Role;
-import org.apache.lenya.ac.impl.DefaultAccessController;
-import org.apache.lenya.ac.impl.PolicyAuthorizer;
-import org.apache.lenya.cms.site.tree.DefaultSiteTree;
-import org.apache.lenya.cms.site.tree.SiteTreeNodeImpl;
-import org.apache.lenya.util.ServletHelper;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.AttributesImpl;
-
-/**
- * This transformer is applied to the sitetree.
- * It marks the site element and all node elements the
- * current identity is not allowed to access 
- * with a <code>protected="true"</code> attribute.
- */
-public class AccessControlSitetreeTransformer
-    extends AbstractSAXTransformer
-    implements Disposable {
-
-    /**
-     * <code>ATTRIBUTE_PROTECTED</code> The attribute for protected
-     */
-    public static final String ATTRIBUTE_PROTECTED = "protected";
-    /**
-     * <code>PARAMETER_PUBLICATION_ID</code> The publication id parameter
-     */
-    public static final String PARAMETER_PUBLICATION_ID = "publication-id";
-    /**
-     * <code>PARAMETER_AREA</code> The area parameter
-     */
-    public static final String PARAMETER_AREA = "area";
-
-    private String documentId;
-    private ServiceSelector serviceSelector;
-    private PolicyManager policyManager;
-    private AccessControllerResolver acResolver;
-    private AccreditableManager accreditableManager;
-    private Identity identity;
-    private String urlPrefix;
-
-    /**
-     * @see org.apache.cocoon.sitemap.SitemapModelComponent#setup(org.apache.cocoon.environment.SourceResolver, java.util.Map, java.lang.String, org.apache.avalon.framework.parameters.Parameters)
-     */
-    public void setup(SourceResolver _resolver, Map _objectModel, String src, Parameters par)
-        throws ProcessingException, SAXException, IOException {
-        super.setup(_resolver, _objectModel, src, par);
-
-        this.serviceSelector = null;
-        this.acResolver = null;
-        this.policyManager = null;
-
-        this.identity = Identity.getIdentity(this.request.getSession(false));
-
-        try {
-            String publicationId = par.getParameter(PARAMETER_PUBLICATION_ID);
-            String area = par.getParameter(PARAMETER_AREA);
-
-            if (getLogger().isDebugEnabled()) {
-                getLogger().debug("Setting up transformer");
-                getLogger().debug("    Identity:       [" + this.identity + "]");
-                getLogger().debug("    Publication ID: [" + publicationId + "]");
-                getLogger().debug("    Area:           [" + area + "]");
-            }
-
-            this.urlPrefix = "/" + publicationId + "/" + area;
-
-            Request _request = ObjectModelHelper.getRequest(_objectModel);
-
-            this.serviceSelector =
-                (ServiceSelector) this.manager.lookup(AccessControllerResolver.ROLE + "Selector");
-
-            this.acResolver =
-                (AccessControllerResolver) this.serviceSelector.select(
-                    AccessControllerResolver.DEFAULT_RESOLVER);
-
-            if (getLogger().isDebugEnabled()) {
-                getLogger().debug("    Resolved AC resolver [" + this.acResolver + "]");
-            }
-
-            String webappUrl = ServletHelper.getWebappURI(_request);
-            AccessController accessController = this.acResolver.resolveAccessController(webappUrl);
-
-            if (accessController instanceof DefaultAccessController) {
-                DefaultAccessController defaultAccessController =
-                    (DefaultAccessController) accessController;
-
-                this.accreditableManager = defaultAccessController.getAccreditableManager();
-
-                Authorizer[] authorizers = defaultAccessController.getAuthorizers();
-                for (int i = 0; i < authorizers.length; i++) {
-                    if (authorizers[i] instanceof PolicyAuthorizer) {
-                        PolicyAuthorizer policyAuthorizer = (PolicyAuthorizer) authorizers[i];
-                        this.policyManager = policyAuthorizer.getPolicyManager();
-                    }
-                }
-            }
-
-            if (getLogger().isDebugEnabled()) {
-                getLogger().debug("    Using policy manager [" + this.policyManager + "]");
-            }
-        } catch (final ParameterException e) {
-            throw new ProcessingException(e);
-        } catch (final ServiceException e) {
-            throw new ProcessingException(e);
-        } catch (final AccessControlException e) {
-            throw new ProcessingException(e);
-        }
-
-    }
-
-    /**
-     * @see org.apache.avalon.framework.activity.Disposable#dispose()
-     */
-    public void dispose() {
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Disposing transformer");
-        }
-        if (this.serviceSelector != null) {
-            if (this.acResolver != null) {
-                this.serviceSelector.release(this.acResolver);
-            }
-            this.manager.release(this.serviceSelector);
-        }
-    }
-
-    /**
-     * @see org.xml.sax.ContentHandler#startDocument()
-     */
-    public void startDocument() throws SAXException {
-        super.startDocument();
-        this.documentId = "";
-    }
-
-    /** (non-Javadoc)
-     * @see org.xml.sax.ContentHandler#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
-     */
-    public void startElement(String uri, String localName, String raw, Attributes attr)
-        throws SAXException {
-
-        Attributes attributes = attr;
-
-        if (isFragmentNode(uri, localName)) {
-            String area = attr.getValue("area"); // FIXME: don't hardcode
-            String base = attr.getValue("base");
-            if (area!=null && base!=null) {
-                this.documentId = "/"+area+base;
-            }
-        }
-        if (isNode(uri, localName)) {
-            String id = attr.getValue(SiteTreeNodeImpl.ID_ATTRIBUTE_NAME);
-            if (id != null) {
-                this.documentId += "/" + id;
-            }
-
-            if (getLogger().isDebugEnabled()) {
-                getLogger().debug("Checking node");
-                getLogger().debug("    Document ID: [" + this.documentId + "]");
-                getLogger().debug("    URL:         [" + this.urlPrefix + this.documentId + "]");
-            }
-
-            try {
-                String url = this.urlPrefix + this.documentId;
-                Policy policy = this.policyManager.getPolicy(this.accreditableManager, url);
-                Role[] roles = policy.getRoles(this.identity);
-
-                getLogger().debug("    Roles:       [" + roles.length + "]");
-
-                if (roles.length == 0) {
-                    getLogger().debug("    Adding attribute [protected='true']");
-
-                    AttributesImpl attributesImpl = new AttributesImpl(attributes);
-                    attributesImpl.addAttribute(
-                        "",
-                        ATTRIBUTE_PROTECTED,
-                        ATTRIBUTE_PROTECTED,
-                        "",
-                        Boolean.toString(true));
-                    attributes = attributesImpl;
-                }
-            } catch (AccessControlException e) {
-                throw new SAXException(e);
-            }
-        }
-
-        super.startElement(uri, localName, raw, attributes);
-    }
-
-    /**
-     * @see org.xml.sax.ContentHandler#endElement(java.lang.String, java.lang.String, java.lang.String)
-     */
-    public void endElement(String uri, String localName, String raw) throws SAXException {
-        super.endElement(uri, localName, raw);
-        if (isNode(uri, localName) && this.documentId.length() > 0) {
-            this.documentId = this.documentId.substring(0, this.documentId.lastIndexOf("/"));
-        }
-    }
-
-    /**
-     * Returns if an element represents a sitetree node.
-     * @param uri The namespace URI.
-     * @param localName The local name.
-     * @return A boolean value.
-     */
-    protected boolean isNode(String uri, String localName) {
-        return uri.equals(DefaultSiteTree.NAMESPACE_URI)
-            && (localName.equals(SiteTreeNodeImpl.NODE_NAME) || localName.equals("site"));
-    }
-
-   /**
-     * Returns if an element represents a fragment node.
-     * @param uri The namespace URI.
-     * @param localName The local name.
-     * @return A boolean value.
-     */
-    protected boolean isFragmentNode(String uri, String localName) {
-        return uri.equals(DefaultSiteTree.NAMESPACE_URI)
-            && (localName.equals("fragment"));
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/cocoon/transformation/DocumentIndexTransformer.java b/src/java/org/apache/lenya/cms/cocoon/transformation/DocumentIndexTransformer.java
deleted file mode 100644
index b8ac76d..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/transformation/DocumentIndexTransformer.java
+++ /dev/null
@@ -1,285 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.cocoon.transformation;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.avalon.framework.parameters.ParameterException;
-import org.apache.avalon.framework.parameters.Parameterizable;
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.cocoon.ProcessingException;
-import org.apache.cocoon.environment.SourceResolver;
-import org.apache.cocoon.transformation.AbstractSAXTransformer;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentBuildException;
-import org.apache.lenya.cms.publication.DocumentException;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.PageEnvelope;
-import org.apache.lenya.cms.publication.PageEnvelopeFactory;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationFactory;
-import org.apache.lenya.cms.site.SiteManager;
-import org.apache.lenya.cms.site.tree.SiteTree;
-import org.apache.lenya.cms.site.tree.SiteTreeNode;
-import org.apache.lenya.cms.site.tree.TreeSiteManager;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.AttributesImpl;
-
-/**
- * This transformer lists the children of a document if the tag <namespaceURI:children>is present in
- * this document. The list of the children is in the form :<namespaceURI:children><child
- * href="....html> <ci:include src="..." element="included"/> </child> ... </namespaceURI:children>
- * Multiple language : if a child doesn't exist in the parent language, then the version in the
- * default language will be considered. If it doesn't exist too, any other existent language will be
- * considered.
- */
-public class DocumentIndexTransformer extends AbstractSAXTransformer implements Parameterizable {
-
-    private String namespace;
-    private String cIncludeNamespace;
-
-    /**
-     * <code>CHILDREN_ELEMENT</code> The children element
-     */
-    public static final String CHILDREN_ELEMENT = "children";
-    /**
-     * <code>ABSTRACT_ATTRIBUTE</code> The abstract attribute
-     */
-    public static final String ABSTRACT_ATTRIBUTE = "abstract";
-    /**
-     * <code>NAMESPACE</code> The document index namespace
-     */
-    public static final String NAMESPACE = "http://apache.org/cocoon/lenya/documentindex/1.0";
-    /**
-     * <code>PREFIX</code> The namespace prefix
-     */
-    public static final String PREFIX = "index:";
-
-    /**
-     * @see org.apache.avalon.framework.parameters.Parameterizable#parameterize(org.apache.avalon.framework.parameters.Parameters)
-     */
-    public void parameterize(Parameters _parameters) throws ParameterException {
-        this.namespace = _parameters.getParameter("namespace", null);
-        this.cIncludeNamespace = _parameters.getParameter("cIncludeNamespace", null);
-    }
-
-    private Document document;
-    private Publication publication;
-    private String area;
-    private SiteTree siteTree;
-    private DocumentIdentityMap identityMap;
-
-    /**
-     * @see org.apache.cocoon.sitemap.SitemapModelComponent#setup(org.apache.cocoon.environment.SourceResolver,
-     *      java.util.Map, java.lang.String, org.apache.avalon.framework.parameters.Parameters)
-     */
-    public void setup(SourceResolver _resolver, Map _objectModel, String src, Parameters _parameters)
-            throws ProcessingException, SAXException, IOException {
-
-        TreeSiteManager siteManager = null;
-        ServiceSelector selector = null;
-        try {
-            super.setup(_resolver, _objectModel, src, _parameters);
-
-            parameterize(_parameters);
-
-            PageEnvelope envelope = null;
-            PublicationFactory factory = PublicationFactory.getInstance(getLogger());
-            this.publication = factory.getPublication(_objectModel);
-            this.identityMap = new DocumentIdentityMap(this.manager, getLogger());
-            envelope = PageEnvelopeFactory.getInstance().getPageEnvelope(this.identityMap,
-                    _objectModel);
-
-            setDocument(envelope.getDocument());
-            setArea(this.document.getArea());
-
-            selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
-            siteManager = (TreeSiteManager) selector.select(this.publication.getSiteManagerHint());
-
-            setSiteTree(siteManager.getTree(this.identityMap, this.publication, this.area));
-        } catch (final ProcessingException e) {
-            throw e;
-        } catch (final Exception e) {
-            throw new ProcessingException(e);
-        }
-
-    }
-
-    /**
-     * @see org.xml.sax.ContentHandler#startElement(java.lang.String, java.lang.String,
-     *      java.lang.String, org.xml.sax.Attributes)
-     */
-    public void startElement(String uri, String localName, String raw, Attributes attr)
-            throws SAXException {
-
-        try {
-            if (uri != null && uri.equals(this.namespace) && this.cIncludeNamespace != null
-                    && localName.equals(CHILDREN_ELEMENT)) {
-
-                if (getLogger().isInfoEnabled()) {
-                    getLogger().info("Inserting index");
-                }
-
-                String cIncludePrefix = "";
-                if (!this.cIncludeNamespace.equals("")) {
-                    cIncludePrefix = "ci:";
-                }
-
-                String documentId = this.document.getId();
-                String language = this.document.getLanguage();
-                String defaultLanguage = this.publication.getDefaultLanguage();
-                SiteTreeNode[] children = this.siteTree.getNode(documentId).getChildren();
-
-                super.startElement(uri, localName, raw, attr);
-
-                for (int i = 0; i < children.length; i++) {
-                    String childId = documentId + "/" + children[i].getId();
-
-                    //get child document with the same language than the parent
-                    // document
-                    Document doc;
-                    try {
-                        doc = this.identityMap.get(this.publication, this.area, childId, language);
-                    } catch (DocumentBuildException e) {
-                        throw new SAXException(e);
-                    }
-                    String url = doc.getCanonicalWebappURL();
-
-                    if (!doc.exists()) {
-                        //get first the child document in the default language
-                        // and then in any
-                        // other
-                        // existent language
-                        getLogger().debug("There is no child document [" + doc
-                                + "] in the same language as the parent document [" + language
-                                + "]");
-
-                        //available language
-                        String[] availableLanguages = null;
-                        try {
-                            availableLanguages = doc.getLanguages();
-                        } catch (final DocumentException e) {
-                            throw new SAXException(e);
-                        }
-
-                        List languages = new ArrayList();
-                        for (int l = 0; l < availableLanguages.length; l++) {
-                            if (availableLanguages[l].equals(language)) {
-                                getLogger()
-                                        .debug("Do nothing because language was already tested: ["
-                                                + availableLanguages[l] + "]");
-                            } else if (availableLanguages[l].equals(defaultLanguage)) {
-                                languages.add(0, availableLanguages[l]);
-                            } else {
-                                languages.add(availableLanguages[l]);
-                            }
-                        }
-
-                        int j = 0;
-                        while (!doc.exists() && j < languages.size()) {
-                            String newlanguage = (String) languages.get(j);
-                            try {
-                                doc = this.identityMap.get(this.publication,
-                                        this.area,
-                                        childId,
-                                        newlanguage);
-                            } catch (final DocumentBuildException e) {
-                                throw new SAXException(e);
-                            }
-                            url = doc.getCanonicalWebappURL();
-
-                            j++;
-                        }
-                    }
-
-                    if (doc.exists()) {
-                        //create the tags for the child
-                        String sourceUri = doc.getSourceURI();
-
-                        AttributesImpl attribute = new AttributesImpl();
-                        attribute.addAttribute("", "href", "href", "", url);
-                        super.startElement(NAMESPACE, "child", PREFIX + "child", attribute);
-
-                        AttributesImpl attributes = new AttributesImpl();
-                        attributes.addAttribute("", "src", "src", "", sourceUri);
-                        attributes.addAttribute("", "element", "element", "", "included");
-
-                        super.startElement(this.cIncludeNamespace, "include", cIncludePrefix
-                                + "include", attributes);
-                        super.endElement(this.cIncludeNamespace, "include", cIncludePrefix
-                                + "include");
-                        super.endElement(NAMESPACE, "child", PREFIX + "child");
-                    } else {
-                        //do nothing for this child
-                        getLogger().warn("There are no existing file for the child with id "
-                                + childId);
-                    }
-
-                }
-            } else {
-                super.startElement(uri, localName, raw, attr);
-            }
-        } catch (final DocumentException e) {
-            throw new RuntimeException(e);
-        }
-
-    }
-
-    /**
-     * @return SiteTree The siteTree belonging to the area of the document
-     */
-    public SiteTree getSiteTree() {
-        return this.siteTree;
-    }
-
-    /**
-     * @param tree The siteTree of the area, which the document belongs.
-     */
-    public void setSiteTree(SiteTree tree) {
-        this.siteTree = tree;
-    }
-
-    /**
-     * @param string The area, which the document belongs.
-     */
-    public void setArea(String string) {
-        this.area = string;
-    }
-
-    /**
-     * @param _document The document.
-     */
-    public void setDocument(Document _document) {
-        this.document = _document;
-    }
-
-    /**
-     * @param _publication The publication, which the document belongs.
-     */
-    public void setPublication(Publication _publication) {
-        this.publication = _publication;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/cocoon/transformation/LinkRewritingTransformer.java b/src/java/org/apache/lenya/cms/cocoon/transformation/LinkRewritingTransformer.java
deleted file mode 100644
index dead45b..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/transformation/LinkRewritingTransformer.java
+++ /dev/null
@@ -1,360 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.cocoon.transformation;
-
-import java.io.IOException;
-import java.util.Map;
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.avalon.framework.activity.Disposable;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.cocoon.ProcessingException;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.environment.SourceResolver;
-import org.apache.cocoon.transformation.AbstractSAXTransformer;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.AccessController;
-import org.apache.lenya.ac.AccessControllerResolver;
-import org.apache.lenya.ac.AccreditableManager;
-import org.apache.lenya.ac.Authorizer;
-import org.apache.lenya.ac.Policy;
-import org.apache.lenya.ac.PolicyManager;
-import org.apache.lenya.ac.impl.DefaultAccessController;
-import org.apache.lenya.ac.impl.PolicyAuthorizer;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentBuildException;
-import org.apache.lenya.cms.publication.DocumentException;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.PageEnvelope;
-import org.apache.lenya.cms.publication.PageEnvelopeException;
-import org.apache.lenya.cms.publication.PageEnvelopeFactory;
-import org.apache.lenya.cms.publication.Proxy;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.util.ServletHelper;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.AttributesImpl;
-
-/**
- * <p>
- * Link rewriting transformer.
- * </p>
- * 
- * <p>
- * This transformer is applied to an XHMTL document. It processes
- * <code>&lt;xhtml:a href="..."&gt;</code> attributes of the following form:
- * </p>
- * <p>
- * <code>{context-prefix}/{publication-id}/{area}{document-url}</code>
- * </p>
- * <p>
- * These links are rewritten using the following rules:
- * </p>
- * <ul>
- * <li>The area is replaced by the current area (obtained from the page envelope).</li>
- * <li>A URL prefix is added depending on the proxy configuration of the publication.</li>
- * <li>If the target document does not exist, the <code>&lt;a/&gt;</code> element is removed to
- * disable the link.</li>
- * </ul>
- * 
- * $Id: LinkRewritingTransformer.java,v 1.7 2004/03/16 11:12:16 gregor
- */
-public class LinkRewritingTransformer extends AbstractSAXTransformer implements Disposable {
-
-    private boolean ignoreAElement = false;
-    private ServiceSelector serviceSelector;
-    private PolicyManager policyManager;
-    private AccessControllerResolver acResolver;
-    private AccreditableManager accreditableManager;
-
-    private Document currentDocument;
-
-    private DocumentIdentityMap identityMap;
-
-    /**
-     * @see org.apache.cocoon.sitemap.SitemapModelComponent#setup(org.apache.cocoon.environment.SourceResolver,
-     *      java.util.Map, java.lang.String, org.apache.avalon.framework.parameters.Parameters)
-     */
-    public void setup(SourceResolver _resolver, Map _objectModel, String _source,
-            Parameters _parameters) throws ProcessingException, SAXException, IOException {
-        super.setup(_resolver, _objectModel, _source, _parameters);
-
-        try {
-            this.identityMap = new DocumentIdentityMap(this.manager, getLogger());
-            PageEnvelope envelope = PageEnvelopeFactory.getInstance()
-                    .getPageEnvelope(this.identityMap, _objectModel);
-            this.currentDocument = envelope.getDocument();
-        } catch (final PageEnvelopeException e1) {
-            throw new ProcessingException(e1);
-        }
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Setting up transformer");
-            getLogger().debug("    Processed version:       [" + getCurrentDocument() + "]");
-        }
-
-        Request _request = ObjectModelHelper.getRequest(_objectModel);
-
-        this.serviceSelector = null;
-        this.acResolver = null;
-        this.policyManager = null;
-
-        try {
-            this.serviceSelector = (ServiceSelector) this.manager
-                    .lookup(AccessControllerResolver.ROLE + "Selector");
-            this.acResolver = (AccessControllerResolver) this.serviceSelector
-                    .select(AccessControllerResolver.DEFAULT_RESOLVER);
-
-            if (getLogger().isDebugEnabled()) {
-                getLogger().debug("    Resolved AC resolver [" + this.acResolver + "]");
-            }
-            String webappUrl = ServletHelper.getWebappURI(_request);
-            AccessController accessController = this.acResolver.resolveAccessController(webappUrl);
-            if (accessController instanceof DefaultAccessController) {
-                DefaultAccessController defaultAccessController = (DefaultAccessController) accessController;
-                this.accreditableManager = defaultAccessController.getAccreditableManager();
-                Authorizer[] authorizers = defaultAccessController.getAuthorizers();
-                for (int i = 0; i < authorizers.length; i++) {
-                    if (authorizers[i] instanceof PolicyAuthorizer) {
-                        PolicyAuthorizer policyAuthorizer = (PolicyAuthorizer) authorizers[i];
-                        this.policyManager = policyAuthorizer.getPolicyManager();
-                    }
-                }
-            }
-            if (getLogger().isDebugEnabled()) {
-                getLogger().debug("    Using policy manager [" + this.policyManager + "]");
-            }
-        } catch (final ServiceException e) {
-            throw new ProcessingException(e);
-        } catch (final AccessControlException e) {
-            throw new ProcessingException(e);
-        }
-    }
-
-    /**
-     * Returns the currently processed document.
-     * @return A document.
-     */
-    protected Document getCurrentDocument() {
-        return this.currentDocument;
-    }
-
-    /**
-     * The local name of the HTML &lt;a&gt; href attribute.
-     */
-    public static final String ATTRIBUTE_HREF = "href";
-
-    private String indent = "";
-
-    /**
-     * @see org.xml.sax.ContentHandler#startElement(java.lang.String, java.lang.String,
-     *      java.lang.String, org.xml.sax.Attributes)
-     */
-    public void startElement(String uri, String name, String qname, Attributes attrs)
-            throws SAXException {
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug(this.indent + "<" + qname + "> (ignoreAElement = "
-                    + this.ignoreAElement + ")");
-            this.indent += "  ";
-        }
-
-        AttributesImpl newAttrs = null;
-        if (lookingAtAElement(name)) {
-
-            this.ignoreAElement = false;
-
-            String href = attrs.getValue(ATTRIBUTE_HREF);
-            if (href != null) {
-
-                Publication publication = getCurrentDocument().getPublication();
-
-                try {
-                    newAttrs = new AttributesImpl(attrs);
-
-                    if (getLogger().isDebugEnabled()) {
-                        getLogger().debug(this.indent + "href URL: [" + href + "]");
-                    }
-
-                    String _context = this.request.getContextPath();
-
-                    if (href.startsWith(_context + "/" + publication.getId())) {
-
-                        final String webappUrlWithAnchor = href.substring(_context.length());
-
-                        String anchor = null;
-                        String webappUrl = null;
-
-                        int anchorIndex = webappUrlWithAnchor.indexOf("#");
-                        if (anchorIndex > -1) {
-                            webappUrl = webappUrlWithAnchor.substring(0, anchorIndex);
-                            anchor = webappUrlWithAnchor.substring(anchorIndex + 1);
-                        } else {
-                            webappUrl = webappUrlWithAnchor;
-                        }
-
-                        if (getLogger().isDebugEnabled()) {
-                            getLogger().debug(this.indent + "webapp URL: [" + webappUrl + "]");
-                            getLogger().debug(this.indent + "anchor:     [" + anchor + "]");
-                        }
-                        if (this.identityMap.isDocument(webappUrl)) {
-
-                            Document targetDocument = this.identityMap.getFromURL(webappUrl);
-
-                            if (getLogger().isDebugEnabled()) {
-                                getLogger().debug(this.indent + "Resolved target document: ["
-                                        + targetDocument + "]");
-                            }
-
-                            targetDocument = this.identityMap.get(publication, getCurrentDocument()
-                                    .getArea(), targetDocument.getId(), targetDocument
-                                    .getLanguage());
-
-                            if (targetDocument.exists()) {
-                                rewriteLink(newAttrs, targetDocument, anchor);
-                            } else {
-                                this.ignoreAElement = true;
-                            }
-                        }
-                    }
-                } catch (final DocumentBuildException e) {
-                    getLogger().error("startElement failed: ", e);
-                    throw new SAXException(e);
-                } catch (final DocumentException e) {
-                    getLogger().error("startElement failed: ", e);
-                    throw new SAXException(e);
-                } catch (final AccessControlException e) {
-                    getLogger().error("startElement failed: ", e);
-                    throw new SAXException(e);
-                }
-            }
-
-        }
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug(this.indent + "ignoreAElement: " + this.ignoreAElement);
-        }
-
-        if (!(lookingAtAElement(name) && this.ignoreAElement)) {
-            if (newAttrs != null) {
-                attrs = newAttrs;
-            }
-            super.startElement(uri, name, qname, attrs);
-            if (getLogger().isDebugEnabled()) {
-                getLogger().debug(this.indent + "<" + qname + "> sent");
-            }
-        }
-    }
-
-    /**
-     * Rewrites a link.
-     * 
-     * @param newAttrs The new attributes.
-     * @param targetDocument The target document.
-     * @param anchor The anchor (the string after the # character in the URL).
-     * @throws AccessControlException when something went wrong.
-     */
-    protected void rewriteLink(AttributesImpl newAttrs, Document targetDocument, String anchor)
-            throws AccessControlException {
-
-        String webappUrl = targetDocument.getCanonicalWebappURL();
-        Policy policy = this.policyManager.getPolicy(this.accreditableManager, webappUrl);
-
-        Proxy proxy = targetDocument.getPublication().getProxy(targetDocument,
-                policy.isSSLProtected());
-
-        String rewrittenURL;
-        if (proxy == null) {
-            rewrittenURL = this.request.getContextPath() + webappUrl;
-        } else {
-            rewrittenURL = proxy.getURL(targetDocument);
-        }
-
-        if (anchor != null) {
-            rewrittenURL += "#" + anchor;
-        }
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug(this.indent + "SSL protection: [" + policy.isSSLProtected() + "]");
-            getLogger().debug(this.indent + "Resolved proxy: [" + proxy + "]");
-            getLogger().debug(this.indent + "Rewriting URL to: [" + rewrittenURL + "]");
-        }
-
-        setHrefAttribute(newAttrs, rewrittenURL);
-    }
-
-    /**
-     * Sets the value of the href attribute.
-     * 
-     * @param attr The attributes.
-     * @param value The value.
-     * @throws IllegalArgumentException if the href attribute is not contained in this attributes.
-     */
-    protected void setHrefAttribute(AttributesImpl attr, String value) {
-        int position = attr.getIndex(ATTRIBUTE_HREF);
-        if (position == -1) {
-            throw new IllegalArgumentException("The href attribute is not available!");
-        }
-        attr.setValue(position, value);
-    }
-
-    /**
-     * @see org.xml.sax.ContentHandler#endElement(java.lang.String, java.lang.String,
-     *      java.lang.String)
-     */
-    public void endElement(String uri, String name, String qname) throws SAXException {
-        if (getLogger().isDebugEnabled()) {
-            this.indent = this.indent.substring(2);
-            getLogger().debug(this.indent + "</" + qname + ">");
-        }
-        if (lookingAtAElement(name) && this.ignoreAElement) {
-            this.ignoreAElement = false;
-        } else {
-            if (getLogger().isDebugEnabled()) {
-                getLogger().debug(this.indent + "</" + qname + "> sent");
-            }
-            super.endElement(uri, name, qname);
-        }
-    }
-
-    private boolean lookingAtAElement(String name) {
-        return name.equals("a");
-    }
-
-    /**
-     * @see org.apache.avalon.framework.activity.Disposable#dispose()
-     */
-    public void dispose() {
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Disposing transformer");
-        }
-        if (this.serviceSelector != null) {
-            if (this.acResolver != null) {
-                this.serviceSelector.release(this.acResolver);
-            }
-            this.manager.release(this.serviceSelector);
-        }
-    }
-
-    /**
-     * @see org.apache.avalon.excalibur.pool.Recyclable#recycle()
-     */
-    public void recycle() {
-        this.ignoreAElement = false;
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/cocoon/transformation/UsecaseMenuTransformer.java b/src/java/org/apache/lenya/cms/cocoon/transformation/UsecaseMenuTransformer.java
deleted file mode 100644
index ca4b1c2..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/transformation/UsecaseMenuTransformer.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.cocoon.transformation;
-
-import java.io.IOException;
-import java.util.Map;
-
-import org.apache.avalon.framework.activity.Disposable;
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.cocoon.ProcessingException;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.environment.SourceResolver;
-import org.apache.cocoon.transformation.AbstractSAXTransformer;
-import org.apache.lenya.ac.AccessController;
-import org.apache.lenya.ac.AccessControllerResolver;
-import org.apache.lenya.ac.Authorizer;
-import org.apache.lenya.ac.Role;
-import org.apache.lenya.ac.impl.DefaultAccessController;
-import org.apache.lenya.ac.impl.PolicyAuthorizer;
-import org.apache.lenya.cms.ac.usecase.UsecaseAuthorizer;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationFactory;
-import org.apache.lenya.cms.usecase.Usecase;
-import org.apache.lenya.cms.usecase.UsecaseResolver;
-import org.apache.lenya.util.ServletHelper;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.AttributesImpl;
-
-/**
- * This transformer disables menu items (by removing the href attribute) which
- * are not allowed with respect to the usecase policies.
- */
-public class UsecaseMenuTransformer extends AbstractSAXTransformer implements Disposable {
-
-    /**
-     * <code>MENU_ELEMENT</code> The menu element
-     */
-    public static final String MENU_ELEMENT = "menu";
-    /**
-     * <code>ITEM_ELEMENT</code> The item element
-     */
-    public static final String ITEM_ELEMENT = "item";
-    /**
-     * <code>USECASE_ATTRIBUTE</code> The usecase attribute
-     */
-    public static final String USECASE_ATTRIBUTE = "usecase";
-    /**
-     * Comment for <code>HREF_ATTRIBUTE</code> The href attribute
-     */
-    public static final String HREF_ATTRIBUTE = "href";
-    /**
-     * <code>NAMESPACE</code> The usecase namespace
-     */
-    public static final String NAMESPACE = "http://apache.org/cocoon/lenya/usecase/1.0";
-
-    /**
-     * (non-Javadoc)
-     * @see org.xml.sax.ContentHandler#startElement(java.lang.String,
-     *      java.lang.String, java.lang.String, org.xml.sax.Attributes)
-     */
-    public void startElement(String uri, String localName, String raw, Attributes attr)
-            throws SAXException {
-
-        Attributes attributes = attr;
-
-        UsecaseResolver usecaseResolver = null;
-        try {
-            usecaseResolver = (UsecaseResolver) this.manager.lookup(UsecaseResolver.ROLE);
-
-            if (this.authorizer != null && localName.equals(ITEM_ELEMENT)) {
-                String usecaseName = attr.getValue(NAMESPACE, USECASE_ATTRIBUTE);
-
-                // filter item if usecase not allowed
-                if (usecaseName != null) {
-                    if (getLogger().isDebugEnabled()) {
-                        getLogger().debug("Found usecase [" + usecaseName + "]");
-                    }
-                    if (!this.authorizer
-                            .authorizeUsecase(usecaseName, this.roles, this.publication)) {
-                        if (getLogger().isDebugEnabled()) {
-                            getLogger().debug("Usecase not authorized");
-                        }
-                        attributes = removeHrefAttribute(attr);
-                    }
-                }
-
-                if (usecaseResolver.isRegistered(usecaseName)) {
-                    Usecase usecase = null;
-                    try {
-                        usecase = usecaseResolver.resolve(usecaseName);
-                        usecase.setSourceURL(this.sourceUrl);
-                        usecase.setName(usecaseName);
-                        if (attr.getValue(HREF_ATTRIBUTE) != null) {
-                            passRequestParameters(usecase, attr.getValue(HREF_ATTRIBUTE));
-                        }
-                        usecase.checkPreconditions();
-                        if (usecase.hasErrors()) {
-                            if (getLogger().isDebugEnabled()) {
-                                getLogger().debug("Usecase preconditions not complied");
-                            }
-                            attributes = removeHrefAttribute(attr);
-                        }
-                    } finally {
-                        if (usecase != null) {
-                            usecaseResolver.release(usecase);
-                        }
-                    }
-                }
-            }
-        } catch (final Exception e) {
-            throw new SAXException(e);
-        } finally {
-            if (usecaseResolver != null) {
-                this.manager.release(usecaseResolver);
-            }
-        }
-
-        super.startElement(uri, localName, raw, attributes);
-
-    }
-
-    /**
-     * Removes the <code>href</code> attribute.
-     * @param attr The original attributes.
-     * @return An attributes object.
-     */
-    protected Attributes removeHrefAttribute(Attributes attr) {
-        Attributes attributes = attr;
-        int hrefIndex = attributes.getIndex(HREF_ATTRIBUTE);
-        if (hrefIndex > -1) {
-            attributes = new AttributesImpl(attr);
-            ((AttributesImpl) attributes).removeAttribute(hrefIndex);
-        }
-        return attributes;
-    }
-
-    /**
-     * Pass the request parameters from the <code>href</code> attribute to the
-     * usecase handler.
-     * @param usecase The usecase handler.
-     * @param href The value of the <code>href</code> attribute.
-     */
-    void passRequestParameters(Usecase usecase, String href) {
-        int questionMarkIndex = href.indexOf("?");
-        if (questionMarkIndex > -1) {
-            String queryString = href.substring(questionMarkIndex + 1);
-            String[] nameValuePairs = queryString.split("&");
-            for (int i = 0; i < nameValuePairs.length; i++) {
-                String[] pair = nameValuePairs[i].split("=");
-                if (pair.length == 2) {
-                    String name = pair[0];
-                    String value = pair[1];
-                    usecase.setParameter(name, value);
-                }
-            }
-        }
-    }
-
-    private UsecaseAuthorizer authorizer;
-    private ServiceSelector serviceSelector = null;
-    private Role[] roles;
-    private Publication publication;
-    private AccessControllerResolver acResolver;
-    private String sourceUrl;
-
-    /**
-     * @see org.apache.cocoon.sitemap.SitemapModelComponent#setup(org.apache.cocoon.environment.SourceResolver,
-     *      java.util.Map, java.lang.String,
-     *      org.apache.avalon.framework.parameters.Parameters)
-     */
-    public void setup(SourceResolver _resolver, Map _objectModel, String src, Parameters _parameters)
-            throws ProcessingException, SAXException, IOException {
-
-        super.setup(_resolver, _objectModel, src, _parameters);
-
-        getLogger().debug("Setting up transformer");
-
-        this.serviceSelector = null;
-        this.acResolver = null;
-        this.authorizer = null;
-
-        Request _request = ObjectModelHelper.getRequest(_objectModel);
-        this.sourceUrl = ServletHelper.getWebappURI(request);
-
-        try {
-            this.roles = PolicyAuthorizer.getRoles(_request);
-
-            PublicationFactory factory = PublicationFactory.getInstance(getLogger());
-            this.publication = factory.getPublication(_objectModel);
-
-            this.serviceSelector = (ServiceSelector) this.manager
-                    .lookup(AccessControllerResolver.ROLE + "Selector");
-            this.acResolver = (AccessControllerResolver) this.serviceSelector
-                    .select(AccessControllerResolver.DEFAULT_RESOLVER);
-            getLogger().debug("Resolved AC resolver [" + this.acResolver + "]");
-
-            String webappUrl = ServletHelper.getWebappURI(_request);
-            AccessController accessController = this.acResolver.resolveAccessController(webappUrl);
-
-            if (accessController instanceof DefaultAccessController) {
-                DefaultAccessController defaultAccessController = (DefaultAccessController) accessController;
-                Authorizer[] authorizers = defaultAccessController.getAuthorizers();
-                for (int i = 0; i < authorizers.length; i++) {
-                    if (authorizers[i] instanceof UsecaseAuthorizer) {
-                        this.authorizer = (UsecaseAuthorizer) authorizers[i];
-                    }
-                }
-            }
-
-            getLogger().debug("Using authorizer [" + this.authorizer + "]");
-        } catch (final Exception e) {
-            throw new ProcessingException(e);
-        }
-
-    }
-
-    /**
-     * @see org.apache.avalon.framework.activity.Disposable#dispose()
-     */
-    public void dispose() {
-        getLogger().debug("Disposing transformer");
-        if (this.serviceSelector != null) {
-            if (this.acResolver != null) {
-                this.serviceSelector.release(this.acResolver);
-            }
-            this.manager.release(this.serviceSelector);
-        }
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/cocoon/transformation/WorkflowMenuTransformer.java b/src/java/org/apache/lenya/cms/cocoon/transformation/WorkflowMenuTransformer.java
deleted file mode 100644
index 93cae4a..0000000
--- a/src/java/org/apache/lenya/cms/cocoon/transformation/WorkflowMenuTransformer.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.cocoon.transformation;
-
-import java.io.IOException;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.cocoon.ProcessingException;
-import org.apache.cocoon.environment.SourceResolver;
-import org.apache.cocoon.transformation.AbstractSAXTransformer;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.DocumentType;
-import org.apache.lenya.cms.publication.PageEnvelope;
-import org.apache.lenya.cms.publication.PageEnvelopeFactory;
-import org.apache.lenya.cms.workflow.DocumentWorkflowable;
-import org.apache.lenya.workflow.Workflow;
-import org.apache.lenya.workflow.WorkflowManager;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.AttributesImpl;
-
-/**
- * This transformer disables menu items (by removing the href attribute) which are not allowed with
- * respect to the current workflow state.
- */
-public class WorkflowMenuTransformer extends AbstractSAXTransformer {
-    /**
-     * <code>MENU_ELEMENT</code> The menu element
-     */
-    public static final String MENU_ELEMENT = "menu";
-    /**
-     * <code>ITEM_ELEMENT</code> The item element
-     */
-    public static final String ITEM_ELEMENT = "item";
-    /**
-     * <code>EVENT_ATTRIBUTE</code> The event attribute
-     */
-    public static final String EVENT_ATTRIBUTE = "event";
-
-    /**
-     * (non-Javadoc)
-     * @see org.xml.sax.ContentHandler#startElement(java.lang.String, java.lang.String,
-     *      java.lang.String, org.xml.sax.Attributes)
-     */
-    public void startElement(String uri, String localName, String raw, Attributes attr)
-            throws SAXException {
-        boolean passed = true;
-
-        if (hasWorkflow() && localName.equals(ITEM_ELEMENT)) {
-            String event = attr.getValue(Workflow.NAMESPACE, EVENT_ATTRIBUTE);
-            if (getLogger().isDebugEnabled()) {
-                getLogger().debug("Event: [" + event + "]");
-            }
-
-            // filter item if command not allowed
-            if (event != null) {
-                passed = false;
-
-                AttributesImpl attributes = new AttributesImpl(attr);
-
-                int hrefIndex = attributes.getIndex("href");
-                if (hrefIndex > -1) {
-
-                    if (!this.executableEvents.contains(event)) {
-                        if (getLogger().isDebugEnabled()) {
-                            getLogger().debug("Removing href attribute");
-                        }
-                        attributes.removeAttribute(hrefIndex);
-                    } else {
-                        if (getLogger().isDebugEnabled()) {
-                            getLogger().debug("Adding event to href attribute");
-                        }
-                        String href = attributes.getValue("href");
-                        attributes.setValue(hrefIndex, href + "&lenya.event=" + event);
-                    }
-
-                }
-
-                super.startElement(uri, localName, raw, attributes);
-            }
-        }
-
-        if (passed) {
-            super.startElement(uri, localName, raw, attr);
-        }
-
-    }
-
-    /**
-     * @see org.apache.cocoon.sitemap.SitemapModelComponent#setup(org.apache.cocoon.environment.SourceResolver,
-     *      java.util.Map, java.lang.String, org.apache.avalon.framework.parameters.Parameters)
-     */
-    public void setup(SourceResolver _resolver, Map _objectModel, String src, Parameters _parameters)
-            throws ProcessingException, SAXException, IOException {
-
-        super.setup(_resolver, _objectModel, src, _parameters);
-
-        PageEnvelope envelope = null;
-        WorkflowManager workflowManager = null;
-
-        try {
-            DocumentIdentityMap map = new DocumentIdentityMap(this.manager, getLogger());
-            envelope = PageEnvelopeFactory.getInstance().getPageEnvelope(map, _objectModel);
-
-            Document document = envelope.getDocument();
-            if (document == null) {
-                setHasWorkflow(false);
-            } else {
-                DocumentType doctype = document.getResourceType();
-                if (document.getPublication().getWorkflowSchema(doctype) != null) {
-                    setHasWorkflow(true);
-                    workflowManager = (WorkflowManager) this.manager.lookup(WorkflowManager.ROLE);
-                } else {
-                    setHasWorkflow(false);
-                }
-            }
-
-            if (hasWorkflow()) {
-                DocumentWorkflowable workflowable = new DocumentWorkflowable(document, getLogger());
-                Workflow workflow = workflowManager.getWorkflowSchema(workflowable);
-                String[] events = workflow.getEvents();
-                for (int i = 0; i < events.length; i++) {
-                    if (workflowManager.canInvoke(workflowable, events[i])) {
-                        this.executableEvents.add(events[i]);
-                    }
-                }
-
-            }
-        } catch (final Exception e) {
-            throw new ProcessingException(e);
-        } finally {
-            if (workflowManager != null) {
-                this.manager.release(workflowManager);
-            }
-        }
-
-    }
-
-    private boolean hasWorkflow;
-
-    private Set executableEvents = new HashSet();
-
-    /**
-     * Returns if the current document has a workflow.
-     * @return A boolean value.
-     */
-    protected boolean hasWorkflow() {
-        return this.hasWorkflow;
-    }
-
-    /**
-     * Sets if the current document has a workflow.
-     * @param _hasWorkflow A boolean value.
-     */
-    public void setHasWorkflow(boolean _hasWorkflow) {
-        this.hasWorkflow = _hasWorkflow;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/editors/EditDocument.java b/src/java/org/apache/lenya/cms/editors/EditDocument.java
deleted file mode 100644
index 1e5ddc5..0000000
--- a/src/java/org/apache/lenya/cms/editors/EditDocument.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.editors;
-
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.lenya.cms.cocoon.source.SourceUtil;
-import org.apache.lenya.cms.usecase.DocumentUsecase;
-import org.apache.lenya.cms.usecase.UsecaseException;
-import org.apache.lenya.cms.workflow.WorkflowUtil;
-import org.apache.lenya.transaction.Transactionable;
-
-/**
- * Usecase to edit documents.
- * 
- * @version $Id$
- */
-public class EditDocument extends DocumentUsecase {
-
-    /**
-     * The URI to copy the document source from.
-     */
-    public static final String SOURCE_URI = "sourceUri";
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-        SourceResolver resolver = null;
-        try {
-            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-            SourceUtil.copy(resolver, getParameterAsString(SOURCE_URI), getSourceDocument()
-                    .getSourceURI());
-
-            WorkflowUtil.invoke(this.manager, getLogger(), getSourceDocument(), "edit");
-
-        } finally {
-            if (resolver != null) {
-                this.manager.release(resolver);
-            }
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#getObjectsToLock()
-     */
-    protected Transactionable[] getObjectsToLock() throws UsecaseException {
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("EditDocument::getObjectsToLock() called on source document [" + getSourceDocument().getId() + "]");
-        }
-
-        return getSourceDocument().getRepositoryNodes();
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/editors/InsertAsset.java b/src/java/org/apache/lenya/cms/editors/InsertAsset.java
deleted file mode 100644
index 17073a2..0000000
--- a/src/java/org/apache/lenya/cms/editors/InsertAsset.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.editors;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.lenya.cms.publication.Resource;
-import org.apache.lenya.cms.publication.ResourcesManager;
-import org.apache.lenya.cms.usecase.DocumentUsecase;
-import org.apache.lenya.cms.usecase.UsecaseException;
-import org.apache.lenya.cms.usecase.UsecaseInvoker;
-
-/**
- * Usecase to insert an image into a document.
- * 
- * @version $Id$
- */
-public class InsertAsset extends DocumentUsecase {
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#initParameters()
-     */
-    protected void initParameters() {
-        super.initParameters();
-        loadResources();
-    }
-
-    protected void loadResources() {
-        ResourcesManager resourcesManager = null;
-
-        try {
-            resourcesManager = (ResourcesManager) this.manager.lookup(ResourcesManager.ROLE);
-            Resource[] resources = resourcesManager.getResources(getSourceDocument());
-
-            List selectedResources = new ArrayList();
-            String mimeTypePrefix = getParameterAsString("mimeTypePrefix", "");
-            for (int i = 0; i < resources.length; i++) {
-                if (resources[i].getMimeType().startsWith(mimeTypePrefix)) {
-                    selectedResources.add(resources[i]);
-                }
-            }
-
-            setParameter("assets", selectedResources);
-        } catch (final Exception e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (resourcesManager != null) {
-                this.manager.release(resourcesManager);
-            }
-        }
-    }
-
-    /**
-     * Delegates to the main assets usecase; the name of
-     * the usecase being delegated to is set in the
-     * configuration parameter "asset-usecase".
-     *
-     * @see org.apache.lenya.cms.usecase.Usecase#advance()
-     */
-    public void advance() throws UsecaseException {
-        super.advance();
-        if (getParameter("file") != null) {
-            UsecaseInvoker invoker = null;
-            try {
-                invoker = (UsecaseInvoker) this.manager.lookup(UsecaseInvoker.ROLE);
-                String usecaseName = getParameterAsString("asset-usecase");
-
-                if (getLogger().isDebugEnabled())
-                    getLogger().debug("InsertAsset::advance() calling invoker with usecaseName [" + usecaseName + "]");
-                invoker.invoke(getSourceURL(), usecaseName, getParameters());
-                loadResources();
-            }
-            catch (Exception e) {
-                throw new UsecaseException(e);
-            } finally {
-                if (invoker != null) {
-                    this.manager.release(invoker);
-                }
-            }
-        }
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/editors/bxe/BXE.java b/src/java/org/apache/lenya/cms/editors/bxe/BXE.java
deleted file mode 100644
index 389ce64..0000000
--- a/src/java/org/apache/lenya/cms/editors/bxe/BXE.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.editors.bxe;
-
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.lenya.cms.cocoon.source.SourceUtil;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentIdToPathMapper;
-import org.apache.lenya.cms.usecase.DocumentUsecase;
-import org.apache.lenya.cms.usecase.UsecaseException;
-import org.apache.lenya.transaction.Transactionable;
-import org.apache.lenya.workflow.WorkflowManager;
-
-/**
- * BXE usecase handler.
- * 
- * @version $Id$
- */
-public class BXE extends DocumentUsecase {
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-        SourceResolver resolver = null;
-        WorkflowManager wfManager = null;
-
-        try {
-            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-
-            Document doc = getSourceDocument();
-            DocumentIdToPathMapper mapper = doc.getPublication().getPathMapper();
-            String path = mapper.getPath(doc.getId(), getSourceDocument().getLanguage());
-            String sourceUri = doc.getSourceURI();
-            String pubId = doc.getPublication().getId();
-            String tempSourceUri = "context://lenya/pubs/" + pubId + "/work/bxe/content/"
-                    + doc.getArea() + "/" + path + ".tmp";
-            tempSourceUri = tempSourceUri.substring("lenya://".length());
-            tempSourceUri = "context://" + tempSourceUri;
-
-            if (SourceUtil.exists(tempSourceUri, this.manager)) {
-                SourceUtil.copy(resolver, tempSourceUri, sourceUri, true);
-                SourceUtil.delete(tempSourceUri, this.manager);
-            }
-
-        } finally {
-            if (resolver != null) {
-                this.manager.release(resolver);
-            }
-            if (wfManager != null) {
-                this.manager.release(wfManager);
-            }
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#getObjectsToLock()
-     */
-    protected Transactionable[] getObjectsToLock() throws UsecaseException {
-        return getSourceDocument().getRepositoryNodes();
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/editors/forms/FormsEditor.java b/src/java/org/apache/lenya/cms/editors/forms/FormsEditor.java
deleted file mode 100644
index 4c33579..0000000
--- a/src/java/org/apache/lenya/cms/editors/forms/FormsEditor.java
+++ /dev/null
@@ -1,735 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.editors.forms;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.net.MalformedURLException;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.FactoryConfigurationError;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMResult;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-
-import org.apache.cocoon.ProcessingException;
-import org.apache.cocoon.components.source.SourceUtil;
-import org.apache.commons.lang.StringUtils;
-import org.apache.excalibur.source.ModifiableSource;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.lenya.cms.publication.DocumentType;
-import org.apache.lenya.cms.usecase.DocumentUsecase;
-import org.apache.lenya.cms.usecase.UsecaseException;
-import org.apache.lenya.transaction.Transactionable;
-import org.apache.lenya.xml.DocumentHelper;
-import org.apache.lenya.xml.RelaxNG;
-import org.apache.lenya.xml.XPath;
-import org.apache.xml.utils.PrefixResolver;
-import org.apache.xml.utils.PrefixResolverDefault;
-import org.apache.xpath.XPathAPI;
-import org.apache.xpath.objects.XObject;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xmldb.common.xml.queries.XPathQueryConfigurationException;
-import org.xmldb.common.xml.queries.XPathQueryFactory;
-import org.xmldb.common.xml.queries.XUpdateQuery;
-import org.xmldb.common.xml.queries.xalan2.XPathQueryFactoryImpl;
-import org.xmldb.xupdate.lexus.XUpdateQueryImpl;
-
-/**
- * Multiple forms editor usecase.
- * 
- * @version $Id$
- */
-public class FormsEditor extends DocumentUsecase {
-
-    private static final class XUpdateAttributes {
-        /**
-         * <code>xupdateAttrExpr</code> The Xupdate expression
-         */
-        public String xupdateAttrExpr = "";
-        /**
-         * <code>tagID</code> The tag ID
-         */
-        public String tagID = "";
-
-        /**
-         * Set Xupdate attributes
-         * @param _xupdateAttrExpr The xupdate expression
-         * @param _tagID The tag id
-         */
-        public XUpdateAttributes(String _xupdateAttrExpr, String _tagID) {
-            this.xupdateAttrExpr = _xupdateAttrExpr;
-            this.tagID = _tagID;
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#getObjectsToLock()
-     */
-    protected Transactionable[] getObjectsToLock() throws UsecaseException {
-        return getSourceDocument().getRepositoryNodes();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#advance()
-     */
-    public void advance() throws UsecaseException {
-        super.advance();
-
-        String unnumberTagsXslUri = "context://lenya/usecases/edit/forms/unnumberTags.xsl";
-        String numberTagsXslUri = "context://lenya/usecases/edit/forms/numberTags.xsl";
-
-        ModifiableSource xmlSource = null;
-        Source schemaSource = null;
-        Source unnumberTagsXslSource = null;
-        Source numberTagsXslSource = null;
-
-        SourceResolver resolver = null;
-        try {
-            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-
-            xmlSource = (ModifiableSource) resolver.resolveURI(getSourceDocument().getSourceURI());
-            
-            DocumentType resourceType = getSourceDocument().getResourceType();
-            String schemaUri = resourceType.getSchemaDefinitionSourceURI();
-            schemaSource = resolver.resolveURI(schemaUri);
-            
-            unnumberTagsXslSource = resolver.resolveURI(unnumberTagsXslUri);
-            numberTagsXslSource = resolver.resolveURI(numberTagsXslUri);
-
-            if (getParameterAsString("cancel") != null) {
-                getLogger().warn("Editing has been canceled");
-                //                modifiableXmlSource.delete();
-                return;
-            }
-
-            try {
-                save(resolver, xmlSource, schemaSource, unnumberTagsXslSource, numberTagsXslSource);
-            } finally {
-
-            }
-        } catch (final Exception e) {
-            throw new UsecaseException(e);
-        } finally {
-            if (resolver != null) {
-                if (xmlSource != null) {
-                    resolver.release(xmlSource);
-                }
-                if (schemaSource != null) {
-                    resolver.release(schemaSource);
-                }
-                if (unnumberTagsXslSource != null) {
-                    resolver.release(unnumberTagsXslSource);
-                }
-                if (numberTagsXslSource != null) {
-                    resolver.release(numberTagsXslSource);
-                }
-                this.manager.release(resolver);
-            }
-        }
-    }
-
-    /**
-     * Save the Form
-     * @param resolver
-     * @param xmlSource
-     * @param schemaSource
-     * @param unnumberTagsXslSource
-     * @param numberTagsXslSource
-     * @throws ProcessingException
-     * @throws FactoryConfigurationError
-     * @throws ParserConfigurationException
-     * @throws IOException
-     * @throws SAXException
-     * @throws XPathQueryConfigurationException
-     * @throws Exception
-     * @throws MalformedURLException
-     * @throws TransformerConfigurationException
-     * @throws TransformerException
-     */
-    private void save(SourceResolver resolver, ModifiableSource xmlSource, Source schemaSource,
-            Source unnumberTagsXslSource, Source numberTagsXslSource) throws ProcessingException,
-            FactoryConfigurationError, ParserConfigurationException, IOException, SAXException,
-            XPathQueryConfigurationException, Exception, MalformedURLException,
-            TransformerConfigurationException, TransformerException {
-        if (!xmlSource.exists()) {
-            throw new ProcessingException("The source [" + xmlSource.getURI() + "] does not exist.");
-        }
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Save modifications to [" + xmlSource.getURI() + "]");
-        }
-
-        DocumentBuilderFactory parserFactory = DocumentBuilderFactory.newInstance();
-        parserFactory.setValidating(false);
-        parserFactory.setNamespaceAware(true);
-        parserFactory.setIgnoringElementContentWhitespace(true);
-        DocumentBuilder builder = parserFactory.newDocumentBuilder();
-
-        InputSource xmlInputSource = SourceUtil.getInputSource(xmlSource);
-        Document document = builder.parse(xmlInputSource);
-        System
-                .setProperty(XPathQueryFactory.class.getName(), XPathQueryFactoryImpl.class
-                        .getName());
-
-        XUpdateQuery xUpdateQuery = new XUpdateQueryImpl();
-
-        String editSelect = processElements(document, xUpdateQuery);
-        setParameter("editSelect", editSelect);
-
-        // validate against relax ng after the updates
-        if (!schemaSource.exists()) {
-            throw new ProcessingException("Schema [" + schemaSource.getURI() + "] does not exist.");
-        }
-
-        Source validationSource = null;
-        Source unnumberTagsSource = null;
-
-        try {
-            String validationUri = xmlSource.getURI() + ".validate";
-            validationSource = resolver.resolveURI(validationUri);
-            checkModifiability(validationSource);
-
-            String unnumberTagsUri = xmlSource.getURI() + ".validate.unnumber";
-            unnumberTagsSource = resolver.resolveURI(unnumberTagsUri);
-            checkModifiability(unnumberTagsSource);
-
-            String message = validateDocument(document, schemaSource, unnumberTagsXslSource);
-
-            if (message != null) {
-                throw new UsecaseException("RELAX NG Validation failed: " + message);
-            }
-        } finally {
-            if (validationSource != null) {
-                resolver.release(validationSource);
-            }
-            if (unnumberTagsSource != null) {
-                resolver.release(unnumberTagsSource);
-            }
-        }
-
-        Document renumberedDocument = renumberDocument(document,
-                unnumberTagsXslSource,
-                numberTagsXslSource);
-        writeDocument(renumberedDocument, xmlSource);
-    }
-
-    /**
-     * Process elements
-     * @param document
-     * @param xq
-     * @return
-     * @throws Exception
-     */
-    private String processElements(Document document, XUpdateQuery xq) throws Exception {
-        String editSelect = null;
-        String[] paramNames = getParameterNames();
-        for (int paramIndex = 0; paramIndex < paramNames.length; paramIndex++) {
-            String pname = paramNames[paramIndex];
-            getLogger().debug("Parameter: " + pname + " = " + getParameterAsString(pname));
-
-            // Extract the xpath to edit
-            if (pname.indexOf("edit[") >= 0) {
-                if (pname.endsWith("].x")) {
-                    editSelect = pname.substring(5, pname.length() - 3);
-                    getLogger().debug("Edit: " + editSelect);
-                }
-                deleteParameter(pname);
-            }
-
-            // Make sure we are dealing with an xupdate statement,
-            // else skip
-            if (pname.startsWith("<xupdate:")) {
-                String select = pname.substring(pname.indexOf("select") + 8);
-                select = select.substring(0, select.indexOf("\""));
-                getLogger().debug("Select Node: " + select);
-
-                // Check if node exists
-                PrefixResolver resolver = new FormPrefixResolver(document.getDocumentElement());
-                XObject xObject = XPathAPI.eval(document.getDocumentElement(), select, resolver);
-                NodeList nodes = xObject.nodelist();
-                if (nodes.getLength() == 0) {
-                    getLogger()
-                            .debug(".act(): Node does not exist (might have been deleted during update): "
-                                    + select);
-                } else {
-                    String xupdateModifications = null;
-                    // now check for the different xupdate
-                    // statements, and handle appropriately
-                    if (pname.indexOf("xupdate:update-parent") > 0) {
-                        getLogger().debug("UPDATE PARENT Node: " + pname);
-                        // CDATA updates need to be handled
-                        // seperately
-                        if (pname.indexOf("<![CDATA[") > 0) {
-                            xupdateModifications = updateCDATA(pname, true);
-                        } else {
-                            xupdateModifications = update(pname, select, nodes.item(0), true);
-                        }
-                    } else if (pname.indexOf("xupdate:update") > 0) {
-                        getLogger().debug("UPDATE Node: " + pname);
-                        // CDATA updates need to be handled
-                        // seperately
-                        if (pname.indexOf("<![CDATA[") > 0) {
-                            xupdateModifications = updateCDATA(pname, false);
-                        } else {
-                            xupdateModifications = update(pname, select, nodes.item(0), false);
-                        }
-                    } else if (pname.indexOf("xupdate:append") > 0 && pname.endsWith(">.x")) {
-                        xupdateModifications = append(pname.substring(0, pname.length() - 2));
-                        // insert-before: in case of select/option
-                    } else if (pname.indexOf("xupdate:insert-before") > 0 && pname.endsWith("/>")) {
-                        if (!getParameterAsString(pname).equals("null")) {
-                            xupdateModifications = insertBefore(getParameterAsString(pname));
-                        }
-                        // insert-before: in case of image
-                    } else if (pname.indexOf("xupdate:insert-before") > 0 && pname.endsWith(">.x")) {
-                        xupdateModifications = insertBefore(pname.substring(0, pname.length() - 2));
-                        // insert-after: in case of select/option
-                    } else if (pname.indexOf("xupdate:insert-after") > 0 && pname.endsWith("/>")) {
-                        if (!getParameterAsString(pname).equals("null")) {
-                            xupdateModifications = insertAfter(getParameterAsString(pname));
-                        }
-                        // insert-after: in case of image
-                    } else if (pname.indexOf("xupdate:insert-after") > 0 && pname.endsWith(">.x")) {
-                        xupdateModifications = insertAfter(pname.substring(0, pname.length() - 2));
-                    } else if (pname.indexOf("xupdate:remove") > 0 && pname.endsWith("/>.x")) {
-                        xupdateModifications = remove(pname.substring(0, pname.length() - 2));
-                    } else if (pname.endsWith(">.y")) {
-                        getLogger().debug("Don't handle this: " + pname);
-                    } else {
-                        getLogger().debug("Don't handle this either: " + pname);
-                    }
-
-                    // Get hidden namespaces
-                    String namespaces = getParameterAsString("namespaces");
-
-                    // Add XML declaration
-                    // NOTE: select/option is generating parameter
-                    // which should be considered as null
-                    if (xupdateModifications != null) {
-                        xupdateModifications = "<?xml version=\"1.0\"?>"
-                                + addHiddenNamespaces(namespaces, xupdateModifications);
-                    }
-
-                    // now run the assembled xupdate query
-                    if (xupdateModifications != null) {
-                        getLogger().info("Execute XUpdate Modifications: " + xupdateModifications);
-                        xq.setQString(xupdateModifications);
-                        xq.execute(document);
-                    } else {
-                        getLogger().debug("Parameter did not match any xupdate command: " + pname);
-                    }
-                }
-                deleteParameter(pname);
-            }
-        }
-        return editSelect;
-    }
-
-    /**
-     * Writes a document to a modifiable source.
-     * @param document The document.
-     * @param source The source.
-     * @throws IOException if an error occurs.
-     * @throws TransformerConfigurationException if an error occurs.
-     * @throws TransformerException if an error occurs.
-     * @throws ProcessingException if an error occurs.
-     */
-    protected void writeDocument(Document document, ModifiableSource source) throws IOException,
-            TransformerConfigurationException, TransformerException, ProcessingException {
-        OutputStream oStream = source.getOutputStream();
-        Writer writer = new OutputStreamWriter(oStream);
-        DocumentHelper.writeDocument(document, writer);
-        if (oStream != null) {
-            oStream.flush();
-            try {
-                oStream.close();
-            } catch (Throwable t) {
-                if (getLogger().isDebugEnabled()) {
-                    getLogger().debug("Exception closing output stream: ", t);
-                }
-                throw new ProcessingException("Could not write document: ", t);
-            }
-        }
-        if (!source.exists()) {
-            throw new ProcessingException("Could not write source [" + source.getURI() + "]");
-        }
-    }
-
-    /**
-     * Checks if a source is modifiable.
-     * @param source The source.
-     * @throws ProcessingException if the source is not modifiable.
-     */
-    protected void checkModifiability(Source source) throws ProcessingException {
-        if (!(source instanceof ModifiableSource)) {
-            throw new ProcessingException("Cannot write to source [" + source.getURI() + "]");
-        }
-    }
-
-    /**
-     * Get attributes from original node
-     * @param node Original node
-     * @return An XupdateAttributes class holding the attributes
-     */
-    private XUpdateAttributes getAttributes(Node node) {
-
-        StringBuffer buf = new StringBuffer();
-        String xupdateString = "";
-        String tagID = "";
-        org.w3c.dom.NamedNodeMap attributes = node.getAttributes();
-        if (attributes != null) {
-            for (int i = 0; i < attributes.getLength(); i++) {
-                org.w3c.dom.Attr attribute = (org.w3c.dom.Attr) attributes.item(i);
-                getLogger().debug(".getAttributes(): " + attribute.getName() + " "
-                        + attribute.getValue());
-                if (!attribute.getName().equals("tagID")) {
-                    String namespace = attribute.getNamespaceURI();
-                    getLogger().debug(".getAttributes(): Namespace: " + namespace);
-                    String namespaceAttribute = "";
-                    if (namespace != null) {
-                        namespaceAttribute = " namespace=\"" + namespace + "\"";
-                    }
-                    buf.append("<xupdate:attribute name=\"" + attribute.getName() + "\""
-                            + namespaceAttribute + ">" + attribute.getValue()
-                            + "</xupdate:attribute>");
-                } else {
-                    buf.append("<xupdate:attribute name=\"tagID\">temp</xupdate:attribute>");
-                    tagID = attribute.getValue();
-                }
-            }
-            xupdateString = buf.toString();
-        } else {
-            xupdateString = "";
-        }
-        getLogger().debug("Attributes: " + xupdateString);
-
-        return new XUpdateAttributes(xupdateString, tagID);
-    }
-
-    /**
-     * Get attributes from actual update
-     * @param update The actual update
-     * @param tagID The tag id to get the updates for
-     * @return An XupdateAttributes class holding the attributes
-     */
-    private XUpdateAttributes getAttributes(String update, String tagID) {
-        getLogger().debug(update);
-
-        String xupdateString = "<xupdate:attribute name=\"tagID\">temp</xupdate:attribute>";
-
-        String[] attributes = update.substring(0, update.indexOf(">")).split(" ");
-        for (int i = 1; i < attributes.length; i++) {
-            // TODO: beware of white spaces
-            int index = attributes[i].indexOf("=");
-            if (index > 0) {
-                String name = attributes[i].substring(0, index);
-                String value = attributes[i].substring(index + 2, attributes[i].length() - 1);
-                if (name.indexOf("xmlns") < 0) {
-                    xupdateString = xupdateString + "<xupdate:attribute name=\"" + name + "\">"
-                            + value + "</xupdate:attribute>";
-                }
-            }
-        }
-
-        getLogger().debug("Attributes: " + xupdateString);
-
-        return new XUpdateAttributes(xupdateString, tagID);
-    }
-
-    /**
-     * xupdate:update
-     * @param pname Name of the parent element
-     * @param select The attribute to update
-     * @param nodeToUpdate The node to update
-     * @param parent If true then parent element is part of update and attributes need to be updated
-     *            resp. added or deleted
-     * @return the Xupdate statement
-     */
-    private String update(String pname, String select, Node nodeToUpdate, boolean parent) {
-        getLogger().debug("Update node: " + select);
-
-        // deal with attribute values here..
-        if (nodeToUpdate.getNodeType() == Node.ATTRIBUTE_NODE) {
-            getLogger().debug("Update attribute: " + select);
-
-            String xupdateUpdate = pname + getParameterAsString(pname) + "</xupdate:update>";
-            return "<xupdate:modifications xmlns:xupdate=\"http://www.xmldb.org/xupdate\">"
-                    + xupdateUpdate + "</xupdate:modifications>";
-            /*
-             * And deal with mixed content here.. NOTE: Lexus has trouble with mixed content. As
-             * Workaround we insert-after the new node, remove the original node and replace the
-             * temporary tagID by the original tagID.
-             */
-        }
-
-        getLogger().debug("Update element: " + select);
-
-        String namespace = nodeToUpdate.getNamespaceURI();
-        String namespaceAttribute = "";
-        if (namespace != null) {
-            namespaceAttribute = " namespace=\"" + namespace + "\"";
-        }
-        // NOTE: getAttributes adds the attribute tagID with value "temp",
-        // which will be replaced further down
-        XUpdateAttributes xa = getAttributes(nodeToUpdate);
-        String xupdateInsertAfter = null;
-        if (parent) {
-            xa = getAttributes(getParameterAsString(pname), xa.tagID);
-            xupdateInsertAfter = "<xupdate:insert-after select=\"" + select
-                    + " \"><xupdate:element name=\"" + new XPath(select).getNameWithoutPredicates()
-                    + "\"" + namespaceAttribute + ">" + xa.xupdateAttrExpr
-                    + removeParent(getParameterAsString(pname))
-                    + "</xupdate:element></xupdate:insert-after>";
-        } else {
-            xupdateInsertAfter = "<xupdate:insert-after select=\"" + select
-                    + " \"><xupdate:element name=\"" + new XPath(select).getNameWithoutPredicates()
-                    + "\"" + namespaceAttribute + ">" + xa.xupdateAttrExpr
-                    + getParameterAsString(pname) + "</xupdate:element></xupdate:insert-after>";
-        }
-        getLogger().debug(".update(): Update Node (insert-after): " + xupdateInsertAfter);
-
-        String xupdateRemove = "<xupdate:remove select=\"" + select + " \"/>";
-        getLogger().debug(".update(): Update Node (remove): " + xupdateRemove);
-
-        String xupdateUpdateAttribute = "<xupdate:update select=\""
-                + new XPath(select).removePredicates(select) + "[@tagID='temp']/@tagID" + " \">"
-                + xa.tagID + "</xupdate:update>";
-        getLogger().debug(".update(): Update Node (update tagID attribute): "
-                + xupdateUpdateAttribute);
-
-        return "<xupdate:modifications xmlns:xupdate=\"http://www.xmldb.org/xupdate\">"
-                + xupdateInsertAfter + xupdateRemove + xupdateUpdateAttribute
-                + "</xupdate:modifications>";
-    }
-
-    /**
-     * xupdate:update CDATA
-     * @param pname The name of the parent element
-     * @param parent if true then attributes of parent will also be updated
-     * @return The Xupdate expression
-     */
-    private String updateCDATA(String pname, boolean parent) {
-        String xupdateUpdate = pname + getParameterAsString(pname) + "]]></xupdate:update>";
-        return "<xupdate:modifications xmlns:xupdate=\"http://www.xmldb.org/xupdate\">"
-                + xupdateUpdate + "</xupdate:modifications>";
-    }
-
-    /**
-     * xupdate:append
-     * @param pname The node to append to
-     * @return The Xupdate statement
-     */
-    private String append(String pname) {
-        getLogger().debug(".append() APPEND Node: " + pname);
-        return "<xupdate:modifications xmlns:xupdate=\"http://www.xmldb.org/xupdate\">" + pname
-                + "</xupdate:modifications>";
-    }
-
-    /**
-     * xupdate:insert-before
-     * @param pname The node to insert before
-     * @return The Xupdate statement
-     */
-    private String insertBefore(String pname) {
-        getLogger().debug(".insertBefore() INSERT-BEFORE Node: " + pname);
-        return "<xupdate:modifications xmlns:xupdate=\"http://www.xmldb.org/xupdate\">" + pname
-                + "</xupdate:modifications>";
-    }
-
-    /**
-     * xupdate:insert-after
-     * @param pname The node to insert after
-     * @return The Xupdate statement
-     */
-    private String insertAfter(String pname) {
-        getLogger().debug(".insertAfter() INSERT-AFTER Node: " + pname);
-        return "<xupdate:modifications xmlns:xupdate=\"http://www.xmldb.org/xupdate\">" + pname
-                + "</xupdate:modifications>";
-    }
-
-    /**
-     * xupdate:remove
-     * @param pname The node to remove
-     * @return The Xupdate statement
-     */
-    private String remove(String pname) {
-        getLogger().debug(".remove() REMOVE Node: " + pname);
-        return "<xupdate:modifications xmlns:xupdate=\"http://www.xmldb.org/xupdate\">" + pname
-                + "</xupdate:modifications>";
-    }
-
-    /**
-     * Validates a document.
-     * @param document The document.
-     * @param schema The schema source.
-     * @param unnumberTagsXsl The source of the unnumber XSL stylesheet.
-     * @return A string. FIXME: return codes?
-     * @throws UsecaseException if an error occurs.
-     */
-    private String validateDocument(Document document, Source schema, Source unnumberTagsXsl)
-            throws UsecaseException {
-
-        try {
-            javax.xml.transform.Source xmlSource = new DOMSource(document);
-            javax.xml.transform.Source unnumberTagsXslSource = new StreamSource(unnumberTagsXsl
-                    .getInputStream());
-
-            ByteArrayOutputStream out = new ByteArrayOutputStream();
-            StreamResult unnumberXmlResult = new StreamResult(out);
-
-            TransformerFactory factory = TransformerFactory.newInstance();
-            Transformer transformer = factory.newTransformer(unnumberTagsXslSource);
-            transformer.transform(xmlSource, unnumberXmlResult);
-
-            ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
-            InputSource unnumberXmlInputSource = new InputSource(in);
-            InputSource schemaInputSource = SourceUtil.getInputSource(schema);
-
-            return RelaxNG.validate(schemaInputSource, unnumberXmlInputSource);
-
-        } catch (Exception e) {
-            throw new UsecaseException(e);
-        }
-    }
-
-    /**
-     * Renumber the tags within a document. Each tag gets a unique number used in Xupdate
-     * expressions.
-     * @param doc The document to renumber
-     * @param unnumberTagsXSL The XSL stylesheet to remove the tagID attribute
-     * @param numberTagsXSL The XSL stylesheet to add the tagID attribute
-     * @return The renumbered document
-     * @throws UsecaseException
-     */
-    private Document renumberDocument(Document doc, Source unnumberTagsXSL, Source numberTagsXSL)
-            throws UsecaseException {
-
-        try {
-            DocumentBuilderFactory parserFactory = DocumentBuilderFactory.newInstance();
-            parserFactory.setValidating(false);
-            parserFactory.setNamespaceAware(true);
-            parserFactory.setIgnoringElementContentWhitespace(true);
-            DocumentBuilder builder = parserFactory.newDocumentBuilder();
-
-            TransformerFactory tf = TransformerFactory.newInstance();
-
-            // Remove tagIDs
-            Transformer ut = tf.newTransformer(new StreamSource(unnumberTagsXSL.getInputStream()));
-            Document unnumberedDocument = builder.newDocument();
-            ut.transform(new DOMSource(doc), new DOMResult(unnumberedDocument));
-
-            // Add tagIDs
-            Transformer nt = tf.newTransformer(new StreamSource(numberTagsXSL.getInputStream()));
-            Document renumberedDocument = builder.newDocument();
-            nt.transform(new DOMSource(unnumberedDocument), new DOMResult(renumberedDocument));
-
-            return renumberedDocument;
-        } catch (final Exception e) {
-            throw new UsecaseException(e);
-        }
-    }
-
-    /**
-     * Remove parent element
-     * @param xmlSnippet The XML snippet to remove the parent from
-     * @return The XML snippet with the parent removed
-     */
-    private String removeParent(String xmlSnippet) {
-        String xmlSnippetWithoutParent = xmlSnippet;
-        xmlSnippetWithoutParent = xmlSnippetWithoutParent.substring(xmlSnippetWithoutParent
-                .indexOf(">") + 1);
-        xmlSnippetWithoutParent = StringUtils.reverse(xmlSnippetWithoutParent);
-        xmlSnippetWithoutParent = xmlSnippetWithoutParent.substring(xmlSnippetWithoutParent
-                .indexOf("<") + 1);
-        xmlSnippetWithoutParent = StringUtils.reverse(xmlSnippetWithoutParent);
-        return xmlSnippetWithoutParent;
-    }
-
-    /**
-     * Add namespaces to xupdate statement
-     * @param namespaces The namespaces to add
-     * @param xupdateModifications The Xupdate statement to add namespaces to
-     * @return The Xupdate statement with the added namespaces
-     */
-    private String addHiddenNamespaces(String namespaces, String xupdateModifications) {
-        getLogger().debug("Namespaces: " + namespaces);
-
-        if (namespaces == null) {
-            getLogger().debug("No additional namespaces");
-            return xupdateModifications;
-        }
-
-        String[] namespace = namespaces.split(" ");
-        String ns = "";
-        for (int i = 0; i < namespace.length; i++) {
-            if ((ns.indexOf(namespace[i]) < 0) && (xupdateModifications.indexOf(namespace[i]) < 0)) {
-                ns = ns + " " + namespace[i];
-            } else {
-                getLogger().debug("Redundant namespace: " + namespace[i]);
-            }
-        }
-
-        int endOfFirstNode = xupdateModifications.indexOf(">");
-        return xupdateModifications.substring(0, endOfFirstNode) + " " + ns
-                + xupdateModifications.substring(endOfFirstNode);
-    }
-
-    /**
-     * Prefix resolver which uses the usecase parameters like
-     * "namespace.xhtml=http://www.w3.org/1999/xhtml" to resolve prefixes.
-     */
-    public class FormPrefixResolver extends PrefixResolverDefault {
-
-        /**
-         * Ctor.
-         * @param context The context node.
-         */
-        public FormPrefixResolver(Node context) {
-            super(context);
-        }
-
-        /**
-         * @see org.apache.xml.utils.PrefixResolver#getNamespaceForPrefix(java.lang.String,
-         *      org.w3c.dom.Node)
-         */
-        public String getNamespaceForPrefix(String prefix, Node context) {
-            String uri = super.getNamespaceForPrefix(prefix, context);
-            if (uri == null) {
-                uri = FormsEditor.this.getParameterAsString("namespace." + prefix);
-            }
-            return uri;
-        }
-
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/editors/forms/OneFormEditor.java b/src/java/org/apache/lenya/cms/editors/forms/OneFormEditor.java
deleted file mode 100644
index 9dd7138..0000000
--- a/src/java/org/apache/lenya/cms/editors/forms/OneFormEditor.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.editors.forms;
-
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.io.UnsupportedEncodingException;
-import java.io.Writer;
-
-import org.apache.cocoon.components.ContextHelper;
-import org.apache.cocoon.components.source.SourceUtil;
-import org.apache.cocoon.environment.Request;
-import org.apache.excalibur.source.ModifiableSource;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.lenya.cms.publication.DocumentType;
-import org.apache.lenya.cms.usecase.DocumentUsecase;
-import org.apache.lenya.cms.usecase.UsecaseException;
-import org.apache.lenya.transaction.Transactionable;
-import org.apache.lenya.xml.DocumentHelper;
-import org.apache.lenya.xml.RelaxNG;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-/**
- * One form editor.
- * 
- * @version $Id$
- */
-public class OneFormEditor extends DocumentUsecase {
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#getObjectsToLock()
-     */
-    protected Transactionable[] getObjectsToLock() throws UsecaseException {
-        return getSourceDocument().getRepositoryNodes();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-
-        // Get namespaces
-        String namespaces = removeRedundantNamespaces(getParameterAsString("namespaces"));
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug(namespaces);
-        }
-
-        // Aggregate content
-
-        Request request = ContextHelper.getRequest(this.context);
-        String encoding = request.getCharacterEncoding();
-        String content = "<?xml version=\"1.0\" encoding=\"" + encoding + "\"?>\n"
-                + addNamespaces(namespaces, getParameterAsString("content"));
-
-        // Save file temporarily
-
-        DocumentType resourceType = getSourceDocument().getResourceType();
-        String schemaUri = resourceType.getSchemaDefinitionSourceURI();
-        Source schemaSource = null;
-        ModifiableSource xmlSource = null;
-        SourceResolver resolver = null;
-        try {
-            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-            xmlSource = (ModifiableSource) resolver.resolveURI(getSourceDocument().getSourceURI());
-            saveXMLFile(encoding, content, xmlSource);
-
-            boolean wellFormed = false;
-            try {
-                DocumentHelper.readDocument(xmlSource.getInputStream());
-                wellFormed = true;
-            } catch (SAXException e) {
-                addErrorMessage("error-document-form", new String[]{e.getMessage()});
-            }
-
-            if (wellFormed) {
-                schemaSource = resolver.resolveURI(schemaUri);
-                if (!schemaSource.exists()) {
-                    throw new IllegalArgumentException("The schema [" + schemaSource.getURI()
-                            + "] does not exist.");
-                }
-
-                InputSource schemaInputSource = SourceUtil.getInputSource(schemaSource);
-                InputSource xmlInputSource = SourceUtil.getInputSource(xmlSource);
-
-                String message = RelaxNG.validate(schemaInputSource, xmlInputSource);
-                if (message != null) {
-                    addErrorMessage("error-validation", new String[]{message});
-                }
-            }
-
-        } finally {
-            if (resolver != null) {
-                if (schemaSource != null) {
-                    resolver.release(schemaSource);
-                }
-                if (xmlSource != null) {
-                    resolver.release(xmlSource);
-                }
-                this.manager.release(resolver);
-            }
-        }
-    }
-
-    /**
-     * Save the XML file
-     * @param encoding The encoding
-     * @param content The content
-     * @param xmlSource The source
-     * @throws FileNotFoundException if the file was not found
-     * @throws UnsupportedEncodingException if the encoding is not supported
-     * @throws IOException if an IO error occurs
-     */
-    private void saveXMLFile(String encoding, String content, ModifiableSource xmlSource)
-            throws FileNotFoundException, UnsupportedEncodingException, IOException {
-        FileOutputStream fileoutstream = null;
-        Writer writer = null;
-
-        try {
-            writer = new OutputStreamWriter(xmlSource.getOutputStream(), encoding);
-            writer.write(content, 0, content.length());
-        } catch (FileNotFoundException e) {
-            getLogger().error("File not found " + e.toString());
-        } catch (UnsupportedEncodingException e) {
-            getLogger().error("Encoding not supported " + e.toString());
-        } catch (IOException e) {
-            getLogger().error("IO error " + e.toString());
-        } finally {
-            // close all streams
-            if (writer != null)
-                writer.close();
-            if (fileoutstream != null)
-                fileoutstream.close();
-        }
-    }
-
-    /**
-     * Remove redundant namespaces
-     * @param namespaces The namespaces to remove
-     * @return The namespace string without the removed namespaces
-     */
-    private String removeRedundantNamespaces(String namespaces) {
-        String[] namespace = namespaces.split(" ");
-
-        String ns = "";
-        for (int i = 0; i < namespace.length; i++) {
-            if (ns.indexOf(namespace[i]) < 0) {
-                ns = ns + " " + namespace[i];
-            } else {
-                if (getLogger().isDebugEnabled()) {
-                    getLogger().debug("Redundant namespace: " + namespace[i]);
-                }
-            }
-        }
-        return ns;
-    }
-
-    /**
-     * Add namespaces
-     * @param namespaces The namespaces to add
-     * @param content The content to add them to
-     * @return The content with the added namespaces
-     */
-    private String addNamespaces(String namespaces, String content) {
-        int i = content.indexOf(">");
-        return content.substring(0, i) + " " + namespaces + content.substring(i);
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/editors/kupu/Kupu.java b/src/java/org/apache/lenya/cms/editors/kupu/Kupu.java
deleted file mode 100644
index 49f3bad..0000000
--- a/src/java/org/apache/lenya/cms/editors/kupu/Kupu.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.editors.kupu;
-
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.lenya.cms.cocoon.source.SourceUtil;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentIdToPathMapper;
-import org.apache.lenya.cms.usecase.DocumentUsecase;
-import org.apache.lenya.cms.usecase.UsecaseException;
-import org.apache.lenya.transaction.Transactionable;
-import org.apache.lenya.workflow.WorkflowManager;
-
-/**
- * Kupu usecase handler.
- * 
- * @version $Id$
- */
-public class Kupu extends DocumentUsecase {
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-        SourceResolver resolver = null;
-        WorkflowManager wfManager = null;
-
-        try {
-            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-
-            Document doc = getSourceDocument();
-            DocumentIdToPathMapper mapper = doc.getPublication().getPathMapper();
-            String path = mapper.getPath(doc.getId(), getSourceDocument().getLanguage());
-            String sourceUri = doc.getSourceURI();
-            String pubId = doc.getPublication().getId();
-            String tempSourceUri = "context://lenya/pubs/" + pubId + "/work/bxe/content/"
-                    + doc.getArea() + "/" + path + ".tmp";
-            tempSourceUri = tempSourceUri.substring("lenya://".length());
-            tempSourceUri = "context://" + tempSourceUri;
-
-            if (SourceUtil.exists(tempSourceUri, this.manager)) {
-                SourceUtil.copy(resolver, tempSourceUri, sourceUri, true);
-                SourceUtil.delete(tempSourceUri, this.manager);
-            }
-
-        } finally {
-            if (resolver != null) {
-                this.manager.release(resolver);
-            }
-            if (wfManager != null) {
-                this.manager.release(wfManager);
-            }
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#getObjectsToLock()
-     */
-    protected Transactionable[] getObjectsToLock() throws UsecaseException {
-        return getSourceDocument().getRepositoryNodes();
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/metadata/CustomMetaData.java b/src/java/org/apache/lenya/cms/metadata/CustomMetaData.java
deleted file mode 100644
index fe98ae3..0000000
--- a/src/java/org/apache/lenya/cms/metadata/CustomMetaData.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.metadata;
-
-
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.lenya.cms.publication.DocumentException;
-
-/**
- * Custom meta-data is arbitrary meta-data that can be associated
- * to a document or a resource.
- *
- * The following code illustrates how you would add custom 
- * metadata to a document:
- * <pre> 
- *    MetaData customMetaData = document.getMetaDataManager().getCustomMetaData();
- *    customMetaData.setValue("some-great-attribute", "some great value");
- *    customMetaData.setValue("another-great-attribute", "some fantastic value");
- *    customMetaData.save();
- * </pre>
- * @version $Id$
- */
-public class CustomMetaData extends MetaDataImpl {
-
-    private static final String LOCAL_META = "custom";
-
-    private static final String NAMESPACE = "http://apache.org/cocoon/lenya/page-envelope/1.0";
-    private static final String PREFIX = "lenya";
-
-    /**
-     * @see MetaDataImpl#MetaDataImpl(java.lang.String, org.apache.avalon.framework.service.ServiceManager, org.apache.avalon.framework.logger.Logger)
-     */
-    public CustomMetaData(String sourceUri, ServiceManager manager, Logger _logger) throws DocumentException {
-        super(sourceUri, manager, _logger);
-    }
-
-    /**
-     * @see MetaDataImpl#useFixedElements()
-     */
-    protected boolean useFixedElements() {
-        return false;
-    }
-
-    /**
-     * @see MetaDataImpl#getNamespaces()
-     */
-    protected String[] getNamespaces() {
-        return new String[] { NAMESPACE };
-    }
-
-    /**
-     * @see MetaDataImpl#getPrefixes()
-     */
-    protected String[] getPrefixes() {
-        return new String[] { PREFIX };
-    }
-
-    /**
-     * @see MetaDataImpl#getElements()
-     */
-    protected String[] getElements() {
-        return new String[0];
-    }
-
-    /**
-     * @see MetaDataImpl#getTerms()
-     */
-    protected String[] getTerms() {
-        return new String[0];
-    }
-
-    /**
-     * @see MetaDataImpl#getLocalElementName()
-     */
-    protected String getLocalElementName() {
-        return LOCAL_META;
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/metadata/LenyaMetaData.java b/src/java/org/apache/lenya/cms/metadata/LenyaMetaData.java
deleted file mode 100644
index 8242866..0000000
--- a/src/java/org/apache/lenya/cms/metadata/LenyaMetaData.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.metadata;
-
-
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.lenya.cms.publication.DocumentException;
-
-/**
- * Meta-data for Lenya's internal usage.
- * 
- * @version $Id$
- */
-public class LenyaMetaData extends MetaDataImpl {
-
-    private static final String LOCAL_META = "internal";
-
-    private static final String NAMESPACE = "http://apache.org/cocoon/lenya/page-envelope/1.0";
-    private static final String PREFIX = "lenya";
-
-    /**
-     * The name of the resource type attribute. 
-     * An XML resource has a resource type; this information can be 
-     * used e.g. for different rendering of different types.
-     */
-    public static final String ELEMENT_RESOURCE_TYPE = "resourceType";
-
-    /**
-     * The name of the content type attribute.
-     * Any content managed by Lenya has a type; this information can
-     * be used e.g. to provide an appropriate management interface.
-     */
-    public static final String ELEMENT_CONTENT_TYPE = "contentType";
-
-    /**
-     * A workflow version.
-     * @see org.apache.lenya.cms.workflow.DocumentWorkflowable
-     */
-    public static final String ELEMENT_WORKFLOW_VERSION = "workflowVersion";
-
-    static final String[] ELEMENTS = {
-       ELEMENT_RESOURCE_TYPE,
-       ELEMENT_CONTENT_TYPE,
-       ELEMENT_WORKFLOW_VERSION
-    };
-
-    /**
-     * @see MetaDataImpl#MetaDataImpl(java.lang.String, org.apache.avalon.framework.service.ServiceManager, org.apache.avalon.framework.logger.Logger)
-     */
-    public LenyaMetaData(String sourceUri, ServiceManager manager, Logger _logger) throws DocumentException {
-        super(sourceUri, manager, _logger);
-    }
-
-    /**
-     * @see MetaDataImpl#getNamespaces()
-     */
-    protected String[] getNamespaces() {
-        return new String[] { NAMESPACE };
-    }
-
-    /**
-     * @see MetaDataImpl#getPrefixes()
-     */
-    protected String[] getPrefixes() {
-        return new String[] { PREFIX };
-    }
-
-    /**
-     * @see MetaDataImpl#getElements()
-     */
-    protected String[] getElements() {
-        return ELEMENTS;
-    }
-
-    /**
-     * @see MetaDataImpl#getTerms()
-     */
-    protected String[] getTerms() {
-        return new String[0];
-    }
-
-    /**
-     * @see MetaDataImpl#getLocalElementName()
-     */
-    protected String getLocalElementName() {
-        return LOCAL_META;
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/metadata/MetaData.java b/src/java/org/apache/lenya/cms/metadata/MetaData.java
deleted file mode 100644
index e0b9461..0000000
--- a/src/java/org/apache/lenya/cms/metadata/MetaData.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.metadata;
-
-import org.apache.lenya.cms.publication.DocumentException;
-
-/**
- * Generic meta data interface.
- * 
- * @version $Id$
- */
-public interface MetaData {
-    
-    /**
-     * Save the meta data.
-     * 
-     * @throws DocumentException if the meta data could not be made persistent.
-     */
-    void save() throws DocumentException;
-
-    /**
-     * Returns the values for a certain key.
-     * @param key The key.
-     * @return An array of strings.
-     * @throws DocumentException when something went wrong.
-     */
-    String[] getValues(String key) throws DocumentException;
-
-    /**
-     * Returns the first value for a certain key.
-     * @param key The key.
-     * @return A string or <code>null</code> if no value is set for this key.
-     * @throws DocumentException if an error occurs.
-     */
-    String getFirstValue(String key) throws DocumentException;
-
-    /**
-     * Sets the value for a certain key. All existing values will be removed.
-     * @param key The key.
-     * @param value The value to set.
-     * @throws DocumentException when something went wrong.
-     */
-    void setValue(String key, String value) throws DocumentException;
-    
-    /**
-     * Addds a value for a certain key. The existing values will not be removed.
-     * @param key The key.
-     * @param value The value to add.
-     * @throws DocumentException when something went wrong.
-     */
-    void addValue(String key, String value) throws DocumentException;
-
-    /**
-     * Replace the contents of the current meta data by the contents of other.
-     * @param other The other meta data manager.
-     * @throws DocumentException if an error occurs.
-     */
-    void replaceBy(MetaData other) throws DocumentException;
-    
-    /**
-     * @return All keys that can be used.
-     */
-    String[] getPossibleKeys();
-
-    /**
-     * Checks if a key represents a valid metadata attribute.
-     * @param key The key.
-     * @return A boolean value.
-     */
-    boolean isValidAttribute(String key);
-
-}
diff --git a/src/java/org/apache/lenya/cms/metadata/MetaDataImpl.java b/src/java/org/apache/lenya/cms/metadata/MetaDataImpl.java
deleted file mode 100644
index fc5258d..0000000
--- a/src/java/org/apache/lenya/cms/metadata/MetaDataImpl.java
+++ /dev/null
@@ -1,499 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.metadata;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.apache.avalon.framework.container.ContainerUtil;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.excalibur.source.SourceNotFoundException;
-import org.apache.lenya.cms.cocoon.source.SourceUtil;
-import org.apache.lenya.cms.publication.DocumentException;
-import org.apache.lenya.cms.publication.PageEnvelope;
-import org.apache.lenya.xml.DocumentHelper;
-import org.apache.lenya.xml.NamespaceHelper;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
-
-/**
- * Generic meta-data implementation.
- * 
- * Meta-data is represented as XML. For compatibility with the Dublin Core meta-data requirements, a
- * set of meta-data may contain up to two namespaces, one for "elements" and one for "terms". A
- * metadata implementation requiring only one namespace can ignore the "terms".
- * 
- * @version $Id$
- */
-public abstract class MetaDataImpl extends AbstractLogEnabled implements MetaData {
-
-    private String sourceUri;
-    private ServiceManager manager;
-
-    private Map elements = new HashMap();
-    private Map terms = new HashMap();
-    private List elementList = Arrays.asList(getElements());
-    private List termList = Arrays.asList(getTerms());
-
-    private static final String META_ROOT = "meta";
-
-    /**
-     * Creates a new instance of metadata, reading any existing values from the source URI.
-     * 
-     * @param sourceUri The source URI.
-     * @param manager The service manager.
-     * @param _logger A logger
-     * @throws DocumentException if an error occurs
-     */
-    public MetaDataImpl(String sourceUri, ServiceManager manager, Logger _logger)
-            throws DocumentException {
-        ContainerUtil.enableLogging(this, _logger);
-        this.sourceUri = sourceUri;
-        this.manager = manager;
-        this.elementList = Arrays.asList(getElements());
-        this.termList = Arrays.asList(getTerms());
-        loadValues();
-    }
-
-    /**
-     * Determine under which element name this meta-data is specified.
-     * 
-     * @return the name of the element containing this meta-data
-     */
-    protected abstract String getLocalElementName();
-
-    /**
-     * The namespaces under which this meta-data is specified.
-     * 
-     * @return an array of strings, containing the names of the namespaces
-     */
-    protected abstract String[] getNamespaces();
-
-    /**
-     * The prefixes under which this meta-data is specified.
-     * 
-     * @return an array of strings, containing the names of the prefixes
-     */
-    protected abstract String[] getPrefixes();
-
-    /**
-     * Elements to be used in this meta-data. A meta-data implementation which does not have a fixed
-     * list of elements may return an empty array, and override useFixedElements()
-     * @see #useFixedElements()
-     * @return an array of string representing the elements
-     */
-    protected abstract String[] getElements();
-
-    /**
-     * Terms to be used in this meta-data. A meta-data implementation requiring only one namespace
-     * may ignore terms and return an empty array.
-     * 
-     * @return an array of string representing the terms
-     */
-    protected abstract String[] getTerms();
-
-    /**
-     * Determine if the meta-data should consist of a fixed list of known attributes, or whether
-     * arbitrary names can be used.
-     * 
-     * @return true if meta-data consists of fixed elements
-     */
-    protected boolean useFixedElements() {
-        return true;
-    }
-
-    /**
-     * Loads the meta values from the XML source.
-     * @throws DocumentException when something went wrong.
-     */
-    protected void loadValues() throws DocumentException {
-
-        try {
-            Document doc = getDocument();
-            if (doc != null) {
-
-                Element metaElement = getLocalMetaElement(doc);
-
-                String[] namespaces = getNamespaces();
-                String[] prefixes = getPrefixes();
-                String[][] arrays = { getElements(), getTerms() };
-                Map[] maps = { this.elements, this.terms };
-
-                for (int type = 0; type < namespaces.length; type++) {
-                    NamespaceHelper helper = new NamespaceHelper(namespaces[type], prefixes[type],
-                            doc);
-
-                    if (useFixedElements()) {
-                        String[] elementNames = arrays[type];
-                        for (int i = 0; i < elementNames.length; i++) {
-                            Element[] children = helper.getChildren(metaElement, elementNames[i]);
-                            loadElementValues(maps[type], elementNames[i], children);
-                        }
-                    } else {
-                        Element[] elements = helper.getChildren(metaElement);
-                        for (int i = 0; i < elements.length; i++) {
-                            loadElementValues(maps[type], elements[i].getTagName(), helper
-                                    .getChildren(metaElement, elements[i].getTagName()));
-                        }
-                    }
-                }
-            }
-        } catch (Exception e) {
-            throw new DocumentException(e);
-        }
-    }
-
-    /**
-     * Retrieve an element (and its values) from the DOM and add the element to the map
-     */
-    private void loadElementValues(Map map, String elementName, Element[] children) {
-        String[] values = new String[children.length];
-        for (int valueIndex = 0; valueIndex < children.length; valueIndex++) {
-            values[valueIndex] = DocumentHelper.getSimpleElementText(children[valueIndex]);
-        }
-        map.put(elementName, values);
-    }
-
-    /**
-     * Save the meta data.
-     * @throws DocumentException if the meta data could not be made persistent.
-     */
-    public void save() throws DocumentException {
-
-        if (getLogger().isDebugEnabled())
-            getLogger().debug("MetaDataImpl::save() called, sourceUri [" + sourceUri + "]");
-
-        try {
-            Document doc = getDocument();
-            Element metaElement = getLocalMetaElement(doc);
-            String[] namespaces = getNamespaces();
-            String[] prefixes = getPrefixes();
-            String[][] arrays = { getElements(), getTerms() };
-            Map[] maps = { this.elements, this.terms };
-
-            List childNodes = new ArrayList();
-            NodeList nodes = metaElement.getChildNodes();
-            for (int i = 0; i < nodes.getLength(); i++) {
-                if (nodes.item(i).getParentNode() == metaElement) {
-                    childNodes.add(nodes.item(i));
-                }
-            }
-            Node[] children = (Node[]) childNodes.toArray(new Node[childNodes.size()]);
-            for (int i = 0; i < children.length; i++) {
-                metaElement.removeChild(children[i]);
-            }
-
-            for (int type = 0; type < namespaces.length; type++) {
-                NamespaceHelper helper = new NamespaceHelper(namespaces[type], prefixes[type], doc);
-                if (useFixedElements()) {
-                    String[] elementNames = arrays[type];
-                    for (int i = 0; i < elementNames.length; i++) {
-                        writeElementValues(helper, metaElement, maps[type], elementNames[i]);
-                    }
-                } else {
-                    Iterator elementNames = maps[type].keySet().iterator();
-                    while (elementNames.hasNext()) {
-                        writeElementValues(helper, metaElement, maps[type], (String) elementNames
-                                .next());
-                    }
-                }
-            }
-
-            SourceUtil.writeDOM(doc, this.sourceUri, this.manager);
-        } catch (final Exception e) {
-            throw new DocumentException(e);
-        }
-    }
-
-    /**
-     * Add a new element (and its values) to an existing element in the DOM
-     */
-    private void writeElementValues(NamespaceHelper helper,
-            Element father,
-            Map elementMap,
-            String elementName) {
-        String[] values = (String[]) elementMap.get(elementName);
-        for (int valueIndex = 0; valueIndex < values.length; valueIndex++) {
-            Element valueElement = helper.createElement(elementName, values[valueIndex]);
-            father.appendChild(valueElement);
-        }
-    }
-
-    /**
-     * Create a DOM representation of this meta-data.
-     * @return A DOM document.
-     * @throws ServiceException if a general error occurs.
-     * @throws SourceNotFoundException if the meta-data's source can not be found
-     * @throws ParserConfigurationException if an error occurs during XML parsing.
-     * @throws SAXException if an error occurs during XML parsing.
-     * @throws IOException if an error occurs during source access..
-     */
-    protected Document getDocument() throws ServiceException, SourceNotFoundException,
-            ParserConfigurationException, SAXException, IOException {
-        org.w3c.dom.Document doc = SourceUtil.readDOM(this.sourceUri, this.manager);
-        NamespaceHelper namespaceHelper;
-        if (doc == null) {
-            namespaceHelper = new NamespaceHelper(PageEnvelope.NAMESPACE,
-                    PageEnvelope.DEFAULT_PREFIX, "document");
-        } else {
-            namespaceHelper = new NamespaceHelper(PageEnvelope.NAMESPACE,
-                    PageEnvelope.DEFAULT_PREFIX, doc);
-        }
-        return namespaceHelper.getDocument();
-    }
-
-    /**
-     * Returns the Lenya meta data element.
-     * @param document The XML document.
-     * @return A DOM element.
-     * @throws DocumentException if an error occurs.
-     */
-    protected Element getMetaElement(Document document) throws DocumentException {
-        Element metaElement;
-        try {
-            NamespaceHelper namespaceHelper = new NamespaceHelper(PageEnvelope.NAMESPACE,
-                    PageEnvelope.DEFAULT_PREFIX, document);
-            Element documentElement = namespaceHelper.getDocument().getDocumentElement();
-            metaElement = namespaceHelper.getFirstChild(documentElement, META_ROOT);
-
-            if (metaElement == null) {
-                metaElement = namespaceHelper.createElement(META_ROOT);
-                Element[] children = DocumentHelper.getChildren(documentElement);
-                if (children.length == 0) {
-                    documentElement.appendChild(metaElement);
-                } else {
-                    documentElement.insertBefore(metaElement, children[0]);
-                }
-            }
-        } catch (final Exception e) {
-            throw new DocumentException(e);
-        }
-        return metaElement;
-    }
-
-    /**
-     * Returns the meta data element for this type of meta-data
-     * @param document The XML document.
-     * @return A DOM element.
-     * @throws DocumentException if an error occurs.
-     */
-    protected Element getLocalMetaElement(Document document) throws DocumentException {
-        Element topMetaElement = getMetaElement(document);
-
-        Element metaElement;
-        try {
-            NamespaceHelper namespaceHelper = new NamespaceHelper(PageEnvelope.NAMESPACE,
-                    PageEnvelope.DEFAULT_PREFIX, document);
-            metaElement = namespaceHelper.getFirstChild(topMetaElement, getLocalElementName());
-
-            if (metaElement == null) {
-                metaElement = namespaceHelper.createElement(getLocalElementName());
-                Element[] children = DocumentHelper.getChildren(topMetaElement);
-                if (children.length == 0) {
-                    topMetaElement.appendChild(metaElement);
-                } else {
-                    topMetaElement.insertBefore(metaElement, children[0]);
-                }
-            }
-        } catch (final Exception e) {
-            throw new DocumentException(e);
-        }
-        return metaElement;
-    }
-
-    /**
-     * Returns the first value for a certain key.
-     * @param key The key.
-     * @return A string.
-     * @throws DocumentException if an error occurs.
-     */
-    public String getFirstValue(String key) throws DocumentException {
-        String value = null;
-        String[] values = getElementOrTerm(key);
-        if (values.length > 0) {
-            value = values[0];
-        }
-        return value;
-    }
-
-    /**
-     * Returns the element or term values, resp., for a certain key.
-     * @param key The key.
-     * @return An array of strings.
-     * @throws DocumentException if an error occurs.
-     */
-    protected String[] getElementOrTerm(String key) throws DocumentException {
-        String[] values;
-
-        if (elementList.contains(key)) {
-            values = (String[]) this.elements.get(key);
-        } else if (termList.contains(key)) {
-            values = (String[]) this.terms.get(key);
-        } else {
-            throw new DocumentException("The key [" + key
-                    + "] does not refer to a metadata element or term!");
-        }
-        if (values == null) {
-            values = new String[0];
-        }
-        return values;
-    }
-
-    /**
-     * Returns all values for a certain key.
-     * @param key The key.
-     * @return An array of strings.
-     * @throws DocumentException if an error occurs.
-     * @see MetaData#getValues(String)
-     */
-    public String[] getValues(String key) throws DocumentException {
-        return getElementOrTerm(key);
-    }
-
-    /**
-     * @param key The key.
-     * @param value The value.
-     * @throws DocumentException if an error occurs.
-     * @see org.apache.lenya.cms.metadata.MetaData#setValue(java.lang.String, java.lang.String)
-     */
-    public void setValue(String key, String value) throws DocumentException {
-        String[] newValues = { value };
-
-        if (useFixedElements()) {
-            if (elementList.contains(key)) {
-                this.elements.put(key, newValues);
-            } else if (termList.contains(key)) {
-                this.terms.put(key, newValues);
-            } else {
-                throw new DocumentException("The key [" + key
-                        + "] does not refer to a dublin core element or term!");
-            }
-        } else
-            this.elements.put(key, newValues);
-    }
-
-    /**
-     * @param other The other meta-data
-     * @throws DocumentException if an error occurs.
-     * @see org.apache.lenya.cms.metadata.MetaData#replaceBy(org.apache.lenya.cms.metadata.MetaData)
-     */
-    public void replaceBy(MetaData other) throws DocumentException {
-        if (useFixedElements()) {
-            String[] elements = getElements();
-            String[] terms = getTerms();
-            for (int i = 0; i < elements.length; i++) {
-                String key = elements[i];
-                removeAllValues(key);
-                addValues(key, other.getValues(key));
-            }
-            for (int i = 0; i < terms.length; i++) {
-                String key = terms[i];
-                removeAllValues(key);
-                addValues(key, other.getValues(key));
-            }
-        } else {
-            // elements not fixed: clear old elements and write all from other
-            elementList = new ArrayList();
-            termList = new ArrayList();
-            String[] newKeys = other.getPossibleKeys();
-            for (int i = 0; i < newKeys.length; i++) {
-                String key = newKeys[i];
-                addValues(key, other.getValues(key));
-            }
-        }
-        save();
-    }
-
-    /**
-     * @return All possible keys.
-     */
-    public String[] getPossibleKeys() {
-        List keys = new ArrayList();
-        keys.addAll(this.elementList);
-        keys.addAll(this.termList);
-        return (String[]) keys.toArray(new String[keys.size()]);
-    }
-
-    /**
-     * Checks if a key represents a valid metadata attribute.
-     * @param key The key.
-     * @return A boolean value.
-     */
-    public boolean isValidAttribute(String key) {
-        return termList.contains(key) || elementList.contains(key);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.metadata.MetaData#addValue(java.lang.String, java.lang.String)
-     */
-    public void addValue(String key, String value) throws DocumentException {
-        String[] existingValues = getElementOrTerm(key);
-        List list = new ArrayList(Arrays.asList(existingValues));
-        list.add(value);
-        String[] newValues = (String[]) list.toArray(new String[list.size()]);
-
-        if (elementList.contains(key)) {
-            this.elements.put(key, newValues);
-        } else if (termList.contains(key)) {
-            this.terms.put(key, newValues);
-        } else {
-            throw new DocumentException("The key [" + key
-                    + "] does not refer to a metadata element or term!");
-        }
-    }
-
-    /**
-     * @param key The key.
-     * @param values The values.
-     * @throws DocumentException if an error occurs.
-     */
-    private void addValues(String key, String[] values) throws DocumentException {
-        for (int i = 0; i < values.length; i++) {
-            addValue(key, values[i]);
-        }
-    }
-
-    /**
-     * @param key The key.
-     * @throws DocumentException if an error occurs.
-     * @see org.apache.lenya.cms.metadata.MetaData#removeAllValues(java.lang.String)
-     */
-    private void removeAllValues(String key) throws DocumentException {
-        if (elementList.contains(key)) {
-            this.elements.put(key, new String[0]);
-        } else if (termList.contains(key)) {
-            this.terms.put(key, new String[0]);
-        } else {
-            throw new DocumentException("The key [" + key
-                    + "] does not refer to a dublin core element or term!");
-        }
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/metadata/MetaDataManager.java b/src/java/org/apache/lenya/cms/metadata/MetaDataManager.java
deleted file mode 100644
index ae20229..0000000
--- a/src/java/org/apache/lenya/cms/metadata/MetaDataManager.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.metadata;
-
-import java.util.Iterator;
-import java.util.Map;
-import org.apache.avalon.framework.container.ContainerUtil;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.lenya.cms.metadata.dublincore.DublinCoreImpl;
-import org.apache.lenya.cms.publication.DocumentException;
-
-/**
- * Manager for meta data of a Lenya resource/document
- * 
- * @version $Id$
- */
-public class MetaDataManager extends AbstractLogEnabled {
-    
-    private String sourceUri;
-    private ServiceManager serviceManager;
-
-    private DublinCoreImpl dublinCoreMetaData;
-    private LenyaMetaData lenyaMetaData;
-    private CustomMetaData customMetaData;
-
-    /**
-     * Ctor.
-     */
-    public MetaDataManager(String _sourceUri, ServiceManager _serviceManager, Logger _logger) {
-        ContainerUtil.enableLogging(this, _logger);
-        this.sourceUri = _sourceUri;
-        this.serviceManager = _serviceManager;
-    }
-
-    /**
-     * Retrieve the dublin core meta-data managed by this instance.
-     * @return the dublin core meta-data
-     * @throws DocumentException if the meta-data could not be retrieved
-     */
-    public DublinCoreImpl getDublinCoreMetaData() throws DocumentException {
-        if (dublinCoreMetaData == null) {
-            dublinCoreMetaData = new DublinCoreImpl(this.sourceUri, this.serviceManager, getLogger());
-        }
-        return dublinCoreMetaData;
-    }
-
-    /**
-     * Set the dublin-core meta-data managed by this instance.
-     * @param dcMetaDataValues the dublin-core meta-data
-     * @throws DocumentException if the meta-data could not be written
-     */
-    public void setDublinCoreMetaData(Map dcMetaDataValues) throws DocumentException {
-        dublinCoreMetaData = new DublinCoreImpl(this.sourceUri, this.serviceManager, getLogger());
-        setMetaData(dublinCoreMetaData, dcMetaDataValues);
-    }
-
-    /**
-     * Retrieve the Lenya internal meta-data managed by this instance.
-     * @return the Lenya meta-data
-     * @throws DocumentException if the meta-data could not be retrieved
-     */
-    public LenyaMetaData getLenyaMetaData() throws DocumentException {
-        if (lenyaMetaData == null) {
-            lenyaMetaData = new LenyaMetaData(this.sourceUri, this.serviceManager, getLogger());
-        }
-        return lenyaMetaData;
-    }
-
-    /**
-     * Set the Lenya internal meta-data managed by this instance.
-     * @param lenyaMetaDataValues the Lenya meta-data
-     * @throws DocumentException if the meta-data could not be written
-     */
-    public void setLenyaMetaData(Map lenyaMetaDataValues) throws DocumentException {
-        lenyaMetaData = new LenyaMetaData(this.sourceUri, this.serviceManager, getLogger());
-        setMetaData(lenyaMetaData, lenyaMetaDataValues);
-    }
-
-    /**
-     * Retrieve the custom meta-data managed by this instance.
-     * @return the custom meta-data
-     * @throws DocumentException if the meta-data could not be retrieved
-     */
-    public CustomMetaData getCustomMetaData() throws DocumentException {
-        if (customMetaData == null) {
-            customMetaData = new CustomMetaData(this.sourceUri, this.serviceManager, getLogger());
-        }
-        return customMetaData;
-    }
-
-    /**
-     * Set the custom meta-data managed by this instance.
-     * @param customMetaDataValues the custom meta-data
-     * @throws DocumentException if the meta-data could not be written
-     */
-    public void setCustomMetaData(Map customMetaDataValues) throws DocumentException {
-        customMetaData = new CustomMetaData(this.sourceUri, this.serviceManager, getLogger());
-        setMetaData(customMetaData, customMetaDataValues);
-    }
-
-    /**
-     * Set values of meta-data managed by this instance.
-     * @throws DocumentException if meta-data could not be written
-     */
-    public void setMetaData(Map dcMetaData, Map lenyaMetaData, Map customMetaData) throws DocumentException {
-        if (dcMetaData != null)
-            setMetaData(getDublinCoreMetaData(), dcMetaData);
-        if (lenyaMetaData != null)
-            setMetaData(getLenyaMetaData(), lenyaMetaData);
-        if (customMetaData != null)
-            setMetaData(getCustomMetaData(), customMetaData);
-    }
-
-    private void setMetaData(MetaData _metaData, Map _metaDataMap) throws DocumentException {
-        Iterator iter = _metaDataMap.entrySet().iterator();
-        while (iter.hasNext()) {
-            Map.Entry entry = (Map.Entry) iter.next();
-            _metaData.setValue((String) entry.getKey(), (String) entry.getValue());
-        }
-        _metaData.save();
-    }
-
-    /**
-     * Replace the contents of the meta-data managed by this instance with
-     * the contents of the meta-data managed by another instance of
-     * MetaDataManager.
-     * @param sourceManager the MetaDataManager from which to read the new meta-data
-     * @throws DocumentException if something goes wrong
-     */
-    public void replaceMetaData(MetaDataManager sourceManager) throws DocumentException {
-        MetaData source = sourceManager.getDublinCoreMetaData();
-        MetaData dest = this.getDublinCoreMetaData();
-        dest.replaceBy(source);
-        source = sourceManager.getLenyaMetaData();
-        dest = this.getLenyaMetaData();
-        dest.replaceBy(source);
-        source = sourceManager.getCustomMetaData();
-        dest = this.getCustomMetaData();
-        dest.replaceBy(source);
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/metadata/MetaDataOwner.java b/src/java/org/apache/lenya/cms/metadata/MetaDataOwner.java
deleted file mode 100644
index bf36e79..0000000
--- a/src/java/org/apache/lenya/cms/metadata/MetaDataOwner.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.metadata;
-
-import org.apache.lenya.cms.publication.DocumentException;
-
-/**
- * Owner of meta-data.
- *
- * @version $Id$
- */
-public interface MetaDataOwner {
-
-    /**
-     * @return A manager for the meta data.
-     */
-    MetaDataManager getMetaDataManager() throws DocumentException;
-    
-}
diff --git a/src/java/org/apache/lenya/cms/metadata/dublincore/DublinCore.java b/src/java/org/apache/lenya/cms/metadata/dublincore/DublinCore.java
deleted file mode 100644
index 8f3884c..0000000
--- a/src/java/org/apache/lenya/cms/metadata/dublincore/DublinCore.java
+++ /dev/null
@@ -1,349 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.metadata.dublincore;
-
-import org.apache.lenya.cms.metadata.MetaData;
-
-/**
- * <p>
- * Dublin core metadata interface.
- * </p>
- * <p>
- * The descriptions are citing the <a href="http://www.dublincore.org">Dublin Core website </a>.
- * </p>
- * 
- * @version $Id$
- */
-public interface DublinCore extends MetaData {
-
-    /**
-     * A name given to the resource. Typically, Title will be a name by which the resource is
-     * formally known.
-     */
-    static final String ELEMENT_TITLE = "title";
-
-    /**
-     * An entity primarily responsible for making the content of the resource. Examples of Creator
-     * include a person, an organization, or a service. Typically, the name of a Creator should be
-     * used to indicate the entity.
-     */
-    static final String ELEMENT_CREATOR = "creator";
-
-    /**
-     * A topic of the content of the resource. Typically, Subject will be expressed as keywords, key
-     * phrases or classification codes that describe a topic of the resource. Recommended best
-     * practice is to select a value from a controlled vocabulary or formal classification scheme.
-     */
-    static final String ELEMENT_SUBJECT = "subject";
-
-    /**
-     * An account of the content of the resource. Examples of Description include, but is not
-     * limited to: an abstract, table of contents, reference to a graphical representation of
-     * content or a free-text account of the content.
-     */
-    static final String ELEMENT_DESCRIPTION = "description";
-
-    /**
-     * An entity responsible for making the resource available. Examples of Publisher include a
-     * person, an organization, or a service. Typically, the name of a Publisher should be used to
-     * indicate the entity.
-     */
-    static final String ELEMENT_PUBLISHER = "publisher";
-
-    /**
-     * An entity responsible for making contributions to the content of the resource. Examples of
-     * Contributor include a person, an organization, or a service. Typically, the name of a
-     * Contributor should be used to indicate the entity.
-     */
-    static final String ELEMENT_CONTRIBUTOR = "contributor";
-
-    /**
-     * A date of an event in the lifecycle of the resource. Typically, Date will be associated with
-     * the creation or availability of the resource. Recommended best practice for encoding the date
-     * value is defined in a profile of ISO 8601 [W3CDTF] and includes (among others) dates of the
-     * form YYYY-MM-DD.
-     */
-    static final String ELEMENT_DATE = "date";
-
-    /**
-     * The nature or genre of the content of the resource. Type includes terms describing general
-     * categories, functions, genres, or aggregation levels for content. Recommended best practice
-     * is to select a value from a controlled vocabulary (for example, the DCMI Type Vocabulary
-     * [DCT1]). To describe the physical or digital manifestation of the resource, use the FORMAT
-     * element.
-     */
-    static final String ELEMENT_TYPE = "type";
-
-    /**
-     * The physical or digital manifestation of the resource. Typically, Format may include the
-     * media-type or dimensions of the resource. Format may be used to identify the software,
-     * hardware, or other equipment needed to display or operate the resource. Examples of
-     * dimensions include size and duration. Recommended best practice is to select a value from a
-     * controlled vocabulary (for example, the list of Internet Media Types [MIME] defining computer
-     * media formats).
-     */
-    static final String ELEMENT_FORMAT = "format";
-
-    /**
-     * An unambiguous reference to the resource within a given context. Recommended best practice is
-     * to identify the resource by means of a string or number conforming to a formal identification
-     * system. Formal identification systems include but are not limited to the Uniform Resource
-     * Identifier (URI) (including the Uniform Resource Locator (URL)), the Digital Object
-     * Identifier (DOI) and the International Standard Book Number (ISBN).
-     */
-    static final String ELEMENT_IDENTIFIER = "identifier";
-
-    /**
-     * A Reference to a resource from which the present resource is derived. The present resource
-     * may be derived from the Source resource in whole or in part. Recommended best practice is to
-     * identify the referenced resource by means of a string or number conforming to a formal
-     * identification system.
-     */
-    static final String ELEMENT_SOURCE = "source";
-
-    /**
-     * A language of the intellectual content of the resource. Recommended best practice is to use
-     * RFC 3066 [RFC3066] which, in conjunction with ISO639 [ISO639]), defines two- and three-letter
-     * primary language tags with optional subtags. Examples include "en" or "eng" for English,
-     * "akk" for Akkadian", and "en-GB" for English used in the United Kingdom.
-     */
-    static final String ELEMENT_LANGUAGE = "language";
-
-    /**
-     * A reference to a related resource. Recommended best practice is to identify the referenced
-     * resource by means of a string or number conforming to a formal identification system.
-     */
-    static final String ELEMENT_RELATION = "relation";
-
-    /**
-     * The extent or scope of the content of the resource. Typically, Coverage will include spatial
-     * location (a place name or geographic coordinates), temporal period (a period label, date, or
-     * date range) or jurisdiction (such as a named administrative entity). Recommended best
-     * practice is to select a value from a controlled vocabulary (for example, the Thesaurus of
-     * Geographic Names [TGN]) and to use, where appropriate, named places or time periods in
-     * preference to numeric identifiers such as sets of coordinates or date ranges.
-     */
-    static final String ELEMENT_COVERAGE = "coverage";
-
-    /**
-     * Information about rights held in and over the resource. Typically, Rights will contain a
-     * rights management statement for the resource, or reference a service providing such
-     * information. Rights information often encompasses Intellectual Property Rights (IPR),
-     * Copyright, and various Property Rights. If the Rights element is absent, no assumptions may
-     * be made about any rights held in or over the resource.
-     */
-    static final String ELEMENT_RIGHTS = "rights";
-
-    /**
-     * A summary of the content of the resource.
-     */
-    static final String TERM_ABSTRACT = "abstract";
-
-    /**
-     * Information about who can access the resource or an indication of its security status. Access
-     * Rights may include information regarding access or restrictions based on privacy, security or
-     * other regulations.
-     */
-    static final String TERM_ACCESSRIGHTS = "accessRights";
-
-    /**
-     * Any form of the title used as a substitute or alternative to the formal title of the
-     * resource. This qualifier can include Title abbreviations as well as translations.
-     */
-    static final String TERM_ALTERNATIVE = "alternative";
-
-    /**
-     * A class of entity for whom the resource is intended or useful. A class of entity may be
-     * determined by the creator or the publisher or by a third party.
-     */
-    static final String TERM_AUDIENCE = "audience";
-
-    /**
-     * Date (often a range) that the resource will become or did become available.
-     */
-    static final String TERM_AVAILABLE = "available";
-
-    /**
-     * A bibliographic reference for the resource. Recommended practice is to include sufficient
-     * bibliographic detail to identify the resource as unambiguously as possible, whether or not
-     * the citation is in a standard form.
-     */
-    static final String TERM_BIBLIOGRAPHICCITATION = "bibliographicCitation";
-
-    /**
-     * A reference to an established standard to which the resource conforms.
-     */
-    static final String TERM_CONFORMSTO = "conformsTo";
-
-    /**
-     * Date of creation of the resource.
-     */
-    static final String TERM_CREATED = "created";
-
-    /**
-     * Date of acceptance of the resource (e.g. of thesis by university department, of article by
-     * journal, etc.).
-     */
-    static final String TERM_DATEACCEPTED = "dateAccepted";
-
-    /**
-     * Date of a statement of copyright.
-     */
-    static final String TERM_DATECOPYRIGHTED = "dateCopyrighted";
-
-    /**
-     * Date of submission of the resource (e.g. thesis, articles, etc.).
-     */
-    static final String TERM_DATESUBMITTED = "dateSubmitted";
-
-    /**
-     * A general statement describing the education or training context. Alternatively, a more
-     * specific statement of the location of the audience in terms of its progression through an
-     * education or training context.
-     */
-    static final String TERM_EDUCATIONLEVEL = "educationLevel";
-
-    /**
-     * The size or duration of the resource.
-     */
-    static final String TERM_EXTENT = "extent";
-
-    /**
-     * The described resource pre-existed the referenced resource, which is essentially the same
-     * intellectual content presented in another format.
-     */
-    static final String TERM_HASFORMAT = "hasFormat";
-
-    /**
-     * The described resource includes the referenced resource either physically or logically.
-     */
-    static final String TERM_HASPART = "hasPart";
-
-    /**
-     * The described resource has a version, edition, or adaptation, namely, the referenced
-     * resource.
-     */
-    static final String TERM_HASVERSION = "hasVersion";
-
-    /**
-     * The described resource is the same intellectual content of the referenced resource, but
-     * presented in another format.
-     */
-    static final String TERM_ISFORMATOF = "isFormatOf";
-
-    /**
-     * The described resource is a physical or logical part of the referenced resource.
-     */
-    static final String TERM_ISPARTOF = "isPartOf";
-
-    /**
-     * The described resource is referenced, cited, or otherwise pointed to by the referenced
-     * resource.
-     */
-    static final String TERM_ISREFERENCEDBY = "isReferencedBy";
-
-    /**
-     * The described resource is supplanted, displaced, or superseded by the referenced resource.
-     */
-    static final String TERM_ISREPLACEDBY = "isReplacedBy";
-
-    /**
-     * The described resource is required by the referenced resource, either physically or
-     * logically.
-     */
-    static final String TERM_ISREQUIREDBY = "isRequiredBy";
-
-    /**
-     * Date of formal issuance (e.g., publication) of the resource.
-     */
-    static final String TERM_ISSUED = "issued";
-
-    /**
-     * The described resource is a version, edition, or adaptation of the referenced resource.
-     * Changes in version imply substantive changes in content rather than differences in format.
-     */
-    static final String TERM_ISVERSIONOF = "isVersionOf";
-
-    /**
-     * A legal document giving official permission to do something with the resource. Recommended
-     * best practice is to identify the license using a URI. Examples of such licenses can be found
-     * at http://creativecommons.org/licenses/.
-     */
-    static final String TERM_LICENSE = "license";
-
-    /**
-     * A class of entity that mediates access to the resource and for whom the resource is intended
-     * or useful. The audiences for a resource are of two basic classes: (1) an ultimate beneficiary
-     * of the resource, and (2) frequently, an entity that mediates access to the resource. The
-     * mediator element refinement represents the second of these two classes.
-     */
-    static final String TERM_MEDIATOR = "mediator";
-
-    /**
-     * The material or physical carrier of the resource.
-     */
-    static final String TERM_MEDIUM = "medium";
-
-    /**
-     * Date on which the resource was changed.
-     */
-    static final String TERM_MODIFIED = "modified";
-
-    /**
-     * The described resource references, cites, or otherwise points to the referenced resource.
-     */
-    static final String TERM_REFERENCES = "references";
-
-    /**
-     * The described resource supplants, displaces, or supersedes the referenced resource.
-     */
-    static final String TERM_REPLACES = "replaces";
-
-    /**
-     * The described resource requires the referenced resource to support its function, delivery, or
-     * coherence of content.
-     */
-    static final String TERM_REQUIRES = "requires";
-
-    /**
-     * A person or organization owning or managing rights over the resource. Recommended best
-     * practice is to use the URI or name of the Rights Holder to indicate the entity.
-     */
-    static final String TERM_RIGHTSHOLDER = "rightsHolder";
-
-    /**
-     * Spatial characteristics of the intellectual content of the resource.
-     */
-    static final String TERM_SPATIAL = "spatial";
-
-    /**
-     * A list of subunits of the content of the resource.
-     */
-    static final String TERM_TABLEOFCONTENTS = "tableOfContents";
-
-    /**
-     * Temporal characteristics of the intellectual content of the resource.
-     */
-    static final String TERM_TEMPORAL = "temporal";
-
-    /**
-     * Date (often a range) of validity of a resource.
-     */
-    static final String TERM_VALID = "valid";
-
-}
diff --git a/src/java/org/apache/lenya/cms/metadata/dublincore/DublinCoreHelper.java b/src/java/org/apache/lenya/cms/metadata/dublincore/DublinCoreHelper.java
deleted file mode 100644
index 8ddbd32..0000000
--- a/src/java/org/apache/lenya/cms/metadata/dublincore/DublinCoreHelper.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.metadata.dublincore;
-
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.lenya.cms.metadata.MetaData;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentException;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.log4j.Logger;
-
-/**
- * Facade to get the DublinCore through the cms Document
- */
-public final class DublinCoreHelper {
-
-    /**
-     * Constructor
-     */
-    private DublinCoreHelper() {
-        // do nothing
-    }
-
-    private static Logger log = Logger.getLogger(DublinCoreHelper.class);
-    private static Logger getLogger() {
-        return log;
-    }
-
-    /**
-     * Get the value of the DCIdentifier corresponding to a document id.
-     * @param manager The service manager.
-     * @param map The identity map.
-     * @param publication The publication the document(s) belongs to.
-     * @param area The area the document(s) belongs to.
-     * @param documentId The document id.
-     * @return a String. The value of the DCIdentifier.
-     * @throws DocumentException when something with the document went wrong.
-     */
-    public static String getDCIdentifier(ServiceManager manager, DocumentIdentityMap map,
-            Publication publication, String area, String documentId) throws DocumentException {
-
-        String identifier = null;
-        SourceResolver resolver = null;
-        try {
-            resolver = (SourceResolver) manager.lookup(SourceResolver.ROLE);
-            identifier = null;
-
-            Document baseDocument = map.get(publication, area, documentId);
-            String[] languages = baseDocument.getLanguages();
-
-            int i = 0;
-            if (languages.length > 0) {
-                while (identifier == null && i < languages.length) {
-                    Document document = map.get(publication, area, documentId, languages[i]);
-                    if (getLogger().isDebugEnabled())
-                        getLogger().debug("document file : " + document.getFile().getAbsolutePath());
-                    MetaData dublincore = document.getMetaDataManager().getDublinCoreMetaData();
-                    if (getLogger().isDebugEnabled())
-                        getLogger().debug("dublincore title : "
-                            + dublincore.getFirstValue(DublinCore.ELEMENT_TITLE));
-                    identifier = dublincore.getFirstValue(DublinCore.ELEMENT_IDENTIFIER);
-                    i = i + 1;
-                }
-            }
-            if (languages.length < 1 || identifier == null) {
-                MetaData dublincore = baseDocument.getMetaDataManager().getDublinCoreMetaData();
-                identifier = dublincore.getFirstValue(DublinCore.ELEMENT_IDENTIFIER);
-            }
-        } catch (final DocumentException e) {
-            throw e;
-        } catch (final Exception e) {
-            throw new DocumentException(e);
-        }
-        finally {
-            if (resolver != null) {
-                manager.release(resolver);
-            }
-        }
-
-        return identifier;
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/metadata/dublincore/DublinCoreImpl.java b/src/java/org/apache/lenya/cms/metadata/dublincore/DublinCoreImpl.java
deleted file mode 100644
index 88177bb..0000000
--- a/src/java/org/apache/lenya/cms/metadata/dublincore/DublinCoreImpl.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.metadata.dublincore;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.lenya.cms.metadata.MetaDataImpl;
-import org.apache.lenya.cms.publication.DocumentException;
-
-/**
- * Access dublin core meta data in documents. This class uses the dublin core specification from
- * 2003-03-04.
- * @version $Id$
- */
-public class DublinCoreImpl extends MetaDataImpl {
-
-    private static final String LOCAL_META = "dc";
-
-    private static final String DC_NAMESPACE = "http://purl.org/dc/elements/1.1/";
-    private static final String DC_PREFIX = "dc";
-
-    /**
-     * The dublin core elements.
-     */
-    static final String[] ELEMENTS = { 
-            DublinCore.ELEMENT_TITLE, 
-            DublinCore.ELEMENT_CREATOR,
-            DublinCore.ELEMENT_SUBJECT, 
-            DublinCore.ELEMENT_DESCRIPTION,
-            DublinCore.ELEMENT_PUBLISHER, 
-            DublinCore.ELEMENT_CONTRIBUTOR, 
-            DublinCore.ELEMENT_DATE,
-            DublinCore.ELEMENT_TYPE, 
-            DublinCore.ELEMENT_FORMAT, 
-            DublinCore.ELEMENT_IDENTIFIER,
-            DublinCore.ELEMENT_SOURCE, 
-            DublinCore.ELEMENT_LANGUAGE, 
-            DublinCore.ELEMENT_RELATION,
-            DublinCore.ELEMENT_COVERAGE, 
-            DublinCore.ELEMENT_RIGHTS };
-
-    private static final String DCTERMS_NAMESPACE = "http://purl.org/dc/terms/";
-    private static final String DCTERMS_PREFIX = "dcterms";
-
-    /**
-     * The dublin core terms.
-     */
-    private static final String[] TERMS = { 
-            DublinCore.TERM_AUDIENCE, 
-            DublinCore.TERM_ALTERNATIVE,
-            DublinCore.TERM_TABLEOFCONTENTS, 
-            DublinCore.TERM_ABSTRACT, 
-            DublinCore.TERM_CREATED,
-            DublinCore.TERM_VALID, 
-            DublinCore.TERM_EXTENT, 
-            DublinCore.TERM_AVAILABLE,
-            DublinCore.TERM_ISSUED, 
-            DublinCore.TERM_MODIFIED, 
-            DublinCore.TERM_LICENSE, 
-            DublinCore.TERM_MEDIUM, 
-            DublinCore.TERM_ISVERSIONOF,
-            DublinCore.TERM_HASVERSION, 
-            DublinCore.TERM_ISREPLACEDBY, 
-            DublinCore.TERM_REPLACES,
-            DublinCore.TERM_ISREQUIREDBY, 
-            DublinCore.TERM_REQUIRES, 
-            DublinCore.TERM_ISPARTOF,
-            DublinCore.TERM_HASPART, 
-            DublinCore.TERM_ISREFERENCEDBY, 
-            DublinCore.TERM_REFERENCES,
-            DublinCore.TERM_RIGHTSHOLDER, 
-            DublinCore.TERM_ISFORMATOF, 
-            DublinCore.TERM_HASFORMAT,
-            DublinCore.TERM_CONFORMSTO, 
-            DublinCore.TERM_SPATIAL, 
-            DublinCore.TERM_TEMPORAL,
-            DublinCore.TERM_MEDIATOR, 
-            DublinCore.TERM_DATEACCEPTED,
-            DublinCore.TERM_DATECOPYRIGHTED, 
-            DublinCore.TERM_DATESUBMITTED,
-            DublinCore.TERM_EDUCATIONLEVEL, 
-            DublinCore.TERM_ACCESSRIGHTS,
-            DublinCore.TERM_BIBLIOGRAPHICCITATION };
-
-    /**
-     * @see org.apache.lenya.cms.metadata.MetaDataImpl#MetaDataImpl(java.lang.String, org.apache.avalon.framework.service.ServiceManager, org.apache.avalon.framework.logger.Logger)
-     */
-    public DublinCoreImpl(String sourceUri, ServiceManager manager, Logger _logger) throws DocumentException {
-        super(sourceUri, manager, _logger);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.metadata.MetaDataImpl#getNamespaces()
-     */
-    protected String[] getNamespaces() {
-        return new String[] { DC_NAMESPACE, DCTERMS_NAMESPACE };
-    }
-
-    /**
-     * @see org.apache.lenya.cms.metadata.MetaDataImpl#getPrefixes()
-     */
-    protected String[] getPrefixes() {
-        return new String[] { DC_PREFIX, DCTERMS_PREFIX };
-    }
-
-    /**
-     * @see org.apache.lenya.cms.metadata.MetaDataImpl#getElements()
-     */
-    protected String[] getElements() {
-        return ELEMENTS;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.metadata.MetaDataImpl#getTerms()
-     */
-    protected String[] getTerms() {
-        return TERMS;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.metadata.MetaDataImpl#getLocalElementName()
-     */
-    protected String getLocalElementName() {
-        return LOCAL_META;
-    }
-
-    /**
-     * Returns a list of all allowed attribute names in this
-     * metadata.
-     * @return the list of attribute names
-     */
-    public static List getAttributeNames() {
-        List names = new ArrayList();
-        names.addAll(Arrays.asList(ELEMENTS));
-        names.addAll(Arrays.asList(TERMS));
-        return names;
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/metadata/usecases/Metadata.java b/src/java/org/apache/lenya/cms/metadata/usecases/Metadata.java
deleted file mode 100644
index 59266d0..0000000
--- a/src/java/org/apache/lenya/cms/metadata/usecases/Metadata.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.metadata.usecases;
-
-import org.apache.lenya.cms.metadata.MetaData;
-import org.apache.lenya.cms.site.usecases.SiteUsecase;
-import org.apache.lenya.cms.usecase.UsecaseException;
-import org.apache.lenya.transaction.Transactionable;
-
-/**
- * Usecase to edit metadata for a resource.
- * 
- * @version $Id$
- */
-public class Metadata extends SiteUsecase {
-
-    /**
-     * Ctor.
-     */
-    public Metadata() {
-        super();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#getObjectsToLock()
-     */
-    protected Transactionable[] getObjectsToLock() throws UsecaseException {
-        return getSourceDocument().getRepositoryNodes();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#initParameters()
-     */
-    protected void initParameters() {
-        super.initParameters();
-
-        try {
-            MetaData meta = getSourceDocument().getMetaDataManager().getDublinCoreMetaData();
-
-            String[] keys = meta.getPossibleKeys();
-            for (int i = 0; i < keys.length; i++) {
-                String value = meta.getFirstValue(keys[i]);
-                if (value != null) {
-                    setParameter(keys[i], value);
-                }
-            }
-
-        } catch (Exception e) {
-            getLogger().error("Unable to load Dublin Core metadata.", e);
-            addErrorMessage("Unable to load Dublin Core metadata.");
-        }
-    }
-
-    /**
-     * Validates the request parameters.
-     * @throws UsecaseException if an error occurs.
-     */
-    void validate() throws UsecaseException {
-        // do nothing
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckExecutionConditions()
-     */
-    protected void doCheckExecutionConditions() throws Exception {
-        validate();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-
-        MetaData meta = getSourceDocument().getMetaDataManager().getDublinCoreMetaData();
-
-        String[] keys = meta.getPossibleKeys();
-        for (int i = 0; i < keys.length; i++) {
-            String value = getParameterAsString(keys[i]);
-            if (value != null) {
-                meta.setValue(keys[i], value);
-            }
-        }
-        meta.save();
-
-        //TODO set workflow situation to edit here.
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/publication/DefaultDocument.java b/src/java/org/apache/lenya/cms/publication/DefaultDocument.java
deleted file mode 100644
index deb6620..0000000
--- a/src/java/org/apache/lenya/cms/publication/DefaultDocument.java
+++ /dev/null
@@ -1,496 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.publication;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import org.apache.avalon.framework.container.ContainerUtil;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.lenya.cms.cocoon.source.RepositorySource;
-import org.apache.lenya.cms.cocoon.source.SourceUtil;
-import org.apache.lenya.cms.metadata.LenyaMetaData;
-import org.apache.lenya.cms.metadata.MetaDataManager;
-import org.apache.lenya.cms.publication.util.DocumentVisitor;
-import org.apache.lenya.cms.repository.Node;
-import org.apache.lenya.cms.site.SiteManager;
-
-/**
- * A typical CMS document.
- * @version $Id$
- */
-public class DefaultDocument extends AbstractLogEnabled implements Document {
-
-    private String id;
-    private String sourceURI;
-    private DocumentIdentityMap identityMap;
-    protected ServiceManager manager;
-    private MetaDataManager metaDataManager;
-
-    /**
-     * Creates a new instance of DefaultDocument. The language of the document is the default
-     * language of the publication.
-     * @param manager The service manager.
-     * @param map The identity map the document belongs to.
-     * @param publication The publication.
-     * @param _id The document ID (starting with a slash).
-     * @param _area The area.
-     * @param _logger a logger
-     */
-    protected DefaultDocument(ServiceManager manager, DocumentIdentityMap map,
-            Publication publication, String _id, String _area, Logger _logger) {
-        this(manager, map, publication, _id, _area, publication.getDefaultLanguage(), _logger);
-    }
-
-    /**
-     * Creates a new instance of DefaultDocument.
-     * @param manager The service manager.
-     * @param map The identity map the document belongs to.
-     * @param publication The publication.
-     * @param _id The document ID (starting with a slash).
-     * @param _area The area.
-     * @param _language the language
-     * @param _logger a logger
-     */
-    protected DefaultDocument(ServiceManager manager, DocumentIdentityMap map,
-            Publication publication, String _id, String _area, String _language, Logger _logger) {
-
-        ContainerUtil.enableLogging(this, _logger);
-        if (getLogger().isDebugEnabled())
-            getLogger().debug("DefaultDocument() creating new instance with _id [" + _id
-                    + "], _language [" + _language + "]");
-
-        this.manager = manager;
-        if (_id == null) {
-            throw new IllegalArgumentException("The document ID must not be null!");
-        }
-        if (!_id.startsWith("/")) {
-            throw new IllegalArgumentException("The document ID must start with a slash!");
-        }
-        this.id = _id;
-        this.publication = publication;
-
-        this.identityMap = map;
-        this.language = _language;
-        setArea(_area);
-
-        if (getLogger().isDebugEnabled())
-            getLogger().debug("DefaultDocument() done building instance with _id [" + _id
-                    + "], _language [" + _language + "]");
-
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.Document#getId()
-     */
-    public String getId() {
-        return this.id;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.Document#getName()
-     */
-    public String getName() {
-        String[] ids = this.id.split("/");
-        String nodeId = ids[ids.length - 1];
-
-        return nodeId;
-    }
-
-    private Publication publication;
-
-    /**
-     * @see org.apache.lenya.cms.publication.Document#getPublication()
-     */
-    public Publication getPublication() {
-        return this.publication;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.Document#getLastModified()
-     */
-    public Date getLastModified() {
-        return new Date(getFile().lastModified());
-    }
-
-    /**
-     * Returns the file for this document.
-     * @return A file object.
-     */
-    public File getFile() {
-        return getPublication().getPathMapper().getFile(getPublication(),
-                getArea(),
-                getId(),
-                getLanguage());
-    }
-
-    private String language = "";
-
-    /**
-     * @see org.apache.lenya.cms.publication.Document#getLanguage()
-     */
-    public String getLanguage() {
-        return this.language;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.Document#getLanguages()
-     */
-    public String[] getLanguages() throws DocumentException {
-
-        List documentLanguages = new ArrayList();
-        String[] allLanguages = getPublication().getLanguages();
-
-        for (int i = 0; i < allLanguages.length; i++) {
-            Document version;
-            try {
-                version = getIdentityMap().getLanguageVersion(this, allLanguages[i]);
-            } catch (DocumentBuildException e) {
-                throw new DocumentException(e);
-            }
-            if (version.exists()) {
-                documentLanguages.add(allLanguages[i]);
-            }
-        }
-
-        return (String[]) documentLanguages.toArray(new String[documentLanguages.size()]);
-    }
-
-    /**
-     * Sets the language of this document.
-     * @param _language The language.
-     */
-    public void setLanguage(String _language) {
-        assert _language != null;
-        this.language = _language;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.Document#getLabel()
-     */
-    public String getLabel() throws DocumentException {
-        String labelString = "";
-        SiteManager siteManager = null;
-        ServiceSelector selector = null;
-        try {
-            selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
-            siteManager = (SiteManager) selector.select(getPublication().getSiteManagerHint());
-            if (siteManager != null) {
-                labelString = siteManager.getLabel(this);
-            }
-        } catch (Exception e) {
-            throw new DocumentException(e);
-        } finally {
-            if (selector != null) {
-                if (siteManager != null) {
-                    selector.release(siteManager);
-                }
-                this.manager.release(selector);
-            }
-        }
-        return labelString;
-    }
-
-    private String area;
-
-    /**
-     * @see org.apache.lenya.cms.publication.Document#getArea()
-     */
-    public String getArea() {
-        return this.area;
-    }
-
-    /**
-     * Sets the area.
-     * @param _area A string.
-     */
-    protected void setArea(String _area) {
-        if (!PublicationImpl.isValidArea(_area)) {
-            throw new IllegalArgumentException("The area [" + _area + "] is not valid!");
-        }
-        this.area = _area;
-    }
-
-    private String extension = "html";
-
-    /**
-     * @see org.apache.lenya.cms.publication.Document#getExtension()
-     */
-    public String getExtension() {
-        return this.extension;
-    }
-
-    /**
-     * Sets the extension of the file in the URL.
-     * @param _extension A string.
-     */
-    protected void setExtension(String _extension) {
-        assert _extension != null;
-        this.extension = _extension;
-    }
-
-    private String documentURL;
-
-    /**
-     * Sets the document URL.
-     * @param url The document URL (without publication ID and area).
-     */
-    public void setDocumentURL(String url) {
-        assert url != null;
-        this.documentURL = url;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.Document#exists()
-     */
-    public boolean exists() throws DocumentException {
-        boolean exists;
-        String hint = getPublication().getSiteManagerHint();
-        if (hint == null) {
-            try {
-                exists = SourceUtil.exists(getSourceURI(), this.manager);
-            } catch (Exception e) {
-                throw new DocumentException(e);
-            }
-        } else {
-            SiteManager siteManager = null;
-            ServiceSelector selector = null;
-            try {
-                selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
-                siteManager = (SiteManager) selector.select(hint);
-                exists = siteManager.contains(this);
-            } catch (Exception e) {
-                throw new DocumentException(e);
-            } finally {
-                if (selector != null) {
-                    if (siteManager != null) {
-                        selector.release(siteManager);
-                    }
-                    this.manager.release(selector);
-                }
-            }
-        }
-        return exists;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.Document#existsInAnyLanguage()
-     */
-    public boolean existsInAnyLanguage() throws DocumentException {
-        boolean exists = false;
-
-        try {
-            String[] languages = getLanguages();
-            for (int i = 0; i < languages.length; i++) {
-                Document languageVersion = getIdentityMap().getLanguageVersion(this, languages[i]);
-                exists = exists || languageVersion.exists();
-            }
-        } catch (DocumentBuildException e) {
-            throw new DocumentException(e);
-        }
-        return exists;
-    }
-
-    /**
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    public boolean equals(Object object) {
-        boolean equals = false;
-        if (getClass().isInstance(object)) {
-            Document document = (Document) object;
-            equals = getPublication().equals(document.getPublication())
-                    && getId().equals(document.getId()) && getArea().equals(document.getArea())
-                    && getLanguage().equals(document.getLanguage());
-        }
-        return equals;
-
-    }
-
-    /**
-     * @see java.lang.Object#hashCode()
-     */
-    public int hashCode() {
-
-        String key = getPublication().getId() + ":" + getPublication().getServletContext() + ":"
-                + getArea() + ":" + getId() + ":" + getLanguage();
-
-        return key.hashCode();
-    }
-
-    /**
-     * @see java.lang.Object#toString()
-     */
-    public String toString() {
-        return getPublication().getId() + ":" + getArea() + ":" + getId() + ":" + getLanguage();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.Document#getIdentityMap()
-     */
-    public DocumentIdentityMap getIdentityMap() {
-        return this.identityMap;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.Document#getCanonicalWebappURL()
-     */
-    public String getCanonicalWebappURL() {
-        return "/" + getPublication().getId() + "/" + getArea() + getCanonicalDocumentURL();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.Document#getCanonicalDocumentURL()
-     */
-    public String getCanonicalDocumentURL() {
-        return this.documentURL;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.Document#accept(org.apache.lenya.cms.publication.util.DocumentVisitor)
-     */
-    public void accept(DocumentVisitor visitor) throws PublicationException {
-        visitor.visitDocument(this);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.metadata.MetaDataOwner#getMetaDataManager()
-     */
-    public MetaDataManager getMetaDataManager() {
-        if (this.metaDataManager == null) {
-            metaDataManager = new MetaDataManager(getMetaSourceURI(), this.manager, getLogger());
-        }
-        return metaDataManager;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.Document#delete()
-     */
-    public void delete() throws DocumentException {
-        try {
-            SourceUtil.delete(getSourceURI(), this.manager);
-            SourceUtil.delete(getMetaSourceURI(), this.manager);
-        } catch (Exception e) {
-            throw new DocumentException(e);
-        }
-    }
-
-    protected static final String IDENTIFIABLE_TYPE = "document";
-
-    /**
-     * @see org.apache.lenya.transaction.Identifiable#getIdentifiableType()
-     */
-    public String getIdentifiableType() {
-        return IDENTIFIABLE_TYPE;
-    }
-
-    /**
-     * When source URI has not been set by whoever created the document,
-     * provides a default mechanism for constructing the document's URI.
-     * @return A URI.
-     */
-    private String getDefaultSourceURI() {
-        String path = publication.getPathMapper().getPath(getId(), getLanguage());
-        return publication.getSourceURI() + "/content/" + getArea() + "/" + path;
-
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.Document#getSourceURI()
-     */
-    public String getSourceURI() {
-        if (sourceURI == null)
-            sourceURI = getDefaultSourceURI();
-        return sourceURI;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.Document#setSourceURI(String)
-     */
-    public void setSourceURI(String _uri) {
-        sourceURI = _uri;
-    }
-
-    /**
-     * @return The meta source URI.
-     */
-    public String getMetaSourceURI() {
-        return getSourceURI() + Document.DOCUMENT_META_SUFFIX;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.Document#getRepositoryNodes()
-     */
-    public Node[] getRepositoryNodes() {
-        Node[] nodes = new Node[2];
-        SourceResolver resolver = null;
-        RepositorySource documentSource = null;
-        RepositorySource metaSource = null;
-        try {
-            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-            documentSource = (RepositorySource) resolver.resolveURI(getSourceURI());
-            metaSource = (RepositorySource) resolver.resolveURI(getMetaSourceURI());
-            nodes[0] = documentSource.getNode();
-            nodes[1] = metaSource.getNode();
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (resolver != null) {
-                if (documentSource != null) {
-                    resolver.release(documentSource);
-                }
-                if (metaSource != null) {
-                    resolver.release(metaSource);
-                }
-                this.manager.release(resolver);
-            }
-        }
-        return nodes;
-    }
-
-    private DocumentType resourceType;
-
-    /**
-     * Convenience method to read the document's resource type from the meta-data.
-     * @see Document#getResourceType()
-     */
-    public DocumentType getResourceType() throws DocumentException {
-        if (this.resourceType == null) {
-            String name = getMetaDataManager().getLenyaMetaData()
-                    .getFirstValue(LenyaMetaData.ELEMENT_RESOURCE_TYPE);
-            DocumentTypeBuilder builder = null;
-            try {
-                builder = (DocumentTypeBuilder) this.manager.lookup(DocumentTypeBuilder.ROLE);
-                this.resourceType = builder.buildDocumentType(name, getPublication());
-            } catch (Exception e) {
-                throw new DocumentException(e);
-            } finally {
-                if (builder != null) {
-                    this.manager.release(builder);
-                }
-            }
-        }
-        return this.resourceType;
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/publication/DefaultDocumentBuilder.java b/src/java/org/apache/lenya/cms/publication/DefaultDocumentBuilder.java
deleted file mode 100644
index e0b8434..0000000
--- a/src/java/org/apache/lenya/cms/publication/DefaultDocumentBuilder.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.publication;
-
-import org.apache.avalon.framework.container.ContainerUtil;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.avalon.framework.thread.ThreadSafe;
-
-/**
- * Default document builder implementation.
- * 
- * @version $Id$
- */
-public class DefaultDocumentBuilder extends AbstractLogEnabled implements DocumentBuilder,
-        Serviceable, ThreadSafe {
-
-    /**
-     * Ctor.
-     */
-    public DefaultDocumentBuilder() {
-    }
-
-    /**
-     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service(ServiceManager manager) {
-        this.manager = manager;
-    }
-
-    protected ServiceManager manager;
-
-    /**
-     * @see org.apache.lenya.cms.publication.DocumentBuilder#buildDocument(org.apache.lenya.cms.publication.DocumentIdentityMap,
-     *      org.apache.lenya.cms.publication.Publication, java.lang.String)
-     */
-    public Document buildDocument(DocumentIdentityMap map, Publication publication, String url)
-            throws DocumentBuildException {
-
-        URLInformation info = new URLInformation(url);
-
-        String documentURL = info.getDocumentUrl();
-        String originalURL = documentURL;
-
-        String extension = getExtension(documentURL);
-        documentURL = removeExtensions(documentURL);
-
-        String language = getLanguage(documentURL);
-        String fullLanguage = "".equals(language) ? "" : ("_" + language);
-        documentURL = documentURL.substring(0, documentURL.length() - fullLanguage.length());
-
-        if ("".equals(language)) {
-            language = publication.getDefaultLanguage();
-        }
-
-        String documentId = documentURL;
-
-        if (!documentId.startsWith("/")) {
-            throw new DocumentBuildException("Document ID [" + documentId
-                    + "] does not start with '/'!");
-        }
-
-        DefaultDocument document = createDocument(map,
-                publication,
-                info.getArea(),
-                documentId,
-                language);
-        ContainerUtil.enableLogging(document, getLogger());
-        document.setExtension(extension);
-        document.setDocumentURL(originalURL);
-
-        return document;
-    }
-
-    /**
-     * Creates a new document object. Override this method to create specific document objects,
-     * e.g., for different document IDs.
-     * @param map The identity map.
-     * @param publication The publication.
-     * @param area The area.
-     * @param documentId The document ID.
-     * @param language The language.
-     * @return A document.
-     * @throws DocumentBuildException when something went wrong.
-     */
-    protected DefaultDocument createDocument(DocumentIdentityMap map, Publication publication,
-            String area, String documentId, String language) throws DocumentBuildException {
-        DefaultDocument document = new DefaultDocument(this.manager, map, publication, documentId,
-                area, language, getLogger());
-        return document;
-    }
-
-    /**
-     * Removes all "."-separated extensions from a URL (e.g., <code>/foo.print.html</code> is
-     * transformed to <code>/foo</code>).
-     * @param url The URL to trim.
-     * @return A URL string.
-     */
-    protected String removeExtensions(String url) {
-        int dotIndex = url.indexOf(".");
-        if (dotIndex > -1) {
-            url = url.substring(0, dotIndex);
-        }
-        return url;
-    }
-
-    /**
-     * Returns the language of a URL.
-     * @param urlWithoutSuffix The URL without the suffix.
-     * @return A string.
-     */
-    protected String getLanguage(String urlWithoutSuffix) {
-
-        String language = "";
-        String url = urlWithoutSuffix;
-
-        int languageSeparatorIndex = url.lastIndexOf("_");
-        if (languageSeparatorIndex > -1) {
-            String suffix = url.substring(languageSeparatorIndex + 1);
-            if (suffix.length() <= 5) {
-                language = suffix;
-            }
-        }
-        return language;
-    }
-
-    /**
-     * Returns the extension of a URL.
-     * @param url The URL.
-     * @return The extension.
-     */
-    protected String getExtension(String url) {
-        int startOfSuffix = url.lastIndexOf('.');
-        String suffix = "";
-
-        if ((startOfSuffix > -1) && !url.endsWith(".")) {
-            suffix = url.substring(startOfSuffix + 1);
-        }
-
-        return suffix;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.DocumentBuilder#isDocument(org.apache.lenya.cms.publication.Publication,
-     *      java.lang.String)
-     */
-    public boolean isDocument(Publication publication, String url) throws DocumentBuildException {
-        boolean isDocument = false;
-
-        String publicationURI = url.substring(("/" + publication.getId()).length());
-        if (publicationURI.startsWith("/")) {
-            publicationURI = publicationURI.substring(1);
-
-            int slashIndex = publicationURI.indexOf("/");
-            if (slashIndex > -1) {
-                String area = publicationURI.substring(0, slashIndex);
-                String documentUri = publicationURI.substring(slashIndex);
-                if (PublicationImpl.isValidArea(area) && !area.equals(Publication.ADMIN_AREA)
-                        && documentUri.startsWith("/") && documentUri.length() > 1) {
-                    isDocument = true;
-                }
-            }
-        }
-
-        return isDocument;
-    }
-
-    /**
-     * Builds the canonical document URL.
-     * @param publication The publication.
-     * @param documentid The document ID.
-     * @param language The language of the document.
-     * @return A string.
-     */
-    protected String buildCanonicalDocumentUrl(Publication publication, String documentid,
-            String language) {
-
-        String languageSuffix = "";
-        if (!language.equals(publication.getDefaultLanguage())) {
-            languageSuffix = "_" + language;
-        }
-
-        String url = documentid + languageSuffix + ".html";
-        return url;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.DocumentBuilder#buildCanonicalUrl(org.apache.lenya.cms.publication.Publication,
-     *      java.lang.String, java.lang.String, java.lang.String)
-     */
-    public String buildCanonicalUrl(Publication publication, String area, String documentid,
-            String language) {
-
-        String documentUrl = buildCanonicalDocumentUrl(publication, documentid, language);
-        String url = "/" + publication.getId() + "/" + area + documentUrl;
-
-        return url;
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/publication/DefaultDocumentIdToPathMapper.java b/src/java/org/apache/lenya/cms/publication/DefaultDocumentIdToPathMapper.java
deleted file mode 100644
index c405118..0000000
--- a/src/java/org/apache/lenya/cms/publication/DefaultDocumentIdToPathMapper.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.publication;
-
-import java.io.File;
-
-/**
- * Default DocumentIdToPathMapper implementation.
- * 
- * @version $Id$
- */
-public class DefaultDocumentIdToPathMapper
-    implements DocumentIdToPathMapper, PathToDocumentIdMapper {
-    	
-    /**
-     * The file name.
-     */
-    public static final String BASE_FILENAME_PREFIX = "index";
-    
-    /**
-     * The file extension.
-     */
-    public static final String BASE_FILENAME_SUFFIX = ".xml";
-
-    /**
-	 * @see org.apache.lenya.cms.publication.DocumentIdToPathMapper#getFile(org.apache.lenya.cms.publication.Publication,
-	 *      java.lang.String, java.lang.String, java.lang.String)
-	 */
-    public File getFile(Publication publication, String area, String documentId, String language) {
-        File file = new File(getDirectory(publication, area, documentId), getFilename(language));
-        return file;
-    }
-
-    /**
-	 * (non-Javadoc)
-	 * 
-	 * @see org.apache.lenya.cms.publication.DocumentIdToPathMapper#getDirectory(org.apache.lenya.cms.publication.Publication,
-	 *      java.lang.String, java.lang.String)
-	 */
-    public File getDirectory(Publication publication, String area, String documentId) {
-        assert documentId.startsWith("/");
-        // remove leading slash
-        documentId = documentId.substring(1);
-        documentId = documentId.replace('/', File.separatorChar);
-
-        File file =
-            new File(
-                publication.getDirectory(),
-                Publication.CONTENT_PATH + File.separator + area + File.separator + documentId);
-
-        return file;
-    }
-
-    /**
-	 * @see org.apache.lenya.cms.publication.DocumentIdToPathMapper#getPath(java.lang.String,
-	 *      java.lang.String)
-	 */
-    public String getPath(String documentId, String language) {
-        assert documentId.startsWith("/");
-        // remove leading slash
-        documentId = documentId.substring(1);
-        return documentId + "/" + getFilename(language);
-    }
-
-    /**
-	 * Constructs the filename for a given language.
-	 * 
-	 * @param language The language.
-	 * @return A string value.
-	 */
-    protected String getFilename(String language) {
-        String languageSuffix = "";
-        if (language != null && !"".equals(language)) {
-            languageSuffix = "_" + language;
-        }
-        return BASE_FILENAME_PREFIX + languageSuffix + BASE_FILENAME_SUFFIX;
-    }
-
-    /**
-     * Returns the document ID for a certain file.
-     * @param publication The publication.
-     * @param area The area.
-     * @param file The file representing the document.
-     * @return A string.
-     * @throws DocumentDoesNotExistException when the document
-     * referenced by the file does not exist.
-     */
-    public String getDocumentId(
-        Publication publication,
-        String area,
-        File file)
-        throws DocumentDoesNotExistException {
-
-        String fileName = file.getAbsolutePath();
-        String contentDirName =
-            publication.getContentDirectory(area).getAbsolutePath();
-        if (fileName.startsWith(contentDirName)) {
-            // trim everything up to the documentId
-            String relativeFileName =
-                fileName.substring(contentDirName.length());
-            // trim everything after the documentId
-            relativeFileName =
-                relativeFileName.substring(
-                    0,
-                    relativeFileName.lastIndexOf(File.separator));
-            // and replace the os specific separator by '/'
-            return relativeFileName.replace(File.separatorChar, '/');
-        }
-        // Document does not seem to exist
-        throw new DocumentDoesNotExistException(
-            "No document associated with file" + fileName);
-    }
-    
-    /**
-     * Returns the language for a certain file
-     * 
-     * @param file the document file
-     * 
-     * @return the language for the given document file or null if
-     * the file has no language.
-     */
-    public String getLanguage(File file) {
-        String fileName = file.getName();
-        String language = null;
-
-        // check if the file is of the form index.html or index_en.html
-
-        if (fileName.startsWith(BASE_FILENAME_PREFIX)
-            && fileName.endsWith(BASE_FILENAME_SUFFIX)) {
-            String languageSuffix =
-                fileName.substring(
-                    BASE_FILENAME_PREFIX.length(),
-                    fileName.indexOf(BASE_FILENAME_SUFFIX));
-            if (languageSuffix.length() > 0) {
-                // trim the leading '_'
-                language = languageSuffix.substring(1);
-            }
-        }
-        return language;
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/publication/DefaultResourcesManager.java b/src/java/org/apache/lenya/cms/publication/DefaultResourcesManager.java
deleted file mode 100644
index 936a88b..0000000
--- a/src/java/org/apache/lenya/cms/publication/DefaultResourcesManager.java
+++ /dev/null
@@ -1,392 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.publication;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.Map;
-
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
-
-import org.apache.cocoon.servlet.multipart.Part;
-import org.apache.excalibur.source.ModifiableSource;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.lenya.cms.cocoon.source.SourceUtil;
-import org.apache.lenya.cms.metadata.LenyaMetaData;
-import org.apache.lenya.transaction.Transactionable;
-
-/**
- * Manager for resources of a CMS document.
- * @version $Id$
- */
-public class DefaultResourcesManager extends AbstractLogEnabled implements ResourcesManager,
-        Serviceable {
-
-    private static final class MetaSuffixFileFilter implements FileFilter {
-        /**
-         * @see java.io.FileFilter#accept(java.io.File)
-         */
-        public boolean accept(File file) {
-            return file.isFile() && file.getName().endsWith(RESOURCES_META_SUFFIX);
-        }
-    }
-
-    private static final class NotMetaSuffixFileFilter implements FileFilter {
-        /**
-         * @see java.io.FileFilter#accept(java.io.File)
-         */
-        public boolean accept(File file) {
-            return file.isFile() && !file.getName().endsWith(RESOURCES_META_SUFFIX);
-        }
-    }
-
-    private static final class ImageExtensionsFileFilter implements FileFilter {
-        /**
-         * @see java.io.FileFilter#accept(java.io.File)
-         */
-        public boolean accept(File file) {
-            for (int i = 0; i < IMAGE_FILE_EXTENSIONS.length; i++)
-                if (file.getName().toLowerCase(Locale.ENGLISH).endsWith(IMAGE_FILE_EXTENSIONS[i]))
-                    return true;
-            return false;
-        }
-    }
-
-    private static final class ResourceMetaFileFilter implements FileFilter {
-        private final File resource;
-
-        private ResourceMetaFileFilter(File _resource) {
-            super();
-            this.resource = _resource;
-        }
-
-        /**
-         * @see java.io.FileFilter#accept(java.io.File)
-         */
-        public boolean accept(File file) {
-            return file.isFile()
-                    && file.getName().equals(this.resource.getName().concat(RESOURCES_META_SUFFIX));
-        }
-    }
-
-
-    /**
-     * Constructor
-     */
-    public DefaultResourcesManager() {
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.ResourcesManager#addResource(org.apache.lenya.cms.publication.Document,
-     *      org.apache.cocoon.servlet.multipart.Part, java.util.Map)
-     */
-    public void addResource(Document document, Part part, Map metadata) throws Exception {
-
-        if (getLogger().isDebugEnabled())
-            getLogger().debug("DefaultResourcesManager::addResource() called");
-
-        try {
-            String fileName = part.getFileName();
-            if (!fileName.matches(FILE_NAME_REGEXP)) {
-                // the file name contains characters which mean trouble
-                // and are therefore not allowed.
-                getLogger().warn("The filename [" + fileName + "]� is not valid for an asset.");
-            }
-            // convert spaces in the file name to underscores
-            fileName = fileName.replace(' ', '_');
-
-            Resource resource = new Resource(document, fileName, this.manager, getLogger());
-            Transactionable[] nodes = resource.getRepositoryNodes();
-            for (int i = 0; i < nodes.length; i++) {
-                nodes[i].lock();
-            }
-
-            String mimeType = part.getMimeType();
-            int fileSize = part.getSize();
-
-
-            /*
-             * complement and create the meta description for the resource.
-             */
-            metadata.put("format", mimeType);
-            metadata.put("extent", Integer.toString(fileSize));
-            Map lenyaMetaData = new HashMap(1);
-            lenyaMetaData.put(LenyaMetaData.ELEMENT_CONTENT_TYPE, "asset");
-            resource.getMetaDataManager().setMetaData(metadata, lenyaMetaData, null);
-
-            saveResource(resource, part);
-        } catch (final DocumentException e) {
-            getLogger().error("Document exception " + e.toString());
-            throw new RuntimeException(e);
-        } catch (final IOException e) {
-            getLogger().error("IO Error " + e.toString());
-            throw e;
-        }
-
-        if (getLogger().isDebugEnabled())
-            getLogger().debug("DefaultResourcesManager::addResource() done.");
-    }
-
-    /**
-     * Saves the resource to a file.
-     * @param resource The resource.
-     * @param part The part of the multipart request.
-     * @throws IOException if an error occurs.
-     */
-    protected void saveResource(Resource resource, Part part) throws IOException {
-        OutputStream out = null;
-        InputStream in = null;
-
-        SourceResolver resolver = null;
-        ModifiableSource source = null;
-
-        try {
-            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-            source = (ModifiableSource) resolver.resolveURI(resource.getSourceURI());
-
-            byte[] buf = new byte[4096];
-            out = source.getOutputStream();
-            in = part.getInputStream();
-            int read = in.read(buf);
-
-            while (read > 0) {
-                out.write(buf, 0, read);
-                read = in.read(buf);
-            }
-        } catch (final FileNotFoundException e) {
-            getLogger().error("file not found" + e.toString());
-            throw new IOException(e.toString());
-        } catch (IOException e) {
-            getLogger().error("IO error " + e.toString());
-            throw new IOException(e.toString());
-        } catch (Exception e) {
-            getLogger().error("Exception" + e.toString());
-            throw new IOException(e.toString());
-        } finally {
-            if (in != null) {
-                in.close();
-            }
-            if (out != null) {
-                out.flush();
-                out.close();
-            }
-
-            if (resolver != null) {
-                if (source != null) {
-                    resolver.release(source);
-                }
-                this.manager.release(resolver);
-            }
-        }
-    }
-
-
-    /**
-     * @see org.apache.lenya.cms.publication.ResourcesManager#getResources(org.apache.lenya.cms.publication.Document)
-     */
-    public Resource[] getResources(Document document) {
-
-        // filter the meta files out. We only want to see the "real" resources.
-        FileFilter filter = new NotMetaSuffixFileFilter();
-
-        return getResources(document, filter);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.ResourcesManager#getImageResources(org.apache.lenya.cms.publication.Document)
-     */
-    public Resource[] getImageResources(Document document) {
-        return getResources(document, new ImageExtensionsFileFilter());
-    }
-
-    /**
-     * Returns the resources that are matched by a certain file filter.
-     * @param document The document.
-     * @param filter A file filter.
-     * @return A resource array.
-     */
-    protected Resource[] getResources(Document document, FileFilter filter) {
-        File[] files = new File[0];
-        Resource tempResource = new Resource(document, "temp", this.manager, getLogger());
-
-        SourceResolver resolver = null;
-        Source source = null;
-        try {
-            Resource[] resources;
-            
-            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-            source = resolver.resolveURI(tempResource.getBaseURI());
-            if (source.exists()) {
-                File directory = org.apache.excalibur.source.SourceUtil.getFile(source);
-                if (directory.isDirectory()) {
-                    files = directory.listFiles(filter);
-                }
-                resources = new Resource[files.length];
-                for (int i = 0; i < files.length; i++) {
-                    resources[i] = new Resource(document, files[i].getName(), this.manager, getLogger());
-                }
-            }
-            else {
-                resources = new Resource[0];
-            }
-            return resources;
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (resolver != null) {
-                if (source != null) {
-                    resolver.release(source);
-                }
-                this.manager.release(resolver);
-            }
-        }
-
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.ResourcesManager#deleteResources(org.apache.lenya.cms.publication.Document)
-     */
-    public void deleteResources(Document document) {
-
-        try {
-            Resource[] resources = getResources(document);
-            for (int i = 0; i < resources.length; i++) {
-                SourceUtil.delete(resources[i].getSourceURI(), this.manager);
-                SourceUtil.delete(resources[i].getMetaSourceURI(), this.manager);
-            }
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.ResourcesManager#copyResources(org.apache.lenya.cms.publication.Document,
-     *      org.apache.lenya.cms.publication.Document)
-     */
-    public void copyResources(Document sourceDocument, Document destinationDocument)
-            throws Exception {
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Copying resources from [" + sourceDocument + "] to ["
-                    + destinationDocument + "]");
-        }
-
-        SourceResolver resolver = null;
-        try {
-            Resource[] resources = getResources(sourceDocument);
-            for (int i = 0; i < resources.length; i++) {
-                Resource sourceResource = resources[i];
-                Resource destinationResource = new Resource(destinationDocument, sourceResource
-                        .getName(), this.manager, getLogger());
-
-                Source sourceSource = null;
-                Source sourceMetaSource = null;
-                ModifiableSource destSource = null;
-                ModifiableSource destMetaSource = null;
-
-                try {
-
-                    sourceSource = resolver.resolveURI(sourceResource.getSourceURI());
-                    sourceMetaSource = resolver.resolveURI(sourceResource.getMetaSourceURI());
-                    destSource = (ModifiableSource) resolver.resolveURI(destinationResource
-                            .getSourceURI());
-                    destMetaSource = (ModifiableSource) resolver.resolveURI(destinationResource
-                            .getMetaSourceURI());
-
-                    SourceUtil.copy(sourceSource, destSource, true);
-                    SourceUtil.copy(sourceMetaSource, destMetaSource, true);
-                } finally {
-                    if (sourceSource != null) {
-                        resolver.release(sourceSource);
-                    }
-                    if (sourceMetaSource != null) {
-                        resolver.release(sourceMetaSource);
-                    }
-                    if (destSource != null) {
-                        resolver.release(destSource);
-                    }
-                    if (destMetaSource != null) {
-                        resolver.release(destMetaSource);
-                    }
-                }
-            }
-        } finally {
-            if (resolver != null) {
-                this.manager.release(resolver);
-            }
-        }
-    }
-
-    protected ServiceManager manager;
-
-    /**
-     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service(ServiceManager manager) throws ServiceException {
-        this.manager = manager;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.ResourcesManager#getResource(org.apache.lenya.cms.publication.Document,
-     *      java.lang.String)
-     */
-    public Resource getResource(Document document, String resourceName) {
-        Resource theResource = null;
-        Resource[] resources = getResources(document);
-        for (int i = 0; i < resources.length; i++) {
-            if (resources[i].getName().equals(resourceName)) {
-                theResource = resources[i];
-                break;
-            }
-        }
-        return theResource;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.ResourcesManager#deleteResource(org.apache.lenya.cms.publication.Resource)
-     */
-    public void deleteResource(Resource theResource) throws Exception {
-
-        SourceUtil.delete(theResource.getMetaSourceURI(), this.manager);
-        SourceUtil.delete(theResource.getSourceURI(), this.manager);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.ResourcesManager#deleteResource(org.apache.lenya.cms.publication.Document,
-     *      java.lang.String)
-     */
-    public void deleteResource(Document document, String name) throws Exception {
-        Resource theResource = getResource(document, name);
-        if (theResource == null)
-            throw new Exception("no such resource [" + name + "] exists for document [ " + document.getId() + "]");
-
-        deleteResource(theResource);
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/publication/Document.java b/src/java/org/apache/lenya/cms/publication/Document.java
deleted file mode 100644
index 37095f2..0000000
--- a/src/java/org/apache/lenya/cms/publication/Document.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.publication;
-
-import java.io.File;
-import java.util.Date;
-
-import org.apache.lenya.cms.metadata.MetaDataOwner;
-import org.apache.lenya.cms.publication.util.DocumentVisitor;
-import org.apache.lenya.cms.repository.Node;
-import org.apache.lenya.transaction.Identifiable;
-
-/**
- * A CMS document.
- * @version $Id$
- */
-public interface Document extends MetaDataOwner, Identifiable {
-    
-    /**
-     * The document namespace URI.
-     */
-    String NAMESPACE = "http://apache.org/cocoon/lenya/document/1.0";
-    
-    /**
-     * The default namespace prefix.
-     */
-    String DEFAULT_PREFIX = "lenya";
-    
-    /**
-     * The transactionable type for document objects.
-     */
-    String TRANSACTIONABLE_TYPE = "document";
-    
-    /**
-     * <code>DOCUMENT_META_SUFFIX</code> The suffix for document meta Uris
-     */
-    final String DOCUMENT_META_SUFFIX = ".meta";
-
-    /**
-     * Returns the document ID of this document.
-     * @return the document-id of this document.
-     */
-    String getId();
-    
-    /**
-     * Returns the document name of this document.
-     * @return the document-name of this document.
-     */
-    String getName();
-    
-    /**
-     * Returns the publication this document belongs to.
-     * @return A publication object.
-     */
-    Publication getPublication();
-    
-    /**
-     * Returns the canonical web application URL.
-     * @return A string.
-     */
-    String getCanonicalWebappURL();
-
-    /**
-     * Returns the canonical document URL.
-     * @return A string.
-     */
-    String getCanonicalDocumentURL();
-
-    /**
-     * Returns the language of this document.
-     * Each document has one language associated to it. 
-     * @return A string denoting the language.
-     */
-    String getLanguage();
-
-    /**
-     * Returns all the languages this document is available in.
-     * A document has one associated language (@see Document#getLanguage)
-     * but there are possibly a number of other languages for which a 
-     * document with the same document-id is also available in. 
-     * 
-     * @return An array of strings denoting the languages.
-     * 
-     * @throws DocumentException if an error occurs
-     */
-    String[] getLanguages() throws DocumentException;
-
-    /**
-     * Get the navigation label associated with this document 
-     * for the language.
-     * 
-     * @return the label String
-     * 
-     * @throws DocumentException if an error occurs
-     */
-    String getLabel() throws DocumentException;
-
-    /**
-     * Returns the date of the last modification of this document.
-     * @return A date denoting the date of the last modification.
-     */
-    Date getLastModified();
-
-    /**
-     * Returns the area this document belongs to.
-     * @return The area.
-     */
-    String getArea();
-
-    /**
-     * Returns the file for this document.
-     * @return A file object.
-     */
-    File getFile();
-
-    /**
-     * Returns the extension in the URL.
-     * @return A string.
-     */
-    String getExtension();
-    
-    /**
-     * Check if a document with the given document-id, language and in the given
-     * area actually exists.
-     * 
-     * @return true if the document exists, false otherwise
-     * 
-     * @throws DocumentException if an error occurs
-     */
-    boolean exists() throws DocumentException;
-    
-    /**
-     * Check if a document exists with the given document-id and the given area
-     * independently of the given language.
-     * 
-     * @return true if a document with the given document-id and area exists,
-     * null otherwise
-     * 
-     * @throws DocumentException if an error occurs
-     */
-    boolean existsInAnyLanguage() throws DocumentException;
-    
-    /**
-     * Returns the identity map this document belongs to.
-     * @return A document identity map.
-     */
-    DocumentIdentityMap getIdentityMap();
-    
-    /**
-     * Returns the URI to resolve the document's source.
-     * @return A string.
-     */
-    String getSourceURI();
-    
-    /**
-     * Setter for the URI to resolve the document's source.
-     * @param uri URI
-     */
-    void setSourceURI(String uri);
-    
-    /**
-     * Accepts a document visitor.
-     * @param visitor The visitor.
-     * @throws PublicationException if an error occurs.
-     */
-    void accept(DocumentVisitor visitor) throws PublicationException;
-
-    /**
-     * Deletes the document.
-     * @throws DocumentException if an error occurs.
-     */
-    void delete() throws DocumentException;
-    
-    /**
-     * @return The repository nodes that represent this document.
-     */
-    Node[] getRepositoryNodes();
-
-    /**
-     * @return The resource type of this document (formerly known as doctype)
-     * @throws DocumentException if an error occurs.
-     */
-    DocumentType getResourceType() throws DocumentException;
-}
diff --git a/src/java/org/apache/lenya/cms/publication/DocumentBuildException.java b/src/java/org/apache/lenya/cms/publication/DocumentBuildException.java
deleted file mode 100644
index 79dadc7..0000000
--- a/src/java/org/apache/lenya/cms/publication/DocumentBuildException.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.publication;
-
-/**
- * Document build exception.
- *
- * @version $Id$
- */
-public class DocumentBuildException extends PublicationException {
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/**
-     * Constructor.
-     */
-    public DocumentBuildException() {
-        super();
-    }
-
-    /**
-     * Constructor.
-     * @param message A message.
-     */
-    public DocumentBuildException(String message) {
-        super(message);
-    }
-
-    /**
-     * Constructor.
-     * @param cause The cause of the exception.
-     */
-    public DocumentBuildException(Throwable cause) {
-        super(cause);
-    }
-
-    /**
-     * Constructor.
-     * @param message A message.
-     * @param cause The cause of the exception.
-     */
-    public DocumentBuildException(String message, Throwable cause) {
-        super(message, cause);
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/publication/DocumentBuilder.java b/src/java/org/apache/lenya/cms/publication/DocumentBuilder.java
deleted file mode 100644
index 239bd53..0000000
--- a/src/java/org/apache/lenya/cms/publication/DocumentBuilder.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.publication;
-
-/**
- * A document builder builds a document from a URL.
- */
-public interface DocumentBuilder {
-
-    /**
-     * The Avalon role.
-     */
-    String ROLE = DocumentBuilder.class.getName();
-
-    /**
-     * Builds a document.
-     * @param map The identity map the document belongs to.
-     * @param publication The publication.
-     * @param url The URL of the form
-     *            /{publication-id}/{area}/{document-id}{language-suffix}.{extension}.
-     * @return A document.
-     * @throws DocumentBuildException when something went wrong.
-     */
-    Document buildDocument(DocumentIdentityMap map, Publication publication, String url)
-            throws DocumentBuildException;
-
-    /**
-     * Checks if an URL corresponds to a CMS document.
-     * @param publication The publication the document belongs to.
-     * @param url The URL of the form /{publication-id}/...
-     * @return A boolean value.
-     * @throws DocumentBuildException when something went wrong.
-     */
-    boolean isDocument(Publication publication, String url) throws DocumentBuildException;
-
-    /**
-     * Builds an URL corresponding to a cms document from the publication, the area, the document id
-     * and the language
-     * @param publication The publication the document belongs to.
-     * @param area The area the document belongs to.
-     * @param documentid The document id of the document.
-     * @param language The language of the document.
-     * @return a String The builded url
-     */
-    String buildCanonicalUrl(Publication publication, String area, String documentid,
-            String language);
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/publication/DocumentDoesNotExistException.java b/src/java/org/apache/lenya/cms/publication/DocumentDoesNotExistException.java
deleted file mode 100644
index 2749413..0000000
--- a/src/java/org/apache/lenya/cms/publication/DocumentDoesNotExistException.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.publication;
-
-/**
- * Document does not exist exception
- */
-public class DocumentDoesNotExistException extends DocumentException {
-
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/**
-     * Creates a new DocumentDoesNotExistException
-     * 
-     */
-    public DocumentDoesNotExistException() {
-        super();
-    }
-
-    /**
-     * Creates a new DocumentDoesNotExistException
-     * @param message the exception message
-     */
-    public DocumentDoesNotExistException(String message) {
-        super(message);
-    }
-
-    /**
-     * Creates a new DocumentDoesNotExistException
-     * @param message the exception message
-     * @param cause the cause of the exception
-     */
-    public DocumentDoesNotExistException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    /**
-     * Creates a new DocumentDoesNotExistException
-     * @param cause the cause of the exception
-     */
-    public DocumentDoesNotExistException(Throwable cause) {
-        super(cause);
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/publication/DocumentException.java b/src/java/org/apache/lenya/cms/publication/DocumentException.java
deleted file mode 100644
index 689fd5b..0000000
--- a/src/java/org/apache/lenya/cms/publication/DocumentException.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.publication;
-
-/**
- * Document exception
- */
-public class DocumentException extends PublicationException {
-
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/**
-     * Creates a new DocumentException
-     * 
-     */
-    public DocumentException() {
-        super();
-    }
-
-    /**
-     * Creates a new DocumentException
-     * 
-     * @param message the exception message
-     */
-    public DocumentException(String message) {
-        super(message);
-    }
-
-    /**
-     * Creates a new DocumentException
-     * 
-     * @param message the exception message
-     * @param cause the cause of the exception
-     */
-    public DocumentException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    /**
-     * Creates a new DocumentException
-     * 
-     * @param cause the cause of the exception
-     */
-    public DocumentException(Throwable cause) {
-        super(cause);
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/publication/DocumentFactory.java b/src/java/org/apache/lenya/cms/publication/DocumentFactory.java
deleted file mode 100644
index 7da2550..0000000
--- a/src/java/org/apache/lenya/cms/publication/DocumentFactory.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.publication;
-
-import java.io.File;
-
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.excalibur.source.SourceUtil;
-import org.apache.lenya.transaction.Identifiable;
-import org.apache.lenya.transaction.IdentityMap;
-import org.apache.lenya.transaction.IdentifiableFactory;
-
-/**
- * Document factory.
- *
- * @version $Id$
- */
-public class DocumentFactory extends AbstractLogEnabled implements IdentifiableFactory {
-
-    protected ServiceManager manager;
-
-    /**
-     * Ctor.
-     * @param manager The service manager.
-     */
-    public DocumentFactory(ServiceManager manager) {
-        this.manager = manager;
-    }
-
-    /**
-     * Builds a document key.
-     * @param publication The publication.
-     * @param area The area.
-     * @param documentId The document ID.
-     * @param language The language.
-     * @return A key.
-     */
-    public String getKey(Publication publication, String area, String documentId, String language) {
-        return publication.getId() + ":" + area + ":" + documentId + ":" + language;
-    }
-
-    /**
-     * Builds a document key.
-     * @param map The identity map.
-     * @param webappUrl The web application URL.
-     * @return A key.
-     */
-    public String getKey(DocumentIdentityMap map, String webappUrl) {
-        ServiceSelector selector = null;
-        DocumentBuilder builder = null;
-        SourceResolver resolver = null;
-        Source source = null;
-        Document document;
-        try {
-            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-            source = resolver.resolveURI("context://");
-            File servletContext = SourceUtil.getFile(source);
-
-            PublicationFactory factory = PublicationFactory.getInstance(getLogger());
-            URLInformation info = new URLInformation(webappUrl);
-            String publicationId = info.getPublicationId();
-            Publication publication = factory.getPublication(publicationId, servletContext
-                    .getAbsolutePath());
-
-            selector = (ServiceSelector) this.manager.lookup(DocumentBuilder.ROLE + "Selector");
-            builder = (DocumentBuilder) selector.select(publication.getDocumentBuilderHint());
-            document = builder.buildDocument(map, publication, webappUrl);
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (selector != null) {
-                if (builder != null) {
-                    selector.release(builder);
-                }
-                this.manager.release(selector);
-            }
-            if (resolver != null) {
-                if (source != null) {
-                    resolver.release(source);
-                }
-                this.manager.release(resolver);
-            }
-        }
-        return getKey(document.getPublication(), document.getArea(), document.getId(), document
-                .getLanguage());
-    }
-
-    /**
-     * @see org.apache.lenya.transaction.IdentifiableFactory#build(org.apache.lenya.transaction.IdentityMap,
-     *      java.lang.String)
-     */
-    public Identifiable build(IdentityMap map, String key) throws Exception {
-
-        if (getLogger().isDebugEnabled())
-            getLogger().debug("DocumentFactory::build() called with key [" + key + "]");
-
-        String[] snippets = key.split(":");
-        String publicationId = snippets[0];
-        String area = snippets[1];
-        String documentId = snippets[2];
-        String language = snippets[3];
-
-        ServiceSelector selector = null;
-        DocumentBuilder builder = null;
-        SourceResolver resolver = null;
-        Source source = null;
-        Document document;
-        try {
-            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-            source = resolver.resolveURI("context://");
-            File servletContext = SourceUtil.getFile(source);
-
-            PublicationFactory factory = PublicationFactory.getInstance(getLogger());
-            Publication publication = factory.getPublication(publicationId, servletContext
-                    .getAbsolutePath());
-
-            selector = (ServiceSelector) this.manager.lookup(DocumentBuilder.ROLE + "Selector");
-            builder = (DocumentBuilder) selector.select(publication.getDocumentBuilderHint());
-            String webappUrl = builder.buildCanonicalUrl(publication, area, documentId, language);
-            document = builder.buildDocument((DocumentIdentityMap) map, publication, webappUrl);
-        } finally {
-            if (selector != null) {
-                if (builder != null) {
-                    selector.release(builder);
-                }
-                this.manager.release(selector);
-            }
-            if (resolver != null) {
-                if (source != null) {
-                    resolver.release(source);
-                }
-                this.manager.release(resolver);
-            }
-        }
-        if (getLogger().isDebugEnabled())
-            getLogger().debug("DocumentFactory::build() done.");
-
-        return document;
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/publication/DocumentIdToPathMapper.java b/src/java/org/apache/lenya/cms/publication/DocumentIdToPathMapper.java
deleted file mode 100644
index 33ab906..0000000
--- a/src/java/org/apache/lenya/cms/publication/DocumentIdToPathMapper.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.publication;
-
-import java.io.File;
-
-/**
- * Document Id to Path mapper interface
- */
-public interface DocumentIdToPathMapper {
-    
-    /**
-     * Compute the document-path for a given publication, area
-     * and document-id. The file separator is the slash (/).
-     *
-     * @param documentId the document-id of the document
-     * @param language the language of the document
-     * 
-     * @return the path to the document, without publication ID and area
-     */
-    String getPath(String documentId, String language);
-
-    /**
-     * Compute the document-path for a given publication, area, 
-     * document-id and language
-     *
-     * @param publication the publication of the document
-     * @param area the area of the document
-     * @param documentId the document-id of the document
-     * @param language the language of the document
-     * 
-     * @return the path to the document
-     */
-    File getFile(Publication publication, String area, String documentId,
-        String language);
-
-    /**
-     * Compute the document-path for a given publication, area and 
-     * document-id. As there are possibly multiple files for the same 
-     * document-id (for different languages) the return value is a directory.
-     *  
-     * @param publication The publication.
-     * @param area The area.
-     * @param documentId The document id.
-     * 
-     * @return The directory where all the files with the same 
-     * document-id are located
-     */
-    File getDirectory(Publication publication, String area, String documentId);
-}
diff --git a/src/java/org/apache/lenya/cms/publication/DocumentIdentityMap.java b/src/java/org/apache/lenya/cms/publication/DocumentIdentityMap.java
deleted file mode 100644
index 9a1bd96..0000000
--- a/src/java/org/apache/lenya/cms/publication/DocumentIdentityMap.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.publication;
-
-import org.apache.avalon.framework.container.ContainerUtil;
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentBuildException;
-import org.apache.lenya.cms.publication.DocumentBuilder;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.transaction.IdentityMapImpl;
-import org.apache.lenya.transaction.IdentifiableFactory;
-
-/**
- * A DocumentIdentityMap avoids the multiple instanciation of a document object.
- * 
- * @version $Id$
- */
-public class DocumentIdentityMap extends IdentityMapImpl {
-
-    /**
-     * Ctor.
-     * @param manager The service manager.
-     * @param logger The logger to use.
-     */
-    public DocumentIdentityMap(ServiceManager manager, Logger logger) {
-        this.manager = manager;
-        enableLogging(logger);
-    }
-
-    /**
-     * @see org.apache.lenya.transaction.IdentityMap#getFactory(java.lang.String)
-     */
-    public IdentifiableFactory getFactory(String type) {
-        IdentifiableFactory factory = super.getFactory(type);
-        if (factory == null && type.equals(Document.TRANSACTIONABLE_TYPE)) {
-            factory = new DocumentFactory(this.manager);
-            ContainerUtil.enableLogging(factory, getLogger());
-            setFactory(type, factory);
-        }
-        return factory;
-    }
-
-    /**
-     * Returns a document.
-     * @param publication The publication.
-     * @param area The area.
-     * @param documentId The document ID.
-     * @param language The language.
-     * @return A document.
-     * @throws DocumentBuildException if an error occurs.
-     */
-    public Document get(Publication publication, String area, String documentId, String language)
-            throws DocumentBuildException {
-
-        if (getLogger().isDebugEnabled())
-            getLogger().debug("DocumentIdentityMap::get() called on publication [" + publication.getId() + "], area [" + area + "], documentId [" + documentId + "], language [" + language + "]");
-
-        DocumentFactory factory = (DocumentFactory) getFactory(Document.TRANSACTIONABLE_TYPE);
-        String key = factory.getKey(publication, area, documentId, language);
-
-        if (getLogger().isDebugEnabled())
-            getLogger().debug("DocumentIdentityMap::get() got key [" + key + "] from DocumentFactory");
-
-        return (Document) get(Document.TRANSACTIONABLE_TYPE, key);
-    }
-
-    /**
-     * Returns the document identified by a certain web application URL.
-     * @param webappUrl The web application URL.
-     * @return A document.
-     * @throws DocumentBuildException if an error occurs.
-     */
-    public Document getFromURL(String webappUrl) throws DocumentBuildException {
-
-        DocumentFactory factory = (DocumentFactory) getFactory(Document.TRANSACTIONABLE_TYPE);
-        String key = factory.getKey(this, webappUrl);
-        return (Document) get(Document.TRANSACTIONABLE_TYPE, key);
-    }
-
-    protected ServiceManager manager;
-
-    /**
-     * Builds a clone of a document for another language.
-     * @param document The document to clone.
-     * @param language The language of the target document.
-     * @return A document.
-     * @throws DocumentBuildException if an error occurs.
-     */
-    public Document getLanguageVersion(Document document, String language)
-            throws DocumentBuildException {
-        return get(document.getPublication(), document.getArea(), document.getId(), language);
-    }
-
-    /**
-     * Builds a clone of a document for another area.
-     * @param document The document to clone.
-     * @param area The area of the target document.
-     * @return A document.
-     * @throws DocumentBuildException if an error occurs.
-     */
-    public Document getAreaVersion(Document document, String area) throws DocumentBuildException {
-        return get(document.getPublication(), area, document.getId(), document.getLanguage());
-    }
-
-    /**
-     * Returns the parent of a document.
-     * @param document A document.
-     * @return A document or <code>null</code> if the document has no parent.
-     * @throws DocumentBuildException if an error occurs.
-     */
-    public Document getParent(Document document) throws DocumentBuildException {
-        Document parent = null;
-        int lastSlashIndex = document.getId().lastIndexOf("/");
-        if (lastSlashIndex > 0) {
-            String parentId = document.getId().substring(0, lastSlashIndex);
-            parent = get(document.getPublication(), document.getArea(), parentId, document
-                    .getLanguage());
-        }
-        return parent;
-    }
-
-    /**
-     * Returns the parent of a document.
-     * @param document A document.
-     * @param defaultDocumentId The document ID to use if the document has no parent.
-     * @return A document.
-     * @throws DocumentBuildException if an error occurs.
-     */
-    public Document getParent(Document document, String defaultDocumentId)
-            throws DocumentBuildException {
-        Document parent = getParent(document);
-        if (parent == null) {
-            parent = get(document.getPublication(), document.getArea(), defaultDocumentId, document
-                    .getLanguage());
-        }
-        return parent;
-    }
-
-    /**
-     * Builds a document for the default language.
-     * @param publication The publication.
-     * @param area The area.
-     * @param documentId The document ID.
-     * @return A document.
-     * @throws DocumentBuildException if an error occurs.
-     */
-    public Document get(Publication publication, String area, String documentId)
-            throws DocumentBuildException {
-        return get(publication, area, documentId, publication.getDefaultLanguage());
-    }
-
-    /**
-     * Checks if a string represents a valid document ID.
-     * @param id The string.
-     * @return A boolean value.
-     */
-    public boolean isValidDocumentId(String id) {
-
-        if (!id.startsWith("/")) {
-            return false;
-        }
-
-        String[] snippets = id.split("/");
-
-        if (snippets.length < 2) {
-            return false;
-        }
-
-        for (int i = 1; i < snippets.length; i++) {
-            if (!snippets[i].matches("[a-zA-Z0-9\\-]+")) {
-                return false;
-            }
-        }
-
-        return true;
-    }
-
-    /**
-     * Checks if a webapp URL represents a document.
-     * @param webappUrl A web application URL.
-     * @return A boolean value.
-     * @throws DocumentBuildException if an error occurs.
-     */
-    public boolean isDocument(String webappUrl) throws DocumentBuildException {
-
-        try {
-            PublicationFactory factory = PublicationFactory.getInstance(getLogger());
-            Publication publication = factory.getPublication(this.manager, webappUrl);
-            if (publication.exists()) {
-
-                ServiceSelector selector = null;
-                DocumentBuilder builder = null;
-                try {
-                    selector = (ServiceSelector) this.manager.lookup(DocumentBuilder.ROLE
-                            + "Selector");
-                    builder = (DocumentBuilder) selector.select(publication
-                            .getDocumentBuilderHint());
-                    return builder.isDocument(publication, webappUrl);
-                } finally {
-                    if (selector != null) {
-                        if (builder != null) {
-                            selector.release(builder);
-                        }
-                        this.manager.release(selector);
-                    }
-                }
-            } else {
-                return false;
-            }
-        } catch (ServiceException e) {
-            throw new DocumentBuildException(e);
-        } catch (PublicationException e) {
-            throw new DocumentBuildException(e);
-        }
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/publication/DocumentManager.java b/src/java/org/apache/lenya/cms/publication/DocumentManager.java
deleted file mode 100644
index 46e76c1..0000000
--- a/src/java/org/apache/lenya/cms/publication/DocumentManager.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.publication;
-
-import java.util.Map;
-import org.apache.lenya.cms.publication.util.DocumentSet;
-
-/**
- * Helper to manage documents. It takes care of attachments etc.
- * 
- * @version $Id$
- */
-public interface DocumentManager {
-
-    /**
-     * The Avalon component role.
-     */
-    String ROLE = DocumentManager.class.getName();
-
-    /**
-     * Copies a document from one location to another location.
-     * @param sourceDocument The document to copy.
-     * @param destinationDocument The destination document.
-     * @throws PublicationException if a document which destinationDocument depends on does not
-     *             exist.
-     */
-    void copy(Document sourceDocument, Document destinationDocument) throws PublicationException;
-
-    /**
-     * Copies a document to another area.
-     * @param sourceDocument The document to copy.
-     * @param destinationArea The destination area.
-     * @throws PublicationException if a document which the destination document depends on does not
-     *             exist.
-     */
-    void copyToArea(Document sourceDocument, String destinationArea) throws PublicationException;
-
-    /**
-     * Copies a document set to another area.
-     * @param documentSet The document set to copy.
-     * @param destinationArea The destination area.
-     * @throws PublicationException if a document which one of the destination documents depends on
-     *             does not exist.
-     */
-    void copyToArea(DocumentSet documentSet, String destinationArea) throws PublicationException;
-
-    /**
-     * Creates a new document in the same publication the <code>parentDocument</code> belongs to
-     * with the given parameters:
-     * 
-     * @param document The document to add.
-     * @param documentType the document type (aka resource type) of the new document
-     * @param navigationTitle navigation title
-     * @param parameters any parameters the caller needs to pass to the creator
-     * 
-     * @throws DocumentBuildException if the document can not be created
-     * @throws PublicationException if the document is already contained.
-     */
-    void add(Document document,
-            DocumentType documentType,
-            String navigationTitle,
-            Map parameters) throws DocumentBuildException, PublicationException;
-
-    /**
-     * Creates a new document in the same publication the <code>parentDocument</code> belongs to
-     * with the given parameters:
-     * 
-     * @param document The document to add.
-     * @param sourceDocument The document to initialize the contents and meta data from.
-     * @param navigationTitle navigation title
-     * @param parameters any parameters the caller needs to pass to the creator
-     * 
-     * @throws DocumentBuildException if the document can not be created
-     * @throws PublicationException if the document is already contained.
-     */
-    void add(Document document,
-            Document sourceDocument,
-            String navigationTitle,
-            Map parameters) throws DocumentBuildException, PublicationException;
-
-    /**
-     * Deletes a document.
-     * @param document The document to delete.
-     * @throws PublicationException when something went wrong.
-     */
-    void delete(Document document) throws PublicationException;
-
-    /**
-     * Moves a document from one location to another.
-     * @param sourceDocument The source document.
-     * @param destinationDocument The destination document.
-     * @throws PublicationException if a document which the destination document depends on does not
-     *             exist.
-     */
-    void move(Document sourceDocument, Document destinationDocument) throws PublicationException;
-
-    /**
-     * Moves a document set from one location to another. A source is moved to the destination of
-     * the same position in the set.
-     * @param sources The source documents.
-     * @param destinations The destination documents.
-     * @throws PublicationException if a document which the destination document depends on does not
-     *             exist.
-     */
-    void move(DocumentSet sources, DocumentSet destinations) throws PublicationException;
-
-    /**
-     * Copies a document set from one location to another. A source is copied to the destination of
-     * the same position in the set.
-     * @param sources The source documents.
-     * @param destinations The destination documents.
-     * @throws PublicationException if a document which the destination document depends on does not
-     *             exist.
-     */
-    void copy(DocumentSet sources, DocumentSet destinations) throws PublicationException;
-    
-    /**
-     * Checks if a document name is valid.
-     * @param documentName The document name.
-     * @return A boolean value.
-     */
-    boolean isValidDocumentName(String documentName);
-
-    /**
-     * Moves a document to another location, incl. all requiring documents. If a sitetree is used,
-     * this means that the whole subtree is moved.
-     * @param source The source document.
-     * @param target The target document.
-     * @throws PublicationException if an error occurs.
-     */
-    void moveAll(Document source, Document target) throws PublicationException;
-
-    /**
-     * Moves all language versions of a document to another location.
-     * @param source The source.
-     * @param target The target.
-     * @throws PublicationException if the documents could not be moved.
-     */
-    void moveAllLanguageVersions(Document source, Document target) throws PublicationException;
-
-    /**
-     * Copies a document to another location, incl. all requiring documents. If a sitetree is used,
-     * this means that the whole subtree is copied.
-     * @param source The source document.
-     * @param target The target document.
-     * @throws PublicationException if an error occurs.
-     */
-    void copyAll(Document source, Document target) throws PublicationException;
-
-    /**
-     * Copies all language versions of a document to another location.
-     * @param source The source.
-     * @param target The target.
-     * @throws PublicationException if the documents could not be copied.
-     */
-    void copyAllLanguageVersions(Document source, Document target) throws PublicationException;
-
-    /**
-     * Deletes a document, incl. all requiring documents. If a sitetree is used, this means that the
-     * whole subtree is deleted.
-     * @param document The document.
-     * @throws PublicationException if an error occurs.
-     */
-    void deleteAll(Document document) throws PublicationException;
-
-    /**
-     * Deletes all language versions of a document.
-     * @param document The document.
-     * @throws PublicationException if the documents could not be copied.
-     */
-    void deleteAllLanguageVersions(Document document) throws PublicationException;
-
-    /**
-     * Deletes a set of documents.
-     * @param documents The documents.
-     * @throws PublicationException if an error occurs.
-     */
-    void delete(DocumentSet documents) throws PublicationException;
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/publication/DocumentManagerImpl.java b/src/java/org/apache/lenya/cms/publication/DocumentManagerImpl.java
deleted file mode 100644
index ccc50b6..0000000
--- a/src/java/org/apache/lenya/cms/publication/DocumentManagerImpl.java
+++ /dev/null
@@ -1,664 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.publication;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.avalon.framework.context.Context;
-import org.apache.avalon.framework.context.ContextException;
-import org.apache.avalon.framework.context.Contextualizable;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.excalibur.source.ModifiableSource;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.lenya.cms.authoring.NodeCreatorInterface;
-import org.apache.lenya.cms.cocoon.source.SourceUtil;
-import org.apache.lenya.cms.metadata.LenyaMetaData;
-import org.apache.lenya.cms.metadata.MetaDataManager;
-import org.apache.lenya.cms.publication.util.DocumentSet;
-import org.apache.lenya.cms.publication.util.DocumentVisitor;
-import org.apache.lenya.cms.site.SiteManager;
-import org.apache.lenya.cms.site.SiteUtil;
-import org.apache.lenya.transaction.Transactionable;
-
-/**
- * DocumentManager implementation.
- * 
- * @version $Id$
- */
-public class DocumentManagerImpl extends AbstractLogEnabled implements DocumentManager,
-        Serviceable, Contextualizable {
-
-    /**
-     * The instance of Document will be built by the implementation of DocumentBuilder; the physical
-     * representation will be built by the implementation of NodeCreatorInterface, where the
-     * implementation to be used is specified in doctypes.xconf (and thus depends on the publication
-     * and the resource type to be used)
-     * 
-     * @see DocumentManager#add(Document, DocumentType, String, Map)
-     * @see org.apache.lenya.cms.authoring.NodeCreatorInterface
-     * @see org.apache.lenya.cms.publication.DocumentBuilder
-     */
-    public void add(Document document,
-            DocumentType documentType,
-            String navigationTitle,
-            Map parameters) throws DocumentBuildException, PublicationException {
-
-        String contentsURI = documentType.getSampleContentLocation();
-        add(document, documentType, navigationTitle, parameters, contentsURI);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.DocumentManager#add(org.apache.lenya.cms.publication.Document,
-     *      org.apache.lenya.cms.publication.Document,
-     *      java.lang.String, java.util.Map)
-     */
-    public void add(Document document,
-            Document sourceDocument,
-            String navigationTitle,
-            Map parameters) throws DocumentBuildException, PublicationException {
-        String contentsURI = sourceDocument.getSourceURI();
-        add(document, sourceDocument.getResourceType(), navigationTitle, parameters, contentsURI);
-        MetaDataManager mgr = document.getMetaDataManager();
-        MetaDataManager srcMgr = sourceDocument.getMetaDataManager();
-        mgr.getLenyaMetaData().replaceBy(srcMgr.getLenyaMetaData());
-        mgr.getDublinCoreMetaData().replaceBy(srcMgr.getDublinCoreMetaData());
-        mgr.getCustomMetaData().replaceBy(srcMgr.getCustomMetaData());
-    }
-
-    /**
-     * Adds a document.
-     * @param document The document.
-     * @param documentType The document type.
-     * @param navigationTitle The navigation title.
-     * @param parameters The parameters for the creator.
-     * @param initialContentsURI A URI to read the contents from.
-     * @throws DocumentBuildException if an error occurs.
-     * @throws DocumentException if an error occurs.
-     * @throws PublicationException if an error occurs.
-     */
-    protected void add(Document document,
-            DocumentType documentType,
-            String navigationTitle,
-            Map parameters,
-            String initialContentsURI) throws DocumentBuildException, DocumentException,
-            PublicationException {
-        try {
-
-            if (getLogger().isDebugEnabled()) {
-                getLogger().debug("Create");
-                getLogger().debug("    document:     [" + document + "]");
-                getLogger().debug("    nav title:    [" + navigationTitle + "]");
-                getLogger().debug("    contents URI: [" + initialContentsURI + "]");
-            }
-
-            // look up creator for documents of this type
-            NodeCreatorInterface creator = documentType.getCreator();
-
-            // now that the source is determined, lock involved nodes
-            Transactionable[] nodes = document.getRepositoryNodes();
-            for (int i = 0; i < nodes.length; i++) {
-                nodes[i].lock();
-            }
-
-            //
-            creator.create(initialContentsURI, document, parameters);
-        } catch (Exception e) {
-            throw new DocumentBuildException("call to creator for new document failed", e);
-        }
-
-        // Write Lenya-internal meta-data
-        Map lenyaMetaData = new HashMap(2);
-        lenyaMetaData.put(LenyaMetaData.ELEMENT_RESOURCE_TYPE, documentType.getName());
-        lenyaMetaData.put(LenyaMetaData.ELEMENT_CONTENT_TYPE, "xml");
-        document.getMetaDataManager().setLenyaMetaData(lenyaMetaData);
-
-        // Notify site manager about new document
-        addToSiteManager(document, navigationTitle);
-    }
-
-    private void addToSiteManager(Document document, String navigationTitle)
-            throws PublicationException {
-        Publication publication = document.getPublication();
-        SiteManager siteManager = null;
-        ServiceSelector selector = null;
-        try {
-            selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
-            siteManager = (SiteManager) selector.select(publication.getSiteManagerHint());
-            if (siteManager.contains(document)) {
-                throw new PublicationException("The document [" + document
-                        + "] is already contained in this publication!");
-            }
-
-            siteManager.add(document);
-            siteManager.setLabel(document, navigationTitle);
-        } catch (final ServiceException e) {
-            throw new PublicationException(e);
-        } finally {
-            if (selector != null) {
-                if (siteManager != null) {
-                    selector.release(siteManager);
-                }
-                this.manager.release(selector);
-            }
-        }
-    }
-
-    /**
-     * Template method to copy a document. Override {@link #copyDocumentSource(Document, Document)}
-     * to implement access to a custom repository.
-     * @see org.apache.lenya.cms.publication.DocumentManager#copy(org.apache.lenya.cms.publication.Document,
-     *      org.apache.lenya.cms.publication.Document)
-     */
-    public void copy(Document sourceDocument, Document destinationDocument)
-            throws PublicationException {
-
-        Publication publication = sourceDocument.getPublication();
-        copyDocumentSource(sourceDocument, destinationDocument);
-
-        ResourcesManager resourcesManager = null;
-        SiteManager siteManager = null;
-        ServiceSelector selector = null;
-        try {
-            resourcesManager = (ResourcesManager) this.manager.lookup(ResourcesManager.ROLE);
-            resourcesManager.copyResources(sourceDocument, destinationDocument);
-            selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
-            siteManager = (SiteManager) selector.select(publication.getSiteManagerHint());
-            siteManager.copy(sourceDocument, destinationDocument);
-        } catch (Exception e) {
-            throw new PublicationException(e);
-        } finally {
-            if (resourcesManager != null) {
-                this.manager.release(resourcesManager);
-            }
-            if (selector != null) {
-                if (siteManager != null) {
-                    selector.release(siteManager);
-                }
-                this.manager.release(selector);
-            }
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.DocumentManager#delete(org.apache.lenya.cms.publication.Document)
-     */
-    public void delete(Document document) throws PublicationException {
-        if (!document.exists()) {
-            throw new PublicationException("Document [" + document + "] does not exist!");
-        }
-
-        SiteManager siteManager = null;
-        ServiceSelector selector = null;
-        ResourcesManager resourcesManager = null;
-        try {
-            resourcesManager = (ResourcesManager) this.manager.lookup(ResourcesManager.ROLE);
-            resourcesManager.deleteResources(document);
-
-            Publication publication = document.getPublication();
-            selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
-            siteManager = (SiteManager) selector.select(publication.getSiteManagerHint());
-            siteManager.delete(document);
-
-            document.delete();
-        } catch (Exception e) {
-            throw new PublicationException(e);
-        } finally {
-            if (resourcesManager != null) {
-                this.manager.release(resourcesManager);
-            }
-            if (selector != null) {
-                if (siteManager != null) {
-                    selector.release(siteManager);
-                }
-                this.manager.release(selector);
-            }
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.DocumentManager#move(org.apache.lenya.cms.publication.Document,
-     *      org.apache.lenya.cms.publication.Document)
-     */
-    public void move(Document sourceDocument, Document destinationDocument)
-            throws PublicationException {
-        copy(sourceDocument, destinationDocument);
-
-        ResourcesManager resourcesManager = null;
-        try {
-            resourcesManager = (ResourcesManager) this.manager.lookup(ResourcesManager.ROLE);
-            resourcesManager.copyResources(sourceDocument, destinationDocument);
-            resourcesManager.deleteResources(sourceDocument);
-        } catch (Exception e) {
-            throw new PublicationException(e);
-        } finally {
-            if (resourcesManager != null) {
-                this.manager.release(resourcesManager);
-            }
-        }
-
-        delete(sourceDocument);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.DocumentManager#copyToArea(org.apache.lenya.cms.publication.Document,
-     *      java.lang.String)
-     */
-    public void copyToArea(Document sourceDocument, String destinationArea)
-            throws PublicationException {
-        Document destinationDocument = sourceDocument.getIdentityMap()
-                .getAreaVersion(sourceDocument, destinationArea);
-        copy(sourceDocument, destinationDocument);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.DocumentManager#copyToArea(org.apache.lenya.cms.publication.util.DocumentSet,
-     *      java.lang.String)
-     */
-    public void copyToArea(DocumentSet documentSet, String destinationArea)
-            throws PublicationException {
-        Document[] documents = documentSet.getDocuments();
-        for (int i = 0; i < documents.length; i++) {
-            copyToArea(documents[i], destinationArea);
-        }
-    }
-
-    protected ServiceManager manager;
-
-    /**
-     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service(ServiceManager _manager) throws ServiceException {
-        this.manager = _manager;
-    }
-
-    private Context context;
-
-    /**
-     * @see org.apache.avalon.framework.context.Contextualizable#contextualize(org.apache.avalon.framework.context.Context)
-     */
-    public void contextualize(Context _context) throws ContextException {
-        this.context = _context;
-    }
-
-    /**
-     * @return The Avalon context.
-     */
-    protected Context getContext() {
-        return this.context;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.DocumentManager#isValidDocumentName(java.lang.String)
-     */
-    public boolean isValidDocumentName(String documentName) {
-        return !documentName.equals("") && documentName.indexOf("/") < 0;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.DocumentManager#moveAll(org.apache.lenya.cms.publication.Document,
-     *      org.apache.lenya.cms.publication.Document)
-     */
-    public void moveAll(Document source, Document target) throws PublicationException {
-        copyAll(source, target);
-        deleteAll(source);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.DocumentManager#moveAllLanguageVersions(org.apache.lenya.cms.publication.Document,
-     *      org.apache.lenya.cms.publication.Document)
-     */
-    public void moveAllLanguageVersions(Document source, Document target)
-            throws PublicationException {
-        copyAllLanguageVersions(source, target);
-        deleteAllLanguageVersions(source);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.DocumentManager#copyAll(org.apache.lenya.cms.publication.Document,
-     *      org.apache.lenya.cms.publication.Document)
-     */
-    public void copyAll(Document source, Document target) throws PublicationException {
-
-        SiteManager siteManager = null;
-        ServiceSelector selector = null;
-        try {
-            selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
-            siteManager = (SiteManager) selector.select(source.getPublication()
-                    .getSiteManagerHint());
-
-            Document[] descendantsArray = siteManager.getRequiringResources(source);
-            DocumentSet descendants = new DocumentSet(descendantsArray);
-            descendants.add(source);
-            siteManager.sortAscending(descendants);
-
-            DocumentVisitor visitor = new CopyVisitor(this, source, target);
-            descendants.visit(visitor);
-        } catch (ServiceException e) {
-            throw new PublicationException(e);
-        } finally {
-            if (selector != null) {
-                if (siteManager != null) {
-                    selector.release(siteManager);
-                }
-                this.manager.release(selector);
-            }
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.DocumentManager#copyAllLanguageVersions(org.apache.lenya.cms.publication.Document,
-     *      org.apache.lenya.cms.publication.Document)
-     */
-    public void copyAllLanguageVersions(Document source, Document target)
-            throws PublicationException {
-        DocumentIdentityMap identityMap = source.getIdentityMap();
-        String[] languages = source.getLanguages();
-        for (int i = 0; i < languages.length; i++) {
-
-            Document sourceVersion = identityMap.getLanguageVersion(source, languages[i]);
-            Document targetVersion = identityMap.get(target.getPublication(),
-                    target.getArea(),
-                    target.getId(),
-                    languages[i]);
-            copy(sourceVersion, targetVersion);
-        }
-    }
-
-    /**
-     * Copies a document source.
-     * @param sourceDocument The source document.
-     * @param destinationDocument The destination document.
-     * @throws PublicationException when something went wrong.
-     */
-    public void copyDocumentSource(Document sourceDocument, Document destinationDocument)
-            throws PublicationException {
-
-        SourceResolver sourceResolver = null;
-        Source source = null;
-        Source destination = null;
-        try {
-            sourceResolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-            source = sourceResolver.resolveURI(sourceDocument.getSourceURI());
-            destination = sourceResolver.resolveURI(destinationDocument.getSourceURI());
-            SourceUtil.copy(source, (ModifiableSource) destination, true);
-
-            destinationDocument.getMetaDataManager().replaceMetaData(sourceDocument
-                    .getMetaDataManager());
-
-        } catch (Exception e) {
-            throw new PublicationException(e);
-        } finally {
-            if (sourceResolver != null) {
-                if (source != null) {
-                    sourceResolver.release(source);
-                }
-                if (destination != null) {
-                    sourceResolver.release(destination);
-                }
-                this.manager.release(sourceResolver);
-            }
-        }
-    }
-
-    /**
-     * Abstract base class for document visitors which operate on a source and target document.
-     */
-    public abstract class SourceTargetVisitor implements DocumentVisitor {
-
-        private Document rootSource;
-        private Document rootTarget;
-        private DocumentManager manager;
-
-        /**
-         * Ctor.
-         * @param manager The document manager.
-         * @param source The root source.
-         * @param target The root target.
-         */
-        public SourceTargetVisitor(DocumentManager manager, Document source, Document target) {
-            this.manager = manager;
-            this.rootSource = source;
-            this.rootTarget = target;
-        }
-
-        /**
-         * @return the root source
-         */
-        protected Document getRootSource() {
-            return rootSource;
-        }
-
-        /**
-         * @return the root target
-         */
-        protected Document getRootTarget() {
-            return rootTarget;
-        }
-
-        /**
-         * @return the document manager
-         */
-        protected DocumentManager getDocumentManager() {
-            return this.manager;
-        }
-
-        /**
-         * Returns the target corresponding to a source relatively to the root target document.
-         * @param source The source.
-         * @return A document.
-         * @throws DocumentBuildException if the target could not be built.
-         */
-        protected Document getTarget(Document source) throws DocumentBuildException {
-            String rootSourceId = getRootSource().getId();
-            String rootTargetId = getRootTarget().getId();
-            String childId = source.getId().substring(rootSourceId.length());
-            String targetId = rootTargetId + childId;
-            return getRootTarget().getIdentityMap().get(getRootTarget().getPublication(),
-                    getRootTarget().getArea(),
-                    targetId,
-                    source.getLanguage());
-        }
-    }
-
-    /**
-     * DocumentVisitor to copy documents.
-     */
-    public class CopyVisitor extends SourceTargetVisitor {
-
-        /**
-         * Ctor.
-         * @param manager The document manager.
-         * @param source The root source.
-         * @param target The root target.
-         */
-        public CopyVisitor(DocumentManager manager, Document source, Document target) {
-            super(manager, source, target);
-        }
-
-        /**
-         * @see org.apache.lenya.cms.publication.util.DocumentVisitor#visitDocument(org.apache.lenya.cms.publication.Document)
-         */
-        public void visitDocument(Document source) throws PublicationException {
-            Document target = getTarget(source);
-            getDocumentManager().copyAllLanguageVersions(source, target);
-        }
-
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.DocumentManager#deleteAll(org.apache.lenya.cms.publication.Document)
-     */
-    public void deleteAll(Document document) throws PublicationException {
-
-        SiteManager siteManager = null;
-        ServiceSelector selector = null;
-        try {
-            selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
-            siteManager = (SiteManager) selector.select(document.getPublication()
-                    .getSiteManagerHint());
-
-            Document[] descendantsArray = siteManager.getRequiringResources(document);
-            DocumentSet descendants = new DocumentSet(descendantsArray);
-            descendants.add(document);
-            delete(descendants);
-        } catch (ServiceException e) {
-            throw new PublicationException(e);
-        } finally {
-            if (selector != null) {
-                if (siteManager != null) {
-                    selector.release(siteManager);
-                }
-                this.manager.release(selector);
-            }
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.DocumentManager#deleteAllLanguageVersions(org.apache.lenya.cms.publication.Document)
-     */
-    public void deleteAllLanguageVersions(Document document) throws PublicationException {
-        DocumentIdentityMap identityMap = document.getIdentityMap();
-        String[] languages = document.getLanguages();
-        for (int i = 0; i < languages.length; i++) {
-            Document version = identityMap.getLanguageVersion(document, languages[i]);
-            delete(version);
-        }
-    }
-
-    /**
-     * Visitor to delete documents.
-     */
-    public class DeleteVisitor implements DocumentVisitor {
-
-        private DocumentManager manager;
-
-        /**
-         * Ctor.
-         * @param manager The document manager.
-         */
-        public DeleteVisitor(DocumentManager manager) {
-            this.manager = manager;
-        }
-
-        protected DocumentManager getDocumentManager() {
-            return this.manager;
-        }
-
-        /**
-         * @see org.apache.lenya.cms.publication.util.DocumentVisitor#visitDocument(org.apache.lenya.cms.publication.Document)
-         */
-        public void visitDocument(Document document) throws PublicationException {
-            getDocumentManager().deleteAllLanguageVersions(document);
-        }
-
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.DocumentManager#delete(org.apache.lenya.cms.publication.util.DocumentSet)
-     */
-    public void delete(DocumentSet documents) throws PublicationException {
-
-        if (documents.isEmpty()) {
-            return;
-        }
-
-        SiteManager siteManager = null;
-        ServiceSelector selector = null;
-        try {
-            selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
-            Publication pub = documents.getDocuments()[0].getPublication();
-            siteManager = (SiteManager) selector.select(pub.getSiteManagerHint());
-
-            DocumentSet set = new DocumentSet(documents.getDocuments());
-            siteManager.sortAscending(set);
-            set.reverse();
-
-            DocumentVisitor visitor = new DeleteVisitor(this);
-            set.visit(visitor);
-        } catch (ServiceException e) {
-            throw new PublicationException(e);
-        } finally {
-            if (selector != null) {
-                if (siteManager != null) {
-                    selector.release(siteManager);
-                }
-                this.manager.release(selector);
-            }
-        }
-
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.DocumentManager#move(org.apache.lenya.cms.publication.util.DocumentSet,
-     *      org.apache.lenya.cms.publication.util.DocumentSet)
-     */
-    public void move(DocumentSet sources, DocumentSet destinations) throws PublicationException {
-        Document[] sourceDocs = sources.getDocuments();
-        Document[] targetDocs = destinations.getDocuments();
-
-        if (sourceDocs.length != targetDocs.length) {
-            throw new PublicationException(
-                    "The number of source and destination documents must be equal!");
-        }
-
-        Map source2target = new HashMap();
-        for (int i = 0; i < sourceDocs.length; i++) {
-            source2target.put(sourceDocs[i], targetDocs[i]);
-        }
-
-        DocumentSet sortedSources = new DocumentSet(sourceDocs);
-        SiteUtil.sortAscending(this.manager, sortedSources);
-        Document[] sortedSourceDocs = sortedSources.getDocuments();
-
-        for (int i = 0; i < sortedSourceDocs.length; i++) {
-            move(sortedSourceDocs[i], (Document) source2target.get(sortedSourceDocs[i]));
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.DocumentManager#copy(org.apache.lenya.cms.publication.util.DocumentSet,
-     *      org.apache.lenya.cms.publication.util.DocumentSet)
-     */
-    public void copy(DocumentSet sources, DocumentSet destinations) throws PublicationException {
-        Document[] sourceDocs = sources.getDocuments();
-        Document[] targetDocs = destinations.getDocuments();
-
-        if (sourceDocs.length != targetDocs.length) {
-            throw new PublicationException(
-                    "The number of source and destination documents must be equal!");
-        }
-
-        Map source2target = new HashMap();
-        for (int i = 0; i < sourceDocs.length; i++) {
-            source2target.put(sourceDocs[i], targetDocs[i]);
-        }
-
-        DocumentSet sortedSources = new DocumentSet(sourceDocs);
-        SiteUtil.sortAscending(this.manager, sortedSources);
-        Document[] sortedSourceDocs = sortedSources.getDocuments();
-
-        for (int i = 0; i < sortedSourceDocs.length; i++) {
-            copy(sortedSourceDocs[i], (Document) source2target.get(sortedSourceDocs[i]));
-        }
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/publication/DocumentType.java b/src/java/org/apache/lenya/cms/publication/DocumentType.java
deleted file mode 100644
index c063d2f..0000000
--- a/src/java/org/apache/lenya/cms/publication/DocumentType.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.publication;
-
-import org.apache.avalon.framework.container.ContainerUtil;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.logger.Logger;
-
-import org.apache.lenya.cms.authoring.NodeCreatorInterface;
-
-
-/**
- * <p>
- * Represents a resource type (formerly known as document type)
- * which is usually configured in the file <code>doctypes.xconf</code>.
- * </p>
- * 
- * <p>
- * Has no behaviour but only holds:
- * </p>
- * <ul>
- * <li>the name of the resource type (xhtml, rss, ...)</li>
- * <li>the linkAttributeXPaths</li>
- * <li>the location of a template used to instantiate new resources of this type</li>
- * <li>the schema defintion for the ressource type</li>
- * <li>the workflow file</li>
- * <li>the NodeCreatorInterface which is used to create a new
- *   document with this doctype</li>
- * </ul>
- * 
- * <p>Instances of DocumentType are instantiated by a {@link DocumentTypeBuilder}.</p>
- * 
- */
-public class DocumentType extends AbstractLogEnabled {
-    /**
-     * <code>NAMESPACE</code> The doctypes namespace
-     */
-    public static final String NAMESPACE = "http://apache.org/cocoon/lenya/doctypes/1.0";
-    /**
-     * <code>DEFAULT_PREFIX</code> The doctypes namespace prefix
-     */
-    public static final String DEFAULT_PREFIX = "dt";
-
-    /** Creates a new instance of DocumentType
-     * 
-     * @param _name the name of the document type
-     * @param _logger a logger
-     */
-    protected DocumentType(String _name, Logger _logger) {
-        assert _name != null;
-
-        ContainerUtil.enableLogging(this, _logger);
-        this.name = _name;
-
-        if (getLogger().isDebugEnabled())
-            getLogger().debug("DocumentType() constructed with"
-              + "\n\t name [" + name + "]"
-		);
-    }
-
-    private String name;
-
-    /**
-    * Returns the name of this document type.
-     * @return A string value.
-     */
-    public String getName() {
-        return this.name;
-    }
-
-    private String schemaDefinition;
-    
-	/**
-	 * @return Returns the path to the RelaxNG schema file
-	 * for this resource type
-	 */
-	public String getSchemaDefinition() {
-        if (this.schemaDefinition == null) {
-            throw new IllegalStateException("No schema assigned to resource type [" + getName() + "]");
-        }
-		return schemaDefinition;
-	}
-    
-    /**
-     * @return The source URI of the RelaxNG schema.
-     */
-    public String getSchemaDefinitionSourceURI() {
-        return "fallback://lenya/resources/schemas/" + getSchemaDefinition();
-    }
-    
-	/**
-	 * @param schemaDefinition The path to the RelaxNG schema
-	 * definition file
-	 */
-	public void setSchemaDefinition(String schemaDefinition) {
-		this.schemaDefinition = schemaDefinition;
-	}
-    
-    
-    private NodeCreatorInterface creator = null;
-
-    /**
-     * Get the creator for this document type.
-     * @return a <code>NodeCreatorInterface</code>
-     */
-    public NodeCreatorInterface getCreator() {
-        return this.creator;
-    }
-
-    /**
-     * Set the creator
-     * @param _creator a <code>NodeCreatorInterface</code>
-     */
-    protected void setCreator(NodeCreatorInterface _creator) {
-        assert _creator != null;
-        this.creator = _creator;
-    }
-
-    private String[] linkAttributeXPaths = { };
-
-    /**
-     * Returns an array of XPaths representing attributes to be rewritten
-     * when a document URL has changed.
-     * @return An array of strings.
-     */
-    public String[] getLinkAttributeXPaths() {
-        return this.linkAttributeXPaths;
-    }
-    
-    /**
-     * Sets the link attribute XPath values.
-     * @param xPaths An array of strings.
-     */
-    public void setLinkAttributeXPaths(String[] xPaths) {
-        this.linkAttributeXPaths = xPaths;
-    }
-
-
-    private String sampleContentLocation;
-
-    /**
-    * Returns the location of sample contents for this type
-     * @return A string value.
-     */
-    public String getSampleContentLocation() {
-        return this.sampleContentLocation;
-    }
-
-    /**
-    * Set the location of sample contents for this type
-     * @param _location the location
-     */
-    public void setSampleContentLocation(String _location) {
-        this.sampleContentLocation = _location;
-    }
-
-
-    /**
-     * @see java.lang.Object#toString()
-     */
-    public String toString() {
-        return getName();
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/publication/DocumentTypeBuildException.java b/src/java/org/apache/lenya/cms/publication/DocumentTypeBuildException.java
deleted file mode 100644
index b608d09..0000000
--- a/src/java/org/apache/lenya/cms/publication/DocumentTypeBuildException.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.publication;
-
-/**
- * Document type build exception
- */
-public class DocumentTypeBuildException extends Exception {
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/**
-     * Constructor
-     */
-    public DocumentTypeBuildException() {
-        super();
-    }
-
-    /**
-     * Creates a new DocumentTypeBuildException.
-     * @param message the exception message
-     */
-    public DocumentTypeBuildException(String message) {
-        super(message);
-    }
-
-    /**
-     * Creates a new DocumentTypeBuildException.
-     * @param message the exception message
-     * @param cause the cause of the exception
-     */
-    public DocumentTypeBuildException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    /**
-     * Creates a new DocumentTypeBuildException.
-     * @param cause the cause of the exception
-     */
-    public DocumentTypeBuildException(Throwable cause) {
-        super(cause);
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/publication/DocumentTypeBuilder.java b/src/java/org/apache/lenya/cms/publication/DocumentTypeBuilder.java
deleted file mode 100644
index 4e942ca..0000000
--- a/src/java/org/apache/lenya/cms/publication/DocumentTypeBuilder.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.publication;
-
-
-/**
- * Interface for a builder that builds {@link DocumentType} objects.
- *
- * Note that the term "document types" is deprecated, and
- * will be replaced by the term "resource types" in the future.
- * 
- * @version $Id$
- */
-public interface DocumentTypeBuilder {
-
-    /**
-     * The Avalon role.
-     */
-    String ROLE = DocumentTypeBuilder.class.getName();
-    
-    /**
-     * Builds a document type for a given name.
-     * @param name A string value.
-     * @param publication The publication the document type belongs to.
-     * @return A document type object.
-     * @throws DocumentTypeBuildException When something went wrong.
-     */
-    public DocumentType buildDocumentType(String name, Publication publication)
-        throws DocumentTypeBuildException;
-
-}
diff --git a/src/java/org/apache/lenya/cms/publication/DocumentTypeBuilderImpl.java b/src/java/org/apache/lenya/cms/publication/DocumentTypeBuilderImpl.java
deleted file mode 100644
index a8bb763..0000000
--- a/src/java/org/apache/lenya/cms/publication/DocumentTypeBuilderImpl.java
+++ /dev/null
@@ -1,317 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.publication;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.List;
-
-import org.apache.avalon.excalibur.pool.Poolable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.lenya.cms.authoring.DefaultBranchCreator;
-import org.apache.lenya.cms.authoring.NodeCreatorInterface;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-/**
- * Avalon Service for building an instance of {@link DocumentType}using information from the
- * <code>doctypes.xconf</code> configuration file.
- * 
- * <p>
- * Since this service is very frequently used, it is implemented as a poolable service.
- * </p>
- * <p>
- * Furthermore, the instances are cached, to avoid re-reading configuration unless the configuration
- * file has changed.
- * </p>
- * 
- * @version $Id$
- */
-public final class DocumentTypeBuilderImpl extends AbstractLogEnabled implements
-        DocumentTypeBuilder, Serviceable, Poolable {
-
-    /** Creates a new instance of DocumentTypeBuilder */
-    public DocumentTypeBuilderImpl() {
-        // do nothing
-    }
-
-    /**
-     * <code>CONFIG_FILE</code> The default document types configuration file, relative to the
-     * publication directory.
-     */
-    public static final String CONFIG_FILE = "doctype.xconf";
-    /**
-     * <code>DOCTYPES_ELEMENT</code> The doctypes element
-     */
-    public static final String DOCTYPES_ELEMENT = "doctypes";
-    /**
-     * <code>DOCTYPE_ELEMENT</code> The doctype element
-     */
-    public static final String DOCTYPE_ELEMENT = "doc";
-    /**
-     * <code>TYPE_ATTRIBUTE</code> The type attribute
-     */
-    public static final String TYPE_ATTRIBUTE = "type";
-    /**
-     * <code>SCHEMA_ELEMENT</code> The RelaxNG schema element
-     */
-    public static final String SCHEMA_ELEMENT = "schema";
-    /**
-     * <code>CREATOR_ELEMENT</code> The creator element
-     */
-    public static final String CREATOR_ELEMENT = "creator";
-    /**
-     * <code>SRC_ATTRIBUTE</code> The src attribute
-     */
-    public static final String SRC_ATTRIBUTE = "src";
-    /**
-     * <code>ELEMENT_REWRITE_ATTRIBUTE</code> The link-attribute element.
-     */
-    public static final String ELEMENT_REWRITE_ATTRIBUTE = "link-attribute";
-    /**
-     * <code>ATTRIBUTE_XPATH</code> The xpath attribute.
-     */
-    public static final String ATTRIBUTE_XPATH = "xpath";
-
-    /**
-     * <code>SAMPLE_NAME</code> The sample name parameter
-     */
-    public static final String SAMPLE_NAME = "sample-name";
-
-    /**
-     * Builds an instance of document type for a given resource type name.
-     * 
-     * @param name The name of the resource type
-     * @param publication The publication the document type belongs to.
-     * @return A document type object.
-     * @throws DocumentTypeBuildException When something went wrong.
-     */
-    public DocumentType buildDocumentType(String name, Publication publication)
-            throws DocumentTypeBuildException {
-
-        if (publication == null)
-            throw new DocumentTypeBuildException("illegal usage, publication is null");
-
-        // see if configuration has changed since last load.
-        // if it has, do not use cache.
-
-        // this will refer to the returned instance
-        DocumentType type = null;
-
-        String configUri = "fallback://lenya/doctypes/" + name + "/doctype.xconf";
-
-        Source configSource = null;
-        SourceResolver resolver = null;
-        try {
-            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-            configSource = resolver.resolveURI(configUri);
-
-            boolean useCache = isEntryUptodate(confLastModifiedCache,
-                    publication.getId(),
-                    configSource.getLastModified());
-
-            if (useCache) {
-                // try to get an instance from cache
-                type = docTypeCache.get(publication.getId(), name);
-            }
-
-            if (getLogger().isDebugEnabled())
-                getLogger().debug("buildDocumentType() called with name [" + name
-                        + "], publication.getId [" + publication.getId() + "], lookInCache ["
-                        + useCache + "], is in cache [" + (type != null) + "]");
-
-            if (type == null) {
-
-                // create a new instance of DocumentType
-                type = new DocumentType(name, getLogger());
-
-                try {
-                    // retrieve configuration for this publication
-                    Configuration doctypeConf = getDocTypeConfiguration(configSource, publication);
-
-                    Configuration schemaConf = doctypeConf.getChild(SCHEMA_ELEMENT, false);
-
-                    if (schemaConf != null) {
-                        String schemaFileName = schemaConf.getAttribute(SRC_ATTRIBUTE);
-                        type.setSchemaDefinition(schemaFileName);
-                    }
-
-                    NodeCreatorInterface creator;
-                    Configuration creatorConf = doctypeConf.getChild(CREATOR_ELEMENT, false);
-
-                    if (creatorConf != null) {
-                        String creatorClassName = creatorConf.getAttribute(SRC_ATTRIBUTE);
-                        Class creatorClass = Class.forName(creatorClassName);
-                        creator = (NodeCreatorInterface) creatorClass.newInstance();
-                        creator.init(creatorConf, manager, getLogger());
-                    } else {
-                        creator = new DefaultBranchCreator();
-                    }
-
-                    type.setCreator(creator);
-
-                    // determine the sample content location.
-                    if (creatorConf != null) {
-                        Configuration sampleConf = creatorConf.getChild(SAMPLE_NAME, false);
-                        if (sampleConf != null) {
-                            String sampleLocation = sampleConf.getValue();
-                            type.setSampleContentLocation("fallback://lenya/doctypes/" + name
-                                    + "/samples/" + sampleLocation);
-                        }
-                    }
-
-                    Configuration[] rewriteAttributeConfigs = doctypeConf
-                            .getChildren(ELEMENT_REWRITE_ATTRIBUTE);
-                    List xPaths = new ArrayList();
-                    for (int i = 0; i < rewriteAttributeConfigs.length; i++) {
-                        String xPath = rewriteAttributeConfigs[i].getAttribute(ATTRIBUTE_XPATH);
-                        xPaths.add(xPath);
-                    }
-                    String[] xPathArray = (String[]) xPaths.toArray(new String[xPaths.size()]);
-                    type.setLinkAttributeXPaths(xPathArray);
-
-                    docTypeCache.add(publication.getId(), name, type);
-
-                } catch (final Exception e) {
-                    throw new DocumentTypeBuildException(e);
-                }
-            }
-
-        } catch (Exception e) {
-            throw new DocumentTypeBuildException(e);
-        } finally {
-            if (resolver != null) {
-                if (configSource != null) {
-                    resolver.release(configSource);
-                }
-                this.manager.release(resolver);
-            }
-        }
-
-        return type;
-    }
-
-    // for each publication key, stores a hash of docType objects
-    private DocTypeCache docTypeCache = new DocTypeCache();
-
-    private Hashtable confCache = new Hashtable();
-    private Hashtable confLastModifiedCache = new Hashtable();
-
-    private Configuration getDocTypeConfiguration(Source source, Publication _publication)
-            throws DocumentTypeBuildException, SAXException, IOException, ConfigurationException {
-
-        Object conf = confCache.get(_publication.getId());
-
-        if (getLogger().isDebugEnabled())
-            getLogger().debug("getDocTypeConfiguration() for publication [" + _publication.getId()
-                    + "], conf in cache ? " + (conf != null));
-
-        if (!source.exists())
-            throw new DocumentTypeBuildException("configuration file [" + source.getURI()
-                    + "] for publication [" + _publication.getId() + "] does not exist");
-
-        if (conf == null
-                || !isEntryUptodate(confLastModifiedCache, _publication.getId(), source
-                        .getLastModified())) {
-
-            // load / reload the configuration from file
-            if (getLogger().isDebugEnabled())
-                getLogger()
-                        .debug("getDocTypeConfiguration() reloading configuration for publication ["
-                                + _publication.getId() + "]");
-
-            conf = new DefaultConfigurationBuilder()
-                    .build(new InputSource(source.getInputStream()));
-            // put in cache
-            confCache.put(_publication.getId(), conf);
-            confLastModifiedCache.put(_publication.getId(), new Long(source.getLastModified()));
-        }
-
-        return (Configuration) conf;
-    }
-
-    private boolean isEntryUptodate(Hashtable entryTimestamps, String key, long timestamp) {
-
-        boolean isUptodate = false;
-        Object lastModifiedEntry = entryTimestamps.get(key);
-        if (lastModifiedEntry != null) {
-            long oldTimestamp = ((Long) lastModifiedEntry).longValue();
-            if (timestamp <= oldTimestamp)
-                isUptodate = true;
-
-            if (getLogger().isDebugEnabled())
-                getLogger().debug("isEntryUptodate() called for key [" + key + "] and timestamp ["
-                        + timestamp + "], current timestamp is [" + timestamp + "], returning "
-                        + isUptodate);
-
-        } else {
-            if (getLogger().isDebugEnabled())
-                getLogger().debug("isEntryUptodate() has no previous entry, returning ["
-                        + isUptodate);
-        }
-
-        return isUptodate;
-    }
-
-    protected ServiceManager manager;
-
-    /**
-     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service(ServiceManager manager) throws ServiceException {
-        this.manager = manager;
-    }
-
-    private class DocTypeCache {
-
-        // for each publication key, stores a hash of docType objects
-        private Hashtable cache = new Hashtable();
-
-        void add(String publicationId, String docTypeName, DocumentType type) {
-            Object docTypes = cache.get(publicationId);
-            if (docTypes == null) {
-                Hashtable docTypesTable = new Hashtable();
-                docTypesTable.put(docTypeName, type);
-                cache.put(publicationId, docTypesTable);
-            } else {
-                Hashtable docTypesTable = (Hashtable) docTypes;
-                docTypesTable.put(docTypeName, type);
-            }
-        }
-
-        DocumentType get(String publicationId, String docTypeName) {
-            DocumentType ret = null;
-            Object docTypes = cache.get(publicationId);
-            if (docTypes != null) {
-                Hashtable docTypesTable = (Hashtable) docTypes;
-                ret = (DocumentType) docTypesTable.get(docTypeName);
-            }
-            return ret;
-        }
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/publication/IdentityDocumentIdToPathMapper.java b/src/java/org/apache/lenya/cms/publication/IdentityDocumentIdToPathMapper.java
deleted file mode 100644
index b87f01d..0000000
--- a/src/java/org/apache/lenya/cms/publication/IdentityDocumentIdToPathMapper.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.publication;
-
-import java.io.File;
-
-/**
- * Identity Document Id to path mapper
- */
-public class IdentityDocumentIdToPathMapper implements DocumentIdToPathMapper {
-
-    /**
-     * @see org.apache.lenya.cms.publication.DocumentIdToPathMapper#getFile(org.apache.lenya.cms.publication.Publication, java.lang.String, java.lang.String, java.lang.String)
-     */
-    public File getFile(Publication publication, String area, String documentId, String language) {
-        File areaDirectory =
-            new File(publication.getDirectory(), Publication.CONTENT_PATH + File.separator + area);
-        File file = new File(areaDirectory, getPath(documentId, language));
-        return file;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.DocumentIdToPathMapper#getDirectory(org.apache.lenya.cms.publication.Publication, java.lang.String, java.lang.String)
-     */
-    public File getDirectory(Publication publication, String area, String documentId) {
-        return getFile(publication, area, documentId, null).getParentFile();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.DocumentIdToPathMapper#getPath(java.lang.String, java.lang.String)
-     */
-    public String getPath(String documentId, String language) {
-        assert documentId.startsWith("/");
-        // remove leading slash
-        documentId = documentId.substring(1);
-        return documentId + getSuffix(language);
-    }
-
-    /**
-     * Constructs the filename for a given language.
-     * @param language The language.
-     * @return A string value.
-     */
-    protected String getSuffix(String language) {
-        String languageSuffix = "";
-        if (language != null && !"".equals(language)) {
-            languageSuffix = "_" + language;
-        }
-        return languageSuffix + ".xml";
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/publication/PageEnvelope.java b/src/java/org/apache/lenya/cms/publication/PageEnvelope.java
deleted file mode 100644
index d2c74cc..0000000
--- a/src/java/org/apache/lenya/cms/publication/PageEnvelope.java
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.publication;
-
-import java.io.File;
-
-import org.apache.avalon.framework.logger.ConsoleLogger;
-import org.apache.cocoon.environment.Request;
-import org.apache.lenya.cms.rc.RCEnvironment;
-
-/**
- * A page envelope carries a set of information that are needed during the presentation of a
- * document.
- */
-public class PageEnvelope {
-    /**
-     * The names of the page envelope parameters.
-     */
-    public static final String[] PARAMETER_NAMES = { PageEnvelope.AREA, PageEnvelope.CONTEXT,
-            PageEnvelope.PUBLICATION_ID, PageEnvelope.PUBLICATION,
-            PageEnvelope.PUBLICATION_LANGUAGES_CSV, PageEnvelope.DOCUMENT,
-            PageEnvelope.DOCUMENT_ID, PageEnvelope.DOCUMENT_NAME, PageEnvelope.DOCUMENT_LABEL,
-            PageEnvelope.DOCUMENT_URL, PageEnvelope.DOCUMENT_URL_WITHOUT_LANGUAGE,
-            PageEnvelope.DOCUMENT_PATH, PageEnvelope.DOCUMENT_EXTENSION,
-            PageEnvelope.DOCUMENT_TYPE, PageEnvelope.DEFAULT_LANGUAGE,
-            PageEnvelope.DOCUMENT_LANGUAGE, PageEnvelope.DOCUMENT_LANGUAGES,
-            PageEnvelope.DOCUMENT_LANGUAGES_CSV, PageEnvelope.DOCUMENT_LASTMODIFIED,
-            PageEnvelope.BREADCRUMB_PREFIX, PageEnvelope.SSL_PREFIX };
-    /**
-     * <code>PUBLICATION_ID</code> The publication id
-     */
-    public static final String PUBLICATION_ID = "publication-id";
-    /**
-     * <code>PUBLICATION</code> The publication
-     */
-    public static final String PUBLICATION = "publication";
-    /**
-     * <code>PUBLICATION_LANGUAGES_CSV</code> A list of the publication's languages,
-     * comma-seperated
-     */
-    public static final String PUBLICATION_LANGUAGES_CSV = "publication-languages-csv";
-    /**
-     * <code>CONTEXT</code> The context prefix
-     */
-    public static final String CONTEXT = "context-prefix";
-    /**
-     * <code>AREA</code> The area
-     */
-    public static final String AREA = "area";
-    /**
-     * <code>DEFAULT_LANGUAGE</code> The default language of the publication
-     */
-    public static final String DEFAULT_LANGUAGE = "default-language";
-    /**
-     * <code>DOCUMENT</code> The current document
-     */
-    public static final String DOCUMENT = "document";
-    /**
-     * <code>DOCUMENT_ID</code> The document id of the current document
-     */
-    public static final String DOCUMENT_ID = "document-id";
-    /**
-     * <code>DOCUMENT_NAME</code> The name of the current document
-     */
-    public static final String DOCUMENT_NAME = "document-name";
-    /**
-     * <code>DOCUMENT_TYPE</code> The type of the current document
-     */
-    public static final String DOCUMENT_TYPE = "document-type";
-    /**
-     * <code>DOCUMENT_LABEL</code> The label of the current document
-     */
-    public static final String DOCUMENT_LABEL = "document-label";
-    /**
-     * <code>DOCUMENT_URL</code> The URL of the current document
-     */
-    public static final String DOCUMENT_URL = "document-url";
-    /**
-     * <code>DOCUMENT_URL_WITHOUT_LANGUAGE</code> The URL of the current document without a
-     * language extension.
-     */
-    public static final String DOCUMENT_URL_WITHOUT_LANGUAGE = "document-url-without-language";
-    /**
-     * <code>DOCUMENT_FILE</code> The file of the current document
-     */
-    public static final String DOCUMENT_FILE = "document-file";
-    /**
-     * <code>DOCUMENT_PATH</code> The path of the current document
-     */
-    public static final String DOCUMENT_PATH = "document-path";
-    /**
-     * <code>DOCUMENT_EXTENSION</code> The extension of the current document
-     */
-    public static final String DOCUMENT_EXTENSION = "document-extension";
-    /**
-     * <code>DOCUMENT_LANGUAGE</code> The language of the current document
-     */
-    public static final String DOCUMENT_LANGUAGE = "document-language";
-    /**
-     * <code>DOCUMENT_LANGUAGES</code> The languages the current document is available in
-     */
-    public static final String DOCUMENT_LANGUAGES = "document-languages";
-    /**
-     * <code>DOCUMENT_LANGUAGES_CSV</code> The languages the current document is available in,
-     * comma-seperated
-     */
-    public static final String DOCUMENT_LANGUAGES_CSV = "document-languages-csv";
-    /**
-     * <code>DOCUMENT_LASTMODIFIED</code> The last modified date of the current document
-     */
-    public static final String DOCUMENT_LASTMODIFIED = "document-lastmodified";
-    /**
-     * <code>BREADCRUMB_PREFIX</code> The breadcrumb prefix of the publication, used for
-     * navigation
-     */
-    public static final String BREADCRUMB_PREFIX = "breadcrumb-prefix";
-    /**
-     * <code>SSL_PREFIX</code> The SSL prefix of the publication
-     */
-    public static final String SSL_PREFIX = "ssl-prefix";
-    /**
-     * <code>NAMESPACE</code> The page envelope namespace
-     */
-    public static final String NAMESPACE = "http://apache.org/cocoon/lenya/page-envelope/1.0";
-    /**
-     * <code>DEFAULT_PREFIX</code> The default prefix
-     */
-    public static final String DEFAULT_PREFIX = "lenya";
-
-    private String context;
-    private String area;
-    private Publication publication;
-
-    /**
-     * Constructor.
-     */
-    protected PageEnvelope() {
-        // do nothing
-    }
-
-    /**
-     * Creates a page envelope from an object model.
-     * @param map The identity map to use.
-     * @param contextPath The servlet context prefix.
-     * @param webappUrl The web application URL.
-     * @param servletContext The servlet context directory.
-     * @throws PageEnvelopeException when something went wrong.
-     */
-    public PageEnvelope(DocumentIdentityMap map, String contextPath, String webappUrl,
-            File servletContext) throws PageEnvelopeException {
-        this.identityMap = map;
-        this.context = contextPath;
-        this.webappUrl = webappUrl;
-        this.servletContext = servletContext;
-    }
-
-    private String webappUrl;
-    private File servletContext;
-
-    private DocumentIdentityMap identityMap;
-
-    /**
-     * Returns the identity map.
-     * @return An identity map.
-     */
-    public DocumentIdentityMap getIdentityMap() {
-        return this.identityMap;
-    }
-
-    /**
-     * Creates the message to report when creating the envelope failed.
-     * @param request The request.
-     * @return A string.
-     */
-    protected String createExceptionMessage(Request request) {
-        return "Resolving page envelope failed:" + "\n  URI: " + request.getRequestURI()
-                + "\n  Context: " + getContext() + "\n  Publication ID: "
-                + getPublication().getId() + "\n  Area: " + this.document.getArea()
-                + "\n  Document ID: " + this.document.getId();
-    }
-
-    /**
-     * Returns the publication of this PageEnvelope.
-     * @return a <code>Publication</code> value
-     */
-    public Publication getPublication() {
-        if (this.publication == null) {
-            try {
-                Publication pub = PublicationFactory.getInstance(new ConsoleLogger())
-                        .getPublication(this.webappUrl, this.servletContext);
-                if (pub.exists()) {
-                    this.publication = pub;
-                    if (getIdentityMap().isDocument(this.webappUrl)) {
-                        Document _document = getIdentityMap().getFromURL(this.webappUrl);
-                        setDocument(_document);
-                    }
-                }
-            } catch (Exception e) {
-                throw new RuntimeException(e);
-            }
-        }
-        return this.publication;
-    }
-
-    /**
-     * @return The current area.
-     */
-    public String getArea() {
-        if (this.area == null) {
-            URLInformation info = new URLInformation(this.webappUrl);
-            this.area = info.getArea();
-        }
-        return this.area;
-    }
-
-    /**
-     * Returns the rcEnvironment.
-     * 
-     * @return a <code>RCEnvironment</code> value
-     * @deprecated We should detach the RC environment from the page envelope.
-     */
-    public RCEnvironment getRCEnvironment() {
-        return RCEnvironment.getInstance(getPublication().getServletContext().getAbsolutePath());
-    }
-
-    /**
-     * Returns the context, e.g. "/lenya".
-     * @return a <code>String</code> value
-     */
-    public String getContext() {
-        return this.context;
-    }
-
-    /**
-     * Returns the document-path.
-     * @return a <code>File<code> value
-     */
-    public String getDocumentPath() {
-        return getPublication().getPathMapper().getPath(getDocument().getId(),
-                getDocument().getLanguage());
-    }
-
-    /**
-     * @param string The context.
-     */
-    protected void setContext(String string) {
-        this.context = string;
-    }
-
-    private Document document;
-
-    /**
-     * Returns the document or <code>null</code> if the current URL does not represent a document.
-     * @return A document
-     */
-    public Document getDocument() {
-        if (this.document == null) {
-            try {
-                if (getIdentityMap().isDocument(this.webappUrl)) {
-                    this.document = getIdentityMap().getFromURL(this.webappUrl);
-                }
-            } catch (final DocumentBuildException e) {
-                throw new RuntimeException(e);
-            }
-        }
-        return this.document;
-    }
-
-    /**
-     * Sets the document.
-     * @param _document A document.
-     */
-    public void setDocument(Document _document) {
-        this.document = _document;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/publication/PageEnvelopeException.java b/src/java/org/apache/lenya/cms/publication/PageEnvelopeException.java
deleted file mode 100644
index 5c4f161..0000000
--- a/src/java/org/apache/lenya/cms/publication/PageEnvelopeException.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.publication;
-
-
-/**
- * This exception is thrown when the creation of a {@link PageEnvelope} object fails.
- */
-public class PageEnvelopeException extends Exception {
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/**
-     * Creates a new PageEnvelopeException.
-     */
-    public PageEnvelopeException() {
-	    // do nothing
-    }
-
-    /**
-     * Creates a new PageEnvelopeException.
-     * @param message the exception message
-     */
-    public PageEnvelopeException(String message) {
-        super(message);
-    }
-
-    /**
-     * Creates a new PageEnvelopeException.
-     * @param message the exception message
-     * @param cause the cause of the exception
-     */
-    public PageEnvelopeException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    /**
-     * Creates a new PageEnvelopeException.
-     * @param cause  the cause of the exception
-     */
-    public PageEnvelopeException(Throwable cause) {
-        super(cause);
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/publication/PageEnvelopeFactory.java b/src/java/org/apache/lenya/cms/publication/PageEnvelopeFactory.java
deleted file mode 100644
index b386002..0000000
--- a/src/java/org/apache/lenya/cms/publication/PageEnvelopeFactory.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.publication;
-
-import java.io.File;
-import java.util.Map;
-
-import org.apache.cocoon.environment.Context;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Request;
-import org.apache.lenya.util.ServletHelper;
-
-/**
- * Common entry point for creating page envelopes.
- */
-public class PageEnvelopeFactory {
-    /**
-     * Creates a new PageEnvelopeFactory.
-     */
-    protected PageEnvelopeFactory() {
-        // do nothing
-    }
-
-    private static PageEnvelopeFactory instance;
-
-    /**
-     * Returns the singleton PageEnvelopeFactory.
-     * @return The factory.
-     */
-    public static PageEnvelopeFactory getInstance() {
-        if (instance == null) {
-            instance = new PageEnvelopeFactory();
-        }
-        return instance;
-    }
-
-    /**
-     * Returns the page envelope for the object model of a Cocoon component.
-     * @param map The document identity map to use.
-     * @param objectModel The object model.
-     * @return A page envelope.
-     * @throws PageEnvelopeException if something went wrong.
-     */
-    public PageEnvelope getPageEnvelope(DocumentIdentityMap map, Map objectModel)
-            throws PageEnvelopeException {
-        Request request = ObjectModelHelper.getRequest(objectModel);
-        String contextPath = request.getContextPath();
-        Context context = ObjectModelHelper.getContext(objectModel);
-        String webappUrl = ServletHelper.getWebappURI(request);
-        String servletContextPath = context.getRealPath("");
-        return getPageEnvelope(map, contextPath, webappUrl, new File(servletContextPath));
-    }
-
-    /**
-     * Creates a page envelope.
-     * @param map The document identity map to use.
-     * @param contextPath The servlet context prefix.
-     * @param webappUrl The web application URL.
-     * @param servletContext The servlet context directory.
-     * @return A page envelope.
-     * @throws PageEnvelopeException if something went wrong.
-     */
-    public PageEnvelope getPageEnvelope(DocumentIdentityMap map, String contextPath,
-            String webappUrl, File servletContext) throws PageEnvelopeException {
-        PageEnvelope envelope = new PageEnvelope(map, contextPath, webappUrl, servletContext);
-        return envelope;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/publication/PathToDocumentIdMapper.java b/src/java/org/apache/lenya/cms/publication/PathToDocumentIdMapper.java
deleted file mode 100644
index 8303997..0000000
--- a/src/java/org/apache/lenya/cms/publication/PathToDocumentIdMapper.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.publication;
-
-import java.io.File;
-
-/**
- * This interface is basically the reverse of DocumentIdToPathMapper.
- */
-public interface PathToDocumentIdMapper {
-
-    /**
-     * Compute the document-id for a given file.
-     * @param publication the publication where the file is.
-     * @param area the area where the file is.
-     * @param file the file that is associated with the document
-     * @return the document-id of the document associated with the given file.
-     * @throws DocumentDoesNotExistException if there is no document associated with this file.
-     */
-    String getDocumentId(Publication publication, String area, File file)
-        throws DocumentDoesNotExistException;
-        
-    /**
-     * Returns the language for a given file
-     * @param file the document file
-     * @return the language for the given document file or null if the file
-     * has no language.
-     */
-    public String getLanguage(File file);
-
-}
diff --git a/src/java/org/apache/lenya/cms/publication/Proxy.java b/src/java/org/apache/lenya/cms/publication/Proxy.java
deleted file mode 100644
index 5b9f338..0000000
--- a/src/java/org/apache/lenya/cms/publication/Proxy.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.publication;
-
-/**
- * <p>
- * An object of this class represents a proxy configuration.
- * </p>
- * <p>
- * Configuration example:
- * </p>
- * <pre>
- * &lt;proxy area="live" ssl="true" url="https://www.host.com/ssl/default"/&gt;
- * &lt;proxy area="live" ssl="false" url="http://www.host.com/default"/&gt;
- * &lt;proxy area="authoring" ssl="true" url="https://www.host.com/lenya/default/authoring"/&gt;
- * &lt;proxy area="authoring" ssl="false" url="http://www.host.com/lenya/default/authoring"/&gt;
- * </pre>
- * 
- * @version $Id$
- */
-public class Proxy {
-
-    private String url;
-
-    /**
-     * Returns the absolute URL of a particular document.
-     * @param document The document.
-     * @return A string.
-     */
-    public String getURL(Document document) {
-        return getUrl() + document.getCanonicalDocumentURL();
-    }
-
-    /**
-     * Returns the proxy URL.
-     * @return A string.
-     */
-    public String getUrl() {
-        return this.url;
-    }
-
-    /**
-     * Sets the proxy URL.
-     * @param _url The url to set.
-     */
-    public void setUrl(String _url) {
-        this.url = _url;
-    }
-
-    /**
-     * @see java.lang.Object#toString()
-     */
-    public String toString() {
-        return "Proxy URL=[" + getUrl() + "]";
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/publication/Publication.java b/src/java/org/apache/lenya/cms/publication/Publication.java
deleted file mode 100644
index 4fdd7c2..0000000
--- a/src/java/org/apache/lenya/cms/publication/Publication.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.publication;
-
-import java.io.File;
-
-/**
- * A Lenya publication.
- */
-public interface Publication {
-
-    /**
-     * <code>AUTHORING_AREA</code> The authoring area
-     */
-    String AUTHORING_AREA = "authoring";
-    /**
-     * <code>STAGING_AREA</code> The staging area
-     */
-    String STAGING_AREA = "staging";
-    /**
-     * <code>LIVE_AREA</code> The live area
-     */
-    String LIVE_AREA = "live";
-    /**
-     * <code>ADMIN_AREA</code> The admin area
-     */
-    String ADMIN_AREA = "admin";
-    /**
-     * <code>ARCHIVE_AREA</code> The archive area
-     */
-    String ARCHIVE_AREA = "archive";
-    /**
-     * <code>TRASH_AREA</code> The trash area
-     */
-    String TRASH_AREA = "trash";
-    /**
-     * <code>PUBLICATION_PREFIX</code> The publication prefix
-     */
-    String PUBLICATION_PREFIX = "lenya" + File.separator + "pubs";
-    /**
-     * <code>PUBLICATION_PREFIX_URI</code> The publication prefix URI
-     */
-    String PUBLICATION_PREFIX_URI = "lenya/pubs";
-    /**
-     * <code>CONFIGURATION_PATH</code> The configuration path
-     */
-    String CONFIGURATION_PATH = "config";
-    /**
-     * <code>CONTENT_PATH</code> The content path
-     */
-    String CONTENT_PATH = "content";
-    /**
-     * <code>PENDING_PATH</code> The pending path
-     */
-    String PENDING_PATH = "pending";
-    /**
-     * <code>DELETE_PATH</code> The delete path
-     */
-    String DELETE_PATH = "delete";
-    /**
-     * <code>SEARCH_AREA_PREFIX</code> The search area prefix
-     */
-    String SEARCH_AREA_PREFIX = "search-";
-
-    /**
-     * Returns the publication ID.
-     * @return A string value.
-     */
-    String getId();
-
-    /**
-     * Returns the servlet context this publication belongs to (usually, the
-     * <code>webapps/lenya</code> directory).
-     * @return A <code>File</code> object.
-     */
-    File getServletContext();
-
-    /**
-     * @return if this publication exists.
-     */
-    boolean exists();
-
-    /**
-     * Returns the publication directory.
-     * @return A <code>File</code> object.
-     */
-    File getDirectory();
-
-    /**
-     * Return the directory of a specific area.
-     * @param area a <code>File</code> representing the root of the area content directory.
-     * @return the directory of the given content area.
-     */
-    File getContentDirectory(String area);
-
-    /**
-     * Set the path mapper
-     * @param mapper The path mapper
-     */
-    void setPathMapper(DefaultDocumentIdToPathMapper mapper);
-
-    /**
-     * Returns the path mapper.
-     * @return a <code>DocumentIdToPathMapper</code>
-     */
-    DocumentIdToPathMapper getPathMapper();
-
-    /**
-     * Get the default language
-     * @return the default language
-     */
-    String getDefaultLanguage();
-
-    /**
-     * Set the default language
-     * @param language the default language
-     */
-    void setDefaultLanguage(String language);
-
-    /**
-     * Get all available languages for this publication
-     * @return an <code>Array</code> of languages
-     */
-    String[] getLanguages();
-
-    /**
-     * Get the breadcrumb prefix. It can be used as a prefix if a publication is part of a larger
-     * site
-     * @return the breadcrumb prefix
-     */
-    String getBreadcrumbPrefix();
-
-    /**
-     * Returns the hint of the site manager service that is used by this publication.
-     * @return A hint to use for service selection.
-     */
-    String getSiteManagerHint();
-
-    /**
-     * Returns the document builder class of this instance.
-     * @return A hint to use for service selection.
-     */
-    String getDocumentBuilderHint();
-
-    /**
-     * Returns the publication template instantiator hint. If the publication does not allow
-     * templating, <code>null</code> is returned.
-     * @return A hint to use for service selection.
-     */
-    String getInstantiatorHint();
-
-    /**
-     * Returns the proxy which is used for a particular document.
-     * @param document The document.
-     * @param isSslProtected A boolean value.
-     * @return A proxy or <code>null</code> if no proxy is defined for this version.
-     */
-    Proxy getProxy(Document document, boolean isSslProtected);
-
-    /**
-     * @return The templates of the publication.
-     */
-    Publication[] getTemplates();
-
-    /**
-     * @return the URI base for this publication
-     */
-    String getSourceURI();
-
-    /**
-     * @param area The area.
-     * @return the URI base under which contents in this publication are accessed
-     */
-    String getContentURI(String area);
-
-    /**
-     * @param resourceType The resource type or <code>null</code> if no workflow is registered for
-     *            this resource type.
-     * @return The workflow schema to use for this resource type.
-     */
-    String getWorkflowSchema(DocumentType resourceType);
-    
-    /**
-     * @return The resource types that are supported by this publication.
-     */
-    String[] getResourceTypeNames();
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/publication/PublicationException.java b/src/java/org/apache/lenya/cms/publication/PublicationException.java
deleted file mode 100644
index 67955ab..0000000
--- a/src/java/org/apache/lenya/cms/publication/PublicationException.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.publication;
-
-/**
- * Publication Exception
- */
-public class PublicationException extends Exception {
-
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/**
-     * Creates a new PublicationException.
-     */
-    public PublicationException() {
-        super();
-    }
-
-    /**
-     * Creates a new PublicationException.
-     * @param message the exception message
-     */
-    public PublicationException(String message) {
-        super(message);
-    }
-
-    /**
-     * Creates a new PublicationException.
-     * @param message the exception message
-     * @param cause the cause of the exception
-     */
-    public PublicationException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    /**
-     * Creates a new PublicationException.
-     * @param cause the cause of the exception
-     */
-    public PublicationException(Throwable cause) {
-        super(cause);
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/publication/PublicationFactory.java b/src/java/org/apache/lenya/cms/publication/PublicationFactory.java
deleted file mode 100644
index 9341afe..0000000
--- a/src/java/org/apache/lenya/cms/publication/PublicationFactory.java
+++ /dev/null
@@ -1,279 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.publication;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.avalon.framework.container.ContainerUtil;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.cocoon.environment.Context;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Request;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.excalibur.source.SourceUtil;
-import org.apache.lenya.util.ServletHelper;
-
-/**
- * Factory for creating publication objects.
- */
-public final class PublicationFactory extends AbstractLogEnabled {
-
-    /**
-     * Create a new <code>PublicationFactory</code>.
-     * @param logger The logger to use.
-     */
-    private PublicationFactory(Logger logger) {
-        ContainerUtil.enableLogging(this, logger);
-    }
-
-    private static PublicationFactory instance;
-
-    /**
-     * Returns the publication factory instance.
-     * @param logger The logger to use.
-     * @return A publication factory.
-     */
-    public static PublicationFactory getInstance(Logger logger) {
-        if (instance == null) {
-            instance = new PublicationFactory(logger);
-        }
-        return instance;
-    }
-
-    private static Map keyToPublication = new HashMap();
-
-    /**
-     * Creates a new publication. The publication ID is resolved from the request URI. The servlet
-     * context path is resolved from the context object.
-     * @param objectModel The object model of the Cocoon component.
-     * @return a <code>Publication</code>
-     * @throws PublicationException if there was a problem creating the publication.
-     */
-    public Publication getPublication(Map objectModel) throws PublicationException {
-
-        assert objectModel != null;
-        Request request = ObjectModelHelper.getRequest(objectModel);
-        Context context = ObjectModelHelper.getContext(objectModel);
-        return getPublication(request, context);
-    }
-
-    /**
-     * Create a new publication with the given publication-id and servlet context path. These
-     * publications are cached and reused for similar requests.
-     * @param id the publication id
-     * @param servletContextPath the servlet context path of the publication
-     * @return a <code>Publication</code>
-     * @throws PublicationException if there was a problem creating the publication.
-     */
-    public Publication getPublication(String id, String servletContextPath)
-            throws PublicationException {
-
-        assert id != null;
-        assert servletContextPath != null;
-
-        String key = generateKey(id, servletContextPath);
-        Publication publication = null;
-
-        if (keyToPublication.containsKey(key)) {
-            publication = (Publication) keyToPublication.get(key);
-        } else {
-            publication = new PublicationImpl(id, servletContextPath);
-            ContainerUtil.enableLogging(publication, getLogger());
-            keyToPublication.put(key, publication);
-        }
-
-        if (publication == null) {
-            throw new PublicationException("The publication for ID [" + id
-                    + "] could not be created.");
-        }
-        return publication;
-    }
-
-    /**
-     * Generates a key to cache a publication. The cache key is constructed using the canonical
-     * servlet context path and the publication ID.
-     * @param publicationId The publication ID.
-     * @param servletContextPath The servlet context path.
-     * @return A cache key.
-     * @throws PublicationException when the servlet context does not exist.
-     */
-    protected static String generateKey(String publicationId, String servletContextPath)
-            throws PublicationException {
-        String key;
-        File servletContext = new File(servletContextPath);
-        String canonicalPath;
-        try {
-            canonicalPath = servletContext.getCanonicalPath();
-        } catch (IOException e) {
-            throw new PublicationException(e);
-        }
-        key = canonicalPath + "_" + publicationId;
-        return key;
-    }
-
-    /**
-     * Creates a new publication based on a request and a context.
-     * @param request A request.
-     * @param context A context.
-     * @return A publication.
-     * @throws PublicationException if there was a problem creating the publication.
-     */
-    public Publication getPublication(Request request, Context context) throws PublicationException {
-
-        getLogger().debug("Creating publication from Cocoon object model");
-        String webappUrl = ServletHelper.getWebappURI(request);
-        String servletContextPath = context.getRealPath("");
-        return getPublication(webappUrl, new File(servletContextPath));
-    }
-
-    /**
-     * Creates a publication from a webapp URL and a servlet context directory.
-     * @param webappUrl The URL within the web application (without context prefix)
-     * @param servletContext The Lenya servlet context directory
-     * @return A publication
-     * @throws PublicationException when something went wrong
-     */
-    public Publication getPublication(String webappUrl, File servletContext)
-            throws PublicationException {
-        getLogger().debug("Creating publication from webapp URL and servlet context");
-
-        getLogger().debug("    Webapp URL:       [" + webappUrl + "]");
-        String publicationId = new URLInformation(webappUrl).getPublicationId();
-        Publication publication = getPublication(publicationId, servletContext.getAbsolutePath());
-        return publication;
-    }
-
-    /**
-     * Creates a publication using a source resolver and a request.
-     * @param resolver The source resolver.
-     * @param request The request.
-     * @return A publication.
-     * @throws PublicationException when something went wrong.
-     */
-    public Publication getPublication(SourceResolver resolver, Request request)
-            throws PublicationException {
-        getLogger().debug("Creating publication from resolver and request");
-        String webappUrl = ServletHelper.getWebappURI(request);
-        return getPublication(resolver, webappUrl);
-    }
-
-    /**
-     * @param resolver A source resolver.
-     * @param webappUrl A webapp URL.
-     * @return A publication.
-     * @throws PublicationException if an error occurs.
-     */
-    public Publication getPublication(SourceResolver resolver, String webappUrl)
-            throws PublicationException {
-        Publication publication;
-        Source source = null;
-        try {
-            source = resolver.resolveURI("context:///");
-            File servletContext = SourceUtil.getFile(source);
-            publication = getPublication(webappUrl, servletContext);
-        } catch (Exception e) {
-            throw new PublicationException(e);
-        } finally {
-            if (source != null) {
-                resolver.release(source);
-            }
-        }
-        return publication;
-    }
-
-    /**
-     * @param manager A service manager.
-     * @param webappUrl A webapp URL.
-     * @return A publication.
-     * @throws PublicationException if an error occurs.
-     */
-    public Publication getPublication(ServiceManager manager, String webappUrl)
-            throws PublicationException {
-        Publication publication = null;
-        SourceResolver resolver = null;
-        try {
-            resolver = (SourceResolver) manager.lookup(SourceResolver.ROLE);
-            publication = getPublication(resolver, webappUrl);
-        } catch (ServiceException e) {
-            throw new PublicationException(e);
-        } finally {
-            if (resolver != null) {
-                manager.release(resolver);
-            }
-        }
-        return publication;
-    }
-
-    /**
-     * Returns a list of all available publications.
-     * @param manager The service manager to use for source resolving.
-     * @return An array of publications.
-     * @throws PublicationException if an error occurs.
-     */
-    public Publication[] getPublications(ServiceManager manager) throws PublicationException {
-        List publications = new ArrayList();
-
-        SourceResolver resolver = null;
-        Source source = null;
-        try {
-            resolver = (SourceResolver) manager.lookup(SourceResolver.ROLE);
-            source = resolver.resolveURI("context:///");
-            File servletContext = SourceUtil.getFile(source);
-            String servletContextPath = servletContext.getAbsolutePath();
-
-            File publicationsDirectory = new File(servletContext,
-                    Publication.PUBLICATION_PREFIX);
-            File[] publicationDirectories = publicationsDirectory.listFiles(new FileFilter() {
-                public boolean accept(File file) {
-                    return file.isDirectory();
-                }
-            });
-
-            for (int i = 0; i < publicationDirectories.length; i++) {
-                String publicationId = publicationDirectories[i].getName();
-                Publication publication = getPublication(publicationId, servletContextPath);
-                publications.add(publication);
-            }
-
-        } catch (Exception e) {
-            throw new PublicationException(e);
-        } finally {
-            if (resolver != null) {
-                if (source != null) {
-                    resolver.release(source);
-                }
-                manager.release(resolver);
-            }
-        }
-
-        return (Publication[]) publications.toArray(new Publication[publications.size()]);
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/publication/PublicationImpl.java b/src/java/org/apache/lenya/cms/publication/PublicationImpl.java
deleted file mode 100644
index fc6b05a..0000000
--- a/src/java/org/apache/lenya/cms/publication/PublicationImpl.java
+++ /dev/null
@@ -1,450 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.publication;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.lenya.cms.repository.Node;
-
-/**
- * A publication.
- * @version $Id$
- */
-public class PublicationImpl extends AbstractLogEnabled implements Publication {
-
-    private static final String[] areas = { AUTHORING_AREA, STAGING_AREA, LIVE_AREA, ADMIN_AREA,
-            ARCHIVE_AREA, TRASH_AREA };
-
-    private String id;
-    private File servletContext;
-    private DocumentIdToPathMapper mapper = null;
-    private ArrayList languages = new ArrayList();
-    private String defaultLanguage = null;
-    private String breadcrumbprefix = null;
-    private String instantiatorHint = null;
-
-    private static final String ELEMENT_PROXY = "proxy";
-    private static final String ATTRIBUTE_AREA = "area";
-    private static final String ATTRIBUTE_URL = "url";
-    private static final String ATTRIBUTE_SSL = "ssl";
-
-    private boolean isConfigLoaded = false;
-
-    /**
-     * <code>CONFIGURATION_FILE</code> The publication configuration file
-     */
-    public static final String CONFIGURATION_FILE = CONFIGURATION_PATH + File.separator
-            + "publication.xconf";
-
-    private static final String ELEMENT_TEMPLATES = "templates";
-    private static final String ELEMENT_TEMPLATE = "template";
-    private static final String ATTRIBUTE_ID = "id";
-    private static final String ELEMENT_PATH_MAPPER = "path-mapper";
-    private static final String ELEMENT_DOCUMENT_BUILDER = "document-builder";
-    private static final String ELEMENT_SITE_MANAGER = "site-manager";
-    private static final String ATTRIBUTE_NAME = "name";
-    private static final String ELEMENT_TEMPLATE_INSTANTIATOR = "template-instantiator";
-    private static final String LANGUAGES = "languages";
-    private static final String DEFAULT_LANGUAGE_ATTR = "default";
-    private static final String BREADCRUMB_PREFIX = "breadcrumb-prefix";
-    private static final String ELEMENT_RESOURCE_TYPE = "resource-type";
-    private static final String ATTRIBUTE_WORKFLOW = "workflow";
-
-    /**
-     * Creates a new instance of Publication
-     * @param _id the publication id
-     * @param servletContextPath the servlet context of this publication
-     * @throws PublicationException if there was a problem reading the config file
-     */
-    protected PublicationImpl(String _id, String servletContextPath) throws PublicationException {
-        this.id = _id;
-        this.servletContext = new File(servletContextPath);
-    }
-
-    /**
-     * Loads the configuration.
-     */
-    protected void loadConfiguration() {
-
-        if (isConfigLoaded) {
-            return;
-        }
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Loading configuration for publication [" + getId() + "]");
-        }
-
-        File configFile = getConfigurationFile();
-
-        if (!configFile.exists()) {
-            getLogger()
-                    .error("Config file [" + configFile.getAbsolutePath() + "] does not exist: ",
-                            new RuntimeException());
-            throw new RuntimeException("The configuration file [" + configFile
-                    + "] does not exist!");
-        } else {
-            getLogger().debug("Configuration file [" + configFile + "] exists.");
-        }
-
-        DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
-
-        Configuration config;
-
-        String pathMapperClassName = null;
-
-        try {
-            config = builder.buildFromFile(configFile);
-
-            try {
-                pathMapperClassName = config.getChild(ELEMENT_PATH_MAPPER).getValue();
-                Class pathMapperClass = Class.forName(pathMapperClassName);
-                this.mapper = (DocumentIdToPathMapper) pathMapperClass.newInstance();
-            } catch (final ClassNotFoundException e) {
-                throw new PublicationException("Cannot instantiate documentToPathMapper: ["
-                        + pathMapperClassName + "]", e);
-            }
-
-            Configuration documentBuilderConfiguration = config.getChild(ELEMENT_DOCUMENT_BUILDER,
-                    false);
-            if (documentBuilderConfiguration != null) {
-                this.documentBuilderHint = documentBuilderConfiguration
-                        .getAttribute(ATTRIBUTE_NAME);
-            }
-
-            Configuration[] _languages = config.getChild(LANGUAGES).getChildren();
-            for (int i = 0; i < _languages.length; i++) {
-                Configuration languageConfig = _languages[i];
-                String language = languageConfig.getValue();
-                this.languages.add(language);
-                if (languageConfig.getAttribute(DEFAULT_LANGUAGE_ATTR, null) != null) {
-                    this.defaultLanguage = language;
-                }
-            }
-
-            Configuration siteManagerConfiguration = config.getChild(ELEMENT_SITE_MANAGER, false);
-            if (siteManagerConfiguration != null) {
-                this.siteManagerName = siteManagerConfiguration.getAttribute(ATTRIBUTE_NAME);
-            }
-
-            Configuration[] proxyConfigs = config.getChildren(ELEMENT_PROXY);
-            for (int i = 0; i < proxyConfigs.length; i++) {
-                String url = proxyConfigs[i].getAttribute(ATTRIBUTE_URL);
-                String ssl = proxyConfigs[i].getAttribute(ATTRIBUTE_SSL);
-                String area = proxyConfigs[i].getAttribute(ATTRIBUTE_AREA);
-
-                Proxy proxy = new Proxy();
-                proxy.setUrl(url);
-
-                Object key = getProxyKey(area, Boolean.valueOf(ssl).booleanValue());
-                this.areaSsl2proxy.put(key, proxy);
-                if (getLogger().isDebugEnabled()) {
-                    getLogger().debug("Adding proxy: [" + proxy + "] for area=[" + area + "] SSL=["
-                            + ssl + "]");
-                }
-            }
-
-            Configuration templatesConfig = config.getChild(ELEMENT_TEMPLATES);
-            if (templatesConfig != null) {
-                PublicationFactory factory = PublicationFactory.getInstance(getLogger());
-                Configuration[] templateConfigs = templatesConfig.getChildren(ELEMENT_TEMPLATE);
-                this.templates = new Publication[templateConfigs.length];
-                for (int i = 0; i < templateConfigs.length; i++) {
-                    String templateId = templateConfigs[i].getAttribute(ATTRIBUTE_ID);
-                    Publication template = factory.getPublication(templateId, getServletContext()
-                            .getAbsolutePath());
-                    this.templates[i] = template;
-                }
-            }
-
-            Configuration templateInstantiatorConfig = config
-                    .getChild(ELEMENT_TEMPLATE_INSTANTIATOR, false);
-            if (templateInstantiatorConfig != null) {
-                this.instantiatorHint = templateInstantiatorConfig
-                        .getAttribute(PublicationImpl.ATTRIBUTE_NAME);
-            }
-
-            Configuration[] resourceTypeConfigs = config.getChildren(ELEMENT_RESOURCE_TYPE);
-            for (int i = 0; i< resourceTypeConfigs.length; i++) {
-                String name = resourceTypeConfigs[i].getAttribute(ATTRIBUTE_NAME);
-                this.resourceTypes.add(name);
-                
-                String workflow = resourceTypeConfigs[i].getAttribute(ATTRIBUTE_WORKFLOW, null);
-                if (workflow != null) {
-                    this.resourceType2workflow.put(name, workflow);
-                }
-            }
-            
-        } catch (final Exception e) {
-            throw new RuntimeException("Problem with config file: " + configFile.getAbsolutePath(),
-                    e);
-        }
-
-        this.breadcrumbprefix = config.getChild(BREADCRUMB_PREFIX).getValue("");
-
-        isConfigLoaded = true;
-    }
-
-    /**
-     * @return The configuration file (publication.xconf).
-     */
-    protected File getConfigurationFile() {
-        File configFile = new File(getDirectory(), CONFIGURATION_FILE);
-        return configFile;
-    }
-
-    /**
-     * Returns the publication ID.
-     * @return A string value.
-     */
-    public String getId() {
-        return this.id;
-    }
-
-    /**
-     * Returns the servlet context this publication belongs to (usually, the
-     * <code>webapps/lenya</code> directory).
-     * @return A <code>File</code> object.
-     */
-    public File getServletContext() {
-        return this.servletContext;
-    }
-
-    /**
-     * Returns the publication directory.
-     * @return A <code>File</code> object.
-     */
-    public File getDirectory() {
-        return new File(getServletContext(), PUBLICATION_PREFIX + File.separator + getId());
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.Publication#getContentDirectory(String)
-     */
-    public File getContentDirectory(String area) {
-        return new File(getDirectory(), CONTENT_PATH + File.separator + area);
-    }
-
-    /**
-     * Set the path mapper
-     * @param _mapper The path mapper
-     */
-    public void setPathMapper(DefaultDocumentIdToPathMapper _mapper) {
-        assert _mapper != null;
-        this.mapper = _mapper;
-    }
-
-    /**
-     * Returns the path mapper.
-     * @return a <code>DocumentIdToPathMapper</code>
-     */
-    public DocumentIdToPathMapper getPathMapper() {
-        if (this.mapper == null) {
-            loadConfiguration();
-        }
-        return this.mapper;
-    }
-
-    /**
-     * Returns if a given string is a valid area name.
-     * @param area The area string to test.
-     * @return A boolean value.
-     */
-    public static boolean isValidArea(String area) {
-        return area != null && Arrays.asList(areas).contains(area);
-    }
-
-    /**
-     * Get the default language
-     * @return the default language
-     */
-    public String getDefaultLanguage() {
-        if (this.defaultLanguage == null) {
-            loadConfiguration();
-        }
-        return this.defaultLanguage;
-    }
-
-    /**
-     * Set the default language
-     * @param language the default language
-     */
-    public void setDefaultLanguage(String language) {
-        this.defaultLanguage = language;
-    }
-
-    /**
-     * Get all available languages for this publication
-     * @return an <code>Array</code> of languages
-     */
-    public String[] getLanguages() {
-        loadConfiguration();
-        return (String[]) this.languages.toArray(new String[this.languages.size()]);
-    }
-
-    /**
-     * Get the breadcrumb prefix. It can be used as a prefix if a publication is part of a larger
-     * site
-     * @return the breadcrumb prefix
-     */
-    public String getBreadcrumbPrefix() {
-        loadConfiguration();
-        return this.breadcrumbprefix;
-    }
-
-    private String documentBuilderHint;
-
-    /**
-     * Returns the document builder of this instance.
-     * @return A document builder.
-     */
-    public String getDocumentBuilderHint() {
-        loadConfiguration();
-        return this.documentBuilderHint;
-    }
-
-    /**
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    public boolean equals(Object object) {
-        boolean equals = false;
-
-        if (getClass().isInstance(object)) {
-            Publication publication = (Publication) object;
-            equals = getId().equals(publication.getId())
-                    && getServletContext().equals(publication.getServletContext());
-        }
-
-        return equals;
-    }
-
-    /**
-     * @see java.lang.Object#hashCode()
-     */
-    public int hashCode() {
-        String key = getServletContext() + ":" + getId();
-        return key.hashCode();
-    }
-
-    private Map areaSsl2proxy = new HashMap();
-
-    /**
-     * Generates a hash key for a area-SSL combination.
-     * @param area The area.
-     * @param isSslProtected If the proxy is assigned for SSL-protected pages.
-     * @return An object.
-     */
-    protected Object getProxyKey(String area, boolean isSslProtected) {
-        return area + ":" + isSslProtected;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.Publication#getProxy(org.apache.lenya.cms.publication.Document,
-     *      boolean)
-     */
-    public Proxy getProxy(Document document, boolean isSslProtected) {
-        loadConfiguration();
-        Object key = getProxyKey(document.getArea(), isSslProtected);
-        Proxy proxy = (Proxy) this.areaSsl2proxy.get(key);
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger()
-                    .debug("Resolving proxy for [" + document + "] SSL=[" + isSslProtected + "]");
-            getLogger().debug("Resolved proxy: [" + proxy + "]");
-        }
-
-        return proxy;
-    }
-
-    private String siteManagerName;
-
-    /**
-     * @see org.apache.lenya.cms.publication.Publication#exists()
-     */
-    public boolean exists() {
-        return getConfigurationFile().exists();
-    }
-
-    private Publication[] templates;
-
-    /**
-     * @see org.apache.lenya.cms.publication.Publication#getTemplates()
-     */
-    public Publication[] getTemplates() {
-        loadConfiguration();
-        List list = Arrays.asList(this.templates);
-        return (Publication[]) list.toArray(new Publication[list.size()]);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.Publication#getSiteManagerHint()
-     */
-    public String getSiteManagerHint() {
-        loadConfiguration();
-        return this.siteManagerName;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.Publication#getInstantiatorHint()
-     */
-    public String getInstantiatorHint() {
-        loadConfiguration();
-        return this.instantiatorHint;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.Publication#getSourceURI()
-     */
-    public String getSourceURI() {
-        return Node.LENYA_PROTOCOL + PUBLICATION_PREFIX_URI + "/" + this.id;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.Publication#getContentURI(java.lang.String)
-     */
-    public String getContentURI(String area) {
-        return getSourceURI() + "/" + CONTENT_PATH + "/" + area;
-    }
-    
-    private Map resourceType2workflow = new HashMap();
-
-    /**
-     * @see org.apache.lenya.cms.publication.Publication#getWorkflowSchema(org.apache.lenya.cms.publication.DocumentType)
-     */
-    public String getWorkflowSchema(DocumentType resourceType) {
-        String workflow = (String) this.resourceType2workflow.get(resourceType.getName());
-        return workflow;
-    }
-    
-    private List resourceTypes = new ArrayList();
-
-    /**
-     * @see org.apache.lenya.cms.publication.Publication#getResourceTypeNames()
-     */
-    public String[] getResourceTypeNames() {
-        return (String[]) resourceTypes.toArray(new String[resourceTypes.size()]);
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/publication/Resource.java b/src/java/org/apache/lenya/cms/publication/Resource.java
deleted file mode 100644
index f99db5d..0000000
--- a/src/java/org/apache/lenya/cms/publication/Resource.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.publication;
-
-import org.apache.avalon.framework.container.ContainerUtil;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceNotFoundException;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.lenya.cms.cocoon.source.RepositorySource;
-import org.apache.lenya.cms.metadata.MetaDataManager;
-import org.apache.lenya.cms.metadata.MetaDataOwner;
-import org.apache.lenya.cms.repository.Node;
-import org.apache.lenya.transaction.Transactionable;
-
-/**
- * A resource (asset).
- * 
- * @version $Id$
- */
-public class Resource extends AbstractLogEnabled implements MetaDataOwner {
-
-    private Document document;
-    private String name;
-    private ServiceManager manager;
-    private MetaDataManager metaDataManager;
-
-    /**
-     * Ctor.
-     * @param document The document the resource belongs to.
-     * @param name The name.
-     * @param manager The service manager.
-     * @param _logger The logger.
-     */
-    public Resource(Document document, String name, ServiceManager manager, Logger _logger) {
-        ContainerUtil.enableLogging(this, _logger);
-        this.document = document;
-        this.name = name;
-        this.manager = manager;
-    }
-
-    /**
-     * @return The document.
-     */
-    public Document getDocument() {
-        return document;
-    }
-
-    /**
-     * @return The name.
-     */
-    public String getName() {
-        return name;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.metadata.MetaDataOwner#getMetaDataManager()
-     */
-    public MetaDataManager getMetaDataManager() {
-        if (this.metaDataManager == null) {
-            metaDataManager = new MetaDataManager(getMetaSourceURI(), this.manager, getLogger());
-        }
-        return metaDataManager;
-    }
-
-    /**
-     * @return The source URI.
-     */
-    public String getSourceURI() {
-        String srcUri = getResourcesURI() + "/" + getName();
-        return srcUri;
-    }
-
-    /**
-     * @return The meta source URI.
-     */
-    public String getMetaSourceURI() {
-        return getSourceURI() + ResourcesManager.RESOURCES_META_SUFFIX;
-    }
-
-    /**
-     * @return The directory URI where the resources are located.
-     */
-    public String getBaseURI() {
-        String resourcesUri = getResourcesURI().substring(Node.LENYA_PROTOCOL.length());
-        return "context://" + resourcesUri;
-    }
-
-    protected String getResourcesURI() {
-        String resourcesUri = document.getPublication().getSourceURI() + "/"
-                + ResourcesManager.RESOURCES_PREFIX + "/" + document.getArea() + document.getId();
-        return resourcesUri;
-    }
-
-    /**
-     * @return The repository nodes that represent this resource.
-     */
-    public Transactionable[] getRepositoryNodes() {
-        Node[] nodes = new Node[2];
-        SourceResolver resolver = null;
-        RepositorySource documentSource = null;
-        RepositorySource metaSource = null;
-        try {
-            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-            documentSource = (RepositorySource) resolver.resolveURI(getSourceURI());
-            metaSource = (RepositorySource) resolver.resolveURI(getMetaSourceURI());
-            nodes[0] = documentSource.getNode();
-            nodes[1] = metaSource.getNode();
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (resolver != null) {
-                if (documentSource != null) {
-                    resolver.release(documentSource);
-                }
-                if (metaSource != null) {
-                    resolver.release(metaSource);
-                }
-                this.manager.release(resolver);
-            }
-        }
-        return nodes;
-    }
-
-    /**
-     * @return The content length of the source.
-     * @throws SourceNotFoundException if the source does not exist.
-     */
-    public long getContentLength() throws SourceNotFoundException {
-        SourceResolver resolver = null;
-        Source source = null;
-        try {
-            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-            source = resolver.resolveURI(getSourceURI());
-            if (source.exists()) {
-                return source.getContentLength();
-            } else {
-                throw new SourceNotFoundException("The source [" + getSourceURI()
-                        + "] does not exist!");
-            }
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (resolver != null) {
-                if (source != null) {
-                    resolver.release(source);
-                }
-                this.manager.release(resolver);
-            }
-        }
-    }
-    
-    /**
-     * @return The last modification date of the source.
-     * @throws SourceNotFoundException if the source does not exist.
-     */
-    public long getLastModified() throws SourceNotFoundException {
-        SourceResolver resolver = null;
-        Source source = null;
-        try {
-            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-            source = resolver.resolveURI(getSourceURI());
-            if (source.exists()) {
-                return source.getLastModified();
-            } else {
-                throw new SourceNotFoundException("The source [" + getSourceURI()
-                        + "] does not exist!");
-            }
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (resolver != null) {
-                if (source != null) {
-                    resolver.release(source);
-                }
-                this.manager.release(resolver);
-            }
-        }
-    }
-    
-    /**
-     * @return The mime type of the source.
-     * @throws SourceNotFoundException if the source does not exist.
-     */
-    public String getMimeType() throws SourceNotFoundException {
-        SourceResolver resolver = null;
-        Source source = null;
-        try {
-            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-            source = resolver.resolveURI(getSourceURI());
-            if (source.exists()) {
-                return source.getMimeType();
-            } else {
-                throw new SourceNotFoundException("The source [" + getSourceURI()
-                        + "] does not exist!");
-            }
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (resolver != null) {
-                if (source != null) {
-                    resolver.release(source);
-                }
-                this.manager.release(resolver);
-            }
-        }
-    }
-    
-}
diff --git a/src/java/org/apache/lenya/cms/publication/ResourcesManager.java b/src/java/org/apache/lenya/cms/publication/ResourcesManager.java
deleted file mode 100644
index 7dbeecd..0000000
--- a/src/java/org/apache/lenya/cms/publication/ResourcesManager.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.publication;
-
-import java.util.Map;
-
-import org.apache.cocoon.servlet.multipart.Part;
-
-/**
- * Manager for resources of a CMS document.
- * @version $Id$
- */
-public interface ResourcesManager {
-    
-    /**
-     * The Avalon role.
-     */
-    String ROLE = ResourcesManager.class.getName();
-
-    /**
-     * <code>CONTENT_PREFIX</code> The content prefix
-     */
-    final String CONTENT_PREFIX = "content";
-    /**
-     * <code>RESOURCES_PREFIX</code> The resources prefix
-     */
-    final String RESOURCES_PREFIX = "resources";
-    /**
-     * <code>RESOURCES_META_SUFFIX</code> The suffix for resource meta files
-     */
-    final String RESOURCES_META_SUFFIX = ".meta";
-    /**
-     * <code>UPLOADASSET_PARAM_NAME</code> The parameter name for the uploaded asset
-     */
-    final String UPLOADASSET_PARAM_NAME = "properties.asset.data";
-    /**
-     * <code>UPLOADASSET_PARAM_PREFIX</code> The prefix for all asset upload parameters
-     */
-    final String UPLOADASSET_PARAM_PREFIX = "properties.asset.";
-    /**
-     * <code>UPLOADASSET_RETURN_FILESIZE</code> The file size
-     */
-    final String UPLOADASSET_RETURN_FILESIZE = "file-size";
-    /**
-     * <code>UPLOADASSET_RETURN_MIMETYPE</code> The mime type
-     */
-    final String UPLOADASSET_RETURN_MIMETYPE = "mime-type";
-    /**
-     * <code>FILE_NAME_REGEXP</code> The regular expression for valid asset names
-     */
-    final String FILE_NAME_REGEXP = "[-a-zA-Z0-9_.]+";
-    /**
-     * <code>IMAGE_FILE_EXTENSIONS</code> The valid extensions for images
-     */
-    final String[] IMAGE_FILE_EXTENSIONS = { ".jpg", ".png", ".bmp", ".gif", ".svg" };
-    /**
-     * <code>DUBLIN_CORE_PARAMETERS</code> The known Dublin Core values
-     */
-    // optional parameters for meta data according to dublin core
-    final String[] DUBLIN_CORE_PARAMETERS = { "title", "creator", "subject", "description",
-            "publisher", "contributor", "date", "type", "format", "identifier", "source",
-            "language", "relation", "coverage", "rights" };
-
-    /**
-     * Add a resource to the document.
-     * @param document The document.
-     * @param part the part that contains the uploaded file
-     * @param metadata the metadata for the resource
-     * @throws Exception if an error occurs
-     */
-    void addResource(Document document, Part part, Map metadata) throws Exception;
-
-    /**
-     * Delete a resource.
-     * @param resource The resource.
-     * @throws Exception if an error occurs
-     */
-    void deleteResource(Resource resource) throws Exception;
-
-    /**
-     * Delete a resource from the document.
-     * @param document The document.
-     * @param name The filename of the resource.
-     * @throws Exception if an error occurs
-     */
-    void deleteResource(Document document, String name) throws Exception;
-
-    /**
-     * Get all resources for the associated document.
-     * @param document The document.
-     * @return all resources of the associated document
-     */
-    Resource[] getResources(Document document);
-
-    /**
-     * Get the image resources for the associated document.
-     * @param document The document.
-     * @return all meta data files for the resources for the associated
-     *         document.
-     */
-    Resource[] getImageResources(Document document);
-
-    /**
-     * Deletes all resources.
-     * @param document The document.
-     */
-    void deleteResources(Document document);
-
-    /**
-     * Copies the resources of a document to another document.
-     * @param sourceDocument The source document.
-     * @param destinationDocument The destination document.
-     * @throws Exception when something went wrong.
-     */
-    void copyResources(Document sourceDocument, Document destinationDocument) throws Exception;
-
-    /**
-     * Retrieve a resource
-     * @param document The document the resource belongs to
-     * @param resourceName The name of the resource
-     * @return the resource, or null if no such resource exists.
-     */
-    Resource getResource(Document document, String resourceName);
-
-}
diff --git a/src/java/org/apache/lenya/cms/publication/SingleLanguageIdentityMapper.java b/src/java/org/apache/lenya/cms/publication/SingleLanguageIdentityMapper.java
deleted file mode 100644
index e4b526e..0000000
--- a/src/java/org/apache/lenya/cms/publication/SingleLanguageIdentityMapper.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-
-package org.apache.lenya.cms.publication;
-
-/**
- * Single Language Identity mapper.
- * Similar to the {@link DefaultDocumentIdToPathMapper}, but doesn't add 
- * a language suffix to the source URIs. This is useful for publications
- * which do not have multiple language version of the same document,
- * such as the "blog" publication.
- * @version $Id$
- */
-public class SingleLanguageIdentityMapper extends IdentityDocumentIdToPathMapper {
-
-    /**
-     * The parameter <code>language</code> is ignored, since this mapper is used for situations where only one language version of a document exists
-     * @see org.apache.lenya.cms.publication.IdentityDocumentIdToPathMapper#getSuffix(java.lang.String)
-     */
-    protected String getSuffix(String language) {
-        return ".xml";
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/publication/URLInformation.java b/src/java/org/apache/lenya/cms/publication/URLInformation.java
deleted file mode 100644
index a839926..0000000
--- a/src/java/org/apache/lenya/cms/publication/URLInformation.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.publication;
-
-/**
- * This class resolves all Lenya-specific information from a webapp URL.
- */
-public class URLInformation {
-    
-    private String publicationId = null;
-    private String area = null;
-	private String completeArea = null;
-    private String documentUrl = null;
-    
-    /**
-     * Returns the area (without the "info-" prefix).
-     * @return A string.
-     */
-    public String getArea() {
-        return this.area;
-    }
-
-	/**
-	 * Returns the complete area (including the "info-" prefix).
-	 * @return A string.
-	 */
-	public String getCompleteArea() {
-		return this.completeArea;
-	}
-
-    /**
-     * Returns the document URL.
-     * @return A string.
-     */
-    public String getDocumentUrl() {
-        return this.documentUrl;
-    }
-
-    /**
-     * Returns the publication ID.
-     * @return A string.
-     */
-    public String getPublicationId() {
-        return this.publicationId;
-    }
-
-    /**
-     * Ctor.
-     * @param webappUrl A webapp URL (without context prefix).
-     */
-    public URLInformation(String webappUrl) {
-        assert webappUrl.startsWith("/");
-        
-        String url = webappUrl.substring(1);
-        
-        String[] fragments = url.split("/");
-        this.publicationId = fragments[0];
-        
-        if (fragments.length > 1) {
-            this.completeArea = fragments[1];
-            
-            if (url.length() > (this.publicationId + "/" + this.completeArea).length()) {
-                this.documentUrl = url.substring((this.publicationId + "/" + this.completeArea).length());
-            }
-            else {
-                this.documentUrl = "";
-            }
-            
-            if (this.completeArea.startsWith(Publication.SEARCH_AREA_PREFIX)) {
-                this.area = this.completeArea.substring(Publication.SEARCH_AREA_PREFIX.length());
-            }
-            else {
-            	this.area = this.completeArea;
-            }
-        }
-    }
-    
-    
-}
diff --git a/src/java/org/apache/lenya/cms/publication/templating/ExistingSourceResolver.java b/src/java/org/apache/lenya/cms/publication/templating/ExistingSourceResolver.java
deleted file mode 100644
index 971097e..0000000
--- a/src/java/org/apache/lenya/cms/publication/templating/ExistingSourceResolver.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.publication.templating;
-
-import org.apache.excalibur.source.Source;
-
-/**
- * Source visitor to obtain the first existing source.
- * 
- * @version $Id$
- */
-public class ExistingSourceResolver implements SourceVisitor {
-    
-    private String uri;
-
-    /**
-     * Ctor.
-     */
-    public ExistingSourceResolver() {
-        super();
-    }
-    
-    /**
-     * Returns the URI of the first existing source.
-     * @return The URI
-     */
-    public String getURI() {
-        return this.uri;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.templating.SourceVisitor#visit(org.apache.excalibur.source.Source)
-     */
-    public void visit(Source source) {
-        if (this.uri == null && source.exists()) {
-            this.uri = source.getURI();
-        }
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/publication/templating/ExistingUsecaseResolver.java b/src/java/org/apache/lenya/cms/publication/templating/ExistingUsecaseResolver.java
deleted file mode 100644
index 8d2d7d8..0000000
--- a/src/java/org/apache/lenya/cms/publication/templating/ExistingUsecaseResolver.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.publication.templating;
-
-import java.io.File;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationImpl;
-
-/**
- * Publication visitor which returns the first publication implementing a certain usecase.
- * 
- * @version $Id$
- */
-public class ExistingUsecaseResolver implements PublicationVisitor {
-
-    private String usecase;
-    private Publication publication;
-
-    /**
-     * Ctor.
-     * @param _usecase The name of the usecase to resolve.
-     */
-    public ExistingUsecaseResolver(String _usecase) {
-        this.usecase = _usecase;
-    }
-
-    protected static final String ELEMENT_USECASES = "usecases";
-    protected static final String ELEMENT_USECASE = "usecase";
-    protected static final String ATTRIBUTE_NAME = "name";
-
-    /**
-     * @see org.apache.lenya.cms.publication.templating.PublicationVisitor#visit(org.apache.lenya.cms.publication.Publication)
-     */
-    public void visit(Publication _publication) {
-
-        if (this.publication == null) {
-            File configFile = new File(_publication.getDirectory(), PublicationImpl.CONFIGURATION_FILE);
-            DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
-
-            try {
-                Configuration config = builder.buildFromFile(configFile);
-                Configuration usecasesConfig = config.getChild(ELEMENT_USECASES);
-                if (usecasesConfig != null) {
-                    Configuration[] usecaseConfigs = usecasesConfig.getChildren(ELEMENT_USECASE);
-                    for (int i = 0; i < usecaseConfigs.length; i++) {
-                        String usecaseName = usecaseConfigs[i].getAttribute(ATTRIBUTE_NAME);
-                        if (usecaseName.equals(this.usecase)) {
-                            this.publication = _publication;
-                        }
-                    }
-                }
-            } catch (Exception e) {
-                throw new RuntimeException("Resolving usecases failed: ", e);
-            }
-        }
-    }
-
-    /**
-     * Returns the resolved publication.
-     * @return A publication or <code>null</code> if no publication contains the usecase.
-     */
-    public Publication getPublication() {
-        return this.publication;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/publication/templating/Instantiator.java b/src/java/org/apache/lenya/cms/publication/templating/Instantiator.java
deleted file mode 100644
index 696bdac..0000000
--- a/src/java/org/apache/lenya/cms/publication/templating/Instantiator.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.publication.templating;
-
-import org.apache.lenya.cms.publication.Publication;
-
-/**
- * Object to create an instance of a templating-enabled publication.
- * 
- * @version $Id:$
- */
-public interface Instantiator {
-
-    /**
-     * The Avalon role.
-     */
-    String ROLE = Instantiator.class.getName();
-
-    /**
-     * Instantiate a publication.
-     * @param templatePublication The template publication.
-     * @param newPublicationId The ID of the new publication instance.
-     * @param newPublicationName The name of the new publication.
-     * @throws Exception if an error occurs.
-     */
-    void instantiate(Publication templatePublication, String newPublicationId,
-            String newPublicationName) throws Exception;
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/publication/templating/PublicationTemplateManager.java b/src/java/org/apache/lenya/cms/publication/templating/PublicationTemplateManager.java
deleted file mode 100644
index 6a3ac20..0000000
--- a/src/java/org/apache/lenya/cms/publication/templating/PublicationTemplateManager.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.publication.templating;
-
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.lenya.cms.publication.Publication;
-
-/**
- * <p>
- * Component to manage publication templates.
- * </p>
- * <p>
- * When a source is obtained, the traversing order is
- * </p>
- * <ol>
- * <li>the publication itself,</li>
- * <li>all its templates,</li>
- * <li>the core.</li>
- * </ol>
- * @version $Id$
- */
-public interface PublicationTemplateManager {
-
-    /**
-     * The avalon role.
-     */
-    String ROLE = PublicationTemplateManager.class.getName();
-
-    /**
-     * <p>
-     * Visits the versions of a source in traversing order. The source doesn't have to exist to be
-     * visited.
-     * </p>
-     * @param publication The original publication.
-     * @param path The path of the source, relatively to the publication directory.
-     * @param visitor The visitor.
-     */
-    void visit(Publication publication, String path, SourceVisitor visitor);
-
-    /**
-     * Visits the publications in traversing order. The core is not visited.
-     * @param publication The original publication.
-     * @param visitor The visitor.
-     */
-    void visit(Publication publication, PublicationVisitor visitor);
-
-    /**
-     * Returns the hint for the publiation which declares a service.
-     * @param publication The original publication.
-     * @param selector The service selector.
-     * @param originalHint The original hint.
-     * @return An object.
-     * @throws ServiceException if an error occurs.
-     */
-    Object getSelectableHint(Publication publication, ServiceSelector selector, String originalHint)
-            throws ServiceException;
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/publication/templating/PublicationTemplateManagerImpl.java b/src/java/org/apache/lenya/cms/publication/templating/PublicationTemplateManagerImpl.java
deleted file mode 100644
index 2f94d4f..0000000
--- a/src/java/org/apache/lenya/cms/publication/templating/PublicationTemplateManagerImpl.java
+++ /dev/null
@@ -1,257 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.publication.templating;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.lenya.cms.publication.Publication;
-
-/**
- * Manager for publication templates.
- * 
- * @version $Id$
- */
-public class PublicationTemplateManagerImpl extends AbstractLogEnabled implements
-        PublicationTemplateManager, Serviceable {
-
-    /**
-     * Ctor.
-     */
-    public PublicationTemplateManagerImpl() {
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.templating.PublicationTemplateManager#visit(org.apache.lenya.cms.publication.Publication,
-     *      java.lang.String, org.apache.lenya.cms.publication.templating.SourceVisitor)
-     */
-    public void visit(Publication publication, String path, SourceVisitor visitor) {
-
-        SourceResolver resolver = null;
-        try {
-            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-
-            String[] baseUris = getBaseURIs(publication);
-            for (int i = 0; i < baseUris.length; i++) {
-                String uri = baseUris[i] + "/" + path;
-
-                if (getLogger().isDebugEnabled()) {
-                    getLogger().debug("Trying to resolve URI [" + uri + "]");
-                }
-
-                Source source = null;
-                try {
-                    source = resolver.resolveURI(uri);
-                    visitor.visit(source);
-                } catch (Exception e) {
-                    getLogger().error("Could not resolve URI [" + uri + "]: ", e);
-                    throw e;
-                } finally {
-                    if (source != null) {
-                        resolver.release(source);
-                    }
-                }
-            }
-
-        } catch (Exception e) {
-            throw new TemplatingException("Visiting path [" + path + "] failed: ", e);
-        } finally {
-            if (resolver != null) {
-                this.manager.release(resolver);
-            }
-        }
-
-    }
-
-    private ServiceManager manager;
-
-    /**
-     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service(ServiceManager _manager) throws ServiceException {
-        this.manager = _manager;
-    }
-
-    /**
-     * Returns the publication.
-     * @return A publication. protected Publication getPublication1() { return this.publication; }
-     */
-
-    /**
-     * Returns the base URIs in traversing order.
-     * @param publication The original publication.
-     * @return An array of strings.
-     */
-    protected String[] getBaseURIs(Publication publication) {
-
-        List uris = new ArrayList();
-
-        Publication[] publications = getPublications(publication);
-        for (int i = 0; i < publications.length; i++) {
-            uris.add(getBaseURI(publications[i]));
-        }
-
-        String coreBaseURI = "context://";
-        uris.add(coreBaseURI);
-
-        return (String[]) uris.toArray(new String[uris.size()]);
-    }
-
-    /**
-     * Returns the base URI for a certain publication.
-     * @param publication The publication.
-     * @return A string.
-     */
-    public static String getBaseURI(Publication publication) {
-        String publicationUri = "context://" + Publication.PUBLICATION_PREFIX_URI + "/"
-                + publication.getId();
-        return publicationUri;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.templating.PublicationTemplateManager#visit(org.apache.lenya.cms.publication.Publication,
-     *      org.apache.lenya.cms.publication.templating.PublicationVisitor)
-     */
-    public void visit(Publication publication, PublicationVisitor visitor) {
-        SourceResolver resolver = null;
-        try {
-            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-
-            Publication[] publications = getPublications(publication);
-            for (int i = 0; i < publications.length; i++) {
-                if (getLogger().isDebugEnabled()) {
-                    getLogger().debug("Visiting publication [" + publications[i] + "]");
-                }
-                visitor.visit(publications[i]);
-            }
-
-        } catch (Exception e) {
-            throw new TemplatingException("Visiting publications failed: ", e);
-        } finally {
-            if (resolver != null) {
-                this.manager.release(resolver);
-            }
-        }
-
-    }
-
-    /**
-     * Returns the publications in traversing order.
-     * @param publication The original publication.
-     * @return An array of strings.
-     */
-    protected Publication[] getPublications(Publication publication) {
-
-        List publications = new ArrayList();
-
-        publications.add(publication);
-
-        Publication[] templates = publication.getTemplates();
-        for (int i = 0; i < templates.length; i++) {
-            publications.add(templates[i]);
-        }
-
-        return (Publication[]) publications.toArray(new Publication[publications.size()]);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.templating.PublicationTemplateManager#getSelectableHint(org.apache.lenya.cms.publication.Publication,
-     *      org.apache.avalon.framework.service.ServiceSelector, java.lang.String)
-     */
-    public Object getSelectableHint(Publication publication, ServiceSelector selector,
-            final String originalHint) throws ServiceException {
-        PublicationTemplateManager templateManager = null;
-        Object selectableHint = null;
-
-        try {
-            ExistingServiceVisitor resolver = new ExistingServiceVisitor(selector, originalHint,
-                    getLogger());
-            visit(publication, resolver);
-            selectableHint = resolver.getSelectableHint();
-            if (selectableHint == null) {
-                selectableHint = originalHint;
-            }
-
-        } catch (Exception e) {
-            String message = "Resolving hint [" + originalHint + "] failed: ";
-            getLogger().error(message, e);
-            throw new RuntimeException(message, e);
-        } finally {
-            if (templateManager != null) {
-                this.manager.release(templateManager);
-            }
-        }
-        return selectableHint;
-    }
-
-    /**
-     * Searches for a declared service of the form "publicationId/service".
-     */
-    public class ExistingServiceVisitor implements PublicationVisitor {
-
-        /**
-         * Ctor.
-         * @param selector The service selector to use.
-         * @param hint The hint to check.
-         * @param logger The logger.
-         */
-        public ExistingServiceVisitor(ServiceSelector selector, Object hint, Logger logger) {
-            this.selector = selector;
-            this.hint = hint;
-            this.logger = logger;
-        }
-
-        private ServiceSelector selector;
-        private Object hint;
-        private Object selectableHint = null;
-        private Logger logger;
-
-        /**
-         * @see org.apache.lenya.cms.publication.templating.PublicationVisitor#visit(org.apache.lenya.cms.publication.Publication)
-         */
-        public void visit(Publication publication) {
-            String publicationHint = publication.getId() + "/" + this.hint;
-            boolean success = false;
-            if (this.selector.isSelectable(publicationHint)) {
-                this.selectableHint = publicationHint;
-                success = true;
-            }
-            if (this.logger.isDebugEnabled()) {
-                this.logger.debug("Checking hint [" + publicationHint + "]: " + success);
-            }
-        }
-
-        /**
-         * @return The publication hint that could be selected or <code>null</code> if no hint
-         *         could be selected.
-         */
-        public Object getSelectableHint() {
-            return this.selectableHint;
-        }
-
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/publication/templating/PublicationVisitor.java b/src/java/org/apache/lenya/cms/publication/templating/PublicationVisitor.java
deleted file mode 100644
index d4cdf6d..0000000
--- a/src/java/org/apache/lenya/cms/publication/templating/PublicationVisitor.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.publication.templating;
-
-import org.apache.lenya.cms.publication.Publication;
-
-/**
- * Publication visitor interface.
- * 
- * @version $Id$
- */
-public interface PublicationVisitor {
-    
-    /**
-     * Visits a publication.
-     * @param publication The publication.
-     */
-    void visit(Publication publication);
-
-}
diff --git a/src/java/org/apache/lenya/cms/publication/templating/SourceVisitor.java b/src/java/org/apache/lenya/cms/publication/templating/SourceVisitor.java
deleted file mode 100644
index e50d8f5..0000000
--- a/src/java/org/apache/lenya/cms/publication/templating/SourceVisitor.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.publication.templating;
-
-import org.apache.excalibur.source.Source;
-
-/**
- * @version $Id$
- */
-public interface SourceVisitor {
-
-    /**
-     * Visits a source.
-     * @param source The source.
-     */
-    void visit(Source source);
-
-}
diff --git a/src/java/org/apache/lenya/cms/publication/templating/TemplatingException.java b/src/java/org/apache/lenya/cms/publication/templating/TemplatingException.java
deleted file mode 100644
index 1e7bbca..0000000
--- a/src/java/org/apache/lenya/cms/publication/templating/TemplatingException.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.publication.templating;
-
-/**
- * @version $Id$
- */
-public class TemplatingException extends RuntimeException {
-
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/**
-     * Ctor.
-     */
-    public TemplatingException() {
-        super();
-    }
-    
-    /**
-     * Ctor.
-     * @param message The message.
-     */
-    public TemplatingException(String message) {
-        super(message);
-    }
-    
-    /**
-     * Ctor.
-     * @param message The message.
-     * @param cause The cause.
-     */
-    public TemplatingException(String message, Throwable cause) {
-        super(message, cause);
-    }
-    
-    /**
-     * Ctor.
-     * @param cause The cause.
-     */
-    public TemplatingException(Throwable cause) {
-        super(cause);
-    }
-    
-}
diff --git a/src/java/org/apache/lenya/cms/publication/usecases/CreatePublicationFromTemplate.java b/src/java/org/apache/lenya/cms/publication/usecases/CreatePublicationFromTemplate.java
deleted file mode 100644
index 46a9894..0000000
--- a/src/java/org/apache/lenya/cms/publication/usecases/CreatePublicationFromTemplate.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.publication.usecases;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.excalibur.source.SourceUtil;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationException;
-import org.apache.lenya.cms.publication.PublicationFactory;
-import org.apache.lenya.cms.publication.templating.Instantiator;
-import org.apache.lenya.cms.usecase.AbstractUsecase;
-
-/**
- * Create a new publication based on a template publication.
- * 
- * @version $Id:$
- */
-public class CreatePublicationFromTemplate extends AbstractUsecase {
-
-    protected static final String AVAILABLE_TEMPLATES = "availableTemplates";
-    protected static final String PUBLICATION_ID = "publicationId";
-    protected static final String PUBLICATION_NAME = "publicationName";
-    protected static final String TEMPLATE = "template";
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#initParameters()
-     */
-    protected void initParameters() {
-        super.initParameters();
-
-        PublicationFactory factory = PublicationFactory.getInstance(getLogger());
-        try {
-            Publication[] pubs = factory.getPublications(this.manager);
-            List templates = new ArrayList();
-            for (int i = 0; i < pubs.length; i++) {
-                if (pubs[i].getInstantiatorHint() != null) {
-                    templates.add(pubs[i].getId());
-                }
-            }
-            setParameter(AVAILABLE_TEMPLATES, templates);
-
-            setParameter(PUBLICATION_NAME, "New Publication");
-
-        } catch (PublicationException e) {
-            throw new RuntimeException(e);
-        }
-
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckExecutionConditions()
-     */
-    protected void doCheckExecutionConditions() throws Exception {
-        super.doCheckExecutionConditions();
-
-        String publicationId = getParameterAsString(PUBLICATION_ID);
-
-        if (publicationId.trim().equals("")) {
-            addErrorMessage("Please enter a publication ID!");
-        } else {
-            PublicationFactory factory = PublicationFactory.getInstance(getLogger());
-            Publication publication = factory.getPublication(this.manager, publicationId);
-            if (publication.exists()) {
-                addErrorMessage("A publication with this ID already exists.");
-            }
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-
-        String templateId = getParameterAsString(TEMPLATE);
-
-        SourceResolver resolver = null;
-        Source contextSource = null;
-        ServiceSelector selector = null;
-        Instantiator instantiator = null;
-
-        try {
-            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-            Source context = resolver.resolveURI("context://");
-            String contextPath = SourceUtil.getFile(context).getAbsolutePath();
-            PublicationFactory factory = PublicationFactory.getInstance(getLogger());
-
-            Publication template = factory.getPublication(templateId, contextPath);
-            String name = getParameterAsString(PUBLICATION_NAME);
-
-            selector = (ServiceSelector) this.manager.lookup(Instantiator.ROLE + "Selector");
-            instantiator = (Instantiator) selector.select(template.getInstantiatorHint());
-
-            instantiator.instantiate(template, getParameterAsString(PUBLICATION_ID), name);
-
-        } finally {
-            if (selector != null) {
-                if (instantiator != null) {
-                    selector.release(instantiator);
-                }
-                this.manager.release(selector);
-            }
-            if (resolver != null) {
-                if (contextSource != null) {
-                    resolver.release(contextSource);
-                }
-                this.manager.release(resolver);
-            }
-        }
-
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/publication/util/Collection.java b/src/java/org/apache/lenya/cms/publication/util/Collection.java
deleted file mode 100644
index 6083bf5..0000000
--- a/src/java/org/apache/lenya/cms/publication/util/Collection.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.publication.util;
-
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentException;
-
-/**
- * A document representing a collection of documents.
- * This class is in prototyping stage.
- */
-public interface Collection extends Document {
-
-    /** collection namespace */
-    String NAMESPACE = "http://apache.org/cocoon/lenya/collection/1.0";
-    
-    /** default namespace prefix */
-    String DEFAULT_PREFIX = "col";
-    
-    /** document element */
-    String ELEMENT_COLLECTION = "collection";
-    
-    /** element for single document references */
-    String ELEMENT_DOCUMENT = "document";
-    
-    /** attribute for document IDs */
-    String ATTRIBUTE_ID = "id";
-
-    /**
-     * Returns the documents in this collection.
-     * @return An array of documents.
-     * @throws DocumentException when something went wrong.
-     */
-    Document[] getDocuments() throws DocumentException;
-
-    /**
-     * Adds a document to the collection.
-     * @param document A document.
-     * @throws DocumentException when an error occurs.
-     */
-    void add(Document document) throws DocumentException;
-
-    /**
-     * Inserts a document into the collection at a specific position.
-     * @param document A document.
-     * @param position The position of the document after insertion,
-     * starting with 0.
-     * @throws DocumentException when something went wrong.
-     */
-    void add(int position, Document document) throws DocumentException;
-
-    /**
-     * Removes a document from the collection.
-     * @param document A document.
-     * @throws DocumentException when the document is not contained
-     * or another error occurs.
-     */
-    void remove(Document document) throws DocumentException;
-    
-    /**
-     * Removes all documents from this collection.
-     * @throws DocumentException when something went wrong.
-     */
-    void clear() throws DocumentException;
-    
-    /**
-     * Checks if this collection contains a specific document.
-     * @param document The document to check.
-     * @return A boolean value.
-     * @throws DocumentException when something went wrong.
-     */
-    boolean contains(Document document) throws DocumentException;
-    
-    /**
-     * Returns the first position of this document in the collection.
-     * @param document The document.
-     * @return An integer.
-     * @throws DocumentException when the document is not contained.
-     */
-    int getFirstPosition(Document document) throws DocumentException;
-    
-    /**
-     * Returns the number of documents in this collection.
-     * @return An integer value.
-     * @throws DocumentException when something went wrong.
-     */
-    int size() throws DocumentException;
-    
-}
diff --git a/src/java/org/apache/lenya/cms/publication/util/CollectionImpl.java b/src/java/org/apache/lenya/cms/publication/util/CollectionImpl.java
deleted file mode 100644
index 5290ef1..0000000
--- a/src/java/org/apache/lenya/cms/publication/util/CollectionImpl.java
+++ /dev/null
@@ -1,302 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.publication.util;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.lenya.cms.publication.DefaultDocument;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentBuildException;
-import org.apache.lenya.cms.publication.DocumentException;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.transaction.TransactionException;
-import org.apache.lenya.xml.DocumentHelper;
-import org.apache.lenya.xml.NamespaceHelper;
-import org.apache.xpath.XPathAPI;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
-
-/**
- * Implementation of a Collection.
- * @version $Id$
- */
-public class CollectionImpl extends DefaultDocument implements Collection {
-
-    /**
-     * Ctor.
-     * @param manager The service manager.
-     * @param map A document identity map.
-     * @param publication The publication.
-     * @param id The document ID.
-     * @param area The area the document belongs to.
-     * @param _logger a logger
-     * @throws DocumentException when something went wrong.
-     */
-    public CollectionImpl(ServiceManager manager, DocumentIdentityMap map, Publication publication,
-            String id, String area, Logger _logger) throws DocumentException {
-        super(manager, map, publication, id, area, _logger);
-    }
-
-    /**
-     * Ctor.
-     * @param manager The service manager.
-     * @param map A document identity map.
-     * @param publication The publication.
-     * @param id The document ID.
-     * @param area The area the document belongs to.
-     * @param language The language of the document.
-     * @param _logger a logger
-     * @throws DocumentException when something went wrong.
-     */
-    public CollectionImpl(ServiceManager manager, DocumentIdentityMap map, Publication publication,
-            String id, String area, String language, Logger _logger) throws DocumentException {
-        super(manager, map, publication, id, area, language, _logger);
-    }
-
-    private List documentsList = new ArrayList();
-
-    /**
-     * Returns the list that holds the documents. Use this method to invoke lazy loading.
-     * @return A list.
-     * @throws DocumentException when something went wrong.
-     */
-    protected List documents() throws DocumentException {
-        load();
-        return this.documentsList;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.util.Collection#getDocuments()
-     */
-    public Document[] getDocuments() throws DocumentException {
-        return (Document[]) documents().toArray(new Document[documents().size()]);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.util.Collection#add(org.apache.lenya.cms.publication.Document)
-     */
-    public void add(Document document) throws DocumentException {
-        documents().add(document);
-        try {
-            save();
-        } catch (TransactionException e) {
-            throw new DocumentException(e);
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.util.Collection#add(int,
-     *      org.apache.lenya.cms.publication.Document)
-     */
-    public void add(int position, Document document) throws DocumentException {
-        documents().add(position, document);
-        try {
-            save();
-        } catch (TransactionException e) {
-            throw new DocumentException(e);
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.util.Collection#remove(org.apache.lenya.cms.publication.Document)
-     */
-    public void remove(Document document) throws DocumentException {
-        if (!documents().contains(document)) {
-            throw new DocumentException("Collection [" + this + "] does not contain document ["
-                    + document + "]");
-        }
-        documents().remove(document);
-        try {
-            save();
-        } catch (TransactionException e) {
-            throw new DocumentException(e);
-        }
-    }
-
-    private boolean isLoaded = false;
-
-    /**
-     * Loads the collection from its XML source.
-     * @throws DocumentException when something went wrong.
-     */
-    protected void load() throws DocumentException {
-        if (!this.isLoaded) {
-            getLogger().debug("Loading: ", new DocumentException());
-            NamespaceHelper helper;
-            try {
-                helper = getNamespaceHelper();
-
-                Element collectionElement = helper.getDocument().getDocumentElement();
-                Element[] documentElements = helper
-                        .getChildren(collectionElement, ELEMENT_DOCUMENT);
-
-                for (int i = 0; i < documentElements.length; i++) {
-                    Element documentElement = documentElements[i];
-                    Document document = loadDocument(documentElement);
-                    this.documentsList.add(document);
-                }
-            } catch (DocumentException e) {
-                throw e;
-            } catch (Exception e) {
-                throw new DocumentException(e);
-            }
-            this.isLoaded = true;
-        }
-    }
-
-    /**
-     * Loads a document from an XML element.
-     * @param documentElement The XML element.
-     * @return A document.
-     * @throws DocumentBuildException when something went wrong.
-     */
-    protected Document loadDocument(Element documentElement) throws DocumentBuildException {
-        String documentId = documentElement.getAttribute(ATTRIBUTE_ID);
-        Document document = getIdentityMap().get(getPublication(),
-                getArea(),
-                documentId,
-                getLanguage());
-        return document;
-    }
-
-    /**
-     * Saves the collection. 
-     * @throws TransactionException if an error occurs.
-     */
-    public void save() throws TransactionException {
-        try {
-
-            NamespaceHelper helper = getNamespaceHelper();
-            Element collectionElement = helper.getDocument().getDocumentElement();
-            if (collectionElement.getAttributeNS(null, ATTRIBUTE_ID) == null
-                    | collectionElement.getAttribute(ATTRIBUTE_ID).equals("")) {
-                collectionElement.setAttributeNS(null, ATTRIBUTE_ID, this.getId());
-            }
-            Element[] existingDocumentElements = helper.getChildren(collectionElement,
-                    ELEMENT_DOCUMENT);
-            for (int i = 0; i < existingDocumentElements.length; i++) {
-                collectionElement.removeChild(existingDocumentElements[i]);
-            }
-
-            collectionElement.normalize();
-
-            NodeList emptyTextNodes = XPathAPI.selectNodeList(collectionElement, "text()");
-            for (int i = 0; i < emptyTextNodes.getLength(); i++) {
-                Node node = emptyTextNodes.item(i);
-                node = collectionElement.removeChild(node);
-            }
-
-            Document[] documents = getDocuments();
-            for (int i = 0; i < documents.length; i++) {
-                Element documentElement = createDocumentElement(documents[i], helper);
-                collectionElement.appendChild(documentElement);
-            }
-            DocumentHelper.writeDocument(helper.getDocument(), getFile());
-
-        } catch (Exception e) {
-            throw new TransactionException(e);
-        }
-    }
-
-    /**
-     * Creates an element to store a document.
-     * @param helper The namespace helper of the document.
-     * @param document The document.
-     * @return An XML element.
-     * @throws DocumentException when something went wrong.
-     */
-    protected Element createDocumentElement(Document document, NamespaceHelper helper)
-            throws DocumentException {
-        try {
-            Element documentElement = helper.createElement(ELEMENT_DOCUMENT);
-            documentElement.setAttributeNS(null, ATTRIBUTE_ID, document.getId());
-            return documentElement;
-        } catch (final DOMException e) {
-            throw new DocumentException(e);
-        }
-    }
-
-    /**
-     * Returns the namespace helper for the XML source.
-     * @return A namespace helper.
-     * @throws DocumentException when something went wrong.
-     * @throws ParserConfigurationException when something went wrong.
-     * @throws SAXException when something went wrong.
-     * @throws IOException when something went wrong.
-     */
-    protected NamespaceHelper getNamespaceHelper() throws DocumentException,
-            ParserConfigurationException, SAXException, IOException {
-
-        NamespaceHelper helper;
-
-        if (exists()) {
-            File file = getFile();
-            org.w3c.dom.Document document = DocumentHelper.readDocument(file);
-            helper = new NamespaceHelper(Collection.NAMESPACE, Collection.DEFAULT_PREFIX, document);
-        } else {
-            helper = new NamespaceHelper(Collection.NAMESPACE, Collection.DEFAULT_PREFIX,
-                    ELEMENT_COLLECTION);
-        }
-        return helper;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.util.Collection#contains(org.apache.lenya.cms.publication.Document)
-     */
-    public boolean contains(Document document) throws DocumentException {
-        return documents().contains(document);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.util.Collection#clear()
-     */
-    public void clear() throws DocumentException {
-        documents().clear();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.util.Collection#getFirstPosition(org.apache.lenya.cms.publication.Document)
-     */
-    public int getFirstPosition(Document document) throws DocumentException {
-        load();
-        if (!contains(document)) {
-            throw new DocumentException("The collection [" + this
-                    + "] does not contain the document [" + document + "]");
-        }
-        return documents().indexOf(document);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.util.Collection#size()
-     */
-    public int size() throws DocumentException {
-        return documents().size();
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/publication/util/DocumentHelper.java b/src/java/org/apache/lenya/cms/publication/util/DocumentHelper.java
deleted file mode 100644
index 0db6644..0000000
--- a/src/java/org/apache/lenya/cms/publication/util/DocumentHelper.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.publication.util;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.avalon.framework.logger.ConsoleLogger;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.cocoon.ProcessingException;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Request;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentBuildException;
-import org.apache.lenya.cms.publication.DocumentException;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.PageEnvelope;
-import org.apache.lenya.cms.publication.PageEnvelopeException;
-import org.apache.lenya.cms.publication.PageEnvelopeFactory;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationException;
-import org.apache.lenya.cms.publication.PublicationFactory;
-import org.apache.lenya.cms.publication.URLInformation;
-import org.apache.lenya.util.ServletHelper;
-
-/**
- * Helper class to handle documents from XSP.
- */
-public class DocumentHelper {
-
-    private Map objectModel;
-    private DocumentIdentityMap identityMap;
-    private Publication publication;
-
-    /**
-     * Ctor.
-     * @param manager The service manager.
-     * @param _objectModel The Cocoon object model.
-     */
-    public DocumentHelper(ServiceManager manager, Map _objectModel) {
-        this.objectModel = _objectModel;
-        try {
-            PublicationFactory factory = PublicationFactory.getInstance(new ConsoleLogger());
-            this.publication = factory.getPublication(_objectModel);
-        } catch (PublicationException e) {
-            throw new RuntimeException(e);
-        }
-        this.identityMap = new DocumentIdentityMap(manager, new ConsoleLogger());
-    }
-
-    /**
-     * Creates a document URL. <br/>If the document ID is null, the current document ID is used.
-     * <br/>If the document area is null, the current area is used. <br/>If the language is null,
-     * the current language is used.
-     * @param documentId The target document ID.
-     * @param documentArea The target area.
-     * @param language The target language.
-     * @return A string.
-     * @throws ProcessingException if something went wrong.
-     */
-    public String getDocumentUrl(String documentId, String documentArea, String language)
-            throws ProcessingException {
-
-        String url = null;
-
-        try {
-            PageEnvelope envelope = PageEnvelopeFactory.getInstance()
-                    .getPageEnvelope(this.identityMap, this.objectModel);
-
-            if (documentId == null) {
-                documentId = envelope.getDocument().getId();
-            }
-
-            Request request = ObjectModelHelper.getRequest(this.objectModel);
-
-            if (documentArea == null) {
-                String webappUrl = ServletHelper.getWebappURI(request);
-                URLInformation info = new URLInformation(webappUrl);
-                String completeArea = info.getCompleteArea();
-                documentArea = completeArea;
-            }
-
-            if (language == null) {
-                language = envelope.getDocument().getLanguage();
-            }
-
-            Document document = this.identityMap.get(this.publication,
-                    documentArea,
-                    documentId,
-                    language);
-            url = document.getCanonicalWebappURL();
-
-            String contextPath = request.getContextPath();
-            if (contextPath == null) {
-                contextPath = "";
-            }
-
-            url = contextPath + url;
-        } catch (final DocumentBuildException e) {
-            throw new ProcessingException(e);
-        } catch (final PageEnvelopeException e) {
-            throw new ProcessingException(e);
-        }
-
-        return url;
-
-    }
-
-    /**
-     * Returns the complete URL of the parent document. If the document is a top-level document, the
-     * /index document is chosen. If the parent does not exist in the appropriate language, the
-     * default language is chosen.
-     * @return A string.
-     * @throws ProcessingException when something went wrong.
-     */
-    public String getCompleteParentUrl() throws ProcessingException {
-
-        String parentUrl;
-        String contextPath;
-        try {
-            PageEnvelope envelope = PageEnvelopeFactory.getInstance()
-                    .getPageEnvelope(this.identityMap, this.objectModel);
-            Document document = envelope.getDocument();
-
-            Request request = ObjectModelHelper.getRequest(this.objectModel);
-            contextPath = request.getContextPath();
-
-            Document parent = this.identityMap.getParent(document, "/index");
-            parentUrl = parent.getCanonicalWebappURL();
-        } catch (final DocumentBuildException e) {
-            throw new ProcessingException(e);
-        } catch (final PageEnvelopeException e) {
-            throw new ProcessingException(e);
-        }
-
-        if (contextPath == null) {
-            contextPath = "";
-        }
-
-        return contextPath + parentUrl;
-    }
-
-    /**
-     * Returns an existing language version of a document. If the document exists in the default
-     * language, the default language version is returned. Otherwise, a random language version is
-     * returned. If no language version exists, a DocumentException is thrown.
-     * 
-     * @param document The document.
-     * @return A document.
-     * @throws DocumentException when an error occurs.
-     */
-    public static Document getExistingLanguageVersion(Document document) throws DocumentException {
-        return getExistingLanguageVersion(document, document.getPublication().getDefaultLanguage());
-    }
-
-    /**
-     * Returns an existing language version of a document. If the document exists in the preferred
-     * language, this version is returned. Otherwise, if the document exists in the default
-     * language, the default language version is returned. Otherwise, a random language version is
-     * returned. If no language version exists, a DocumentException is thrown.
-     * 
-     * @param document The document.
-     * @param preferredLanguage The preferred language.
-     * @return A document.
-     * @throws DocumentException when an error occurs.
-     */
-    public static Document getExistingLanguageVersion(final Document document,
-            String preferredLanguage) throws DocumentException {
-
-        Publication publication = document.getPublication();
-
-        String[] languages = document.getLanguages();
-
-        if (languages.length == 0) {
-            throw new DocumentException("The document [" + document.getId()
-                    + "] does not exist in any language!");
-        }
-
-        List languageList = Arrays.asList(languages);
-
-        String existingLanguage = null;
-
-        if (languageList.contains(preferredLanguage)) {
-            existingLanguage = preferredLanguage;
-        } else if (languageList.contains(publication.getDefaultLanguage())) {
-            existingLanguage = publication.getDefaultLanguage();
-        } else {
-            existingLanguage = languages[0];
-        }
-
-        Document existingVersion = null;
-        try {
-            existingVersion = document.getIdentityMap().getLanguageVersion(document,
-                    existingLanguage);
-        } catch (DocumentBuildException e) {
-            throw new DocumentException(e);
-        }
-
-        return existingVersion;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/publication/util/DocumentLanguagesHelper.java b/src/java/org/apache/lenya/cms/publication/util/DocumentLanguagesHelper.java
deleted file mode 100644
index a8cbad3..0000000
--- a/src/java/org/apache/lenya/cms/publication/util/DocumentLanguagesHelper.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.publication.util;
-
-import java.util.Map;
-
-import org.apache.cocoon.ProcessingException;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentBuildException;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.PageEnvelope;
-import org.apache.lenya.cms.publication.PageEnvelopeException;
-import org.apache.lenya.cms.publication.PageEnvelopeFactory;
-
-/**
- * Helper class for the policy GUI.
- */
-public class DocumentLanguagesHelper {
-
-    private PageEnvelope pageEnvelope = null;
-    private DocumentIdentityMap identityMap;
-
-    /**
-     * Create a new DocumentlanguageHelper.
-     * @param map The identity map.
-     * @param objectModel the objectModel
-     * @throws ProcessingException if the page envelope could not be created.
-     */
-    public DocumentLanguagesHelper(DocumentIdentityMap map, Map objectModel)
-            throws ProcessingException {
-        try {
-            this.identityMap = map;
-            this.pageEnvelope = PageEnvelopeFactory.getInstance().getPageEnvelope(map, objectModel);
-        } catch (PageEnvelopeException e) {
-            throw new ProcessingException(e);
-        }
-    }
-
-    /**
-     * Compute the URL for a given language and the parameters given in the contructor.
-     * @param language the language
-     * @return the url for the given language
-     * @throws ProcessingException if the document for the given language could not be created.
-     */
-    public String getUrl(String language) throws ProcessingException {
-        Document doc = getDocument(language);
-        return this.pageEnvelope.getContext() + doc.getCanonicalWebappURL();
-    }
-
-    /**
-     * Create a document for a given language and the parameters given in the contructor.
-     * @param language the language
-     * @return the document with the given language
-     * @throws ProcessingException if the document for the given language could not be created.
-     */
-    protected Document getDocument(String language) throws ProcessingException {
-        Document document;
-        try {
-            document = this.identityMap.getLanguageVersion(this.pageEnvelope.getDocument(),
-                    language);
-        } catch (DocumentBuildException e) {
-            throw new ProcessingException(e);
-        }
-        return document;
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/publication/util/DocumentReferencesHelper.java b/src/java/org/apache/lenya/cms/publication/util/DocumentReferencesHelper.java
deleted file mode 100644
index f027a03..0000000
--- a/src/java/org/apache/lenya/cms/publication/util/DocumentReferencesHelper.java
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.publication.util;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.regex.Pattern;
-
-import org.apache.cocoon.ProcessingException;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentBuildException;
-import org.apache.lenya.cms.publication.DocumentDoesNotExistException;
-import org.apache.lenya.cms.publication.DocumentException;
-import org.apache.lenya.cms.publication.DocumentIdToPathMapper;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.PageEnvelope;
-import org.apache.lenya.cms.publication.PageEnvelopeException;
-import org.apache.lenya.cms.publication.PageEnvelopeFactory;
-import org.apache.lenya.cms.publication.PathToDocumentIdMapper;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.search.Grep;
-import org.apache.log4j.Logger;
-
-/**
- * Helper class for finding references to the current document.
- */
-public class DocumentReferencesHelper {
-
-    private static final Logger log = Logger.getLogger(DocumentReferencesHelper.class);
-
-    private PageEnvelope pageEnvelope = null;
-    private DocumentIdentityMap identityMap;
-
-    /**
-     * Create a new DocumentReferencesHelper
-     * @param map The identity map.
-     * @param objectModel the objectModel
-     * 
-     * @throws ProcessingException if the page envelope could not be created.
-     */
-    public DocumentReferencesHelper(DocumentIdentityMap map, Map objectModel)
-            throws ProcessingException {
-        this.identityMap = map;
-        try {
-            this.pageEnvelope = PageEnvelopeFactory.getInstance().getPageEnvelope(map, objectModel);
-        } catch (PageEnvelopeException e) {
-            throw new ProcessingException(e);
-        }
-    }
-
-    /**
-     * Construct a search string for the search of references, i.e. links from other documents to
-     * the current document. This is done using the assumption that internal links look as if they
-     * were copied directly from the browser, e.g. /lenya/default/authoring/doctypes/2columns.html
-     * 
-     * @return the search string
-     */
-    protected String getReferencesSearchString() {
-        return "href\\s*=\\s*\"" + this.pageEnvelope.getContext() + "/"
-                + this.pageEnvelope.getPublication().getId() + "/"
-                + this.pageEnvelope.getDocument().getArea()
-                + this.pageEnvelope.getDocument().getId();
-    }
-
-    /**
-     * Construct a search string for the search of internal references, i.e from the current
-     * document to others. This is done using the assumption that internal links look as if they
-     * were copied directly from the browser, e.g. /lenya/default/authoring/doctypes/2columns.html
-     * 
-     * @return the search string
-     */
-    protected Pattern getInternalLinkPattern() {
-        // FIXME: The following method is not very robust and certainly
-        // will fail if the mapping between URL and document-id changes
-
-        // Link Management now assumes that internal links are of the
-        // form
-        // href="$CONTEXT_PREFIX/$PUBLICATION_ID/$AREA$DOCUMENT_ID(_[a-z][a-z])?.html
-        // If there is a match in a document file it is assumed that
-        // this is an internal link and is treated as such (warning if
-        // publish with unpublished internal links and warning if
-        // deactivate with internal references).
-
-        // However this is not coordinated with the
-        // DocumentToPathMapper and will probably fail if the URL
-        // looks different.
-
-        return Pattern.compile("href\\s*=\\s*\"" + this.pageEnvelope.getContext() + "/"
-                + this.pageEnvelope.getPublication().getId() + "/"
-                + this.pageEnvelope.getDocument().getArea()
-                + "(/[-a-zA-Z0-9_/]+?)(_[a-z][a-z])?\\.html");
-    }
-
-    /**
-     * Find a list of document-ids which have references to the current document.
-     * @param area The area.
-     * 
-     * @return an <code>array</code> of documents if there are references, an empty
-     *         <code>array</code> otherwise
-     * 
-     * @throws ProcessingException if the search for references failed.
-     */
-    public Document[] getReferences(String area) throws ProcessingException {
-
-        ArrayList documents = new ArrayList();
-        Publication publication = this.pageEnvelope.getPublication();
-        DocumentIdToPathMapper mapper = publication.getPathMapper();
-        if (mapper instanceof PathToDocumentIdMapper) {
-            PathToDocumentIdMapper fileMapper = (PathToDocumentIdMapper) mapper;
-            String documentId = null;
-            String language = null;
-            File[] inconsistentFiles;
-            try {
-                inconsistentFiles = Grep.find(publication.getContentDirectory(area),
-                        getReferencesSearchString());
-                for (int i = 0; i < inconsistentFiles.length; i++) {
-                    // for performance reasons the getReferencesSearchString()
-                    // is
-                    // constructed in a way such that it will catch all files
-                    // which
-                    // have a link to any language version of the current
-                    // document.
-                    // That's why we need to do some additional tests for each
-                    // hit.
-                    String languageOfCurrentDocument = this.pageEnvelope.getDocument()
-                            .getLanguage();
-                    String defaultLanguage = this.pageEnvelope.getPublication()
-                            .getDefaultLanguage();
-                    Pattern referencesSearchStringWithLanguage = Pattern
-                            .compile(getReferencesSearchString() + "_" + languageOfCurrentDocument);
-                    Pattern referencesSearchStringWithOutLanguage = Pattern
-                            .compile(getReferencesSearchString() + "\\.html");
-                    log.debug("languageOfCurrentDocument: " + languageOfCurrentDocument);
-                    log.debug("defaultLanguage: " + defaultLanguage);
-                    log.debug("referencesSearchStringWithOutLanguage: "
-                            + referencesSearchStringWithOutLanguage.pattern());
-                    log.debug("referencesSearchStringWithLanguage: "
-                            + referencesSearchStringWithLanguage.pattern());
-                    // a link is indeed to the current document if the following
-                    // conditions
-                    // are met:
-                    // 1. the link is to foo_xx and the language of the current
-                    //    document is xx.
-                    // 2. or the link is to foo.html and the language of the
-                    // current
-                    //    document is the default language.
-                    // Now negate the expression because we continue if above
-                    // (1) and (2) are
-                    // false, and you'll get the following if statement
-                    if (!Grep.containsPattern(inconsistentFiles[i],
-                            referencesSearchStringWithLanguage)
-                            && !(Grep.containsPattern(inconsistentFiles[i],
-                                    referencesSearchStringWithOutLanguage) && languageOfCurrentDocument
-                                    .equals(defaultLanguage))) {
-                        // the reference foo_xx is neither to the language of
-                        // the current
-                        // document.
-                        // nor is the reference foo.html and the current
-                        // document is in the
-                        // default language.
-                        // So the reference is of no importance to us, skip
-                        continue;
-                    }
-
-                    documentId = fileMapper.getDocumentId(publication, area, inconsistentFiles[i]);
-                    log.debug("documentId: " + documentId);
-
-                    language = fileMapper.getLanguage(inconsistentFiles[i]);
-                    if (language == null) {
-                        language = publication.getDefaultLanguage();
-                    }
-                    log.debug("language: " + language);
-
-                    documents.add(this.identityMap.get(publication, area, documentId, language));
-                }
-            } catch (IOException e) {
-                throw new ProcessingException(e);
-            } catch (DocumentDoesNotExistException e) {
-                throw new ProcessingException(e);
-            } catch (DocumentBuildException e) {
-                throw new ProcessingException(e);
-            }
-        }
-        return (Document[]) documents.toArray(new Document[documents.size()]);
-    }
-
-    /**
-     * Find all internal references in the current document to documents which have not been
-     * published yet.
-     * 
-     * @return an <code>array</code> of <code>Document</code> of references from the current
-     *         document to documents which have not been published yet.
-     * 
-     * @throws ProcessingException if the current document cannot be opened.
-     */
-    public Document[] getInternalReferences() throws ProcessingException {
-        ArrayList unpublishedReferences = new ArrayList();
-        Pattern internalLinkPattern = getInternalLinkPattern();
-        Publication publication = this.pageEnvelope.getPublication();
-        try {
-            String[] internalLinks = Grep.findPattern(this.pageEnvelope.getDocument().getFile(),
-                    internalLinkPattern,
-                    1);
-            String[] internalLinksLanguages = Grep.findPattern(this.pageEnvelope.getDocument()
-                    .getFile(), internalLinkPattern, 2);
-
-            for (int i = 0; i < internalLinks.length; i++) {
-                String docId = internalLinks[i];
-                String language = null;
-
-                log.debug("docId: " + docId);
-                if (internalLinksLanguages[i] != null) {
-                    // trim the leading '_'
-                    language = internalLinksLanguages[i].substring(1);
-                }
-
-                if (language == null) {
-                    language = publication.getDefaultLanguage();
-                }
-                log.debug("language: " + language);
-
-                Document liveDocument = this.identityMap.get(publication,
-                        Publication.LIVE_AREA,
-                        docId,
-                        language);
-                if (!liveDocument.exists()) {
-                    // the docId has not been published for the given language
-                    String liveLanguage = language;
-                    if (liveLanguage == null) {
-                        liveLanguage = publication.getDefaultLanguage();
-                    }
-                    unpublishedReferences.add(this.identityMap.getLanguageVersion(liveDocument,
-                            liveLanguage));
-                }
-            }
-        } catch (final DocumentBuildException e) {
-            throw new ProcessingException(e);
-        } catch (final DocumentException e) {
-            throw new ProcessingException(e);
-        } catch (final IOException e) {
-            throw new ProcessingException(e);
-        }
-
-        return (Document[]) unpublishedReferences
-                .toArray(new Document[unpublishedReferences.size()]);
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/publication/util/DocumentSet.java b/src/java/org/apache/lenya/cms/publication/util/DocumentSet.java
deleted file mode 100644
index 530645a..0000000
--- a/src/java/org/apache/lenya/cms/publication/util/DocumentSet.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.publication.util;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.PublicationException;
-
-/**
- * An ordered set of documents without duplicates.
- */
-public class DocumentSet {
-
-    /**
-	 * Ctor.
-	 */
-    public DocumentSet() {
-	    // do nothing
-    }
-    
-    /**
-     * Ctor.
-     * @param _documents The initial documents.
-     */
-    public DocumentSet(Document[] _documents) {
-        for (int i = 0; i < _documents.length; i++) {
-            add(_documents[i]);
-        }
-    }
-
-    private List documents = new ArrayList();
-    
-    /**
-     * Returns the list object that stores the documents.
-     * @return A list.
-     */
-    protected List getList() {
-        return this.documents;
-    }
-
-    /**
-	 * Returns the documents contained in this set.
-	 * 
-	 * @return An array of documents.
-	 */
-    public Document[] getDocuments() {
-        return (Document[]) this.documents.toArray(new Document[this.documents.size()]);
-    }
-
-    /**
-	 * Adds a document to this set.
-	 * @param document The document to add.
-	 */
-    public void add(Document document) {
-        assert document != null;
-        assert !this.documents.contains(document);
-        this.documents.add(document);
-    }
-
-    /**
-	 * Checks if this set is empty.
-	 * @return A boolean value.
-	 */
-    public boolean isEmpty() {
-        return getList().isEmpty();
-    }
-    
-    /**
-     * Visits the set.
-     * @param visitor The visitor.
-     * @throws PublicationException if an error occurs during visiting.
-     */
-    public void visit(DocumentVisitor visitor) throws PublicationException {
-        Document[] resources = getDocuments();
-        for (int i = 0; i < resources.length; i++) {
-            resources[i].accept(visitor);
-        }
-    }
-
-    /**
-     * Removes a document.
-     * @param resource The document.
-     * @throws PublicationException if an error occurs.
-     */
-    public void remove(Document resource) throws PublicationException {
-        assert resource != null;
-        assert getList().contains(resource);
-        getList().remove(resource);
-    }
-    
-    /**
-     * Removes all documents.
-     */
-    public void clear() {
-        getList().clear();
-    }
-    
-    /**
-     * Reverses the document order.
-     */
-    public void reverse() {
-        Collections.reverse(getList());
-    }
-    
-}
diff --git a/src/java/org/apache/lenya/cms/publication/util/DocumentVisitor.java b/src/java/org/apache/lenya/cms/publication/util/DocumentVisitor.java
deleted file mode 100644
index 3d39439..0000000
--- a/src/java/org/apache/lenya/cms/publication/util/DocumentVisitor.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.publication.util;
-
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.PublicationException;
-
-/**
- * Visitor for resources.
- * 
- */
-public interface DocumentVisitor {
-
-    /**
-     * Visits a resource.
-     * @param document The resource.
-     * @throws PublicationException if something went wrong.
-     */
-    void visitDocument(Document document) throws PublicationException;
-
-}
diff --git a/src/java/org/apache/lenya/cms/publication/util/LanguageVersions.java b/src/java/org/apache/lenya/cms/publication/util/LanguageVersions.java
deleted file mode 100644
index f0d7b32..0000000
--- a/src/java/org/apache/lenya/cms/publication/util/LanguageVersions.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.publication.util;
-
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentBuildException;
-import org.apache.lenya.cms.publication.DocumentException;
-
-/**
- * Document set containing all language versions of a document.
- */
-public class LanguageVersions extends DocumentSet {
-
-    /**
-     * Ctor.
-     * @param document The document.
-     * @throws DocumentException when something went wrong.
-     */
-    public LanguageVersions(Document document) throws DocumentException {
-        String[] languages = document.getLanguages();
-        add(document);
-
-        for (int i = 0; i < languages.length; i++) {
-            if (!document.getLanguage().equals(languages[i])) {
-                Document languageVersion;
-                try {
-                    languageVersion = document.getIdentityMap()
-                            .getLanguageVersion(document, languages[i]);
-                } catch (DocumentBuildException e) {
-                    throw new DocumentException(e);
-                }
-                add(languageVersion);
-            }
-        }
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/publication/util/XlinkCollection.java b/src/java/org/apache/lenya/cms/publication/util/XlinkCollection.java
deleted file mode 100644
index df29954..0000000
--- a/src/java/org/apache/lenya/cms/publication/util/XlinkCollection.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.publication.util;
-
-import java.io.IOException;
-
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentException;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.xml.NamespaceHelper;
-import org.apache.lenya.xml.XLink;
-import org.w3c.dom.Element;
-import org.xml.sax.SAXException;
-
-/**
- * Implementation of a Collection. In the collection are xlink inserted.
- * @version $Id$
- */
-public class XlinkCollection extends CollectionImpl {
-
-    /**
-     * Ctor.
-     * @param manager The service manager.
-     * @param map A document identity map.
-     * @param publication The publication.
-     * @param id The document ID.
-     * @param area The area the document belongs to.
-     * @param _logger a logger
-     * @throws DocumentException when something went wrong.
-     */
-    public XlinkCollection(ServiceManager manager, DocumentIdentityMap map,
-            Publication publication, String id, String area, Logger _logger) throws DocumentException {
-        super(manager, map, publication, id, area, _logger);
-    }
-
-    /**
-     * Ctor.
-     * @param manager The service manager.
-     * @param map A document identity map.
-     * @param publication The publication.
-     * @param id The document ID.
-     * @param area The area the document belongs to.
-     * @param language The language of the document.
-     * @param _logger a logger
-     * @throws DocumentException when something went wrong.
-     */
-    public XlinkCollection(ServiceManager manager, DocumentIdentityMap map,
-            Publication publication, String id, String area, String language, Logger _logger)
-            throws DocumentException {
-        super(manager, map, publication, id, area, language, _logger);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.util.CollectionImpl#createDocumentElement(org.apache.lenya.cms.publication.Document,
-     *      org.apache.lenya.xml.NamespaceHelper)
-     */
-    protected Element createDocumentElement(Document document, NamespaceHelper helper)
-            throws DocumentException {
-        Element element = super.createDocumentElement(document, helper);
-        String path = getXlinkHref(document);
-        element.setAttributeNS(XLink.XLINK_NAMESPACE, "xlink:" + XLink.ATTRIBUTE_HREF, path);
-        element.setAttributeNS(XLink.XLINK_NAMESPACE, "xlink:" + XLink.ATTRIBUTE_SHOW, "embed");
-        element.normalize();
-        return element;
-    }
-
-    /**
-     * Returns the href attribute string for a certain document.
-     * @param document The document.
-     * @return A string.
-     * @throws DocumentException when something went wrong.
-     */
-    protected String getXlinkHref(Document document) throws DocumentException {
-        String path = null;
-        try {
-            path = document.getFile().getCanonicalPath();
-        } catch (IOException e) {
-            throw new DocumentException("Couldn't found the file path for the document ["
-                    + document + "]", e);
-        }
-        return path;
-    }
-
-    /**
-     * Adds the XLink namespace declaration to the document element.
-     * @see org.apache.lenya.cms.publication.util.CollectionImpl#getNamespaceHelper()
-     */
-    protected NamespaceHelper getNamespaceHelper() throws DocumentException,
-            ParserConfigurationException, SAXException, IOException {
-        NamespaceHelper helper = super.getNamespaceHelper();
-        if (!exists()) {
-            Element collectionElement = helper.getDocument().getDocumentElement();
-            String namespaceDeclaration = collectionElement
-                    .getAttributeNS("http://www.w3.org/2000/xmlns/", "xlink");
-            if (namespaceDeclaration == null || !namespaceDeclaration.equals(XLink.XLINK_NAMESPACE)) {
-                collectionElement.setAttributeNS("http://www.w3.org/2000/xmlns/",
-                        "xmlns:xlink",
-                        XLink.XLINK_NAMESPACE);
-            }
-        }
-        return helper;
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/publishing/PublishingEnvironment.java b/src/java/org/apache/lenya/cms/publishing/PublishingEnvironment.java
deleted file mode 100644
index 2296488..0000000
--- a/src/java/org/apache/lenya/cms/publishing/PublishingEnvironment.java
+++ /dev/null
@@ -1,309 +0,0 @@
-/*

- * Copyright  1999-2004 The Apache Software Foundation

- *

- *  Licensed 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.

- *

- */

-

-/* $Id$  */

-

-package org.apache.lenya.cms.publishing;

-

-import java.io.File;

-

-import org.apache.avalon.framework.configuration.Configurable;

-import org.apache.avalon.framework.configuration.Configuration;

-import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;

-import org.apache.log4j.Logger;

-

-

-/**

- * A class that holds various publishing parameters

- */

-public class PublishingEnvironment implements Configurable {

-    private static Logger log = Logger.getLogger(PublishingEnvironment.class);

-    /**

-     * <code>CONFIGURATION_FILE</code> The path to the publisher configuration file

-     */

-    public static final String CONFIGURATION_FILE = "config" + File.separator + "publishing" +

-        File.separator + "publisher.xconf";

-    /**

-     * <code>PUBLICATION_PREFIX</code> The path to the publications from the webapp root

-     */

-    public static final String PUBLICATION_PREFIX = "lenya" + File.separator + "pubs" +

-        File.separator;

-    /**

-     * <code>PUBLICATION_PATH</code> The publication path

-     */

-    public static final String PUBLICATION_PATH = "publication-path";

-    /**

-     * <code>PARAMETER_AUTHORING_PATH</code> The authoring path

-     */

-    public static final String PARAMETER_AUTHORING_PATH = "authoring-path";

-    /**

-     * <code>PARAMETER_TREE_AUTHORING_PATH</code> The path to the authoring tree

-     */

-    public static final String PARAMETER_TREE_AUTHORING_PATH = "tree-authoring-path";

-    /**

-     * <code>PARAMETER_LIVE_PATH</code> The live path

-     */

-    public static final String PARAMETER_LIVE_PATH = "live-path";

-    /**

-     * <code>PARAMETER_TREE_LIVE_PATH</code> The path to the live tree

-     */

-    public static final String PARAMETER_TREE_LIVE_PATH = "tree-live-path";

-    /**

-     * <code>PARAMETER_REPLICATION_PATH</code> The replication path

-     */

-    public static final String PARAMETER_REPLICATION_PATH = "replication-path";

-    /**

-     * <code>PARAMETER_EXPORT_PATH</code> The export path

-     */

-    public static final String PARAMETER_EXPORT_PATH = "export-path";

-    /**

-     * <code>PARAMETER_SUBSTITUTE_REGEXP</code> The regular expression to use during export

-     */

-    public static final String PARAMETER_SUBSTITUTE_REGEXP = "substitute-regexp";

-    /**

-     * <code>PARAMETER_SUBSTITUTE_REPLACEMENT</code> The replacement value for the regular expression

-     */

-    public static final String PARAMETER_SUBSTITUTE_REPLACEMENT = "substitute-replacement";

-    private String publicationPath;

-    private String replicationDirectory;

-    private String authoringPath;

-    private String livePath;

-    private String treeAuthoringPath;

-    private String treeLivePath;

-    private String exportDirectory;

-    private String substituteExpression;

-    private String substituteReplacement;

-

-    /**

-     * Creates a new PublishingEnvironment object.

-     *

-     * @param contextPath The context path

-     * @param publicationId The publication id

-     */

-    public PublishingEnvironment(String contextPath, String publicationId) {

-        this(PublishingEnvironment.getPublicationPath(contextPath, publicationId));

-        log.debug("Context Path and Publication Id: " + contextPath + "::" + publicationId);

-    }

-

-    /**

-     * Creates a new PublishingEnvironment object.

-     *

-     * @param _publicationPath The publication path

-     */

-    public PublishingEnvironment(String _publicationPath) {

-        setPublicationPath(_publicationPath);

-

-        String configurationFilePath = _publicationPath + CONFIGURATION_FILE;

-

-        File configurationFile = new File(configurationFilePath);

-

-        try {

-            DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();

-            Configuration configuration = builder.buildFromFile(configurationFile);

-            configure(configuration);

-        } catch (Exception e) {

-            log.info(

-                "Did not load publishing configuration from publisher.xconf (No such file or directory: " + configurationFile  + "). " +

-                "That means you can't access all PublishingEnvironment parameters and you should only " +

-                "use the AntTask. But don't panic, this file has been DEPRECATED.");

-        }

-    }

-

-    /**

-     * Initializes the class from a configuration file

-     *

-     * @param configuration The configuration file

-     *

-     * @throws org.apache.avalon.framework.configuration.ConfigurationException if an error occurs

-     */

-    public void configure(org.apache.avalon.framework.configuration.Configuration configuration)

-        throws org.apache.avalon.framework.configuration.ConfigurationException {

-        // authoring

-        setAuthoringPath(configuration.getChild("authoring").getChild("documents").getAttribute("href"));

-        setTreeAuthoringPath(configuration.getChild("authoring").getChild("tree").getAttribute("href"));

-

-        // replication

-        setReplicationDirectory(configuration.getChild("replication").getChild("pending-documents")

-                                             .getAttribute("href"));

-

-        // live

-        setLivePath(configuration.getChild("live").getChild("documents").getAttribute("href"));

-        setTreeLivePath(configuration.getChild("live").getChild("tree").getAttribute("href"));

-

-        // export

-        setExportDirectory(configuration.getChild("export").getChild("destination").getAttribute("href"));

-        setSubstituteExpression(configuration.getChild("export").getChild("substitution")

-                                             .getAttribute("regexp"));

-        setSubstituteReplacementExpression(configuration.getChild("export").getChild("substitution")

-                                                        .getAttribute("replacement"));

-

-        log.debug("CONFIGURATION:\nauthoring path=" + getAuthoringPath() + "\nlive path=" +

-            getLivePath());

-        log.debug("CONFIGURATION:\ntree authoring path=" + getTreeAuthoringPath() +

-            "\ntree live path=" + getTreeLivePath());

-

-        log.debug("CONFIGURATION:\nDirectory Prefix: href=" + getExportDirectory());

-        log.debug("CONFIGURATION:\nPrefix Substitute: href=" + getSubstituteExpression());

-

-        log.debug("CONFIGURATION:\nReplication Directory: href=" + getReplicationDirectory());

-    }

-

-    /**

-     * Returns the publication path.

-     *

-     * @return The publication path

-     */

-    public String getPublicationPath() {

-        return this.publicationPath;

-    }

-

-    /**

-     * Returns the publication directory.

-     * @return The publication directory

-     */

-    public File getPublicationDirectory() {

-        return new File(getPublicationPath());

-    }

-

-    protected void setPublicationPath(String path) {

-        this.publicationPath = path;

-    }

-

-    /**

-     * Returns the authoring path

-     *

-     * @return The authoring path

-     */

-    public String getAuthoringPath() {

-        return this.authoringPath;

-    }

-

-    protected void setAuthoringPath(String path) {

-        this.authoringPath = path;

-    }

-

-    /**

-     * Returns the live path

-     *

-     * @return The live path

-     */

-    public String getLivePath() {

-        return this.livePath;

-    }

-

-    protected void setLivePath(String path) {

-        this.livePath = path;

-    }

-

-    /**

-     * Returns the path to the authoring tree

-     *

-     * @return The path to the authoring tree

-     */

-    public String getTreeAuthoringPath() {

-        return this.treeAuthoringPath;

-    }

-

-    protected void setTreeAuthoringPath(String path) {

-        this.treeAuthoringPath = path;

-    }

-

-    /**

-     * Returns the path to the live tree

-     *

-     * @return The path to the live tree

-     */

-    public String getTreeLivePath() {

-        return this.treeLivePath;

-    }

-

-    protected void setTreeLivePath(String path) {

-        this.treeLivePath = path;

-    }

-

-    /**

-     * Returns the path to the replication directory

-     *

-     * @return The path to the replication directory

-     */

-    public String getReplicationDirectory() {

-        return this.replicationDirectory;

-    }

-

-    protected void setReplicationDirectory(String directory) {

-        this.replicationDirectory = directory;

-    }

-

-    /**

-     * Returns the path to the export directory

-     *

-     * @return The path to the export directory

-     */

-    public String getExportDirectory() {

-        return this.exportDirectory;

-    }

-

-    protected void setExportDirectory(String directory) {

-        this.exportDirectory = directory;

-    }

-

-    /**

-     * Returns the substitution regular expression used in the export

-     *

-     * @return The substitution regular expression

-     */

-    public String getSubstituteExpression() {

-        return this.substituteExpression;

-    }

-

-    protected void setSubstituteExpression(String substitute) {

-        this.substituteExpression = substitute;

-    }

-

-    /**

-     * Set replacement string, which was read from publisher.xconf

-     * @param replacement The replacement string

-     */

-    protected void setSubstituteReplacementExpression(String replacement) {

-        this.substituteReplacement = replacement;

-    }

-

-    /**

-     * Get the replacement string, which was read from publisher.xconf

-     *

-     * @return The replacement string

-     */

-    public String getSubstituteReplacement() {

-        return this.substituteReplacement;

-    }

-

-    /**

-     * Returns the path to the publication given the servlet context path and the publication id

-     *

-     * @param servletContextPath The servlet context path

-     * @param publicationId The publication id

-     *

-     * @return The path to the publication

-     */

-    public static String getPublicationPath(String servletContextPath, String publicationId) {

-        if (!servletContextPath.endsWith(File.separator)) {

-            servletContextPath += File.separator;

-        }

-

-        return servletContextPath + PUBLICATION_PREFIX + publicationId + File.separator;

-    }

-}

diff --git a/src/java/org/apache/lenya/cms/rc/CheckInEntry.java b/src/java/org/apache/lenya/cms/rc/CheckInEntry.java
deleted file mode 100644
index 57cd7c2..0000000
--- a/src/java/org/apache/lenya/cms/rc/CheckInEntry.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.rc;
-
-
-/**
- * A checkin entry
- */
-public class CheckInEntry extends RCMLEntry {
-    /**
-     * Creates a new CheckInEntry object.
-     * @param identity The identity to use
-     * @param time The time
-     * @param version The version number.
-     */
-    public CheckInEntry(String identity, long time, int version) {
-        super(identity, time);
-        setType(RCML.ci);
-        this.version = version;
-    }
-    
-    /**
-     * @return The version number.
-     */
-    public int getVersion() {
-        return this.version;
-    }
-
-    private int version = 0;
-    
-}
diff --git a/src/java/org/apache/lenya/cms/rc/CheckOutEntry.java b/src/java/org/apache/lenya/cms/rc/CheckOutEntry.java
deleted file mode 100644
index a08d1e7..0000000
--- a/src/java/org/apache/lenya/cms/rc/CheckOutEntry.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.rc;
-
-/**
- * A Checkout entry
- */
-public class CheckOutEntry extends RCMLEntry {
-    /**
-     * Creates a new CheckOutEntry object.
-     * @param identity The identity
-     * @param time The time
-     */
-    public CheckOutEntry(String identity, long time) {
-        super(identity, time);
-        setType(RCML.co);
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/rc/FileReservedCheckInException.java b/src/java/org/apache/lenya/cms/rc/FileReservedCheckInException.java
deleted file mode 100644
index c47b7d9..0000000
--- a/src/java/org/apache/lenya/cms/rc/FileReservedCheckInException.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.rc;
-
-import java.util.Date;
-
-
-/**
- * Reserved check-in exception
- */
-public class FileReservedCheckInException extends Exception {
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-	private String source = null;
-    private Date date = null;
-    private String username = null;
-    private String typeString = null;
-    private short type;
-
-    /**
-     * Creates a new FileReservedCheckInException object.
-     *
-     * @param _source The source document
-     * @param rcml The RCML
-     *
-     * @throws Exception if an error occurs
-     */
-    public FileReservedCheckInException(String _source, RCML rcml)
-        throws Exception {
-        this.source = _source;
-
-        try {
-            RCMLEntry rcmlEntry = rcml.getLatestEntry();
-
-            this.username = rcmlEntry.getIdentity();
-            this.date = new Date(rcmlEntry.getTime());
-            this.type = rcmlEntry.getType();
-
-            if (this.type == RCML.co) {
-                this.typeString = "Checkout";
-            } else {
-                this.typeString = "Checkin";
-            }
-        } catch (Exception exception) {
-            throw new Exception("Unable to create FileReservedCheckInException object!");
-        }
-    }
-
-    /**
-     * Returns the exception message
-     * @return The exception message
-     */
-    public String getMessage() {
-        return "Unable to check in the file " + this.source + " because of a " + this.typeString +
-        " by user " + this.username + " at " + this.date;
-    }
-    /**
-     * Get the date
-     * @return the date
-     */
-    public Date getDate() {
-        return new Date(this.date.getTime());
-    }
-
-    /**
-     * Get the typeString
-     * @return the type string
-     */
-    public String getTypeString() {
-        return this.typeString;
-    }
-
-    /**
-     * Get the user name.
-     * @return the user name
-     */
-    public String getUsername() {
-        return this.username;
-    }
-
-    /**
-     * Get the source
-     * @return The source
-     */
-    public String getSource() {
-        return this.source;
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/rc/FileReservedCheckOutException.java b/src/java/org/apache/lenya/cms/rc/FileReservedCheckOutException.java
deleted file mode 100644
index 10b8cc5..0000000
--- a/src/java/org/apache/lenya/cms/rc/FileReservedCheckOutException.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.rc;
-
-import java.util.Date;
-
-
-/**
- * Exception for already checked out files
- */
-public class FileReservedCheckOutException extends Exception {
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-	private String source = null;
-    private Date checkOutDate = null;
-    private String checkOutUsername = null;
-
-    /**
-     * Creates a new FileReservedCheckOutException object.
-     * @param _source The source
-     * @param rcml The RCML
-     * @throws Exception if an error occurs
-     */
-    public FileReservedCheckOutException(String _source, RCML rcml)
-        throws Exception {
-        this.source = _source;
-
-        try {
-            CheckOutEntry coe = rcml.getLatestCheckOutEntry();
-
-            this.checkOutUsername = coe.getIdentity();
-            this.checkOutDate = new Date(coe.getTime());
-        } catch (Exception e) {
-            throw new Exception("Unable to create FileReservedCheckOutException object!");
-        }
-    }
-    
-    /**
-     * Get the date of the checkout.
-     * @return the date of the checkout
-     */
-    public Date getCheckOutDate() {
-        return new Date(this.checkOutDate.getTime());
-    }
-
-    /**
-     * Get the source of the checkout.
-     * @return the source of the checkout
-     */
-    public String getSource() {
-        return this.source;
-    }
-
-    /**
-     * Get the user name who did this checkout.
-     * @return the user name of this checkout
-     */
-    public String getCheckOutUsername() {
-        return this.checkOutUsername;
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/rc/RCEnvironment.java b/src/java/org/apache/lenya/cms/rc/RCEnvironment.java
deleted file mode 100644
index dfd6e66..0000000
--- a/src/java/org/apache/lenya/cms/rc/RCEnvironment.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.rc;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
-import org.apache.log4j.Logger;
-import org.xml.sax.SAXException;
-
-/**
- * Helper class that holds the revision controller configuration
- */
-public class RCEnvironment implements Configurable {
-    private static Logger log = Logger.getLogger(RCEnvironment.class);
-    /**
-     * <code>CONFIGURATION_FILE</code> The configuration file
-     */
-    public static final String CONFIGURATION_FILE = "lenya" + File.separator + "config" +
-        File.separator + "rc" + File.separator + "revision-controller.xconf";
-    /**
-     * <code>RCML_DIRECTORY</code> The RCML directory
-     */
-    public static final String RCML_DIRECTORY = "rcml-directory";
-    /**
-     * <code>BACKUP_DIRECTORY</code> The backup directory
-     */
-    public static final String BACKUP_DIRECTORY = "backup-directory";
-    private String rcmlDirectory;
-    private String backupDirectory;
-    
-    private static Map instances = new HashMap();
-    
-    /**
-     * Returns the singleton RC environment for this context path.
-     * @param contextPath The context path (the Lenya webapp directory).
-     * @return An RC environment.
-     */
-    public static RCEnvironment getInstance(String contextPath) {
-        RCEnvironment instance = (RCEnvironment) instances.get(contextPath); 
-        if (instance == null) {
-            instance = new RCEnvironment(contextPath);
-            instances.put(contextPath, instance);
-        }
-        return instance;
-    }
-
-    /**
-     * Creates a new RCEnvironment object from the context path
-     * @param contextPath The context path
-     */
-    public RCEnvironment(String contextPath) {
-        log.debug("context path:" + contextPath);
-
-        String configurationFilePath = contextPath + "/" + CONFIGURATION_FILE;
-        log.debug("configuration file path:" + configurationFilePath);
-
-        File configurationFile = new File(configurationFilePath);
-
-        try {
-            DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
-            Configuration configuration = builder.buildFromFile(configurationFile);
-            configure(configuration);
-        } catch (final ConfigurationException e) {
-            log.error("Cannot load revision controller configuration! ", e);
-        } catch (final SAXException e) {
-            log.error("Cannot load revision controller configuration! ", e);
-        } catch (final IOException e) {
-            log.error("Cannot load revision controller configuration! ", e);
-        }
-    }
-
-    /**
-     @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)     
-     */
-    public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
-        throws ConfigurationException {
-        // revision controller
-        setRCMLDirectory(configuration.getChild("rcmlDirectory").getAttribute("href"));
-        setBackupDirectory(configuration.getChild("backupDirectory").getAttribute("href"));
-
-        log.debug("CONFIGURATION:\nRCML Directory: href=" + getRCMLDirectory());
-        log.debug("CONFIGURATION:\nBackup Directory: href=" + getBackupDirectory());
-    }
-
-    /**
-     * Get the RCML directory
-     * @return The RCML directory
-     */
-    public String getRCMLDirectory() {
-        return this.rcmlDirectory;
-    }
-
-	/**
-	 * Set the rcml directory
-	 * @param rcmlDir the path to the rcml directory
-	 */
-    protected void setRCMLDirectory(String rcmlDir) {
-        this.rcmlDirectory = rcmlDir;
-    }
-
-    /**
-     * Get the backup directory
-     * @return The backup directory
-     */
-    public String getBackupDirectory() {
-        return this.backupDirectory;
-    }
-
-	/**
-	 * Set the backup directory
-	 * @param backupDir path to the backup directory
-	 */
-    protected void setBackupDirectory(String backupDir) {
-        this.backupDirectory = backupDir;
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/rc/RCML.java b/src/java/org/apache/lenya/cms/rc/RCML.java
deleted file mode 100644
index 6bc9c84..0000000
--- a/src/java/org/apache/lenya/cms/rc/RCML.java
+++ /dev/null
@@ -1,447 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.rc;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Vector;
-
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.apache.lenya.xml.DocumentHelper;
-import org.apache.lenya.xml.NamespaceHelper;
-import org.apache.xpath.XPathAPI;
-import org.apache.log4j.Logger;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * Handle with the RCML file
- */
-public class RCML {
-    private static Logger log = Logger.getLogger(RCML.class);
-
-    /**
-     * <code>co</code> Checkout
-     */
-    public static final short co = 0;
-    /**
-     * <code>ci</code> Checkin
-     */
-    public static final short ci = 1;
-
-    private File rcmlFile;
-    private Document document = null;
-    private boolean dirty = false;
-    private int maximalNumberOfEntries = 5;
-
-    private static Map ELEMENTS = new HashMap();
-    protected static final String ELEMENT_CHECKIN = "CheckIn";
-    protected static final String ELEMENT_CHECKOUT = "CheckOut";
-    protected static final String ELEMENT_BACKUP = "Backup";
-
-    {
-        ELEMENTS.put(new Short(ci), ELEMENT_CHECKIN);
-        ELEMENTS.put(new Short(co), ELEMENT_CHECKOUT);
-    }
-
-    /**
-     * Creates a new RCML object.
-     */
-    public RCML() {
-        this.maximalNumberOfEntries = 10;
-        this.maximalNumberOfEntries = (2 * this.maximalNumberOfEntries) + 1;
-    }
-
-    /**
-     * create a RCML-File if no one exists already
-     * @param rcmlDirectory The rcml directory.
-     * @param filename The path of the file from the publication (e.g. for file with absolute path
-     *            home/...//lenya/pubs/{publication id}/content/authoring/foo/bar.xml the filename
-     *            is content/authoring/foo/bar.xml)
-     * @param rootDirectory The publication directory
-     * @throws Exception if an error occurs
-     */
-    public RCML(String rcmlDirectory, String filename, String rootDirectory) throws Exception {
-        this();
-        this.rcmlFile = new File(rcmlDirectory, filename + ".rcml");
-
-        if (!this.rcmlFile.isFile()) {
-            // The rcml file does not yet exist, so we create it now...
-            //
-            File dataFile = new File(rootDirectory, filename);
-            long lastModified = 0;
-
-            if (dataFile.isFile()) {
-                lastModified = dataFile.lastModified();
-            }
-
-            initDocument();
-
-            // Create a "fake" checkin entry so it looks like the
-            // system checked the document in. We use the filesystem
-            // modification date as checkin time.
-            //
-            checkOutIn(RCML.ci, RevisionController.systemUsername, lastModified, false);
-
-            File parent = new File(this.rcmlFile.getParent());
-            parent.mkdirs();
-
-            write();
-        } else {
-            this.document = DocumentHelper.readDocument(this.rcmlFile);
-        }
-    }
-
-    /**
-     * initialise the RCML-document. Delete all entries
-     * @throws ParserConfigurationException
-     */
-    public void initDocument() throws ParserConfigurationException {
-        this.document = DocumentHelper.createDocument(null, "XPSRevisionControl", null);
-    }
-
-    /**
-     * Call the methode write, if the document is dirty
-     * 
-     * @throws IOException if an error occurs
-     * @throws Exception if an error occurs
-     */
-    protected void finalize() throws IOException, Exception {
-        if (this.isDirty()) {
-            log.debug("RCML.finalize(): calling write()");
-            write();
-        }
-    }
-
-    /**
-     * Write the xml RCML-document in the RCML-file.
-     * @throws IOException if an error occurs
-     * @throws Exception if an error occurs
-     */
-    public void write() throws IOException, Exception {
-        DocumentHelper.writeDocument(this.document, this.rcmlFile);
-        clearDirty();
-    }
-
-    /**
-     * Write a new entry for a check out or a check in the RCML-File made by the user with identity
-     * at time
-     * @param type co for a check out, ci for a check in
-     * @param identity The identity of the user
-     * @param time Time at which the check in/out is made
-     * @param backup Create backup element
-     * @throws IOException if an error occurs
-     * @throws Exception if an error occurs
-     */
-    public void checkOutIn(short type, String identity, long time, boolean backup)
-            throws IOException, Exception {
-
-        if (type != co && type != ci) {
-            throw new IllegalArgumentException("ERROR: " + this.getClass().getName()
-                    + ".checkOutIn(): No such type");
-        }
-
-        NamespaceHelper helper = new NamespaceHelper(null, "", this.document);
-
-        Element identityElement = helper.createElement("Identity", identity);
-        Element timeElement = helper.createElement("Time", "" + time);
-
-        String elementName = (String) ELEMENTS.get(new Short(type));
-        Element checkOutElement = helper.createElement(elementName);
-
-        checkOutElement.appendChild(identityElement);
-        checkOutElement.appendChild(timeElement);
-
-        if (type == ci) {
-            int version = 0;
-            CheckInEntry latestEntry = getLatestCheckInEntry();
-            if (latestEntry != null) {
-                version = latestEntry.getVersion();
-            }
-            version++;
-            Element versionElement = helper.createElement("Version", "" + version);
-            checkOutElement.appendChild(versionElement);
-        }
-
-        if (backup) {
-            Element backupElement = helper.createElement(ELEMENT_BACKUP);
-            checkOutElement.appendChild(backupElement);
-        }
-
-        Element root = this.document.getDocumentElement();
-        root.insertBefore(checkOutElement, root.getFirstChild());
-
-        setDirty();
-
-        // If this is a checkout, we write back the changed state
-        // to the file immediately because otherwise another
-        // process might read the file and think there is no open
-        // checkout (as it is only visible in our private DOM tree
-        // at this time).
-        //
-        // If, however, this is a checkin, we do not yet write it
-        // out because then another process might again check it
-        // out immediately and manipulate the file contents
-        // *before* our caller has finished writing back the
-        // changed data to the destination file. We therefore rely
-        // on either our caller invoking the write() method when
-        // finished or the garbage collector calling the finalize()
-        // method.
-        //
-        if (type == co) {
-            write();
-        }
-    }
-
-    /**
-     * get the latest check out
-     * @return CheckOutEntry The entry of the check out
-     * @throws Exception if an error occurs
-     */
-    public CheckOutEntry getLatestCheckOutEntry() throws Exception {
-        Element parent = this.document.getDocumentElement();
-        Node identity = null;
-        Node time = null;
-        String rcIdentity = null;
-
-        identity = XPathAPI.selectSingleNode(parent,
-                "/XPSRevisionControl/CheckOut[1]/Identity/text()");
-        time = XPathAPI.selectSingleNode(parent, "/XPSRevisionControl/CheckOut[1]/Time/text()");
-
-        if (identity == null && time == null) {
-            // No checkout at all
-            return null;
-        }
-        rcIdentity = identity.getNodeValue();
-        long rcTime = new Long(time.getNodeValue()).longValue();
-
-        return new CheckOutEntry(rcIdentity, rcTime);
-    }
-
-    /**
-     * get the latest check in
-     * @return CheckInEntry The entry of the check in
-     * @throws Exception if an error occurs
-     */
-    public CheckInEntry getLatestCheckInEntry() throws Exception {
-        Element parent = this.document.getDocumentElement();
-
-        Node identity = XPathAPI.selectSingleNode(parent,
-                "/XPSRevisionControl/CheckIn[1]/Identity/text()");
-        Node time = XPathAPI.selectSingleNode(parent, "/XPSRevisionControl/CheckIn[1]/Time/text()");
-        Node versionNode = XPathAPI.selectSingleNode(parent,
-                "/XPSRevisionControl/CheckIn[1]/Version/text()");
-
-        if (identity == null && time == null) {
-            // No checkout at all
-            return null;
-        }
-        String rcIdentity = identity.getNodeValue();
-        long rcTime = new Long(time.getNodeValue()).longValue();
-        int version = 0;
-        if (versionNode != null) {
-            version = new Integer(versionNode.getNodeValue()).intValue();
-        }
-
-        return new CheckInEntry(rcIdentity, rcTime, version);
-    }
-
-    /**
-     * get the latest entry (a check out or check in)
-     * @return RCMLEntry The entry of the check out/in
-     * @throws Exception if an error occurs
-     */
-    public RCMLEntry getLatestEntry() throws Exception {
-        CheckInEntry cie = getLatestCheckInEntry();
-        CheckOutEntry coe = getLatestCheckOutEntry();
-
-        if ((cie != null) && (coe != null)) {
-            if (cie.getTime() > coe.getTime()) {
-                return cie;
-            }
-            return coe;
-        }
-
-        if (cie != null) {
-            return cie;
-        }
-        return coe;
-    }
-
-    /**
-     * get all check in and check out
-     * @return Vector of all check out and check in entries in this RCML-file
-     * @throws Exception if an error occurs
-     */
-    public Vector getEntries() throws Exception {
-        Element parent = this.document.getDocumentElement();
-        NodeList entries = XPathAPI.selectNodeList(parent,
-                "/XPSRevisionControl/CheckOut|/XPSRevisionControl/CheckIn");
-        Vector RCMLEntries = new Vector();
-
-        for (int i = 0; i < entries.getLength(); i++) {
-            Element elem = (Element) entries.item(i);
-            String time = elem.getElementsByTagName("Time").item(0).getFirstChild().getNodeValue();
-            String identity = elem.getElementsByTagName("Identity").item(0).getFirstChild()
-                    .getNodeValue();
-
-            if (elem.getTagName().equals("CheckOut")) {
-                RCMLEntries.add(new CheckOutEntry(identity, new Long(time).longValue()));
-            } else {
-                NodeList versionElements = elem.getElementsByTagName("Version");
-                int version = 0;
-                if (versionElements.getLength() > 0) {
-                    String versionString = versionElements.item(0).getFirstChild().getNodeValue();
-                    version = new Integer(versionString).intValue();
-                }
-
-                RCMLEntries.add(new CheckInEntry(identity, new Long(time).longValue(), version));
-            }
-        }
-
-        return RCMLEntries;
-    }
-
-    /**
-     * Prune the list of entries and delete the corresponding backups. Limit the number of entries
-     * to the value maximalNumberOfEntries (2maxNumberOfRollbacks(configured)+1)
-     * @param backupDir The backup directory
-     * @throws Exception if an error occurs
-     */
-    public void pruneEntries(String backupDir) throws Exception {
-        Element parent = this.document.getDocumentElement();
-        NodeList entries = XPathAPI.selectNodeList(parent,
-                "/XPSRevisionControl/CheckOut|/XPSRevisionControl/CheckIn");
-
-        for (int i = this.maximalNumberOfEntries; i < entries.getLength(); i++) {
-            Element current = (Element) entries.item(i);
-
-            // remove the backup file associated with this entry
-            String time = current.getElementsByTagName("Time").item(0).getFirstChild()
-                    .getNodeValue();
-            File backupFile = new File(backupDir + "/" + time + ".bak");
-            backupFile.delete();
-            // remove the entry from the list
-            current.getParentNode().removeChild(current);
-        }
-    }
-
-    /**
-     * Get a clone document
-     * @return org.w3c.dom.Document The clone document
-     * @throws Exception if an error occurs
-     */
-    public org.w3c.dom.Document getDOMDocumentClone() throws Exception {
-        Document documentClone = DocumentHelper.createDocument(null, "dummy", null);
-        documentClone.removeChild(documentClone.getDocumentElement());
-        documentClone.appendChild(documentClone
-                .importNode(this.document.getDocumentElement(), true));
-
-        return documentClone;
-    }
-
-    /**
-     * Check if the document is dirty
-     * @return boolean dirty
-     */
-    public boolean isDirty() {
-        return this.dirty;
-    }
-
-    /**
-     * Set the value dirty to true
-     */
-    protected void setDirty() {
-        this.dirty = true;
-    }
-
-    /**
-     * Set the value dirty to false
-     */
-    protected void clearDirty() {
-        this.dirty = false;
-    }
-
-    /**
-     * Delete the latest check in
-     * @throws Exception if an error occurs
-     */
-    public void deleteFirstCheckIn() throws Exception {
-        Node root = this.document.getDocumentElement();
-        Node firstCheckIn = XPathAPI.selectSingleNode(root, "/XPSRevisionControl/CheckIn[1]");
-        root.removeChild(firstCheckIn);
-        root.removeChild(root.getFirstChild()); // remove EOL (end of line)
-        setDirty();
-    }
-
-    /**
-     * Delete the latest check in
-     * @throws Exception if an error occurs
-     */
-    public void deleteFirstCheckOut() throws Exception {
-        Node root = this.document.getDocumentElement();
-        Node firstCheckIn = XPathAPI.selectSingleNode(root, "/XPSRevisionControl/CheckOut[1]");
-        root.removeChild(firstCheckIn);
-        root.removeChild(root.getFirstChild()); // remove EOL (end of line)
-        setDirty();
-    }
-
-    /**
-     * get the time's value of the backups
-     * @return String[] the times
-     * @throws Exception if an error occurs
-     */
-    public String[] getBackupsTime() throws Exception {
-        Node root = this.document.getDocumentElement();
-        NodeList entries = XPathAPI.selectNodeList(root, "/XPSRevisionControl/CheckIn");
-
-        ArrayList times = new ArrayList();
-
-        for (int i = 0; i < entries.getLength(); i++) {
-            Element elem = (Element) entries.item(i);
-            String time = elem.getElementsByTagName("Time").item(0).getFirstChild().getNodeValue();
-            NodeList backupNodes = elem.getElementsByTagName(ELEMENT_BACKUP);
-            if (backupNodes != null && backupNodes.getLength() > 0) {
-                times.add(time);
-            }
-        }
-        return (String[]) times.toArray(new String[times.size()]);
-
-    }
-
-    /**
-     * delete the rcml file and the directory if this one is empty
-     * @return boolean true, if the file was deleted
-     */
-    public boolean delete() {
-        File directory = this.rcmlFile.getParentFile();
-        boolean deleted = this.rcmlFile.delete();
-        if (directory.exists() && directory.isDirectory() && directory.listFiles().length == 0) {
-            directory.delete();
-        }
-        return deleted;
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/rc/RCMLEntry.java b/src/java/org/apache/lenya/cms/rc/RCMLEntry.java
deleted file mode 100644
index 9f44989..0000000
--- a/src/java/org/apache/lenya/cms/rc/RCMLEntry.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.rc;
-
-/**
- * A RCML entry
- */
-public class RCMLEntry {
-	
-    private String identity = null;
-    private long time = 0;
-    private short type = 0;
-
-    /**
-     * Creates a new RCMLEntry object.
-     * @param _identity The identity of the person for this RCML
-     * @param _time The time of the checkin / checkout
-     */
-    public RCMLEntry(String _identity, long _time) {
-        this.identity = _identity;
-        this.time = _time;
-    }
-    
-    /**
-     * Get the identity.
-     * @return the identity
-     */
-    public String getIdentity() {
-        return this.identity;
-    }
-
-    /**
-     * Get the time.
-     * @return the time
-     */
-    public long getTime() {
-        return this.time;
-    }
-
-    /**
-     * Get the type.
-     * @return the type
-     */
-    public short getType() {
-        return this.type;
-    }
-    
-    /**
-     * Set the type.
-     * @param s the type
-     */
-    protected void setType(short s) {
-        this.type = s;
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/rc/RevisionControlException.java b/src/java/org/apache/lenya/cms/rc/RevisionControlException.java
deleted file mode 100644
index c220015..0000000
--- a/src/java/org/apache/lenya/cms/rc/RevisionControlException.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.rc;
-
-/**
- * A revision control exception.
- */
-public class RevisionControlException extends Exception {
-
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/**
-     * Ctor.
-     */
-    public RevisionControlException() {
-        super();
-    }
-
-    /**
-     * Ctor.
-     * @param message The message.
-     */
-    public RevisionControlException(String message) {
-        super(message);
-    }
-
-    /**
-     * Ctor.
-     * @param cause The cause.
-     */
-    public RevisionControlException(Throwable cause) {
-        super(cause);
-    }
-
-    /**
-     * Ctor.
-     * @param message The message.
-     * @param cause The cause.
-     */
-    public RevisionControlException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/rc/RevisionController.java b/src/java/org/apache/lenya/cms/rc/RevisionController.java
deleted file mode 100644
index da33a25..0000000
--- a/src/java/org/apache/lenya/cms/rc/RevisionController.java
+++ /dev/null
@@ -1,482 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.rc;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.Date;
-
-import org.apache.log4j.Logger;
-
-/**
- * Controller for the reserved check-in, check-out, the backup versions and the rollback
- */
-public class RevisionController {
-    private static Logger log = Logger.getLogger(RevisionController.class);
-
-    /**
-     * <code>systemUsername</code> The system user name. This is used for - creating dummy checkin
-     * events in a new RCML file when it is created on-the-fly - system override on checkin, i.e.
-     * you can force a checkin into the repository if you use this username as identity parameter to
-     * reservedCheckIn()
-     */
-    public static final String systemUsername = "System";
-
-    private String rcmlDir = null;
-    private String rootDir = null;
-    private String backupDir = null;
-
-    /**
-     * Creates a new RevisionController object.
-     * 
-     * @param rcmlDirectory The directory for the RCML files
-     * @param backupDirectory The directory for the backup versions
-     * @param rootDirectory The publication directory
-     */
-    public RevisionController(String rcmlDirectory, String backupDirectory, String rootDirectory) {
-        this.rcmlDir = rcmlDirectory;
-        this.backupDir = backupDirectory;
-        this.rootDir = rootDirectory;
-    }
-
-    /**
-     * Shows Configuration
-     * @return String The rcml directory, the backup directory, the publication directory
-     */
-    public String toString() {
-        return "rcmlDir=" + this.rcmlDir + " , rcbakDir=" + this.backupDir + " , rootDir="
-                + this.rootDir;
-    }
-
-    /**
-     * Get the RCML File for the file source
-     * @param source The path of the file from the publication.
-     * @return RCML The corresponding RCML file.
-     * @throws FileNotFoundException if an error occurs
-     * @throws IOException if an error occurs
-     * @throws Exception if an error occurs
-     */
-    public RCML getRCML(String source) throws FileNotFoundException, IOException, Exception {
-        return new RCML(this.rcmlDir, source, this.rootDir);
-    }
-
-    /**
-     * Returns the latest version of a source.
-     * @param source The path of the file from the publication.
-     * @return A version number.
-     * @throws Exception if an error occurs.
-     */
-    public int getLatestVersion(String source) throws Exception {
-        RCML rcml = new RCML(this.rcmlDir, source, this.rootDir);
-        CheckInEntry entry = rcml.getLatestCheckInEntry();
-        int version = 0;
-        if (entry != null) {
-            version = entry.getVersion();
-        }
-        return version;
-    }
-
-    /**
-     * Try to make a reserved check out of the file source for a user with identity
-     * 
-     * @param source The filename of the file to check out
-     * @param identity The identity of the user
-     * @return File File to check out
-     * @throws Exception if an error occurs
-     */
-    public File reservedCheckOut(String source, String identity) throws Exception {
-
-        File file = new File(this.rootDir + source);
-        /*
-         * if (!file.isFile()) { throw new FileNotFoundException(file.getAbsolutePath()); }
-         */
-
-        RCML rcml = new RCML(this.rcmlDir, source, this.rootDir);
-
-        RCMLEntry entry = rcml.getLatestEntry();
-
-        // The same user is allowed to check out repeatedly without
-        // having to check back in first.
-        //
-        if (entry != null) {
-            log.debug("entry: " + entry);
-            log.debug("entry.type:" + entry.getType());
-            log.debug("entry.identity" + entry.getIdentity());
-        }
-
-        if ((entry != null) && (entry.getType() != RCML.ci)
-                && !entry.getIdentity().equals(identity)) {
-            throw new FileReservedCheckOutException(this.rootDir + source, rcml);
-        }
-
-        rcml.checkOutIn(RCML.co, identity, new Date().getTime(), false);
-
-        return file;
-    }
-
-    /**
-     * Checks if a source can be checked out.
-     * @param source The source.
-     * @param identity The identity who requests checking out.
-     * @return A boolean value.
-     * @throws Exception when something went wrong.
-     */
-    public boolean canCheckOut(String source, String identity) throws Exception {
-        RCML rcml = new RCML(this.rcmlDir, source, this.rootDir);
-
-        RCMLEntry entry = rcml.getLatestEntry();
-
-        // The same user is allowed to check out repeatedly without
-        // having to check back in first.
-        //
-        if (entry != null) {
-            log.debug("entry: " + entry);
-            log.debug("entry.type:" + entry.getType());
-            log.debug("entry.identity" + entry.getIdentity());
-        }
-
-        boolean checkedOutByOther = entry != null && entry.getType() != RCML.ci
-                && !entry.getIdentity().equals(identity);
-
-        return !checkedOutByOther;
-    }
-
-    /**
-     * @param source A source.
-     * @return If the source is checked out.
-     * @throws Exception if an error occurs.
-     */
-    public boolean isCheckedOut(String source) throws Exception {
-        RCML rcml = new RCML(this.rcmlDir, source, this.rootDir);
-
-        RCMLEntry entry = rcml.getLatestEntry();
-
-        // The same user is allowed to check out repeatedly without
-        // having to check back in first.
-        //
-        if (entry != null) {
-            log.debug("entry: " + entry);
-            log.debug("entry.type:" + entry.getType());
-            log.debug("entry.identity" + entry.getIdentity());
-        }
-        return entry != null && entry.getType() == RCML.co;
-    }
-
-    /**
-     * Try to make a reserved check in of the file destination for a user with identity. A backup
-     * copy can be made.
-     * 
-     * @param destination The file we want to check in
-     * @param identity The identity of the user
-     * @param backup if true, a backup will be created, else no backup will be made.
-     * @param newVersion If true, a new version will be created.
-     * 
-     * @return long The time.
-     * 
-     * @exception FileReservedCheckInException if the document couldn't be checked in (for instance
-     *                because it is already checked out by someone other ...)
-     * @exception Exception if other problems occur
-     */
-    public long reservedCheckIn(String destination, String identity, boolean backup,
-            boolean newVersion) throws FileReservedCheckInException, Exception {
-        FileInputStream in = null;
-        FileOutputStream out = null;
-
-        RCML rcml;
-        long time = new Date().getTime();
-
-        try {
-            rcml = new RCML(this.rcmlDir, destination, this.rootDir);
-
-            CheckOutEntry coe = rcml.getLatestCheckOutEntry();
-            CheckInEntry cie = rcml.getLatestCheckInEntry();
-
-            // If there has never been a checkout for this object
-            // *or* if the user attempting the checkin right now
-            // is the system itself, we will skip any checks and proceed
-            // right away to the actual checkin.
-            // In all other cases we enforce the revision control
-            // rules inside this if clause:
-            //
-            if (!((coe == null) || identity.equals(RevisionController.systemUsername))) {
-                /*
-                 * Possible cases and rules:
-                 * 
-                 * 1.) we were able to read the latest checkin and it is later than latest checkout
-                 * (i.e. there is no open checkout to match this checkin, an unusual case) 1.1.)
-                 * identity of latest checkin is equal to current user -> checkin allowed, same user
-                 * may check in repeatedly 1.2.) identity of latest checkin is not equal to current
-                 * user -> checkin rejected, may not overwrite the revision which another user
-                 * checked in previously 2.) there was no checkin or the latest checkout is later
-                 * than latest checkin (i.e. there is an open checkout) 2.1.) identity of latest
-                 * checkout is equal to current user -> checkin allowed, user checked out and may
-                 * check in again (the most common case) 2.2.) identity of latest checkout is not
-                 * equal to current user -> checkin rejected, may not check in while another user is
-                 * working on this document
-                 *  
-                 */
-                if ((cie != null) && (cie.getTime() > coe.getTime())) {
-                    // We have case 1
-                    if (!cie.getIdentity().equals(identity)) {
-                        // Case 1.2., abort...
-                        //
-                        throw new FileReservedCheckInException(this.rootDir + destination, rcml);
-                    }
-                } else {
-                    // Case 2
-                    if (!coe.getIdentity().equals(identity)) {
-                        // Case 2.2., abort...
-                        //
-                        throw new FileReservedCheckInException(this.rootDir + destination, rcml);
-                    }
-                }
-            }
-
-            File originalFile = new File(this.rootDir, destination);
-
-            if (backup && originalFile.isFile()) {
-                File backupFile = new File(this.backupDir, destination + ".bak." + time);
-                File parent = new File(backupFile.getParent());
-
-                if (!parent.isDirectory()) {
-                    parent.mkdirs();
-                }
-
-                log.debug("Backup: copy " + originalFile.getAbsolutePath() + " to "
-                        + backupFile.getAbsolutePath());
-
-                in = new FileInputStream(originalFile.getAbsolutePath());
-                out = new FileOutputStream(backupFile.getAbsolutePath());
-                byte[] buffer = new byte[512];
-                int length;
-
-                while ((length = in.read(buffer)) != -1) {
-                    out.write(buffer, 0, length);
-                }
-            }
-
-            if (newVersion) {
-                rcml.checkOutIn(RCML.ci, identity, time, backup);
-            } else {
-                rcml.deleteFirstCheckOut();
-            }
-            rcml.pruneEntries(this.backupDir);
-            rcml.write();
-
-        } catch (final FileNotFoundException e) {
-            log.error("File not found" + e.toString());
-        } catch (final IOException e) {
-            log.error("IO error " + e.toString());
-        } finally {
-            if (in != null)
-                in.close();
-            if (out != null)
-                out.close();
-        }
-        return time;
-    }
-
-    /**
-     * Get the absolute path of a backup version
-     * @param time The time of the backup
-     * @param filename The path of the file from the {publication}
-     * @return String The absolute path of the backup version
-     */
-    public String getBackupFilename(long time, String filename) {
-        File backup = new File(this.backupDir, filename + ".bak." + time);
-        return backup.getAbsolutePath();
-    }
-
-    /**
-     * Get the file of a backup version
-     * @param time The time of the backup
-     * @param filename The path of the file from the {publication}
-     * @return File The file of the backup version
-     */
-    public File getBackupFile(long time, String filename) {
-        File backup = new File(this.backupDir, filename + ".bak." + time);
-        return backup;
-    }
-
-    /**
-     * Rolls back to the given point in time.
-     * @param destination File which will be rolled back
-     * @param identity The identity of the user
-     * @param backupFlag If true, a backup of the current version will be made before the rollback
-     * @param time The time point of the desired version
-     * @return long The time of the version to roll back to.
-     * @exception FileReservedCheckInException if the current version couldn't be checked in again
-     * @exception FileReservedCheckOutException if the current version couldn't be checked out
-     * @exception FileNotFoundException if a file couldn't be found
-     * @exception Exception if another problem occurs
-     */
-    public long rollback(String destination, String identity, boolean backupFlag, long time)
-            throws FileReservedCheckInException, FileReservedCheckOutException,
-            FileNotFoundException, Exception {
-
-        FileInputStream in = null;
-        FileOutputStream out = null;
-
-        try {
-            // Make sure the old version exists
-            File backup = new File(this.backupDir, destination + ".bak." + time);
-            File current = new File(this.rootDir, destination);
-
-            if (!backup.isFile()) {
-                throw new FileNotFoundException(backup.getAbsolutePath());
-            }
-
-            if (!current.isFile()) {
-                throw new FileNotFoundException(current.getAbsolutePath());
-            }
-
-            // Try to check out current version
-            reservedCheckOut(destination, identity);
-
-            // Now roll back to the old state
-            in = new FileInputStream(backup.getAbsolutePath());
-            out = new FileOutputStream(current.getAbsolutePath());
-            byte[] buffer = new byte[512];
-            int length;
-
-            while ((length = in.read(buffer)) != -1) {
-                out.write(buffer, 0, length);
-            }
-        } catch (FileNotFoundException e) {
-            log.error("File not found " + e.toString());
-        } catch (IOException e) {
-            log.error("IO error " + e.toString());
-        } catch (Exception e) {
-            log.error("Exception " + e.toString());
-        } finally {
-            if (in != null)
-                in.close();
-            if (out != null)
-                out.close();
-        }
-
-        // Try to check back in, this might cause
-        // a backup of the current version to be created if
-        // desired by the user.
-        long newtime = reservedCheckIn(destination, identity, backupFlag, false);
-
-        return newtime;
-    }
-
-    /**
-     * Delete the check in and roll back the file to the backup at time
-     * @param time The time point of the back version we want to retrieve
-     * @param destination The File for which we want undo the check in
-     * @exception Exception FileNotFoundException if the back version or the current version
-     *                couldn't be found
-     */
-    public void undoCheckIn(long time, String destination) throws Exception {
-        FileInputStream in = null;
-        FileOutputStream out = null;
-
-        try {
-            File backup = new File(this.backupDir + "/" + destination + ".bak." + time);
-            File current = new File(this.rootDir + destination);
-            RCML rcml = new RCML(this.rcmlDir, destination, this.rootDir);
-
-            if (!backup.isFile()) {
-                throw new FileNotFoundException(backup.getAbsolutePath());
-            }
-
-            if (!current.isFile()) {
-                throw new FileNotFoundException(current.getAbsolutePath());
-            }
-
-            in = new FileInputStream(backup.getAbsolutePath());
-            out = new FileOutputStream(current.getAbsolutePath());
-            byte[] buffer = new byte[512];
-            int length;
-
-            while ((length = in.read(buffer)) != -1) {
-                out.write(buffer, 0, length);
-            }
-
-            log.debug("Undo: copy " + backup.getAbsolutePath() + " " + current.getAbsolutePath());
-
-            rcml.deleteFirstCheckIn();
-        } catch (FileNotFoundException e) {
-            log.error("File not found " + e.toString());
-        } catch (IOException e) {
-            log.error("IO error " + e.toString());
-        } catch (Exception e) {
-            log.error("Exception " + e.toString());
-        } finally {
-            if (in != null)
-                in.close();
-            if (out != null)
-                out.close();
-        }
-    }
-
-    /**
-     * delete the revisions
-     * @param filename of the document
-     * @throws RevisionControlException when somthing went wrong
-     */
-    public void deleteRevisions(String filename) throws RevisionControlException {
-        try {
-            RCML rcml = this.getRCML(filename);
-            String[] times = rcml.getBackupsTime();
-            for (int i = 0; i < times.length; i++) {
-                long time = new Long(times[i]).longValue();
-                File backup = this.getBackupFile(time, filename);
-                File parentDirectory = null;
-                parentDirectory = backup.getParentFile();
-                boolean deleted = backup.delete();
-                if (!deleted) {
-                    throw new RevisionControlException("The backup file, "
-                            + backup.getCanonicalPath() + " could not be deleted!");
-                }
-                if (parentDirectory != null && parentDirectory.exists()
-                        && parentDirectory.isDirectory() && parentDirectory.listFiles().length == 0) {
-                    parentDirectory.delete();
-                }
-            }
-        } catch (Exception e) {
-            throw new RevisionControlException(e);
-        }
-    }
-
-    /**
-     * delete the rcml file
-     * @param filename of the document
-     * @throws RevisionControlException if something went wrong
-     */
-    public void deleteRCML(String filename) throws RevisionControlException {
-        try {
-            RCML rcml = this.getRCML(filename);
-            boolean deleted = rcml.delete();
-            if (!deleted) {
-                throw new RevisionControlException("The rcml file could not be deleted!");
-            }
-        } catch (Exception e) {
-            throw new RevisionControlException(e);
-        }
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/repository/Node.java b/src/java/org/apache/lenya/cms/repository/Node.java
deleted file mode 100644
index 3b00fe8..0000000
--- a/src/java/org/apache/lenya/cms/repository/Node.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.repository;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import org.apache.lenya.transaction.TransactionException;
-import org.apache.lenya.transaction.Transactionable;
-
-/**
- * Repository node.
- * 
- * @version $Id$
- */
-public interface Node extends Transactionable {
-
-    /**
-     * The protocol with which to find Lenya nodes
-     */
-    String LENYA_PROTOCOL = "lenya://";
-
-    /**
-     * The identifiable type.
-     */
-    String IDENTIFIABLE_TYPE = "node";
-
-    /**
-     * @return if the node exists.
-     * @throws TransactionException if an error occurs.
-     */
-    boolean exists() throws TransactionException;
-
-    /**
-     * @return The input stream.
-     * @throws TransactionException if the node does not exist.
-     */
-    InputStream getInputStream() throws TransactionException;
-
-    /**
-     * @return The output stream.
-     * @throws TransactionException if the node does not exist.
-     */
-    OutputStream getOutputStream() throws TransactionException;
-    
-    /**
-     * @return The last modification date.
-     * @throws TransactionException if the node does not exist.
-     */
-    long getLastModified() throws TransactionException;
-    
-    /**
-     * @return The content length.
-     * @throws TransactionException if the node does not exist.
-     */
-    long getContentLength() throws TransactionException;
-    
-    /**
-     * @return The MIME type.
-     * @throws TransactionException if the node does not exist.
-     */
-    String getMimeType() throws TransactionException;
-
-    /**
-     * Accessor for the source URI of this node
-     * @return the source URI
-     */
-    String getSourceURI();
-
-}
diff --git a/src/java/org/apache/lenya/cms/repository/SourceNode.java b/src/java/org/apache/lenya/cms/repository/SourceNode.java
deleted file mode 100644
index 64dfe14..0000000
--- a/src/java/org/apache/lenya/cms/repository/SourceNode.java
+++ /dev/null
@@ -1,522 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.repository;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.excalibur.source.ModifiableSource;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceNotFoundException;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.lenya.ac.Identity;
-import org.apache.lenya.ac.User;
-import org.apache.lenya.cms.cocoon.source.SourceUtil;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationFactory;
-import org.apache.lenya.cms.rc.RCEnvironment;
-import org.apache.lenya.cms.rc.RevisionController;
-import org.apache.lenya.transaction.IdentityMap;
-import org.apache.lenya.transaction.Lock;
-import org.apache.lenya.transaction.TransactionException;
-
-/**
- * A repository node.
- * 
- * @version $Id$
- */
-public class SourceNode extends AbstractLogEnabled implements Node {
-
-    private String sourceURI;
-    private ServiceManager manager;
-    private IdentityMap identityMap;
-
-    /**
-     * Ctor.
-     * @param map
-     * @param sourceURI
-     * @param manager
-     * @param logger
-     */
-    public SourceNode(IdentityMap map, String sourceURI, ServiceManager manager, Logger logger) {
-        this.sourceURI = sourceURI;
-        this.manager = manager;
-        enableLogging(logger);
-        this.identityMap = map;
-    }
-
-    protected String getUserId() {
-        String userId = null;
-        Identity identity = this.identityMap.getUnitOfWork().getIdentity();
-        if (identity != null) {
-            User user = identity.getUser();
-            if (user != null) {
-                userId = user.getId();
-            }
-        }
-        return userId;
-    }
-
-    protected String getRealSourceURI() {
-        return "context://" + this.sourceURI.substring(Node.LENYA_PROTOCOL.length());
-    }
-
-    /**
-     * @see org.apache.lenya.transaction.Transactionable#checkin()
-     */
-    public void checkin() throws TransactionException {
-        if (!isCheckedOut()) {
-            throw new TransactionException("Cannot check in node [" + this.sourceURI
-                    + "]: not checked out!");
-        }
-
-        try {
-            String userName = getUserId();
-            boolean newVersion = this.identityMap.getUnitOfWork().isDirty(this);
-            getRevisionController().reservedCheckIn(getRCPath(), userName, true, newVersion);
-        } catch (Exception e) {
-            throw new TransactionException(e);
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.transaction.Transactionable#isCheckedOut()
-     */
-    public boolean isCheckedOut() throws TransactionException {
-        try {
-            return getRevisionController().isCheckedOut(getRCPath());
-        } catch (TransactionException e) {
-            throw e;
-        } catch (Exception e) {
-            throw new TransactionException(e);
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.transaction.Transactionable#checkout()
-     */
-    public void checkout() throws TransactionException {
-
-        if (getLogger().isDebugEnabled())
-            getLogger().debug("SourceNode::checkout() called, sourceURI [" + sourceURI + "]");
-
-        if (!isCheckedOut()) {
-            try {
-                getRevisionController().reservedCheckOut(getRCPath(), getUserId());
-            } catch (Exception e) {
-                throw new TransactionException(e);
-            }
-        }
-    }
-
-    /**
-     * @return The path to use for the revision controller.
-     * @throws IOException if an error occurs.
-     */
-    protected String getRCPath() throws IOException {
-        String pubBase = Node.LENYA_PROTOCOL + Publication.PUBLICATION_PREFIX_URI + "/";
-        String publicationsPath = this.sourceURI.substring(pubBase.length());
-        String publicationId = publicationsPath.split("/")[0];
-        String path = pubBase + publicationId + "/";
-        return this.sourceURI.substring(path.length());
-    }
-
-    /**
-     * @see org.apache.lenya.transaction.Transactionable#deleteTransactionable()
-     */
-    public void deleteTransactionable() throws TransactionException {
-        try {
-            if (!isCheckedOut()) {
-                throw new RuntimeException("Cannot delete source [" + this.sourceURI
-                        + "]: not checked out!");
-            } else {
-                SourceUtil.delete(getRealSourceURI(), this.manager);
-            }
-        } catch (Exception e) {
-            throw new TransactionException(e);
-        }
-    }
-
-    private RevisionController revisionController;
-
-    protected RevisionController getRevisionController() throws TransactionException {
-        if (this.revisionController == null) {
-            try {
-                String pubBase = Node.LENYA_PROTOCOL + Publication.PUBLICATION_PREFIX_URI + "/";
-                String publicationsPath = this.sourceURI.substring(pubBase.length());
-                String publicationId = publicationsPath.split("/")[0];
-
-                Source contextSource = null;
-                SourceResolver resolver = null;
-                try {
-                    resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-                    contextSource = resolver.resolveURI("context://");
-                    File context = org.apache.excalibur.source.SourceUtil.getFile(contextSource);
-                    PublicationFactory factory = PublicationFactory.getInstance(getLogger());
-                    Publication pub = factory.getPublication(publicationId, context
-                            .getAbsolutePath());
-
-                    String publicationPath = pub.getDirectory().getCanonicalPath();
-                    RCEnvironment rcEnvironment = RCEnvironment.getInstance(pub.getServletContext()
-                            .getCanonicalPath());
-                    String rcmlDirectory = publicationPath + File.separator
-                            + rcEnvironment.getRCMLDirectory();
-                    String backupDirectory = publicationPath + File.separator
-                            + rcEnvironment.getBackupDirectory();
-                    this.revisionController = new RevisionController(rcmlDirectory,
-                            backupDirectory, publicationPath);
-                } finally {
-                    if (resolver != null) {
-                        if (contextSource != null) {
-                            resolver.release(contextSource);
-                        }
-                        this.manager.release(resolver);
-                    }
-                }
-
-            } catch (Exception e) {
-                throw new TransactionException(e);
-            }
-        }
-        return this.revisionController;
-    }
-
-    private Lock lock;
-
-    /**
-     * @see org.apache.lenya.transaction.Transactionable#hasChanged()
-     */
-    public boolean hasChanged() throws TransactionException {
-        try {
-            int currentVersion = getRevisionController().getLatestVersion(getRCPath());
-            int lockVersion = getLock().getVersion();
-            return currentVersion > lockVersion;
-        } catch (Exception e) {
-            throw new TransactionException(e);
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.transaction.Transactionable#saveTransactionable()
-     */
-    public synchronized void saveTransactionable() throws TransactionException {
-        if (!isCheckedOut()) {
-            throw new TransactionException("Cannot save node [" + this.sourceURI
-                    + "]: not checked out!");
-        }
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Saving [" + this + "] to source [" + getRealSourceURI() + "]");
-        }
-
-        if (this.data != null) {
-            SourceResolver resolver = null;
-            ModifiableSource source = null;
-            InputStream in = null;
-            OutputStream out = null;
-            try {
-
-                resolver = (SourceResolver) manager.lookup(SourceResolver.ROLE);
-                source = (ModifiableSource) resolver.resolveURI(getRealSourceURI());
-
-                out = source.getOutputStream();
-
-                byte[] buf = new byte[4096];
-                in = new ByteArrayInputStream(this.data);
-                int read = in.read(buf);
-
-                while (read > 0) {
-                    out.write(buf, 0, read);
-                    read = in.read(buf);
-                }
-
-            } catch (Exception e) {
-                throw new TransactionException(e);
-            } finally {
-
-                try {
-                    if (in != null) {
-                        in.close();
-                    }
-                    if (out != null) {
-                        out.flush();
-                        out.close();
-                    }
-                } catch (Throwable t) {
-                    throw new RuntimeException("Could not close streams: ", t);
-                }
-
-                if (resolver != null) {
-                    if (source != null) {
-                        resolver.release(source);
-                    }
-                    manager.release(resolver);
-                }
-            }
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.transaction.Transactionable#createTransactionable()
-     */
-    public void createTransactionable() throws TransactionException {
-    }
-
-    /**
-     * @see org.apache.lenya.transaction.Transactionable#lock()
-     */
-    public void lock() throws TransactionException {
-        if (isCheckedOut()) {
-            throw new TransactionException("Cannot lock [" + this + "]: node is checked out.");
-        }
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Locking [" + this + "]");
-        }
-        int currentVersion;
-        try {
-            currentVersion = getRevisionController().getLatestVersion(getRCPath());
-        } catch (TransactionException e) {
-            throw e;
-        } catch (Exception e) {
-            throw new TransactionException(e);
-        }
-        this.lock = new Lock(currentVersion);
-    }
-
-    /**
-     * @see org.apache.lenya.transaction.Transactionable#getLock()
-     */
-    public Lock getLock() {
-        return this.lock;
-    }
-
-    /**
-     * @see org.apache.lenya.transaction.Transactionable#unlock()
-     */
-    public void unlock() throws TransactionException {
-        this.lock = null;
-    }
-
-    /**
-     * @see org.apache.lenya.transaction.Transactionable#isLocked()
-     */
-    public boolean isLocked() throws TransactionException {
-        return this.lock != null;
-    }
-
-    /**
-     * @see org.apache.lenya.transaction.Identifiable#getIdentifiableType()
-     */
-    public String getIdentifiableType() {
-        return Node.IDENTIFIABLE_TYPE;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.repository.Node#exists()
-     */
-    public boolean exists() throws TransactionException {
-        loadData();
-        return this.data != null;
-    }
-
-    /**
-     * @see java.lang.Object#toString()
-     */
-    public String toString() {
-        return "node " + this.sourceURI;
-    }
-
-    byte[] data = null;
-
-    /**
-     * @see org.apache.lenya.cms.repository.Node#getInputStream()
-     */
-    public synchronized InputStream getInputStream() throws TransactionException {
-        if (!exists()) {
-            throw new RuntimeException(this + " does not exist!");
-        }
-        return new ByteArrayInputStream(this.data);
-    }
-
-    /**
-     * Loads the data from the real source.
-     * @throws TransactionException if an error occurs.
-     */
-    protected synchronized void loadData() throws TransactionException {
-
-        if (this.data != null) {
-            return;
-        }
-
-        ByteArrayOutputStream out = null;
-        InputStream in = null;
-        SourceResolver resolver = null;
-        Source source = null;
-        try {
-            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-            source = resolver.resolveURI(getRealSourceURI());
-
-            if (source.exists()) {
-                byte[] buf = new byte[4096];
-                out = new ByteArrayOutputStream();
-                in = source.getInputStream();
-                int read = in.read(buf);
-
-                while (read > 0) {
-                    out.write(buf, 0, read);
-                    read = in.read(buf);
-                }
-
-                this.data = out.toByteArray();
-            }
-        } catch (Exception e) {
-            throw new TransactionException(e);
-        } finally {
-            try {
-                if (in != null)
-                    in.close();
-                if (out != null)
-                    out.close();
-            } catch (Exception e) {
-                throw new TransactionException(e);
-            }
-
-            if (resolver != null) {
-                if (source != null) {
-                    resolver.release(source);
-                }
-                this.manager.release(resolver);
-            }
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.repository.Node#getOutputStream()
-     */
-    public synchronized OutputStream getOutputStream() throws TransactionException {
-        return new NodeOutputStream();
-    }
-
-    /**
-     * Output stream.
-     */
-    private class NodeOutputStream extends ByteArrayOutputStream {
-        /**
-         * @see java.io.OutputStream#close()
-         */
-        public synchronized void close() throws IOException {
-            SourceNode.this.data = super.toByteArray();
-            super.close();
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.repository.Node#getContentLength()
-     */
-    public long getContentLength() throws TransactionException {
-        SourceResolver resolver = null;
-        Source source = null;
-        try {
-            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-            source = resolver.resolveURI(getRealSourceURI());
-            if (source.exists()) {
-                return source.getContentLength();
-            } else {
-                throw new SourceNotFoundException("The source [" + getRealSourceURI()
-                        + "] does not exist!");
-            }
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (resolver != null) {
-                if (source != null) {
-                    resolver.release(source);
-                }
-                this.manager.release(resolver);
-            }
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.repository.Node#getLastModified()
-     */
-    public long getLastModified() throws TransactionException {
-        SourceResolver resolver = null;
-        Source source = null;
-        try {
-            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-            source = resolver.resolveURI(getRealSourceURI());
-            if (source.exists()) {
-                return source.getLastModified();
-            } else {
-                throw new TransactionException("The source [" + getRealSourceURI()
-                        + "] does not exist!");
-            }
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (resolver != null) {
-                if (source != null) {
-                    resolver.release(source);
-                }
-                this.manager.release(resolver);
-            }
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.repository.Node#getMimeType()
-     */
-    public String getMimeType() throws TransactionException {
-        SourceResolver resolver = null;
-        Source source = null;
-        try {
-            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-            source = resolver.resolveURI(getRealSourceURI());
-            if (source.exists()) {
-                return source.getMimeType();
-            } else {
-                throw new SourceNotFoundException("The source [" + getRealSourceURI()
-                        + "] does not exist!");
-            }
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (resolver != null) {
-                if (source != null) {
-                    resolver.release(source);
-                }
-                this.manager.release(resolver);
-            }
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.repository.Node#getSourceURI()
-     */
-    public String getSourceURI() {
-        return sourceURI;
-    }
-
-
-}
diff --git a/src/java/org/apache/lenya/cms/repository/SourceNodeFactory.java b/src/java/org/apache/lenya/cms/repository/SourceNodeFactory.java
deleted file mode 100644
index f17a093..0000000
--- a/src/java/org/apache/lenya/cms/repository/SourceNodeFactory.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.repository;
-
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.lenya.transaction.Identifiable;
-import org.apache.lenya.transaction.IdentityMap;
-import org.apache.lenya.transaction.IdentifiableFactory;
-
-/**
- * Factory to create source nodes.
- *
- * @version $Id$
- */
-public class SourceNodeFactory extends AbstractLogEnabled implements IdentifiableFactory {
-
-    private ServiceManager manager;
-    
-    /**
-     * Ctor.
-     * @param manager
-     * @param logger
-     */
-    public SourceNodeFactory(ServiceManager manager, Logger logger) {
-        this.manager = manager;
-        enableLogging(logger);
-    }
-    
-    /**
-     * @see org.apache.lenya.transaction.IdentifiableFactory#build(org.apache.lenya.transaction.IdentityMap, java.lang.String)
-     */
-    public Identifiable build(IdentityMap map, String key) throws Exception {
-        return new SourceNode(map, key, this.manager, getLogger());
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/scheduler/AbstractSchedulerListener.java b/src/java/org/apache/lenya/cms/scheduler/AbstractSchedulerListener.java
deleted file mode 100644
index 572672f..0000000
--- a/src/java/org/apache/lenya/cms/scheduler/AbstractSchedulerListener.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.scheduler;
-
-import org.apache.log4j.Logger;
-import org.quartz.SchedulerException;
-import org.quartz.SchedulerListener;
-import org.quartz.Trigger;
-
-/**
- * The Abstract Scheduler Listener
- */
-public class AbstractSchedulerListener implements SchedulerListener {
-
-	private static final Logger log = Logger.getLogger(AbstractSchedulerListener.class);
-
-	/**
-	 * @see org.quartz.SchedulerListener#jobScheduled(org.quartz.Trigger)
-	 */
-	public void jobScheduled(Trigger trigger) {
-		log.debug("Job scheduled");
-		log.debug("    Trigger: [" + trigger + "]");
-	}
-
-	/**
-	 * @see org.quartz.SchedulerListener#jobUnscheduled(java.lang.String, java.lang.String)
-	 */
-	public void jobUnscheduled(String name, String group) {
-		log.debug("Job unscheduled.");
-		log.debug("    Trigger name:  [" + name + "]");
-		log.debug("    Trigger group: [" + group + "]");
-	}
-
-	/**
-	 * @see org.quartz.SchedulerListener#triggerFinalized(org.quartz.Trigger)
-	 */
-	public void triggerFinalized(Trigger trigger) {
-		log.debug("Trigger finalized.");
-		log.debug("    Trigger:  [" + trigger + "]");
-	}
-
-	/**
-	 * @see org.quartz.SchedulerListener#triggersPaused(java.lang.String, java.lang.String)
-	 */
-	public void triggersPaused(String name, String group) {
-		log.debug("Triggers paused.");
-		log.debug("    Trigger name:  [" + name + "]");
-		log.debug("    Trigger group: [" + group + "]");
-	}
-
-	/**
-	 * @see org.quartz.SchedulerListener#triggersResumed(java.lang.String, java.lang.String)
-	 */
-	public void triggersResumed(String name, String group) {
-		log.debug("Triggers resumed.");
-		log.debug("    Trigger name:  [" + name + "]");
-		log.debug("    Trigger group: [" + group + "]");
-	}
-
-	/**
-	 * @see org.quartz.SchedulerListener#jobsPaused(java.lang.String, java.lang.String)
-	 */
-	public void jobsPaused(String name, String group) {
-		log.debug("Jobs paused.");
-		log.debug("    Job name:  [" + name + "]");
-		log.debug("    Job group: [" + group + "]");
-	}
-
-	/**
-	 * @see org.quartz.SchedulerListener#jobsResumed(java.lang.String, java.lang.String)
-	 */
-	public void jobsResumed(String name, String group) {
-		log.debug("Jobs resumed.");
-		log.debug("    Job name:  [" + name + "]");
-		log.debug("    Job group: [" + group + "]");
-	}
-
-	/**
-	 * @see org.quartz.SchedulerListener#schedulerError(java.lang.String,
-	 *      org.quartz.SchedulerException)
-	 */
-	public void schedulerError(String message, SchedulerException exception) {
-		log.debug("Scheduler exception occured.");
-		log.debug("    Message:  [" + message + "]");
-		log.debug(exception);
-	}
-
-	/**
-	 * @see org.quartz.SchedulerListener#schedulerShutdown()
-	 */
-	public void schedulerShutdown() {
-		log.debug("Scheduler shut down.");
-	}
-
-}
diff --git a/src/java/org/apache/lenya/cms/scheduler/JobWrapper.java b/src/java/org/apache/lenya/cms/scheduler/JobWrapper.java
deleted file mode 100644
index ced989d..0000000
--- a/src/java/org/apache/lenya/cms/scheduler/JobWrapper.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.scheduler;
-
-import org.quartz.JobDetail;
-import org.quartz.Trigger;
-
-/**
- * Wrapper for job information.
- */
-public class JobWrapper {
-    
-    private JobDetail jobDetail;
-    private Trigger trigger;
-    
-    /**
-     * Ctor.
-     * @param detail The job detail.
-     * @param _trigger The trigger.
-     */
-    public JobWrapper(JobDetail detail, Trigger _trigger) {
-        this.jobDetail = detail;
-        this.trigger = _trigger;
-    }
-    
-    /**
-     * Returns the job detail.
-     * @return A job detail object.
-     */
-    public JobDetail getJobDetail() {
-        return this.jobDetail;
-    }
-    
-    /**
-     * Returns the servlet job.
-     * @return A servlet job.
-     */
-    public ServletJob getJob() {
-        ServletJob job = ServletJobFactory.createJob(this.jobDetail.getJobClass());
-        return job;
-    }
-    
-    /**
-     * Returns the trigger.
-     * @return A trigger.
-     */
-    public Trigger getTrigger() {
-        return this.trigger;
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/scheduler/LoadQuartzServlet.java b/src/java/org/apache/lenya/cms/scheduler/LoadQuartzServlet.java
deleted file mode 100644
index c95ef6c..0000000
--- a/src/java/org/apache/lenya/cms/scheduler/LoadQuartzServlet.java
+++ /dev/null
@@ -1,461 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.scheduler;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Date;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-
-import org.apache.avalon.framework.logger.ConsoleLogger;
-import org.apache.lenya.cms.publication.DocumentBuildException;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationException;
-import org.apache.lenya.cms.publication.PublicationFactory;
-import org.apache.lenya.cms.publishing.PublishingEnvironment;
-import org.apache.lenya.cms.scheduler.xml.TriggerHelper;
-import org.apache.lenya.util.NamespaceMap;
-import org.apache.lenya.xml.DocumentHelper;
-import org.apache.log4j.Logger;
-import org.quartz.SchedulerException;
-import org.w3c.dom.Document;
-
-/**
- * A simple servlet that starts an instance of a Quartz scheduler.
- */
-public class LoadQuartzServlet extends HttpServlet {
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	private static final class IsDirectoryFileFilter implements FileFilter {
-        /**
-         * @see java.io.FileFilter#accept(java.io.File)
-         */
-        public boolean accept(File file) {
-            return file.isDirectory();
-        }
-    }
-
-    private static Logger log = Logger.getLogger(LoadQuartzServlet.class);
-    private static SchedulerWrapper scheduler = null;
-    private ServletContext servletContext;
-    private String schedulerConfigurations;
-
-    /**
-     * <code>PREFIX</code> Scheduler namespace prefix
-     */
-    public static final String PREFIX = "scheduler";
-    /**
-     * <code>PARAMETER_ACTION</code> The action parameter
-     */
-    public static final String PARAMETER_ACTION = "action";
-    /**
-     * <code>PARAMETER_PUBLICATION_ID</code> The publication id parameter
-     */
-    public static final String PARAMETER_PUBLICATION_ID = "publication-id";
-    /**
-     * <code>PARAMETER_DOCUMENT_URL</code> The document URL parameter
-     */
-    public static final String PARAMETER_DOCUMENT_URL = "document-url";
-    /**
-     * <code>CONFIGURATION_ELEMENT</code> The configuration element
-     */
-    public static final String CONFIGURATION_ELEMENT = "scheduler-configurations";
-    /**
-     * <code>SERVLET_URL</code> The scheduler servlet URL
-     */
-    public static final String SERVLET_URL = "/servlet/QuartzSchedulerServlet";
-
-    /**
-     * Returns the scheduler wrapper.
-     * @return A scheduler wrapper.
-     */
-    public static SchedulerWrapper getScheduler() {
-        return scheduler;
-    }
-
-    /**
-     * Maps servlet context names to servlets.
-     */
-    private static Map servlets = new HashMap();
-
-    /**
-     * Initializes the servlet.
-     * @param config The servlet configuration.
-     * @throws ServletException when something went wrong.
-     */
-    public void init(ServletConfig config) throws ServletException {
-        super.init(config);
-
-        this.schedulerConfigurations = config.getInitParameter(CONFIGURATION_ELEMENT);
-        this.servletContext = config.getServletContext();
-
-        log.debug(".init(): Servlet Context Path: "
-                + getServletContextDirectory().getAbsolutePath());
-
-        try {
-            log.debug("Storing servlet");
-            String contextPath = getServletContextDirectory().getCanonicalPath();
-            log.debug("  Context path: [" + contextPath + "]");
-            servlets.put(contextPath, this);
-        } catch (IOException e) {
-            throw new ServletException(e);
-        }
-
-        log.debug(".init(): Scheduler Configurations: " + this.schedulerConfigurations);
-
-        try {
-            log.info("Working?...");
-            process();
-            log.info("OK");
-        } catch (Exception e) {
-            log.error("Init of LoadQuartzServlet failed", e);
-            throw new ServletException(e);
-        }
-    }
-
-    /**
-     * Process.
-     * @throws ServletException when an error occurs.
-     * @throws SchedulerException when an error occurs.
-     */
-    public void process() throws ServletException, SchedulerException {
-        scheduler = new SchedulerWrapper(getServletContextDirectory().getAbsolutePath(),
-                this.schedulerConfigurations);
-
-        try {
-            shutdownHook();
-        } catch (Exception e) {
-            log.error(e.toString(), e);
-            throw new ServletException(e);
-        }
-
-        restoreJobs();
-    }
-
-    /**
-     * Shuts down the scheduler.
-     */
-    public void destroy() {
-        destroyScheduler();
-    }
-
-    /**
-     * Shuts down the scheduler.
-     */
-    public static void destroyScheduler() {
-        log.debug("destroy: ");
-        getScheduler().shutdown();
-    }
-
-    /**
-     * This method sets a ShutdownHook to the system This traps the CTRL+C or kill signal and
-     * shutdows Correctly the system.
-     * 
-     * @throws Exception when something went wrong.
-     */
-    public static void shutdownHook() throws Exception {
-        log.debug("-------------------- ShutdownHook --------------------");
-        Runtime.getRuntime().addShutdownHook(new Thread() {
-            public void run() {
-                LoadQuartzServlet.destroyScheduler();
-            }
-        });
-        log.debug("-------------------- End ShutdownHook --------------------");
-    }
-
-    /**
-     * Handles a GET request.
-     * @param request The request.
-     * @param response The response.
-     * @throws IOException when an error occured.
-     * @throws ServletException when an error occured.
-     */
-    public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException,
-            ServletException {
-        handleRequest(request, response);
-    }
-
-    /**
-     * Handles a POST request.
-     * @param req The requust.
-     * @param resp The response.
-     * @throws ServletException when an error occured.
-     * @throws IOException when an error occured.
-     */
-    public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException,
-            IOException {
-        doGet(req, resp);
-    }
-
-    protected static final String ADD = "add";
-    protected static final String MODIFY = "modify";
-    protected static final String DELETE = "delete";
-    protected static final String DOCUMENT_DELETED = "document-deleted";
-
-    /**
-     * Handles a servlet request.
-     * @param request The request.
-     * @param response The response.
-     * @throws IOException when something went wrong.
-     */
-    protected void handleRequest(HttpServletRequest request, HttpServletResponse response)
-            throws IOException {
-        log.debug("----------------------------------------------------------------");
-        log.debug("- Incoming request at URI: ");
-        log
-                .debug(request.getServerName() + ":" + request.getServerPort()
-                        + request.getRequestURI());
-        log.debug("----------------------------------------------------------------");
-        log.debug("Request parameters:");
-
-        NamespaceMap schedulerParameters = getSchedulerParameters(request);
-
-        try {
-            String publicationId = (String) schedulerParameters.get(PARAMETER_PUBLICATION_ID);
-            log.debug("Scheduler invoked.");
-
-            log.debug("Scheduler Parameters:");
-            log.debug("    scheduler.publication-id: [" + publicationId + "]");
-
-            logSessionAttributes(request);
-
-            // check if the request wants to submit, modify or delete a job.
-            String action = (String) schedulerParameters.get(PARAMETER_ACTION);
-            log.debug("    scheduler.action:         [" + action + "]");
-            if (action == null) {
-                // do nothing
-            } else if (action.equals(ADD)) {
-                Date startTime = TriggerHelper.getDate(schedulerParameters);
-                getScheduler().addJob(publicationId, startTime, request);
-            } else if (action.equals(MODIFY)) {
-                Date startTime = TriggerHelper.getDate(schedulerParameters);
-                String jobId = getJobId(schedulerParameters);
-                getScheduler().modifyJob(jobId, publicationId, startTime);
-            } else if (action.equals(DELETE)) {
-                String jobId = getJobId(schedulerParameters);
-                getScheduler().deleteJob(jobId, publicationId);
-            } else if (action.equals(DOCUMENT_DELETED)) {
-                String documentUrl = (String) schedulerParameters.get(PARAMETER_DOCUMENT_URL);
-                DocumentIdentityMap map = new DocumentIdentityMap(null, null);
-                org.apache.lenya.cms.publication.Document document = map.getFromURL(documentUrl);
-                deleteDocumentJobs(document);
-            }
-
-            // handle the remainder of the request by simply returning all
-            // scheduled jobs (for the given publication ID).
-            PrintWriter writer = response.getWriter();
-            response.setContentType("text/xml");
-
-            Document snapshot = getScheduler().getSnapshot();
-
-            DocumentHelper.writeDocument(snapshot, writer);
-        } catch (DocumentBuildException e) {
-            log.error("Can't create job snapshot: ", e);
-            throw new IOException(e.getMessage() + " (view log for details)");
-        } catch (TransformerConfigurationException e) {
-            log.error("Can't create job snapshot: ", e);
-            throw new IOException(e.getMessage() + " (view log for details)");
-        } catch (IOException e) {
-            log.error("Can't create job snapshot: ", e);
-            throw new IOException(e.getMessage() + " (view log for details)");
-        } catch (SchedulerException e) {
-            log.error("Can't create job snapshot: ", e);
-            throw new IOException(e.getMessage() + " (view log for details)");
-        } catch (PublicationException e) {
-            log.error("Can't create job snapshot: ", e);
-            throw new IOException(e.getMessage() + " (view log for details)");
-        } catch (TransformerException e) {
-            log.error("Can't create job snapshot: ", e);
-            throw new IOException(e.getMessage() + " (view log for details)");
-        }
-    }
-
-    /**
-     * Extracts the scheduler parameters from a request.
-     * @param request The request.
-     * @return A namespace map.
-     */
-    public static NamespaceMap getSchedulerParameters(HttpServletRequest request) {
-        Map parameterMap = new HashMap();
-        List keys = new ArrayList();
-        for (Enumeration e = request.getParameterNames(); e.hasMoreElements();) {
-            String key = (String) e.nextElement();
-            keys.add(key);
-        }
-        Collections.sort(keys);
-        for (Iterator i = keys.iterator(); i.hasNext();) {
-            String key = (String) i.next();
-            String[] values = request.getParameterValues(key);
-            log.debug("    [" + key + "] = [" + values[0] + "]");
-            if (values.length == 1) {
-                parameterMap.put(key, values[0]);
-            } else {
-                parameterMap.put(key, values);
-            }
-        }
-
-        NamespaceMap schedulerParameters = new NamespaceMap(parameterMap, PREFIX);
-        return schedulerParameters;
-    }
-
-    /**
-     * Deletes
-     * @param document
-     * @throws DocumentBuildException
-     * @throws SchedulerException
-     * @throws PublicationException
-     */
-    public void deleteDocumentJobs(org.apache.lenya.cms.publication.Document document)
-            throws DocumentBuildException, SchedulerException, PublicationException {
-        log.debug("Requested to delete jobs for document URL [" + document.getCanonicalWebappURL()
-                + "]");
-        getScheduler().deleteJobs(document);
-    }
-
-    /**
-     * Extracts the job ID from the scheduler parameters.
-     * @param schedulerParameters A namespace map.
-     * @return A string.
-     */
-    protected String getJobId(NamespaceMap schedulerParameters) {
-        String parameterName = NamespaceMap.getFullName(SchedulerWrapper.JOB_PREFIX,
-                SchedulerWrapper.JOB_ID);
-        String jobId = (String) schedulerParameters.get(parameterName);
-        log.debug("    scheduler.job.id:         [" + jobId + "]");
-        return jobId;
-    }
-
-    /**
-     * Logs the session attributes of a request.
-     * @param request The request.
-     */
-    protected void logSessionAttributes(HttpServletRequest request) {
-        log.debug("-------------------- Session Attributes --------------------");
-        for (Enumeration e = request.getSession().getAttributeNames(); e.hasMoreElements();) {
-            String name = (String) e.nextElement();
-            log.debug(name + " = " + request.getSession().getAttribute(name));
-        }
-        log.debug("-------------------- End Session Attributes --------------------");
-    }
-
-    /**
-     * Returns the servlet context path.
-     * 
-     * @return A string.
-     */
-    public File getServletContextDirectory() {
-        return new File(this.servletContext.getRealPath("/"));
-    }
-
-    /**
-     * Restores the jobs.
-     * @throws SchedulerException when something went wrong.
-     */
-    public void restoreJobs() throws SchedulerException {
-
-        File publicationsDirectory = new File(getServletContextDirectory(),
-                PublishingEnvironment.PUBLICATION_PREFIX);
-
-        File[] publicationDirectories = publicationsDirectory
-                .listFiles(new IsDirectoryFileFilter());
-
-        log.debug("=========================================");
-        log.debug("  Restoring jobs.");
-        log.debug("    servlet context: [" + getServletContextDirectory() + "]");
-        log.debug("    publications directory: [" + publicationsDirectory + "]");
-        log.debug("=========================================");
-
-        for (int i = 0; i < publicationDirectories.length; i++) {
-            File directory = publicationDirectories[i];
-            String publicationId = directory.getName();
-            PublicationFactory factory = PublicationFactory.getInstance(new ConsoleLogger());
-            Publication publication;
-            try {
-                publication = factory.getPublication(publicationId, getServletContextDirectory());
-            } catch (PublicationException e) {
-                throw new SchedulerException(e);
-            }
-            if (publication.exists()) {
-                getScheduler().restoreJobs(publicationId);
-            }
-        }
-    }
-
-    /**
-     * Returns the servlet for a certain canonical servlet context path.
-     * @param contextPath The canonical servlet context path.
-     * @return A LoadQuartzServlet.
-     */
-    public static LoadQuartzServlet getServlet(String contextPath) {
-        return (LoadQuartzServlet) servlets.get(contextPath);
-    }
-
-    /**
-     * Generates the request URI needed to delete the jobs for a certain document.
-     * @param port The port of the servlet
-     * @param servletContextPath The context path of the servlet
-     * @param document The document.
-     * @return A string.
-     */
-    public static String getDeleteDocumentRequestURI(String port, String servletContextPath,
-            org.apache.lenya.cms.publication.Document document) {
-
-        NamespaceMap requestParameters = new NamespaceMap(PREFIX);
-        requestParameters.put(PARAMETER_ACTION, DOCUMENT_DELETED);
-        requestParameters.put(PARAMETER_PUBLICATION_ID, document.getPublication().getId());
-        requestParameters.put(PARAMETER_DOCUMENT_URL, document.getCanonicalWebappURL());
-
-        StringBuffer buf = new StringBuffer();
-        buf.append("http://127.0.0.1:" + port + servletContextPath + "?");
-        Map map = requestParameters.getMap();
-
-        String[] keys = (String[]) map.keySet().toArray(new String[map.keySet().size()]);
-        for (int i = 0; i < keys.length; i++) {
-            if (i > 0) {
-                buf.append("&");
-            }
-            String value = (String) map.get(keys[i]);
-            buf.append(keys[i] + "=" + value);
-        }
-
-        return buf.toString();
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/scheduler/SchedulerStore.java b/src/java/org/apache/lenya/cms/scheduler/SchedulerStore.java
deleted file mode 100644
index eb601c5..0000000
--- a/src/java/org/apache/lenya/cms/scheduler/SchedulerStore.java
+++ /dev/null
@@ -1,339 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.scheduler;
-
-import java.io.File;
-import java.io.IOException;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.List;
-
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.scheduler.xml.TriggerHelper;
-import org.apache.lenya.xml.DocumentHelper;
-import org.apache.lenya.xml.NamespaceHelper;
-import org.apache.log4j.Logger;
-import org.quartz.JobDetail;
-import org.quartz.SchedulerException;
-import org.quartz.Trigger;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-/**
- * Store for scheduler jobs.
- */
-public class SchedulerStore {
-
-    /**
-     * <code>ELEMENT_JOB_GROUP</code> The job group element
-     */
-    public static final String ELEMENT_JOB_GROUP = "job-group";
-    /**
-     * <code>ELEMENT_JOB</code> The job element
-     */
-    public static final String ELEMENT_JOB = "job";
-    /**
-     * <code>TITLE_ELEMENT</code> The title element
-     */
-    public static final String TITLE_ELEMENT = "title";
-    /**
-     * <code>SNAPSHOT_FILE</code> The path to the stored jobs
-     */
-    public static final String SNAPSHOT_FILE =
-        "config/scheduler/jobs.xml".replace('/', File.separatorChar);
-
-    /** The namespace for the <code>jobs.xml</code> file. */
-    public static final String NAMESPACE = "http://apache.org/cocoon/lenya/scheduler/1.0";
-
-    private static final Logger log = Logger.getLogger(SchedulerStore.class);
-
-
-    /**
-     * Ctor.
-     */
-    public SchedulerStore() {
-	    // do nothing
-    }
-
-    /**
-     * Returns the job snapshot file for a publication..
-     * @param publication The publication.
-     * @return A file.
-     * @throws SchedulerException when the publication could not be built.
-     */
-    protected File getJobsFile(Publication publication) throws SchedulerException {
-        File jobsFile;
-        jobsFile = new File(publication.getDirectory(), SNAPSHOT_FILE);
-        log.debug("Resolved job snapshot file: [" + jobsFile.getAbsolutePath() + "]");
-        return jobsFile;
-    }
-
-    /**
-     * Writes a job snapshot.
-     * @param publication The publication.
-     * @param jobs The jobs to persist
-     * @throws SchedulerException when something went wrong.
-     */
-    protected void writeSnapshot(Publication publication, JobWrapper[] jobs)
-        throws SchedulerException {
-
-        log.debug("Writing job snapshot for publication [" + publication.getId() + "]");
-        File jobsFile = getJobsFile(publication);
-
-        try {
-            File directory = jobsFile.getParentFile();
-
-            if (!directory.exists()) {
-                directory.mkdirs();
-                log.debug("Creating job snapshot directory: " + directory.getPath());
-            }
-
-            if (jobsFile.createNewFile()) log.debug("new jobs file created.");
-            DocumentHelper.writeDocument(getSnapshot(publication, jobs), jobsFile);
-        } catch (final TransformerConfigurationException e) {
-            log.error("Writing job snapshot failed: ", e);
-            throw new SchedulerException(e);
-        } catch (final IOException e) {
-            log.error("Writing job snapshot failed: ", e);
-            throw new SchedulerException(e);
-        } catch (final TransformerException e) {
-            log.error("Writing job snapshot failed: ", e);
-            throw new SchedulerException(e);
-        } catch (final SchedulerException e) {
-            log.error("Writing job snapshot failed: ", e);
-            throw new SchedulerException(e);
-        }
-
-    }
-
-    /**
-     * Return an xml description of all scheduled jobs for the given publication.
-     *
-     * @param publication The publication.
-     * @param jobs The jobs to return
-     * @return An XML document.
-     * @exception SchedulerException if an error occurs
-     */
-    public Document getSnapshot(Publication publication, JobWrapper[] jobs)
-        throws SchedulerException {
-        NamespaceHelper helper = SchedulerStore.getNamespaceHelper();
-        Document document = helper.getDocument();
-        Element root = document.getDocumentElement();
-
-        log.debug("Creating job snapshot for publication [" + publication.getId() + "]");
-        root.appendChild(createSnapshot(helper, publication, jobs));
-
-        return document;
-    }
-
-    /**
-     * Returns a scheduler namespace helper for a document.
-     * @param document The XML document.
-     * @return a namespace helper.
-     */
-    public static NamespaceHelper getNamespaceHelper(Document document) {
-        return new NamespaceHelper(NAMESPACE, "sch", document);
-    }
-
-    /**
-     * Returns a new scheduler namespace helper with an document containing
-     * a &lt;sch:scheduler&gt; element.
-     * @return a namespace helper.
-     */
-    public static NamespaceHelper getNamespaceHelper() {
-        try {
-            return new NamespaceHelper(NAMESPACE, "sch", "scheduler");
-        } catch (Exception e) {
-            log.error("Could not create namespace helper: ", e);
-
-            return null;
-        }
-    }
-
-    /**
-     * Creates an XML element containing a snapshot of a job group.
-     * @param helper The namespace helper to use.
-     * @param publication The publication to create the snapshot for
-     * @param jobs The jobs
-     * @return An XML element.
-     * @throws SchedulerException when something went wrong.
-     */
-    protected Element createSnapshot(
-        NamespaceHelper helper,
-        Publication publication,
-        JobWrapper[] jobs)
-        throws SchedulerException {
-        Element jobGroupElement = helper.createElement(ELEMENT_JOB_GROUP);
-        jobGroupElement.setAttribute("name", publication.getId());
-
-        for (int i = 0; i < jobs.length; i++) {
-
-            ServletJob job = jobs[i].getJob();
-            Element jobElement = job.save(helper, jobs[i].getJobDetail());
-            jobGroupElement.appendChild(jobElement);
-
-            Trigger trigger = jobs[i].getTrigger();
-
-            if (trigger != null) {
-                Element triggerElement = TriggerHelper.createElement(helper, trigger);
-                jobElement.appendChild(triggerElement);
-            }
-        }
-
-        return jobGroupElement;
-    }
-
-    /**
-     * Restores the jobs of a certain job group from the snapshot file.
-     * @param publication The publication
-     * @return A job wrapper
-     * @throws SchedulerException when something went wrong.
-     */
-    public JobWrapper[] restoreJobs(Publication publication) throws SchedulerException {
-        
-        log.debug("Restoring jobs for publication [" + publication.getId() + "]");
-
-        List wrappers = new ArrayList();
-        File jobsFile = getJobsFile(publication);
-        
-        if (jobsFile.exists()) {
-            Element[] jobElements = getJobElements(publication);
-            Document document;
-            try {
-                document = DocumentHelper.readDocument(jobsFile);
-            } catch (Exception e) {
-                throw new SchedulerException(e);
-            }
-            NamespaceHelper helper = SchedulerStore.getNamespaceHelper(document);
-
-            for (int i = 0; i < jobElements.length; i++) {
-                wrappers.add(restoreJob(helper, jobElements[i], publication));
-            }
-        }
-        else {
-            log.debug("Could not restore jobs for publication [" + publication.getId() + "] - jobs file does not exist.");
-        }
-
-        return (JobWrapper[]) wrappers.toArray(new JobWrapper[wrappers.size()]);
-    }
-
-    /**
-     * Restores the jobs from a certain XML element.
-     * @param helper The namespace helper
-     * @param jobElement The XML element.
-     * @param publication The publication to restore jobs for
-     * @return A job wrapper
-     * @throws SchedulerException if an error occurs
-     */
-    protected JobWrapper restoreJob(
-        NamespaceHelper helper,
-        Element jobElement,
-        Publication publication)
-        throws SchedulerException {
-        log.debug("Restoring job ");
-        JobWrapper wrapper;
-
-        try {
-            String jobClassName = jobElement.getAttribute(ServletJob.ATTRIBUTE_CLASS);
-            ServletJob job = ServletJobFactory.createJob(jobClassName);
-            JobDetail jobDetail =
-                job.load(
-                    jobElement,
-                    publication.getId(),
-                    publication.getServletContext().getAbsolutePath());
-
-            Trigger trigger = null;
-
-            Element triggerElement = helper.getFirstChild(jobElement, "trigger");
-            if (triggerElement != null) {
-                trigger =
-                    TriggerHelper.createTrigger(
-                        triggerElement,
-                        jobDetail.getName(),
-                        jobDetail.getGroup());
-
-                Date now = new GregorianCalendar().getTime();
-                if (log.isDebugEnabled()) {
-                    DateFormat format = new SimpleDateFormat();
-                    log.debug(
-                        "    Trigger time: [" + format.format(trigger.getFinalFireTime()) + "]");
-                    log.debug("    Current time: [" + format.format(now) + "]");
-                }
-                if (!trigger.getFinalFireTime().after(now)) {
-                    trigger = null;
-                }
-            }
-            wrapper = new JobWrapper(jobDetail, trigger);
-
-        } catch (Exception e) {
-            throw new SchedulerException(e);
-        }
-        return wrapper;
-    }
-
-    /**
-     * Returns the job elements of a publication.
-     * @param publication
-     * @return An array of elements
-     * @throws SchedulerException when something went wrong.
-     */
-    protected Element[] getJobElements(Publication publication) throws SchedulerException {
-        Element[] jobElements;
-        try {
-            File jobsFile = getJobsFile(publication);
-            if (jobsFile.exists()) {
-                Document document = DocumentHelper.readDocument(jobsFile);
-                Element schedulerElement = document.getDocumentElement();
-                NamespaceHelper helper = SchedulerStore.getNamespaceHelper(document);
-
-                Element jobGroupElement =
-                    helper.getFirstChild(schedulerElement, SchedulerStore.ELEMENT_JOB_GROUP);
-                if (jobGroupElement == null) {
-                    throw new SchedulerException("No <job-group> element found!");
-                }
-
-                String jobGroupAttribute = jobGroupElement.getAttribute("name");
-
-                if (!jobGroupAttribute.equals(publication.getId())) {
-                    throw new SchedulerException(
-                        "The jobs.xml file contains a wrong job group: ["
-                            + jobGroupAttribute
-                            + "]");
-                }
-                jobElements = helper.getChildren(jobGroupElement, SchedulerStore.ELEMENT_JOB);
-
-            } else {
-                throw new SchedulerException(
-                    "The jobs file [" + jobsFile.getAbsolutePath() + "] does not exist!");
-            }
-        } catch (SchedulerException e) {
-            throw e;
-        } catch (Exception e) {
-            throw new SchedulerException(e);
-        }
-        return jobElements;
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/scheduler/SchedulerWrapper.java b/src/java/org/apache/lenya/cms/scheduler/SchedulerWrapper.java
deleted file mode 100644
index 7d193fb..0000000
--- a/src/java/org/apache/lenya/cms/scheduler/SchedulerWrapper.java
+++ /dev/null
@@ -1,566 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.scheduler;
-
-import java.io.File;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
-import org.apache.avalon.framework.logger.ConsoleLogger;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationException;
-import org.apache.lenya.cms.publication.PublicationFactory;
-import org.apache.lenya.cms.scheduler.xml.TriggerHelper;
-import org.apache.lenya.xml.NamespaceHelper;
-import org.apache.log4j.Logger;
-import org.quartz.JobDataMap;
-import org.quartz.JobDetail;
-import org.quartz.Scheduler;
-import org.quartz.SchedulerException;
-import org.quartz.SchedulerFactory;
-import org.quartz.Trigger;
-import org.quartz.impl.StdSchedulerFactory;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-/**
- * Scheduler wrapper
- */
-public class SchedulerWrapper {
-
-    private static Logger log = Logger.getLogger(SchedulerWrapper.class);
-    /**
-     * <code>JOB_PREFIX</code> Job Namespace prefix
-     */
-    public static final String JOB_PREFIX = "job";
-    /**
-     * <code>JOB_ID</code> Job ID
-     */
-    public static final String JOB_ID = "id";
-    private static int jobId = 0;
-    private Scheduler scheduler = null;
-    private String servletContextPath;
-    private String schedulerConfigurationPath;
-    private SchedulerStore store = new SchedulerStore();
-
-    /**
-     * Creates a new instance of SchedulerWrapper
-     *
-     * @param _servletContextPath The servlet context path.
-     * @param _schedulerConfigurationPath The scheduler configuration path.
-     */
-    public SchedulerWrapper(String _servletContextPath, String _schedulerConfigurationPath) {
-        this.servletContextPath = _servletContextPath;
-        this.schedulerConfigurationPath = _schedulerConfigurationPath;
-
-        SchedulerFactory factory = new StdSchedulerFactory();
-        log.info("------- Starting up -----------------------");
-
-        try {
-            this.scheduler = factory.getScheduler();
-
-            this.scheduler.addSchedulerListener(new AbstractSchedulerListener());
-            this.scheduler.start();
-        } catch (SchedulerException e) {
-            log.error("Can't initialize SchedulerWrapper: ", e);
-            log.error("------- Startup failed -------------------");
-        }
-
-        log.info("------- Startup complete ------------------");
-    }
-
-    /**
-     * Returns the store.
-     * @return A scheduler store.
-     */
-    protected SchedulerStore getStore() {
-        return this.store;
-    }
-
-    /**
-     * Returns the scheduler.
-     * @return A scheduler.
-     */
-    private Scheduler getScheduler() {
-        return this.scheduler;
-    }
-
-    /**
-     * Shuts down the scheduler.
-     */
-    public void shutdown() {
-        log.info("------- Shutting Down ---------------------");
-
-        // try to save state here
-        try {
-            getScheduler().shutdown();
-        } catch (SchedulerException e) {
-            log.error("------- Shutdown Failed -----------------", e);
-        }
-
-        log.info("------- Shutdown Complete -----------------");
-    }
-
-    /**
-     * Returns the servlet context path.
-     * @return The servlet context path.
-     */
-    protected String getServletContextPath() {
-        return this.servletContextPath;
-    }
-
-    /**
-     * Returns the scheduler configuration path.
-     * @return A string.
-     */
-    protected String getSchedulerConfigurationPath() {
-        return this.schedulerConfigurationPath;
-    }
-
-    /**
-     * Returns the next job ID to use (calculated using the current time).
-     * @return A string.
-     */
-    protected synchronized static String getNextJobId() {
-        return "job_" + jobId++ +System.currentTimeMillis();
-    }
-
-    /**
-     * Adds a job.
-     * @param jobGroup The job group.
-     * @param startTime The start time.
-     * @param jobClass The class of the job.
-     * @param map The job parameters.
-     * @throws SchedulerException if an error occurs.
-     * @throws PublicationException if an error occurs.
-     */
-    protected void addJob(String jobGroup, Date startTime, Class jobClass, JobDataMap map)
-        throws SchedulerException, PublicationException {
-        String uniqueJobId = getNextJobId();
-        log.debug("Job ID: [" + uniqueJobId + "]");
-        
-        JobDetail jobDetail = new JobDetail(uniqueJobId, jobGroup, jobClass);
-        jobDetail.setJobDataMap(map);
-        
-        Date now = new GregorianCalendar().getTime();
-        if (log.isDebugEnabled()) {
-            DateFormat format = new SimpleDateFormat();
-            log.debug("Trigger time: [" + format.format(startTime) + "]");
-            log.debug("Current time: [" + format.format(now) + "]");
-        }
-        
-        if (startTime.after(now)) {
-            Trigger trigger =
-                TriggerHelper.createSimpleTrigger(uniqueJobId, jobGroup, startTime);
-            addJob(jobDetail, trigger);
-            log.debug("Scheduling job.");
-        } else {
-            addJob(jobDetail);
-            log.debug("Adding job without scheduling.");
-        }
-        
-        log.debug("----------------------------------------------");
-        
-        this.store.writeSnapshot(getPublication(jobGroup), getJobWrappers(jobGroup));
-    }
-
-    /**
-     * Adds a job.
-     * @param jobGroup The job group.
-     * @param startTime The start time.
-     * @param request The request to obtain the parameters from.
-     * @throws SchedulerException when something went wrong.
-     */
-    public void addJob(String jobGroup, Date startTime, HttpServletRequest request)
-        throws SchedulerException {
-
-        if (jobGroup == null) {
-            throw new SchedulerException("Job group must not be null!");
-        }
-
-        try {
-            log.debug("----------------------------------------------");
-            log.debug("Adding Job for group [" + jobGroup + "]");
-
-            // FIXME: more flexible
-            Class jobClass = TaskJob.class;
-
-            ServletJob job = ServletJobFactory.createJob(jobClass);
-            JobDataMap map = job.createJobData(request);
-
-            addJob(jobGroup, startTime, jobClass, map);
-        } catch (final SchedulerException e) {
-            log.error("Adding job failed: ", e);
-            throw new SchedulerException(e);
-        } catch (final PublicationException e) {
-            log.error("Adding job failed: ", e);
-            throw new SchedulerException(e);
-        }
-    }
-
-    /**
-     * Returns the publication for a job group.
-     * @param jobGroup A job group.
-     * @return A publication.
-     * @throws PublicationException when the publication does not exist.
-     */
-    protected Publication getPublication(String jobGroup) throws PublicationException {
-        PublicationFactory factory = PublicationFactory.getInstance(new ConsoleLogger());
-        return factory.getPublication(jobGroup, getServletContextPath());
-    }
-
-    /**
-     * Adds a job.
-     * @param detail The job information.
-     * @param trigger The trigger to trigger the job.
-     */
-    protected void addJob(JobDetail detail, Trigger trigger) {
-        try {
-            detail.setDurability(true);
-
-            Date ft = getScheduler().scheduleJob(detail, trigger);
-            log.debug("Job " + detail.getFullName() + " will run at: " + ft);
-        } catch (Exception e) {
-            log.error("Adding job failed: ", e);
-        }
-    }
-
-    /**
-     * Adds a job.
-     * @param detail The job information.
-     */
-    protected void addJob(JobDetail detail) {
-        try {
-            detail.setDurability(true);
-            getScheduler().addJob(detail, true);
-        } catch (SchedulerException e) {
-            log.error("Adding job failed: ", e);
-        }
-    }
-
-    /**
-     * Deletes a job.
-     * @param jobName The job name.
-     * @param jobGroup The job group.
-     */
-    protected void deleteJob(String jobName, String jobGroup) {
-        try {
-            log.debug("-----------------------------------");
-            log.debug("\n Deleting job [" + jobGroup + "/" + jobName + "]");
-            log.debug("-----------------------------------");
-            getScheduler().deleteJob(jobName, jobGroup);
-            getStore().writeSnapshot(getPublication(jobGroup), getJobWrappers(jobGroup));
-        } catch (SchedulerException e) {
-            log.error("Deleting job failed: ", e);
-        } catch (PublicationException e) {
-            log.error("Deleting job failed: ", e);
-        }
-
-    }
-
-    /**
-     * Reads the scheduler configuration.
-     * @return A configuration.
-     */
-    protected Configuration getSchedulerConfiguration() {
-        try {
-            DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
-            String path = getServletContextPath() + getSchedulerConfigurationPath();
-            log.debug("Initializing scheduler configuration: " + path);
-
-            File configurationFile = new File(path);
-            Configuration configuration = builder.buildFromFile(configurationFile);
-
-            return configuration;
-        } catch (Exception e) {
-            log.error("Can't initialize scheduler configuration: ", e);
-
-            return null;
-        }
-    }
-
-    /**
-     * <code>ELEMENT_TRIGGERS</code> Triggers element
-     */
-    public static final String ELEMENT_TRIGGERS = "triggers";
-    /**
-     * <code>ELEMENT_TRIGGER</code> Trigger element
-     */
-    public static final String ELEMENT_TRIGGER = "trigger";
-    /**
-     * <code>TYPE_ATTRIBUTE</code> Type attribute
-     */
-    public static final String TYPE_ATTRIBUTE = "type";
-    /**
-     * <code>CLASS_ATTRIBUTE</code> Class attribute
-     */
-    public static final String CLASS_ATTRIBUTE = "class";
-
-    /**
-     * Returns an XML element containing the trigger types.
-     * @param helper The namespace helper of the document that shall contain the element.
-     * @return An XML element.
-     */
-    protected Element getTriggerTypes(NamespaceHelper helper) {
-        try {
-            Configuration configuration = getSchedulerConfiguration();
-            Configuration[] triggerConfigurations =
-                configuration.getChild(ELEMENT_TRIGGERS).getChildren(ELEMENT_TRIGGER);
-
-            Element triggersElement = helper.createElement("triggers");
-
-            for (int i = 0; i < triggerConfigurations.length; i++) {
-                Configuration conf = triggerConfigurations[i];
-                String type = conf.getAttribute(TYPE_ATTRIBUTE);
-                String className = conf.getAttribute(CLASS_ATTRIBUTE);
-
-                Element triggerElement = helper.createElement("trigger");
-                triggerElement.setAttribute("name", type);
-                triggerElement.setAttribute("src", className);
-                triggersElement.appendChild(triggerElement);
-            }
-
-            return triggersElement;
-        } catch (Exception e) {
-            log.error("Can't configure trigger types: " + e);
-
-            return null;
-        }
-    }
-
-    /**
-     * Returns the trigger of a certain job.
-     * @param jobName The job name.
-     * @param jobGroup The job group.
-     * @return A trigger.
-     * @throws SchedulerException when something went wrong.
-     */
-    protected Trigger getTrigger(String jobName, String jobGroup) throws SchedulerException {
-        log.debug("Resolving trigger for job [" + jobName + " ][ " + jobGroup + "]");
-        String[] triggerGroups = getScheduler().getTriggerGroupNames();
-
-        for (int groupIndex = 0; groupIndex < triggerGroups.length; groupIndex++) {
-            String[] triggerNames = getScheduler().getTriggerNames(triggerGroups[groupIndex]);
-
-            for (int nameIndex = 0; nameIndex < triggerNames.length; nameIndex++) {
-                log.debug("Trigger name:  " + triggerNames[nameIndex]);
-
-                Trigger trigger =
-                    getScheduler().getTrigger(triggerNames[nameIndex], triggerGroups[groupIndex]);
-                log.debug("Job group:     " + trigger.getJobGroup());
-
-                if (trigger.getJobGroup().equals(jobGroup)
-                    && trigger.getJobName().equals(jobName)) {
-                    return trigger;
-                }
-            }
-        }
-
-        return null;
-    }
-
-    /**
-     * Return an XML description certain job groups.
-     * @param jobGroupNames The job group names.
-     * @return An XML document.
-     * @exception SchedulerException if an error occurs
-     */
-    public Document getSnapshot(String[] jobGroupNames) throws SchedulerException {
-        log.debug("Creating job snapshot");
-
-        NamespaceHelper helper = SchedulerStore.getNamespaceHelper();
-        Document document = helper.getDocument();
-        Element root = document.getDocumentElement();
-
-        // print a list of all available trigger types
-        root.appendChild(getTriggerTypes(helper));
-
-        for (int groupIndex = 0; groupIndex < jobGroupNames.length; groupIndex++) {
-            log.debug("Creating job snapshot for group [" + jobGroupNames[groupIndex] + "]");
-            root.appendChild(getSnapshot(helper, jobGroupNames[groupIndex]));
-        }
-
-        return document;
-    }
-
-    /**
-     * Returns the snapshot of a certain job group.
-     * @param helper The namespace helper.
-     * @param group The job group.
-     * @return An XML element.
-     * @throws SchedulerException when something went wrong.
-     */
-    protected Element getSnapshot(NamespaceHelper helper, String group) throws SchedulerException {
-        JobWrapper[] jobs = getJobWrappers(group);
-        Element element;
-        try {
-            element = getStore().createSnapshot(helper, getPublication(group), jobs);
-        } catch (SchedulerException e) {
-            throw e;
-        } catch (PublicationException e) {
-            throw new SchedulerException(e);
-        }
-        return element;
-    }
-
-    /**
-     * Returns the job wrappers for a certain job group.
-     * @param jobGroupName The job group.
-     * @return An array of job wrappers.
-     * @throws SchedulerException when something went wrong.
-     */
-    protected JobWrapper[] getJobWrappers(String jobGroupName) throws SchedulerException {
-
-        List wrappers = new ArrayList();
-        String[] jobNames = getScheduler().getJobNames(jobGroupName);
-
-        for (int nameIndex = 0; nameIndex < jobNames.length; nameIndex++) {
-            JobDetail jobDetail = getScheduler().getJobDetail(jobNames[nameIndex], jobGroupName);
-            Trigger trigger = getTrigger(jobNames[nameIndex], jobGroupName);
-            wrappers.add(new JobWrapper(jobDetail, trigger));
-        }
-
-        return (JobWrapper[]) wrappers.toArray(new JobWrapper[wrappers.size()]);
-    }
-
-    /**
-     * Return an xml description of all scheduled jobs.
-     * @return The description
-     * @exception SchedulerException if an error occurs
-     */
-    public Document getSnapshot() throws SchedulerException {
-        String[] jobGroupNames = getScheduler().getJobGroupNames();
-        return getSnapshot(jobGroupNames);
-    }
-
-    /**
-     * Restores the jobs of a certain job group from the snapshot file.
-     * @param jobGroup The job group.
-     * @throws SchedulerException when something went wrong.
-     */
-    public void restoreJobs(String jobGroup) throws SchedulerException {
-
-        log.debug("--------------------------------------------------");
-        log.debug("Restoring jobs for job group [" + jobGroup + "]");
-        log.debug("--------------------------------------------------");
-
-        try {
-            JobWrapper[] jobs = getStore().restoreJobs(getPublication(jobGroup));
-            for (int i = 0; i < jobs.length; i++) {
-                if (jobs[i].getTrigger() != null) {
-                    if (log.isDebugEnabled()) {
-                        log.debug("    Trigger time in future - scheduling job.");
-                    }
-                    addJob(jobs[i].getJobDetail(), jobs[i].getTrigger());
-                } else {
-                    if (log.isDebugEnabled()) {
-                        log.debug("    Trigger time has expired - adding job without scheduling.");
-                    }
-                    addJob(jobs[i].getJobDetail());
-                }
-            }
-        } catch (final SchedulerException e) {
-            log.error("" +e.toString());
-            throw new SchedulerException(e);
-        } catch (final PublicationException e) {
-            log.error("" +e.toString());
-            throw new SchedulerException(e);
-        }
-
-    }
-
-    /**
-     * Modifies the execution time of a job.
-     * @param _jobId The job ID.
-     * @param jobGroup The job group.
-     * @param startTime The new start time.
-     * @throws SchedulerException when the job was not found.
-     */
-    public void modifyJob(String _jobId, String jobGroup, Date startTime)
-        throws SchedulerException {
-        log.debug("Modifying job [" + _jobId + "][" + jobGroup + "]");
-
-        JobDetail jobDetail = getScheduler().getJobDetail(_jobId, jobGroup);
-        if (jobDetail == null) {
-            throw new SchedulerException("Job not found!");
-        }
-
-        Trigger trigger = getTrigger(jobDetail.getName(), jobGroup);
-        if (trigger == null) {
-            log.debug("    No trigger found.");
-        } else {
-            log.debug("    Trigger found. Setting new start time.");
-            jobDetail.setDurability(true);
-            if (startTime.after(new GregorianCalendar().getTime())) {
-                log.debug("    Start time is in future - re-scheduling job.");
-                getScheduler().unscheduleJob(trigger.getName(), trigger.getGroup());
-                trigger = TriggerHelper.createSimpleTrigger(_jobId, jobGroup, startTime);
-                getScheduler().scheduleJob(trigger);
-            } else {
-                log.debug("    Start time has already expired - deleting job.");
-                getScheduler().deleteJob(_jobId, jobGroup);
-            }
-            try {
-                getStore().writeSnapshot(getPublication(jobGroup), getJobWrappers(jobGroup));
-            } catch (SchedulerException e) {
-                throw e;
-            } catch (PublicationException e) {
-                throw new SchedulerException(e);
-            }
-        }
-    }
-
-    /**
-     * Deletes the jobs for a certain document. This method is called when
-     * a document has been moved or deleted.
-     * @param document A document.
-     * @throws SchedulerException when something went wrong.
-     * @throws PublicationException when something went wrong.
-     */
-    public void deleteJobs(org.apache.lenya.cms.publication.Document document)
-        throws SchedulerException, PublicationException {
-            
-        log.debug("Deleting jobs for document [" + document + "]");
-            
-        String jobGroup = document.getPublication().getId();
-        JobWrapper[] jobs = getJobWrappers(jobGroup);
-        boolean changed = false;
-        for (int i = 0; i < jobs.length; i++) {
-            ServletJob job = jobs[i].getJob();
-            String documentUrl = job.getDocumentUrl(jobs[i].getJobDetail());
-            if (documentUrl.equals(document.getCanonicalWebappURL())) {
-                deleteJob(jobs[i].getJobDetail().getName(), jobGroup);
-                changed = true;
-            }
-        }
-        if (changed) {
-            getStore().writeSnapshot(getPublication(jobGroup), getJobWrappers(jobGroup));
-        }
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/scheduler/ServletJob.java b/src/java/org/apache/lenya/cms/scheduler/ServletJob.java
deleted file mode 100644
index efe2e05..0000000
--- a/src/java/org/apache/lenya/cms/scheduler/ServletJob.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.scheduler;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.lenya.util.NamespaceMap;
-import org.apache.lenya.xml.NamespaceHelper;
-import org.apache.log4j.Logger;
-import org.quartz.Job;
-import org.quartz.JobDataMap;
-import org.quartz.JobDetail;
-import org.quartz.SchedulerException;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Element;
-
-/**
- * Scheduling job that uses an HttpServletRequest to obtain its Job data.
- */
-public abstract class ServletJob implements Job {
-
-    private static Logger log = Logger.getLogger(ServletJob.class);
-    
-    /**
-     * <code>ELEMENT_JOB</code> The job element
-     */
-    public static final String ELEMENT_JOB = "job";
-    /**
-     * <code>ATTRIBUTE_ID</code> The id attribute
-     */
-    public static final String ATTRIBUTE_ID = "id";
-    /**
-     * <code>ATTRIBUTE_CLASS</code> The class attribute
-     */
-    public static final String ATTRIBUTE_CLASS = "class";
-    /**
-     * <code>ATTRIBUTE_DOCUMENT_URL</code> The document url attribute
-     */
-    public static final String ATTRIBUTE_DOCUMENT_URL = "url";
-    /**
-     * <code>ATTRIBUTE_SERVLET_CONTEXT</code> The servlet context attribute
-     */
-    public static final String ATTRIBUTE_SERVLET_CONTEXT = "servletcontext";
-    /**
-     * <code>PARAMETER_DOCUMENT_URL</code> The document URL parameter
-     */
-    public static final String PARAMETER_DOCUMENT_URL = "document-url";
-
-    /**
-     * Creates the job data from an HTTP request.
-     * @param request The request.
-     * @return A job data map.
-     * @throws SchedulerException when something went wrong.
-     */
-    public JobDataMap createJobData(HttpServletRequest request)
-        throws SchedulerException {
-        JobDataMap map = new JobDataMap();
-        String key = NamespaceMap.getFullName(LoadQuartzServlet.PREFIX, PARAMETER_DOCUMENT_URL);
-        String documentUrl = request.getParameter(key);
-        if (documentUrl == null) {
-            throw new SchedulerException("Document URL must not be null!");
-        }
-        map.put(key, documentUrl);
-        return map;
-    }
-
-    /**
-     * Loads the job data from an XML element.
-     * @param element An XML element.
-     * @param jobGroup The job group the job belongs to.
-     * @param servletContextPath The servlet context path.
-     * @return A job detail object.
-     * @throws SchedulerException when something went wrong.
-     */
-    public JobDetail load(Element element, String jobGroup, String servletContextPath)
-        throws SchedulerException {
-        String jobId = element.getAttribute(ATTRIBUTE_ID);
-        JobDetail jobDetail = new JobDetail(jobId, jobGroup, getClass());
-        return jobDetail;
-
-    }
-
-    /**
-     * Saves the job data to an XML element.
-     * @param helper The namespace helper of the document the element shall belong to.
-     * @param jobDetail The job detail to save.
-     * @return An XML element.
-     * @throws SchedulerException when something went wrong.
-     */
-    public Element save(NamespaceHelper helper, JobDetail jobDetail) throws SchedulerException {
-        log.debug("Saving job");
-
-        try {
-            Element jobElement = helper.createElement(ELEMENT_JOB);
-            jobElement.setAttribute(ATTRIBUTE_ID, jobDetail.getName());
-            jobElement.setAttribute(ATTRIBUTE_CLASS, getClass().getName());
-
-            String documentUrl = getDocumentUrl(jobDetail);
-            jobElement.setAttribute(ATTRIBUTE_DOCUMENT_URL, documentUrl);
-            
-            return jobElement;
-        } catch (final DOMException e) {
-            log.error("" +e.toString());
-            throw new SchedulerException(e);
-        }
-    }
-
-    /**
-     * Returns the document URL of a certain job.
-     * @param jobDetail The job detail.
-     * @return A string.
-     */
-    public String getDocumentUrl(JobDetail jobDetail) {
-        JobDataMap map = jobDetail.getJobDataMap();
-        NamespaceMap wrapper = new NamespaceMap(map, LoadQuartzServlet.PREFIX);
-        String documentUrl = (String) wrapper.get(PARAMETER_DOCUMENT_URL);
-        return documentUrl;
-    }
-    
-    /**
-     * Sets the document URL of a job.
-     * @param jobDetail The job detail.
-     * @param url The URL.
-     */
-    public void setDocumentUrl(JobDetail jobDetail, String url) {
-        JobDataMap map = jobDetail.getJobDataMap();
-        NamespaceMap wrapper = new NamespaceMap(map, LoadQuartzServlet.PREFIX);
-        wrapper.put(PARAMETER_DOCUMENT_URL, url);
-        jobDetail.setJobDataMap(map);
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/scheduler/ServletJobFactory.java b/src/java/org/apache/lenya/cms/scheduler/ServletJobFactory.java
deleted file mode 100644
index b32613a..0000000
--- a/src/java/org/apache/lenya/cms/scheduler/ServletJobFactory.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.scheduler;
-
-import org.apache.log4j.Logger;
-
-
-/**
- * Factory for building serlvet jobs.
- */
-public final class ServletJobFactory {
-    
-    /**
-     * Ctor.
-     */
-    private ServletJobFactory() {
-	    // do nothing
-    }
-
-    private static Logger log = Logger.getLogger(ServletJobFactory.class);
-
-    /**
-     * Creates a job.
-     * @param jobClassName The name of the Java class used to instanciate the job object.
-     * @return A servlet job.
-     */
-    public static ServletJob createJob(String jobClassName) {
-        try {
-            Class cl = Class.forName(jobClassName);
-
-            return createJob(cl);
-        } catch (Exception e) {
-            log.error("Cannot create Job instance: " + e);
-
-            return null;
-        }
-    }
-
-    /**
-     * Creates a job. 
-     * @param cl The Java class used to instanciate the job object.
-     * @return A servlet job.
-     */
-    public static ServletJob createJob(Class cl) {
-        try {
-            ServletJob job = (ServletJob) cl.newInstance();
-
-            return job;
-        } catch (Exception e) {
-            log.error("Cannot create Job instance: " + e);
-
-            return null;
-        }
-    }
-    
-}
diff --git a/src/java/org/apache/lenya/cms/scheduler/TaskJob.java b/src/java/org/apache/lenya/cms/scheduler/TaskJob.java
deleted file mode 100644
index 3bde242..0000000
--- a/src/java/org/apache/lenya/cms/scheduler/TaskJob.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.scheduler;
-
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.lenya.cms.task.DefaultTaskWrapper;
-import org.apache.lenya.cms.task.ExecutionException;
-import org.apache.lenya.cms.task.TaskParameters;
-import org.apache.lenya.cms.task.TaskWrapper;
-import org.apache.lenya.util.NamespaceMap;
-import org.apache.lenya.xml.NamespaceHelper;
-import org.apache.log4j.Logger;
-import org.quartz.JobDataMap;
-import org.quartz.JobDetail;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-import org.quartz.SchedulerException;
-import org.w3c.dom.Element;
-
-/**
- * A TaskJob is a Job that executes a Task. The task ID is obtained from the <code>task-id</code>
- * request parameter.
- */
-public class TaskJob extends ServletJob {
-    private static Logger log = Logger.getLogger(TaskJob.class);
-
-    /**
-     * Un-prefix the parameters.
-     * @param wrapperMap the prefixed parameters.
-     * @return the parameters
-     * @throws SchedulerException when something went wrong.
-     */
-    protected Map stripPrefixes(Map wrapperMap)
-        throws SchedulerException {
-        
-        NamespaceMap taskParameters = new NamespaceMap(TaskParameters.PREFIX);
-        taskParameters.putAll(wrapperMap);
-        wrapperMap.putAll(taskParameters.getPrefixedMap());
-        
-        DefaultTaskWrapper wrapper = new DefaultTaskWrapper(wrapperMap, null);
-        return wrapper.getParameters();
-    }
-
-    /**
-     * Creates the job data for a job.
-     * @param request The request.
-     * @return A job data map.
-     * @throws SchedulerException when something went wrong.
-     */
-    public JobDataMap createJobData(HttpServletRequest request)
-        throws SchedulerException {
-        log.debug("Creating job data map:");
-        JobDataMap map = super.createJobData(request);
-
-        Enumeration parameters = request.getParameterNames();
-        Map wrapperMap = new HashMap();
-        while (parameters.hasMoreElements()) {
-            String key = (String) parameters.nextElement();
-            Object value;
-            String[] values = request.getParameterValues(key);
-            if (values.length == 1) {
-                value = values[0];
-            }
-            else {
-                value = values;
-            }
-            wrapperMap.put(key, value);
-        }
-
-        map.putAll(stripPrefixes(wrapperMap));
-        return map;
-    }
-
-    /**
-     * <p>
-     * Called by the <code>{@link org.quartz.Scheduler}</code> when a <code>{@link
-     * org.quartz.Trigger}</code> fires that is associated with the <code>Job</code>.
-     * </p>
-     * @param context The context
-     * @throws JobExecutionException if there is an exception while executing the job.
-     */
-    public void execute(JobExecutionContext context) throws JobExecutionException {
-        log.info("Executing job");
-        JobDetail jobDetail = context.getJobDetail();
-        
-        DefaultTaskWrapper wrapper = new DefaultTaskWrapper(jobDetail.getJobDataMap(), null);
-        try {
-            wrapper.execute();
-        } catch (ExecutionException e) {
-        	log.error("Task execution failed: ", e);
-        	throw new JobExecutionException();
-        }
-    }
-
-    /**
-     * Loads a job details object from an XML element. 
-     * @param jobElement The XML element.
-     * @param jobGroup The job group the job belongs to.
-     * @param servletContextPath The servlet context path.
-     * @throws SchedulerException when something went wrong.
-     * @return A job details object.
-     */
-    public JobDetail load(Element jobElement, String jobGroup, String servletContextPath) throws SchedulerException {
-        JobDetail jobDetail = super.load(jobElement, jobGroup, servletContextPath);
-        
-        NamespaceHelper helper = SchedulerStore.getNamespaceHelper();
-        DefaultTaskWrapper wrapper = new DefaultTaskWrapper(helper, jobElement);
-        wrapper.getTaskParameters().setServletContextPath(servletContextPath);
-        
-        JobDataMap map = new JobDataMap(wrapper.getParameters());
-        jobDetail.setJobDataMap(map);
-        
-        return jobDetail;
-    }
-
-    /**
-     * Save a job detail
-     * @param jobDetail The job detail to save
-     * @param helper namespace helper
-     * @throws SchedulerException when something went wrong.
-     * @return The job element
-     */
-    public Element save(NamespaceHelper helper, JobDetail jobDetail) throws SchedulerException {
-        
-        Element jobElement = super.save(helper, jobDetail);
-        TaskWrapper wrapper = new DefaultTaskWrapper(jobDetail.getJobDataMap(), null);
-        jobElement.appendChild(wrapper.save(helper));
-        
-        return jobElement;
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/scheduler/xml/TriggerHelper.java b/src/java/org/apache/lenya/cms/scheduler/xml/TriggerHelper.java
deleted file mode 100644
index a45d66c..0000000
--- a/src/java/org/apache/lenya/cms/scheduler/xml/TriggerHelper.java
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.scheduler.xml;
-
-import java.io.IOException;
-import java.text.ParseException;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.GregorianCalendar;
-
-import org.apache.lenya.cms.scheduler.SchedulerStore;
-import org.apache.lenya.util.NamespaceMap;
-import org.apache.lenya.xml.NamespaceHelper;
-import org.apache.log4j.Logger;
-import org.quartz.CronTrigger;
-import org.quartz.SimpleTrigger;
-import org.quartz.Trigger;
-import org.w3c.dom.Element;
-
-
-/**
- * Utility class to work with trigger XML.
- */
-public final class TriggerHelper {
-    
-    /**
-     * Ctor.
-     */
-    private TriggerHelper() {
-	    // do nothing
-    }
-
-    private static Logger log = Logger.getLogger(TriggerHelper.class);
-    /**
-     * <code>YEAR</code> The year
-     */
-    public static final String YEAR = "year";
-    /**
-     * <code>MONTH</code> The month
-     */
-    public static final String MONTH = "month";
-    /**
-     * <code>DAY</code> The day
-     */
-    public static final String DAY = "day";
-    /**
-     * <code>HOUR</code> The hour
-     */
-    public static final String HOUR = "hour";
-    /**
-     * <code>MINUTE</code> The minute
-     */
-    public static final String MINUTE = "minute";
-    /**
-     * <code>TRIGGER_TYPE</code> The trigger type
-     */
-    public static final String TRIGGER_TYPE = "type";
-    /**
-     * <code>ONCE</code> Once
-     */
-    public static final String ONCE = "once";
-    /**
-     * <code>REPEATED</code> Repeated
-     */
-    public static final String REPEATED = "repeated";
-    /**
-     * <code>CRON_EXPRESSION</code> The cron expression
-     */
-    public static final String CRON_EXPRESSION = "expression";
-    private static int id = 0;
-    /**
-     * <code>PREFIX</code> The prefix
-     */
-    public static final String PREFIX = "trigger";
-
-    /**
-     * Creates a trigger from an XML element.
-     * @param element The XML element.
-     * @param jobName The job name.
-     * @param jobGroup The job group.
-     * @return A trigger.
-     */
-    public static Trigger createTrigger(Element element, String jobName, String jobGroup) {
-        if (!element.getLocalName().equals("trigger")) {
-            throw new IllegalArgumentException();
-        }
-
-        String triggerType = element.getAttribute(TRIGGER_TYPE);
-        NamespaceHelper helper = SchedulerStore.getNamespaceHelper();
-
-        // SimpleTrigger
-        if (triggerType.equals(ONCE)) {
-            Element[] parameterElements = helper.getChildren(element, "parameter");
-            GregorianCalendar date = new GregorianCalendar();
-
-            for (int i = 0; i < parameterElements.length; i++) {
-                String name = parameterElements[i].getAttribute("name");
-                String value = parameterElements[i].getAttribute("value");
-
-                if (name.equals(YEAR)) {
-                    date.set(Calendar.YEAR, Integer.parseInt(value));
-                }
-
-                if (name.equals(MONTH)) {
-                    date.set(Calendar.MONTH, Integer.parseInt(value) - 1);
-                }
-
-                if (name.equals(DAY)) {
-                    date.set(Calendar.DAY_OF_MONTH, Integer.parseInt(value));
-                }
-
-                if (name.equals(HOUR)) {
-                    date.set(Calendar.HOUR_OF_DAY, Integer.parseInt(value));
-                }
-
-                if (name.equals(MINUTE)) {
-                    date.set(Calendar.MINUTE, Integer.parseInt(value));
-                }
-
-                if (name.equals(HOUR)) {
-                    date.set(Calendar.HOUR_OF_DAY, Integer.parseInt(value));
-                }
-            }
-
-            return createSimpleTrigger(jobName, jobGroup, date.getTime());
-        }
-
-        // CronTrigger
-        if (triggerType.equals(REPEATED)) {
-            Element[] parameterElements = helper.getChildren(element, "parameter");
-            String name = parameterElements[0].getAttribute("name");
-            String value = parameterElements[0].getAttribute("value");
-            String cron_expression;
-
-            if (name.equals(CRON_EXPRESSION)) {
-                cron_expression = value;
-            } else {
-                cron_expression = "45 * * * * ?";
-            }
-
-            return createCronTrigger(jobName, jobGroup, cron_expression);
-        }
-
-        throw new IllegalStateException("Trigger type '" + triggerType + "' not defined!");
-    }
-
-    /**
-     * Creates a unique trigger ID.
-     * @return A string.
-     */
-    protected static String createUniqueTriggerId() {
-        return "trigger_" + id++;
-    }
-
-    /**
-     * Creates a simple trigger.
-     * @param jobName The job name.
-     * @param jobGroup The job group.
-     * @param date The trigger date.
-     * @return The trigger
-     */
-    public static Trigger createSimpleTrigger(String jobName, String jobGroup, Date date) {
-        return new SimpleTrigger(createUniqueTriggerId(), "triggerGroup1", jobName, jobGroup, date,
-            null, 0, 0);
-    }
-
-    /**
-     * Creates a cron trigger.
-     * @param jobName The job name.
-     * @param jobGroup The job group.
-     * @param cron_expression Seconds, Minutes, Hours, Day of Month, Months, Day of Week (e.g. 34
-     *        ?)
-     * @return A trigger.
-     */
-    public static Trigger createCronTrigger(String jobName, String jobGroup, String cron_expression) {
-        try {
-            return new CronTrigger(createUniqueTriggerId(), "triggerGroup1", jobName, jobGroup,
-                cron_expression);
-        } catch (ParseException e) {
-            log.error(".createCronTrigger(): " + e);
-        }
-
-        return null;
-    }
-
-    /**
-     * Creates an XML element containing trigger information.
-     * @param helper The namespace helper to use.
-     * @param trigger The trigger.
-     * @return An XML element.
-     */
-    public static Element createElement(NamespaceHelper helper, Trigger trigger) {
-        Element triggerElement = helper.createElement("trigger");
-        triggerElement.setAttribute("type", ONCE);
-
-        if (trigger == null) {
-            return triggerElement;
-        }
-
-        GregorianCalendar startTime = new GregorianCalendar();
-        startTime.setTime(trigger.getStartTime());
-
-        Element yearElement = helper.createElement("parameter");
-        yearElement.setAttribute("name", YEAR);
-        yearElement.setAttribute("value", Integer.toString(startTime.get(Calendar.YEAR)));
-        triggerElement.appendChild(yearElement);
-
-        Element monthElement = helper.createElement("parameter");
-        monthElement.setAttribute("name", MONTH);
-        monthElement.setAttribute("value", Integer.toString(startTime.get(Calendar.MONTH) + 1));
-        triggerElement.appendChild(monthElement);
-
-        Element dayElement = helper.createElement("parameter");
-        dayElement.setAttribute("name", DAY);
-        dayElement.setAttribute("value", Integer.toString(startTime.get(Calendar.DAY_OF_MONTH)));
-        triggerElement.appendChild(dayElement);
-
-        Element hourElement = helper.createElement("parameter");
-        hourElement.setAttribute("name", HOUR);
-        hourElement.setAttribute("value", Integer.toString(startTime.get(Calendar.HOUR_OF_DAY)));
-        triggerElement.appendChild(hourElement);
-
-        Element minuteElement = helper.createElement("parameter");
-        minuteElement.setAttribute("name", MINUTE);
-        minuteElement.setAttribute("value", Integer.toString(startTime.get(Calendar.MINUTE)));
-        triggerElement.appendChild(minuteElement);
-
-        return triggerElement;
-    }
-    
-    /**
-     * Extracts the date from the scheduler parameters.
-     * @param schedulerParameters The scheduler parameters.
-     * @return A date.
-     * @throws IOException when something went wrong.
-     */
-    public static Date getDate(NamespaceMap schedulerParameters) throws IOException {
-        NamespaceMap triggerParameters =
-            new NamespaceMap(schedulerParameters.getMap(), PREFIX);
-        String startDay = (String) triggerParameters.get(DAY);
-        String startMonth = (String) triggerParameters.get(MONTH);
-        String startYear = (String) triggerParameters.get(YEAR);
-        String startHour = (String) triggerParameters.get(HOUR);
-        String startMin = (String) triggerParameters.get(MINUTE);
-
-        Date startTime = null;
-
-        try {
-            // Month value is 0-based
-            startTime =
-                new GregorianCalendar(
-                    Integer.parseInt(startYear),
-                    Integer.parseInt(startMonth) - 1,
-                    Integer.parseInt(startDay),
-                    Integer.parseInt(startHour),
-                    Integer.parseInt(startMin))
-                    .getTime();
-        } catch (NumberFormatException e) {
-            log.error(
-                "NumberFormatException with parameters "
-                    + "startYear, startMonth, startDay, startHour, startMin: "
-                    + startDay
-                    + ", "
-                    + startMonth
-                    + ", "
-                    + startDay
-                    + ", "
-                    + startHour
-                    + ", "
-                    + startMin,
-                e);
-            throw new IOException("Parsing scheduling date/time failed!");
-        }
-        return startTime;
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/search/usecases/Search.java b/src/java/org/apache/lenya/cms/search/usecases/Search.java
deleted file mode 100644
index dbcf047..0000000
--- a/src/java/org/apache/lenya/cms/search/usecases/Search.java
+++ /dev/null
@@ -1,436 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.search.usecases;
-
-import org.apache.lenya.cms.usecase.DocumentUsecase;
-import org.apache.lenya.cms.usecase.UsecaseException;
-
-import org.apache.lucene.analysis.Analyzer;
-import org.apache.lucene.analysis.standard.StandardAnalyzer;
-import org.apache.lucene.document.Document;
-import org.apache.lucene.document.Field;
-import org.apache.lucene.queryParser.ParseException;
-import org.apache.lucene.queryParser.QueryParser;
-import org.apache.lucene.queryParser.MultiFieldQueryParser;
-import org.apache.lucene.search.Hits;
-import org.apache.lucene.search.IndexSearcher;
-import org.apache.lucene.search.Query;
-import org.apache.lucene.search.Searcher;
-import org.apache.lucene.search.Sort;
-import org.apache.excalibur.source.Source;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.Set;
-import java.util.StringTokenizer;
-import java.util.Vector;
-
-import org.apache.lenya.lucene.ReTokenizeFile;
-import org.apache.lenya.lucene.Publication;
-
-
-/**
- * Usecase to search a publication.
- * 
- * @version $Id$
- */
-public class Search extends DocumentUsecase {
-    
-    // File workDir = (File)super.getContext().get(Constants.CONTEXT_WORK_DIR);
-    
-    private File indexDir=null;
-    private File excerptDir=null;
-    
-    private String[] fields={"contents","title"};
-    private String field = "contents";
-    private String queryString = "";
-    private String publication_id = "";
-    private String sortBy = "";
-    private String sortReverse = "";
-    
-    private String startString = "";
-    private String endString = "";
-    
-    private String[] words=new String[0];
-    
-    private Hits hits = null;
-    private int hits_length=-1;
-    
-    private int hitsPerPage = 10;
-    private int maxPages = 10;
-    private int excerptOffset = 100;
-    private int start = 10;
-    private int end = 10; 
-    private String sitemapPath = null;
-    private int numberOfPubs = 1;
-    
-    /**
-     * Ctor.
-     */
-    public Search() {
-        super();
-    }
-    
-    /**
-     * Validates the request parameters.
-     * @throws UsecaseException if an error occurs.
-     */
-    void validate() throws UsecaseException {
-        // do nothing
-    }
-    
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckExecutionConditions()
-     */
-    protected void doCheckExecutionConditions() throws Exception {
-        validate();
-    }
-    
-    /**
-     * Search index
-     * @param query_string The query string
-     * @param publication_id The id of the publication to search
-     * @param sortField The field to sort by
-     * @param sortReverse Whether to sort in reverse
-     * @return the hits
-     */
-    private Hits search(String query_string, String publication_id, String sortField, boolean sortReverse) {
-        Hits hits =null;
-        
-        try {
-            Searcher searcher=new IndexSearcher(this.indexDir.getAbsolutePath());
-            Analyzer l_analyzer=new StandardAnalyzer();
-            QueryParser l_queryParser = new QueryParser(this.field,l_analyzer); // Single field
-            //MultiFieldQueryParser l_queryParser = new MultiFieldQueryParser(fields[0], l_analyzer); // Multiple fields
-            l_queryParser.setOperator(QueryParser.DEFAULT_OPERATOR_AND);
-            getLogger().debug(query_string);
-            Query l_query = l_queryParser.parse(query_string); // Single field
-            //Query l_query = l_queryParser.parse(query_string,fields,l_analyzer); // Multiple fields
-            if (sortField != null) {
-                Sort sort = new Sort(sortField, sortReverse);
-                hits = searcher.search(l_query, sort);
-            } else {
-                hits = searcher.search(l_query);
-            }
-            if(hits != null){
-                return hits;
-            }
-        } catch (final IOException e) {
-            addErrorMessage("IO error occured: " +e.toString());
-        } catch (final ParseException e) {
-            addErrorMessage("Parse error occured: " +e.toString());
-        }
-        
-        return null;
-    }
-    
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#initParameters()
-     */
-    protected void initParameters() {
-        super.initParameters();
-        this.numberOfPubs = Integer.parseInt(getParameterAsString("number-of-pubs"));
-        Publication[] pubs = new Publication[this.numberOfPubs];
-        for(int i = 0;i < pubs.length;i++) {
-            pubs[i] = new Publication();
-            pubs[i].id = getParameterAsString("pub"+i+"-id");
-            pubs[i].name = getParameterAsString("pub"+i+"-name");
-            pubs[i].indexDir = getParameterAsString("pub"+i+"-index-dir");
-            pubs[i].searchFields = getParameterAsString("pub"+i+"-search-fields");
-            pubs[i].excerptDir = getParameterAsString("pub"+i+"-excerpt-dir");
-            pubs[i].prefix = getParameterAsString("pub"+i+"-prefix");
-        }
-        
-        this.hitsPerPage = Integer.parseInt(getParameterAsString("max-hits-per-page"));
-        this.maxPages = Integer.parseInt(getParameterAsString("max-pages"));
-        this.excerptOffset = Integer.parseInt(getParameterAsString("excerpt-offset"));
-        
-        // Read parameters from query string
-        this.queryString = getParameterAsString("queryString");
-        this.publication_id = getParameterAsString("publication-id");
-        this.sortBy = getParameterAsString("sortBy");
-        this.sortReverse = getParameterAsString("sortReverse");
-        
-        this.startString = getParameterAsString("start");
-        this.endString = getParameterAsString("end");
-        this.start=new Integer(this.startString).intValue();
-        if(this.endString == null){
-            this.end=this.hitsPerPage;
-        }
-        else{
-            this.end=new Integer(this.endString).intValue();
-        }
-        
-        // Find the number of the selected publication
-        int whichPublication=0;
-        for (int i = 0;i < pubs.length;i++) {
-            if (pubs[i].id.equals(this.publication_id)) {
-                whichPublication = i;
-            }
-        }
-        
-        
-        // Get all search fields
-        Vector myFields = new Vector();
-        Set keys = getParameters().keySet();
-        
-        for (Iterator i = keys.iterator(); i.hasNext();) {
-            Object key = i.next();
-            
-            if (key instanceof String) {
-                String keyString = (String) key;
-                
-                if (keyString.indexOf(".fields") > 0) {// looking for field parameters
-                    StringTokenizer st = new StringTokenizer(keyString, ".");
-                    int length = st.countTokens();
-                    String fieldPublicationId = st.nextToken();
-                    if (fieldPublicationId.equals(this.publication_id) || fieldPublicationId.equals("dummy-index-id")) {
-                        st.nextToken(); // Ignore "fields" token
-                        if (length == 2) { // radio or select
-                            myFields.addElement(getParameterAsString(keyString));
-                        } else if (length == 3) { // checkbox
-                            myFields.addElement(st.nextToken());
-                        } else {
-                            // something is wrong
-                        }
-                    }
-                }
-            }
-        }
-        if (myFields.size() > 0) {
-            this.field = (String)myFields.elementAt(0);
-            this.fields = new String[myFields.size()];
-            for (int i = 0; i < myFields.size(); i++) {
-                this.fields[i] = (String)myFields.elementAt(i);
-            }
-        }
-        
-        // Set index and excerpt dir
-        String param_index_dir=pubs[whichPublication].indexDir;
-        if(param_index_dir.charAt(0) == '/'){
-            this.indexDir=new File(param_index_dir);
-        }
-        else{
-            this.indexDir=new File(this.sitemapPath+File.separator+param_index_dir);
-        }
-        String param_excerpt_dir=pubs[whichPublication].excerptDir;
-        if(param_excerpt_dir.charAt(0) == '/'){
-            this.excerptDir=new File(param_excerpt_dir);
-        }
-        else{
-            this.excerptDir=new File(this.sitemapPath+File.separator+param_excerpt_dir);
-        }
-        
-        // hitsPerPage
-        // maxPages
-        // excerptOffset
-        
-        // Get sitemap path
-        /*        Source input_source=this.getResolver().resolveURI("");
-         String sitemapPath=input_source.getURI();
-         sitemapPath=sitemapPath.substring(5); // Remove "file:" protocol
-         */        
-        
-        
-        
-    }
-    
-    
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-        
-        if(this.queryString != null && this.queryString.length() != 0 && this.publication_id != null 
-                && this.publication_id.length() > 0){
-            
-            if (this.sortBy.equals("score")) {
-                this.hits = search(this.queryString, this.publication_id, null, false);
-            } else {
-                if (this.sortReverse.equals("true")) {
-                    this.hits = search(this.queryString, this.publication_id, this.sortBy, true);
-                } else {
-                    this.hits = search(this.queryString, this.publication_id, this.sortBy, false);
-                }
-            }
-            
-            if(this.hits != null){
-                this.hits_length=this.hits.length();
-            } else{
-                this.hits_length=-1;
-            }
-            //publication_id
-            // pubs[whichPublication].name
-            // pubs[whichPublication].prefix
-            //sortBy
-            //queryString
-            Vector twords=new Vector();
-            
-            StringTokenizer st=new StringTokenizer(this.queryString," ");
-            while(st.hasMoreTokens()){
-                String word=(String)st.nextElement();
-                if(!(word.equals("OR") || word.equals("AND"))){
-                    //word
-                    twords.addElement(word);
-                }
-            }
-            this.words=new String[twords.size()];
-            for(int i=0;i < twords.size();i++){
-                this.words[i]=(String)twords.elementAt(i);
-            }
-            //start
-            //end
-            
-            try {
-                Analyzer ll_analyzer=new StandardAnalyzer();
-                QueryParser queryParser = new QueryParser(this.field,ll_analyzer);
-                //MultiFieldQueryParser queryParser = new MultiFieldQueryParser("contents",ll_analyzer);
-                queryParser.setOperator(QueryParser.DEFAULT_OPERATOR_AND);
-                Query ll_query = queryParser.parse(queryString);
-                //Query ll_query = queryParser.parse(queryString,fields,ll_analyzer);
-                // ll_query.toString("contents");
-            } catch (final ParseException e) {
-                addErrorMessage("Parse error occured: " +e.toString());
-            }
-            
-        }
-        else{
-            this.hits_length=-1;
-            this.hits=null;
-        }
-        
-        if(hits != null)
-            generateExtracts();
-    }
-
-    /**
-     * @throws IOException
-     */
-    private void generateExtracts() throws IOException {
-        //  hits_length
-        if(hits_length > 0){
-            for (int i=start-1;i <= end-1;i++) {
-                if((i < 0) || (i >= hits.length())){
-                    continue;
-                }
-                Document ldoc=hits.doc(i);
-                Enumeration lfields = ldoc.fields();
-                String lpath=ldoc.get("path");
-                
-                String lurl=ldoc.get("url");
-                String ltitle=ldoc.get("title");
-                String mime_type=ldoc.get("mime-type");
-                
-                if(lpath != null){
-                    //getPercent(hits.score(i);
-                }
-                else if(lurl != null){
-                    while (lfields.hasMoreElements()) {
-                        Field lfield = (Field)lfields.nextElement();
-                        String slfield = lfield.toString();
-                        // lfield.name()
-                        // slfield.substring(0, slfield.indexOf("&lt;"))
-                        // lfield.stringValue()
-                    }
-                    //getPercent(hits.score(i))
-                    //hits.score(i)
-                    String parent = "";
-                    String filename = "";
-                    String querystring = "";
-                    if(lurl.lastIndexOf("/") > -1) {
-                        parent = lurl.substring(0,lurl.lastIndexOf("/"));
-                        filename = lurl.substring(lurl.lastIndexOf("/")+1);
-                    }
-                    if(lurl.indexOf("?") > -1) {
-                        querystring = lurl.substring(lurl.indexOf("?"));
-                    }
-                    // parent
-                    // filename
-                    // querystring
-                    // lurl
-                    
-                    File excerptFile=new File(this.excerptDir+File.separator+lurl);
-                    if((ltitle != null) && (ltitle.length() > 0)){
-                    }
-                    else{
-                    }
-                    if((mime_type != null) && (mime_type.length() > 0)){
-                    }
-                    else{
-                    }
-                    
-                    try {
-                        ReTokenizeFile rtf=new ReTokenizeFile();
-                        rtf.setOffset(excerptOffset);
-                        String excerpt=rtf.getExcerpt(excerptFile,words);
-                        if(excerpt != null){
-                            excerpt=rtf.emphasizeAsXML(rtf.tidy(excerpt),words);                                
-                        }
-                    } catch (final FileNotFoundException e) {
-                        addErrorMessage("File not found error: " +e.toString());
-                    } catch (final IOException e) {
-                        addErrorMessage("IO error occured: " +e.toString());
-                    }
-                    
-                }
-            }
-        }
-        else{
-        }
-        int number_of_pages=(hits.length()/hitsPerPage);
-        if(number_of_pages*hitsPerPage != hits.length()){
-            number_of_pages=number_of_pages+1;
-        }
-        if(number_of_pages > maxPages){
-            number_of_pages=maxPages;
-        }
-        if(hits.length() == 0){
-            number_of_pages=0;
-        }
-        else{
-            for(int i=0;i < number_of_pages;i++){
-                int pstart=i*hitsPerPage+1;
-                int pend=(i+1)*hitsPerPage;
-                if(hits_length < pend){
-                    pend=hits_length;
-                }
-                String type="other";
-                if(pstart == start){
-                    type="current";
-                }
-                else if(pstart == start-hitsPerPage){
-                    type="previous";
-                }
-                else if(pstart == start+hitsPerPage){
-                    type="next";
-                }
-            }
-        }
-    }
-    
-    /**
-     *
-     */
-    String getPercent(float score){
-        return ""+java.lang.Math.round(score*100.0);
-    }
-    
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/site/AbstractSiteManager.java b/src/java/org/apache/lenya/cms/site/AbstractSiteManager.java
deleted file mode 100644
index bcf8b8f..0000000
--- a/src/java/org/apache/lenya/cms/site/AbstractSiteManager.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.site;
-
-import java.util.Arrays;
-import java.util.Comparator;
-
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.util.DocumentSet;
-
-/**
- * Abstract base class for site managers.
- * 
- * @version $Id$
- */
-public abstract class AbstractSiteManager extends AbstractLogEnabled implements SiteManager,
-        Comparator {
-
-    /**
-     * Ctor.
-     */
-    public AbstractSiteManager() {
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#sortAscending(org.apache.lenya.cms.publication.util.DocumentSet)
-     */
-    public void sortAscending(DocumentSet set) throws SiteException {
-        if (!set.isEmpty()) {
-
-            if (!check(set)) {
-                throw new SiteException("The dependence relation is not a strict partial order!");
-            }
-
-            Document[] documents = set.getDocuments();
-            Arrays.sort(documents, this);
-            set.clear();
-            for (int i = 0; i < documents.length; i++) {
-                set.add(documents[i]);
-            }
-        }
-    }
-
-    /**
-     * Checks if the dependence relation is a strict partial order.
-     * @param set The document set to check.
-     * @return A boolean value.
-     * @throws SiteException when something went wrong.
-     */
-    protected boolean check(DocumentSet set) throws SiteException {
-        boolean isStrictPartialOrder = isIrreflexive(set) && isAntisymmetric(set)
-                && isTransitive(set);
-        return isStrictPartialOrder;
-    }
-
-    /**
-     * Checks if the dependence relation is antisymmetric.
-     * @param set The document set to check.
-     * @return A boolean value.
-     * @throws SiteException when something went wrong.
-     */
-    protected boolean isAntisymmetric(DocumentSet set) throws SiteException {
-        Document[] resources = set.getDocuments();
-        boolean isAntisymmetric = true;
-        for (int i = 0; i < resources.length; i++) {
-            for (int j = i + 1; j < resources.length; j++) {
-                if (requires(resources[i], resources[j]) && requires(resources[j], resources[i])
-                        && !(resources[i] == resources[j])) {
-                    isAntisymmetric = false;
-                }
-            }
-        }
-        return isAntisymmetric;
-    }
-
-    /**
-     * Checks if the dependence relation is transitive.
-     * @param set The document set to check.
-     * @return A boolean value.
-     * @throws SiteException when something went wrong.
-     */
-    protected boolean isTransitive(DocumentSet set) throws SiteException {
-        Document[] resources = set.getDocuments();
-        boolean isTransitive = true;
-        for (int i = 0; i < resources.length; i++) {
-            for (int j = i + 1; j < resources.length; j++) {
-                for (int k = j + 1; k < resources.length; k++) {
-                    if (requires(resources[i], resources[j])
-                            && requires(resources[j], resources[k])
-                            && !requires(resources[i], resources[k])) {
-                        isTransitive = false;
-                    }
-                }
-            }
-        }
-        return isTransitive;
-    }
-
-    /**
-     * Checks if the dependence relation is irreflexive.
-     * @param set The document set.
-     * @return A boolean value
-     * @throws SiteException
-     */
-    protected boolean isIrreflexive(DocumentSet set) throws SiteException {
-        Document[] resources = set.getDocuments();
-        boolean isIrreflexive = true;
-        for (int i = 0; i < resources.length; i++) {
-            if (requires(resources[i], resources[i])) {
-                isIrreflexive = false;
-            }
-        }
-        return isIrreflexive;
-    }
-
-    /**
-     * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
-     */
-    public int compare(Object arg0, Object arg1) {
-        int result = 0;
-        if (arg0 instanceof Document && arg1 instanceof Document) {
-            Document doc1 = (Document) arg0;
-            Document doc2 = (Document) arg1;
-            
-            try {
-                if (requires(doc1, doc2)) {
-                    result = 1;
-                }
-                if (requires(doc2, doc1)) {
-                    result = -1;
-                }
-            } catch (SiteException e) {
-                throw new RuntimeException(e);
-            }
-        }
-        return result;
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/site/Label.java b/src/java/org/apache/lenya/cms/site/Label.java
deleted file mode 100644
index d379195..0000000
--- a/src/java/org/apache/lenya/cms/site/Label.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* @version $Id$ */
-
-package org.apache.lenya.cms.site;
-
-/**
- * The Label class encapsulates a string label and a associated language.
- */
-public class Label {
-    private String label = null;
-    private String language = null;
-
-    /**
-     * Creates a new Label object with no language.
-     *
-     * @param _label the actual label
-     */
-    protected Label(String _label) {
-        this(_label, null);
-    }
-
-    /**
-     * Creates a new Label object.
-     *
-     * @param _label the actual label
-     * @param _language the language
-     */
-    public Label(String _label, String _language) {
-        this.label = _label;
-        this.language = _language;
-    }
-
-    /**
-     * Get the actual label of the Label object
-     *
-     * @return the actual label as a String
-     */
-    public String getLabel() {
-        return this.label;
-    }
-
-    /**
-     * Set the actual label of the label object.
-     * 
-     * @param _label The label.
-     */
-    public void setLabel(String _label) {
-        this.label = _label;
-    }
-    /**
-     * Get the language of this Label object 
-     *
-     * @return the language
-     */
-
-    public String getLanguage() {
-        return this.language;
-    }
-    
-    
-    /** (non-Javadoc)
-     * @see java.lang.Object#toString()
-     */
-    public String toString() {
-        return getLabel() + " " + getLanguage();
-    }
-
-    /** (non-Javadoc)
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    public boolean equals(Object obj) {
-        boolean equals = false;
-
-        if (getClass().isInstance(obj)) {
-            Label otherLabel = (Label)obj;
-            equals =
-                getLabel().equals(otherLabel.getLabel())
-                    && getLanguage().equals(otherLabel.getLanguage());
-        }
-
-        return equals;
-    }
-
-    /** (non-Javadoc)
-     * @see java.lang.Object#hashCode()
-     */
-    public int hashCode() {
-        return getLabel().hashCode() + getLanguage().hashCode();
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/site/SiteException.java b/src/java/org/apache/lenya/cms/site/SiteException.java
deleted file mode 100644
index 2f42a84..0000000
--- a/src/java/org/apache/lenya/cms/site/SiteException.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- */
-
-package org.apache.lenya.cms.site;
-
-import org.apache.lenya.cms.publication.PublicationException;
-
-/**
- * Site structure management exception.
- * 
- * @version $Id$
- */
-public class SiteException extends PublicationException {
-
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/**
-     * Ctor.
-     */
-    public SiteException() {
-        super();
-    }
-
-    /**
-     * Ctor.
-     * @param message The message.
-     */
-    public SiteException(String message) {
-        super(message);
-    }
-
-    /**
-     * Ctor.
-     * @param cause The cause.
-     */
-    public SiteException(Throwable cause) {
-        super(cause);
-    }
-
-    /**
-     * Ctor.
-     * @param message The message.
-     * @param cause The cause.
-     */
-    public SiteException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/site/SiteManager.java b/src/java/org/apache/lenya/cms/site/SiteManager.java
deleted file mode 100644
index 6364402..0000000
--- a/src/java/org/apache/lenya/cms/site/SiteManager.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.site;
-
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.util.DocumentSet;
-
-/**
- * <p>
- * A site structure management component.
- * </p>
- * 
- * <p>
- * Dependence on a set of resources must be a strict partial order <strong>&lt; </strong>:
- * </p>
- * <ul>
- * <li><em>irreflexive:</em> d <strong>&lt; </strong>d does not hold for any resource d</li>
- * <li><em>antisymmetric:</em> d <strong>&lt; </strong>e and e <strong>&lt; </strong>d implies
- * d=e</li>
- * <li><em>transitive:</em> d <strong>&lt; </strong>e and e <strong>&lt; </strong>f implies d
- * <strong>&lt; </strong>f</li>
- * </ul>*
- * @version $Id$
- */
-public interface SiteManager {
-
-    /**
-     * The Avalon role.
-     */
-    String ROLE = SiteManager.class.getName();
-
-    /**
-     * Checks if a resource requires another one.
-     * @param dependingResource The depending resource.
-     * @param requiredResource The required resource.
-     * @return A boolean value.
-     * @throws SiteException if an error occurs.
-     */
-    boolean requires(Document dependingResource, Document requiredResource) throws SiteException;
-
-    /**
-     * Returns the resources which are required by a certain resource.
-     * @param resource The depending resource.
-     * @return An array of resources.
-     * @throws SiteException if an error occurs.
-     */
-    Document[] getRequiredResources(Document resource) throws SiteException;
-
-    /**
-     * Returns the resources which require a certain resource.
-     * @param resource The required resource.
-     * @return An array of resources.
-     * @throws SiteException if an error occurs.
-     */
-    Document[] getRequiringResources(Document resource) throws SiteException;
-
-    /**
-     * Adds a document to the site structure.
-     * @param document The document to add.
-     * @throws SiteException if the document is already contained.
-     */
-    void add(Document document) throws SiteException;
-
-    /**
-     * Checks if the site structure contains a certain resource in a certain area.
-     * @param resource The resource.
-     * @return A boolean value.
-     * @throws SiteException if an error occurs.
-     */
-    boolean contains(Document resource) throws SiteException;
-
-    /**
-     * Checks if the site structure contains any language version of a certain resource in a certain
-     * area.
-     * @param resource The resource.
-     * @return A boolean value.
-     * @throws SiteException if an error occurs.
-     */
-    boolean containsInAnyLanguage(Document resource) throws SiteException;
-
-    /**
-     * Copies a document in the site structure.
-     * @param sourceDocument The source document.
-     * @param destinationDocument The destination document.
-     * @throws SiteException when something went wrong.
-     */
-    void copy(Document sourceDocument, Document destinationDocument) throws SiteException;
-
-    /**
-     * Deletes a document from the site structure.
-     * @param document The document to remove.
-     * @throws SiteException when something went wrong.
-     */
-    void delete(Document document) throws SiteException;
-
-    /**
-     * Returns the label of a document.
-     * @param document The document.
-     * @return A label.
-     * @throws SiteException if an error occurs.
-     */
-    String getLabel(Document document) throws SiteException;
-
-    /**
-     * Sets the label of a certain document.
-     * @param document The document.
-     * @param label The label.
-     * @throws SiteException if an error occurs.
-     */
-    void setLabel(Document document, String label) throws SiteException;
-
-    /**
-     * Returns all documents in a certain area.
-     * @param identityMap The identityMap to use.
-     * @param publication The publication.
-     * @param area The area.
-     * @return An array of documents.
-     * @throws SiteException if an error occurs.
-     */
-    Document[] getDocuments(DocumentIdentityMap identityMap, Publication publication, String area)
-            throws SiteException;
-
-    /**
-     * Sorts a set of documents using the "requires" relation.
-     * @param set The set.
-     * @throws SiteException if an error occurs.
-     */
-    void sortAscending(DocumentSet set) throws SiteException;
-
-    /**
-     * @param map The identity map.
-     * @param publication The publication.
-     * @param area The area.
-     * @return The object that holds the site structure information.
-     * @throws SiteException if an error occurs.
-     */
-    SiteStructure getSiteStructure(DocumentIdentityMap map, Publication publication, String area)
-            throws SiteException;
-
-    /**
-     * Checks if the document does already exist. If it does, returns a non-existing document with a
-     * similar document ID. If it does not, the original document is returned.
-     * @param document The document.
-     * @return A document.
-     * @throws SiteException if the new document could not be built.
-     */
-    Document getAvailableDocument(Document document) throws SiteException;
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/site/SiteStructure.java b/src/java/org/apache/lenya/cms/site/SiteStructure.java
deleted file mode 100644
index 200cc85..0000000
--- a/src/java/org/apache/lenya/cms/site/SiteStructure.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site;
-
-import org.apache.lenya.cms.repository.Node;
-import org.apache.lenya.transaction.Identifiable;
-
-/**
- * Object to hold a site structure information.
- *
- * @version $Id:$
- */
-public interface SiteStructure extends Identifiable {
-    
-    /**
-     * @return The repository node the site structure is stored in.
-     */
-    Node getRepositoryNode();
-
-}
diff --git a/src/java/org/apache/lenya/cms/site/SiteUtil.java b/src/java/org/apache/lenya/cms/site/SiteUtil.java
deleted file mode 100644
index 8abfa1b..0000000
--- a/src/java/org/apache/lenya/cms/site/SiteUtil.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site;
-
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentBuildException;
-import org.apache.lenya.cms.publication.DocumentException;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.util.DocumentSet;
-
-/**
- * Utility to handle site structures.
- * 
- * @version $Id:$
- */
-public class SiteUtil {
-
-    private SiteUtil() {
-    }
-
-    /**
-     * Returns a site structure object.
-     * @param map The identity map.
-     * @param publication The publication.
-     * @param area The area.
-     * @param manager The service manager.
-     * @return A site structure.
-     * @throws SiteException if an error occurs.
-     */
-    public static SiteStructure getSiteStructure(ServiceManager manager, DocumentIdentityMap map,
-            Publication publication, String area) throws SiteException {
-
-        SiteStructure structure = null;
-        ServiceSelector selector = null;
-        SiteManager siteManager = null;
-        try {
-            selector = (ServiceSelector) manager.lookup(SiteManager.ROLE + "Selector");
-            siteManager = (SiteManager) selector.select(publication.getSiteManagerHint());
-            structure = siteManager.getSiteStructure(map, publication, area);
-        } catch (Exception e) {
-            throw new SiteException(e);
-        } finally {
-            if (selector != null) {
-                if (siteManager != null) {
-                    selector.release(siteManager);
-                }
-                manager.release(selector);
-            }
-        }
-        return structure;
-    }
-
-    /**
-     * Returns the site structure a document belongs to.
-     * @param manager The service manager.
-     * @param document The document.
-     * @return A site structure.
-     * @throws SiteException if an error occurs.
-     */
-    public static SiteStructure getSiteStructure(ServiceManager manager, Document document)
-            throws SiteException {
-        return SiteUtil.getSiteStructure(manager, document.getIdentityMap(), document
-                .getPublication(), document.getArea());
-    }
-
-    /**
-     * Returns a sub-site starting with a certain document, which includes the document itself and
-     * all documents which require this document, including all language versions.
-     * @param manager The service manager.
-     * @param document The top-level document.
-     * @return A document set.
-     * @throws SiteException if an error occurs.
-     */
-    public static DocumentSet getSubSite(ServiceManager manager, Document document)
-            throws SiteException {
-        DocumentSet set = null;
-        ServiceSelector selector = null;
-        SiteManager siteManager = null;
-        try {
-            selector = (ServiceSelector) manager.lookup(SiteManager.ROLE + "Selector");
-            siteManager = (SiteManager) selector.select(document.getPublication()
-                    .getSiteManagerHint());
-            set = new DocumentSet(siteManager.getRequiringResources(document));
-
-            String[] languages = document.getLanguages();
-            for (int i = 0; i < languages.length; i++) {
-                Document version = document.getIdentityMap().getLanguageVersion(document,
-                        languages[i]);
-                set.add(version);
-            }
-
-        } catch (Exception e) {
-            throw new SiteException(e);
-        } finally {
-            if (selector != null) {
-                if (siteManager != null) {
-                    selector.release(siteManager);
-                }
-                manager.release(selector);
-            }
-        }
-        return set;
-    }
-
-    /**
-     * Sorts a document set in ascending order.
-     * @param manager The service manager.
-     * @param set The set.
-     * @throws SiteException if an error occurs.
-     */
-    public static void sortAscending(ServiceManager manager, DocumentSet set) throws SiteException {
-
-        if (set.isEmpty()) {
-            return;
-        }
-
-        ServiceSelector selector = null;
-        SiteManager siteManager = null;
-        try {
-            selector = (ServiceSelector) manager.lookup(SiteManager.ROLE + "Selector");
-            siteManager = (SiteManager) selector.select(set.getDocuments()[0].getPublication()
-                    .getSiteManagerHint());
-            siteManager.sortAscending(set);
-        } catch (Exception e) {
-            throw new SiteException(e);
-        } finally {
-            if (selector != null) {
-                if (siteManager != null) {
-                    selector.release(siteManager);
-                }
-                manager.release(selector);
-            }
-        }
-    }
-
-    /**
-     * Sorts a document set in descending order.
-     * @param manager The service manager.
-     * @param set The set.
-     * @throws SiteException if an error occurs.
-     */
-    public static void sortDescending(ServiceManager manager, DocumentSet set) throws SiteException {
-        SiteUtil.sortAscending(manager, set);
-        set.reverse();
-    }
-
-    /**
-     * Replace the target documents.
-     */
-    public static final int MODE_REPLACE = 0;
-
-    /**
-     * Cancel the command if one of the target document(s) exists.
-     */
-    public static final int MODE_CANCEL = 1;
-
-    /**
-     * Change the ID of a target document if it already exists.
-     */
-    public static final int MODE_CHANGE_ID = 2;
-
-    /**
-     * Returns a document set that represents the transfer of a sub-site to another area.
-     * @param manager The service manager.
-     * @param source The source document.
-     * @param targetArea The target area.
-     * @param mode The mode: {@link #MODE_REPLACE},{@link #MODE_CANCEL},{@link #MODE_CHANGE_ID}.
-     * @return A document set.
-     * @throws SiteException if an error occurs.
-     */
-    public static DocumentSet getTransferedSubSite(ServiceManager manager, Document source,
-            String targetArea, int mode) throws SiteException {
-
-        DocumentSet set = new DocumentSet();
-        ServiceSelector selector = null;
-        SiteManager siteManager = null;
-        try {
-            selector = (ServiceSelector) manager.lookup(SiteManager.ROLE + "Selector");
-            siteManager = (SiteManager) selector.select(source.getPublication()
-                    .getSiteManagerHint());
-
-            DocumentSet subSite = SiteUtil.getSubSite(manager, source);
-            Document[] docs = subSite.getDocuments();
-            for (int i = 0; i < docs.length; i++) {
-                Document target = SiteUtil.getTarget(siteManager, docs[i], targetArea, mode);
-                if (target != null) {
-                    set.add(target);
-                }
-            }
-
-        } catch (Exception e) {
-            throw new SiteException(e);
-        } finally {
-            if (selector != null) {
-                if (siteManager != null) {
-                    selector.release(siteManager);
-                }
-                manager.release(selector);
-            }
-        }
-        return set;
-    }
-
-    protected static Document getTarget(SiteManager siteManager, Document source,
-            String targetArea, int mode) throws SiteException, DocumentException,
-            DocumentBuildException {
-        Document target = source.getIdentityMap().getAreaVersion(source, targetArea);
-        switch (mode) {
-        case MODE_REPLACE:
-            break;
-        case MODE_CANCEL:
-            if (target.exists()) {
-                target = null;
-            }
-            break;
-        case MODE_CHANGE_ID:
-            target = siteManager.getAvailableDocument(target);
-            break;
-        }
-        return target;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#getAvailableDocument(Document)
-     * @param manager The service manager.
-     * @param document The document.
-     * @return A document.
-     * @throws SiteException if an error occurs.
-     */
-    public static Document getAvailableDocument(ServiceManager manager, Document document)
-            throws SiteException {
-        ServiceSelector selector = null;
-        SiteManager siteManager = null;
-        try {
-            selector = (ServiceSelector) manager.lookup(SiteManager.ROLE + "Selector");
-            siteManager = (SiteManager) selector.select(document.getPublication()
-                    .getSiteManagerHint());
-
-            return siteManager.getAvailableDocument(document);
-        } catch (Exception e) {
-            throw new SiteException(e);
-        } finally {
-            if (selector != null) {
-                if (siteManager != null) {
-                    selector.release(siteManager);
-                }
-                manager.release(selector);
-            }
-        }
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/site/simple/DocumentStore.java b/src/java/org/apache/lenya/cms/site/simple/DocumentStore.java
deleted file mode 100644
index 7cbabf5..0000000
--- a/src/java/org/apache/lenya/cms/site/simple/DocumentStore.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site.simple;
-
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.lenya.cms.cocoon.source.RepositorySource;
-import org.apache.lenya.cms.cocoon.source.SourceUtil;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentBuildException;
-import org.apache.lenya.cms.publication.DocumentException;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.util.CollectionImpl;
-import org.apache.lenya.cms.repository.Node;
-import org.apache.lenya.cms.site.SiteStructure;
-import org.apache.lenya.xml.NamespaceHelper;
-import org.w3c.dom.Element;
-
-/**
- * Site structure object which stores a list of documents.
- * 
- * @version $Id:$
- */
-public class DocumentStore extends CollectionImpl implements SiteStructure {
-
-    protected static final String DOCUMENT_ID = "/site";
-
-    /**
-     * The identifiable type.
-     */
-    public static final String IDENTIFIABLE_TYPE = "documentstore";
-
-    /**
-     * @param manager The service manager.
-     * @param map The identity map.
-     * @param publication The publication.
-     * @param area The area.
-     * @param _logger The logger.
-     * @throws DocumentException if an error occurs.
-     */
-    public DocumentStore(ServiceManager manager, DocumentIdentityMap map, Publication publication,
-            String area, Logger _logger) throws DocumentException {
-        super(manager, map, publication, DOCUMENT_ID, area, _logger);
-    }
-
-    protected static final String ATTRIBUTE_LANGUAGE = "xml:lang";
-
-    /**
-     * @see org.apache.lenya.cms.publication.util.CollectionImpl#createDocumentElement(org.apache.lenya.cms.publication.Document,
-     *      org.apache.lenya.xml.NamespaceHelper)
-     */
-    protected Element createDocumentElement(Document document, NamespaceHelper helper)
-            throws DocumentException {
-        Element element = super.createDocumentElement(document, helper);
-        element.setAttribute(ATTRIBUTE_LANGUAGE, document.getLanguage());
-        return element;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.util.CollectionImpl#loadDocument(org.w3c.dom.Element)
-     */
-    protected Document loadDocument(Element documentElement) throws DocumentBuildException {
-        String documentId = documentElement.getAttribute(ATTRIBUTE_ID);
-        String language = documentElement.getAttribute(ATTRIBUTE_LANGUAGE);
-        Document document = getIdentityMap().get(getPublication(), getArea(), documentId, language);
-        return document;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteStructure#getRepositoryNode()
-     */
-    public Node getRepositoryNode() {
-        SourceResolver resolver = null;
-        RepositorySource documentSource = null;
-        Node node = null;
-        try {
-            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-            documentSource = (RepositorySource) resolver.resolveURI(getSourceURI());
-            node = documentSource.getNode();
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (resolver != null) {
-                if (documentSource != null) {
-                    resolver.release(documentSource);
-                }
-                this.manager.release(resolver);
-            }
-        }
-        return node;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.Document#exists()
-     */
-    public boolean exists() throws DocumentException {
-        try {
-            return SourceUtil.exists(getSourceURI(), this.manager);
-        } catch (Exception e) {
-            throw new DocumentException(e);
-        }
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/site/simple/DocumentStoreFactory.java b/src/java/org/apache/lenya/cms/site/simple/DocumentStoreFactory.java
deleted file mode 100644
index 5334837..0000000
--- a/src/java/org/apache/lenya/cms/site/simple/DocumentStoreFactory.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site.simple;
-
-import java.io.File;
-
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.excalibur.source.SourceUtil;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationFactory;
-import org.apache.lenya.transaction.Identifiable;
-import org.apache.lenya.transaction.IdentityMap;
-import org.apache.lenya.transaction.IdentifiableFactory;
-
-/**
- * Factory for sitetree objects.
- * 
- * @version $Id:$
- */
-public class DocumentStoreFactory extends AbstractLogEnabled implements IdentifiableFactory {
-
-    protected ServiceManager manager;
-
-    /**
-     * Ctor.
-     * @param manager The service manager.
-     */
-    public DocumentStoreFactory(ServiceManager manager) {
-        this.manager = manager;
-    }
-
-    /**
-     * @see org.apache.lenya.transaction.IdentifiableFactory#build(org.apache.lenya.transaction.IdentityMap,
-     *      java.lang.String)
-     */
-    public Identifiable build(IdentityMap map, String key) throws Exception {
-        String[] snippets = key.split(":");
-        String publicationId = snippets[0];
-        String area = snippets[1];
-
-        SourceResolver resolver = null;
-        Source source = null;
-        DocumentStore store;
-        try {
-            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-            source = resolver.resolveURI("context://");
-            File servletContext = SourceUtil.getFile(source);
-
-            PublicationFactory factory = PublicationFactory.getInstance(getLogger());
-            Publication publication = factory.getPublication(publicationId, servletContext
-                    .getAbsolutePath());
-
-            store = new DocumentStore(this.manager, (DocumentIdentityMap) map, publication, area,
-                    getLogger());
-
-        } finally {
-            if (resolver != null) {
-                if (source != null) {
-                    resolver.release(source);
-                }
-                this.manager.release(resolver);
-            }
-        }
-        return store;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/site/simple/SimpleSiteManager.java b/src/java/org/apache/lenya/cms/site/simple/SimpleSiteManager.java
deleted file mode 100644
index 996d019..0000000
--- a/src/java/org/apache/lenya/cms/site/simple/SimpleSiteManager.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site.simple;
-
-import org.apache.avalon.framework.container.ContainerUtil;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentException;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.site.AbstractSiteManager;
-import org.apache.lenya.cms.site.SiteException;
-import org.apache.lenya.cms.site.SiteStructure;
-import org.apache.lenya.transaction.IdentifiableFactory;
-
-/**
- * Simple site manager which does not imply structural information. The documents are stored in
- * collections.
- * 
- * @version $Id:$
- */
-public class SimpleSiteManager extends AbstractSiteManager implements Serviceable {
-
-    private ServiceManager manager;
-
-    /**
-     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service(ServiceManager manager) throws ServiceException {
-        this.manager = manager;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#requires(org.apache.lenya.cms.publication.Document,
-     *      org.apache.lenya.cms.publication.Document)
-     */
-    public boolean requires(Document dependingResource, Document requiredResource)
-            throws SiteException {
-        return false;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#getRequiredResources(org.apache.lenya.cms.publication.Document)
-     */
-    public Document[] getRequiredResources(Document resource) throws SiteException {
-        return new Document[0];
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#getRequiringResources(org.apache.lenya.cms.publication.Document)
-     */
-    public Document[] getRequiringResources(Document resource) throws SiteException {
-        return new Document[0];
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#add(org.apache.lenya.cms.publication.Document)
-     */
-    public void add(Document document) throws SiteException {
-
-        DocumentStore store = getStore(document);
-        try {
-            store.add(document);
-        } catch (DocumentException e) {
-            throw new SiteException(e);
-        }
-    }
-
-    /**
-     * @param document The document.
-     * @return The store of the document.
-     */
-    private DocumentStore getStore(Document document) {
-        Publication publication = document.getPublication();
-        String area = document.getArea();
-        DocumentIdentityMap map = document.getIdentityMap();
-        return getStore(map, publication, area);
-    }
-
-    /**
-     * @param map The identity map.
-     * @param publication The publication.
-     * @param area The area.
-     * @return A document store.
-     */
-    protected DocumentStore getStore(DocumentIdentityMap map, Publication publication, String area) {
-        String key = getKey(publication, area);
-        DocumentStore store;
-        IdentifiableFactory factory = map.getFactory(DocumentStore.IDENTIFIABLE_TYPE);
-        if (factory == null) {
-            factory = new DocumentStoreFactory(this.manager);
-            ContainerUtil.enableLogging(factory, getLogger());
-            map.setFactory(DocumentStore.IDENTIFIABLE_TYPE, factory);
-        }
-        store = (DocumentStore) map.get(DocumentStore.IDENTIFIABLE_TYPE, key);
-
-        return store;
-    }
-
-    /**
-     * @param publication The publication.
-     * @param area The area.
-     * @return The key to store sitetree objects in the identity map.
-     */
-    protected String getKey(Publication publication, String area) {
-        return publication.getId() + ":" + area;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#contains(org.apache.lenya.cms.publication.Document)
-     */
-    public boolean contains(Document resource) throws SiteException {
-
-        if (resource.getId().equals(DocumentStore.DOCUMENT_ID)) {
-            return true;
-        }
-
-        try {
-            return getStore(resource).contains(resource);
-        } catch (DocumentException e) {
-            throw new SiteException(e);
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#containsInAnyLanguage(org.apache.lenya.cms.publication.Document)
-     */
-    public boolean containsInAnyLanguage(Document resource) throws SiteException {
-        try {
-            boolean contains = false;
-
-            String[] languages = resource.getPublication().getLanguages();
-            for (int i = 0; i < languages.length; i++) {
-                Document doc = resource.getIdentityMap().getLanguageVersion(resource, languages[i]);
-                DocumentStore store = getStore(doc);
-                contains = contains || store.contains(doc);
-            }
-
-            return getStore(resource).contains(resource);
-        } catch (Exception e) {
-            throw new SiteException(e);
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#copy(org.apache.lenya.cms.publication.Document,
-     *      org.apache.lenya.cms.publication.Document)
-     */
-    public void copy(Document sourceDocument, Document destinationDocument) throws SiteException {
-        DocumentStore destinationStore = getStore(destinationDocument);
-        try {
-            if (!destinationStore.contains(destinationDocument)) {
-                destinationStore.add(destinationDocument);
-            }
-        } catch (Exception e) {
-            throw new SiteException(e);
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#delete(org.apache.lenya.cms.publication.Document)
-     */
-    public void delete(Document document) throws SiteException {
-        DocumentStore store = getStore(document);
-        try {
-            if (!store.contains(document)) {
-                store.remove(document);
-            }
-        } catch (Exception e) {
-            throw new SiteException(e);
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#getLabel(org.apache.lenya.cms.publication.Document)
-     */
-    public String getLabel(Document document) throws SiteException {
-        return "";
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#setLabel(org.apache.lenya.cms.publication.Document,
-     *      java.lang.String)
-     */
-    public void setLabel(Document document, String label) throws SiteException {
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#getDocuments(org.apache.lenya.cms.publication.DocumentIdentityMap,
-     *      org.apache.lenya.cms.publication.Publication, java.lang.String)
-     */
-    public Document[] getDocuments(DocumentIdentityMap identityMap, Publication publication,
-            String area) throws SiteException {
-        DocumentStore store = getStore(identityMap, publication, area);
-        try {
-            return store.getDocuments();
-        } catch (DocumentException e) {
-            throw new SiteException(e);
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#getSiteStructure(org.apache.lenya.cms.publication.DocumentIdentityMap,
-     *      org.apache.lenya.cms.publication.Publication, java.lang.String)
-     */
-    public SiteStructure getSiteStructure(DocumentIdentityMap map, Publication publication,
-            String area) throws SiteException {
-        return getStore(map, publication, area);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#getAvailableDocument(org.apache.lenya.cms.publication.Document)
-     */
-    public Document getAvailableDocument(Document document) throws SiteException {
-        return document;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/site/topicmap/TopicMapSiteManager.java b/src/java/org/apache/lenya/cms/site/topicmap/TopicMapSiteManager.java
deleted file mode 100644
index 25317ca..0000000
--- a/src/java/org/apache/lenya/cms/site/topicmap/TopicMapSiteManager.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site.topicmap;
-
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.site.AbstractSiteManager;
-import org.apache.lenya.cms.site.SiteException;
-import org.apache.lenya.cms.site.SiteStructure;
-
-/**
- * Site manager to support topic maps.
- */
-public class TopicMapSiteManager extends AbstractSiteManager {
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#requires(org.apache.lenya.cms.publication.Document,
-     *      org.apache.lenya.cms.publication.Document)
-     */
-    public boolean requires(Document dependingResource, Document requiredResource)
-            throws SiteException {
-        // TODO Auto-generated method stub
-        return false;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#getRequiredResources(org.apache.lenya.cms.publication.Document)
-     */
-    public Document[] getRequiredResources(Document resource) throws SiteException {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#getRequiringResources(org.apache.lenya.cms.publication.Document)
-     */
-    public Document[] getRequiringResources(Document resource) throws SiteException {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#add(org.apache.lenya.cms.publication.Document)
-     */
-    public void add(Document document) throws SiteException {
-        // TODO Auto-generated method stub
-
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#contains(org.apache.lenya.cms.publication.Document)
-     */
-    public boolean contains(Document resource) throws SiteException {
-        // TODO Auto-generated method stub
-        return false;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#containsInAnyLanguage(org.apache.lenya.cms.publication.Document)
-     */
-    public boolean containsInAnyLanguage(Document resource) throws SiteException {
-        // TODO Auto-generated method stub
-        return false;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#copy(org.apache.lenya.cms.publication.Document,
-     *      org.apache.lenya.cms.publication.Document)
-     */
-    public void copy(Document sourceDocument, Document destinationDocument) throws SiteException {
-        // TODO Auto-generated method stub
-
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#delete(org.apache.lenya.cms.publication.Document)
-     */
-    public void delete(Document document) throws SiteException {
-        // TODO Auto-generated method stub
-
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#getLabel(org.apache.lenya.cms.publication.Document)
-     */
-    public String getLabel(Document document) throws SiteException {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#setLabel(org.apache.lenya.cms.publication.Document,
-     *      java.lang.String)
-     */
-    public void setLabel(Document document, String label) throws SiteException {
-        // TODO Auto-generated method stub
-
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#getDocuments(org.apache.lenya.cms.publication.DocumentIdentityMap,
-     *      org.apache.lenya.cms.publication.Publication, java.lang.String)
-     */
-    public Document[] getDocuments(DocumentIdentityMap map, Publication publication, String area)
-            throws SiteException {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#getSiteStructure(org.apache.lenya.cms.publication.DocumentIdentityMap, org.apache.lenya.cms.publication.Publication, java.lang.String)
-     */
-    public SiteStructure getSiteStructure(DocumentIdentityMap map, Publication publiation, String area) throws SiteException {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#getAvailableDocument(org.apache.lenya.cms.publication.Document)
-     */
-    public Document getAvailableDocument(Document document) throws SiteException {
-        return document;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/site/tree/DefaultSiteTree.java b/src/java/org/apache/lenya/cms/site/tree/DefaultSiteTree.java
deleted file mode 100644
index 63cc5ce..0000000
--- a/src/java/org/apache/lenya/cms/site/tree/DefaultSiteTree.java
+++ /dev/null
@@ -1,567 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.site.tree;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.TransformerException;
-
-import org.apache.avalon.framework.container.ContainerUtil;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.lenya.cms.cocoon.source.RepositorySource;
-import org.apache.lenya.cms.cocoon.source.SourceUtil;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.site.Label;
-import org.apache.lenya.cms.site.SiteException;
-import org.apache.lenya.xml.DocumentHelper;
-import org.apache.lenya.xml.NamespaceHelper;
-import org.apache.xpath.XPathAPI;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * Default sitetree implementation.
- * 
- * @version $Id$
- */
-public class DefaultSiteTree extends AbstractLogEnabled implements SiteTree {
-
-    /**
-     * The sitetree namespace.
-     */
-    public static final String NAMESPACE_URI = "http://apache.org/cocoon/lenya/sitetree/1.0";
-
-    /**
-     * The name of the sitetree file.
-     */
-    public static final String SITE_TREE_FILENAME = "sitetree.xml";
-
-    private String sourceUri;
-    // the area is only retained to provide some more info when raising an
-    // exception.
-    private String area = "";
-    protected ServiceManager manager;
-    private Document document;
-
-    /**
-     * Create a DefaultSiteTree
-     * @param publication The publication.
-     * @param _area The area.
-     * @param manager The service manager.
-     * @throws SiteException if an error occurs.
-     */
-    protected DefaultSiteTree(Publication publication, String _area, ServiceManager manager)
-            throws SiteException {
-        this.sourceUri = publication.getSourceURI() + "/content/" + _area + "/"
-                + SITE_TREE_FILENAME;
-        this.area = _area;
-        this.manager = manager;
-        try {
-            this.document = SourceUtil.readDOM(this.sourceUri, this.manager);
-            if (this.document == null) {
-                this.document = createDocument();
-            }
-        } catch (Exception e) {
-            throw new SiteException(e);
-        }
-    }
-
-    protected void saveDocument() throws SiteException {
-        try {
-            SourceUtil.writeDOM(this.document, this.sourceUri, this.manager);
-        } catch (Exception e) {
-            throw new SiteException(e);
-        }
-    }
-
-    /**
-     * Checks if the tree file has been modified externally and reloads the site tree. protected
-     * synchronized void checkModified() { if (this.area.equals(Publication.LIVE_AREA) &&
-     * this.treefile.lastModified() > this.lastModified) {
-     * 
-     * if (getLogger().isDebugEnabled()) { getLogger().debug("Sitetree [" + this.treefile + "] has
-     * changed: reloading."); }
-     * 
-     * try { this.document = DocumentHelper.readDocument(this.treefile); } catch (Exception e) {
-     * throw new IllegalStateException(e.getMessage()); } this.lastModified =
-     * this.treefile.lastModified(); } }
-     */
-
-    /**
-     * Create a new DefaultSiteTree xml document.
-     * @return the new site document
-     * @throws ParserConfigurationException if an error occurs
-     */
-    public synchronized Document createDocument() throws ParserConfigurationException {
-        Document document = DocumentHelper.createDocument(NAMESPACE_URI, "site", null);
-
-        Element root = document.getDocumentElement();
-        root.setAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
-        root
-                .setAttribute("xsi:schemaLocation",
-                        "http://apache.org/cocoon/lenya/sitetree/1.0  ../../../../resources/entities/sitetree.xsd");
-
-        return document;
-    }
-
-    /**
-     * Find a node in a subtree. The search is started at the given node. The list of ids contains
-     * the document-id split by "/".
-     * @param node where to start the search
-     * @param ids list of node ids
-     * @return the node that matches the path given in the list of ids
-     */
-    protected synchronized Node findNode(Node node, List ids) {
-
-        if (ids.size() < 1) {
-            return node;
-        }
-        NodeList nodes = node.getChildNodes();
-
-        for (int i = 0; i < nodes.getLength(); i++) {
-            NamedNodeMap attributes = nodes.item(i).getAttributes();
-
-            if (attributes != null) {
-                Node idAttribute = attributes.getNamedItem("id");
-
-                if (idAttribute != null && !"".equals(idAttribute.getNodeValue())
-                        && idAttribute.getNodeValue().equals(ids.get(0))) {
-                    return findNode(nodes.item(i), ids.subList(1, ids.size()));
-                }
-            }
-        }
-
-        // node wasn't found
-        return null;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTree#addNode(org.apache.lenya.cms.site.tree.SiteTreeNode,
-     *      java.lang.String)
-     */
-    public synchronized void addNode(SiteTreeNode node, String refDocumentId) throws SiteException {
-        addNode(node.getParent().getAbsoluteId(),
-                node.getId(),
-                node.getLabels(),
-                node.getHref(),
-                node.getSuffix(),
-                node.hasLink(),
-                refDocumentId);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTree#addNode(java.lang.String, java.lang.String,
-     *      org.apache.lenya.cms.site.Label[])
-     */
-    public synchronized void addNode(String parentid, String id, Label[] labels)
-            throws SiteException {
-        addNode(parentid, id, labels, null, null, false);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTree#addNode(org.apache.lenya.cms.site.tree.SiteTreeNode)
-     */
-    public synchronized void addNode(SiteTreeNode node) throws SiteException {
-        addNode(node, null);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTree#addNode(java.lang.String,
-     *      org.apache.lenya.cms.site.Label[], java.lang.String, java.lang.String, boolean,
-     *      java.lang.String)
-     */
-    public synchronized void addNode(String documentid, Label[] labels, String href, String suffix,
-            boolean link, String refDocumentId) throws SiteException {
-        StringBuffer buf = new StringBuffer();
-        StringTokenizer st = new StringTokenizer(documentid, "/");
-        int length = st.countTokens();
-
-        for (int i = 0; i < (length - 1); i++) {
-            buf.append("/" + st.nextToken());
-        }
-        String parentid = buf.toString();
-        String id = st.nextToken();
-        addNode(parentid, id, labels, href, suffix, link, refDocumentId);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTree#addNode(java.lang.String,
-     *      org.apache.lenya.cms.site.Label[], java.lang.String, java.lang.String, boolean)
-     */
-    public synchronized void addNode(String documentid, Label[] labels, String href, String suffix,
-            boolean link) throws SiteException {
-        addNode(documentid, labels, href, suffix, link, null);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTree#addNode(java.lang.String, java.lang.String,
-     *      org.apache.lenya.cms.site.Label[], java.lang.String, java.lang.String, boolean)
-     */
-    public synchronized void addNode(String parentid, String id, Label[] labels, String href,
-            String suffix, boolean link) throws SiteException {
-        addNode(parentid, id, labels, href, suffix, link, null);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTree#addNode(java.lang.String, java.lang.String,
-     *      org.apache.lenya.cms.site.Label[], java.lang.String, java.lang.String, boolean,
-     *      java.lang.String)
-     */
-    public synchronized void addNode(String parentid, String id, Label[] labels, String href,
-            String suffix, boolean link, String refDocumentId) throws SiteException {
-
-        Node parentNode = getNodeInternal(parentid);
-
-        if (parentNode == null) {
-            throw new SiteException("Parentid: " + parentid + " in " + this.area
-                    + " tree not found");
-        }
-
-        getLogger().debug("PARENT ELEMENT: " + parentNode);
-
-        // Check if child already exists
-        Node childNode = getNodeInternal(parentid + "/" + id);
-
-        if (childNode != null) {
-            getLogger().info("This node: " + parentid + "/" + id + " has already been inserted");
-
-            return;
-        }
-
-        // Create node
-        NamespaceHelper helper = new NamespaceHelper(NAMESPACE_URI, "", this.document);
-        Element child = helper.createElement(SiteTreeNodeImpl.NODE_NAME);
-        child.setAttribute(SiteTreeNodeImpl.ID_ATTRIBUTE_NAME, id);
-
-        if ((href != null) && (href.length() > 0)) {
-            child.setAttribute(SiteTreeNodeImpl.HREF_ATTRIBUTE_NAME, href);
-        }
-
-        if ((suffix != null) && (suffix.length() > 0)) {
-            child.setAttribute(SiteTreeNodeImpl.SUFFIX_ATTRIBUTE_NAME, suffix);
-        }
-
-        if (link) {
-            child.setAttribute(SiteTreeNodeImpl.LINK_ATTRIBUTE_NAME, "true");
-        }
-
-        for (int i = 0; i < labels.length; i++) {
-            String labelName = labels[i].getLabel();
-            Element label = helper.createElement(SiteTreeNodeImpl.LABEL_NAME, labelName);
-            String labelLanguage = labels[i].getLanguage();
-
-            if ((labelLanguage != null) && (labelLanguage.length() > 0)) {
-                label.setAttribute(SiteTreeNodeImpl.LANGUAGE_ATTRIBUTE_NAME, labelLanguage);
-            }
-
-            child.appendChild(label);
-        }
-
-        // Add Node
-        if (refDocumentId != null && !refDocumentId.equals("")) {
-            Node nextSibling = getNodeInternal(refDocumentId);
-            if (nextSibling != null) {
-                parentNode.insertBefore(child, nextSibling);
-            } else {
-                parentNode.appendChild(child);
-            }
-        } else {
-            parentNode.appendChild(child);
-        }
-        getLogger().debug("Tree has been modified: " + document.getDocumentElement());
-        saveDocument();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTree#addLabel(java.lang.String,
-     *      org.apache.lenya.cms.site.Label)
-     */
-    public synchronized void addLabel(String documentId, Label label) {
-        SiteTreeNode node = getNode(documentId);
-        if (node != null) {
-            node.addLabel(label);
-        }
-        try {
-            saveDocument();
-        } catch (SiteException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTree#removeLabel(java.lang.String,
-     *      org.apache.lenya.cms.site.Label)
-     */
-    public synchronized void removeLabel(String documentId, Label label) {
-        SiteTreeNode node = getNode(documentId);
-        if (node != null) {
-            node.removeLabel(label);
-        }
-        try {
-            saveDocument();
-        } catch (SiteException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTree#removeNode(java.lang.String)
-     */
-    public synchronized SiteTreeNode removeNode(String documentId) {
-        assert documentId != null;
-
-        Node node;
-        try {
-            node = removeNodeInternal(documentId);
-        } catch (SiteException e) {
-            throw new RuntimeException(e);
-        }
-        if (node == null) {
-            return null;
-        }
-
-        SiteTreeNode newNode = new SiteTreeNodeImpl(node);
-        ContainerUtil.enableLogging(newNode, getLogger());
-        return newNode;
-    }
-
-    /**
-     * removes the node corresponding to the given document-id and returns it
-     * @param documentId the document-id of the Node to be removed
-     * @return the <code>Node</code> that was removed
-     * @throws SiteException
-     */
-    private synchronized Node removeNodeInternal(String documentId) throws SiteException {
-        Node node = this.getNodeInternal(documentId);
-        Node parentNode = node.getParentNode();
-        Node newNode = parentNode.removeChild(node);
-        SourceUtil.registerDirty(this.sourceUri, this.manager);
-        return newNode;
-    }
-
-    /**
-     * Find a node for a given document-id
-     * 
-     * @param documentId the document-id of the Node that we're trying to get
-     * 
-     * @return the Node if there is a Node for the given document-id, null otherwise
-     * @throws SiteException
-     */
-    private synchronized Node getNodeInternal(String documentId) throws SiteException {
-        StringTokenizer st = new StringTokenizer(documentId, "/");
-        ArrayList ids = new ArrayList();
-
-        while (st.hasMoreTokens()) {
-            ids.add(st.nextToken());
-        }
-
-        Node node = findNode(this.document.getDocumentElement(), ids);
-        return node;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTree#getNode(java.lang.String)
-     */
-    public synchronized SiteTreeNode getNode(String documentId) {
-        assert documentId != null;
-
-        SiteTreeNode treeNode = null;
-
-        Node node;
-        try {
-            node = getNodeInternal(documentId);
-        } catch (SiteException e) {
-            throw new RuntimeException(e);
-        }
-        if (node != null) {
-            treeNode = new SiteTreeNodeImpl(node);
-            ContainerUtil.enableLogging(treeNode, getLogger());
-        }
-
-        return treeNode;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTree#getTopNodes()
-     */
-    public SiteTreeNode[] getTopNodes() {
-        List childElements = new ArrayList();
-
-        NamespaceHelper helper = new NamespaceHelper(NAMESPACE_URI, "", this.document);
-
-        Element[] elements = helper.getChildren(this.document.getDocumentElement(),
-                SiteTreeNodeImpl.NODE_NAME);
-
-        for (int i = 0; i < elements.length; i++) {
-            SiteTreeNode newNode = new SiteTreeNodeImpl(elements[i]);
-            childElements.add(newNode);
-        }
-
-        return (SiteTreeNode[]) childElements.toArray(new SiteTreeNode[childElements.size()]);
-    }
-
-    /**
-     * Move up the node amongst its siblings.
-     * @param documentid The document id for the node.
-     * @throws SiteException if the moving failed.
-     */
-    public synchronized void moveUp(String documentid) throws SiteException {
-        Node node = this.getNodeInternal(documentid);
-        if (node == null) {
-            throw new SiteException("Node to move: " + documentid + " not found");
-        }
-        Node parentNode = node.getParentNode();
-        if (parentNode == null) {
-            throw new SiteException("Parentid of node with documentid: " + documentid
-                    + " not found");
-        }
-
-        Node previousNode;
-        try {
-            previousNode = XPathAPI.selectSingleNode(node,
-                    "(preceding-sibling::*[local-name() = 'node'])[last()]");
-        } catch (TransformerException e) {
-            throw new SiteException(e);
-        }
-
-        if (previousNode == null) {
-            getLogger().warn("Couldn't found a preceding sibling");
-            return;
-        }
-        Node insertNode = parentNode.removeChild(node);
-        parentNode.insertBefore(insertNode, previousNode);
-        saveDocument();
-    }
-
-    /**
-     * Move down the node amongst its siblings.
-     * 
-     * @param documentid The document id for the node.
-     * @throws SiteException if the moving failed.
-     */
-    public synchronized void moveDown(String documentid) throws SiteException {
-        Node node = this.getNodeInternal(documentid);
-        if (node == null) {
-            throw new SiteException("Node to move: " + documentid + " not found");
-        }
-        Node parentNode = node.getParentNode();
-        if (parentNode == null) {
-            throw new SiteException("Parentid of node with documentid: " + documentid
-                    + " not found");
-        }
-        Node nextNode;
-        try {
-            nextNode = XPathAPI.selectSingleNode(node,
-                    "following-sibling::*[local-name() = 'node'][position()=2]");
-        } catch (TransformerException e) {
-            throw new SiteException(e);
-        }
-
-        Node insertNode = parentNode.removeChild(node);
-
-        if (nextNode == null) {
-            getLogger().warn("Couldn't found the second following sibling");
-            parentNode.appendChild(insertNode);
-        } else {
-            parentNode.insertBefore(insertNode, nextNode);
-        }
-        saveDocument();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTree#importSubtree(org.apache.lenya.cms.site.tree.SiteTreeNode,
-     *      org.apache.lenya.cms.site.tree.SiteTreeNode, java.lang.String, java.lang.String)
-     */
-    public synchronized void importSubtree(SiteTreeNode newParent, SiteTreeNode subtreeRoot,
-            String newid, String refDocumentId) throws SiteException {
-        assert subtreeRoot != null;
-        assert newParent != null;
-        String parentId = newParent.getAbsoluteId();
-        String id = newid;
-
-        this.addNode(parentId, id, subtreeRoot.getLabels(), subtreeRoot.getHref(), subtreeRoot
-                .getSuffix(), subtreeRoot.hasLink(), refDocumentId);
-        newParent = this.getNode(parentId + "/" + id);
-        if (newParent == null) {
-            throw new SiteException("The added node was not found.");
-        }
-        SiteTreeNode[] children = subtreeRoot.getChildren();
-        if (children == null) {
-            getLogger().info("The node " + subtreeRoot.toString() + " has no children");
-            return;
-        }
-        for (int i = 0; i < children.length; i++) {
-            importSubtree(newParent, children[i], children[i].getId(), null);
-        }
-        saveDocument();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTree#setLabel(java.lang.String,
-     *      org.apache.lenya.cms.site.Label)
-     */
-    public synchronized void setLabel(String documentId, Label label) {
-        SiteTreeNode node = getNode(documentId);
-        if (node != null) {
-            node.setLabel(label);
-        }
-        try {
-            saveDocument();
-        } catch (SiteException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.transaction.Identifiable#getIdentifiableType()
-     */
-    public String getIdentifiableType() {
-        return SiteTree.IDENTIFIABLE_TYPE;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteStructure#getRepositoryNode()
-     */
-    public org.apache.lenya.cms.repository.Node getRepositoryNode() {
-        SourceResolver resolver = null;
-        RepositorySource source = null;
-        try {
-            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-            source = (RepositorySource) resolver.resolveURI(this.sourceUri);
-            return source.getNode();
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (resolver != null) {
-                if (source != null) {
-                    resolver.release(source);
-                }
-                this.manager.release(resolver);
-            }
-        }
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/site/tree/SiteTree.java b/src/java/org/apache/lenya/cms/site/tree/SiteTree.java
deleted file mode 100644
index 69f2f39..0000000
--- a/src/java/org/apache/lenya/cms/site/tree/SiteTree.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.site.tree;
-
-import org.apache.lenya.cms.site.Label;
-import org.apache.lenya.cms.site.SiteException;
-import org.apache.lenya.cms.site.SiteStructure;
-
-/**
- * A sitetree.
- * 
- * @version $Id$
- */
-public interface SiteTree extends SiteStructure {
-
-    /**
-     * The type of sitetree identifiable objects.
-     */
-    String IDENTIFIABLE_TYPE = "site";
-
-    /**
-     * Add a node.
-     * 
-     * @param parentid where the node is to be added
-     * @param id e.g. "concepts"
-     * @param labels the labels of the node that is to be added
-     * 
-     * @throws SiteException if the addition failed
-     */
-    void addNode(String parentid, String id, Label[] labels) throws SiteException;
-
-    /**
-     * Add a node. TODO: Lenya 1.2.X supports argument visibleInNav
-     * 
-     * @param parentid the node where the new node is to be inserted
-     * @param id the node id
-     * @param labels the labels
-     * @param href the href of the new node (internal and external references)
-     * @param suffix the suffix of the new node
-     * @param link Visibility of link respectively href. It is meant to support "grouping" nodes in the navigation which do not relate to a document (internal) or external link (www).
-     * 
-     * @throws SiteException if the addition failed
-     */
-    void addNode(String parentid, String id, Label[] labels, String href, String suffix,
-            boolean link) throws SiteException;
-
-    /**
-     * Insert a node before a given node
-     * 
-     * @param parentid the node where the new node is to be inserted
-     * @param id the node id
-     * @param labels the labels
-     * @param href the href of the new node
-     * @param suffix the suffix of the new node
-     * @param link the link
-     * @param refDocumentId document-id of the node, before which the new node will be inserted.
-     * 
-     * @throws SiteException if the addition failed
-     */
-    void addNode(String parentid, String id, Label[] labels, String href, String suffix,
-            boolean link, String refDocumentId) throws SiteException;
-
-    /**
-     * Add a node. Compute the parent id and the id of the node from the document-id
-     * 
-     * @param documentid the document-id of the new node. From this the parent-id and the id are
-     *            computed
-     * @param labels the labels
-     * @param href the href
-     * @param suffix the suffix
-     * @param link the link
-     * 
-     * @throws SiteException if the addition failed
-     */
-    void addNode(String documentid, Label[] labels, String href, String suffix, boolean link)
-            throws SiteException;
-
-    /**
-     * Insert a node before a given node Compute the parent id and the id of the node from the
-     * document-id
-     * 
-     * @param documentid the document-id of the new node. From this the parent-id and the id are
-     *            computed
-     * @param labels the labels
-     * @param href the href
-     * @param suffix the suffix
-     * @param link the link
-     * @param refDocumentId document-id of the node, before which the new node will be inserted.
-     * 
-     * @throws SiteException if the addition failed
-     */
-    void addNode(String documentid, Label[] labels, String href, String suffix, boolean link,
-            String refDocumentId) throws SiteException;
-
-    /**
-     * Add a node. This method is typically used when publishing, i.e. when copying a node from the
-     * authoring tree to the live tree. The existing node already has a parent node (in the
-     * authoring tree). The node that is added will be a copy of the original node and will be
-     * inserted at the same parentid as the original node.
-     * 
-     * @param node the <code>SiteTreeNode</code> that is to be added
-     * 
-     * @throws SiteException if the addition failed
-     */
-    void addNode(SiteTreeNode node) throws SiteException;
-
-    /**
-     * Add a node. This method is typically used when publishing, i.e. when copying a node from the
-     * authoring tree to the live tree. The existing node already has a parent node (in the
-     * authoring tree). The node that is added will be a copy of the original node and will be
-     * inserted at the same parentid as the original node.
-     * 
-     * @param node the <code>SiteTreeNode</code> that is to be added
-     * @param refDocumentId document-id of the node, before which the new node will be inserted.
-     * 
-     * @throws SiteException if the addition failed
-     */
-    void addNode(SiteTreeNode node, String refDocumentId) throws SiteException;
-
-    /**
-     * Add a label to an existing node
-     * 
-     * @param documentId the document-id to which the label is to be added.
-     * @param label the label to add
-     */
-    void addLabel(String documentId, Label label);
-
-    /**
-     * Sets a label of an existing node. If the label does not exist, it is added. Otherwise, the
-     * existing label is replaced.
-     * 
-     * @param documentId the document-id to which the label is to be added.
-     * @param label the label to add
-     */
-    void setLabel(String documentId, Label label);
-
-    /**
-     * Remove a label from a node
-     * 
-     * @param documentId the document-id from which the label is to be removed.
-     * @param label the label to remove
-     */
-    void removeLabel(String documentId, Label label);
-
-    /**
-     * Removes the node corresponding to the given document-id from the tree, and returns it.
-     * 
-     * @param documentId the document-id of the node that is to be removed
-     * 
-     * @return the removed node
-     */
-    SiteTreeNode removeNode(String documentId);
-
-    /**
-     * Return the Node for a given document-id.
-     * 
-     * @param documentId the document-id of the node that is requested
-     * 
-     * @return a <code>SiteTreeNode</code> if there is a node for the given document-id, null
-     *         otherwise.
-     */
-    SiteTreeNode getNode(String documentId);
-
-    /**
-     * Return the top level nodes in the sitetree.
-     * @return the top nodes in the sitetree, or empty array if there are none
-     */
-    SiteTreeNode[] getTopNodes();
-
-    /**
-     * Move up the node amongst its siblings.
-     * 
-     * @param documentid The document id of the node.
-     * @throws SiteException if the moving failed.
-     */
-    void moveUp(String documentid) throws SiteException;
-
-    /**
-     * Move down the node amongst its siblings.
-     * @param documentid The document id of the node.
-     * @throws SiteException if the moving failed.
-     */
-    void moveDown(String documentid) throws SiteException;
-
-    /**
-     * Imports a subtree (from this or from another tree) at a certain position.
-     * @param subtreeRoot The root of the subtree to import.
-     * @param newParent The node where the subtree shall be inserted.
-     * @param newid The new id of the inserted subtreeRoot node (to not overwrite
-     * @param refDocumentId The document-id corresponding to the reference node, before which the
-     *            subtree should be inserted. If null, the subtree is inserted at the end. in case
-     *            there is already a node with the same id in the tree).
-     * @throws SiteException when an error occurs.
-     */
-    void importSubtree(SiteTreeNode subtreeRoot, SiteTreeNode newParent, String newid,
-            String refDocumentId) throws SiteException;
-
-}
diff --git a/src/java/org/apache/lenya/cms/site/tree/SiteTreeFactory.java b/src/java/org/apache/lenya/cms/site/tree/SiteTreeFactory.java
deleted file mode 100644
index 88cbff7..0000000
--- a/src/java/org/apache/lenya/cms/site/tree/SiteTreeFactory.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site.tree;
-
-import java.io.File;
-
-import org.apache.avalon.framework.container.ContainerUtil;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.excalibur.source.SourceUtil;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationFactory;
-import org.apache.lenya.transaction.Identifiable;
-import org.apache.lenya.transaction.IdentityMap;
-import org.apache.lenya.transaction.IdentifiableFactory;
-
-/**
- * Factory for sitetree objects.
- * 
- * @version $Id:$
- */
-public class SiteTreeFactory extends AbstractLogEnabled implements IdentifiableFactory {
-
-    protected ServiceManager manager;
-
-    /**
-     * Ctor.
-     * @param manager The service manager.
-     */
-    public SiteTreeFactory(ServiceManager manager) {
-        this.manager = manager;
-    }
-
-    /**
-     * @see org.apache.lenya.transaction.IdentifiableFactory#build(org.apache.lenya.transaction.IdentityMap,
-     *      java.lang.String)
-     */
-    public Identifiable build(IdentityMap map, String key) throws Exception {
-        String[] snippets = key.split(":");
-        String publicationId = snippets[0];
-        String area = snippets[1];
-
-        SourceResolver resolver = null;
-        Source source = null;
-        DefaultSiteTree tree;
-        try {
-            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-            source = resolver.resolveURI("context://");
-            File servletContext = SourceUtil.getFile(source);
-
-            PublicationFactory factory = PublicationFactory.getInstance(getLogger());
-            Publication publication = factory.getPublication(publicationId, servletContext
-                    .getAbsolutePath());
-           
-            tree = new DefaultSiteTree(publication, area, this.manager);
-            ContainerUtil.enableLogging(tree, getLogger());
-            
-        } finally {
-            if (resolver != null) {
-                if (source != null) {
-                    resolver.release(source);
-                }
-                this.manager.release(resolver);
-            }
-        }
-        return tree;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/site/tree/SiteTreeNode.java b/src/java/org/apache/lenya/cms/site/tree/SiteTreeNode.java
deleted file mode 100644
index 93afeed..0000000
--- a/src/java/org/apache/lenya/cms/site/tree/SiteTreeNode.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.site.tree;
-
-import java.util.List;
-
-import org.apache.lenya.cms.publication.DocumentException;
-import org.apache.lenya.cms.site.Label;
-
-/**
- * This interface is a wrapper around the more general w3c.Node which
- * hides some details which are irrelevant for site tree nodes. It basically
- * delegates everything to the Node.
- */
-public interface SiteTreeNode {
-
-    /**
-     * Returns the parent node of this node.
-     * @return A sitetree node.
-     */
-    SiteTreeNode getParent();
-
-    /**
-     * Returns the parent node of this node or null if the parent has no label for the given language.
-     * @param language A language string.
-     * @return A sitetree node.
-     */
-    SiteTreeNode getParent(String language);
-
-    /**
-     * Get the absolute id of this node.
-     * 
-     * @return  the absolute id.
-     */
-    String getAbsoluteId();
-
-    /**
-     * Get the id of this node.
-     * 
-     * @return the node id.
-     */
-    String getId();
-
-    /**
-     * Get all labels for this node (independent of their language attribute).
-     * 
-     * @return an <code>Array</code> of labels.
-     */
-    Label[] getLabels();
-
-    /**
-     * Get the label for a specific language.
-     * 
-     * @param xmlLanguage the language for which the label is requested.
-     * 
-     * @return a <code>Label</code> if there is one for the given language, 
-     * null otherwise. 
-     */
-    Label getLabel(String xmlLanguage);
-
-    /**
-     * Add a label to this node iff the node does not have this label already.
-     * 
-     * @param label the label to be added.
-     */
-    void addLabel(Label label);
-
-    /**
-     * Remove a label from this node.
-     * 
-     * @param label the label to be removed.
-     */
-    void removeLabel(Label label);
-
-    /**
-     * Get the href of this node.
-     * 
-     * @return the href.
-     */
-    String getHref();
-
-    /**
-     * Get the suffix of this node.
-     * 
-     * @return the suffix.
-     */
-    String getSuffix();
-
-    /**
-     * Check whether this node has a link.
-     * 
-     * @return true if this node has a link.
-     */
-    boolean hasLink();
-
-    /**
-     * Get the sitetreenodes, which are children of this node
-     * 
-     * @return the children.
-     */
-    SiteTreeNode[] getChildren();
-
-    /**
-     * Get the sitetreenodes, which are children of this node
-     * and contain a label for the given language.
-     * 
-     * @param language A language string.
-     * @return the children.
-     */
-    SiteTreeNode[] getChildren(String language);
-
-    /**
-     * Remove the children of the node
-     * 
-     * @return the removed node
-     */
-    SiteTreeNode[] removeChildren();
-
-    /**
-     * Get the sitetreenodes, which are the siblings preceding this node
-     * 
-     * @return the children.
-     */
-    SiteTreeNode[] getPrecedingSiblings();
-
-	/**
-	 * Get the sitetreenodes, which are the siblings following this node
-	 * 
-	 * @return the children.
-	 */
-	SiteTreeNode[] getNextSiblings();
-
-    /**
-	 * @return string. The document-id corresponding to the next sibling node.
-	 */
-	String getNextSiblingDocumentId();
-
-    /**
-     * Call the visit method of the visitor, that mean
-     * the operation that shall be perfoemed on this node
-     * (Visitor pattern)
-     * @param visitor The visitor.
-     * 
-     * @throws DocumentException if an error occurs
-     */
-    void accept(SiteTreeNodeVisitor visitor) throws DocumentException;
-
-    /**
-     * Traverse the node ant its children and call the
-     * accept method.
-     * @param visitor The visitor.
-     * 
-     * @throws DocumentException if an error occurs
-     */
-    void acceptSubtree(SiteTreeNodeVisitor visitor) throws DocumentException;
-
-    /**
-     * Traverse in a reverse way the node ant its children and call the
-     * accept method.
-     * @param visitor The visitor.
-     * 
-     * @throws DocumentException if an error occurs
-	 */
-	void acceptReverseSubtree(SiteTreeNodeVisitor visitor) throws DocumentException; 
-    /**
-     * Sets a label of an this node. If the label does not exist, it is added.
-     * Otherwise, the existing label is replaced.
-     * 
-     * @param label the label to add
-     */
-    void setLabel(Label label);
-
-    /**
-     * Give a list of the children and this node in a pre order way
-     * @return The list
-     */
-    List preOrder();
-    
-	/**
-     * Give a list of the children and this node in a post order way
-	 * @return The list
-	 */
-	List postOrder();
-    
-}
diff --git a/src/java/org/apache/lenya/cms/site/tree/SiteTreeNodeImpl.java b/src/java/org/apache/lenya/cms/site/tree/SiteTreeNodeImpl.java
deleted file mode 100644
index 9d17668..0000000
--- a/src/java/org/apache/lenya/cms/site/tree/SiteTreeNodeImpl.java
+++ /dev/null
@@ -1,469 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.site.tree;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.avalon.framework.container.ContainerUtil;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.lenya.cms.publication.DocumentException;
-import org.apache.lenya.cms.site.Label;
-import org.apache.lenya.xml.DocumentHelper;
-import org.apache.lenya.xml.NamespaceHelper;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * Concrete implementation of the <code>SiteTreeNode</code> interface.
- * 
- * @see org.apache.lenya.cms.site.tree.SiteTreeNode
- * @version $Id$
- */
-public class SiteTreeNodeImpl extends AbstractLogEnabled implements SiteTreeNode {
-
-    /**
-     * <code>ID_ATTRIBUTE_NAME</code> The id attribute
-     */
-    public static final String ID_ATTRIBUTE_NAME = "id";
-    /**
-     * <code>HREF_ATTRIBUTE_NAME</code> The href attribute
-     */
-    public static final String HREF_ATTRIBUTE_NAME = "href";
-    /**
-     * <code>SUFFIX_ATTRIBUTE_NAME</code> The suffix attribute
-     */
-    public static final String SUFFIX_ATTRIBUTE_NAME = "suffix";
-    /**
-     * <code>LINK_ATTRIBUTE_NAME</code> The link attribute
-     */
-    public static final String LINK_ATTRIBUTE_NAME = "link";
-    /**
-     * <code>LANGUAGE_ATTRIBUTE_NAME</code> The language attribute
-     */
-    public static final String LANGUAGE_ATTRIBUTE_NAME = "xml:lang";
-    /**
-     * <code>NODE_NAME</code> The node name
-     */
-    public static final String NODE_NAME = "node";
-    /**
-     * <code>LABEL_NAME</code> The label name
-     */
-    public static final String LABEL_NAME = "label";
-
-    private Node node = null;
-
-    /**
-     * Creates a new SiteTreeNodeImpl object.
-     * 
-     * @param _node the node which is to be wrapped by this SiteTreeNode
-     */
-    protected SiteTreeNodeImpl(Node _node) {
-        this.node = _node;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTreeNode#getId()
-     */
-    public String getId() {
-        if (this.node == this.node.getOwnerDocument().getDocumentElement()) {
-            return "";
-        }
-        return this.node.getAttributes().getNamedItem(ID_ATTRIBUTE_NAME).getNodeValue();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTreeNode#getAbsoluteId()
-     */
-    public String getAbsoluteId() {
-        String absoluteId = "";
-        Node currentNode = this.node;
-        NamedNodeMap attributes = null;
-        Node idAttribute = null;
-
-        while (currentNode != null) {
-            attributes = currentNode.getAttributes();
-
-            if (attributes == null) {
-                break;
-            }
-
-            idAttribute = attributes.getNamedItem(ID_ATTRIBUTE_NAME);
-
-            if (idAttribute == null) {
-                break;
-            }
-
-            absoluteId = "/" + idAttribute.getNodeValue() + absoluteId;
-            currentNode = currentNode.getParentNode();
-        }
-
-        return absoluteId;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTreeNode#getLabels()
-     */
-    public Label[] getLabels() {
-        ArrayList labels = new ArrayList();
-
-        NodeList children = this.node.getChildNodes();
-
-        for (int i = 0; i < children.getLength(); i++) {
-            Node child = children.item(i);
-
-            if ((child.getNodeType() == Node.ELEMENT_NODE)
-                    && child.getNodeName().equals(LABEL_NAME)) {
-                String labelName = DocumentHelper.getSimpleElementText((Element) child);
-                String labelLanguage = null;
-                Node languageAttribute = child.getAttributes()
-                        .getNamedItem(LANGUAGE_ATTRIBUTE_NAME);
-
-                if (languageAttribute != null) {
-                    labelLanguage = languageAttribute.getNodeValue();
-                }
-
-                labels.add(new Label(labelName, labelLanguage));
-            }
-        }
-
-        return (Label[]) labels.toArray(new Label[labels.size()]);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTreeNode#getLabel(java.lang.String)
-     */
-    public Label getLabel(String xmlLanguage) {
-        Label label = null;
-        Label[] labels = getLabels();
-        String language = null;
-
-        for (int i = 0; i < labels.length; i++) {
-            language = labels[i].getLanguage();
-
-            // FIXME: This expression is too complicated
-            // considering there can no longer be any labels with
-            // a null language, i.e. each label must have a language.
-            if ((((xmlLanguage == null) || (xmlLanguage.equals(""))) && (language == null))
-                    || ((language != null) && (language.equals(xmlLanguage)))) {
-                label = labels[i];
-
-                break;
-            }
-        }
-
-        return label;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTreeNode#addLabel(org.apache.lenya.cms.site.Label)
-     */
-    public void addLabel(Label label) {
-        if (getLabel(label.getLanguage()) == null) {
-            // only add the label if there is no label with the same language
-            // yet.
-
-            NamespaceHelper helper = getNamespaceHelper();
-            Element labelElem = helper.createElement(SiteTreeNodeImpl.LABEL_NAME, label.getLabel());
-
-            labelElem.setAttribute(SiteTreeNodeImpl.LANGUAGE_ATTRIBUTE_NAME, label.getLanguage());
-
-            this.node.appendChild(labelElem);
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTreeNode#removeLabel(org.apache.lenya.cms.site.Label)
-     */
-    public void removeLabel(Label label) {
-        if (getLabel(label.getLanguage()) != null) {
-            // this node doesn't contain this label
-
-            NodeList children = this.node.getChildNodes();
-
-            for (int i = 0; i < children.getLength(); i++) {
-                Node child = children.item(i);
-
-                if ((child.getNodeType() == Node.ELEMENT_NODE)
-                        && child.getNodeName().equals(LABEL_NAME)) {
-
-                    Node languageAttribute = child.getAttributes()
-                            .getNamedItem(LANGUAGE_ATTRIBUTE_NAME);
-
-                    if (languageAttribute != null
-                            && languageAttribute.getNodeValue().equals(label.getLanguage())) {
-                        this.node.removeChild(child);
-                        break;
-                    }
-                }
-            }
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTreeNode#getHref()
-     */
-    public String getHref() {
-        Node attribute = this.node.getAttributes().getNamedItem(HREF_ATTRIBUTE_NAME);
-
-        if (attribute != null) {
-            return attribute.getNodeValue();
-        }
-        return null;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTreeNode#getSuffix()
-     */
-    public String getSuffix() {
-        Node attribute = this.node.getAttributes().getNamedItem(SUFFIX_ATTRIBUTE_NAME);
-
-        if (attribute != null) {
-            return attribute.getNodeValue();
-        }
-        return null;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTreeNode#hasLink()
-     */
-    public boolean hasLink() {
-        Node attribute = this.node.getAttributes().getNamedItem(LINK_ATTRIBUTE_NAME);
-
-        if (attribute != null) {
-            return attribute.getNodeValue().equals("true");
-        }
-        return false;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTreeNode#getChildren()
-     */
-    public SiteTreeNode[] getChildren() {
-        List childElements = new ArrayList();
-
-        NamespaceHelper helper = getNamespaceHelper();
-        Element[] elements = helper.getChildren((Element) this.node, SiteTreeNodeImpl.NODE_NAME);
-
-        for (int i = 0; i < elements.length; i++) {
-            SiteTreeNode newNode = new SiteTreeNodeImpl(elements[i]);
-            // FIXME: the if is a workaround
-            if (getLogger() != null)
-                ContainerUtil.enableLogging(newNode, getLogger());
-            childElements.add(newNode);
-        }
-
-        return (SiteTreeNode[]) childElements.toArray(new SiteTreeNode[childElements.size()]);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTreeNode#removeChildren()
-     */
-    public SiteTreeNode[] removeChildren() {
-        List childElements = new ArrayList();
-        NamespaceHelper helper = getNamespaceHelper();
-        Element[] elements = helper.getChildren((Element) this.node, SiteTreeNodeImpl.NODE_NAME);
-        for (int i = 0; i < elements.length; i++) {
-            this.node.removeChild(elements[i]);
-            SiteTreeNode newNode = new SiteTreeNodeImpl(elements[i]);
-            ContainerUtil.enableLogging(newNode, getLogger());
-            childElements.add(newNode);
-        }
-        return (SiteTreeNode[]) childElements.toArray(new SiteTreeNode[childElements.size()]);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTreeNode#getNextSiblings()
-     */
-    public SiteTreeNode[] getNextSiblings() {
-        List siblingElements = new ArrayList();
-
-        NamespaceHelper helper = getNamespaceHelper();
-        Element[] elements = helper
-                .getNextSiblings((Element) this.node, SiteTreeNodeImpl.NODE_NAME);
-
-        for (int i = 0; i < elements.length; i++) {
-            SiteTreeNode newNode = new SiteTreeNodeImpl(elements[i]);
-            ContainerUtil.enableLogging(newNode, getLogger());
-            siblingElements.add(newNode);
-        }
-
-        return (SiteTreeNode[]) siblingElements.toArray(new SiteTreeNode[siblingElements.size()]);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTreeNode#getPrecedingSiblings()
-     */
-    public SiteTreeNode[] getPrecedingSiblings() {
-        List siblingElements = new ArrayList();
-
-        NamespaceHelper helper = getNamespaceHelper();
-        Element[] elements = helper.getPrecedingSiblings((Element) this.node,
-                SiteTreeNodeImpl.NODE_NAME);
-
-        for (int i = 0; i < elements.length; i++) {
-            SiteTreeNode newNode = new SiteTreeNodeImpl(elements[i]);
-            ContainerUtil.enableLogging(newNode, getLogger());
-            siblingElements.add(newNode);
-        }
-
-        return (SiteTreeNode[]) siblingElements.toArray(new SiteTreeNode[siblingElements.size()]);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTreeNode#getNextSiblingDocumentId()
-     */
-    public String getNextSiblingDocumentId() {
-        SiteTreeNode[] siblings = getNextSiblings();
-        if (siblings != null && siblings.length > 0) {
-            return siblings[0].getAbsoluteId();
-        }
-        return null;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTreeNode#accept(org.apache.lenya.cms.site.tree.SiteTreeNodeVisitor)
-     */
-    public void accept(SiteTreeNodeVisitor visitor) throws DocumentException {
-        visitor.visitSiteTreeNode(this);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTreeNode#acceptSubtree(org.apache.lenya.cms.site.tree.SiteTreeNodeVisitor)
-     */
-    public void acceptSubtree(SiteTreeNodeVisitor visitor) throws DocumentException {
-        this.accept(visitor);
-        SiteTreeNode[] children = this.getChildren();
-        if (children == null) {
-            getLogger().info("The node " + this.getId() + " has no children");
-            return;
-        }
-        for (int i = 0; i < children.length; i++) {
-            children[i].acceptSubtree(visitor);
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTreeNode#acceptReverseSubtree(org.apache.lenya.cms.site.tree.SiteTreeNodeVisitor)
-     */
-    public void acceptReverseSubtree(SiteTreeNodeVisitor visitor) throws DocumentException {
-        List orderedNodes = this.postOrder();
-        for (int i = 0; i < orderedNodes.size(); i++) {
-            SiteTreeNode _node = (SiteTreeNode) orderedNodes.get(i);
-            _node.accept(visitor);
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTreeNode#postOrder()
-     */
-    public List postOrder() {
-        List list = new ArrayList();
-        SiteTreeNode[] children = this.getChildren();
-        for (int i = 0; i < children.length; i++) {
-            List orderedChildren = children[i].postOrder();
-            list.addAll(orderedChildren);
-        }
-        list.add(this);
-        return list;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTreeNode#setLabel(org.apache.lenya.cms.site.Label)
-     */
-    public void setLabel(Label label) {
-        Label existingLabel = getLabel(label.getLanguage());
-        if (existingLabel != null) {
-            removeLabel(existingLabel);
-        }
-        addLabel(label);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTreeNode#getChildren(java.lang.String)
-     */
-    public SiteTreeNode[] getChildren(String language) {
-        SiteTreeNode[] children = getChildren();
-        List languageChildren = new ArrayList();
-
-        for (int i = 0; i < children.length; i++) {
-            if (children[i].getLabel(language) != null) {
-                languageChildren.add(children[i]);
-            }
-        }
-
-        return (SiteTreeNode[]) languageChildren.toArray(new SiteTreeNode[languageChildren.size()]);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTreeNode#getParent()
-     */
-    public SiteTreeNode getParent() {
-        SiteTreeNode parent = null;
-
-        Node parentNode = this.node.getParentNode();
-        if (parentNode.getNodeType() == Node.ELEMENT_NODE
-                && parentNode.getLocalName().equals(NODE_NAME)) {
-            parent = new SiteTreeNodeImpl(parentNode);
-            ContainerUtil.enableLogging(parent, getLogger());
-        }
-
-        return parent;
-    }
-
-    /**
-     * Returns the namespace helper of the sitetree XML document.
-     * @return A namespace helper.
-     */
-    protected NamespaceHelper getNamespaceHelper() {
-        NamespaceHelper helper = new NamespaceHelper(DefaultSiteTree.NAMESPACE_URI, "", this.node
-                .getOwnerDocument());
-        return helper;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTreeNode#getParent(java.lang.String)
-     */
-    public SiteTreeNode getParent(String language) {
-        SiteTreeNode parent = getParent();
-
-        Label label = parent.getLabel(language);
-        if (label == null) {
-            parent = null;
-        }
-
-        return parent;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.tree.SiteTreeNode#preOrder()
-     */
-    public List preOrder() {
-        List list = new ArrayList();
-        list.add(this);
-        SiteTreeNode[] children = this.getChildren();
-        for (int i = 0; i < children.length; i++) {
-            List orderedChildren = children[i].preOrder();
-            list.addAll(orderedChildren);
-        }
-        return list;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/site/tree/SiteTreeNodeVisitor.java b/src/java/org/apache/lenya/cms/site/tree/SiteTreeNodeVisitor.java
deleted file mode 100644
index 8dcd83e..0000000
--- a/src/java/org/apache/lenya/cms/site/tree/SiteTreeNodeVisitor.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.site.tree;
-
-import org.apache.lenya.cms.publication.DocumentException;
-
-/**
- * Visitor interface to define operations performed on SiteTreeNode
- * (Visitor pattern)
- *
- */
-public interface SiteTreeNodeVisitor {
-
-	/**
-	 * Operation performed on a SiteTreeNode
-	 * @param node The SiteTreeNode.
-     * 
-     * @throws DocumentException if an error occurs
-	 */
-	void visitSiteTreeNode(SiteTreeNode node) throws DocumentException;
-
-}
diff --git a/src/java/org/apache/lenya/cms/site/tree/TreeSiteManager.java b/src/java/org/apache/lenya/cms/site/tree/TreeSiteManager.java
deleted file mode 100644
index a3ddd5f..0000000
--- a/src/java/org/apache/lenya/cms/site/tree/TreeSiteManager.java
+++ /dev/null
@@ -1,467 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.site.tree;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.avalon.framework.container.ContainerUtil;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentBuildException;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationException;
-import org.apache.lenya.cms.publication.util.DocumentSet;
-import org.apache.lenya.cms.site.AbstractSiteManager;
-import org.apache.lenya.cms.site.Label;
-import org.apache.lenya.cms.site.SiteException;
-import org.apache.lenya.cms.site.SiteStructure;
-import org.apache.lenya.transaction.IdentifiableFactory;
-
-/**
- * A tree-based site manager.
- * 
- * @version $Id$
- */
-public class TreeSiteManager extends AbstractSiteManager implements Serviceable {
-
-    /**
-     * Ctor.
-     */
-    public TreeSiteManager() {
-        // do nothing
-    }
-
-    /**
-     * Returns the sitetree for a specific area of this publication. Sitetrees are created on demand
-     * and are cached.
-     * @param map The document identity map.
-     * @param publication The publication.
-     * @param area The area.
-     * @return A site tree.
-     * @throws SiteException if an error occurs.
-     */
-    public SiteTree getTree(DocumentIdentityMap map, Publication publication, String area)
-            throws SiteException {
-
-        String key = getKey(publication, area);
-        DefaultSiteTree sitetree;
-        IdentifiableFactory factory = map.getFactory(SiteTree.IDENTIFIABLE_TYPE);
-        if (factory == null) {
-            factory = new SiteTreeFactory(this.manager);
-            ContainerUtil.enableLogging(factory, getLogger());
-            map.setFactory(SiteTree.IDENTIFIABLE_TYPE, factory);
-        }
-        sitetree = (DefaultSiteTree) map.get(SiteTree.IDENTIFIABLE_TYPE, key);
-
-        return sitetree;
-    }
-
-    protected SiteTree getTree(Document document) throws SiteException {
-        return getTree(document.getIdentityMap(), document.getPublication(), document.getArea());
-    }
-
-    /**
-     * Returns the ancestors of a resource, beginning with the parent.
-     * @param resource The resource.
-     * @return A list of resources.
-     * @throws SiteException if an error occurs.
-     */
-    protected List getAncestors(Document resource) throws SiteException {
-        List ancestors = new ArrayList();
-        Document parent;
-        try {
-            parent = resource.getIdentityMap().getParent(resource);
-            if (parent != null) {
-                String[] languages = parent.getLanguages();
-                for (int i = 0; i < languages.length; i++) {
-                    Document version = resource.getIdentityMap().getLanguageVersion(parent,
-                            languages[i]);
-                    ancestors.add(version);
-                }
-            }
-        } catch (Exception e) {
-            throw new SiteException(e);
-        }
-        if (parent != null) {
-            ancestors.addAll(getAncestors(parent));
-        }
-        return ancestors;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#requires(org.apache.lenya.cms.publication.Document,
-     *      org.apache.lenya.cms.publication.Document)
-     */
-    public boolean requires(Document dependingResource, Document requiredResource)
-            throws SiteException {
-        return getAncestors(dependingResource).contains(requiredResource);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#getRequiredResources(org.apache.lenya.cms.publication.Document)
-     */
-    public Document[] getRequiredResources(Document resource) throws SiteException {
-        List ancestors = getAncestors(resource);
-        return (Document[]) ancestors.toArray(new Document[ancestors.size()]);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#getRequiringResources(org.apache.lenya.cms.publication.Document)
-     */
-    public Document[] getRequiringResources(Document resource) throws SiteException {
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Obtaining requiring resources of [" + resource + "]");
-        }
-
-        DocumentSet resources = new DocumentSet();
-        SiteTree tree = getTree(resource);
-
-        SiteTreeNode node = tree.getNode(resource.getId());
-        if (node != null) {
-            List preOrder = node.preOrder();
-
-            // remove original resource (does not require itself)
-            preOrder.remove(0);
-
-            try {
-                for (int i = 0; i < preOrder.size(); i++) {
-                    SiteTreeNode descendant = (SiteTreeNode) preOrder.get(i);
-                    Label[] labels = descendant.getLabels();
-                    for (int j = 0; j < labels.length; j++) {
-                        Document version = resource.getIdentityMap().get(resource.getPublication(),
-                                resource.getArea(),
-                                descendant.getAbsoluteId(),
-                                labels[j].getLanguage());
-                        resources.add(version);
-                        if (getLogger().isDebugEnabled()) {
-                            getLogger().debug("    Descendant: [" + version + "]");
-                        }
-                    }
-                }
-            } catch (PublicationException e) {
-                throw new SiteException(e);
-            }
-
-            if (getLogger().isDebugEnabled()) {
-                getLogger().debug("Obtaining requiring resources completed.");
-            }
-        }
-
-        return resources.getDocuments();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#contains(org.apache.lenya.cms.publication.Document)
-     */
-    public boolean contains(Document resource) throws SiteException {
-        SiteTree tree = getTree(resource);
-        SiteTreeNode node = tree.getNode(resource.getId());
-        return node != null && node.getLabel(resource.getLanguage()) != null;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#containsInAnyLanguage(org.apache.lenya.cms.publication.Document)
-     */
-    public boolean containsInAnyLanguage(Document resource) throws SiteException {
-        SiteTree tree = getTree(resource);
-        SiteTreeNode node = tree.getNode(resource.getId());
-        return node != null;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#copy(org.apache.lenya.cms.publication.Document,
-     *      org.apache.lenya.cms.publication.Document)
-     */
-    public void copy(Document sourceDocument, Document destinationDocument) throws SiteException {
-        SiteTree sourceTree = getTree(sourceDocument);
-        SiteTree destinationTree = getTree(destinationDocument);
-
-        SiteTreeNode sourceNode = sourceTree.getNode(sourceDocument.getId());
-        if (sourceNode == null) {
-            throw new SiteException("The node for source document [" + sourceDocument.getId()
-                    + "] doesn't exist!");
-        }
-
-        SiteTreeNode[] siblings = sourceNode.getNextSiblings();
-        SiteTreeNode parent = sourceNode.getParent();
-        String parentId = "";
-        if (parent != null) {
-            parentId = parent.getAbsoluteId();
-        }
-        SiteTreeNode sibling = null;
-        String siblingDocId = null;
-
-        // same document ID -> insert at the same position
-        if (sourceDocument.getId().equals(destinationDocument.getId())) {
-            for (int i = 0; i < siblings.length; i++) {
-                String docId = parentId + "/" + siblings[i].getId();
-                sibling = destinationTree.getNode(docId);
-                if (sibling != null) {
-                    siblingDocId = docId;
-                    break;
-                }
-            }
-        }
-
-        Label label = sourceNode.getLabel(sourceDocument.getLanguage());
-        if (label == null) {
-            // the node that we're trying to publish
-            // doesn't have this language
-            throw new SiteException("The node " + sourceDocument.getId()
-                    + " doesn't contain a label for language " + sourceDocument.getLanguage());
-        }
-        SiteTreeNode destinationNode = destinationTree.getNode(destinationDocument.getId());
-        if (destinationNode == null) {
-            Label[] labels = { label };
-
-            if (siblingDocId == null) {
-                destinationTree.addNode(destinationDocument.getId(),
-                        labels,
-                        sourceNode.getHref(),
-                        sourceNode.getSuffix(),
-                        sourceNode.hasLink());
-            } else {
-                destinationTree.addNode(destinationDocument.getId(),
-                        labels,
-                        sourceNode.getHref(),
-                        sourceNode.getSuffix(),
-                        sourceNode.hasLink(),
-                        siblingDocId);
-            }
-
-        } else {
-            // if the node already exists in the live
-            // tree simply insert the label in the
-            // live tree
-            destinationTree.setLabel(destinationDocument.getId(), label);
-        }
-
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#delete(org.apache.lenya.cms.publication.Document)
-     */
-    public void delete(Document document) throws SiteException {
-        SiteTree tree = getTree(document.getIdentityMap(), document.getPublication(), document
-                .getArea());
-
-        SiteTreeNode node = tree.getNode(document.getId());
-
-        if (node == null) {
-            throw new SiteException("Sitetree node for document [" + document + "] does not exist!");
-        }
-
-        Label label = node.getLabel(document.getLanguage());
-
-        if (label == null) {
-            throw new SiteException("Sitetree label for document [" + document + "] in language ["
-                    + document.getLanguage() + "]does not exist!");
-        }
-
-        if (node.getLabels().length == 1 && node.getChildren().length > 0) {
-            throw new SiteException("Cannot delete last language version of document [" + document
-                    + "] because this node has children.");
-        }
-
-        node.removeLabel(label);
-
-        if (node.getLabels().length == 0) {
-            tree.removeNode(document.getId());
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#getLabel(org.apache.lenya.cms.publication.Document)
-     */
-    public String getLabel(Document document) throws SiteException {
-        Label label = getLabelObject(document);
-        return label.getLabel();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#setLabel(org.apache.lenya.cms.publication.Document,
-     *      java.lang.String)
-     */
-    public void setLabel(Document document, String label) throws SiteException {
-        Label labelObject = getLabelObject(document);
-        labelObject.setLabel(label);
-
-        SiteTree tree = getTree(document);
-        tree.setLabel(document.getId(), labelObject);
-    }
-
-    /**
-     * Returns the label object of a document.
-     * @param document The document.
-     * @return A label.
-     * @throws SiteException if an error occurs.
-     */
-    protected Label getLabelObject(Document document) throws SiteException {
-        Label label = null;
-        SiteTree siteTree = getTree(document);
-        if (siteTree != null) {
-            SiteTreeNode node = siteTree.getNode(document.getId());
-            if (node == null) {
-                throw new SiteException("Node for document [" + document + "] does not exist!");
-            }
-            label = node.getLabel(document.getLanguage());
-        }
-
-        if (label == null) {
-            throw new SiteException("The label of document [" + document + "] is null!");
-        }
-
-        return label;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#getDocuments(org.apache.lenya.cms.publication.DocumentIdentityMap,
-     *      org.apache.lenya.cms.publication.Publication, java.lang.String)
-     */
-    public Document[] getDocuments(DocumentIdentityMap map, Publication publication, String area)
-            throws SiteException {
-        try {
-            List allNodes = getTree(map, publication, area).getNode("/").preOrder();
-            Document[] documents = new Document[allNodes.size() - 1];
-
-            for (int i = 1; i < allNodes.size(); i++) {
-                SiteTreeNode node = (SiteTreeNode) allNodes.get(i);
-                documents[i - 1] = map.get(publication, area, node.getAbsoluteId());
-            }
-            return documents;
-        } catch (DocumentBuildException e) {
-            throw new SiteException(e);
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#add(org.apache.lenya.cms.publication.Document)
-     */
-    public void add(Document document) throws SiteException {
-
-        if (contains(document)) {
-            throw new SiteException("The document [" + document + "] is already contained!");
-        }
-        SiteTree tree = getTree(document);
-        Label label = new Label("", document.getLanguage());
-
-        SiteTreeNode node = tree.getNode(document.getId());
-        if (node == null) {
-            Label[] labels = { label };
-            tree.addNode(document.getId(), labels, null, null, false);
-        } else {
-            tree.addLabel(document.getId(), label);
-        }
-
-    }
-
-    /**
-     * @param publication The publication.
-     * @param area The area.
-     * @return The key to store sitetree objects in the identity map.
-     */
-    protected String getKey(Publication publication, String area) {
-        return publication.getId() + ":" + area;
-    }
-
-    protected ServiceManager manager;
-
-    /**
-     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service(ServiceManager manager) throws ServiceException {
-        this.manager = manager;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#getSiteStructure(org.apache.lenya.cms.publication.DocumentIdentityMap,
-     *      org.apache.lenya.cms.publication.Publication, java.lang.String)
-     */
-    public SiteStructure getSiteStructure(DocumentIdentityMap map,
-            Publication publiation,
-            String area) throws SiteException {
-        return getTree(map, publiation, area);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.SiteManager#getAvailableDocument(org.apache.lenya.cms.publication.Document)
-     */
-    public Document getAvailableDocument(Document document) throws SiteException {
-        String availableDocumentId = computeUniqueDocumentId(document);
-        Document availableDocument;
-        try {
-            availableDocument = document.getIdentityMap().get(document.getPublication(),
-                    document.getArea(),
-                    availableDocumentId,
-                    document.getLanguage());
-        } catch (DocumentBuildException e) {
-            throw new SiteException(e);
-        }
-        return availableDocument;
-    }
-
-    /**
-     * compute an unique document id
-     * @param document The document.
-     * @return the unique documentid
-     * @throws SiteException if an error occurs.
-     */
-    protected String computeUniqueDocumentId(Document document) throws SiteException {
-        String documentId = document.getId();
-
-        SiteTree tree = getTree(document);
-
-        SiteTreeNode node = tree.getNode(documentId);
-        String suffix = null;
-        int version = 0;
-        String idwithoutsuffix = null;
-
-        if (node != null) {
-            int n = documentId.lastIndexOf("/");
-            String lastToken = "";
-            String substring = documentId;
-            if ((n < documentId.length()) && (n > 0)) {
-                lastToken = documentId.substring(n);
-                substring = documentId.substring(0, n);
-            }
-
-            int l = lastToken.length();
-            int index = lastToken.lastIndexOf("-");
-            if (0 < index && index < l) {
-                suffix = lastToken.substring(index + 1);
-                idwithoutsuffix = substring + lastToken.substring(0, index);
-                version = Integer.parseInt(suffix);
-            } else {
-                idwithoutsuffix = substring + lastToken;
-            }
-
-            while (node != null) {
-                version = version + 1;
-                documentId = idwithoutsuffix + "-" + version;
-                node = tree.getNode(documentId);
-            }
-        }
-
-        return documentId;
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/site/usecases/Archive.java b/src/java/org/apache/lenya/cms/site/usecases/Archive.java
deleted file mode 100644
index 19cd82b..0000000
--- a/src/java/org/apache/lenya/cms/site/usecases/Archive.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site.usecases;
-
-import org.apache.lenya.cms.publication.Publication;
-
-/**
- * Archive usecase handler.
- * 
- * @version $Id:$
- */
-public class Archive extends MoveSubsite {
-
-    /**
-     * @see org.apache.lenya.cms.site.usecases.MoveSubsite#getSourceAreas()
-     */
-    protected String[] getSourceAreas() {
-        return new String[] { Publication.AUTHORING_AREA };
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.usecases.MoveSubsite#getTargetArea()
-     */
-    protected String getTargetArea() {
-        return Publication.ARCHIVE_AREA;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.usecases.MoveSubsite#getEvent()
-     */
-    protected String getEvent() {
-        return "delete";
-    }
-
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/site/usecases/Assets.java b/src/java/org/apache/lenya/cms/site/usecases/Assets.java
deleted file mode 100644
index 859d3e3..0000000
--- a/src/java/org/apache/lenya/cms/site/usecases/Assets.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site.usecases;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.apache.cocoon.servlet.multipart.Part;
-
-import org.apache.lenya.cms.publication.Resource;
-import org.apache.lenya.cms.publication.ResourcesManager;
-import org.apache.lenya.cms.site.usecases.SiteUsecase;
-import org.apache.lenya.cms.usecase.UsecaseException;
-import org.apache.lenya.transaction.Transactionable;
-
-/**
- * Usecase to add Assets to a resource.
- * 
- * @version $Id$
- */
-public class Assets extends SiteUsecase {
-
-    /**
-     * Validates the request parameters.
-     * @throws UsecaseException if an error occurs.
-     */
-    void validate() throws UsecaseException {
-        String title = getParameterAsString("title");
-
-        if (title.length() == 0) {
-            addErrorMessage("Please enter a title.");
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckExecutionConditions()
-     */
-    protected void doCheckExecutionConditions() throws Exception {
-        if (getParameter("delete") == null) {
-            validate();
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#initParameters()
-     */
-    protected void initParameters() {
-        super.initParameters();
-
-        ResourcesManager resourcesManager = null;
-
-        try {
-            resourcesManager = (ResourcesManager) this.manager.lookup(ResourcesManager.ROLE);
-            Resource[] resources = resourcesManager.getResources(getSourceDocument());
-            setParameter("assets", Arrays.asList(resources));
-        } catch (final Exception e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (resourcesManager != null) {
-                this.manager.release(resourcesManager);
-            }
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-
-        if (getParameter("delete") == null) {
-            addAsset();
-        } else {
-            deleteAsset();
-        }
-    }
-
-    /**
-     * Deletes an asset.
-     * @throws Exception if an error occurs.
-     */
-    protected void deleteAsset() throws Exception {
-        String assetName = getParameterAsString("delete");
-        ResourcesManager resourcesManager = null;
-        try {
-
-            // Retrieve the resource instance via the ResourcesManager
-            resourcesManager = (ResourcesManager) 
-                this.manager.lookup(ResourcesManager.ROLE);
-            Resource theResource = 
-                resourcesManager.getResource(getSourceDocument(), assetName);
-            if (theResource == null)
-                throw new Exception("no such resource [" + assetName + "] exists for document [ " + getSourceDocument().getId() + "]");
-
-            // Lock the resource nodes
-            List nodes = new ArrayList();
-            nodes.addAll(Arrays.asList(theResource.getRepositoryNodes()));
-            lockInvolvedObjects((Transactionable[])nodes.toArray(new Transactionable[nodes.size()]));
-
-            // Delete the resource
-            resourcesManager.deleteResource(theResource);
-
-        } catch (final Exception e) {
-            getLogger().error("The resource could not be deleted: ", e);
-            addErrorMessage("The resource could not be deleted (see log files for details).");
-        } finally {
-            if (resourcesManager != null) {
-                this.manager.release(resourcesManager);
-            }
-        }
-    }
-
-    /**
-     * Adds an asset.
-     */
-    protected void addAsset() {
-
-        if (getLogger().isDebugEnabled())
-            getLogger().debug("Assets::addAsset() called");
-
-        String title = getParameterAsString("title");
-        String creator = getParameterAsString("creator");
-        String rights = getParameterAsString("rights");
-        Part file = getPart("file");
-
-        Map metadata = new HashMap();
-        metadata.put("title", title);
-        metadata.put("creator", creator);
-        metadata.put("rights", rights);
-        ResourcesManager resourcesManager = null;
-        try {
-            resourcesManager = (ResourcesManager) this.manager.lookup(ResourcesManager.ROLE);
-            resourcesManager.addResource(getSourceDocument(), file, metadata);
-        } catch (final Exception e) {
-            getLogger().error("The resource could not be added: ", e);
-            addErrorMessage("The resource could not be added (see log files for details).");
-        } finally {
-            if (resourcesManager != null) {
-                this.manager.release(resourcesManager);
-            }
-        }
-
-        if (getLogger().isDebugEnabled())
-            getLogger().debug("Assets::addAsset() done.");
-
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/site/usecases/ChangeLabel.java b/src/java/org/apache/lenya/cms/site/usecases/ChangeLabel.java
deleted file mode 100644
index 7bd4ae6..0000000
--- a/src/java/org/apache/lenya/cms/site/usecases/ChangeLabel.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site.usecases;
-
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.site.SiteManager;
-import org.apache.lenya.cms.site.SiteStructure;
-import org.apache.lenya.cms.usecase.DocumentUsecase;
-import org.apache.lenya.cms.usecase.UsecaseException;
-import org.apache.lenya.transaction.Transactionable;
-
-/**
- * Change the label of a document.
- * 
- * @version $Id$
- */
-public class ChangeLabel extends DocumentUsecase {
-
-    protected static final String LABEL = "label";
-    protected static final String DOCUMENT_ID = "documentId";
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckPreconditions()
-     */
-    protected void doCheckPreconditions() throws Exception {
-        super.doCheckPreconditions();
-        if (hasErrors()) {
-            return;
-        }
-
-        if (!getSourceDocument().getArea().equals(Publication.AUTHORING_AREA)) {
-            addErrorMessage("This usecase can only be invoked in the authoring area!");
-        } else if (!getSourceDocument().exists()) {
-            addErrorMessage("This usecase can only be invoked on existing documents.");
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#getObjectsToLock()
-     */
-    protected Transactionable[] getObjectsToLock() throws UsecaseException {
-        SiteManager siteManager = null;
-        ServiceSelector selector = null;
-        try {
-            Document doc = getSourceDocument();
-            selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
-            siteManager = (SiteManager) selector.select(doc.getPublication().getSiteManagerHint());
-            SiteStructure structure = siteManager.getSiteStructure(doc.getIdentityMap(), doc
-                    .getPublication(), doc.getArea());
-            Transactionable[] objects = { structure.getRepositoryNode() };
-            return objects;
-        } catch (Exception e) {
-            throw new UsecaseException(e);
-        } finally {
-            if (selector != null) {
-                if (siteManager != null) {
-                    selector.release(siteManager);
-                }
-                this.manager.release(selector);
-            }
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#initParameters()
-     */
-    protected void initParameters() {
-        super.initParameters();
-        Document document = getSourceDocument();
-
-        ServiceSelector selector = null;
-        SiteManager siteManager = null;
-        try {
-            selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
-            siteManager = (SiteManager) selector.select(document.getPublication()
-                    .getSiteManagerHint());
-
-            if (document.exists()) {
-                setParameter(DOCUMENT_ID, document.getId());
-                setParameter(LABEL, siteManager.getLabel(document));
-            }
-        } catch (final Exception e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (selector != null) {
-                if (siteManager != null) {
-                    selector.release(siteManager);
-                }
-                this.manager.release(selector);
-            }
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-
-        Document document = getSourceDocument();
-        ServiceSelector selector = null;
-        SiteManager siteManager = null;
-        try {
-            selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
-            siteManager = (SiteManager) selector.select(document.getPublication()
-                    .getSiteManagerHint());
-
-            String label = getParameterAsString(LABEL);
-            siteManager.setLabel(document, label);
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (selector != null) {
-                if (siteManager != null) {
-                    selector.release(siteManager);
-                }
-                this.manager.release(selector);
-            }
-        }
-
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/site/usecases/ChangeNodeID.java b/src/java/org/apache/lenya/cms/site/usecases/ChangeNodeID.java
deleted file mode 100644
index a046612..0000000
--- a/src/java/org/apache/lenya/cms/site/usecases/ChangeNodeID.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site.usecases;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentBuildException;
-import org.apache.lenya.cms.publication.DocumentException;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.DocumentManager;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationException;
-import org.apache.lenya.cms.site.SiteManager;
-import org.apache.lenya.cms.site.SiteStructure;
-import org.apache.lenya.cms.usecase.DocumentUsecase;
-import org.apache.lenya.cms.usecase.UsecaseException;
-import org.apache.lenya.transaction.TransactionException;
-import org.apache.lenya.transaction.Transactionable;
-
-/**
- * Change the node ID of a document.
- * 
- * @version $Id$
- */
-public class ChangeNodeID extends DocumentUsecase {
-
-    protected static final String NODE_ID = "nodeId";
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#initParameters()
-     */
-    protected void initParameters() {
-        super.initParameters();
-        Document document = getSourceDocument();
-        if (document != null) {
-            setParameter(NODE_ID, document.getName());
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#getObjectsToLock()
-     */
-    protected Transactionable[] getObjectsToLock() throws UsecaseException {
-        super.lockInvolvedObjects();
-
-        SiteManager siteManager = null;
-        ServiceSelector selector = null;
-        try {
-            Document doc = getSourceDocument();
-            selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
-            siteManager = (SiteManager) selector.select(doc.getPublication().getSiteManagerHint());
-            SiteStructure structure = siteManager.getSiteStructure(doc.getIdentityMap(), doc
-                    .getPublication(), doc.getArea());
-
-            List objects = new ArrayList();
-            objects.add(structure.getRepositoryNode());
-            objects.addAll(getAllLanguageVersionNodes(doc));
-            return (Transactionable[]) objects.toArray(new Transactionable[objects.size()]);
-        } catch (Exception e) {
-            throw new UsecaseException(e);
-        } finally {
-            if (selector != null) {
-                if (siteManager != null) {
-                    selector.release(siteManager);
-                }
-                this.manager.release(selector);
-            }
-        }
-    }
-
-    protected List getAllLanguageVersionNodes(Document doc) throws DocumentException,
-            TransactionException, DocumentBuildException {
-        String[] languages = doc.getLanguages();
-        List nodes = new ArrayList();
-        for (int i = 0; i < languages.length; i++) {
-            nodes.addAll(Arrays.asList(doc.getIdentityMap().getLanguageVersion(doc, languages[i])
-                    .getRepositoryNodes()));
-        }
-        return nodes;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckPreconditions()
-     */
-    protected void doCheckPreconditions() throws Exception {
-        super.doCheckPreconditions();
-        if (hasErrors()) {
-            return;
-        }
-
-        if (!getSourceDocument().getArea().equals(Publication.AUTHORING_AREA)) {
-            addErrorMessage("This usecase can only be invoked in the authoring area!");
-        } else {
-            Document liveVersion = getDocumentIdentityMap().getAreaVersion(getSourceDocument(),
-                    Publication.LIVE_AREA);
-            if (liveVersion.exists()) {
-                addErrorMessage("This usecase cannot be invoked when the live version exists!");
-            }
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckExecutionConditions()
-     */
-    protected void doCheckExecutionConditions() throws Exception {
-        super.doCheckExecutionConditions();
-
-        DocumentIdentityMap identityMap = getSourceDocument().getIdentityMap();
-
-        String nodeId = getParameterAsString(NODE_ID);
-        DocumentManager documentManager = null;
-        try {
-            documentManager = (DocumentManager) this.manager.lookup(DocumentManager.ROLE);
-            if (!documentManager.isValidDocumentName(nodeId)) {
-                addErrorMessage("The document ID is not valid.");
-            } else {
-                Document parent = identityMap.getParent(getSourceDocument());
-                Publication publication = getSourceDocument().getPublication();
-                Document document = identityMap.get(publication,
-                        getSourceDocument().getArea(),
-                        parent.getId() + "/" + nodeId,
-                        getSourceDocument().getLanguage());
-                if (document.exists()) {
-                    addErrorMessage("The document does already exist.");
-                }
-            }
-        } finally {
-            if (documentManager != null) {
-                this.manager.release(documentManager);
-            }
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-
-        Document document = getSourceDocument();
-        Document newDocument = moveAllLanguageVersions(document);
-
-        LinkRewriter rewriter = null;
-        try {
-            rewriter = (LinkRewriter) this.manager.lookup(LinkRewriter.ROLE);
-            rewriter.rewriteLinks(document, newDocument);
-        } finally {
-            if (rewriter != null) {
-                this.manager.release(rewriter);
-            }
-        }
-
-        setTargetDocument(newDocument);
-    }
-
-    /**
-     * Moves all language versions of a document.
-     * @param document The document.
-     * @return The moved version of the document.
-     * @throws DocumentException if an error occurs.
-     * @throws DocumentBuildException if an error occurs.
-     * @throws PublicationException if an error occurs.
-     * @throws ServiceException if an access error to a an Avalon service occurs
-     */
-    protected Document moveAllLanguageVersions(Document document) throws DocumentException,
-            DocumentBuildException, PublicationException, ServiceException {
-        Document newDocument = null;
-
-        DocumentIdentityMap identityMap = document.getIdentityMap();
-        String newDocumentId = getNewDocumentId();
-
-        String[] availableLanguages = document.getLanguages();
-
-        DocumentManager documentManager = null;
-        try {
-            documentManager = (DocumentManager) this.manager.lookup(DocumentManager.ROLE);
-            for (int i = 0; i < availableLanguages.length; i++) {
-                Document languageVersion = identityMap.get(document.getPublication(), document
-                        .getArea(), document.getId(), availableLanguages[i]);
-
-                Document newLanguageVersion = identityMap.get(document.getPublication(), document
-                        .getArea(), newDocumentId, availableLanguages[i]);
-
-                Transactionable[] nodes = newLanguageVersion.getRepositoryNodes();
-                for (int j = 0; j < nodes.length; j++) {
-                    nodes[j].lock();
-                }
-                documentManager.move(languageVersion, newLanguageVersion);
-
-                if (availableLanguages[i].equals(document.getLanguage())) {
-                    newDocument = newLanguageVersion;
-                }
-            }
-        } catch (TransactionException e) {
-            throw new PublicationException(e);
-        } finally {
-            if (documentManager != null) {
-                this.manager.release(documentManager);
-            }
-        }
-
-        return newDocument;
-    }
-
-    /**
-     * Returns the resulting document when the node ID would be changed.
-     * @return A document.
-     */
-    protected String getNewDocumentId() {
-        String nodeId = getParameterAsString(NODE_ID);
-
-        Document document = getSourceDocument();
-
-        String oldDocumentId = document.getId();
-        int lastSlashIndex = oldDocumentId.lastIndexOf("/");
-        String strippedDocumentId = oldDocumentId.substring(0, lastSlashIndex + 1);
-        String newDocumentId = strippedDocumentId + nodeId;
-
-        return newDocumentId;
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/site/usecases/Clipboard.java b/src/java/org/apache/lenya/cms/site/usecases/Clipboard.java
deleted file mode 100644
index 821fe2e..0000000
--- a/src/java/org/apache/lenya/cms/site/usecases/Clipboard.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site.usecases;
-
-import org.apache.avalon.framework.logger.ConsoleLogger;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentBuildException;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationException;
-import org.apache.lenya.cms.publication.PublicationFactory;
-
-/**
- * Clipboard for cut/copy/paste of documents. The clipping method is either {@link #METHOD_CUT}or
- * {@link #METHOD_COPY}.
- * 
- * @version $Id$
- */
-public class Clipboard {
-
-    private String publicationId;
-    private String servletContextPath;
-    private String area;
-    private String documentId;
-    private String language;
-    private int method;
-
-    protected static final int METHOD_CUT = 0;
-    protected static final int METHOD_COPY = 1;
-
-    /**
-     * Ctor.
-     * @param document The document to put on the clipboard.
-     * @param _method The clipping method.
-     */
-    public Clipboard(Document document, int _method) {
-        this.publicationId = document.getPublication().getId();
-        this.servletContextPath = document.getPublication().getServletContext().getAbsolutePath();
-        this.area = document.getArea();
-        this.documentId = document.getId();
-        this.language = document.getLanguage();
-        this.method = _method;
-    }
-
-    /**
-     * Returns the document for the current identity map.
-     * @param identityMap The identity map.
-     * @return A document.
-     * @throws DocumentBuildException if the document could not be built.
-     */
-    public Document getDocument(DocumentIdentityMap identityMap) throws DocumentBuildException {
-
-        PublicationFactory factory = PublicationFactory.getInstance(new ConsoleLogger());
-        Publication publication;
-        try {
-            publication = factory.getPublication(this.publicationId, this.servletContextPath);
-        } catch (PublicationException e) {
-            throw new RuntimeException(e);
-        }
-        Document document = identityMap.get(publication, this.area, this.documentId, this.language);
-        return document;
-    }
-
-    /**
-     * @return The ID of the publication the document belongs to.
-     */
-    public String getPublicationId() {
-        return this.publicationId;
-    }
-
-    /**
-     * Returns the method of this clipboard.
-     * @return An integer.
-     */
-    public int getMethod() {
-        return this.method;
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/site/usecases/ClipboardHelper.java b/src/java/org/apache/lenya/cms/site/usecases/ClipboardHelper.java
deleted file mode 100644
index 7761925..0000000
--- a/src/java/org/apache/lenya/cms/site/usecases/ClipboardHelper.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site.usecases;
-
-import java.util.Map;
-
-import org.apache.avalon.framework.context.Context;
-import org.apache.cocoon.components.ContextHelper;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.environment.Session;
-
-/**
- * Helper class for clipboard handling.
- * 
- * @version $Id:$
- */
-public class ClipboardHelper {
-
-    /**
-     * Returns the clipboard attachted to the session.
-     * @param context The context containing the session.
-     * @return A clipboard or <code>null</code> if no clipboard is attached to
-     *         the session.
-     */
-    public Clipboard getClipboard(Context context) {
-        Session session = getSession(context);
-        Clipboard clipboard = (Clipboard) session.getAttribute(getSessionAttributeName());
-        return clipboard;
-    }
-    
-    /**
-     * @return The name of the session attribute to hold the clipboard.
-     */
-    protected String getSessionAttributeName() {
-        return Clipboard.class.getName();
-    }
-
-    /**
-     * @param context The context.
-     * @return The session of the context.
-     */
-    protected Session getSession(Context context) {
-        Map objectModel = ContextHelper.getObjectModel(context);
-        Request request = ObjectModelHelper.getRequest(objectModel);
-        Session session = request.getSession(true);
-        return session;
-    }
-
-    /**
-     * Saves the clipboard to the session.
-     * @param context The context.
-     * @param clipboard The clipboard.
-     */
-    public void saveClipboard(Context context, Clipboard clipboard) {
-        Session session = getSession(context);
-        session.setAttribute(getSessionAttributeName(), clipboard);
-    }
-    
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/site/usecases/Copy.java b/src/java/org/apache/lenya/cms/site/usecases/Copy.java
deleted file mode 100644
index c054146..0000000
--- a/src/java/org/apache/lenya/cms/site/usecases/Copy.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site.usecases;
-
-import org.apache.lenya.cms.usecase.DocumentUsecase;
-
-/**
- * Copy a document into the clipboard.
- * 
- * @version $Id:$
- */
-public class Copy extends DocumentUsecase {
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-        
-        Clipboard clipboard = new Clipboard(getSourceDocument(), Clipboard.METHOD_COPY);
-        ClipboardHelper helper = new ClipboardHelper();
-        helper.saveClipboard(getContext(), clipboard);
-    }
-    
-}
diff --git a/src/java/org/apache/lenya/cms/site/usecases/Create.java b/src/java/org/apache/lenya/cms/site/usecases/Create.java
deleted file mode 100644
index 45ed360..0000000
--- a/src/java/org/apache/lenya/cms/site/usecases/Create.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site.usecases;
-
-import java.text.SimpleDateFormat;
-import java.util.GregorianCalendar;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.cocoon.components.ContextHelper;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.environment.Session;
-import org.apache.lenya.ac.Identity;
-import org.apache.lenya.ac.User;
-import org.apache.lenya.cms.metadata.dublincore.DublinCore;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentException;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.DocumentManager;
-import org.apache.lenya.cms.publication.DocumentType;
-import org.apache.lenya.cms.publication.DocumentTypeBuilder;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationException;
-import org.apache.lenya.cms.publication.PublicationFactory;
-import org.apache.lenya.cms.publication.URLInformation;
-import org.apache.lenya.cms.site.SiteException;
-import org.apache.lenya.cms.site.SiteStructure;
-import org.apache.lenya.cms.site.SiteUtil;
-import org.apache.lenya.cms.usecase.AbstractUsecase;
-import org.apache.lenya.cms.usecase.UsecaseException;
-import org.apache.lenya.transaction.Transactionable;
-
-/**
- * Abstract superclass for usecases to create a document.
- * 
- * @version $Id$
- */
-public abstract class Create extends AbstractUsecase {
-
-    protected static final String LANGUAGE = "language";
-    protected static final String LANGUAGES = "languages";
-    protected static final String DOCUMENT_ID = "documentId";
-
-    /**
-     * Ctor.
-     */
-    public Create() {
-        super();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckPreconditions()
-     */
-    protected void doCheckPreconditions() throws Exception {
-        super.doCheckPreconditions();
-
-        if (!getArea().equals(Publication.AUTHORING_AREA)) {
-            addErrorMessage("This usecase can only be invoked in the authoring area!");
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#getObjectsToLock()
-     */
-    protected Transactionable[] getObjectsToLock() throws UsecaseException {
-        try {
-            SiteStructure structure = SiteUtil.getSiteStructure(this.manager, getSourceDocument());
-            Transactionable[] nodes = { structure.getRepositoryNode() };
-            return nodes;
-        } catch (SiteException e) {
-            throw new UsecaseException(e);
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckExecutionConditions()
-     */
-    protected void doCheckExecutionConditions() throws Exception {
-        String navigationTitle = getParameterAsString(DublinCore.ELEMENT_TITLE);
-
-        if (navigationTitle.equals("")) {
-            addErrorMessage("The navigation title is required.");
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-
-        // create new document
-        DocumentManager documentManager = null;
-        DocumentTypeBuilder documentTypeBuilder = null;
-        try {
-
-            documentTypeBuilder = (DocumentTypeBuilder) this.manager
-                    .lookup(DocumentTypeBuilder.ROLE);
-
-            documentManager = (DocumentManager) this.manager.lookup(DocumentManager.ROLE);
-
-            DocumentIdentityMap map = (DocumentIdentityMap) getUnitOfWork().getIdentityMap();
-            Document document = map.get(getPublication(),
-                    getArea(),
-                    getNewDocumentId(),
-                    getParameterAsString(LANGUAGE));
-
-            Document initialDocument = getInitialDocument();
-            if (initialDocument == null) {
-                DocumentType documentType = documentTypeBuilder
-                        .buildDocumentType(getDocumentTypeName(), getPublication());
-                documentManager.add(document,
-                        documentType,
-                        getParameterAsString(DublinCore.ELEMENT_TITLE),
-                        null);
-            } else {
-                documentManager.add(document,
-                        initialDocument,
-                        getParameterAsString(DublinCore.ELEMENT_TITLE),
-                        null);
-            }
-
-            setMetaData(document);
-
-            // the location to navigate to after completion of usecase
-            setTargetURL(document.getCanonicalWebappURL());
-
-        } finally {
-            if (documentManager != null) {
-                this.manager.release(documentManager);
-            }
-            if (documentTypeBuilder != null) {
-                this.manager.release(documentTypeBuilder);
-            }
-        }
-
-    }
-
-    /**
-     * @return the name of the document being created in the usecase
-     */
-    protected abstract String getNewDocumentName();
-
-    /**
-     * @return the id of the new document being created in the usecase
-     */
-    protected abstract String getNewDocumentId();
-
-    /**
-     * If the document created in the usecase shall have initial contents copied from an existing
-     * document, construct that document in this method.
-     * 
-     * @return A document.
-     */
-    protected Document getInitialDocument() {
-        return null;
-    }
-
-    /**
-     * @return The type of the created document.
-     */
-    protected abstract String getDocumentTypeName();
-
-    /**
-     * Sets the meta data of the created document.
-     * @param document The document.
-     * @throws DocumentException if an error occurs.
-     */
-    protected void setMetaData(Document document) throws DocumentException {
-
-        if (document == null)
-            throw new IllegalArgumentException("parameter document may not be null");
-
-        Map dcMetaData = new HashMap();
-        dcMetaData.put(DublinCore.ELEMENT_TITLE, getParameterAsString(DublinCore.ELEMENT_TITLE));
-        dcMetaData
-                .put(DublinCore.ELEMENT_CREATOR, getParameterAsString(DublinCore.ELEMENT_CREATOR));
-        dcMetaData.put(DublinCore.ELEMENT_PUBLISHER,
-                getParameterAsString(DublinCore.ELEMENT_PUBLISHER));
-        dcMetaData
-                .put(DublinCore.ELEMENT_SUBJECT, getParameterAsString(DublinCore.ELEMENT_SUBJECT));
-        dcMetaData.put(DublinCore.ELEMENT_DATE, getParameterAsString(DublinCore.ELEMENT_DATE));
-        dcMetaData.put(DublinCore.ELEMENT_RIGHTS, getParameterAsString(DublinCore.ELEMENT_RIGHTS));
-        dcMetaData.put(DublinCore.ELEMENT_LANGUAGE, getParameterAsString(LANGUAGE));
-
-        document.getMetaDataManager().setDublinCoreMetaData(dcMetaData);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#initParameters()
-     */
-    protected void initParameters() {
-        super.initParameters();
-
-        Map objectModel = ContextHelper.getObjectModel(getContext());
-        Request request = ObjectModelHelper.getRequest(objectModel);
-        Session session = request.getSession(false);
-        Identity identity = (Identity) session.getAttribute(Identity.class.getName());
-        User user = identity.getUser();
-        if (user != null) {
-            setParameter(DublinCore.ELEMENT_CREATOR, user.getId());
-        } else {
-            setParameter(DublinCore.ELEMENT_CREATOR, "");
-        }
-
-        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
-        setParameter(DublinCore.ELEMENT_DATE, format.format(new GregorianCalendar().getTime()));
-
-    }
-
-    /**
-     * @return The source document or <code>null</code> if the usecase was not invoked on a
-     *         document.
-     */
-    protected Document getSourceDocument() {
-        Document document = null;
-        String url = getSourceURL();
-        try {
-            if (getDocumentIdentityMap().isDocument(url)) {
-                document = getDocumentIdentityMap().getFromURL(url);
-            }
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-        return document;
-    }
-
-    /**
-     * @return The area without the "info-" prefix.
-     */
-    public String getArea() {
-        URLInformation info = new URLInformation(getSourceURL());
-        return info.getArea();
-    }
-
-    private Publication publication;
-
-    /**
-     * Access to the current publication. Use this when the publication is not yet known in the
-     * usecase: e.g. when creating a global asset. When adding a resource or a child to a document,
-     * access the publication via that document's interface instead.
-     * 
-     * @return the publication in which the use-case is being executed
-     */
-    protected Publication getPublication() {
-        if (this.publication == null) {
-            PublicationFactory factory = PublicationFactory.getInstance(getLogger());
-            try {
-                this.publication = factory.getPublication(this.manager, getSourceURL());
-            } catch (PublicationException e) {
-                throw new RuntimeException(e);
-            }
-        }
-        return this.publication;
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/site/usecases/CreateDocument.java b/src/java/org/apache/lenya/cms/site/usecases/CreateDocument.java
deleted file mode 100644
index 1d92538..0000000
--- a/src/java/org/apache/lenya/cms/site/usecases/CreateDocument.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site.usecases;
-
-import java.util.Arrays;
-
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentManager;
-import org.apache.lenya.cms.publication.Publication;
-
-/**
- * Usecase to create a document.
- * 
- * @version $Id$
- */
-public class CreateDocument extends Create {
-
-    protected static final String PARENT_ID = "parentId";
-
-    protected static final String DOCUMENT_TYPE = "doctype";
-
-    protected static final String RELATION = "relation";
-    protected static final String RELATIONS = "relations";
-    protected static final String RELATION_CHILD = "child";
-    protected static final String RELATION_BEFORE = "before";
-    protected static final String RELATION_AFTER = "after";
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#initParameters()
-     */
-    protected void initParameters() {
-        super.initParameters();
-
-        Document parent = getSourceDocument();
-        if (parent != null) {
-            setParameter(PARENT_ID, parent.getId());
-        } else {
-            setParameter(PARENT_ID, "");
-        }
-
-        String[] languages = parent.getPublication().getLanguages();
-        setParameter(LANGUAGES, languages);
-
-        String[] relations = { RELATION_CHILD, RELATION_AFTER };
-        setParameter(RELATIONS, relations);
-        setParameter(RELATION, RELATION_CHILD);
-    }
-
-    /**
-     * Override this method to support other relations.
-     * @return The supported relations.
-     */
-    protected String[] getSupportedRelations() {
-        return new String[] { RELATION_CHILD, RELATION_AFTER };
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckExecutionConditions()
-     */
-    protected void doCheckExecutionConditions() throws Exception {
-        super.doCheckExecutionConditions();
-
-        String documentName = getParameterAsString(DOCUMENT_ID);
-        String language = getParameterAsString(LANGUAGE);
-        String relation = getParameterAsString(RELATION);
-
-        if (!Arrays.asList(getSupportedRelations()).contains(relation)) {
-            addErrorMessage("The relation '" + relation + "' is not supported.");
-        }
-
-        DocumentManager documentManager = null;
-        try {
-            documentManager = (DocumentManager) this.manager.lookup(DocumentManager.ROLE);
-            Document parent = getSourceDocument();
-            Publication publication = getSourceDocument().getPublication();
-            Document document = getSourceDocument().getIdentityMap().get(publication,
-                    getSourceDocument().getArea(),
-                    parent.getId() + "/" + documentName,
-                    language);
-            if (document.exists()) {
-                addErrorMessage("The document does already exist.");
-            }
-        } finally {
-            if (documentManager != null) {
-                this.manager.release(documentManager);
-            }
-        }
-    }
-
-    /**
-     * @see Create#getNewDocumentName()
-     */
-    protected String getNewDocumentName() {
-        return getParameterAsString(DOCUMENT_ID);
-    }
-
-    /**
-     * @return The relation between the source document and the created document.
-     */
-    protected String getRelation() {
-        return getParameterAsString(RELATION);
-    }
-
-    /**
-     * @see Create#getNewDocumentId()
-     */
-    protected String getNewDocumentId() {
-        String relation = getRelation();
-        Document sourceDoc = getSourceDocument();
-        if (relation.equals(RELATION_CHILD)) {
-            return sourceDoc.getId() + "/" + getNewDocumentName();
-        } else if (relation.equals(RELATION_BEFORE)) {
-            return sourceDoc.getId().substring(0,
-                    sourceDoc.getId().lastIndexOf(sourceDoc.getName()))
-                    + getNewDocumentName();
-        } else if (relation.equals(RELATION_AFTER)) {
-            return sourceDoc.getId().substring(0,
-                    sourceDoc.getId().lastIndexOf(sourceDoc.getName()))
-                    + getNewDocumentName();
-        } else {
-            return getSourceDocument().getId() + "/" + getNewDocumentName();
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.usecases.Create#getDocumentTypeName()
-     */
-    protected String getDocumentTypeName() {
-        return getParameterAsString(DOCUMENT_TYPE);
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/site/usecases/CreateLanguage.java b/src/java/org/apache/lenya/cms/site/usecases/CreateLanguage.java
deleted file mode 100644
index dac6670..0000000
--- a/src/java/org/apache/lenya/cms/site/usecases/CreateLanguage.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site.usecases;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentBuildException;
-import org.apache.lenya.cms.publication.DocumentException;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.DocumentType;
-import org.apache.lenya.cms.publication.Publication;
-
-/**
- * Usecase to create a new language version of a resource.
- * 
- * @version $Id$
- */
-public class CreateLanguage extends Create {
-
-    private String documentTypeName;
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckPreconditions()
-     */
-    protected void doCheckPreconditions() throws Exception {
-        super.doCheckPreconditions();
-
-        if (getSourceDocument() == null) {
-            addErrorMessage("This operation must be invoked on a document.");
-            return;
-        }
-
-        String area = getSourceDocument().getArea();
-        if (!area.equals(Publication.AUTHORING_AREA)) {
-            addErrorMessage("This operation is only supported in the authoring area.");
-            return;
-        }
-
-        if (getNonExistingLanguages().isEmpty()) {
-            addErrorMessage("All language versions already exist.");
-        }
-    }
-
-    /**
-     * @return All languages supported by the publication for which this document does not yet have
-     *         a version
-     * @throws DocumentBuildException if an error occurs.
-     * @throws DocumentException if an error occurs.
-     */
-    protected List getNonExistingLanguages() throws DocumentBuildException, DocumentException {
-        Document source = getSourceDocument();
-        List nonExistingLanguages = new ArrayList();
-        String[] languages = source.getPublication().getLanguages();
-        DocumentIdentityMap map = source.getIdentityMap();
-        for (int i = 0; i < languages.length; i++) {
-            Document version = map.get(source.getPublication(),
-                    source.getArea(),
-                    source.getId(),
-                    languages[i]);
-            if (!version.exists()) {
-                nonExistingLanguages.add(languages[i]);
-            }
-        }
-        return nonExistingLanguages;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#initParameters()
-     */
-    protected void initParameters() {
-        super.initParameters();
-
-        Document source = getSourceDocument();
-        if (source != null) {
-            try {
-                List nonExistingLanguages = getNonExistingLanguages();
-                setParameter(LANGUAGES, nonExistingLanguages
-                        .toArray(new String[nonExistingLanguages.size()]));
-            } catch (Exception e) {
-                throw new RuntimeException(e);
-            }
-        }
-    }
-
-    /**
-     * For new language version of a document, name is the same as that document's
-     * @see Create#getNewDocumentName()
-     */
-    protected String getNewDocumentName() {
-        return getSourceDocument().getName();
-    }
-
-    /**
-     * For new language version of a document, id is the same as that document's
-     * @see Create#getNewDocumentId()
-     */
-    protected String getNewDocumentId() {
-        return getSourceDocument().getId();
-    }
-
-    /**
-     * New language version of a document: use that document's content
-     * @see Create#getInitialDocument()
-     */
-    protected Document getInitialDocument() {
-        return getSourceDocument();
-    }
-
-    /**
-     * @see Create#getDocumentTypeName()
-     */
-    protected String getDocumentTypeName() {
-        if (this.documentTypeName == null) {
-            try {
-                DocumentType type = getSourceDocument().getResourceType();
-                this.documentTypeName = type.getName();
-
-                List nonExistingLanguages = getNonExistingLanguages();
-                setParameter(LANGUAGES, nonExistingLanguages
-                        .toArray(new String[nonExistingLanguages.size()]));
-
-            } catch (Exception e) {
-                throw new RuntimeException(e);
-            }
-        }
-        return this.documentTypeName;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/site/usecases/Cut.java b/src/java/org/apache/lenya/cms/site/usecases/Cut.java
deleted file mode 100644
index 07ae3b1..0000000
--- a/src/java/org/apache/lenya/cms/site/usecases/Cut.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site.usecases;
-
-import org.apache.lenya.cms.usecase.DocumentUsecase;
-
-/**
- * Cut a document into the clipboard.
- * 
- * @version $Id:$
- */
-public class Cut extends DocumentUsecase {
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-        
-        Clipboard clipboard = new Clipboard(getSourceDocument(), Clipboard.METHOD_CUT);
-        ClipboardHelper helper = new ClipboardHelper();
-        helper.saveClipboard(getContext(), clipboard);
-    }
-    
-}
diff --git a/src/java/org/apache/lenya/cms/site/usecases/Delete.java b/src/java/org/apache/lenya/cms/site/usecases/Delete.java
deleted file mode 100644
index d9ab64e..0000000
--- a/src/java/org/apache/lenya/cms/site/usecases/Delete.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site.usecases;
-
-import org.apache.lenya.cms.publication.Publication;
-
-/**
- * Delete a document and all its descendants, including all language versions. The documents are
- * moved to the trash.
- * 
- * @version $Id$
- */
-public class Delete extends MoveSubsite {
-
-    /**
-     * @see org.apache.lenya.cms.site.usecases.MoveSubsite#getSourceAreas()
-     */
-    protected String[] getSourceAreas() {
-        return new String[] { Publication.AUTHORING_AREA };
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.usecases.MoveSubsite#getTargetArea()
-     */
-    protected String getTargetArea() {
-        return Publication.TRASH_AREA;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.usecases.MoveSubsite#getEvent()
-     */
-    protected String getEvent() {
-        return "delete";
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/site/usecases/DeleteLanguage.java b/src/java/org/apache/lenya/cms/site/usecases/DeleteLanguage.java
deleted file mode 100644
index a6370c7..0000000
--- a/src/java/org/apache/lenya/cms/site/usecases/DeleteLanguage.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site.usecases;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentManager;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.util.DocumentHelper;
-import org.apache.lenya.cms.usecase.DocumentUsecase;
-import org.apache.lenya.cms.usecase.UsecaseException;
-import org.apache.lenya.transaction.Transactionable;
-
-/**
- * Delete a language version.
- * 
- * @version $Id$
- */
-public class DeleteLanguage extends DocumentUsecase {
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckPreconditions()
-     */
-    protected void doCheckPreconditions() throws Exception {
-        super.doCheckPreconditions();
-        if (hasErrors()) {
-            return;
-        }
-
-        if (!getSourceDocument().getArea().equals(Publication.AUTHORING_AREA)) {
-            addErrorMessage("This usecase can only be invoked in the authoring area!");
-        } else if (getSourceDocument().getLanguages().length == 1) {
-            addErrorMessage("The last language version cannot be removed.");
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#getObjectsToLock()
-     */
-    protected Transactionable[] getObjectsToLock() throws UsecaseException {
-        List nodes = new ArrayList();
-        Document doc = getSourceDocument();
-        try {
-            nodes.addAll(Arrays.asList(doc.getRepositoryNodes()));
-        } catch (Exception e) {
-            throw new UsecaseException(e);
-        }
-        return (Transactionable[]) nodes.toArray(new Transactionable[nodes.size()]);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-
-        Document document = getSourceDocument();
-        DocumentManager documentManager = null;
-        try {
-            documentManager = (DocumentManager) this.manager.lookup(DocumentManager.ROLE);
-            documentManager.delete(document);
-        } finally {
-            if (documentManager != null) {
-                this.manager.release(documentManager);
-            }
-        }
-
-        setTargetDocument(DocumentHelper.getExistingLanguageVersion(document));
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/site/usecases/EmptyTrash.java b/src/java/org/apache/lenya/cms/site/usecases/EmptyTrash.java
deleted file mode 100644
index 7675585..0000000
--- a/src/java/org/apache/lenya/cms/site/usecases/EmptyTrash.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site.usecases;
-
-import java.util.Arrays;
-
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.DocumentManager;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationException;
-import org.apache.lenya.cms.publication.PublicationFactory;
-import org.apache.lenya.cms.publication.util.DocumentSet;
-import org.apache.lenya.cms.site.SiteException;
-import org.apache.lenya.cms.site.SiteManager;
-import org.apache.lenya.cms.usecase.AbstractUsecase;
-
-/**
- * Empty the trash.
- *
- * @version $Id:$
- */
-public class EmptyTrash extends AbstractUsecase {
-    
-    protected static final String DOCUMENTS = "documents";
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#initParameters()
-     */
-    protected void initParameters() {
-        super.initParameters();
-        try {
-            Document[] documents = getTrashDocuments();
-            setParameter(DOCUMENTS, Arrays.asList(documents));
-        } catch (SiteException e) {
-            throw new RuntimeException(e);
-        } catch (PublicationException e) {
-            throw new RuntimeException(e);
-        }
-    }
-    
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-        
-        DocumentManager documentManager = null;
-        try {
-            documentManager = (DocumentManager) this.manager.lookup(DocumentManager.ROLE);
-            Document[] documents = getTrashDocuments();
-            DocumentSet set = new DocumentSet(documents);
-            documentManager.delete(set);
-        }
-        finally {
-            if (documentManager != null) {
-                this.manager.release(documentManager);
-            }
-        }
-    }
-    
-    /**
-     * @return The documents in the trash area.
-     * @throws PublicationException if an error occurs.
-     * @throws SiteException if an error occurs.
-     */
-    protected Document[] getTrashDocuments() throws PublicationException, SiteException {
-        PublicationFactory factory = PublicationFactory.getInstance(getLogger());
-        Publication publication = factory.getPublication(this.manager, getSourceURL());
-        DocumentIdentityMap identityMap = getDocumentIdentityMap();
-        Document[] documents;
-        
-        ServiceSelector selector = null;
-        SiteManager siteManager = null;
-        try {
-            selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
-            siteManager = (SiteManager) selector.select(publication
-                    .getSiteManagerHint());
-            documents = siteManager.getDocuments(identityMap, publication, Publication.TRASH_AREA);
-        } catch (ServiceException e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (selector != null) {
-                if (siteManager != null) {
-                    selector.release(siteManager);
-                }
-                this.manager.release(selector);
-            }
-        }
-        
-        return documents;
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/site/usecases/LinkRewriter.java b/src/java/org/apache/lenya/cms/site/usecases/LinkRewriter.java
deleted file mode 100644
index fd3ef99..0000000
--- a/src/java/org/apache/lenya/cms/site/usecases/LinkRewriter.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site.usecases;
-
-import org.apache.lenya.cms.publication.Document;
-
-/**
- * Rewrite the links in a publication. This is used after renaming / moving a
- * document.
- * 
- * @version $Id:$
- */
-public interface LinkRewriter {
-    
-    /**
-     * The avalon component role.
-     */
-    String ROLE = LinkRewriter.class.getName();
-
-    /**
-     * Rewrites the links to a document and all its descendants, including all
-     * language versions.
-     * @param originalTargetDocument The original target document.
-     * @param newTargetDocument The new target document.
-     */
-    void rewriteLinks(Document originalTargetDocument, Document newTargetDocument);
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/site/usecases/LinkRewriterImpl.java b/src/java/org/apache/lenya/cms/site/usecases/LinkRewriterImpl.java
deleted file mode 100644
index 28e03fa..0000000
--- a/src/java/org/apache/lenya/cms/site/usecases/LinkRewriterImpl.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site.usecases;
-
-import java.util.Map;
-
-import org.apache.avalon.framework.context.Context;
-import org.apache.avalon.framework.context.ContextException;
-import org.apache.avalon.framework.context.Contextualizable;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.cocoon.components.ContextHelper;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Request;
-import org.apache.lenya.cms.cocoon.source.SourceUtil;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentBuilder;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.DocumentType;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.site.SiteManager;
-import org.apache.lenya.transaction.Transactionable;
-import org.apache.xpath.XPathAPI;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * Rewrite the links in a publication. This is used after renaming / moving a document.
- * 
- * @version $Id$
- */
-public class LinkRewriterImpl extends AbstractLogEnabled implements LinkRewriter, Serviceable,
-        Contextualizable {
-
-    /**
-     * Ctor.
-     */
-    public LinkRewriterImpl() {
-    }
-
-    /**
-     * @see org.apache.lenya.cms.site.usecases.LinkRewriter#rewriteLinks(org.apache.lenya.cms.publication.Document,
-     *      org.apache.lenya.cms.publication.Document)
-     */
-    public void rewriteLinks(Document originalTargetDocument, Document newTargetDocument) {
-
-        Publication publication = originalTargetDocument.getPublication();
-        String area = originalTargetDocument.getArea();
-        DocumentIdentityMap identityMap = originalTargetDocument.getIdentityMap();
-
-        Document[] documents;
-
-        ServiceSelector selector = null;
-        SiteManager siteManager = null;
-        try {
-            selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
-            siteManager = (SiteManager) selector.select(publication.getSiteManagerHint());
-            documents = siteManager.getDocuments(identityMap, publication, area);
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (selector != null) {
-                if (siteManager != null) {
-                    selector.release(siteManager);
-                }
-                this.manager.release(selector);
-            }
-        }
-
-        Request request = ObjectModelHelper.getRequest(this.objectModel);
-        String contextPath = request.getContextPath();
-
-        try {
-            for (int documentIndex = 0; documentIndex < documents.length; documentIndex++) {
-
-                Document examinedDocument = documents[documentIndex];
-                if (examinedDocument.exists()) {
-
-                    if (getLogger().isDebugEnabled()) {
-                        getLogger().debug("Rewriting links in document [" + examinedDocument + "]");
-                    }
-
-                    boolean linksRewritten = false;
-
-                    DocumentType doctype = examinedDocument.getResourceType();
-                    String[] xPaths = doctype.getLinkAttributeXPaths();
-
-                    try {
-
-                        org.w3c.dom.Document xmlDocument = SourceUtil.readDOM(examinedDocument.getSourceURI(), this.manager);
-
-                        for (int xPathIndex = 0; xPathIndex < xPaths.length; xPathIndex++) {
-                            NodeList nodes = XPathAPI.selectNodeList(xmlDocument,
-                                    xPaths[xPathIndex]);
-                            for (int nodeIndex = 0; nodeIndex < nodes.getLength(); nodeIndex++) {
-                                Node node = nodes.item(nodeIndex);
-                                if (node.getNodeType() != Node.ATTRIBUTE_NODE) {
-                                    throw new RuntimeException("The XPath [" + xPaths[xPathIndex]
-                                            + "] may only match attribute nodes!");
-                                }
-                                Attr attribute = (Attr) node;
-                                final String url = attribute.getValue();
-
-                                if (url.startsWith(contextPath + "/" + publication.getId())) {
-                                    final String webappUrl = url.substring(contextPath.length());
-
-                                    if (identityMap.isDocument(webappUrl)) {
-                                        Document targetDocument = identityMap.getFromURL(webappUrl);
-
-                                        if (matches(targetDocument, originalTargetDocument)) {
-                                            String newTargetUrl = getNewTargetURL(targetDocument,
-                                                    originalTargetDocument,
-                                                    newTargetDocument);
-                                            attribute.setValue(contextPath + newTargetUrl);
-                                            linksRewritten = true;
-                                        }
-                                    }
-                                }
-                            }
-                        }
-
-                        if (linksRewritten) {
-                            Transactionable nodes[] = examinedDocument.getRepositoryNodes();
-                            for (int i = 0; i < nodes.length; i++) {
-                                nodes[i].lock();
-                            }
-                            SourceUtil.writeDOM(xmlDocument, examinedDocument.getSourceURI(), this.manager);
-                        }
-
-                    } finally {
-                    }
-
-                }
-            }
-        } catch (final Exception e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    /**
-     * Checks if targetDocument refers to originalTargetDocument, to one of its language versions,
-     * to one of its descendants, or to a language version of one of the descendants.
-     * @param targetDocument The target document.
-     * @param originalTargetDocument The original target document.
-     * @return A boolean value.
-     */
-    protected boolean matches(Document targetDocument, Document originalTargetDocument) {
-        String matchString = originalTargetDocument.getId() + "/";
-        String testString = targetDocument.getId() + "/";
-        return testString.startsWith(matchString);
-    }
-
-    /**
-     * Rewrites a document.
-     * @param targetDocument The target document to rewrite.
-     * @param originalTargetDocument The original target document.
-     * @param newTargetDocument The new target document.
-     * @return A string.
-     */
-    protected String getNewTargetURL(Document targetDocument, Document originalTargetDocument,
-            Document newTargetDocument) {
-        String originalId = originalTargetDocument.getId();
-        String targetId = targetDocument.getId();
-        String childString = targetId.substring(originalId.length());
-
-        ServiceSelector selector = null;
-        DocumentBuilder builder = null;
-        try {
-            selector = (ServiceSelector) this.manager.lookup(DocumentBuilder.ROLE + "Selector");
-            builder = (DocumentBuilder) selector.select(originalTargetDocument.getPublication()
-                    .getDocumentBuilderHint());
-
-            String newTargetUrl = builder.buildCanonicalUrl(newTargetDocument.getPublication(),
-                    newTargetDocument.getArea(),
-                    newTargetDocument.getId() + childString,
-                    targetDocument.getLanguage());
-            return newTargetUrl;
-        } catch (ServiceException e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (selector != null) {
-                if (builder != null) {
-                    selector.release(builder);
-                }
-                this.manager.release(selector);
-            }
-        }
-    }
-
-    private ServiceManager manager;
-
-    /**
-     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service(ServiceManager manager) throws ServiceException {
-        this.manager = manager;
-    }
-
-    private Map objectModel;
-
-    /**
-     * @see org.apache.avalon.framework.context.Contextualizable#contextualize(org.apache.avalon.framework.context.Context)
-     */
-    public void contextualize(Context context) throws ContextException {
-        this.objectModel = ContextHelper.getObjectModel(context);
-
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/site/usecases/Move.java b/src/java/org/apache/lenya/cms/site/usecases/Move.java
deleted file mode 100644
index 0d591bb..0000000
--- a/src/java/org/apache/lenya/cms/site/usecases/Move.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site.usecases;
-
-import org.apache.lenya.cms.site.usecases.SiteUsecase;
-import org.apache.lenya.cms.usecase.UsecaseException;
-
-/**
- * Usecase to move a resource.
- * 
- * @version $Id$
- */
-public class Move extends SiteUsecase {
-
-    /**
-     * Ctor.
-     */
-    public Move() {
-        super();
-    }
-
-    /**
-     * Validates the request parameters.
-     * @throws UsecaseException if an error occurs.
-     */
-    void validate() throws UsecaseException {
-        // do nothing
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckExecutionConditions()
-     */
-    protected void doCheckExecutionConditions() throws Exception {
-        validate();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#setParameter(java.lang.String,
-     *      java.lang.Object)
-     */
-    public void setParameter(String name, Object value) {
-        super.setParameter(name, value);
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/site/usecases/MoveSubsite.java b/src/java/org/apache/lenya/cms/site/usecases/MoveSubsite.java
deleted file mode 100644
index 0f9e42b..0000000
--- a/src/java/org/apache/lenya/cms/site/usecases/MoveSubsite.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site.usecases;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.DocumentManager;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.util.DocumentSet;
-import org.apache.lenya.cms.site.SiteUtil;
-import org.apache.lenya.cms.usecase.DocumentUsecase;
-import org.apache.lenya.cms.usecase.UsecaseException;
-import org.apache.lenya.cms.workflow.WorkflowUtil;
-import org.apache.lenya.transaction.Transactionable;
-
-/**
- * Usecase to move a subsite to another area.
- * 
- * @version $Id:$
- */
-public abstract class MoveSubsite extends DocumentUsecase {
-
-    /**
-     * @return The possible source areas.
-     */
-    protected abstract String[] getSourceAreas();
-
-    /**
-     * @return The target area.
-     */
-    protected abstract String getTargetArea();
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckPreconditions()
-     */
-    protected void doCheckPreconditions() throws Exception {
-        super.doCheckPreconditions();
-        if (hasErrors()) {
-            return;
-        }
-
-        List sourceAreas = Arrays.asList(getSourceAreas());
-        if (!sourceAreas.contains(getSourceDocument().getArea())) {
-            addErrorMessage("This usecase can only be invoked in the authoring area!");
-        } else {
-
-            Document document = getSourceDocument();
-            DocumentIdentityMap identityMap = getDocumentIdentityMap();
-
-            DocumentSet set = SiteUtil.getSubSite(this.manager, document);
-            Document[] documents = set.getDocuments();
-            for (int i = 0; i < documents.length; i++) {
-                Document liveVersion = identityMap.getAreaVersion(documents[i],
-                        Publication.LIVE_AREA);
-                if (liveVersion.exists()) {
-                    addErrorMessage("delete-doc-live", new String[] { liveVersion.getId() });
-                }
-            }
-            if (!WorkflowUtil.canInvoke(this.manager, getLogger(), set, getEvent())) {
-                addErrorMessage("The workflow event cannot be invoked on all documents.");
-            }
-        }
-    }
-
-    /**
-     * @return The workflow event.
-     */
-    protected abstract String getEvent();
-
-    /**
-     * Lock the following objects:
-     * <ul>
-     * <li>all involved documents in the document's area</li>
-     * <li>the trash versions of these documents</li>
-     * <li>the document area's site structure</li>
-     * <li>the trash site structure</li>
-     * </ul>
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#getObjectsToLock()
-     */
-    protected Transactionable[] getObjectsToLock() throws UsecaseException {
-        List nodes = new ArrayList();
-        Document doc = getSourceDocument();
-        try {
-            DocumentSet sources = SiteUtil.getSubSite(this.manager, doc);
-            Document[] docs = sources.getDocuments();
-            for (int i = 0; i < docs.length; i++) {
-                nodes.addAll(Arrays.asList(docs[i].getRepositoryNodes()));
-            }
-
-            DocumentSet targets = SiteUtil.getTransferedSubSite(this.manager,
-                    doc,
-                    getTargetArea(),
-                    SiteUtil.MODE_CHANGE_ID);
-            docs = targets.getDocuments();
-            for (int i = 0; i < docs.length; i++) {
-                nodes.addAll(Arrays.asList(docs[i].getRepositoryNodes()));
-            }
-
-            nodes.add(SiteUtil.getSiteStructure(this.manager, doc).getRepositoryNode());
-            nodes.add(SiteUtil.getSiteStructure(this.manager, targets.getDocuments()[0])
-                    .getRepositoryNode());
-        } catch (Exception e) {
-            throw new UsecaseException(e);
-        }
-        return (Transactionable[]) nodes.toArray(new Transactionable[nodes.size()]);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-
-        Document doc = getSourceDocument();
-        DocumentSet sources = SiteUtil.getSubSite(this.manager, doc);
-
-        Document target = doc.getIdentityMap().getAreaVersion(doc, getTargetArea());
-        target = SiteUtil.getAvailableDocument(this.manager, target);
-
-        DocumentManager documentManager = null;
-        try {
-            WorkflowUtil.invoke(this.manager, getLogger(), sources, getEvent(), true);
-
-            documentManager = (DocumentManager) this.manager.lookup(DocumentManager.ROLE);
-            DocumentSet targets = SiteUtil.getTransferedSubSite(this.manager,
-                    doc,
-                    getTargetArea(),
-                    SiteUtil.MODE_CHANGE_ID);
-            documentManager.move(sources, targets);
-
-        } finally {
-            if (documentManager != null) {
-                this.manager.release(documentManager);
-            }
-        }
-
-        setTargetDocument(target);
-
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/site/usecases/Nudge.java b/src/java/org/apache/lenya/cms/site/usecases/Nudge.java
deleted file mode 100644
index 9d7ea7b..0000000
--- a/src/java/org/apache/lenya/cms/site/usecases/Nudge.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site.usecases;
-
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.repository.Node;
-import org.apache.lenya.cms.site.SiteException;
-import org.apache.lenya.cms.site.SiteManager;
-import org.apache.lenya.cms.site.SiteStructure;
-import org.apache.lenya.cms.site.SiteUtil;
-import org.apache.lenya.cms.site.tree.SiteTree;
-import org.apache.lenya.cms.site.tree.SiteTreeNode;
-import org.apache.lenya.cms.usecase.DocumentUsecase;
-import org.apache.lenya.cms.usecase.UsecaseException;
-import org.apache.lenya.transaction.Transactionable;
-
-/**
- * Nudge a document one position up or down.
- * 
- * @version $Id$
- */
-public class Nudge extends DocumentUsecase {
-
-    protected static final String DIRECTION = "direction";
-    protected static final String UP = "up";
-    protected static final String DOWN = "down";
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckPreconditions()
-     */
-    protected void doCheckPreconditions() throws Exception {
-        super.doCheckPreconditions();
-
-        if (hasErrors()) {
-            return;
-        }
-
-        Publication publication = getSourceDocument().getPublication();
-
-        ServiceSelector selector = null;
-        SiteManager siteManager = null;
-        try {
-            selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
-            siteManager = (SiteManager) selector.select(publication.getSiteManagerHint());
-            SiteStructure structure = siteManager.getSiteStructure(getSourceDocument()
-                    .getIdentityMap(), publication, getSourceDocument().getArea());
-            if (structure instanceof SiteTree) {
-
-                SiteTree tree = (SiteTree) structure;
-                SiteTreeNode node = tree.getNode(getSourceDocument().getId());
-                SiteTreeNode[] siblings = null;
-
-                String direction = getParameterAsString(DIRECTION);
-                if (direction.equals(UP)) {
-                    siblings = node.getPrecedingSiblings();
-                } else if (direction.equals(DOWN)) {
-                    siblings = node.getNextSiblings();
-                } else {
-                    addErrorMessage("nudge-error-direction-unknown", new String[] { direction });
-                }
-
-                if (siblings != null && siblings.length == 0) {
-                    addErrorMessage("nudge-error-direction");
-                }
-            } else {
-                addErrorMessage("nudge-error-area");
-            }
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (selector != null) {
-                if (siteManager != null) {
-                    selector.release(siteManager);
-                }
-                this.manager.release(selector);
-            }
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#getObjectsToLock()
-     */
-    protected Transactionable[] getObjectsToLock() throws UsecaseException {
-        try {
-            Node node = SiteUtil.getSiteStructure(this.manager, getSourceDocument())
-                    .getRepositoryNode();
-            Node[] nodes = { node };
-            return nodes;
-        } catch (SiteException e) {
-            throw new UsecaseException(e);
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-
-        Publication publication = getSourceDocument().getPublication();
-        ServiceSelector selector = null;
-        SiteManager siteManager = null;
-        try {
-            selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
-            siteManager = (SiteManager) selector.select(publication.getSiteManagerHint());
-            SiteStructure structure = siteManager.getSiteStructure(getSourceDocument()
-                    .getIdentityMap(), publication, getSourceDocument().getArea());
-            if (structure instanceof SiteTree) {
-
-                SiteTree tree = (SiteTree) structure;
-                String direction = getParameterAsString(DIRECTION);
-                if (direction.equals(UP)) {
-                    tree.moveUp(getSourceDocument().getId());
-                } else if (direction.equals(DOWN)) {
-                    tree.moveDown(getSourceDocument().getId());
-                } else {
-                    throw new IllegalArgumentException("The direction [" + direction
-                            + "] is not supported.");
-                }
-            } else {
-                throw new IllegalStateException("This operation is only supported for site trees.");
-            }
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (selector != null) {
-                if (siteManager != null) {
-                    selector.release(siteManager);
-                }
-                this.manager.release(selector);
-            }
-        }
-
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/site/usecases/Overview.java b/src/java/org/apache/lenya/cms/site/usecases/Overview.java
deleted file mode 100644
index e687995..0000000
--- a/src/java/org/apache/lenya/cms/site/usecases/Overview.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site.usecases;
-
-import java.util.Arrays;
-
-import org.apache.lenya.cms.metadata.MetaData;
-import org.apache.lenya.cms.metadata.dublincore.DublinCore;
-import org.apache.lenya.cms.site.usecases.SiteUsecase;
-import org.apache.lenya.cms.usecase.UsecaseException;
-import org.apache.lenya.cms.workflow.DocumentWorkflowable;
-import org.apache.lenya.workflow.Version;
-import org.apache.lenya.workflow.Workflow;
-import org.apache.lenya.workflow.WorkflowManager;
-
-/**
- * Usecase to display the overview tab in the site area for a document.
- * 
- * @version $Id$
- */
-public class Overview extends SiteUsecase {
-
-    protected static final String STATE = "state";
-    protected static final String ISLIVE = "isLive";
-
-    /**
-     * Ctor.
-     */
-    public Overview() {
-        super();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#initParameters()
-     */
-    protected void initParameters() {
-        super.initParameters();
-
-        WorkflowManager resolver = null;
-        try {
-            // read parameters from Dublin Core meta-data
-            MetaData dc = getSourceDocument().getMetaDataManager().getDublinCoreMetaData();
-            setParameter(DublinCore.ELEMENT_TITLE, dc.getFirstValue(DublinCore.ELEMENT_TITLE));
-            setParameter(DublinCore.ELEMENT_DESCRIPTION, dc
-                    .getFirstValue(DublinCore.ELEMENT_DESCRIPTION));
-
-            // read parameters from document attributes
-            setParameter("languages", getSourceDocument().getLanguages());
-            setParameter("lastmodified", getSourceDocument().getLastModified());
-            setParameter("resourcetype", getSourceDocument().getResourceType());
-
-            DocumentWorkflowable workflowable = new DocumentWorkflowable(getSourceDocument(),
-                    getLogger());
-            resolver = (WorkflowManager) this.manager.lookup(WorkflowManager.ROLE);
-            if (resolver.hasWorkflow(workflowable)) {
-                Workflow workflow = resolver.getWorkflowSchema(workflowable);
-                String[] variableNames = workflow.getVariableNames();
-                Version latestVersion = workflowable.getLatestVersion();
-                Boolean isLive = null;
-                if (latestVersion != null) {
-                    setParameter(STATE, latestVersion.getState());
-                    if (Arrays.asList(variableNames).contains(ISLIVE)) {
-                        isLive = Boolean.valueOf(latestVersion.getValue(ISLIVE));
-                    }
-                } else {
-                    setParameter(STATE, workflow.getInitialState());
-                    if (Arrays.asList(variableNames).contains(ISLIVE)) {
-                        isLive = Boolean.valueOf(workflow.getInitialValue(ISLIVE));
-                    }
-                }
-                setParameter(ISLIVE, isLive);
-            } else {
-                setParameter(STATE, "");
-            }
-
-        } catch (final Exception e) {
-            addErrorMessage("Could not read a value. See log files for details.");
-            getLogger().error("Could not read value for Overview usecase. ", e);
-        } finally {
-            if (resolver != null) {
-                this.manager.release(resolver);
-            }
-        }
-    }
-
-    /**
-     * Validates the request parameters.
-     * @throws UsecaseException if an error occurs.
-     */
-    void validate() throws UsecaseException {
-        // do nothing
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckExecutionConditions()
-     */
-    protected void doCheckExecutionConditions() throws Exception {
-        validate();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#setParameter(java.lang.String, java.lang.Object)
-     */
-    public void setParameter(String name, Object value) {
-        super.setParameter(name, value);
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/site/usecases/Paste.java b/src/java/org/apache/lenya/cms/site/usecases/Paste.java
deleted file mode 100644
index 9de2d5b..0000000
--- a/src/java/org/apache/lenya/cms/site/usecases/Paste.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site.usecases;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentBuildException;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.DocumentManager;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.util.DocumentSet;
-import org.apache.lenya.cms.repository.Node;
-import org.apache.lenya.cms.site.SiteException;
-import org.apache.lenya.cms.site.SiteUtil;
-import org.apache.lenya.cms.usecase.DocumentUsecase;
-import org.apache.lenya.cms.usecase.UsecaseException;
-import org.apache.lenya.transaction.Transactionable;
-
-/**
- * Paste a document from the clipboard.
- * 
- * @version $Id$
- */
-public class Paste extends DocumentUsecase {
-
-    protected static final String CLIPBOARD_DOCUMENT_ID = "clipboardDocumentId";
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckPreconditions()
-     */
-    protected void doCheckPreconditions() throws Exception {
-        super.doCheckPreconditions();
-
-        if (hasErrors()) {
-            return;
-        }
-
-        Clipboard clipboard = new ClipboardHelper().getClipboard(getContext());
-        if (clipboard == null) {
-            addErrorMessage("Cannot paste - the clipboard is empty.");
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#initParameters()
-     */
-    protected void initParameters() {
-        super.initParameters();
-
-        Clipboard clipboard = new ClipboardHelper().getClipboard(getContext());
-        if (clipboard != null) {
-            String id;
-            try {
-                id = clipboard.getDocument(getDocumentIdentityMap()).getId();
-            } catch (DocumentBuildException e) {
-                throw new RuntimeException(e);
-            }
-            setParameter(CLIPBOARD_DOCUMENT_ID, id);
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#getObjectsToLock()
-     */
-    protected Transactionable[] getObjectsToLock() throws UsecaseException {
-        List nodes = new ArrayList();
-
-        try {
-            Node siteNode = SiteUtil.getSiteStructure(this.manager, getSourceDocument())
-                    .getRepositoryNode();
-            nodes.add(siteNode);
-
-            Clipboard clipboard = new ClipboardHelper().getClipboard(getContext());
-            DocumentIdentityMap map = getDocumentIdentityMap();
-            Publication pub = getSourceDocument().getPublication();
-            String area = getSourceDocument().getArea();
-            Document clippedDocument = clipboard.getDocument(map);
-            Document targetDocument = getTargetDocument();
-
-            String clippedName = clippedDocument.getName();
-            String clippedId = clippedDocument.getId();
-            String clippedBase = clippedId.substring(0, clippedId.length() - clippedName.length());
-
-            String targetBase = getSourceDocument().getId() + "/";
-
-            DocumentSet subsite = SiteUtil.getSubSite(this.manager, clippedDocument);
-            Document[] subsiteDocs = subsite.getDocuments();
-            for (int i = 0; i < subsiteDocs.length; i++) {
-                if (clipboard.getMethod() == Clipboard.METHOD_CUT) {
-                    nodes.addAll(Arrays.asList(subsiteDocs[i].getRepositoryNodes()));
-                }
-                String id = subsiteDocs[i].getId().substring(clippedBase.length());
-                Document targetSubsiteDoc = map.get(pub, area, targetBase + id, subsiteDocs[i].getLanguage());
-                nodes.addAll(Arrays.asList(targetSubsiteDoc.getRepositoryNodes()));
-            }
-
-        } catch (Exception e) {
-            throw new UsecaseException(e);
-        }
-
-        return (Transactionable[]) nodes.toArray(new Transactionable[nodes.size()]);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-
-        DocumentIdentityMap identityMap = getDocumentIdentityMap();
-        Clipboard clipboard = new ClipboardHelper().getClipboard(getContext());
-        Document clippedDocument = clipboard.getDocument(identityMap);
-
-        Document targetDocument = getTargetDocument();
-        DocumentManager documentManager = null;
-        try {
-            documentManager = (DocumentManager) this.manager.lookup(DocumentManager.ROLE);
-
-            if (clipboard.getMethod() == Clipboard.METHOD_COPY) {
-                documentManager.copyAll(clippedDocument, targetDocument);
-            } else if (clipboard.getMethod() == Clipboard.METHOD_CUT) {
-                documentManager.moveAll(clippedDocument, targetDocument);
-            } else {
-                throw new RuntimeException("This clipboard method is not supported!");
-            }
-        } finally {
-            if (documentManager != null) {
-                this.manager.release(documentManager);
-            }
-        }
-    }
-
-    protected Document getTargetDocument() throws SiteException, DocumentBuildException,
-            ServiceException {
-        DocumentIdentityMap identityMap = getDocumentIdentityMap();
-        Clipboard clipboard = new ClipboardHelper().getClipboard(getContext());
-        Document clippedDocument = clipboard.getDocument(identityMap);
-
-        String targetArea = getSourceDocument().getArea();
-        String language = clippedDocument.getLanguage();
-        String nodeId = clippedDocument.getName();
-        String potentialDocumentId = getSourceDocument().getId() + "/" + nodeId;
-
-        Document potentialDocument = identityMap.get(getSourceDocument().getPublication(),
-                targetArea,
-                potentialDocumentId,
-                language);
-        return SiteUtil.getAvailableDocument(this.manager, potentialDocument);
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/site/usecases/Restore.java b/src/java/org/apache/lenya/cms/site/usecases/Restore.java
deleted file mode 100644
index 806d370..0000000
--- a/src/java/org/apache/lenya/cms/site/usecases/Restore.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site.usecases;
-
-import org.apache.lenya.cms.usecase.DocumentUsecase;
-
-/**
- * Restore usecase handler.
- *
- * @version $Id:$
- */
-public class Restore extends DocumentUsecase {
-
-}
diff --git a/src/java/org/apache/lenya/cms/site/usecases/Revisions.java b/src/java/org/apache/lenya/cms/site/usecases/Revisions.java
deleted file mode 100644
index 6d2cd91..0000000
--- a/src/java/org/apache/lenya/cms/site/usecases/Revisions.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site.usecases;
-
-import java.io.File;
-
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.rc.RCEnvironment;
-import org.apache.lenya.cms.rc.RCML;
-import org.apache.lenya.cms.rc.RevisionController;
-import org.apache.lenya.cms.site.usecases.SiteUsecase;
-
-import java.util.Vector;
-
-/**
- * Usecase to display revisions of a resource.
- * 
- * @version $Id$
- */
-public class Revisions extends SiteUsecase {
-
-    private RevisionController rc = null;
-    private RCML rcml = null;
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#initParameters() TODO
-     *      filter out checkin entries
-     */
-    protected void initParameters() {
-        super.initParameters();
-
-        try {
-            final Publication publication = getSourceDocument().getPublication();
-            final String publicationPath = publication.getDirectory().getCanonicalPath();
-            final RCEnvironment rcEnvironment = RCEnvironment.getInstance(publication
-                    .getServletContext().getCanonicalPath());
-            String rcmlDirectory = rcEnvironment.getRCMLDirectory();
-            rcmlDirectory = publicationPath + File.separator + rcmlDirectory;
-            String backupDirectory = rcEnvironment.getBackupDirectory();
-            backupDirectory = publicationPath + File.separator + backupDirectory;
-            this.rc = new RevisionController(rcmlDirectory, backupDirectory, publicationPath);
-            final String filename = getSourceDocument().getFile().getCanonicalPath()
-                    .substring(publication.getDirectory().getCanonicalPath().length());
-            this.rcml = this.rc.getRCML(filename);
-
-        } catch (final Exception e) {
-            throw new RuntimeException(e);
-        }
-        
-        Vector entries;
-        try {
-            entries = this.rcml.getEntries();
-        } catch (final Exception e) {
-            throw new RuntimeException(e);
-        }
-        setParameter("entries", entries);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute() TODO add
-     *      rollback and view revision functionality
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/site/usecases/Scheduler.java b/src/java/org/apache/lenya/cms/site/usecases/Scheduler.java
deleted file mode 100644
index 78ab552..0000000
--- a/src/java/org/apache/lenya/cms/site/usecases/Scheduler.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site.usecases;
-
-import org.apache.lenya.cms.site.usecases.SiteUsecase;
-import org.apache.lenya.cms.usecase.UsecaseException;
-
-/**
- * Usecase to display the Scheduler tab in the site area for a document.
- * 
- * @version $Id: Scheduler.java 123658 2004-12-29 17:35:03Z gregor $
- */
-public class Scheduler extends SiteUsecase {
-
-	/**
-     * Ctor.
-     */
-    public Scheduler() {
-        super();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#initParameters()
-     */
-    protected void initParameters() {
-        super.initParameters();
-        try {
-	        setParameter("live", "");
-        } catch (Exception e) {
-        	addErrorMessage("Could not read a value.");
-        	getLogger().error("Could not read value for Scheduler usecase. " + e.toString());
-        }
-    }
-            
-     /**
-     * Validates the request parameters.
-     * @throws UsecaseException if an error occurs.
-     */
-    void validate() throws UsecaseException {
-	    // do nothing
-   }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckExecutionConditions()
-     */
-    protected void doCheckExecutionConditions() throws Exception {
-        validate();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-        try {
-		    // do nothing
-        } catch (Exception e) {
-            addErrorMessage("Scheduler reported error");
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#setParameter(java.lang.String, java.lang.Object)
-     */
-    public void setParameter(String name, Object value) {
-        super.setParameter(name, value);
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/site/usecases/SiteUsecase.java b/src/java/org/apache/lenya/cms/site/usecases/SiteUsecase.java
deleted file mode 100644
index 5d595d2..0000000
--- a/src/java/org/apache/lenya/cms/site/usecases/SiteUsecase.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site.usecases;
-
-import org.apache.lenya.cms.usecase.DocumentUsecase;
-
-/**
- * Super class for site related usecases.
- * 
- * @version $Id$
- */
-public class SiteUsecase extends DocumentUsecase {
-
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/task/AbstractTask.java b/src/java/org/apache/lenya/cms/task/AbstractTask.java
deleted file mode 100644
index 4888880..0000000
--- a/src/java/org/apache/lenya/cms/task/AbstractTask.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.task;
-
-import org.apache.avalon.framework.parameters.ParameterException;
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.avalon.framework.service.ServiceManager;
-
-
-/**
- * Abstract baseclass for Task
- */
-public abstract class AbstractTask implements Task {
-    private Parameters parameters = new Parameters();
-    
-    private ServiceManager manager;
-    
-    /**
-     * Ctor.
-     */
-    public AbstractTask() {
-    }
-    
-    /**
-     * @param manager The service manager to use.
-     */
-    public void service(ServiceManager manager) {
-        this.manager = manager;
-    }
-    
-    protected ServiceManager getServiceManager() {
-        return this.manager;
-    }
-
-    /**
-     * Get parameters of the task
-     * @return The parameters
-     */
-    public Parameters getParameters() {
-        Parameters params = new Parameters();
-        params = params.merge(this.parameters);
-
-        return params;
-    }
-
-    /**
-     * Set the parameters
-     * @param _parameters The parameters
-     * @throws ParameterException if the parametrizing fails
-     */
-    public void parameterize(Parameters _parameters) throws ParameterException {
-        this.parameters = this.parameters.merge(_parameters);
-    }
-
-    /**
-     * Set the label of the task
-     * @param label The label
-     */
-    public void setLabel(String label) {
-	    // do nothing
-    }
-    
-    private int result = SUCCESS;
-
-    /**
-     * @see org.apache.lenya.cms.task.Task#getResult()
-     */
-    public int getResult() {
-        return this.result;
-    }
-    
-    /**
-     * Sets the result of this task.
-     * @param _result An integer ({@link Task#SUCCESS}, {@link Task#FAILURE}).
-     */
-    protected void setResult(int _result) {
-        this.result = _result;
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/task/AntTask.java b/src/java/org/apache/lenya/cms/task/AntTask.java
deleted file mode 100644
index 49c2e3e..0000000
--- a/src/java/org/apache/lenya/cms/task/AntTask.java
+++ /dev/null
@@ -1,249 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.task;
-
-import java.io.File;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.GregorianCalendar;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.apache.avalon.framework.parameters.ParameterException;
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.lenya.cms.ant.LenyaProject;
-import org.apache.lenya.cms.publishing.PublishingEnvironment;
-import org.apache.lenya.util.NamespaceMap;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.ProjectHelper;
-import org.apache.tools.ant.XmlLogger;
-
-/**
- * An object of this class is used to execute Ant tasks. The task parameters are:
- * 
- * <ul>
- * <li><code><strong>publication-id</strong></code>: the publication ID</li>
- * <li><code><strong>buildfile</strong> (optional)</code>: the location of the build file
- * relative to the publication directory. If this parameter is not provided, the file is loaded from
- * {@link #DEFAULT_BUILDFILE}.</li>
- * <li><code><strong>target</strong> (optional)</code>: the build target. If this parameter is
- * not provided, the default target is executed.</li>
- * <li><code><strong>ant.*</strong></code>: the command-line parameters for Ant <strong>(not
- * implemented yet!) </strong></li>
- * <li><code><strong>properties.*</strong></code>: the project properties</li>
- * </ul>
- */
-public class AntTask extends AbstractTask {
-    
-    /**
-     * Executes an Ant target.
-     * 
-     * @param buildFile The build XML file.
-     * @param target The name of the target to execute.
-     * @param arguments A map mapping the command-line arguments to their values.
-     * @param properties A map mapping the project properties to their values.
-     * @param servletContextPath The context-path of the servlet
-     * @param contextPrefix The context-prefix of the servlet
-     * @param publicationId The publication-id
-     * @param publicationDirectory The directory of the publication
-     * @param logFile The file where the log should go to
-     * 
-     * @throws ExecutionException if the execution failed
-     */
-    public void executeAntTarget(String servletContextPath, String contextPrefix,
-            String publicationId, File publicationDirectory, File buildFile, String target,
-            Map arguments, Map properties, File logFile) throws ExecutionException {
-        Project project = new LenyaProject(getServiceManager());
-        project.setCoreLoader(getClass().getClassLoader());
-
-        Throwable error = null;
-
-        try {
-            // create task log directory if it doesn't exist
-            File logDirectory = logFile.getParentFile();
-
-            if (!logDirectory.exists()) {
-                logDirectory.mkdirs();
-            }
-
-            project.setUserProperty("XmlLogger.file", logFile.getAbsolutePath());
-
-            XmlLogger logger = new XmlLogger();
-            project.addBuildListener(logger);
-            project.fireBuildStarted();
-
-            project.init();
-            project.setBaseDir(publicationDirectory);
-
-            ProjectHelper helper = ProjectHelper.getProjectHelper();
-            helper.parse(project, buildFile);
-
-            project.setUserProperty(PUBLICATION_DIRECTORY, publicationDirectory.getAbsolutePath());
-            project.setUserProperty(PUBLICATION_ID, publicationId);
-            project.setUserProperty(SERVLET_CONTEXT_PATH, servletContextPath);
-            project.setUserProperty(CONTEXT_PREFIX, contextPrefix);
-
-            String key;
-            String value;
-            Map.Entry entry;
-
-            for (Iterator iter = properties.entrySet().iterator(); iter.hasNext();) {
-                entry = (Map.Entry) iter.next();
-                key = (String) entry.getKey();
-                value = (String) entry.getValue();
-                project.setUserProperty(key, value);
-            }
-
-            if (target == null) {
-                target = project.getDefaultTarget();
-            }
-
-            project.executeTarget(target);
-        } catch (BuildException e) {
-            error = e;
-            throw new ExecutionException(e);
-        } finally {
-            project.fireBuildFinished(error);
-        }
-    }
-
-    /**
-     * Returns the filename of the logfile to write.
-     * @param publicationDirectory for which publication the filename of the logfile is requested
-     * @return the file path for the log file
-     */
-    protected File getDefaultLogFile(File publicationDirectory) {
-        Calendar now = new GregorianCalendar();
-
-        return new File(publicationDirectory, LOG_PATH + dateFormat.format(now.getTime()) + ".xml");
-    }
-
-    /**
-     * <code>dateFormat</code> The date format
-     */
-    public static final DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss-SSS");
-    /**
-     * <code>PUBLICATION_DIRECTORY</code> The publication directory
-     */
-    public static final String PUBLICATION_DIRECTORY = "pub.dir";
-    /**
-     * <code>PUBLICATION_ID</code> The publication id
-     */
-    public static final String PUBLICATION_ID = "pub.id";
-    /**
-     * <code>SERVLET_CONTEXT_PATH</code> The servlet context path
-     */
-    public static final String SERVLET_CONTEXT_PATH = "servlet.context";
-    /**
-     * <code>CONTEXT_PREFIX</code> The context prefix
-     */
-    public static final String CONTEXT_PREFIX = "context.prefix";
-    /**
-     * <code>BUILDFILE</code> The build file
-     */
-    public static final String BUILDFILE = "buildfile";
-    /**
-     * <code>TARGET</code> The target
-     */
-    public static final String TARGET = "target";
-    /**
-     * <code>ANT_PREFIX</code> The ant prefix
-     */
-    public static final String ANT_PREFIX = "ant";
-    /**
-     * <code>PROPERTIES_PREFIX</code> The properties prefix
-     */
-    public static final String PROPERTIES_PREFIX = "properties";
-    /**
-     * <code>DEFAULT_BUILDFILE</code> The default build file
-     */
-    public static final String DEFAULT_BUILDFILE = "config/tasks/targets.xml";
-    /**
-     * <code>LOG_PATH</code> The log path
-     */
-    public static final String LOG_PATH = "logs/tasks/".replace('/', File.separatorChar);
-    /**
-     * <code>PARAMETER_LOGFILE</code> The log file parameter
-     */
-    public static final String PARAMETER_LOGFILE = "logfile";
-
-    /**
-     * Execute the task. All parameters must have been set with parameterize().
-     * @param servletContextPath The servlet context path.
-     * @throws ExecutionException when the execution of the task failed.
-     */
-    public void execute(String servletContextPath) throws ExecutionException {
-        String publicationId;
-        File publicationDirectory;
-        String contextPrefix;
-        File buildFile;
-        String target;
-        Map arguments;
-        Map properties;
-        File logFile;
-
-        try {
-            String buildFileName = getParameters().getParameter("buildfile", DEFAULT_BUILDFILE)
-                    .replace('/', File.separatorChar);
-
-            publicationId = getParameters().getParameter(PARAMETER_PUBLICATION_ID);
-            contextPrefix = getParameters().getParameter(PARAMETER_CONTEXT_PREFIX);
-
-            if (publicationId.equals("")) {
-                publicationDirectory = new File(".");
-                buildFile = new File(buildFileName);
-            } else {
-                PublishingEnvironment environment = new PublishingEnvironment(servletContextPath,
-                        publicationId);
-                publicationDirectory = environment.getPublicationDirectory();
-                buildFile = new File(publicationDirectory, buildFileName);
-            }
-
-            target = getParameters().getParameter(TARGET, null);
-
-            Map parametersMap = Parameters.toProperties(getParameters());
-
-            NamespaceMap antMap = new NamespaceMap(parametersMap, ANT_PREFIX);
-            arguments = antMap.getMap();
-
-            NamespaceMap propertiesMap = new NamespaceMap(parametersMap, PROPERTIES_PREFIX);
-            properties = propertiesMap.getMap();
-
-            // set logfile
-            String logFilename = getParameters().getParameter(PARAMETER_LOGFILE,
-                    getDefaultLogFile(publicationDirectory).getAbsolutePath());
-            logFile = new File(logFilename);
-        } catch (ParameterException e) {
-            throw new ExecutionException(e);
-        }
-
-        executeAntTarget(servletContextPath,
-                contextPrefix,
-                publicationId,
-                publicationDirectory,
-                buildFile,
-                target,
-                arguments,
-                properties,
-                logFile);
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/task/CommandLineTask.java b/src/java/org/apache/lenya/cms/task/CommandLineTask.java
deleted file mode 100644
index 3c94c28..0000000
--- a/src/java/org/apache/lenya/cms/task/CommandLineTask.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.task;
-
-/**
- * A command line task
- */
-public class CommandLineTask extends AbstractTask {
-
-    /** 
-     * Execute the task. All parameters must have been set with parameterize().
-     * @see org.apache.lenya.cms.task.Task#execute(java.lang.String)
-     */
-    public void execute(String path) throws ExecutionException {
-        String command = getParameters().getParameter("command",
-                "echo \"Exception: No command parameter\"");
-
-        try {
-            Process process = Runtime.getRuntime().exec(command);
-
-            java.io.InputStream in = process.getInputStream();
-            byte[] buffer = new byte[1024];
-            int bytes_read = 0;
-            java.io.ByteArrayOutputStream baout = new java.io.ByteArrayOutputStream();
-
-            while ((bytes_read = in.read(buffer)) != -1) {
-                baout.write(buffer, 0, bytes_read);
-            }
-
-            if (baout.toString().length() > 0) {
-                throw new ExecutionException("%%%InputStream:S" + baout.toString() +
-                    "END:InputStream%%%");
-            }
-
-            java.io.InputStream in_e = process.getErrorStream();
-            java.io.ByteArrayOutputStream baout_e = new java.io.ByteArrayOutputStream();
-
-            while ((bytes_read = in_e.read(buffer)) != -1) {
-                baout_e.write(buffer, 0, bytes_read);
-            }
-
-            if (baout_e.toString().length() > 0) {
-                throw new ExecutionException("###ErrorStream:START" + baout_e.toString() +
-                    "END:ErrorStream###");
-            }
-        } catch (java.io.IOException e) {
-            throw new ExecutionException(e);
-        }
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/task/DefaultTaskWrapper.java b/src/java/org/apache/lenya/cms/task/DefaultTaskWrapper.java
deleted file mode 100644
index 9f45be3..0000000
--- a/src/java/org/apache/lenya/cms/task/DefaultTaskWrapper.java
+++ /dev/null
@@ -1,375 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.task;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.parameters.ParameterException;
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.cocoon.environment.Request;
-import org.apache.lenya.ac.Identity;
-import org.apache.lenya.ac.Role;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.util.NamespaceMap;
-import org.apache.lenya.xml.NamespaceHelper;
-import org.apache.log4j.Logger;
-import org.w3c.dom.Element;
-import org.xml.sax.SAXException;
-
-/**
- * The default task wrapper
- */
-public class DefaultTaskWrapper implements TaskWrapper {
-
-    private static Logger log = Logger.getLogger(DefaultTaskWrapper.class);
-
-    private Map parameters = new HashMap();
-    private TaskWrapperParameters wrapperParameters =
-        new TaskWrapperParameters(getParameterObject());
-    private TaskParameters taskParameters = new TaskParameters(getParameterObject());
-
-    private ServiceManager manager;
-    
-    /**
-     * Default ctor for subclasses.
-     * @param manager The service manager to use.
-     */
-    protected DefaultTaskWrapper(ServiceManager manager) {
-        this.manager = manager;
-    }
-
-    /**
-     * Ctor to be called when all task wrapper parameters are known.
-     * All keys and values must be strings or string arrays.
-     * @param _parameters The prefixed parameters.
-     * @param manager The service manager to use.
-     */
-    public DefaultTaskWrapper(Map _parameters, ServiceManager manager) {
-        this(manager);
-        log.debug("Creating");
-
-        List keys = new ArrayList();
-        for (Iterator i = _parameters.keySet().iterator(); i.hasNext();) {
-            String key = (String) i.next();
-            keys.add(key);
-        }
-
-        Collections.sort(keys);
-
-        for (Iterator i = keys.iterator(); i.hasNext();) {
-            String key = (String) i.next();
-            StringBuffer buf = new StringBuffer();
-            String value = null;
-            Object valueObject = _parameters.get(key);
-            if (valueObject instanceof String) {
-                buf.append(((String) valueObject).trim());
-            } else if (valueObject instanceof String[]) {
-                String[] values = (String[]) valueObject;
-                for (int j = 0; j < values.length; j++) {
-                    if (j > 0 && !"".equals(buf.toString())) {
-                        buf.append(",");
-                    }
-                    buf.append(values[j].trim());
-                }
-            } else {
-                log.debug("Not a string value: [" + key + "] = [" + valueObject + "]");
-            }
-
-            value = buf.toString();
-            if (value != null) {
-                log.debug("Setting parameter: [" + key + "] = [" + value + "]");
-                this.parameters.put(key, value);
-            }
-        }
-
-    }
-
-    /**
-     * Ctor.
-     * Restores the wrapper parameters from an XML element.
-     * @param parent The parent of the task wrapper element.
-     * @param helper The namespace helper of the document.
-     */
-    public DefaultTaskWrapper(NamespaceHelper helper, Element parent) {
-        log.debug("Creating");
-        restore(helper, parent);
-    }
-
-    /**
-     * Initializes the task wrapper.
-     * @param taskId The task ID.
-     * @param publication The publication.
-     * @param webappUrl The webapp URL.
-     * @param _parameters The task parameters.
-     * @throws ExecutionException when the task ID is null.
-     */
-    protected void initialize(
-        String taskId,
-        Publication publication,
-        String webappUrl,
-        Parameters _parameters)
-        throws ExecutionException {
-        log.debug("Initializing");
-
-        if (taskId.equals("")) throw new ExecutionException();
-
-        getTaskParameters().setPublication(publication);
-        getWrapperParameters().setWebappUrl(webappUrl);
-
-        getWrapperParameters().setTaskId(taskId);
-        getTaskParameters().parameterize(_parameters);
-    }
-
-    /**
-     * Extracts the task parameters from the given objects.
-     * @param _parameters A parameters object.
-     * @param publication A publication.
-     * @param request A request.
-     * @return A parameters object.
-     */
-    protected Parameters extractTaskParameters(
-        Parameters _parameters,
-        Publication publication,
-        Request request) {
-        Parameters _taskParameters = new Parameters();
-        _taskParameters.setParameter(
-            Task.PARAMETER_SERVLET_CONTEXT,
-            publication.getServletContext().getAbsolutePath());
-        _taskParameters.setParameter(Task.PARAMETER_CONTEXT_PREFIX, request.getContextPath());
-        _taskParameters.setParameter(
-            Task.PARAMETER_SERVER_PORT,
-            Integer.toString(request.getServerPort()));
-        _taskParameters.setParameter(Task.PARAMETER_SERVER_URI, "http://" + request.getServerName());
-        _taskParameters.setParameter(Task.PARAMETER_PUBLICATION_ID, publication.getId());
-
-        for (Enumeration e = request.getParameterNames(); e.hasMoreElements();) {
-            String key = (String) e.nextElement();
-            String value = request.getParameter(key);
-            if (value != null) {
-                _taskParameters.setParameter(key, value);
-            }
-        }
-
-        String[] names = _parameters.getNames();
-        for (int i = 0; i < names.length; i++) {
-            String name = names[i];
-            String value = _parameters.getParameter(name, "");
-            if (value != null) {
-                _taskParameters.setParameter(name, value);
-            }
-        }
-        return _taskParameters;
-    }
-
-    /**
-     * Enables workflow transition invocation.
-     * @param eventName The event name.
-     * @param identity The identity that executes the task.
-     * @param roles The roles of the identity.
-     */
-    public void setWorkflowAware(String eventName, Identity identity, Role[] roles) {
-        NamespaceMap workflowParameters =
-            WorkflowInvoker.extractParameters(eventName, identity, roles);
-        getParameterObject().putAll(workflowParameters.getPrefixedMap());
-    }
-
-    /**
-     * Executes the task.
-     * @throws ExecutionException when something went wrong.
-     */
-    public void execute() throws ExecutionException {
-
-        String taskId = getWrapperParameters().getTaskId();
-
-        if (taskId == null) {
-            throw new ExecutionException("No task id provided!");
-        }
-
-        log.info("===================================");
-        log.info(" Executing task [" + taskId + "]");
-        log.info("-----------------------------------");
-
-        if (!this.wrapperParameters.isComplete()) {
-
-            String[] missingKeys = getWrapperParameters().getMissingKeys();
-            String keyString = "";
-            for (int i = 0; i < missingKeys.length; i++) {
-                if (i > 0) {
-                    keyString += ", ";
-                }
-                keyString += missingKeys[i];
-            }
-            throw new ExecutionException("Parameters missing: [" + keyString + "]");
-        }
-
-        TaskManager manager;
-
-        Publication publication = getTaskParameters().getPublication();
-
-        WorkflowInvoker workflowInvoker = new WorkflowInvoker(getParameters(), this.manager);
-        workflowInvoker.setup(publication, getWrapperParameters().getWebappUrl());
-
-        Task task;
-        try {
-            manager = new TaskManager(publication.getDirectory().getAbsolutePath(), this.manager);
-            task = manager.getTask(taskId);
-
-            Properties properties = new Properties();
-            properties.putAll(getTaskParameters().getMap());
-            Parameters _parameters = Parameters.fromProperties(properties);
-
-            task.parameterize(_parameters);
-        } catch (final ConfigurationException e) {
-            throw new ExecutionException(e);
-        } catch (final ParameterException e) {
-            throw new ExecutionException(e);
-        } catch (final SAXException e) {
-            throw new ExecutionException(e);
-        } catch (final IOException e) {
-            throw new ExecutionException(e);
-        } catch (ExecutionException e) {
-            throw e;
-        }
-
-		log.debug("-----------------------------------");
-		log.debug(" Triggering workflow");
-		log.debug("-----------------------------------");
-		
-        //FIXME The new workflow is set before the end of the transition because the document id
-        // and so the document are sometimes changing during the transition (ex archiving , ...) 
-        workflowInvoker.invokeTransition();
-
-		log.debug("-----------------------------------");
-		log.debug(" Triggering task");
-		log.debug("-----------------------------------");
-		
-        task.execute(publication.getServletContext().getAbsolutePath());
-
-		log.debug("-----------------------------------");
-		log.debug(" Triggering notification");
-		log.debug("-----------------------------------");
-        Notifier notifier = new Notifier(manager, getParameters());
-        notifier.sendNotification(getTaskParameters());
-
-		log.debug("-----------------------------------");
-		log.debug(" Executing task finished.");
-		log.debug("===================================\n\n");
-    }
-
-    /**
-     * Returns the task wrapper parameters.
-     * @return A task wrapper parameters object.
-     */
-    public TaskWrapperParameters getWrapperParameters() {
-        return this.wrapperParameters;
-    }
-
-    /**
-     * Returns the task parameters.
-     * @return A task parameters object.
-     */
-    public TaskParameters getTaskParameters() {
-        return this.taskParameters;
-    }
-
-    protected static final String ELEMENT_TASK = "task";
-    protected static final String ELEMENT_PARAMETER = "parameter";
-    protected static final String ATTRIBUTE_NAME = "name";
-    protected static final String ATTRIBUTE_VALUE = "value";
-
-    /**
-     * Saves the wrapper parameters to an XML element.
-     * @param helper The namespace helper of the document.
-     * @return An XML element.
-     */
-    public Element save(NamespaceHelper helper) {
-        org.w3c.dom.Document document = helper.getDocument();
-        NamespaceHelper taskHelper =
-            new NamespaceHelper(Task.NAMESPACE, Task.DEFAULT_PREFIX, document);
-        Element element = taskHelper.createElement(ELEMENT_TASK);
-        
-        List keys = new ArrayList(getParameters().keySet());
-        Collections.sort(keys);
-
-        for (Iterator i = keys.iterator(); i.hasNext();) {
-            String key = (String) i.next();
-            Element parameterElement = taskHelper.createElement(ELEMENT_PARAMETER);
-            parameterElement.setAttribute(ATTRIBUTE_NAME, key);
-            parameterElement.setAttribute(ATTRIBUTE_VALUE, (String) getParameters().get(key));
-            element.appendChild(parameterElement);
-        }
-
-        return element;
-    }
-
-    /**
-     * Restores the wrapper parameters from an XML element.
-     * @param parent The parent of the task wrapper element.
-     * @param helper The namespace helper of the document.
-     */
-    public void restore(NamespaceHelper helper, Element parent) {
-        org.w3c.dom.Document document = helper.getDocument();
-        NamespaceHelper taskHelper =
-            new NamespaceHelper(Task.NAMESPACE, Task.DEFAULT_PREFIX, document);
-        Element taskElement = taskHelper.getFirstChild(parent, ELEMENT_TASK);
-        Element[] parameterElements = taskHelper.getChildren(taskElement, ELEMENT_PARAMETER);
-        for (int i = 0; i < parameterElements.length; i++) {
-            String key = parameterElements[i].getAttribute(ATTRIBUTE_NAME);
-            String value = parameterElements[i].getAttribute(ATTRIBUTE_VALUE);
-            getParameterObject().put(key, value);
-        }
-    }
-
-    /**
-     * Returns all prefixed parameters.
-     * @return A map.
-     */
-    public Map getParameters() {
-        return Collections.unmodifiableMap(this.parameters);
-    }
-
-    /**
-     * Returns all prefixed parameters.
-     * @return A map.
-     */
-    protected Map getParameterObject() {
-        return this.parameters;
-    }
-
-    /**
-     * Sets the notification parameters.
-     * @param notificationParameters The notification parameters.
-     */
-    protected void setNotifying(NamespaceMap notificationParameters) {
-        log.info("Enabling notification");
-        getParameterObject().putAll(notificationParameters.getPrefixedMap());
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/task/EmptyTask.java b/src/java/org/apache/lenya/cms/task/EmptyTask.java
deleted file mode 100644
index 11e46de..0000000
--- a/src/java/org/apache/lenya/cms/task/EmptyTask.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.task;
-
-/**
- * The empty task
- */
-public class EmptyTask extends AbstractTask {
-
-    /** 
-     * @see org.apache.lenya.cms.task.Task#execute(java.lang.String)
-     */
-    public void execute(String servletContextPath) throws ExecutionException {
-	    // do nothing
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/task/ExecutionException.java b/src/java/org/apache/lenya/cms/task/ExecutionException.java
deleted file mode 100644
index 6c631ec..0000000
--- a/src/java/org/apache/lenya/cms/task/ExecutionException.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.task;
-
-
-/**
- * An Exception that is thrown when an error occurs during a task execution.
- */
-public class ExecutionException extends Exception {
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/** Creates a new instance of ExecutionException */
-    public ExecutionException() {
-	    // do nothing
-    }
-
-    /** Creates a new instance of ExecutionException 
-     * @param message the exception message 
-     */
-    public ExecutionException(String message) {
-        super(message);
-    }
-
-    /** Creates a new instance of ExecutionException 
-     * @param message the exception message
-     * @param cause the exception cause
-     */
-    public ExecutionException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    /** Creates a new instance of ExecutionException
-     * @param cause the exception cause
-     */
-    public ExecutionException(Throwable cause) {
-        super(cause);
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/task/HelloWorldTask.java b/src/java/org/apache/lenya/cms/task/HelloWorldTask.java
deleted file mode 100644
index b299de1..0000000
--- a/src/java/org/apache/lenya/cms/task/HelloWorldTask.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.task;
-
-
-/**
- * A simple task to demonstrate the task behaviour. It outputs a string to the log4j log file. The
- * following parameter can be provided:<br/
- * ><code><strong>text</strong></code>: the string to be printed<br/
- * > If the parameter is omitted, "Hello World" is printed.
- */
-public class HelloWorldTask extends AbstractTask {
-    /**
-     * Creates a new instance of HelloWorldTask
-     */
-    public HelloWorldTask() {
-	    // do nothing
-    }
-
-    /**
-     * @see org.apache.lenya.cms.task.Task#execute(java.lang.String)
-     */
-    public void execute(String path) throws ExecutionException {
-        // do nothing
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/task/LuceneTask.java b/src/java/org/apache/lenya/cms/task/LuceneTask.java
deleted file mode 100644
index 6c8e5eb..0000000
--- a/src/java/org/apache/lenya/cms/task/LuceneTask.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/* $Id$  */
-
-package org.apache.lenya.cms.task;
-
-import org.apache.avalon.framework.parameters.ParameterException;
-import org.apache.log4j.Logger;
-
-import java.io.File;
-
-import org.apache.lenya.lucene.index.Index;
-import org.apache.lenya.lucene.index.Indexer;
-
-/**
- * Lucene Task
- */
-public class LuceneTask extends AbstractTask {
-    private static final Logger log = Logger.getLogger(LuceneTask.class);
-
-    /**
-     * @see org.apache.lenya.cms.task.Task#execute(java.lang.String)
-     */
-    public void execute(String servletContextPath) throws ExecutionException {
-        Indexer indexer;
-        String files;
-        try {
-            //outputParameters();
-
-            log.debug("Servlet context path: " + servletContextPath);
-
-            String publicationId = getParameters().getParameter("publication-id");
-            log.debug("Publication ID: " + publicationId);
-
-            files = getParameters().getParameter("properties.files2index");
-            log.debug("Files 2 index: " + files);
-
-            String luceneConfig = getParameters().getParameter("config");
-            log.debug("Lucene configuration: " + luceneConfig);
-
-            String luceneConfigAbsolutePath = servletContextPath + File.separator + "lenya" + File.separator + "pubs" + File.separator + publicationId  + File.separator + luceneConfig;
-            log.debug("Lucene configuration: " + luceneConfigAbsolutePath);
-
-            indexer = Index.getIndexer(luceneConfigAbsolutePath);
-    	    indexer.indexDocument(new File(files));
-        } catch (final ParameterException e) {
-            log.error("" +e.toString());
-            throw new ExecutionException(e);
-        } catch (Exception e) {
-            log.error("" +e.toString());
-            throw new ExecutionException(e);
-        }
-    }
-
-    /**
-     * Output parameters for debugging
-     * @throws Exception if an error occurs
-     * FIXME don't throw Exception here
-     */
-    public void outputParameters() throws Exception {
-        String[] names = getParameters().getNames();
-        for (int i = 0; i < names.length; i++) {
-            log.error("Name: " + names[i]);
-            log.error("Value: " + getParameters().getParameter(names[i]));
-        }
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/task/Notifier.java b/src/java/org/apache/lenya/cms/task/Notifier.java
deleted file mode 100644
index 1fe443d..0000000
--- a/src/java/org/apache/lenya/cms/task/Notifier.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.task;
-
-import java.util.Iterator;
-import java.util.Map;
-
-import org.apache.avalon.framework.parameters.ParameterException;
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.lenya.util.NamespaceMap;
-import org.apache.log4j.Logger;
-
-/**
- * Task Notification
- */
-public class Notifier extends ParameterWrapper {
-
-    private static Logger log = Logger.getLogger(Notifier.class);
-
-    /**
-     * <code>PREFIX</code> Notification namespace prefix
-     */
-    public static final String PREFIX = "notification";
-    /**
-     * <code>TARGET</code> Notification target
-     */
-    public static final String TARGET = "notification";
-    /**
-     * <code>PARAMETER_TO</code> To Parameter
-     */
-    public static final String PARAMETER_TO = "tolist";
-    /**
-     * <code>PARAMETER_FROM</code> From Parameter
-     */
-    public static final String PARAMETER_FROM = "from";
-
-    private TaskManager taskManager;
-
-    /**
-     * Ctor.
-     * @param _taskManager The task manager.
-     * @param parameters The task wrapper parameters.
-     */
-    public Notifier(TaskManager _taskManager, Map parameters) {
-        super(parameters);
-        this.taskManager = _taskManager;
-    }
-
-    /**
-     * Sends the notification message.
-     * @param taskParameters The task parameters.
-     * @throws ExecutionException when something went wrong.
-     */
-    public void sendNotification(TaskParameters taskParameters) throws ExecutionException {
-
-        if (getMap().isEmpty()) {
-            log.info("Not sending notification: no parameters provided.");
-        } else if ("".equals(get(PARAMETER_TO).trim())) {
-            log.info("Not sending notification: empty notification.tolist parameter.");
-        }
-        else {
-            log.info("Sending notification");
-            
-            Task task = this.taskManager.getTask(TaskManager.ANT_TASK);
-
-            Parameters params = new Parameters();
-
-            params.setParameter(AntTask.TARGET, TARGET);
-            
-            String[] keys =
-                {
-                    Task.PARAMETER_PUBLICATION_ID,
-                    Task.PARAMETER_CONTEXT_PREFIX,
-                    Task.PARAMETER_SERVER_PORT,
-                    Task.PARAMETER_SERVER_URI,
-                    Task.PARAMETER_SERVLET_CONTEXT };
-
-            for (int i = 0; i < keys.length; i++) {
-                params.setParameter(keys[i], taskParameters.get(keys[i]));
-            }
-
-            NamespaceMap mailMap = new NamespaceMap(PREFIX);
-            mailMap.putAll(getMap());
-            NamespaceMap propertiesMap = new NamespaceMap(AntTask.PROPERTIES_PREFIX);
-            propertiesMap.putAll(mailMap.getPrefixedMap());
-
-            Map prefixMap = propertiesMap.getPrefixedMap();
-			String		key;
-			String		value;
-			Map.Entry	entry;
-
-			for (Iterator iter = prefixMap.entrySet().iterator(); iter.hasNext();) {
-				entry 	= (Map.Entry)iter.next();
-				key 	= (String)entry.getKey();
-				value 	= (String)entry.getValue();
-                String trimmedValue = value.replace((char) 160, ' ');
-                trimmedValue = trimmedValue.trim();
-                if (log.isDebugEnabled()) {
-                    log.debug("Trimming value [" + value + "] to [" + trimmedValue + "]");
-                    log.debug("First character: [" + value.charAt(0) + "] = [" + (int) value.charAt(0) + "]");
-                }
-                params.setParameter(key, trimmedValue);
-            }
-
-            try {
-                task.parameterize(params);
-            } catch (ParameterException e) {
-                throw new ExecutionException(e);
-            }
-            log.info("    Executing notification target ...");
-            try {
-                task.execute(taskParameters.get(Task.PARAMETER_SERVLET_CONTEXT));
-            }
-            catch (Exception e) {
-                log.error("Error during notification: ", e);
-            }
-            log.info("    Notification target executed.");
-        }
-    }
-
-    /**
-     * Returns the task manager.
-     * @return A task manager.
-     */
-    protected TaskManager getTaskManager() {
-        return this.taskManager;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.task.ParameterWrapper#getPrefix()
-     */
-    public String getPrefix() {
-        return PREFIX;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.task.ParameterWrapper#getRequiredKeys()
-     */
-    protected String[] getRequiredKeys() {
-        String[] requiredKeys = { };
-        return requiredKeys;
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/task/ParameterWrapper.java b/src/java/org/apache/lenya/cms/task/ParameterWrapper.java
deleted file mode 100644
index 06a2ae5..0000000
--- a/src/java/org/apache/lenya/cms/task/ParameterWrapper.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.task;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.lenya.util.NamespaceMap;
-import org.apache.log4j.Logger;
-
-/**
- * Parameter wrapper class
- */
-public abstract class ParameterWrapper {
-    
-    private static Logger log = Logger.getLogger(ParameterWrapper.class);
-    private NamespaceMap parameters;
-    
-    /**
-     * Returns the un-prefixed parameters.
-     * @return A map.
-     */
-    public Map getMap() {
-        return this.parameters.getMap();
-    }
-
-    /**
-     * Ctor.
-     * @param prefixedParameters The prefixed parameters to wrap.
-     */
-    public ParameterWrapper(Map prefixedParameters) {
-        this.parameters = new NamespaceMap(prefixedParameters, getPrefix());
-    }
-    
-    /**
-     * Returns the namespace prefix.
-     * @return A string.
-     */
-    public abstract String getPrefix();
-    
-    /**
-     * Adds a key-value pair. If the value is null, no pair is added.
-     * @param key The key.
-     * @param value The value.
-     */
-    public void put(String key, String value) {
-        if (value != null) {
-            log.debug("Setting parameter: [" + key + "] = [" + value + "]");
-            this.parameters.put(key, value);
-        }
-        else {
-            log.debug("Not setting parameter: [" + key + "] = [" + value + "]");
-        }
-    }
-    
-    /**
-     * Returns the value for a key.
-     * @param key The key.
-     * @return The value.
-     */
-    public String get(String key) {
-        return (String) this.parameters.get(key);
-    }
-    
-    /**
-     * Returns the required keys.
-     * @return A string array.
-     */
-    protected abstract String[] getRequiredKeys();
-    
-    /**
-     * Checks if this parameters object contains all necessary parameters.
-     * @return A boolean value.
-     */
-    public boolean isComplete() {
-        boolean complete = true;
-        Map parameterMap = getMap();
-        String[] requiredKeys = getRequiredKeys();
-        int i = 0;
-        while (complete && i < requiredKeys.length) {
-            log.debug("Checking parameter: [" + requiredKeys[i] + "]");
-            complete = complete && parameterMap.containsKey(requiredKeys[i]);
-            log.debug("OK: [" + complete + "]");
-            i++;
-        }
-        return complete;
-    }
-
-    /**
-     * Returns the missing parameters parameters.
-     * @return A string array.
-     */
-    public String[] getMissingKeys() {
-        String[] requiredKeys = getRequiredKeys();
-        Map parameterMap = getMap();
-        List keyList = new ArrayList();
-        for (int i = 0; i < requiredKeys.length; i++) {
-            if (!parameterMap.containsKey(requiredKeys[i])) {
-                keyList.add(requiredKeys[i]);
-            }
-        }
-        return (String[]) keyList.toArray(new String[keyList.size()]);
-    }
-    
-    /**
-     * Parameterizes this wrapper with un-prefixed parameters.
-     * @param _parameters A parameters object.
-     */
-    public void parameterize(Parameters _parameters) {
-        String[] keys = _parameters.getNames();
-        for (int i = 0; i < keys.length; i++) {
-            put(keys[i], _parameters.getParameter(keys[i], null));
-        }
-    }
-    
-}
diff --git a/src/java/org/apache/lenya/cms/task/Task.java b/src/java/org/apache/lenya/cms/task/Task.java
deleted file mode 100644
index 2bcce1e..0000000
--- a/src/java/org/apache/lenya/cms/task/Task.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.task;
-
-import org.apache.avalon.framework.parameters.Parameterizable;
-import org.apache.avalon.framework.service.ServiceManager;
-
-/**
- * A Task is a command that can be executed. <br/>
- * When a Task is executed from a TaskAction or initialized from a TaskJob, the default
- * parameters are provided. <strong>This is not a contract!</strong>
- */
-public interface Task extends Parameterizable {
-    
-    /**
-     * <code>NAMESPACE</code> The task namespace
-     */
-    public final static String NAMESPACE = "http://apache.org/cocoon/lenya/task/1.0";
-    /**
-     * <code>DEFAULT_PREFIX</code> The task namespace prefix
-     */
-    public final static String DEFAULT_PREFIX = "task";
-    /**
-     * <code>SUCCESS</code> Success
-     */
-    public final static int SUCCESS = 0;
-    /**
-     * <code>FAILURE</code> Failure
-     */
-    public final static int FAILURE = 1;
-
-    /**
-     * The path of the servlet
-     * context:<br/><code>/home/user_id/build/jakarta-tomcat/webapps/lenyacms</code>
-     */
-    String PARAMETER_SERVLET_CONTEXT = "servlet-context";
-
-    /**
-     * The server
-     * URI:<br/><code><strong>http://www.yourhost.com</strong>:8080/lenya/publication/index.html</code>
-     */
-    String PARAMETER_SERVER_URI = "server-uri";
-
-    /**
-     * The server
-     * port:<br/><code>http://www.yourhost.com:<strong>8080</strong>/lenya/publication/index.html</code>
-     */
-    String PARAMETER_SERVER_PORT = "server-port";
-
-    /**
-     * The part of the URI that precedes the publication
-     * ID:<br/><code>http://www.yourhost.com:8080<strong>/lenya</strong>/publication/index.html</code>
-     */
-    String PARAMETER_CONTEXT_PREFIX = "context-prefix";
-
-    /**
-     * The publication
-     * ID:<br/><code>http://www.yourhost.com:8080/lenya/<strong>publication</strong>/index.html</code>
-     */
-    String PARAMETER_PUBLICATION_ID = "publication-id";
-
-    /**
-     * Execute the task. All parameters must have been set with parameterize().
-     * @param servletContextPath the servlet-context
-     * @throws ExecutionException if the execution fails
-     */
-    void execute(String servletContextPath) throws ExecutionException;
-
-    /**
-     * Set the label that is used to identify the task.
-     * @param label the label
-     */
-    void setLabel(String label);
-    
-    /**
-     * Returns the result of the task ({@link #SUCCESS}, {@link #FAILURE}).
-     * @return #SUCCESS for success, #FAILURE for failure
-     */
-    int getResult();
-    
-    /**
-     * Passes the service manager to the task.
-     * @param manager The service manager.
-     */
-    void service(ServiceManager manager);
-}
diff --git a/src/java/org/apache/lenya/cms/task/TaskFactory.java b/src/java/org/apache/lenya/cms/task/TaskFactory.java
deleted file mode 100644
index dacaa7a..0000000
--- a/src/java/org/apache/lenya/cms/task/TaskFactory.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.task;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.parameters.ParameterException;
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.log4j.Logger;
-
-/**
- * A Task factory
- */
-public class TaskFactory {
-	
-	/**
-	 * Create a new instance of <code>TaskFactory</code>
-	 */
-    protected TaskFactory() {
-        // do nothing
-    }
-
-    private static TaskFactory factory;
-    private static Logger log = Logger.getLogger(TaskFactory.class);
-
-    /**
-     * Get an instance of the task factory
-     * @return A task factory
-     */
-    public static TaskFactory getInstance() {
-        if (factory == null) {
-            factory = new TaskFactory();
-        }
-
-        return factory;
-    }
-
-    /**
-     * Create a task
-     * @param configuration The configuration for the task
-     * @return The task
-     */
-    public Task createTask(Configuration configuration) {
-
-        try {
-            String className = configuration.getAttribute("class",
-                    "org.apache.lenya.cms.task.TaskSequence");
-            Class cl = Class.forName(className);
-            Task task = (Task) cl.newInstance();
-
-            task.setLabel(configuration.getChild("label").getValue("default task"));
-
-            task.parameterize(Parameters.fromConfiguration(configuration));
-
-            if (task instanceof TaskSequence) {
-                ((TaskSequence) task).init(configuration);
-            }
-
-            return task;
-        } catch (final ParameterException e) {
-            log.error("Cannot create Task: ", e);
-            return null;
-        } catch (final ConfigurationException e) {
-            log.error("Cannot create Task: ", e);
-            return null;
-        } catch (final ClassNotFoundException e) {
-            log.error("Cannot create Task: ", e);
-            return null;
-        } catch (final InstantiationException e) {
-            log.error("Cannot create Task: ", e);
-            return null;
-        } catch (final IllegalAccessException e) {
-            log.error("Cannot create Task: ", e);
-            return null;
-        }
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/task/TaskManager.java b/src/java/org/apache/lenya/cms/task/TaskManager.java
deleted file mode 100644
index c260293..0000000
--- a/src/java/org/apache/lenya/cms/task/TaskManager.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.task;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.log4j.Logger;
-import org.xml.sax.SAXException;
-
-/**
- * The task manager
- */
-public class TaskManager implements Configurable {
-    private static Logger log = Logger.getLogger(TaskManager.class);
-    /**
-     * <code>TASK_ELEMENT</code> The task element
-     */
-    public static final String TASK_ELEMENT = "task";
-    /**
-     * <code>TASK_ID_ATTRIBUTE</code> The task id attribute
-     */
-    public static final String TASK_ID_ATTRIBUTE = "id";
-    /**
-     * <code>CONFIGURATION_FILE</code> The path to the configuration file
-     */
-    public static final String CONFIGURATION_FILE =
-        File.separator
-            + "config"
-            + File.separator
-            + "tasks"
-            + File.separator
-            + "tasks.xconf";
-
-    /**
-     * <code>EMTPY_TASK</code> Constant for an empty task
-     */
-    public static final String EMTPY_TASK = "empty";
-    /**
-     * <code>ANT_TASK</code> Constant for an ant task
-     */
-    public static final String ANT_TASK = "ant";
-
-    // maps task-ids to tasks
-    private Map tasks = new HashMap();
-    
-    private ServiceManager manager;
-
-    /**
-     * Creates a new TaskManager object.
-     * @param manager The service manager to use.
-     */
-    public TaskManager(ServiceManager manager) {
-        this.manager = manager;
-    }
-
-    /**
-     * Creates a new instance of TaskManager
-     * @param publicationPath path to publication
-     * @param manager The service manager to use.
-     * @throws ConfigurationException if the configuration failed.
-     * @throws SAXException when parsing the config file failed.
-     * @throws IOException when an I/O error occured.
-     */
-    public TaskManager(String publicationPath, ServiceManager manager)
-        throws ConfigurationException, SAXException, IOException {
-        this(manager);
-        
-        String configurationFilePath = publicationPath + CONFIGURATION_FILE;
-        log.debug("Loading tasks: " + configurationFilePath);
-
-        File configurationFile = new File(configurationFilePath);
-
-        if (configurationFile.isFile()) {
-            DefaultConfigurationBuilder builder =
-                new DefaultConfigurationBuilder();
-            Configuration configuration =
-                builder.buildFromFile(configurationFile);
-            configure(configuration);
-
-        } else {
-            log.info(
-                "Task configuration not loaded - file ["
-                    + configurationFile.getAbsolutePath()
-                    + "] does not exist.");
-        }
-        
-        Task empty = new EmptyTask();
-        empty.service(this.manager);
-        this.tasks.put(EMTPY_TASK, empty);
-        
-        Task ant = new AntTask();
-        ant.service(this.manager);
-        this.tasks.put(ANT_TASK, ant);
-    }
-
-    /**
-     * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
-     */
-    public void configure(Configuration configuration)
-        throws ConfigurationException {
-        log.debug("Creating tasks:");
-
-        // create task list
-        Configuration[] taskConfigurations =
-            configuration.getChildren(TASK_ELEMENT);
-
-        // set task IDs
-        for (int i = 0; i < taskConfigurations.length; i++) {
-            String taskId =
-                taskConfigurations[i].getAttribute(TASK_ID_ATTRIBUTE);
-            log.debug("Creating task '" + taskId + "'");
-
-            Task task =
-                TaskFactory.getInstance().createTask(taskConfigurations[i]);
-            task.service(this.manager);
-            this.tasks.put(taskId, task);
-        }
-    }
-
-    /**
-     * Return all task ids
-     * @return The task ids
-     */
-    public String[] getTaskIds() {
-        return (String[]) this.tasks.keySet().toArray(new String[this.tasks.size()]);
-    }
-
-    /**
-     * Get the task with a given task-id
-     * @param taskId the task-id of the requested task
-     * @return the task
-     * @throws ExecutionException if there is no task with the given task-id.
-     */
-    public Task getTask(String taskId) throws ExecutionException {
-        if (!this.tasks.containsKey(taskId)) {
-            throw new ExecutionException(
-                "Task with ID '" + taskId + "' not found!");
-        }
-
-        return (Task) this.tasks.get(taskId);
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/task/TaskParameters.java b/src/java/org/apache/lenya/cms/task/TaskParameters.java
deleted file mode 100644
index 26334cf..0000000
--- a/src/java/org/apache/lenya/cms/task/TaskParameters.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation
- * 
- * Licensed 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.
- *  
- */
-
-/* $Id$ */
-
-package org.apache.lenya.cms.task;
-
-import java.util.Map;
-
-import org.apache.avalon.framework.logger.ConsoleLogger;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationException;
-import org.apache.lenya.cms.publication.PublicationFactory;
-
-/**
- * Task Parameters
- */
-public class TaskParameters extends ParameterWrapper {
-    /**
-     * <code>REQUIRED_KEYS</code> Required task parameters
-     */
-    public static final String[] REQUIRED_KEYS = { Task.PARAMETER_SERVLET_CONTEXT,
-            Task.PARAMETER_SERVER_URI, Task.PARAMETER_SERVER_PORT, Task.PARAMETER_CONTEXT_PREFIX,
-            Task.PARAMETER_PUBLICATION_ID };
-    /**
-     * <code>PREFIX</code> The task prefix
-     */
-    public static final String PREFIX = "task";
-
-
-    /**
-     * Ctor.
-     * @param prefixedParameters The prefixed parameters .
-     */
-    public TaskParameters(Map prefixedParameters) {
-        super(prefixedParameters);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.task.ParameterWrapper#getPrefix()
-     */
-    public String getPrefix() {
-        return PREFIX;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.task.ParameterWrapper#getRequiredKeys()
-     */
-    protected String[] getRequiredKeys() {
-        return REQUIRED_KEYS;
-    }
-
-    /**
-     * Returns the publication.
-     * @return A publication.
-     * @throws ExecutionException when something went wrong.
-     */
-    public Publication getPublication() throws ExecutionException {
-        Publication publication;
-        try {
-            PublicationFactory factory = PublicationFactory.getInstance(new ConsoleLogger());
-            publication = factory.getPublication(get(Task.PARAMETER_PUBLICATION_ID),
-                    get(Task.PARAMETER_SERVLET_CONTEXT));
-        } catch (PublicationException e) {
-            throw new ExecutionException(e);
-        }
-        return publication;
-    }
-
-    /**
-     * Sets the publication.
-     * @param publication A publication.
-     */
-    public void setPublication(Publication publication) {
-        put(Task.PARAMETER_PUBLICATION_ID, publication.getId());
-        put(Task.PARAMETER_SERVLET_CONTEXT, publication.getServletContext().getAbsolutePath());
-    }
-
-    /**
-     * Sets the servlet context path.
-     * @param servletContextPath A string.
-     */
-    public void setServletContextPath(String servletContextPath) {
-        put(Task.PARAMETER_SERVLET_CONTEXT, servletContextPath);
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/task/TaskSequence.java b/src/java/org/apache/lenya/cms/task/TaskSequence.java
deleted file mode 100644
index 43f8dfe..0000000
--- a/src/java/org/apache/lenya/cms/task/TaskSequence.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.task;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.parameters.ParameterException;
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.log4j.Logger;
-
-
-/**
- * A TaskSequence contains of multiple tasks that are executed successively.
- */
-public class TaskSequence extends AbstractTask {
-    private static Logger log = Logger.getLogger(TaskSequence.class);
-
-    // keeps the task order
-    private Task[] tasks;
-    private TaskManager taskManager;
-
-    /**
-     * Initialize the task
-     * @param configuration The configuration
-     * @throws ConfigurationException if an error occurs
-     */
-    public void init(Configuration configuration) throws ConfigurationException {
-        this.taskManager = new TaskManager(getServiceManager());
-        this.taskManager.configure(configuration);
-
-        // create task list
-        Configuration[] taskConfigurations = configuration.getChildren(TaskManager.TASK_ELEMENT);
-        this.tasks = new Task[taskConfigurations.length];
-
-        // set task IDs
-        for (int i = 0; i < this.tasks.length; i++) {
-            String taskId = taskConfigurations[i].getAttribute(TaskManager.TASK_ID_ATTRIBUTE);
-
-            try {
-                this.tasks[i] = this.taskManager.getTask(taskId);
-            } catch (ExecutionException e) {
-                throw new ConfigurationException("Sequence initialization failed: ", e);
-            }
-
-            log.debug("Adding task '" + taskId + "' to sequence.");
-        }
-    }
-
-    /**
-     * Returns the tasks in this sequence.
-     * @return The tasks
-     */
-    public Task[] getTasks() {
-        return (Task[]) this.tasks.clone();
-    }
-
-    /**
-     * Returns the TaskManager that is used to manage the tasks of this TaskSequence.
-     * @return The task manager
-     */
-    protected TaskManager getTaskManager() {
-        return this.taskManager;
-    }
-
-    /**
-     * Returns the ID of a specific Task.
-     * @param task the specific task for which the task id is requested.
-     * @return the task id of the given task
-     * @throws ExecutionException if the task could not be found.
-     */
-    public String getTaskId(Task task) throws ExecutionException {
-        String[] taskIds = getTaskManager().getTaskIds();
-
-        for (int j = 0; j < taskIds.length; j++) {
-            if (getTaskManager().getTask(taskIds[j]) == task) {
-                return taskIds[j];
-            }
-        }
-
-        throw new IllegalStateException("Task-ID for " + task + " not found!");
-    }
-
-    /**
-     * Executes the tasks.
-     * @param path The path to the tasks
-     * @throws ExecutionException if the execution fails
-     */
-    public void execute(String path) throws ExecutionException {
-
-        try {
-            Task[] _tasks = getTasks();
-
-            for (int i = 0; i < _tasks.length; i++) {
-                Task task = _tasks[i];
-                String taskId = getTaskId(task);
-                log.debug("Executing task '" + taskId + "'");
-
-                // create task parameters
-                Parameters taskParameters = new Parameters();
-                String[] names = getParameters().getNames();
-
-                for (int parIndex = 0; parIndex < names.length; parIndex++) {
-                    String name = names[parIndex];
-                    boolean useParameter = true;
-
-                    if (useParameter) {
-                        taskParameters.setParameter(name, getParameters().getParameter(name));
-                    }
-                }
-
-                // execute task
-                task.parameterize(taskParameters);
-                task.execute(path);
-            }
-        } catch (final IllegalStateException e) {
-            log.error("Cannot execute TaskSequence: ", e);
-            throw new ExecutionException(e);
-        } catch (final ParameterException e) {
-            log.error("Cannot execute TaskSequence: ", e);
-            throw new ExecutionException(e);
-        } catch (final ExecutionException e) {
-            log.error("Cannot execute TaskSequence: ", e);
-            throw new ExecutionException(e);
-        }
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/task/TaskWrapper.java b/src/java/org/apache/lenya/cms/task/TaskWrapper.java
deleted file mode 100644
index 1e8b8b7..0000000
--- a/src/java/org/apache/lenya/cms/task/TaskWrapper.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.task;
-
-import java.util.Map;
-
-import org.apache.lenya.xml.NamespaceHelper;
-import org.w3c.dom.Element;
-
-/**
- * A TaskWrapper encapsulates all information that is needed to execute a
- * certain task, including e.g. workflow and notification parameters.
- */
-public interface TaskWrapper {
-    
-    /**
-     * Executes the task.
-     * @throws ExecutionException when something went wrong.
-     */
-    void execute() throws ExecutionException;
-    
-    /**
-     * Saves the wrapper parameters to an XML element.
-     * @param helper The namespace helper of the document.
-     * @return An XML element.
-     */
-    Element save(NamespaceHelper helper);
-    
-    /**
-     * @param helper The namespace helper of the document.
-     * Restores the wrapper parameters from an XML element.
-     * @param element An XML element.
-     */
-    void restore(NamespaceHelper helper, Element element);
-    
-    /**
-     * Returns the task wrapper parameters.
-     * @return A map.
-     */
-    Map getParameters();
-    
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/task/TaskWrapperParameters.java b/src/java/org/apache/lenya/cms/task/TaskWrapperParameters.java
deleted file mode 100644
index 992590a..0000000
--- a/src/java/org/apache/lenya/cms/task/TaskWrapperParameters.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.task;
-
-import java.util.Map;
-
-/**
- * The task wrapper parameters
- */
-public class TaskWrapperParameters extends ParameterWrapper {
-
-    /**
-     * <code>TASK_ID</code> The task id
-     */
-    public static final String TASK_ID = "task-id";
-    /**
-     * <code>WEBAPP_URL</code> The webapp URL
-     */
-    public static final String WEBAPP_URL = "webapp-url";
-    /**
-     * <code>PREFIX</code> The prefix
-     */
-    public static final String PREFIX = "wrapper";
-
-    protected static final String[] REQUIRED_KEYS = { TASK_ID, WEBAPP_URL };
-
-
-    /**
-     * Ctor.
-     * @param parameters The parameter map to use.
-     */
-    public TaskWrapperParameters(Map parameters) {
-        super(parameters);
-    }
-
-    /**
-     * Returns the required keys.
-     * @return A string array.
-     */
-    public String[] getRequiredKeys() {
-        return REQUIRED_KEYS;
-    }
-
-    /**
-     * Returns the task ID.
-     * @return A string.
-     */
-    public String getTaskId() {
-        return get(TASK_ID);
-    }
-
-    /**
-     * Returns the webapp URL.
-     * @return A string.
-     */
-    public String getWebappUrl() {
-        return get(WEBAPP_URL);
-    }
-
-    /**
-     * Sets the webapp URL.
-     * @param url A url.
-     */
-    public void setWebappUrl(String url) {
-        put(WEBAPP_URL, url);
-    }
-
-    /**
-     * Sets the task ID.
-     * @param taskId A string.
-     */
-    public void setTaskId(String taskId) {
-        put(TASK_ID, taskId);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.task.ParameterWrapper#getPrefix()
-     */
-    public String getPrefix() {
-        return PREFIX;
-    }
-    
-}
diff --git a/src/java/org/apache/lenya/cms/task/WorkflowInvoker.java b/src/java/org/apache/lenya/cms/task/WorkflowInvoker.java
deleted file mode 100644
index 35dbd30..0000000
--- a/src/java/org/apache/lenya/cms/task/WorkflowInvoker.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation
- * 
- * Licensed 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.
- *  
- */
-
-/* $Id$ */
-
-package org.apache.lenya.cms.task;
-
-import java.util.Map;
-
-import org.apache.avalon.framework.logger.ConsoleLogger;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.lenya.ac.Identity;
-import org.apache.lenya.ac.Machine;
-import org.apache.lenya.ac.Role;
-import org.apache.lenya.ac.User;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentBuildException;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.workflow.WorkflowUtil;
-import org.apache.lenya.util.NamespaceMap;
-import org.apache.log4j.Logger;
-
-/**
- * The workflow invoker
- */
-public class WorkflowInvoker extends ParameterWrapper {
-
-    private static Logger log = Logger.getLogger(WorkflowInvoker.class);
-    private ServiceManager manager;
-
-    /**
-     * <code>ROLES</code> The roles
-     */
-    public static final String ROLES = "roles";
-    /**
-     * <code>USER_ID</code> The user id
-     */
-    public static final String USER_ID = "user-id";
-    /**
-     * <code>MACHINE</code> The machine
-     */
-    public static final String MACHINE = "machine";
-    /**
-     * <code>EVENT</code> The event
-     */
-    public static final String EVENT = "event";
-    /**
-     * <code>PREFIX</code> The workflow namespace prefix
-     */
-    public static final String PREFIX = "workflow";
-    /**
-     * <code>EVENT_REQUEST_PARAMETER</code> The workflow event request parameter
-     */
-    public static final String EVENT_REQUEST_PARAMETER = "workflow.event";
-    /**
-     * <code>LENYA_EVENT_REQUEST_PARAMETER</code> The Lenya event request parameter
-     */
-    public static final String LENYA_EVENT_REQUEST_PARAMETER = "lenya.event";
-
-    /**
-     * Ctor.
-     * 
-     * @param eventName The event name.
-     * @param identity The identity.
-     * @param roles The roles.
-     * @return A namespace map containing the parameters.
-     */
-    public static NamespaceMap extractParameters(String eventName, Identity identity, Role[] roles) {
-        NamespaceMap parameters = new NamespaceMap(PREFIX);
-        log.debug("Extractign workflow invoker parameters.");
-        log.debug("    Event: [" + eventName + "]");
-        parameters.put(EVENT, eventName);
-        setRoles(parameters, roles);
-        setIdentity(parameters, identity);
-        return parameters;
-    }
-
-    /**
-     * Ctor.
-     * 
-     * @param parameters A map containing the prefixed parameters.
-     * @param manager The service manager.
-     */
-    public WorkflowInvoker(Map parameters, ServiceManager manager) {
-        super(parameters);
-        this.manager = manager;
-    }
-
-    /**
-     * Returns the role names.
-     * 
-     * @return A string array.
-     */
-    protected String[] getRoleIDs() {
-        String rolesString = get(ROLES);
-        String[] roleIDs = rolesString.split(",");
-        return roleIDs;
-    }
-
-    /**
-     * Sets the roles.
-     * 
-     * @param parameters A workflow invoker namespace map.
-     * @param roles A role array.
-     */
-    public static void setRoles(NamespaceMap parameters, Role[] roles) {
-
-        StringBuffer buf = new StringBuffer();
-        for (int i = 0; i < roles.length; i++) {
-            if (i > 0) {
-                buf.append(",");
-            }
-            buf.append(roles[i].getId());
-        }
-        String roleString = buf.toString();
-        parameters.put(ROLES, roleString);
-    }
-
-    /**
-     * Sets the identity.
-     * 
-     * @param parameters A workflow invoker namespace map.
-     * @param identity An identity.
-     */
-    public static void setIdentity(NamespaceMap parameters, Identity identity) {
-
-        String userId = "";
-        User user = identity.getUser();
-        if (user != null) {
-            userId = user.getId();
-        }
-        parameters.put(USER_ID, userId);
-
-        String machineIp = "";
-        Machine machine = identity.getMachine();
-        if (machine != null) {
-            machineIp = machine.getIp();
-        }
-        parameters.put(MACHINE, machineIp);
-    }
-
-    /**
-     * Returns the workflow event name.
-     * @return A string.
-     */
-    public String getEventName() {
-        return get(EVENT);
-    }
-
-    /**
-     * Returns the user ID.
-     * @return A string.
-     */
-    public String getUserId() {
-        return get(USER_ID);
-    }
-
-    /**
-     * Returns the machine IP address.
-     * @return A string.
-     */
-    public String getMachineIp() {
-        return get(MACHINE);
-    }
-
-    private Document document;
-
-    /**
-     * Initializes the workflow invoker.
-     * 
-     * @param publication The publication.
-     * @param webappUrl The webapp URL.
-     * @throws ExecutionException when something went wrong.
-     */
-    public void setup(Publication publication, String webappUrl) throws ExecutionException {
-        String eventName = getEventName();
-        if (eventName == null) {
-            log.debug("No workflow event.");
-        } else {
-            log.debug("Workflow event: [" + eventName + "]");
-            // check for workflow instance first (task can initialize the workflow history)
-            try {
-                DocumentIdentityMap map = new DocumentIdentityMap(this.manager, new ConsoleLogger());
-                this.document = map.getFromURL(webappUrl);
-            } catch (DocumentBuildException e) {
-                throw new ExecutionException(e);
-            }
-        }
-    }
-
-    /**
-     * Invokes the transition.
-     * @throws ExecutionException when something went wrong.
-     */
-    public void invokeTransition() throws ExecutionException {
-
-        try {
-            WorkflowUtil.invoke(this.manager, new ConsoleLogger(), this.document, getEventName());
-        } catch (Exception e) {
-            throw new ExecutionException(e);
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.task.ParameterWrapper#getPrefix()
-     */
-    public String getPrefix() {
-        return PREFIX;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.task.ParameterWrapper#getRequiredKeys()
-     */
-    protected String[] getRequiredKeys() {
-        String[] keys = {};
-        return keys;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/usecase/AbstractUsecase.java b/src/java/org/apache/lenya/cms/usecase/AbstractUsecase.java
deleted file mode 100644
index d0cf284..0000000
--- a/src/java/org/apache/lenya/cms/usecase/AbstractUsecase.java
+++ /dev/null
@@ -1,721 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.usecase;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.context.Context;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.cocoon.components.ContextHelper;
-import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.environment.Session;
-import org.apache.cocoon.servlet.multipart.Part;
-import org.apache.lenya.ac.Identity;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.transaction.AbstractOperation;
-import org.apache.lenya.transaction.LockException;
-import org.apache.lenya.transaction.TransactionException;
-import org.apache.lenya.transaction.Transactionable;
-
-/**
- * Abstract usecase implementation.
- * 
- * @version $Id$
- */
-public class AbstractUsecase extends AbstractOperation implements Usecase, Configurable {
-
-    /**
-     * Ctor.
-     */
-    public AbstractUsecase() {
-        // do nothing
-    }
-
-    /**
-     * Override to initialize parameters.
-     */
-    protected void initParameters() {
-        // do nothing
-    }
-
-    private String SOURCE_URL = "private.sourceUrl";
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#getSourceURL()
-     */
-    public String getSourceURL() {
-        return getParameterAsString(SOURCE_URL);
-    }
-
-    /**
-     * Returns the context.
-     * @return A context.
-     */
-    protected Context getContext() {
-        return this.context;
-    }
-
-    /**
-     * Determine if the usecase has error messages. Provides a way of checking for errors without
-     * actually retrieving them.
-     * @return true if the usecase resulted in error messages.
-     */
-    public boolean hasErrors() {
-        boolean ret = false;
-        if (this.errorMessages != null)
-            ret = !this.errorMessages.isEmpty();
-
-        if (getLogger().isDebugEnabled())
-            getLogger().debug("AbstractUsecase::hasErrors() called, returning " + ret);
-
-        return ret;
-    }
-
-    /**
-     * Determine if the usecase has info messages. Provides a way of checking for info messages
-     * without actually retrieving them.
-     * @return true if the usecase resulted in info messages being generated.
-     */
-    public boolean hasInfoMessages() {
-        boolean ret = false;
-        if (this.infoMessages != null)
-            ret = !this.infoMessages.isEmpty();
-        return ret;
-    }
-
-    /**
-     * Checks if the operation can be executed and returns the error messages. Error messages
-     * prevent the operation from being executed.
-     * @return A boolean value.
-     */
-    public List getErrorMessages() {
-        return Collections.unmodifiableList(this.errorMessages);
-    }
-
-    /**
-     * Returns the information messages to show on the confirmation screen.
-     * @return An array of strings. Info messages do not prevent the operation from being executed.
-     */
-    public List getInfoMessages() {
-        return Collections.unmodifiableList(this.infoMessages);
-    }
-
-    private List errorMessages = new ArrayList();
-    private List infoMessages = new ArrayList();
-
-    /**
-     * Adds an error message.
-     * @param message The message.
-     */
-    public void addErrorMessage(String message) {
-        addErrorMessage(message, null);
-    }
-
-    /**
-     * Adds an error message.
-     * @param message The message.
-     * @param _params parameters
-     */
-    public void addErrorMessage(String message, String[] _params) {
-        this.errorMessages.add(new UsecaseMessage(message, _params));
-    }
-
-    /**
-     * Adds an error message.
-     * @param messages The messages.
-     */
-    public void addErrorMessages(String[] messages) {
-        for (int i = 0; i < messages.length; i++) {
-            addErrorMessage(messages[i]);
-        }
-    }
-
-    /**
-     * Adds an info message.
-     * @param message The message.
-     * @param _params parameters
-     */
-    public void addInfoMessage(String message, String[] _params) {
-        this.infoMessages.add(new UsecaseMessage(message, _params));
-    }
-
-    /**
-     * Adds an info message.
-     * @param message The message.
-     */
-    public void addInfoMessage(String message) {
-        addInfoMessage(message, null);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#checkExecutionConditions()
-     */
-    public final void checkExecutionConditions() throws UsecaseException {
-        try {
-            clearErrorMessages();
-            clearInfoMessages();
-            doCheckExecutionConditions();
-            dumpErrorMessages();
-        } catch (Exception e) {
-            getLogger().error(e.getMessage(), e);
-            addErrorMessage(e.getMessage() + " - Please consult the logfiles.");
-            if (getLogger().isDebugEnabled()) {
-                throw new UsecaseException(e);
-            }
-        }
-    }
-
-    /**
-     * Checks the execution conditions.
-     * @throws Exception if an error occurs.
-     */
-    protected void doCheckExecutionConditions() throws Exception {
-        // do nothing
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#checkPreconditions()
-     */
-    public final void checkPreconditions() throws UsecaseException {
-        try {
-            clearErrorMessages();
-            clearInfoMessages();
-            doCheckPreconditions();
-
-            List _errorMessages = getErrorMessages();
-            for (int i = 0; i < _errorMessages.size(); i++) {
-                getLogger().info(_errorMessages.get(i).toString());
-            }
-        } catch (Exception e) {
-            getLogger().error(e.getMessage(), e);
-            addErrorMessage(e.getMessage() + " - Please consult the logfiles.");
-            if (getLogger().isDebugEnabled()) {
-                throw new UsecaseException(e);
-            }
-        }
-    }
-
-    /**
-     * Checks the preconditions.
-     * @throws Exception if an error occurs.
-     */
-    protected void doCheckPreconditions() throws Exception {
-        // do nothing
-    }
-
-    /**
-     * Clears the error messages.
-     */
-    protected void clearErrorMessages() {
-        this.errorMessages.clear();
-    }
-
-    /**
-     * Clears the info messages.
-     */
-    protected void clearInfoMessages() {
-        this.infoMessages.clear();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#execute()
-     */
-    public final void execute() throws UsecaseException {
-        Exception exception = null;
-        try {
-            clearErrorMessages();
-            clearInfoMessages();
-            doExecute();
-            dumpErrorMessages();
-        } catch (LockException e) {
-            exception = e;
-            addErrorMessage("The operation could not be completed because an involved object was changed by another user.");
-        } catch (Exception e) {
-            exception = e;
-            getLogger().error(e.getMessage(), e);
-            addErrorMessage(e.getMessage() + " - Please consult the logfiles.");
-            throw new UsecaseException(e);
-        } finally {
-            try {
-                if (getErrorMessages().isEmpty() && exception == null) {
-                    getUnitOfWork().commit();
-                } else {
-                    getUnitOfWork().rollback();
-                }
-            } catch (ServiceException e1) {
-                getLogger().error("Service could not be obtained: ", e1);
-            } catch (TransactionException e1) {
-                getLogger().error("Exception during commit or rollback: ", e1);
-                addErrorMessage("Exception during commit or rollback: " + e1.getMessage()
-                        + " (see logfiles for details)");
-            }
-        }
-    }
-
-    /**
-     * Dumps the error messages to the log.
-     */
-    protected void dumpErrorMessages() {
-        List _errorMessages = getErrorMessages();
-        for (int i = 0; i < _errorMessages.size(); i++) {
-            getLogger().error(_errorMessages.get(i).toString());
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#checkPostconditions()
-     */
-    public void checkPostconditions() throws UsecaseException {
-        try {
-            clearErrorMessages();
-            clearInfoMessages();
-            doCheckPostconditions();
-            dumpErrorMessages();
-        } catch (Exception e) {
-            getLogger().error(e.getMessage(), e);
-            addErrorMessage(e.getMessage() + " - Please consult the logfiles.");
-            if (getLogger().isDebugEnabled()) {
-                throw new UsecaseException(e);
-            }
-        }
-    }
-
-    /**
-     * Checks the post conditions.
-     * @throws Exception if an error occured.
-     */
-    protected void doCheckPostconditions() throws Exception {
-        // do nothing
-    }
-
-    /**
-     * Executes the operation.
-     * @throws Exception when something went wrong.
-     */
-    protected void doExecute() throws Exception {
-        // do nothing
-    }
-
-    private Map parameters = new HashMap();
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#setParameter(java.lang.String, java.lang.Object)
-     */
-    public void setParameter(String name, Object value) {
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Setting parameter [" + name + "] = [" + value + "]");
-        }
-        this.parameters.put(name, value);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#getParameter(java.lang.String)
-     */
-    public Object getParameter(String name) {
-        return this.parameters.get(name);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#getParameterAsString(java.lang.String)
-     */
-    public String getParameterAsString(String name) {
-        String valueString = null;
-        Object value = getParameter(name);
-        if (value != null) {
-            valueString = value.toString();
-        }
-        return valueString;
-    }
-
-    /**
-     * Returns a parameter as string. If the parameter does not exist, a default value is returned.
-     * @param name The parameter name.
-     * @param defaultValue The default value.
-     * @return A string.
-     */
-    public String getParameterAsString(String name, String defaultValue) {
-        String valueString = defaultValue;
-        Object value = getParameter(name);
-        if (value != null) {
-            valueString = value.toString();
-        }
-        return valueString;
-    }
-
-    /**
-     * Returns a parameter as integer. If the parameter does not exist, a default value is returned.
-     * @param name The parameter name.
-     * @param defaultValue The default value.
-     * @return An integer.
-     */
-    public int getParameterAsInteger(String name, int defaultValue) {
-        int valueInt = defaultValue;
-        Object value = getParameter(name);
-        if (value != null) {
-            valueInt = Integer.valueOf(value.toString()).intValue();
-        }
-        return valueInt;
-    }
-
-    /**
-     * Returns a parameter as boolean. If the parameter does not exist, a default value is returned.
-     * @param name The parameter name.
-     * @param defaultValue The default value.
-     * @return A boolean value..
-     */
-    public boolean getParameterAsBoolean(String name, boolean defaultValue) {
-        boolean valueBoolean = defaultValue;
-        Object value = getParameter(name);
-        if (value != null) {
-            valueBoolean = Boolean.valueOf(value.toString()).booleanValue();
-        }
-
-        return valueBoolean;
-    }
-
-    /**
-     * Return a map of all parameters
-     * @return the map
-     */
-    public Map getParameters() {
-        return Collections.unmodifiableMap(this.parameters);
-    }
-
-    /**
-     * Returns one of the strings "true" or "false" depending on whether the corresponding checkbox
-     * was checked.
-     * @param name The parameter name.
-     * @return A string.
-     */
-    public String getBooleanCheckboxParameter(String name) {
-        String value = "false";
-        if (getParameter(name) != null && getParameter(name).equals("on")) {
-            value = "true";
-        }
-        return value;
-    }
-
-    private String TARGET_URL = "private.targetUrl";
-
-    protected void setTargetURL(String url) {
-        setParameter(TARGET_URL, url);
-    }
-
-    /**
-     * If {@link #setTargetURL(String)}was not called, the source document (
-     * {@link #getSourceURL()}) is returned.
-     * @see org.apache.lenya.cms.usecase.Usecase#getTargetURL(boolean)
-     */
-    public String getTargetURL(boolean success) {
-        String url = getParameterAsString(TARGET_URL);
-        if (url == null) {
-            url = getSourceURL();
-        }
-        return url + getExitQueryString();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#setPart(java.lang.String,
-     *      org.apache.cocoon.servlet.multipart.Part)
-     */
-    public void setPart(String name, Part value) {
-        if (!Part.class.isInstance(value)) {
-            throw new RuntimeException("[" + value.getClass() + "] [" + value
-                    + "] is not a part object. Maybe you have to enable uploads?");
-        }
-        setParameter(name, value);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#getPart(java.lang.String)
-     */
-    public Part getPart(String name) {
-        return (Part) getParameter(name);
-    }
-
-    protected DocumentIdentityMap getDocumentIdentityMap() {
-        try {
-            return (DocumentIdentityMap) getUnitOfWork().getIdentityMap();
-        } catch (ServiceException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    /**
-     * @see org.apache.avalon.framework.activity.Initializable#initialize()
-     */
-    public final void initialize() throws Exception {
-        super.initialize();
-        DocumentIdentityMap map = new DocumentIdentityMap(this.manager, getLogger());
-        getUnitOfWork().setIdentityMap(map);
-        Request request = ContextHelper.getRequest(this.context);
-        Session session = request.getSession(true);
-        Identity identity = (Identity) session.getAttribute(Identity.class.getName());
-        getUnitOfWork().setIdentity(identity);
-    }
-
-    /**
-     * Does the actual initialization. Template method.
-     */
-    protected final void doInitialize() {
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#advance()
-     */
-    public void advance() throws UsecaseException {
-        // do nothing
-    }
-
-    /**
-     * Deletes a parameter.
-     * @param name The parameter name.
-     */
-    protected void deleteParameter(String name) {
-        this.parameters.remove(name);
-    }
-
-    private String name;
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#setName(java.lang.String)
-     */
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#getName()
-     */
-    public String getName() {
-        return this.name;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#getParameterNames()
-     */
-    public String[] getParameterNames() {
-        Set keys = this.parameters.keySet();
-        return (String[]) keys.toArray(new String[keys.size()]);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#setSourceURL(java.lang.String)
-     */
-    public void setSourceURL(String url) {
-        setParameter(SOURCE_URL, url);
-        initParameters();
-    }
-
-    private UsecaseView view;
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#getView()
-     */
-    public UsecaseView getView() {
-        return this.view;
-    }
-
-    protected static final String ELEMENT_PARAMETER = "parameter";
-    protected static final String ATTRIBUTE_NAME = "name";
-    protected static final String ATTRIBUTE_VALUE = "value";
-    protected static final String ELEMENT_VIEW = "view";
-    protected static final String ELEMENT_TRANSACTION = "transaction";
-    protected static final String ATTRIBUTE_POLICY = "policy";
-    protected static final String VALUE_OPTIMISTIC = "optimistic";
-    protected static final String VALUE_PESSIMISTIC = "pessimistic";
-    protected static final String ELEMENT_EXIT = "exit";
-    protected static final String ATTRIBUTE_USECASE = "usecase";
-
-    private boolean isOptimistic = true;
-
-    /**
-     * @return <code>true</code> if the transaction policy is optimistic offline lock,
-     *         <code>false</code> if it is pessimistic offline lock.
-     */
-    protected boolean isOptimistic() {
-        return this.isOptimistic;
-    }
-
-    /**
-     * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
-     */
-    public void configure(Configuration config) throws ConfigurationException {
-
-        Configuration[] parameterConfigs = config.getChildren(ELEMENT_PARAMETER);
-        for (int i = 0; i < parameterConfigs.length; i++) {
-            String name = parameterConfigs[i].getAttribute(ATTRIBUTE_NAME);
-            String value = parameterConfigs[i].getAttribute(ATTRIBUTE_VALUE);
-            setParameter(name, value);
-        }
-
-        Configuration viewConfig = config.getChild(ELEMENT_VIEW, false);
-        if (viewConfig != null) {
-            this.view = new UsecaseView();
-            view.configure(viewConfig);
-        }
-
-        Configuration transactionConfig = config.getChild(ELEMENT_TRANSACTION, false);
-        if (transactionConfig != null) {
-            String policy = transactionConfig.getAttribute(ATTRIBUTE_POLICY);
-            if (policy.equals(VALUE_PESSIMISTIC)) {
-                this.isOptimistic = false;
-            }
-        }
-
-        Configuration exitConfig = config.getChild(ELEMENT_EXIT, false);
-        if (exitConfig != null) {
-            this.exitUsecaseName = exitConfig.getAttribute(ATTRIBUTE_USECASE);
-            Configuration[] exitParameterConfigs = exitConfig.getChildren(ELEMENT_PARAMETER);
-            for (int i = 0; i < exitParameterConfigs.length; i++) {
-                String name = exitParameterConfigs[i].getAttribute(ATTRIBUTE_NAME);
-                String value = exitParameterConfigs[i].getAttribute(ATTRIBUTE_VALUE);
-                setExitParameter(name, value);
-            }
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#setView(org.apache.lenya.cms.usecase.UsecaseView)
-     */
-    public void setView(UsecaseView view) {
-        this.view = view;
-    }
-
-    /**
-     * @return The objects that could be changed during the usecase.
-     * @throws UsecaseException if an error occurs.
-     */
-    protected Transactionable[] getObjectsToLock() throws UsecaseException {
-        return new Transactionable[0];
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#lockInvolvedObjects()
-     */
-    public final void lockInvolvedObjects() throws UsecaseException {
-        lockInvolvedObjects(getObjectsToLock());
-    }
-
-    /**
-     * Lock the objects, for example when you need to change them (for example, delete). If you know
-     * when entering the usecase what these objects are, you do not need to call this, the framework
-     * will take of it if you implement getObjectsToLock(). If you do not know in advance what the
-     * objects are, you can call this method explicitly when appropriate.
-     * 
-     * @param objects the transactionable objects to lock
-     * @throws UsecaseException if an error occurs.
-     * @see #lockInvolvedObjects()
-     * @see #getObjectsToLock()
-     */
-    public final void lockInvolvedObjects(Transactionable[] objects) throws UsecaseException {
-
-        if (getLogger().isDebugEnabled())
-            getLogger()
-                    .debug("AbstractUsecase::lockInvolvedObjects() called, are there objects to lock ? "
-                            + (objects != null));
-
-        try {
-            boolean canExecute = true;
-
-            for (int i = 0; i < objects.length; i++) {
-                if (objects[i].isCheckedOut()) {
-                    if (getLogger().isDebugEnabled())
-                        getLogger()
-                                .debug("AbstractUsecase::lockInvolvedObjects() can not execute, object ["
-                                        + objects[i] + "] is already checked out");
-
-                    canExecute = false;
-                }
-            }
-
-            if (canExecute) {
-                for (int i = 0; i < objects.length; i++) {
-                    if (getLogger().isDebugEnabled())
-                        getLogger().debug("AbstractUsecase::lockInvolvedObjects() locking "
-                                + objects[i]);
-
-                    objects[i].lock();
-                    if (!isOptimistic()) {
-                        objects[i].checkout();
-                    }
-                }
-            } else {
-                addErrorMessage("The operation cannot be executed because one ore more of the "
-                        + "involved objects are checked out.");
-            }
-
-        } catch (TransactionException e) {
-            throw new UsecaseException(e);
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#cancel()
-     */
-    public void cancel() throws UsecaseException {
-        try {
-            getUnitOfWork().rollback();
-        } catch (Exception e) {
-            throw new UsecaseException(e);
-        }
-    }
-
-    private String exitUsecaseName = null;
-    private Map exitUsecaseParameters = new HashMap();
-
-    /**
-     * Sets a parameter to pass to the exit usecase.
-     * @param name The parameter name.
-     * @param value The parameter value.
-     */
-    protected void setExitParameter(String name, String value) {
-        this.exitUsecaseParameters.put(name, value);
-    }
-
-    /**
-     * Returns the query string to access the exit usecase of this usecase.
-     * @return A query string of the form
-     *         <code>?lenya.usecase=...&amp;param1=foo&amp;param2=bar</code>.
-     */
-    protected String getExitQueryString() {
-        String queryString = "";
-        if (this.exitUsecaseName != null) {
-            queryString = "?lenya.usecase=" + this.exitUsecaseName;
-            for (Iterator i = this.exitUsecaseParameters.keySet().iterator(); i.hasNext();) {
-                String key = (String) i.next();
-                String value = (String) this.exitUsecaseParameters.get(key);
-                queryString += "&" + key + "=" + value;
-            }
-        } else {
-            String exitUsecase = getParameterAsString("lenya.exitUsecase");
-            if (exitUsecase != null && !"".equals(exitUsecase)) {
-                queryString = "?lenya.usecase=" + exitUsecase;
-            }
-        }
-        return queryString;
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/usecase/DocumentUsecase.java b/src/java/org/apache/lenya/cms/usecase/DocumentUsecase.java
deleted file mode 100644
index ad0540f..0000000
--- a/src/java/org/apache/lenya/cms/usecase/DocumentUsecase.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.usecase;
-
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentBuildException;
-
-/**
- * <p>
- * Extends AbstractUsecase with document helper methods.
- * </p>
- * <p>
- * Some parameters are initialized by default:
- * </p>
- * <ul>
- * <li><code>document</code>- the document</li>
- * </ul>
- */
-public class DocumentUsecase extends AbstractUsecase {
-
-    protected static final String DOCUMENT = "document";
-    protected static final String TARGET_DOCUMENT = "private.targetDocument";
-
-    /**
-     * Ctor.
-     */
-    public DocumentUsecase() {
-        super();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckPreconditions()
-     */
-    protected void doCheckPreconditions() throws Exception {
-        super.doCheckPreconditions();
-        if (getSourceDocument() == null) {
-            addErrorMessage("This usecase can only be invoked on documents!");
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.Usecase#setSourceURL(java.lang.String)
-     */
-    public void setSourceURL(String url) {
-        try {
-            if (getDocumentIdentityMap().isDocument(url)) {
-                setParameter(DOCUMENT, getDocumentIdentityMap().getFromURL(url));
-            }
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-        super.setSourceURL(url);
-    }
-
-    /**
-     * Returns the source document.
-     * @return A document.
-     */
-    protected Document getSourceDocument() {
-        return (Document) getParameter(DOCUMENT);
-    }
-
-    /**
-     * Sets the target document.
-     * @param document A document.
-     */
-    protected void setTargetDocument(Document document) {
-        setParameter(TARGET_DOCUMENT, document);
-    }
-
-    /**
-     * Returns the document to be redirected to after the usecase has been completed. If the
-     * parameter <code>success</code> is false, the source document is returned (override this
-     * method to change this behaviour).
-     * @param success If the usecase was successfully completed.
-     * @return A document.
-     */
-    protected Document getTargetDocument(boolean success) {
-        Document document = (Document) getParameter(TARGET_DOCUMENT);
-        if (document == null) {
-            document = getSourceDocument();
-        }
-        return document;
-    }
-
-    /**
-     * If {@link #setTargetDocument(Document)}was not called, the URL of the source document (
-     * {@link #getSourceDocument()}) is returned.
-     * @see org.apache.lenya.cms.usecase.Usecase#getTargetURL(boolean)
-     */
-    public String getTargetURL(boolean success) {
-        Document document = getTargetDocument(success);
-        String documentUrl = document.getCanonicalDocumentURL();
-        String url = "/" + document.getPublication().getId() + "/" + document.getArea()
-                + documentUrl;
-        return url + getExitQueryString();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#getSourceURL()
-     */
-    public String getSourceURL() {
-        if (getSourceDocument() == null) {
-            return super.getSourceURL();
-        }
-        return getSourceDocument().getCanonicalWebappURL();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#setTargetURL(java.lang.String)
-     */
-    protected void setTargetURL(String url) {
-        try {
-            Document target = getDocumentIdentityMap().getFromURL(url);
-            setParameter(TARGET_DOCUMENT, target);
-        } catch (DocumentBuildException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#initParameters()
-     */
-    protected void initParameters() {
-        super.initParameters();
-
-        setParameter(DOCUMENT, getSourceDocument());
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/usecase/DummyUsecase.java b/src/java/org/apache/lenya/cms/usecase/DummyUsecase.java
deleted file mode 100644
index 127cd74..0000000
--- a/src/java/org/apache/lenya/cms/usecase/DummyUsecase.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.usecase;
-
-/**
- * Usecase for presentation purposes using a plain JX template.
- *
- * @version $Id$
- */
-public class DummyUsecase extends AbstractUsecase {
-
-}
diff --git a/src/java/org/apache/lenya/cms/usecase/Usecase.java b/src/java/org/apache/lenya/cms/usecase/Usecase.java
deleted file mode 100644
index 75a2967..0000000
--- a/src/java/org/apache/lenya/cms/usecase/Usecase.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.usecase;
-
-import java.util.List;
-
-import org.apache.cocoon.servlet.multipart.Part;
-import org.apache.lenya.transaction.Operation;
-
-/**
- * Usecase interface.
- * 
- * @version $Id$
- */
-public interface Usecase extends Operation {
-
-    /**
-     * The <code>Usecase</code> role.
-     */
-    String ROLE = Usecase.class.getName();
-    
-    /**
-     * @param url The URL the usecase is invoked on.
-     */
-    void setSourceURL(String url);
-
-    /**
-     * Sets a parameter from the form.
-     * @param name The parameter name.
-     * @param value The parameter value.
-     */
-    void setParameter(String name, Object value);
-
-    /**
-     * Returns the current value of a parameter.
-     * @param name The parameter name.
-     * @return An object.
-     */
-    Object getParameter(String name);
-
-    /**
-     * Returns the current value of a parameter as a string.
-     * @param name The parameter name.
-     * @return A string or <code>null</code> if the parameter was not set.
-     */
-    String getParameterAsString(String name);
-    
-    /**
-     * @return The parameter names.
-     */
-    String[] getParameterNames();
-
-    /**
-     * Sets a parameter from the form. This method is called for parts in
-     * multipart requests.
-     * @param name The parameter name.
-     * @param value The parameter value.
-     */
-    void setPart(String name, Part value);
-
-    /**
-     * Returns the current value of a part parameter as a string.
-     * @param name The part parameter name.
-     * @return A part or <code>null</code> if the part was not set.
-     */
-    Part getPart(String name);
-
-    /**
-     * Advances the usecase to the next step. This method is called when all
-     * parameters are set.
-     * @throws UsecaseException if an error occurs.
-     */
-    void advance() throws UsecaseException;
-
-    /**
-     * Checks the conditions before a form is displayed.
-     * @throws UsecaseException if an error occurs that causes an unstable
-     *             system.
-     */
-    void checkPreconditions() throws UsecaseException;
-
-    /**
-     * Checks the conditions after the usecase was executed.
-     * @throws UsecaseException if an error occurs that causes an unstable
-     *             system.
-     */
-    void checkPostconditions() throws UsecaseException;
-
-    /**
-     * Checks the conditions right before the operation is executed.
-     * @throws UsecaseException if an error occurs that causes an unstable
-     *             system.
-     */
-    void checkExecutionConditions() throws UsecaseException;
-    
-    /**
-     * Locks all objects that are involved in the transaction.
-     * @throws UsecaseException if an error occurs.
-     */
-    void lockInvolvedObjects() throws UsecaseException;
-
-    /**
-     * Returns the error messages from the previous operation. Error messages
-     * prevent the operation from being executed.
-     * @return A list of strings.
-     */
-    List getErrorMessages();
-
-    /**
-     * Returns the info messages from the previous operation. Info messages do
-     * not prevent the operation from being executed.
-     * @return A list of strings.
-     */
-    List getInfoMessages();
-
-    /**
-     * Determine if the usecase has error messages.
-     * Provides a way of checking for errors without actually retrieving them.
-     * @return true if the usecase resulted in error messages.
-     */
-    public boolean hasErrors();
-
-    /**
-     * Determine if the usecase has info messages.
-     * Provides a way of checking for info messages without actually retrieving them.
-     * @return true if the usecase resulted in info messages being generated.
-     */
-    public boolean hasInfoMessages();
-
-    /**
-     * Executes the usecase. During this method error and info messages are
-     * filled in. If getErrorMessages() returns an empty array, the operation
-     * succeeded. Otherwise, the operation failed.
-     * @throws UsecaseException if an error occured that causes an unstable
-     *             system.
-     */
-    void execute() throws UsecaseException;
-    
-    /**
-     * Cancels the usecase.
-     * @throws UsecaseException if an error occurs.
-     */
-    void cancel() throws UsecaseException;
-    
-    /**
-     * @return The web application URL the usecase was invoked on.
-     */
-    String getSourceURL();
-
-    /**
-     * Returns the webapp URL which should be redirected to after the usecase is
-     * completed.
-     * @param success If the usecase was completed successfully.
-     * @return A web application URL.
-     */
-    String getTargetURL(boolean success);
-
-    /**
-     * @param name The name of this usecase.
-     */
-    void setName(String name);
-    
-    /**
-     * @return The name of this usecase.
-     */
-    String getName();
-    
-    /**
-     * @return The view of the usecase.
-     */
-    UsecaseView getView();
-
-    /**
-     * @param view The view of the usecase.
-     */
-    void setView(UsecaseView view);
-
-}
diff --git a/src/java/org/apache/lenya/cms/usecase/UsecaseException.java b/src/java/org/apache/lenya/cms/usecase/UsecaseException.java
deleted file mode 100644
index 2666269..0000000
--- a/src/java/org/apache/lenya/cms/usecase/UsecaseException.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.usecase;
-
-/**
- * Usecase exception.
- *
- * @version $Id$
- */
-public class UsecaseException extends Exception {
-
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/**
-     * Ctor.
-     */
-    public UsecaseException() {
-        super();
-    }
-
-    /**
-     * Ctor.
-     * @param message The message.
-     */
-    public UsecaseException(String message) {
-        super(message);
-    }
-
-    /**
-     * Ctor.
-     * @param message The message.
-     * @param cause The cause.
-     */
-    public UsecaseException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    /**
-     * Ctor.
-     * @param cause The cause.
-     */
-    public UsecaseException(Throwable cause) {
-        super(cause);
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/usecase/UsecaseInvoker.java b/src/java/org/apache/lenya/cms/usecase/UsecaseInvoker.java
deleted file mode 100644
index 9b3fa82..0000000
--- a/src/java/org/apache/lenya/cms/usecase/UsecaseInvoker.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.usecase;
-
-import java.util.Map;
-
-/**
- * Invoke a usecase.
- * 
- * @version $Id$
- */
-public interface UsecaseInvoker {
-
-    /**
-     * The Avalon role.
-     */
-    String ROLE = UsecaseInvoker.class.getName();
-
-    /**
-     * Invokes a usecase.
-     * @param webappUrl The URL to invoke the usecase on.
-     * @param usecaseName The name of the usecase.
-     * @param parameters The parameters.
-     * @throws UsecaseException if an error occurs.
-     */
-    void invoke(String webappUrl, String usecaseName, Map parameters) throws UsecaseException;
-
-}
diff --git a/src/java/org/apache/lenya/cms/usecase/UsecaseInvokerImpl.java b/src/java/org/apache/lenya/cms/usecase/UsecaseInvokerImpl.java
deleted file mode 100644
index f489c67..0000000
--- a/src/java/org/apache/lenya/cms/usecase/UsecaseInvokerImpl.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.usecase;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
-
-/**
- * Usecase invoker implementation.
- *
- * @version $Id$
- */
-public class UsecaseInvokerImpl extends AbstractLogEnabled implements UsecaseInvoker, Serviceable {
-
-    /**
-     * @see org.apache.lenya.cms.usecase.UsecaseInvoker#invoke(java.lang.String, java.lang.String, java.util.Map)
-     */
-    public void invoke(String webappUrl, String usecaseName, Map parameters) throws UsecaseException {
-        UsecaseResolver resolver = null;
-        Usecase usecase = null;
-        try {
-
-            resolver = (UsecaseResolver) this.manager.lookup(UsecaseResolver.ROLE);
-            usecase = resolver.resolve(webappUrl, usecaseName);
-
-            usecase.setSourceURL(webappUrl);
-            usecase.setName(usecaseName);
-
-            passParameters(usecase, parameters);
-
-            usecase.checkPreconditions();
-            List errorMessages = usecase.getErrorMessages();
-            if (!errorMessages.isEmpty()) {
-                logErrorMessages(usecaseName, "Pre condition messages:", errorMessages);
-            } else {
-                usecase.lockInvolvedObjects();
-                usecase.checkExecutionConditions();
-                errorMessages = usecase.getErrorMessages();
-                if (!errorMessages.isEmpty()) {
-                    logErrorMessages(usecaseName, "Execution condition messages:", errorMessages);
-                } else {
-                    usecase.execute();
-                    logErrorMessages(usecaseName, "Execution messages:", usecase.getErrorMessages());
-                    usecase.checkPostconditions();
-                    logErrorMessages(usecaseName, "Post condition messages:", usecase.getErrorMessages());
-                }
-            }
-
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (resolver != null) {
-                if (usecase != null) {
-                    try {
-                        resolver.release(usecase);
-                    } catch (ServiceException e) {
-                        throw new RuntimeException(e);
-                    }
-                }
-                this.manager.release(resolver);
-            }
-        }
-    }
-    
-    /**
-     * @param usecase The usecase to pass the parameters to.
-     * @param parameters The parameters.
-     */
-    protected void passParameters(Usecase usecase, Map parameters) {
-        for (Iterator i = parameters.keySet().iterator(); i.hasNext();) {
-            String key = (String) i.next();
-            Object value = parameters.get(key);
-            usecase.setParameter(key, value);
-        }
-    }
-
-    /**
-     * @param usecaseName The name of the usecase.
-     * @param headline The headline of the messages.
-     * @param errorMessages The messages to log.
-     */
-    protected void logErrorMessages(String usecaseName, String headline, List errorMessages) {
-        getLogger().error("Usecase [" + usecaseName + "] - " + headline);
-        for (Iterator i = errorMessages.iterator(); i.hasNext();) {
-            getLogger().error((String) i.next());
-        }
-    }
-
-    private ServiceManager manager;
-
-    /**
-     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service(ServiceManager manager) throws ServiceException {
-        this.manager = manager;
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/usecase/UsecaseMessage.java b/src/java/org/apache/lenya/cms/usecase/UsecaseMessage.java
deleted file mode 100644
index 6ad0eae..0000000
--- a/src/java/org/apache/lenya/cms/usecase/UsecaseMessage.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.usecase;
-
-
-/**
- * A message in a usecase. This an encapsulation for an internationalizable
- * message, containing a message content and potentially some parameters.
- * The parameters correspond to the placeholders in dictionary entries.
- * 
- * @version $Id$
- */
-public class UsecaseMessage {
-
-    private String message;
-    private String[] params;
-
-    /**
-     * Ctor.
-     */
-    public UsecaseMessage(String _message, String[] _params) {
-        this.message = _message;
-        this.params = _params;
-    }
-
-    /**
-     * Determine if this message has parameters
-     * @return true if the message has parameters
-     */
-    public boolean hasParameters() {
-        return params != null && params.length > 0;
-    }
-
-    /**
-     * Retrieve the message content
-     * @return the message
-     */
-    public String getMessage() {
-        return message;
-    }
-
-    /**
-     * Retrieve the parameters for this message
-     * @return the parameters
-     */
-    public String[] getParameters() {
-        return params;
-    }
-
-    /** 
-     * Accomodates scripts which do no care about parameters
-     * @return a string representation disregarding any parameters
-     */
-    public String toString() {
-        return message;
-    }
-}
diff --git a/src/java/org/apache/lenya/cms/usecase/UsecaseProxy.java b/src/java/org/apache/lenya/cms/usecase/UsecaseProxy.java
deleted file mode 100644
index c00fd9c..0000000
--- a/src/java/org/apache/lenya/cms/usecase/UsecaseProxy.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.usecase;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.lenya.transaction.UnitOfWork;
-
-/**
- * Proxy which holds the parameters of a usecase. It is used to restore the usecase after the
- * flowscript is re-entered and to pass the usecase parameters to a JX template.
- * 
- * @version $Id$
- */
-public class UsecaseProxy {
-
-    private Map parameters = new HashMap();
-    private String name;
-    private String sourceUrl;
-    private UsecaseView view;
-    private UnitOfWork unitOfWork;
-
-    /**
-     * Ctor.
-     * @param usecase The usecase to extract the parameters from.
-     */
-    public UsecaseProxy(Usecase usecase) {
-        this.name = usecase.getName();
-
-        String[] names = usecase.getParameterNames();
-        for (int i = 0; i < names.length; i++) {
-            this.parameters.put(names[i], usecase.getParameter(names[i]));
-        }
-        
-        this.errorMessages = usecase.getErrorMessages();
-        this.infoMessages = usecase.getInfoMessages();
-        this.sourceUrl = usecase.getSourceURL();
-        this.view = usecase.getView();
-        try {
-            this.unitOfWork = usecase.getUnitOfWork();
-        } catch (ServiceException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    /**
-     * Initializes a usecase from this proxy.
-     * @param usecase The usecase.
-     */
-    public void setup(Usecase usecase) {
-        usecase.setUnitOfWork(this.unitOfWork);
-        usecase.setName(this.name);
-        usecase.setSourceURL(this.sourceUrl);
-        usecase.setView(this.view);
-
-        String[] names = getParameterNames();
-        for (int i = 0; i < names.length; i++) {
-            usecase.setParameter(names[i], parameters.get(names[i]));
-        }
-    }
-
-    /**
-     * Returns the current value of a parameter.
-     * @param name The parameter name.
-     * @return An object.
-     */
-    public Object getParameter(String name) {
-        return this.parameters.get(name);
-    }
-
-    /**
-     * Returns the current value of a parameter as a string.
-     * @param name The parameter name.
-     * @return A string or <code>null</code> if the parameter was not set.
-     */
-    public String getParameterAsString(String name) {
-        String valueString = null;
-        Object value = getParameter(name);
-        if (value != null) {
-            valueString = value.toString();
-        }
-        return valueString;
-    }
-
-    /**
-     * @return The parameter names.
-     */
-    public String[] getParameterNames() {
-        Set keys = this.parameters.keySet();
-        return (String[]) keys.toArray(new String[keys.size()]);
-    }
-
-    private List errorMessages;
-    private List infoMessages;
-
-    /**
-     * Returns the error messages from the previous operation. Error messages prevent the operation
-     * from being executed.
-     * @return A list of strings.
-     */
-    public List getErrorMessages() {
-        return this.errorMessages;
-    }
-
-    /**
-     * Returns the info messages from the previous operation. Info messages do not prevent the
-     * operation from being executed.
-     * @return A list of strings.
-     */
-    public List getInfoMessages() {
-        return this.infoMessages;
-    }
-
-    /**
-     * Determine if the usecase has error messages.
-     * Provides a way of checking for errors without actually retrieving them.
-     * @return true if the usecase resulted in error messages.
-     */
-    public boolean hasErrors() {
-        boolean ret = false;
-        if (this.errorMessages != null)
-            ret = ! this.errorMessages.isEmpty();
-        return ret;
-    }
-
-    /**
-     * Determine if the usecase has info messages.
-     * Provides a way of checking for info messages without actually retrieving them.
-     * @return true if the usecase resulted in info messages being generated.
-     */
-    public boolean hasInfoMessages() {
-        boolean ret = false;
-        if (this.infoMessages != null)
-            ret = ! this.infoMessages.isEmpty();
-        return ret;
-    }
-
-    /**
-     * @return The name of this usecase.
-     */
-    public String getName() {
-        return this.name;
-    }
-
-    /**
-     * @return The view of the usecase.
-     */
-    public UsecaseView getView() {
-        return this.view;
-    }
-    
-}
diff --git a/src/java/org/apache/lenya/cms/usecase/UsecaseResolver.java b/src/java/org/apache/lenya/cms/usecase/UsecaseResolver.java
deleted file mode 100644
index c773b22..0000000
--- a/src/java/org/apache/lenya/cms/usecase/UsecaseResolver.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.usecase;
-
-import org.apache.avalon.framework.service.ServiceException;
-
-/**
- * Usecase resolver interface.
- *
- * @version $Id$
- */
-public interface UsecaseResolver {
-
-    /**
-     * The Avalon role.
-     */
-    String ROLE = UsecaseResolver.class.getName();
-    
-    /**
-     * Resolves a usecase object.
-     * @param name The name of the usecase.
-     * @return A usecase object.
-     * @throws ServiceException if the object could not be created.
-     */
-    Usecase resolve(String name) throws ServiceException;
-    
-    /**
-     * Resolves a usecase object.
-     * @param webappUrl The web application URL.
-     * @param name The name of the usecase.
-     * @return A usecase object.
-     * @throws ServiceException if the object could not be created.
-     */
-    Usecase resolve(String webappUrl, String name) throws ServiceException;
-    
-    /**
-     * Checks if a certain usecase is registered.
-     * @param name The usecase name.
-     * @return A boolean value.
-     * @throws ServiceException if an error occurs.
-     */
-    boolean isRegistered(String name) throws ServiceException;
-    
-    /**
-     * Checks if a certain usecase is registered.
-     * @param webappUrl The web application URL.
-     * @param name The usecase name.
-     * @return A boolean value.
-     * @throws ServiceException if an error occurs.
-     */
-    boolean isRegistered(String webappUrl, String name) throws ServiceException;
-    
-    /**
-     * Releases a usecase object.
-     * @param usecase The usecase object.
-     * @throws ServiceException if an error occurs.
-     */
-    void release(Usecase usecase) throws ServiceException;
-    
-}
diff --git a/src/java/org/apache/lenya/cms/usecase/UsecaseResolverImpl.java b/src/java/org/apache/lenya/cms/usecase/UsecaseResolverImpl.java
deleted file mode 100644
index c7928d5..0000000
--- a/src/java/org/apache/lenya/cms/usecase/UsecaseResolverImpl.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.usecase;
-
-import org.apache.avalon.framework.activity.Disposable;
-import org.apache.avalon.framework.context.Context;
-import org.apache.avalon.framework.context.ContextException;
-import org.apache.avalon.framework.context.Contextualizable;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.cocoon.components.ContextHelper;
-import org.apache.cocoon.environment.Request;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationFactory;
-import org.apache.lenya.cms.publication.URLInformation;
-import org.apache.lenya.cms.publication.templating.PublicationTemplateManager;
-
-/**
- * Usecase resolver implementation.
- * 
- * @version $Id$
- */
-public class UsecaseResolverImpl extends AbstractLogEnabled implements UsecaseResolver,
-        Serviceable, Disposable, Contextualizable {
-
-    /**
-     * Ctor.
-     */
-    public UsecaseResolverImpl() {
-        // do nothing
-    }
-
-    private ServiceSelector selector;
-
-    /**
-     * @see org.apache.lenya.cms.usecase.UsecaseResolver#resolve(java.lang.String)
-     */
-    public Usecase resolve(String name) throws ServiceException {
-        return this.resolve(getWebappURL(), name);
-    }
-
-    private ServiceManager manager;
-
-    /**
-     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service(ServiceManager _manager) throws ServiceException {
-        this.manager = _manager;
-        this.selector = (ServiceSelector) _manager.lookup(Usecase.ROLE + "Selector");
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.UsecaseResolver#release(org.apache.lenya.cms.usecase.Usecase)
-     */
-    public void release(Usecase usecase) throws ServiceException {
-        if (usecase == null) {
-            throw new IllegalArgumentException("The usecase to release must not be null.");
-        }
-        this.selector.release(usecase);
-
-    }
-
-    /**
-     * @see org.apache.avalon.framework.activity.Disposable#dispose()
-     */
-    public void dispose() {
-        if (this.selector != null) {
-            this.manager.release(this.selector);
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.UsecaseResolver#isRegistered(java.lang.String)
-     */
-    public boolean isRegistered(String name) throws ServiceException {
-        return this.isRegistered(getWebappURL(), name);
-    }
-
-    protected String getWebappURL() {
-        Request request = ContextHelper.getRequest(getContext());
-        String context = request.getContextPath();
-        String webappUrl = request.getRequestURI().substring(context.length());
-        return webappUrl;
-    }
-
-    /**
-     * Returns the name of the publication-overridden usecase to be resolved.
-     * @param webappUrl The web application URL.
-     * @param name The plain usecase name.
-     * @return A string.
-     * @throws ServiceException if an error occurs.
-     */
-    protected String getUsecaseName(String webappUrl, final String name) throws ServiceException {
-        String newName = null;
-
-        Publication publication = getPublication(webappUrl);
-        if (publication != null) {
-            PublicationTemplateManager templateManager = null;
-            try {
-                templateManager = (PublicationTemplateManager) this.manager
-                        .lookup(PublicationTemplateManager.ROLE);
-                newName = (String) templateManager.getSelectableHint(publication,
-                        this.selector,
-                        name);
-            } finally {
-                if (templateManager != null) {
-                    this.manager.release(templateManager);
-                }
-            }
-        }
-        else {
-            newName = name;
-        }
-
-        return newName;
-    }
-
-    private Context context;
-
-    /**
-     * @see org.apache.avalon.framework.context.Contextualizable#contextualize(org.apache.avalon.framework.context.Context)
-     */
-    public void contextualize(Context _context) throws ContextException {
-        this.context = _context;
-    }
-
-    /**
-     * Returns the context.
-     * @return A context.
-     */
-    protected Context getContext() {
-        return this.context;
-    }
-
-    /**
-     * Returns the publication the usecase was invoked in.
-     * @param webappUrl The web application URL.
-     * @return A publication.
-     */
-    protected Publication getPublication(String webappUrl) {
-        Publication publication = null;
-        try {
-            URLInformation info = new URLInformation(webappUrl);
-            String publicationId = info.getPublicationId();
-
-            if (publicationId != null) {
-                PublicationFactory factory = PublicationFactory.getInstance(getLogger());
-                Publication pub = factory.getPublication(this.manager, webappUrl);
-                if (pub.exists()) {
-                    publication = pub;
-                }
-            }
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-        return publication;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.UsecaseResolver#resolve(java.lang.String, java.lang.String)
-     */
-    public Usecase resolve(String webappUrl, String name) throws ServiceException {
-        Object usecaseName = getUsecaseName(webappUrl, name);
-        return (Usecase) this.selector.select(usecaseName);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.UsecaseResolver#isRegistered(java.lang.String,
-     *      java.lang.String)
-     */
-    public boolean isRegistered(String webappUrl, String name) throws ServiceException {
-        String usecaseName = getUsecaseName(webappUrl, name);
-        return this.selector.isSelectable(usecaseName);
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/usecase/UsecaseView.java b/src/java/org/apache/lenya/cms/usecase/UsecaseView.java
deleted file mode 100644
index ffca6b2..0000000
--- a/src/java/org/apache/lenya/cms/usecase/UsecaseView.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.usecase;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-
-/**
- * Information about a usecase view.
- * 
- * @version $Id$
- */
-public class UsecaseView implements Configurable {
-    
-    protected static final String ATTRIBUTE_TEMPLATE_URI = "template";
-    protected static final String ATTRIBUTE_SHOW_MENU = "menu";
-    protected static final String ELEMENT_PARAMETER = "parameter";
-    protected static final String ATTRIBUTE_NAME = "name";
-    protected static final String ATTRIBUTE_VALUE = "value";
-    
-    private Map parameters = new HashMap();
-
-    /**
-     * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
-     */
-    public void configure(Configuration config) throws ConfigurationException {
-        this.templateUri = config.getAttribute(ATTRIBUTE_TEMPLATE_URI);
-        this.showMenu = config.getAttributeAsBoolean(ATTRIBUTE_SHOW_MENU, false);
-        
-        Configuration[] parameterConfigs = config.getChildren(ELEMENT_PARAMETER);
-        for (int i = 0; i < parameterConfigs.length; i++) {
-            String name = parameterConfigs[i].getAttribute(ATTRIBUTE_NAME);
-            String value = parameterConfigs[i].getAttribute(ATTRIBUTE_VALUE);
-            this.parameters.put(name, value);
-        }
-    }
-
-    private String templateUri;
-    
-    /**
-     * @return The URI of the JX template;
-     */
-    public String getTemplateURI() {
-        if (this.templateUri == null) {
-            throw new RuntimeException("The template URI was not configured!");
-        }
-        return this.templateUri;
-    }
-    
-    private boolean showMenu;
-    
-    /**
-     * @return If the menubar should be visible on usecase screens.
-     */
-    public boolean showMenu() {
-        return this.showMenu;
-    }
-    
-    /**
-     * @param name The parameter name.
-     * @return The parameter value.
-     */
-    public String getParameter(String name) {
-        return (String) this.parameters.get(name);
-    }
-    
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/usecase/scheduling/ManageJobs.java b/src/java/org/apache/lenya/cms/usecase/scheduling/ManageJobs.java
deleted file mode 100644
index 6643199..0000000
--- a/src/java/org/apache/lenya/cms/usecase/scheduling/ManageJobs.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.usecase.scheduling;
-
-import java.util.Arrays;
-
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.cocoon.components.cron.JobSchedulerEntry;
-import org.apache.lenya.cms.usecase.DocumentUsecase;
-
-/**
- * Usecase to manage scheduled jobs.
- * 
- * @version $Id:$
- */
-public class ManageJobs extends DocumentUsecase {
-
-    protected static final String JOBS = "jobs";
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#initParameters()
-     */
-    protected void initParameters() {
-        super.initParameters();
-
-        UsecaseScheduler scheduler = null;
-        try {
-            scheduler = (UsecaseScheduler) this.manager.lookup(UsecaseScheduler.ROLE);
-            JobSchedulerEntry[] jobs = scheduler.getJobs();
-            setParameter(JOBS, Arrays.asList(jobs));
-        } catch (ServiceException e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (scheduler != null) {
-                this.manager.release(scheduler);
-            }
-        }
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/usecase/scheduling/UsecaseCronJob.java b/src/java/org/apache/lenya/cms/usecase/scheduling/UsecaseCronJob.java
deleted file mode 100644
index a1f00c9..0000000
--- a/src/java/org/apache/lenya/cms/usecase/scheduling/UsecaseCronJob.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.usecase.scheduling;
-
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.avalon.framework.context.Context;
-import org.apache.avalon.framework.context.ContextException;
-import org.apache.avalon.framework.context.Contextualizable;
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.cocoon.components.CocoonComponentManager;
-import org.apache.cocoon.components.ContextHelper;
-import org.apache.cocoon.components.cron.ConfigurableCronJob;
-import org.apache.cocoon.components.cron.ServiceableCronJob;
-import org.apache.cocoon.environment.Environment;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.environment.Session;
-import org.apache.cocoon.environment.commandline.CommandLineRequest;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.AccessController;
-import org.apache.lenya.ac.AccessControllerResolver;
-import org.apache.lenya.ac.Identifiable;
-import org.apache.lenya.ac.Identity;
-import org.apache.lenya.ac.Machine;
-import org.apache.lenya.ac.User;
-import org.apache.lenya.ac.UserManager;
-import org.apache.lenya.ac.impl.DefaultAccessController;
-import org.apache.lenya.cms.usecase.Usecase;
-import org.apache.lenya.cms.usecase.UsecaseInvoker;
-
-/**
- * Job to schedule usecase execution.
- * 
- * @version $Id:$
- */
-public class UsecaseCronJob extends ServiceableCronJob implements ConfigurableCronJob,
-        Contextualizable {
-
-    /**
-     * Initializes the job.
-     * @param usecase The usecase.
-     */
-    public void setup(Usecase usecase) {
-        this.usecaseName = usecase.getName();
-        String[] keys = usecase.getParameterNames();
-        for (int i = 0; i < keys.length; i++) {
-            this.parameters.put(keys[i], usecase.getParameter(keys[i]));
-        }
-    }
-
-    private String usecaseName;
-    private String sourceUrl;
-    private String userId;
-    private String machineIp;
-
-    private Map parameters = new HashMap();
-
-    protected static final String USECASE_NAME = "usecaseName";
-    protected static final String SOURCE_URL = "sourceUrl";
-    protected static final String USER_ID = "userId";
-    protected static final String MACHINE_IP = "machineIp";
-
-    protected String getUsecaseName() {
-        return this.usecaseName;
-    }
-
-    protected String getSourceURL() {
-        return this.sourceUrl;
-    }
-
-    protected Map getParameters() {
-        return Collections.unmodifiableMap(this.parameters);
-    }
-
-    /**
-     * @see org.apache.cocoon.components.cron.CronJob#execute(java.lang.String)
-     */
-    public void execute(String jobname) {
-        UsecaseInvoker invoker = null;
-        try {
-            setupOriginalRequest();
-            authorizeRequest();
-
-            invoker = (UsecaseInvoker) this.manager.lookup(UsecaseInvoker.ROLE);
-            invoker.invoke(getSourceURL(), getUsecaseName(), getParameters());
-
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (invoker != null) {
-                this.manager.release(invoker);
-            }
-        }
-    }
-
-    /**
-     * Creates a new request object based on the information from the original request which
-     * triggered the usecase.
-     */
-    protected void setupOriginalRequest() {
-        Environment env = CocoonComponentManager.getCurrentEnvironment();
-
-        Request request = ContextHelper.getRequest(this.context);
-        Map attributes = new HashMap();
-        for (Enumeration e = request.getAttributeNames(); e.hasMoreElements();) {
-            String key = (String) e.nextElement();
-            attributes.put(key, request.getAttribute(key));
-        }
-
-        Map requestParameters = new HashMap();
-        for (Enumeration e = request.getParameterNames(); e.hasMoreElements();) {
-            String key = (String) e.nextElement();
-            requestParameters.put(key, request.getParameter(key));
-        }
-
-        Map objectModel = ContextHelper.getObjectModel(this.context);
-        objectModel.put(ObjectModelHelper.REQUEST_OBJECT, new CommandLineRequest(env, request
-                .getContextPath(), request.getServletPath(), getSourceURL(), attributes,
-                requestParameters));
-    }
-
-    /**
-     * Initializes the session with the access control information.
-     * @throws AccessControlException if an error occurs.
-     * @throws ServiceException if the access controller resolver could not be created.
-     */
-    protected void authorizeRequest() throws AccessControlException, ServiceException {
-
-        ServiceSelector selector = null;
-        AccessControllerResolver acResolver = null;
-        AccessController controller = null;
-        try {
-            selector = (ServiceSelector) this.manager.lookup(AccessControllerResolver.ROLE
-                    + "Selector");
-            acResolver = (AccessControllerResolver) selector
-                    .select(AccessControllerResolver.DEFAULT_RESOLVER);
-            controller = acResolver.resolveAccessController(getSourceURL());
-
-            getLogger().debug("Add identity to session");
-            getLogger().debug("User ID: [" + this.userId + "]");
-            getLogger().debug("Machine: [" + this.machineIp + "]");
-
-            Request request = ContextHelper.getRequest(this.context);
-            ((DefaultAccessController) controller).setupIdentity(request);
-            Session session = request.getSession(false);
-            Identity identity = (Identity) session.getAttribute(Identity.class.getName());
-            Identifiable[] identifiables = identity.getIdentifiables();
-            for (int i = 0; i < identifiables.length; i++) {
-                identity.removeIdentifiable(identifiables[i]);
-            }
-
-            UserManager userManager = ((DefaultAccessController) controller)
-                    .getAccreditableManager().getUserManager();
-            if (this.userId != null) {
-                User user = userManager.getUser(this.userId);
-
-                if (user == null) {
-                    throw new RuntimeException("User [" + this.userId + "] does not exist!");
-                }
-
-                identity.addIdentifiable(user);
-            }
-            if (this.machineIp != null) {
-                Machine machine = new Machine(this.machineIp);
-                identity.addIdentifiable(machine);
-            }
-
-            controller.authorize(request);
-
-        } finally {
-            if (selector != null) {
-                if (acResolver != null) {
-                    if (controller != null) {
-                        acResolver.release(controller);
-                    }
-                    selector.release(acResolver);
-                }
-                this.manager.release(selector);
-            }
-        }
-
-    }
-
-    /**
-     * @see org.apache.cocoon.components.cron.ConfigurableCronJob#setup(org.apache.avalon.framework.parameters.Parameters,
-     *      java.util.Map)
-     */
-    public void setup(Parameters parameters, Map objects) {
-        this.parameters.putAll(Parameters.toProperties(parameters));
-        this.usecaseName = (String) objects.get(USECASE_NAME);
-        this.sourceUrl = (String) objects.get(SOURCE_URL);
-        this.userId = (String) objects.get(USER_ID);
-        this.machineIp = (String) objects.get(MACHINE_IP);
-    }
-
-    private Context context;
-
-    /**
-     * @see org.apache.avalon.framework.context.Contextualizable#contextualize(org.apache.avalon.framework.context.Context)
-     */
-    public void contextualize(Context context) throws ContextException {
-        this.context = context;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/usecase/scheduling/UsecaseScheduler.java b/src/java/org/apache/lenya/cms/usecase/scheduling/UsecaseScheduler.java
deleted file mode 100644
index 0d030c7..0000000
--- a/src/java/org/apache/lenya/cms/usecase/scheduling/UsecaseScheduler.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.usecase.scheduling;
-
-import java.util.Date;
-
-import org.apache.cocoon.components.cron.JobSchedulerEntry;
-import org.apache.lenya.cms.usecase.Usecase;
-
-/**
- * Service to schedule usecases.
- * 
- * @version $Id:$
- */
-public interface UsecaseScheduler {
-    
-    /**
-     * The Avalon role.
-     */
-    String ROLE = UsecaseScheduler.class.getName();
-
-    /**
-     * Schedules a usecase at a certain date.
-     * @param usecase The usecase.
-     * @param date The invocation date.
-     */
-    void schedule(Usecase usecase, Date date);
-    
-    /**
-     * @return All scheduled jobs.
-     */
-    JobSchedulerEntry[] getJobs();
-}
diff --git a/src/java/org/apache/lenya/cms/usecase/scheduling/UsecaseSchedulerImpl.java b/src/java/org/apache/lenya/cms/usecase/scheduling/UsecaseSchedulerImpl.java
deleted file mode 100644
index 64ce33c..0000000
--- a/src/java/org/apache/lenya/cms/usecase/scheduling/UsecaseSchedulerImpl.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.usecase.scheduling;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.avalon.framework.context.Context;
-import org.apache.avalon.framework.context.ContextException;
-import org.apache.avalon.framework.context.Contextualizable;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.cocoon.components.ContextHelper;
-import org.apache.cocoon.components.cron.CronJob;
-import org.apache.cocoon.components.cron.JobScheduler;
-import org.apache.cocoon.components.cron.JobSchedulerEntry;
-import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.environment.Session;
-import org.apache.lenya.ac.Identity;
-import org.apache.lenya.ac.Machine;
-import org.apache.lenya.ac.User;
-import org.apache.lenya.cms.usecase.Usecase;
-
-/**
- * Usecase scheduler implementation.
- * 
- * @version $Id:$
- */
-public class UsecaseSchedulerImpl extends AbstractLogEnabled implements UsecaseScheduler,
-        Serviceable, Contextualizable {
-
-    /**
-     * @see org.apache.lenya.cms.usecase.scheduling.UsecaseScheduler#schedule(org.apache.lenya.cms.usecase.Usecase,
-     *      java.util.Date)
-     */
-    public void schedule(Usecase usecase, Date date) {
-        JobScheduler scheduler = null;
-        try {
-            scheduler = (JobScheduler) this.manager.lookup(JobScheduler.ROLE);
-
-            Parameters parameters = new Parameters();
-            String[] names = usecase.getParameterNames();
-            for (int i = 0; i < names.length; i++) {
-                parameters.setParameter(names[i], usecase.getParameterAsString(names[i]));
-            }
-
-            Map objects = new HashMap();
-            objects.put(UsecaseCronJob.USECASE_NAME, usecase.getName());
-            objects.put(UsecaseCronJob.SOURCE_URL, usecase.getSourceURL());
-
-            Request request = ContextHelper.getRequest(this.context);
-            Session session = request.getSession(false);
-            if (session != null) {
-                Identity identity = (Identity) session.getAttribute(Identity.class.getName());
-                if (identity != null) {
-                    User user = identity.getUser();
-                    if (user != null) {
-                        objects.put(UsecaseCronJob.USER_ID, user.getId());
-                    }
-                    Machine machine = identity.getMachine();
-                    if (machine != null) {
-                        objects.put(UsecaseCronJob.MACHINE_IP, machine.getIp());
-                    }
-                }
-            }
-
-            String role = CronJob.class.getName() + "/usecase";
-            scheduler.fireJobAt(date, "foo", role, parameters, objects);
-
-        } catch (Exception e) {
-            getLogger().error("Could not create job: ", e);
-            throw new RuntimeException(e);
-        } finally {
-            if (scheduler != null) {
-                this.manager.release(scheduler);
-            }
-        }
-    }
-    
-    protected ServiceManager manager;
-
-    /**
-     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service(ServiceManager manager) throws ServiceException {
-        this.manager = manager;
-    }
-    
-    private Context context;
-
-    /**
-     * @see org.apache.avalon.framework.context.Contextualizable#contextualize(org.apache.avalon.framework.context.Context)
-     */
-    public void contextualize(Context context) throws ContextException {
-        this.context = context;
-    }
-    
-    /**
-     * @see org.apache.lenya.cms.usecase.scheduling.UsecaseScheduler#getJobs()
-     */
-    public JobSchedulerEntry[] getJobs() {
-        JobScheduler scheduler = null;
-        JobSchedulerEntry[] entries = null;
-        try {
-            scheduler = (JobScheduler) this.manager.lookup(JobScheduler.ROLE);
-            
-            String[] jobNames = scheduler.getJobNames();
-            entries = new JobSchedulerEntry[jobNames.length];
-            
-            for (int i = 0; i < jobNames.length; i++) {
-                JobSchedulerEntry entry = scheduler.getJobSchedulerEntry(jobNames[i]);
-                entries[i] = entry;
-            }
-
-        } catch (Exception e) {
-            getLogger().error("Could not obtain job list: ", e);
-            throw new RuntimeException(e);
-        } finally {
-            if (scheduler != null) {
-                this.manager.release(scheduler);
-            }
-        }
-        return entries;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/workflow/DocumentWorkflowable.java b/src/java/org/apache/lenya/cms/workflow/DocumentWorkflowable.java
deleted file mode 100644
index bbf62c0..0000000
--- a/src/java/org/apache/lenya/cms/workflow/DocumentWorkflowable.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.workflow;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.apache.avalon.framework.container.ContainerUtil;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.lenya.cms.metadata.LenyaMetaData;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentException;
-import org.apache.lenya.cms.publication.DocumentType;
-import org.apache.lenya.workflow.Situation;
-import org.apache.lenya.workflow.Version;
-import org.apache.lenya.workflow.Workflow;
-import org.apache.lenya.workflow.Workflowable;
-
-/**
- * Workflowable around a CMS document.
- * 
- * @version $Id:$
- */
-public class DocumentWorkflowable extends AbstractLogEnabled implements Workflowable {
-
-    /**
-     * Ctor.
-     * @param document The document.
-     * @param logger The logger.
-     */
-    public DocumentWorkflowable(Document document, Logger logger) {
-        this.document = document;
-        ContainerUtil.enableLogging(this, logger);
-    }
-
-    private Document document;
-
-    /**
-     * @return The name of the workflow schema.
-     */
-    protected String getWorkflowSchema() {
-        String workflowName = null;
-        try {
-            DocumentType doctype = document.getResourceType();
-            if (doctype != null) {
-                workflowName = document.getPublication().getWorkflowSchema(doctype);
-            }
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-        return workflowName;
-    }
-
-    private Version[] versions = null;
-
-    /**
-     * @see org.apache.lenya.workflow.Workflowable#getVersions()
-     */
-    public Version[] getVersions() {
-        if (this.versions == null) {
-            try {
-                LenyaMetaData meta = this.document.getMetaDataManager().getLenyaMetaData();
-
-                String[] versionStrings = meta.getValues(LenyaMetaData.ELEMENT_WORKFLOW_VERSION);
-                this.versions = new Version[versionStrings.length];
-                for (int i = 0; i < versionStrings.length; i++) {
-                    String string = versionStrings[i];
-                    int spaceIndex = string.indexOf(" ");
-                    String numberString = string.substring(0, spaceIndex);
-                    int number = Integer.parseInt(numberString);
-                    String versionString = string.substring(spaceIndex + 1);
-                    Version version = decodeVersion(versionString);
-                    this.versions[number] = version;
-                }
-
-            } catch (DocumentException e) {
-                throw new RuntimeException();
-            }
-        }
-        return this.versions;
-    }
-
-    /**
-     * @see org.apache.lenya.workflow.Workflowable#getLatestVersion()
-     */
-    public Version getLatestVersion() {
-        Version version = null;
-        Version[] versions = getVersions();
-        if (versions.length > 0) {
-            version = versions[versions.length - 1];
-        }
-        return version;
-    }
-
-    /**
-     * @see org.apache.lenya.workflow.Workflowable#newVersion(org.apache.lenya.workflow.Workflow,
-     *      org.apache.lenya.workflow.Version, org.apache.lenya.workflow.Situation)
-     */
-    public void newVersion(Workflow workflow, Version version, Situation situation) {
-        Version[] newVersions = new Version[getVersions().length + 1];
-        for (int i = 0; i < getVersions().length; i++) {
-            newVersions[i] = getVersions()[i];
-        }
-
-        int number = newVersions.length - 1;
-        newVersions[number] = version;
-
-        String string = number + " " + encodeVersion(workflow, version, (LenyaSituation) situation);
-        try {
-            LenyaMetaData meta = this.document.getMetaDataManager().getLenyaMetaData();
-            meta.addValue(LenyaMetaData.ELEMENT_WORKFLOW_VERSION, string);
-            meta.save();
-        } catch (DocumentException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    protected String encodeVersion(Workflow workflow, Version version, LenyaSituation situation) {
-
-        String string = "event:" + version.getEvent();
-        string += " state:" + version.getState();
-
-        string += " user:" + situation.getUserId();
-        string += " machine:" + situation.getMachineIp();
-
-        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd_HH:mm:ss");
-        string += " date:" + format.format(new Date());
-
-        String names[] = workflow.getVariableNames();
-        for (int i = 0; i < names.length; i++) {
-            String value = Boolean.toString(version.getValue(names[i]));
-            string += " var:" + names[i] + "=" + value;
-        }
-        return string;
-    }
-
-    protected Version decodeVersion(String string) {
-
-        String event = null;
-        String state = null;
-        Map variables = new HashMap();
-
-        String[] parts = string.split(" ");
-        for (int i = 0; i < parts.length; i++) {
-            String[] steps = parts[i].split(":");
-            if (steps[0].equals("event")) {
-                event = steps[1];
-            }
-            if (steps[0].equals("state")) {
-                state = steps[1];
-            }
-            if (steps[0].equals("var")) {
-                String[] nameValue = steps[1].split("=");
-                variables.put(nameValue[0], nameValue[1]);
-            }
-        }
-        Version version = new LenyaVersion(event, state);
-        for (Iterator i = variables.keySet().iterator(); i.hasNext();) {
-            String name = (String) i.next();
-            String value = (String) variables.get(name);
-            version.setValue(name, Boolean.valueOf(value).booleanValue());
-        }
-        return version;
-    }
-
-    /**
-     * @see org.apache.lenya.workflow.Workflowable#getWorkflowSchemaURI()
-     */
-    public String getWorkflowSchemaURI() {
-        return this.document.getPublication().getSourceURI() + "/config/workflow/"
-                + getWorkflowSchema();
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/workflow/LenyaSituation.java b/src/java/org/apache/lenya/cms/workflow/LenyaSituation.java
deleted file mode 100644
index 3095eb2..0000000
--- a/src/java/org/apache/lenya/cms/workflow/LenyaSituation.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id: CMSSituation.java 157324 2005-03-13 09:41:14Z andreas $  */
-
-package org.apache.lenya.cms.workflow;
-
-import org.apache.lenya.workflow.Situation;
-
-/**
- * The CMS situation
- */
-public class LenyaSituation implements Situation {
-
-    /**
-     * Returns the machine IP address.
-     * @return A string.
-     */
-    public String getMachineIp() {
-        return this.machineIp;
-    }
-
-    /**
-     * Returns the user ID.
-     * @return A string.
-     */
-    public String getUserId() {
-        return this.userId;
-    }
-
-	/**
-	 * Creates a new instance of Situation
-	 * @param _roleIds The role IDs.
-     * @param _userId The user ID.
-     * @param _machineIp The machine IP address.
-	 */
-    protected LenyaSituation(String[] _roleIds, String _userId, String _machineIp) {
-        this.roleIds = _roleIds;
-        this.userId = _userId;
-        this.machineIp = _machineIp;
-    }
-
-    private String[] roleIds;
-
-    /**
-     * Get the roles
-     * @return the roles
-     */
-    public String[] getRoleIds() {
-        return this.roleIds;
-    }
-
-    /** 
-     * @see java.lang.Object#toString()
-     */
-    public String toString() {
-        String rolesString = "";
-        for (int i = 0; i < this.roleIds.length; i++) {
-            if (i > 0) {
-                rolesString += ", ";
-            }
-            rolesString += this.roleIds[i];
-        }
-        return "roles: " + rolesString;
-    }
-    
-    private String userId;
-    private String machineIp;
-    
-}
diff --git a/src/java/org/apache/lenya/cms/workflow/LenyaVersion.java b/src/java/org/apache/lenya/cms/workflow/LenyaVersion.java
deleted file mode 100644
index 0369d2d..0000000
--- a/src/java/org/apache/lenya/cms/workflow/LenyaVersion.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id: CMSVersion.java 156931 2005-03-10 10:26:24Z andreas $  */
-
-package org.apache.lenya.cms.workflow;
-
-import java.util.Date;
-
-import org.apache.lenya.workflow.impl.VersionImpl;
-
-/**
- * A CMS version
- */
-public class LenyaVersion extends VersionImpl {
-    
-    private Date date;
-
-    /**
-     * Returns the date.
-     * @return A string.
-     */
-    public Date getDate() {
-        return this.date;
-    }
-
-    /**
-     * Sets the date.
-     * @param _date A date.
-     */
-    public void setDate(Date _date) {
-        this.date = _date;
-    }
-
-    /**
-     * Returns the user ID.
-     * @return A string.
-     */
-    public String getUserId() {
-        return this.userId;
-    }
-
-    /**
-     * Sets the user ID.
-     * @param _userId A user ID.
-     */
-    public void setUserId(String _userId) {
-        this.userId = _userId;
-    }
-
-    /**
-     * Ctor.
-     * @param event The event.
-     * @param state The state.
-     */
-    public LenyaVersion(String event, String state) {
-        super(event, state);
-    }
-    
-    private String userId;
-
-}
diff --git a/src/java/org/apache/lenya/cms/workflow/LenyaWorkflowManager.java b/src/java/org/apache/lenya/cms/workflow/LenyaWorkflowManager.java
deleted file mode 100644
index e2006ba..0000000
--- a/src/java/org/apache/lenya/cms/workflow/LenyaWorkflowManager.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.workflow;
-
-import java.util.Map;
-
-import org.apache.avalon.framework.context.Context;
-import org.apache.avalon.framework.context.ContextException;
-import org.apache.avalon.framework.context.Contextualizable;
-import org.apache.cocoon.components.ContextHelper;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.environment.Session;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.Identity;
-import org.apache.lenya.ac.Machine;
-import org.apache.lenya.ac.Role;
-import org.apache.lenya.ac.User;
-import org.apache.lenya.ac.impl.PolicyAuthorizer;
-import org.apache.lenya.workflow.Situation;
-import org.apache.lenya.workflow.impl.WorkflowManagerImpl;
-
-/**
- * Lenya-specific workflow manager.
- * 
- * @version $Id:$
- */
-public class LenyaWorkflowManager extends WorkflowManagerImpl implements Contextualizable {
-
-    /**
-     * @see org.apache.lenya.workflow.WorkflowManager#getSituation()
-     */
-    public Situation getSituation() {
-        Request request = ObjectModelHelper.getRequest(this.objectModel);
-        Session session = request.getSession(false);
-
-        Situation situation = null;
-        if (session != null) {
-            Identity identity = (Identity) session.getAttribute(Identity.class.getName());
-
-            User user = identity.getUser();
-            String userId = null;
-            if (user != null) {
-                userId = user.getId();
-            }
-
-            Machine machine = identity.getMachine();
-            String machineIp = null;
-            if (machine != null) {
-                machineIp = machine.getIp();
-            }
-
-            Role[] roles;
-            try {
-                roles = PolicyAuthorizer.getRoles(request);
-            } catch (AccessControlException e) {
-                throw new RuntimeException(e);
-            }
-            String[] roleIds = new String[roles.length];
-            for (int i = 0; i < roles.length; i++) {
-                roleIds[i] = roles[i].getId();
-            }
-
-            situation = new LenyaSituation(roleIds, userId, machineIp);
-        } else {
-            situation = new LenyaSituation(new String[0], null, null);
-        }
-        return situation;
-    }
-
-    private Map objectModel;
-
-    /**
-     * @see org.apache.avalon.framework.context.Contextualizable#contextualize(org.apache.avalon.framework.context.Context)
-     */
-    public void contextualize(Context context) throws ContextException {
-        this.objectModel = ContextHelper.getObjectModel(context);
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/workflow/RoleCondition.java b/src/java/org/apache/lenya/cms/workflow/RoleCondition.java
deleted file mode 100644
index a28efa2..0000000
--- a/src/java/org/apache/lenya/cms/workflow/RoleCondition.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.workflow;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.apache.lenya.workflow.Situation;
-import org.apache.lenya.workflow.Workflow;
-import org.apache.lenya.workflow.WorkflowException;
-import org.apache.lenya.workflow.Workflowable;
-import org.apache.lenya.workflow.impl.AbstractCondition;
-
-/**
- * Role condition
- */
-public class RoleCondition extends AbstractCondition {
-    
-    private Set roleIds = new HashSet();
-    
-    protected static final String SEPARATOR = ",";
-    
-    /**
-     * @see org.apache.lenya.workflow.Condition#setExpression(java.lang.String)
-     */
-    public void setExpression(String expression) throws WorkflowException {
-        super.setExpression(expression);
-        
-        String[] roles = expression.split(SEPARATOR);
-        for (int i = 0; i < roles.length; i++) {
-            this.roleIds.add(roles[i].trim());
-        }
-    }
-
-    /**
-     * Returns if the condition is complied in a certain situation.
-     * The condition is complied when the current user has the
-     * role that is required by the RoleCondition.
-     * @see org.apache.lenya.workflow.impl.AbstractCondition#isComplied(Workflow, Situation, Workflowable)
-     */
-    public boolean isComplied(Workflow workflow, Situation situation, Workflowable instance) {
-        LenyaSituation situationImpl = (LenyaSituation) situation;
-        String[] roles = situationImpl.getRoleIds();
-
-        boolean complied = false;
-
-        for (int i = 0; i < roles.length; i++) {
-            if (this.roleIds.contains(roles[i])) {
-                complied = true;
-            }
-        }
-
-        return complied;
-    }
-
-}
diff --git a/src/java/org/apache/lenya/cms/workflow/WorkflowUtil.java b/src/java/org/apache/lenya/cms/workflow/WorkflowUtil.java
deleted file mode 100644
index 3b73e68..0000000
--- a/src/java/org/apache/lenya/cms/workflow/WorkflowUtil.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.workflow;
-
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.util.DocumentSet;
-import org.apache.lenya.workflow.WorkflowException;
-import org.apache.lenya.workflow.WorkflowManager;
-import org.apache.lenya.workflow.Workflowable;
-
-/**
- * Utility class for workflow tasks.
- * 
- * @version $Id:$
- */
-public class WorkflowUtil {
-
-    /**
-     * Invokes a workflow event on a document. This is the same as
-     * <code>invoke(Document, String, true)</code>.
-     * @param manager The service manager.
-     * @param logger The logger.
-     * @param document The document.
-     * @param event The name of the event.
-     * @throws WorkflowException if the event could not be invoked in the current situation.
-     */
-    public static void invoke(ServiceManager manager, Logger logger, Document document, String event)
-            throws WorkflowException {
-        WorkflowManager wfManager = null;
-        try {
-            wfManager = (WorkflowManager) manager.lookup(WorkflowManager.ROLE);
-            Workflowable workflowable = new DocumentWorkflowable(document, logger);
-            wfManager.invoke(workflowable, event);
-        } catch (ServiceException e) {
-            throw new WorkflowException(e);
-        } finally {
-            if (wfManager != null) {
-                manager.release(wfManager);
-            }
-        }
-
-    }
-
-    /**
-     * Invokes a workflow event on a document.
-     * @param manager The service manager.
-     * @param logger The logger.
-     * @param document The document.
-     * @param event The name of the event.
-     * @param force If this is set to <code>true</code>, the execution is forced, which means an
-     *            exception is thrown if the workflowable in the set does not support the event. If
-     *            set to <code>false</code>, non-supporting documents are ignored.
-     * @throws WorkflowException if the event could not be invoked in the current situation.
-     */
-    public static void invoke(ServiceManager manager,
-            Logger logger,
-            Document document,
-            String event,
-            boolean force) throws WorkflowException {
-        WorkflowManager wfManager = null;
-        try {
-            wfManager = (WorkflowManager) manager.lookup(WorkflowManager.ROLE);
-            Workflowable workflowable = new DocumentWorkflowable(document, logger);
-            wfManager.invoke(workflowable, event, force);
-        } catch (ServiceException e) {
-            throw new WorkflowException(e);
-        } finally {
-            if (wfManager != null) {
-                manager.release(wfManager);
-            }
-        }
-
-    }
-
-    /**
-     * Invokes a workflow event on a document set.
-     * @param manager The service manager.
-     * @param logger The logger.
-     * @param documentSet The document.
-     * @param event The event.
-     * @param force If this is set to <code>true</code>, the execution is forced, which means an
-     *            exception is thrown if a document in the set does not support the event. If set to
-     *            <code>false</code>, non-supporting documents are ignored.
-     * @throws WorkflowException if <code>force</code> is set to <code>true</code> and a
-     *             document does not support the workflow event.
-     */
-    public static void invoke(ServiceManager manager,
-            Logger logger,
-            DocumentSet documentSet,
-            String event,
-            boolean force) throws WorkflowException {
-        WorkflowManager wfManager = null;
-        try {
-            wfManager = (WorkflowManager) manager.lookup(WorkflowManager.ROLE);
-
-            Document[] documents = documentSet.getDocuments();
-            for (int i = 0; i < documents.length; i++) {
-                Workflowable workflowable = new DocumentWorkflowable(documents[i], logger);
-                wfManager.invoke(workflowable, event, force);
-            }
-
-        } catch (ServiceException e) {
-            throw new WorkflowException(e);
-        } finally {
-            if (wfManager != null) {
-                manager.release(wfManager);
-            }
-        }
-
-    }
-
-    /**
-     * Checks if an event can be invoked on a document.
-     * @param manager The service manager.
-     * @param logger The logger.
-     * @param document The document.
-     * @param event The event.
-     * @return A boolean value.
-     * @throws WorkflowException
-     */
-    public static boolean canInvoke(ServiceManager manager, Logger logger, Document document, String event)
-            throws WorkflowException {
-        WorkflowManager wfManager = null;
-        try {
-            wfManager = (WorkflowManager) manager.lookup(WorkflowManager.ROLE);
-            Workflowable workflowable = new DocumentWorkflowable(document, logger);
-            return wfManager.canInvoke(workflowable, event);
-        } catch (ServiceException e) {
-            throw new WorkflowException(e);
-        } finally {
-            if (wfManager != null) {
-                manager.release(wfManager);
-            }
-        }
-
-    }
-
-    /**
-     * Checks if an event can be invoked on all documents in a set.
-     * @param manager The service manager.
-     * @param logger The logger.
-     * @param documents The documents.
-     * @param event The event.
-     * @return if an error occurs.
-     * @throws WorkflowException
-     */
-    public static boolean canInvoke(ServiceManager manager, Logger logger, DocumentSet documents, String event)
-            throws WorkflowException {
-        WorkflowManager wfManager = null;
-        try {
-            wfManager = (WorkflowManager) manager.lookup(WorkflowManager.ROLE);
-
-            boolean canInvoke = true;
-            Document[] documentArray = documents.getDocuments();
-            for (int i = 0; i < documentArray.length; i++) {
-                Workflowable workflowable = new DocumentWorkflowable(documentArray[i], logger);
-                canInvoke = canInvoke && wfManager.canInvoke(workflowable, event);
-            }
-            return canInvoke;
-
-        } catch (ServiceException e) {
-            throw new WorkflowException(e);
-        } finally {
-            if (wfManager != null) {
-                manager.release(wfManager);
-            }
-        }
-    }
-    
-    /**
-     * Returns if a document has a workflow.
-     * @param manager The service manager.
-     * @param logger The logger.
-     * @param document The document.
-     * @return A boolean value.
-     * @throws WorkflowException if an error occurs.
-     */
-    public static boolean hasWorkflow(ServiceManager manager, Logger logger, Document document)
-            throws WorkflowException {
-        WorkflowManager wfManager = null;
-        try {
-            wfManager = (WorkflowManager) manager.lookup(WorkflowManager.ROLE);
-            Workflowable workflowable = new DocumentWorkflowable(document, logger);
-            return wfManager.hasWorkflow(workflowable);
-        } catch (ServiceException e) {
-            throw new WorkflowException(e);
-        } finally {
-            if (wfManager != null) {
-                manager.release(wfManager);
-            }
-        }
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/workflow/usecases/History.java b/src/java/org/apache/lenya/cms/workflow/usecases/History.java
deleted file mode 100644
index 9b51cb3..0000000
--- a/src/java/org/apache/lenya/cms/workflow/usecases/History.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.workflow.usecases;
-
-import org.apache.lenya.cms.usecase.DocumentUsecase;
-import org.apache.lenya.cms.workflow.DocumentWorkflowable;
-import org.apache.lenya.workflow.Version;
-
-/**
- * Display the workflow history tab in the site area
- * 
- * @version $Id$
- */
-public class History extends DocumentUsecase {
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#initParameters() TODO get wf variables, get
-     *      date and machine ip for versions
-     */
-    protected void initParameters() {
-        super.initParameters();
-
-        DocumentWorkflowable workflowable = new DocumentWorkflowable(getSourceDocument(),
-                getLogger());
-        Version[] versions = workflowable.getVersions();
-        setParameter("versions", versions);
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/cms/workflow/usecases/InvokeWorkflow.java b/src/java/org/apache/lenya/cms/workflow/usecases/InvokeWorkflow.java
deleted file mode 100644
index be0a87e..0000000
--- a/src/java/org/apache/lenya/cms/workflow/usecases/InvokeWorkflow.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.workflow.usecases;
-
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.lenya.cms.usecase.DocumentUsecase;
-import org.apache.lenya.cms.usecase.UsecaseException;
-import org.apache.lenya.cms.workflow.WorkflowUtil;
-import org.apache.lenya.transaction.Transactionable;
-
-/**
- * Invoke a workflow event on the current document. The event is obtained from the configuration in
- * <code>cocoon.xconf</code>:<code>
- * <pre>
- * 
- *  
- *   
- *    
- *       &lt;component-instance name=&quot;default/workflow.submit&quot;
- *                           logger=&quot;lenya.usecases.workflow&quot;
- *                           class=&quot;org.apache.lenya.cms.workflow.usecases.InvokeWorkflow&quot;&gt;
- *         &lt;event id=&quot;submit&quot;/&gt;
- *       &lt;/component-instance&gt;
- *     
- *    
- *   
- *  
- * </pre>
- * </code>
- * 
- * @version $Id$
- */
-public class InvokeWorkflow extends DocumentUsecase implements Configurable {
-
-    private String event;
-
-    /**
-     * @return The workflow event to use.
-     */
-    protected String getEvent() {
-        return event;
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckPreconditions()
-     */
-    protected void doCheckPreconditions() throws Exception {
-        super.doCheckPreconditions();
-
-        if (hasErrors()) {
-            return;
-        }
-
-        if (!WorkflowUtil.canInvoke(this.manager, getLogger(), getSourceDocument(), getEvent())) {
-            addErrorMessage("error-workflow-document", new String[] { getEvent(),
-                    getSourceDocument().getId() });
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#getObjectsToLock()
-     */
-    protected Transactionable[] getObjectsToLock() throws UsecaseException {
-        return getSourceDocument().getRepositoryNodes();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-        WorkflowUtil.invoke(this.manager, getLogger(), getSourceDocument(), getEvent());
-    }
-
-    protected static final String ELEMENT_EVENT = "event";
-    protected static final String ATTRIBUTE_ID = "id";
-
-    /**
-     * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
-     */
-    public void configure(Configuration config) throws ConfigurationException {
-        this.event = config.getChild(ELEMENT_EVENT).getAttribute(ATTRIBUTE_ID);
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/lenya.roles b/src/java/org/apache/lenya/lenya.roles
deleted file mode 100644
index 8399db3..0000000
--- a/src/java/org/apache/lenya/lenya.roles
+++ /dev/null
@@ -1,161 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!--
-  This file contains the role definitions for Lenya-specific Avalon services.
-  A role is the interface for an Avalon service.
-
-  The name of the role usually corresponds to the class name of the interface,
-  and is used for looking up a class implementing that interface.
-
-  The relation between a role and implementations for that role may be
-  one-to-one or one-to-many.
-
-  For a one-to-one relationship, the entry in this file can be sufficient
-  to completely specify this role, by setting the "default-class" for that
-  role. This is the class name of the implementation.
-
-  For a one-to-many relationship, the entry in this file refers to an
-  ExtendedComponentSelector, meaning that the list of available 
-  implementations for that role are retrieved via a selector.
-  This requires additional configuration in the Cocoon service
-  configuration file (cocoon.xconf).
-  
-  If a service requires configuration parameters, these can be specified
-  in the Cocoon service configuration file (cocoon.xconf) as an arbitrary
-  XML snippet which is then automatically passed to the service's 
-  configure() method at initialization.
-
-  $Id$
-  -->
-
-<!DOCTYPE role-list [
-<!ELEMENT role-list (role+)> 
-<!ELEMENT role (hint*)>
-<!ELEMENT hint EMPTY>
-<!ATTLIST role name CDATA #REQUIRED
-               shorthand CDATA #REQUIRED
-               default-class CDATA #IMPLIED
->
-<!ATTLIST hint shorthand CDATA #REQUIRED
-               class CDATA #REQUIRED
->
-]>
-
-<role-list>
-
-  <role name="org.apache.lenya.ac.AccreditableManagerSelector"
-        shorthand="accreditable-managers"
-        default-class="org.apache.cocoon.components.ExtendedComponentSelector">
-    <hint shorthand="file" class="org.apache.lenya.ac.file.FileAccreditableManager"/>
-  </role>
-    
-  <role name="org.apache.lenya.ac.AuthorizerSelector"
-        shorthand="authorizers"
-        default-class="org.apache.cocoon.components.ExtendedComponentSelector">
-    <hint shorthand="policy" class="org.apache.lenya.ac.impl.PolicyAuthorizer"/>
-    <hint shorthand="workflow" class="org.apache.lenya.cms.ac.workflow.WorkflowAuthorizer"/>
-    <hint shorthand="usecase" class="org.apache.lenya.cms.ac.usecase.UsecaseAuthorizer"/>
-  </role>
-  
-  <role name="org.apache.lenya.ac.PolicyManagerSelector"
-        shorthand="policy-managers"
-        default-class="org.apache.cocoon.components.ExtendedComponentSelector">
-    <hint shorthand="file" class="org.apache.lenya.ac.file.FilePolicyManager"/>
-    <hint shorthand="sitemap" class="org.apache.lenya.cms.ac.sitemap.SitemapPolicyManager"/>
-  </role>
-  
-  <role name="org.apache.lenya.ac.AccessController"
-        shorthand="access-controller"
-        default-class="org.apache.lenya.ac.impl.BypassableAccessController"/>
-        
-  <role name="org.apache.lenya.ac.AccessControllerResolverSelector"
-        shorthand="access-controller-resolvers"
-        default-class="org.apache.cocoon.components.ExtendedComponentSelector">
-    <hint shorthand="composable" class="org.apache.lenya.ac.ComposableAccessControllerResolver"/>
-    <hint shorthand="configurable" class="org.apache.lenya.ac.ConfigurableAccessControllerResolver"/>
-    <hint shorthand="publication" class="org.apache.lenya.cms.ac.PublicationAccessControllerResolver"/>
-  </role>
-  
-  <role name="org.apache.lenya.ac.Authenticator"
-        shorthand="authenticator"
-        default-class="org.apache.lenya.ac.impl.UserAuthenticator"/>
-        
-  <role name="org.apache.lenya.ac.cache.SourceCache"
-  		shorthand="sourcecache"
-  		default-class="org.apache.lenya.ac.cache.SourceCacheImpl"/>
-  		
-  <role name="org.apache.lenya.cms.publication.templating.PublicationTemplateManager"
-  	    shorthand="publication-template-manager"
-  	    default-class="org.apache.lenya.cms.publication.templating.PublicationTemplateManagerImpl"/>
-        
-  <role name="org.apache.lenya.cms.usecase.Operation"
-  	    shorthand="operation"
-  	    default-class="org.apache.lenya.cms.usecase.AbstractOperation"/>
-        
-  <role name="org.apache.lenya.cms.usecase.UsecaseSelector"
-        shorthand="usecases"
-        default-class="org.apache.cocoon.components.ExtendedComponentSelector"/>
-
-  <role name="org.apache.lenya.cms.usecase.UsecaseInvoker"
-  	    shorthand="usecase-invoker"
-  	    default-class="org.apache.lenya.cms.usecase.UsecaseInvokerImpl"/>
-        
-  <role name="org.apache.lenya.cms.usecase.UsecaseResolver"
-  	    shorthand="usecase-resolver"
-  	    default-class="org.apache.lenya.cms.usecase.UsecaseResolverImpl"/>
-        
-  <role name="org.apache.lenya.cms.cocoon.flow.FlowHelper"
-  	    shorthand="flowhelper"
-  	    default-class="org.apache.lenya.cms.cocoon.flow.FlowHelperImpl"/>
-        
-  <role name="org.apache.lenya.workflow.WorkflowManager"
-  	    shorthand="workflow-manager"
-  	    default-class="org.apache.lenya.cms.workflow.LenyaWorkflowManager"/>
-        
-  <role name="org.apache.lenya.cms.site.usecases.LinkRewriter"
-  	    shorthand="link-rewriter"
-  	    default-class="org.apache.lenya.cms.site.usecases.LinkRewriterImpl"/>
-        
-  <role name="org.apache.lenya.cms.publication.DocumentManager"
-  	    shorthand="document-manager"
-  	    default-class="org.apache.lenya.cms.publication.DocumentManagerImpl"/>
-        
-  <role name="org.apache.lenya.cms.publication.DocumentTypeBuilder"
-  	    shorthand="document-type-builder"
-  	    default-class="org.apache.lenya.cms.publication.DocumentTypeBuilderImpl"/>
-
-  <role name="org.apache.lenya.cms.publication.ResourcesManager"
-  	    shorthand="resources-manager"
-  	    default-class="org.apache.lenya.cms.publication.DefaultResourcesManager"/>
-        
-  <role name="org.apache.lenya.cms.site.SiteManagerSelector"
-  	    shorthand="site-managers"
-  	    default-class="org.apache.cocoon.components.ExtendedComponentSelector"/>
-        
-  <role name="org.apache.lenya.cms.publication.DocumentBuilderSelector"
-  	    shorthand="document-builders"
-  	    default-class="org.apache.cocoon.components.ExtendedComponentSelector"/>
-        
-  <role name="org.apache.lenya.cms.publication.templating.InstantiatorSelector"
-  	    shorthand="template-instantiators"
-  	    default-class="org.apache.cocoon.components.ExtendedComponentSelector"/>
-        
-  <role name="org.apache.lenya.cms.usecase.scheduling.UsecaseScheduler"
-  	    shorthand="usecase-scheduler"
-  	    default-class="org.apache.lenya.cms.usecase.scheduling.UsecaseSchedulerImpl"/>
-        
-</role-list>
diff --git a/src/java/org/apache/lenya/lucene/FileDocument.java b/src/java/org/apache/lenya/lucene/FileDocument.java
deleted file mode 100644
index f65c067..0000000
--- a/src/java/org/apache/lenya/lucene/FileDocument.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileInputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-
-import org.apache.lucene.document.DateField;
-import org.apache.lucene.document.Document;
-import org.apache.lucene.document.Field;
-
-/**
- * A utility for making Lucene Documents from a File.
- */
-public class FileDocument {
-    private FileDocument() {
-        // do nothing
-    }
-
-    /**
-     * Makes a document for a File.
-     * <p>
-     * The document has three fields:
-     * <ul>
-     * <li>
-     * <code>path</code>--containing the pathname of the file, as a stored, tokenized field;
-     * </li>
-     * <li>
-     * <code>modified</code>--containing the last modified date of the file as a keyword field as
-     * encoded by <a href="lucene.document.DateField.html">DateField</a>; and
-     * </li>
-     * <li>
-     * <code>contents</code>--containing the full contents of the file, as a Reader field.
-     * </li>
-     * </ul>
-     * </p>
-     * @param f The file
-     * @return The document
-     * @throws FileNotFoundException if the file was not found
-     */
-    public static Document document(File f) throws FileNotFoundException {
-        // make a new, empty document
-        Document doc = new Document();
-
-        // Add the path of the file as a field named "path".  Use a Text field, so
-        // that the index stores the path, and so that the path is searchable
-        doc.add(Field.Text("path", f.getPath()));
-
-        // Add the last modified date of the file a field named "modified".  Use a
-        // Keyword field, so that it's searchable, but so that no attempt is made
-        // to tokenize the field into words.
-        doc.add(Field.Keyword("modified", DateField.timeToString(f.lastModified())));
-
-        // Add the contents of the file a field named "contents".  Use a Text
-        // field, specifying a Reader, so that the text of the file is tokenized.
-        // ?? why doesn't FileReader work here ??
-        FileInputStream is = new FileInputStream(f);
-        Reader reader = new BufferedReader(new InputStreamReader(is));
-        doc.add(Field.Text("contents", reader));
-
-        // return the document
-        return doc;
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/HTMLDocument.java b/src/java/org/apache/lenya/lucene/HTMLDocument.java
deleted file mode 100644
index e024091..0000000
--- a/src/java/org/apache/lenya/lucene/HTMLDocument.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.apache.lenya.lucene.html.HTMLParser;
-import org.apache.lucene.document.DateField;
-import org.apache.lucene.document.Document;
-import org.apache.lucene.document.Field;
-
-
-/**
- * A utility for making Lucene Documents for HTML documents.
- */
-public class HTMLDocument {
-    static char dirSep = System.getProperty("file.separator").charAt(0);
-
-    private HTMLDocument() {
-        // do nothing
-    }
-
-    /**
-     * Append path and date into a string in such a way that lexicographic sorting gives the same
-     * results as a walk of the file hierarchy.  Thus null (\u0000) is used both to separate
-     * directory components and to separate the path from the date.
-     * @param f The file
-     * @param htdocsDumpDir The dump directory
-     * @return The uid
-     */
-    public static String uid(File f, File htdocsDumpDir) {
-        String requestURI = f.getPath().substring(htdocsDumpDir.getPath().length());
-        String uid = requestURI.replace(dirSep, '\u0000') + "\u0000" +
-            DateField.timeToString(f.lastModified());
-
-        return uid;
-    }
-
-    /**
-     * Convert a uid into a URL
-     * @param uid The uid
-     * @return The converted URL
-     */
-    public static String uid2url(String uid) {
-        String url = uid.replace('\u0000', '/'); // replace nulls with slashes
-
-        return url.substring(0, url.lastIndexOf('/')); // remove date from end
-    }
-
-    /**
-     * Returns a document
-     * @param f The file
-     * @param htdocsDumpDir The dump directory
-     * @return org.apache.lucene.document.Document The document
-     * @throws IOException if an IO error occurs
-     * @throws InterruptedException if an error occurs
-     */
-    public static Document document(File f, File htdocsDumpDir)
-        throws IOException, InterruptedException {
-        System.out.println("HTMLDocument.Document(File,File): " + f);
-
-        // make a new, empty document
-        Document doc = new Document();
-
-        // Add the url as a field named "url".  Use an UnIndexed field, so
-        // that the url is just stored with the document, but is not searchable.
-        String requestURI = f.getPath().replace(dirSep, '/').substring(htdocsDumpDir.getPath()
-                                                                                    .length());
-        if (requestURI.substring(requestURI.length() - 8).equals(".pdf.txt")) {
-            requestURI = requestURI.substring(0, requestURI.length() - 4); // Remove .txt extension from PDF text file
-        }
-
-        doc.add(Field.UnIndexed("url", requestURI));
-
-        // Add the mime-type as a field named "mime-type"
-        if (requestURI.substring(requestURI.length() - 5).equals(".html")) {
-            doc.add(Field.UnIndexed("mime-type", "text/html"));
-        } else if (requestURI.substring(requestURI.length() - 4).equals(".txt")) {
-            doc.add(Field.UnIndexed("mime-type", "text/plain"));
-        } else if (requestURI.substring(requestURI.length() - 4).equals(".pdf")) {
-            doc.add(Field.UnIndexed("mime-type", "application/pdf"));
-        } else {
-            doc.add(Field.UnIndexed("mime-type", "null"));
-        }
-
-        // Add the last modified date of the file a field named "modified".  Use a
-        // Keyword field, so that it's searchable, but so that no attempt is made
-        // to tokenize the field into words.
-        doc.add(Field.Keyword("modified", DateField.timeToString(f.lastModified())));
-
-        // Add the uid as a field, so that index can be incrementally maintained.
-        // This field is not stored with document, it is indexed, but it is not
-        // tokenized prior to indexing.
-        doc.add(new Field("uid", uid(f, htdocsDumpDir), false, true, false));
-
-        //HtmlDocument htmlDoc = new HtmlDocument(f);
-        HTMLParser parser = new HTMLParser(f);
-
-        // Add the summary as an UnIndexed field, so that it is stored and returned
-        // with hit documents for display.
-        // Add the title as a separate Text field, so that it can be searched separately.
-        /*
-                String title = htmlDoc.getTitle();
-
-                if (title != null) {
-                    doc.add(Field.Text("title", title));
-                } else {
-                    doc.add(Field.Text("title", ""));
-                }
-        */
-        doc.add(Field.Text("title", parser.getTitle()));
-
-        //System.out.println("HTMLDocument.getLuceneDocument(): title field added: " + title);
-        // Add the tag-stripped contents as a Reader-valued Text field so it will get tokenized and indexed.
-        /*
-                String body = htmlDoc.getBody();
-                String contents = "";
-
-                if ((body != null) && (title != null)) {
-                    contents = title + " " + body;
-                    doc.add(Field.Text("contents", title + body));
-                }
-
-                doc.add(Field.Text("contents", contents));
-        */
-        doc.add(Field.Text("contents", parser.getReader()));
-
-        return doc;
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/IndexConfiguration.java b/src/java/org/apache/lenya/lucene/IndexConfiguration.java
deleted file mode 100644
index ee697b3..0000000
--- a/src/java/org/apache/lenya/lucene/IndexConfiguration.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.lucene;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.apache.avalon.excalibur.io.FileUtil;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
-import org.apache.log4j.Logger;
-import org.xml.sax.SAXException;
-
-/**
- * @version $Id$
- */
-public class IndexConfiguration {
-    private final static Logger log = Logger.getLogger(IndexConfiguration.class);
-    private String configurationFilePath;
-    private String updateIndexType;
-    private String indexDir;
-    private String htdocsDumpDir;
-    private Class indexerClass;
-
-    /**
-     * Creates a new IndexConfiguration object.
-     * @param _configurationFilePath The path of the configuration file.
-     */
-    public IndexConfiguration(String _configurationFilePath) {
-        this.configurationFilePath = _configurationFilePath;
-
-        try {
-            File configFile = new File(_configurationFilePath);
-            DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
-            Configuration config = builder.buildFromFile(configFile);
-            configure(config);
-        } catch (ConfigurationException e) {
-            log.error("Cannot load publishing configuration! ", e);
-        } catch (SAXException e) {
-            log.error("Cannot load publishing configuration! ", e);
-        } catch (IOException e) {
-            log.error("Cannot load publishing configuration! ", e);
-        }
-    }
-
-    /**
-     * Main method.
-     * @param args The command line arguments.
-     */
-    public static void main(String[] args) {
-        if (args.length != 1) {
-            System.err.println("Usage: " + IndexConfiguration.class.getName() + " lucene.xconf");
-            return;
-        }
-
-        IndexConfiguration ic = new IndexConfiguration(args[0]);
-        String parameter;
-
-        parameter = ic.getUpdateIndexType();
-        System.out.println("Index type: " + parameter);
-
-        parameter = ic.getIndexDir();
-        System.out.println("Index dir: " + parameter);
-        System.out.println("Index dir (resolved): " + ic.resolvePath(parameter));
-
-        parameter = ic.getHTDocsDumpDir();
-        System.out.println("htdocs_dump: " + parameter);
-        System.out.println("htdocs_dump (resolved): " + ic.resolvePath(parameter));
-
-        System.out.println("Indexer class: " + ic.getIndexerClass());
-    }
-
-    /**
-     * Configures this object.
-     * @param config The configuration.
-     * @throws ConfigurationException if an error occurs.
-     */
-    protected void configure(Configuration config) throws ConfigurationException {
-        try {
-            this.updateIndexType = config.getChild("update-index").getAttribute("type");
-            this.indexDir = config.getChild("index-dir").getAttribute("src");
-            this.htdocsDumpDir = config.getChild("htdocs-dump-dir").getAttribute("src");
-            String indexerClassName = config.getChild("indexer").getAttribute("class");
-            this.indexerClass = Class.forName(indexerClassName);
-
-            if (log.isDebugEnabled()) {
-                log.debug("Configuring indexer:"
-                        + "\nupdate index type:     " + this.updateIndexType
-                        + "\nindex directory:       " + this.indexDir
-                        + "\nhtdocs dump directory: " + this.htdocsDumpDir
-                        + "\nindexer class:         " + this.indexerClass.getName());
-            }
-        } catch (ConfigurationException e) {
-            log.error("Configuration error " +e.toString());
-            throw new ConfigurationException(e.toString());
-        } catch (ClassNotFoundException e) {
-            log.error("Class not found " +e.toString());
-            throw new ConfigurationException(e.toString());
-        }
-
-    }
-
-    /**
-     * Returns the update index type.
-     * @return A string.
-     */
-    public String getUpdateIndexType() {
-        return this.updateIndexType;
-    }
-
-    /**
-     * Returns the directory where the index is stored.
-     * @return A string.
-     */
-    public String getIndexDir() {
-        return this.indexDir;
-    }
-
-    /**
-     * Returns the directory where the HTML documents are dumped.
-     * @return A string.
-     */
-    public String getHTDocsDumpDir() {
-        return this.htdocsDumpDir;
-    }
-
-    /**
-     * Returns the class of the indexer to use.
-     * @return A class.
-     */
-    public Class getIndexerClass() {
-        return this.indexerClass;
-    }
-
-    /**
-     * Resolves a path. If the path is relative, it is resolved relatively
-     * to the configuration directory.
-     * @param path A string.
-     * @return A string.
-     */
-    public String resolvePath(String path) {
-        if (path.indexOf(File.separator) == 0) {
-            return path;
-        }
-        return FileUtil.catPath(this.configurationFilePath, path);
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/lucene/IndexFiles.java b/src/java/org/apache/lenya/lucene/IndexFiles.java
deleted file mode 100644
index f0d9c92..0000000
--- a/src/java/org/apache/lenya/lucene/IndexFiles.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene;
-
-import java.io.File;
-import java.util.Date;
-
-import org.apache.lucene.analysis.standard.StandardAnalyzer;
-import org.apache.lucene.index.IndexWriter;
-
-
-class IndexFiles {
-    /**
-     * The command line interface
-     * @param args command line args
-     */
-    public static void main(String[] args) {
-        if (args.length != 2) {
-            System.err.println(
-                "Usage: org.apache.lenya.lucene.IndexFiles \"directory_to_be_indexed\" \"directory_where_index_is_located\"");
-
-            return;
-        }
-
-        File index_directory = new File(args[1]);
-        File directory_to_be_indexed = new File(args[0]);
-
-        if (!directory_to_be_indexed.exists()) {
-            System.err.println("Exception: No such directory: " +
-                index_directory.getAbsolutePath());
-
-            return;
-        }
-
-        try {
-            Date start = new Date();
-
-            IndexWriter writer = new IndexWriter(index_directory, new StandardAnalyzer(), true);
-            System.out.println("Warning: Directory will be created: " +
-                index_directory.getAbsolutePath());
-            indexDocs(writer, directory_to_be_indexed);
-
-            writer.optimize();
-            writer.close();
-
-            Date end = new Date();
-
-            System.out.print(end.getTime() - start.getTime());
-            System.out.println(" total milliseconds");
-        } catch (Exception e) {
-            System.out.println(" caught a " + e.getClass() + "\n with message: " + e.getMessage());
-        }
-    }
-
-    /**
-     * Index documents
-     * @param writer The writer
-     * @param file The file
-     * @throws Exception if an error occurs
-     */
-    public static void indexDocs(IndexWriter writer, File file)
-        throws Exception {
-        if (file.isDirectory()) {
-            String[] files = file.list();
-
-            for (int i = 0; i < files.length; i++)
-                indexDocs(writer, new File(file, files[i]));
-        } else {
-            System.out.println("adding " + file);
-            writer.addDocument(FileDocument.document(file));
-        }
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/Main.java b/src/java/org/apache/lenya/lucene/Main.java
deleted file mode 100644
index 1eb7606..0000000
--- a/src/java/org/apache/lenya/lucene/Main.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-
-/**
- * The main crawler class
- * FIXME this class does not seem to do anything
- */
-public class Main {
-    /**
-     * Command line interface
-     * @param args Command line args
-     */
-    public static void main(String[] args) {
-        if (args.length != 1) {
-            System.err.println("Usage: Main uri");
-
-            return;
-        }
-
-        try {
-            new Main().crawl(new URL(args[0]));
-        } catch (MalformedURLException e) {
-            System.err.println(e);
-        }
-    }
-
-    /**
-     * Start the crawling
-     * @param start_url The starting URL
-     */
-    public void crawl(URL start_url) {
-        System.out.println(".crawl(): INFO: " + start_url);
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/Publication.java b/src/java/org/apache/lenya/lucene/Publication.java
deleted file mode 100644
index 9b88b03..0000000
--- a/src/java/org/apache/lenya/lucene/Publication.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene;
-
-import java.util.StringTokenizer;
-
-/**
- * Parameters to do a search by Lucene and display results
- */
-public class Publication {
-    /**
-     * <code>id</code> The publication id
-     */
-    public String id = null;
-    /**
-     * <code>name</code> The publication name
-     */
-    public String name = null;
-    /**
-     * <code>indexDir</code> The index directory
-     */
-    public String indexDir = null;
-    /**
-     * <code>searchFields</code> The search fields
-     */
-    public String searchFields = null;
-    /**
-     * <code>excerptDir</code> The excerpt directory
-     */
-    public String excerptDir = null;
-    /**
-     * <code>prefix</code> The prefix
-     */
-    public String prefix = null;
-
-    /**
-     * Returns the search fields
-     * @return The search fields
-     */
-    public String[] getFields() {
-        String[] fields = null;
-        if (this.searchFields != null) {
-            StringTokenizer st = new StringTokenizer(this.searchFields, ",");
-            int length = st.countTokens();
-            fields = new String[length];
-            for (int i = 0; i < length; i++) {
-                fields[i] = st.nextToken();
-            }
-        }
-        return fields;
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/ReTokenizeFile.java b/src/java/org/apache/lenya/lucene/ReTokenizeFile.java
deleted file mode 100644
index 55cffcc..0000000
--- a/src/java/org/apache/lenya/lucene/ReTokenizeFile.java
+++ /dev/null
@@ -1,360 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.nio.charset.Charset;
-import java.nio.charset.IllegalCharsetNameException;
-import java.util.Locale;
-import java.util.StringTokenizer;
-
-import org.apache.lenya.lucene.html.HTMLParser;
-import org.apache.log4j.Logger;
-import org.apache.lucene.analysis.Token;
-import org.apache.lucene.analysis.TokenStream;
-import org.apache.lucene.analysis.standard.StandardAnalyzer;
-
-
-/**
- * Class to retokenize files
- */
-public class ReTokenizeFile {
-    private static final Logger log = Logger.getLogger(ReTokenizeFile.class);
-
-    private int offset = 100;
-    
-    /**
-     * The command line entry point
-     * @param args The command line args
-     */
-    public static void main(String[] args) {
-        if (args.length < 2) {
-            System.err.println("Usage: ReTokenizeFile filename word1 word2 ...");
-
-            return;
-        }
-
-        try {
-            String[] words = new String[args.length - 1];
-            for (int i = 1; i < args.length; i++) {
-                words[i - 1] = args[i];
-            }
-
-            String s = null;
-
-            s = new ReTokenizeFile().getExcerpt(new File(args[0]), words);
-            System.out.println("Excerpt: " + s);
-        } catch (final FileNotFoundException e) {
-            System.err.println(".main(): " + e);
-        } catch (final IOException e) {
-            System.err.println(".main(): " + e);
-        }
-
-    }
-
-    /**
-     * Retokenize a file
-     * @param file The file to retokenize
-     * @return The path to the retokenized file
-     * @throws Exception if an error occurs
-     */
-    public String reTokenize(File file) throws Exception {
-        TokenStream ts = new StandardAnalyzer().tokenStream("",new HTMLParser(file).getReader());
-
-        Token token = null;
-
-        while ((token = ts.next()) != null) {
-            System.out.println("ReTokenizeFile.reTokenize(File): " + token.termText() + " " +
-                token.startOffset() + " " + token.endOffset() + " " + token.type());
-        }
-
-        return file.getAbsolutePath();
-    }
-
-    /**
-     * Returns an excerpt from a file that contains the specified words
-     * @param file The file
-     * @param words The words
-     * @return The excerpt
-     * @throws FileNotFoundException if the file cannot be found
-     * @throws IOException if an IO error occurs
-     */
-    public String getExcerpt(File file, String[] words)
-        throws FileNotFoundException, IOException {
-        if (file.getName().substring(file.getName().length() - 4).equals(".pdf")) {
-            file = new File(file.getAbsolutePath() + ".txt");
-        }
-        
-        String content = readFileWithEncoding(file);
-
-	//log.debug(content);
-
-	content = removeTags(content);
-
-	//log.debug(content);
-        
-        
-        /*java.io.Reader reader = new HTMLParser(file).getReader();
-        char[] chars = new char[1024];
-        int chars_read;
-        java.io.Writer writer = new java.io.StringWriter();
-
-        while ((chars_read = reader.read(chars)) > 0) {
-            writer.write(chars, 0, chars_read);
-        }*/
-
-        //String html = writer.toString();
-        //html = writer.toString();
-
-        
-        int index = -1;
-
-        for (int i = 0; i < words.length; i++) {
-            index = content.toLowerCase(Locale.ENGLISH).indexOf(words[i].toLowerCase(Locale.ENGLISH));
-
-            if (index >= 0) {
-                int start = index - this.offset;
-
-                if (start < 0) {
-                    start = 0;
-                }
-
-                int end = index + words[i].length() + this.offset;
-
-                if (end >= content.length()) {
-                    end = content.length() - 1;
-                }
-
-                return content.substring(start, end);
-            }
-        }
-
-        return null;
-    }
-
-    /**
-     * Remove tags
-     * @param string Content with tags
-     * @return Content without tags
-     */
-    public String removeTags(String string) {
-        StringBuffer sb = new StringBuffer("");
-
-        boolean tag = false;
-
-        for (int i = 0; i < string.length(); i++) {
-            char ch = string.charAt(i);
-	    if (ch == '<') {
-                tag = true;
-            } else if (ch == '>') {
-                tag = false;
-            } else {
-                if (!tag) sb.append(string.charAt(i));
-            }
-        }
-
-        return sb.toString();
-    }
-
-    /**
-     * Is being used by search-and-results.xsp. Is this really still necessary?
-     * @param string content
-     * @return content without <>&
-     */
-    public String tidy(String string) {
-        StringTokenizer st = new StringTokenizer(string, "<>&");
-
-        StringBuffer sb = new StringBuffer("");
-
-        while (st.hasMoreElements()) {
-            sb.append(st.nextToken());
-        }
-
-        return sb.toString();
-    }
-
-    /**
-     * Encloses all words in <code>words</code> that appear in <code>string</code> in
-     * &lt;word&gt; tags. The whole string is enclosed in &lt;excerpt&gt; tags.
-     *
-     * @param string The string to process.
-     * @param words The words to emphasize.
-     *
-     * @return The processed string
-     */
-    public String emphasizeAsXML(String string, String[] words) {
-
-        String lowerCaseString = string.toLowerCase(Locale.ENGLISH);
-
-        for (int i = 0; i < words.length; i++) {
-            String word = words[i].toLowerCase(Locale.ENGLISH);
-
-            // use uppercase tags so that they are not replaced
-            lowerCaseString = lowerCaseString.replaceAll(word, "<WORD>" + word + "</WORD>");
-        }
-
-        lowerCaseString = lowerCaseString.toLowerCase(Locale.ENGLISH);
-
-        //if (true) return "<excerpt>" + lowerCaseString + "</excerpt>";
-        String result = "";
-        StringBuffer buf = new StringBuffer();
-
-        int sourceIndex = 0;
-        int index = 0;
-        String[] tags = { "<word>", "</word>" };
-
-        while (lowerCaseString.indexOf(tags[0], index) != -1) {
-            for (int tag = 0; tag < 2; tag++) {
-                int subStringLength = lowerCaseString.indexOf(tags[tag], index) - index;
-                String subString = string.substring(sourceIndex, sourceIndex + subStringLength);
-                buf.append((includeInCDATA(subString) + tags[tag]));
-                sourceIndex += subStringLength;
-                index += (subStringLength + tags[tag].length());
-            }
-        }
-
-        buf.append(includeInCDATA(string.substring(sourceIndex)));
-        result = buf.toString();
-
-        return "<excerpt>" + result + "</excerpt>";
-    }
-
-    /**
-     * Wraps a string in CDATA delimiters.
-     * @param string The string to wrap
-     * @return The wrapped string
-     */
-    protected String includeInCDATA(String string) {
-        return "<![CDATA[" + string + "]]>";
-    }
-    
-    /**
-     * reads a file and if the file is an xml file, determine its encoding
-     * @param file the file to read. 
-     * (if the file is an xml file with an specified encoding, this will be overwritten) 
-     * @return the contents of the file.
-     * @throws FileNotFoundException if the file cannot be found
-     * @throws IOException if an IO error occurs
-     */
-    protected String readFileWithEncoding(File file) throws FileNotFoundException, IOException {
-        String content = readHtmlFile(file);
-        // test if the file contains xml data and extract the encoding
-        int endOfFirstTag = content.indexOf(">");
-        if(endOfFirstTag > 0 && content.charAt(endOfFirstTag-1) == '?') {
-            String upperLine = content.substring(0, endOfFirstTag).toUpperCase(Locale.ENGLISH);
-            int encStart = upperLine.indexOf("ENCODING=")+10;
-            int encEnd = -1;
-
-            if (encStart > 0) {
-                encEnd = upperLine.indexOf("\"", encStart);
-                if (encEnd == -1) {
-                    encEnd = upperLine.indexOf("\'", encStart);
-                }
-            }
-            if(encStart > 0 && encEnd > 0) {
-                String xmlCharset = upperLine.substring(encStart, encEnd);
-                try {
-                    if (Charset.isSupported(xmlCharset)) {
-                        content = readFile(file, Charset.forName(xmlCharset));
-                    }
-                } catch (IllegalCharsetNameException e) {
-                    // do nothing - thrown by Charset.isSupported
-                }
-            }
-        }
-        return content;
-    }
-    
-    
-    /**
-     * read a html file.
-     * @param file the file to read
-     * @return the content of the file.
-     * @throws FileNotFoundException if the file does not exists.
-     * @throws IOException if something else went wrong.
-     */
-    protected String readHtmlFile(File file) throws FileNotFoundException, IOException {
-        java.io.Reader reader = new HTMLParser(file).getReader();
-        char[] chars = new char[1024];
-        int chars_read;
-        java.io.Writer writer = new java.io.StringWriter();
-
-        while ((chars_read = reader.read(chars)) > 0) {
-            writer.write(chars, 0, chars_read);
-        }
-        return writer.toString();
-    }
-    
-    /**
-     * reads a file in the specified charset.
-     * @param file the file to read.
-     * @param charset The charset
-     * @return the content of the file.
-     * @throws FileNotFoundException if the file does not exist.
-     * @throws IOException if something else went wrong.
-     */
-    protected String readFile(File file, Charset charset) throws FileNotFoundException, IOException {
-        FileInputStream inputFile = null;
-        InputStreamReader inputStream = null;
-        BufferedReader bufferReader = null;
-        StringBuffer buffer = null;         
-
-        try {
-            inputFile = new FileInputStream(file);
-            if(charset != null) {
-                inputStream = new InputStreamReader(inputFile, charset);
-            } else {
-                inputStream = new InputStreamReader(inputFile);
-            }
-            bufferReader = new BufferedReader(inputStream);
-            buffer = new StringBuffer();
-            String line = "";
-            while (bufferReader.ready()) {
-                line = bufferReader.readLine();
-                buffer.append(line);
-            }
-        } catch (FileNotFoundException e) {
-            log.error("File not found " +e.toString());
-        } catch (IOException e) {
-            log.error("IO error " +e.toString());
-        } finally {
-            if (bufferReader != null)
-                bufferReader.close();
-            if (inputStream != null)
-                inputStream.close();
-            if (inputFile != null)
-                inputFile.close();
-        }
-        return buffer.toString();
-    }
-
-    /**
-     * Set offset
-     * @param _offset The offset to set
-     */
-    public void setOffset(int _offset) {
-        this.offset = _offset;
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/SearchFiles.java b/src/java/org/apache/lenya/lucene/SearchFiles.java
deleted file mode 100644
index ed633f0..0000000
--- a/src/java/org/apache/lenya/lucene/SearchFiles.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.InputStreamReader;
-
-import org.apache.lucene.analysis.Analyzer;
-import org.apache.lucene.analysis.standard.StandardAnalyzer;
-import org.apache.lucene.document.Document;
-import org.apache.lucene.queryParser.QueryParser;
-import org.apache.lucene.search.Hits;
-import org.apache.lucene.search.IndexSearcher;
-import org.apache.lucene.search.Query;
-import org.apache.lucene.search.Searcher;
-
-/**
- * Command Line Interface for searching files
- */
-class SearchFiles {
-
-    /**
-     * main method
-     *
-     * @param args Directory of the index
-     */
-    public static void main(String[] args) {
-        if (args.length == 0) {
-            System.err.println("Usage: org.apache.lenya.lucene.SearchFiles \"directory_where_index_is_located\" <word>");
-            return;
-        }
-
-        File index_directory = new File(args[0]);
-
-        if (!index_directory.exists()) {
-            System.err.println("Exception: No such directory: " +
-                index_directory.getAbsolutePath());
-
-            return;
-        }
-
-
-        try {
-            if (args.length > 1) {
-                Hits hits = new SearchFiles().search(args[1], index_directory);
-                return;
-            }
-
-            BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
-
-            while (true) {
-                System.out.print("Search: ");
-
-                String line = in.readLine();
-
-                if (line.length() == -1) {
-                    break;
-                }
-
-		Hits hits = new SearchFiles().search(line, index_directory);
-
-                    System.out.print("\nAnother Search (y/n) ? ");
-                    line = in.readLine();
-
-                    if ((line.length() == 0) || (line.charAt(0) == 'n')) {
-                         break;
-                    }
-            }
-
-        } catch (Exception e) {
-            System.out.println(" caught a " + e.getClass() + "\n with message: " + e.getMessage());
-        }
-    }
-
-    /**
-     * Seach the index directory for the specified string
-     * @param line The string
-     * @param index_directory The index directory
-     * @return A Hits object containing the matches
-     * @throws Exception if an error occurs
-     *
-     */
-    public Hits search(String line, File index_directory) throws Exception {
-        Searcher searcher = new IndexSearcher(index_directory.getAbsolutePath());
-        Analyzer analyzer = new StandardAnalyzer();
-
-        Query query = QueryParser.parse(line, "contents", analyzer);
-        System.out.println("Searching for: " + query.toString("contents"));
-
-                Hits hits = searcher.search(query);
-                System.out.println("Total matching documents: " + hits.length());
-
-                final int HITS_PER_PAGE = 10;
-
-                for (int start = 0; start < hits.length(); start += HITS_PER_PAGE) {
-                    int end = Math.min(hits.length(), start + HITS_PER_PAGE);
-
-                    for (int i = start; i < end; i++) {
-                        Document doc = hits.doc(i);
-                        String path = doc.get("path");
-
-                        if (path != null) {
-                            System.out.println(i + ". " + path);
-                        } else {
-                            String url = doc.get("url");
-
-                            if (url != null) {
-                                System.out.println(i + ". " + url);
-                                System.out.println("   - " + doc.get("title"));
-                            } else {
-                                System.out.println(i + ". " + "No path nor URL for this document");
-                            }
-                        }
-                    }
-
-                }
-                searcher.close();
-        return hits;
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/html/Entities.java b/src/java/org/apache/lenya/lucene/html/Entities.java
deleted file mode 100644
index 65f995e..0000000
--- a/src/java/org/apache/lenya/lucene/html/Entities.java
+++ /dev/null
@@ -1,348 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene.html;
-
-import java.util.Hashtable;
-
-/**
- * Entities helper class
- */
-public class Entities {
-    static final Hashtable decoder = new Hashtable(300);
-    static final String[] encoder = new String[0x100];
-
-    static {
-        add("&nbsp", 160);
-        add("&iexcl", 161);
-        add("&cent", 162);
-        add("&pound", 163);
-        add("&curren", 164);
-        add("&yen", 165);
-        add("&brvbar", 166);
-        add("&sect", 167);
-        add("&uml", 168);
-        add("&copy", 169);
-        add("&ordf", 170);
-        add("&laquo", 171);
-        add("&not", 172);
-        add("&shy", 173);
-        add("&reg", 174);
-        add("&macr", 175);
-        add("&deg", 176);
-        add("&plusmn", 177);
-        add("&sup2", 178);
-        add("&sup3", 179);
-        add("&acute", 180);
-        add("&micro", 181);
-        add("&para", 182);
-        add("&middot", 183);
-        add("&cedil", 184);
-        add("&sup1", 185);
-        add("&ordm", 186);
-        add("&raquo", 187);
-        add("&frac14", 188);
-        add("&frac12", 189);
-        add("&frac34", 190);
-        add("&iquest", 191);
-        add("&Agrave", 192);
-        add("&Aacute", 193);
-        add("&Acirc", 194);
-        add("&Atilde", 195);
-        add("&Auml", 196);
-        add("&Aring", 197);
-        add("&AElig", 198);
-        add("&Ccedil", 199);
-        add("&Egrave", 200);
-        add("&Eacute", 201);
-        add("&Ecirc", 202);
-        add("&Euml", 203);
-        add("&Igrave", 204);
-        add("&Iacute", 205);
-        add("&Icirc", 206);
-        add("&Iuml", 207);
-        add("&ETH", 208);
-        add("&Ntilde", 209);
-        add("&Ograve", 210);
-        add("&Oacute", 211);
-        add("&Ocirc", 212);
-        add("&Otilde", 213);
-        add("&Ouml", 214);
-        add("&times", 215);
-        add("&Oslash", 216);
-        add("&Ugrave", 217);
-        add("&Uacute", 218);
-        add("&Ucirc", 219);
-        add("&Uuml", 220);
-        add("&Yacute", 221);
-        add("&THORN", 222);
-        add("&szlig", 223);
-        add("&agrave", 224);
-        add("&aacute", 225);
-        add("&acirc", 226);
-        add("&atilde", 227);
-        add("&auml", 228);
-        add("&aring", 229);
-        add("&aelig", 230);
-        add("&ccedil", 231);
-        add("&egrave", 232);
-        add("&eacute", 233);
-        add("&ecirc", 234);
-        add("&euml", 235);
-        add("&igrave", 236);
-        add("&iacute", 237);
-        add("&icirc", 238);
-        add("&iuml", 239);
-        add("&eth", 240);
-        add("&ntilde", 241);
-        add("&ograve", 242);
-        add("&oacute", 243);
-        add("&ocirc", 244);
-        add("&otilde", 245);
-        add("&ouml", 246);
-        add("&divide", 247);
-        add("&oslash", 248);
-        add("&ugrave", 249);
-        add("&uacute", 250);
-        add("&ucirc", 251);
-        add("&uuml", 252);
-        add("&yacute", 253);
-        add("&thorn", 254);
-        add("&yuml", 255);
-        add("&fnof", 402);
-        add("&Alpha", 913);
-        add("&Beta", 914);
-        add("&Gamma", 915);
-        add("&Delta", 916);
-        add("&Epsilon", 917);
-        add("&Zeta", 918);
-        add("&Eta", 919);
-        add("&Theta", 920);
-        add("&Iota", 921);
-        add("&Kappa", 922);
-        add("&Lambda", 923);
-        add("&Mu", 924);
-        add("&Nu", 925);
-        add("&Xi", 926);
-        add("&Omicron", 927);
-        add("&Pi", 928);
-        add("&Rho", 929);
-        add("&Sigma", 931);
-        add("&Tau", 932);
-        add("&Upsilon", 933);
-        add("&Phi", 934);
-        add("&Chi", 935);
-        add("&Psi", 936);
-        add("&Omega", 937);
-        add("&alpha", 945);
-        add("&beta", 946);
-        add("&gamma", 947);
-        add("&delta", 948);
-        add("&epsilon", 949);
-        add("&zeta", 950);
-        add("&eta", 951);
-        add("&theta", 952);
-        add("&iota", 953);
-        add("&kappa", 954);
-        add("&lambda", 955);
-        add("&mu", 956);
-        add("&nu", 957);
-        add("&xi", 958);
-        add("&omicron", 959);
-        add("&pi", 960);
-        add("&rho", 961);
-        add("&sigmaf", 962);
-        add("&sigma", 963);
-        add("&tau", 964);
-        add("&upsilon", 965);
-        add("&phi", 966);
-        add("&chi", 967);
-        add("&psi", 968);
-        add("&omega", 969);
-        add("&thetasym", 977);
-        add("&upsih", 978);
-        add("&piv", 982);
-        add("&bull", 8226);
-        add("&hellip", 8230);
-        add("&prime", 8242);
-        add("&Prime", 8243);
-        add("&oline", 8254);
-        add("&frasl", 8260);
-        add("&weierp", 8472);
-        add("&image", 8465);
-        add("&real", 8476);
-        add("&trade", 8482);
-        add("&alefsym", 8501);
-        add("&larr", 8592);
-        add("&uarr", 8593);
-        add("&rarr", 8594);
-        add("&darr", 8595);
-        add("&harr", 8596);
-        add("&crarr", 8629);
-        add("&lArr", 8656);
-        add("&uArr", 8657);
-        add("&rArr", 8658);
-        add("&dArr", 8659);
-        add("&hArr", 8660);
-        add("&forall", 8704);
-        add("&part", 8706);
-        add("&exist", 8707);
-        add("&empty", 8709);
-        add("&nabla", 8711);
-        add("&isin", 8712);
-        add("&notin", 8713);
-        add("&ni", 8715);
-        add("&prod", 8719);
-        add("&sum", 8721);
-        add("&minus", 8722);
-        add("&lowast", 8727);
-        add("&radic", 8730);
-        add("&prop", 8733);
-        add("&infin", 8734);
-        add("&ang", 8736);
-        add("&and", 8743);
-        add("&or", 8744);
-        add("&cap", 8745);
-        add("&cup", 8746);
-        add("&int", 8747);
-        add("&there4", 8756);
-        add("&sim", 8764);
-        add("&cong", 8773);
-        add("&asymp", 8776);
-        add("&ne", 8800);
-        add("&equiv", 8801);
-        add("&le", 8804);
-        add("&ge", 8805);
-        add("&sub", 8834);
-        add("&sup", 8835);
-        add("&nsub", 8836);
-        add("&sube", 8838);
-        add("&supe", 8839);
-        add("&oplus", 8853);
-        add("&otimes", 8855);
-        add("&perp", 8869);
-        add("&sdot", 8901);
-        add("&lceil", 8968);
-        add("&rceil", 8969);
-        add("&lfloor", 8970);
-        add("&rfloor", 8971);
-        add("&lang", 9001);
-        add("&rang", 9002);
-        add("&loz", 9674);
-        add("&spades", 9824);
-        add("&clubs", 9827);
-        add("&hearts", 9829);
-        add("&diams", 9830);
-        add("&quot", 34);
-        add("&amp", 38);
-        add("&lt", 60);
-        add("&gt", 62);
-        add("&OElig", 338);
-        add("&oelig", 339);
-        add("&Scaron", 352);
-        add("&scaron", 353);
-        add("&Yuml", 376);
-        add("&circ", 710);
-        add("&tilde", 732);
-        add("&ensp", 8194);
-        add("&emsp", 8195);
-        add("&thinsp", 8201);
-        add("&zwnj", 8204);
-        add("&zwj", 8205);
-        add("&lrm", 8206);
-        add("&rlm", 8207);
-        add("&ndash", 8211);
-        add("&mdash", 8212);
-        add("&lsquo", 8216);
-        add("&rsquo", 8217);
-        add("&sbquo", 8218);
-        add("&ldquo", 8220);
-        add("&rdquo", 8221);
-        add("&bdquo", 8222);
-        add("&dagger", 8224);
-        add("&Dagger", 8225);
-        add("&permil", 8240);
-        add("&lsaquo", 8249);
-        add("&rsaquo", 8250);
-        add("&euro", 8364);
-    }
-
-    static final String decode(String entity) {
-        if (entity.charAt(entity.length() - 1) == ';') { // remove trailing semicolon
-            entity = entity.substring(0, entity.length() - 1);
-        }
-
-        if (entity.charAt(1) == '#') {
-            int start = 2;
-            int radix = 10;
-
-            if ((entity.charAt(2) == 'X') || (entity.charAt(2) == 'x')) {
-                start++;
-                radix = 16;
-            }
-
-            Character c = new Character((char) Integer.parseInt(entity.substring(start), radix));
-
-            return c.toString();
-        }
-        String s = (String) decoder.get(entity);
-
-        if (s != null) {
-            return s;
-        }
-        return "";
-
-    }
-
-    /**
-     * Encodes a string
-     * @param s The string
-     * @return The encoded string
-     */
-    static final public String encode(String s) {
-        int length = s.length();
-        StringBuffer buffer = new StringBuffer(length * 2);
-
-        for (int i = 0; i < length; i++) {
-            char c = s.charAt(i);
-            int j = c;
-
-            if ((j < 0x100) && (encoder[j] != null)) {
-                buffer.append(encoder[j]); // have a named encoding
-                buffer.append(';');
-            } else if (j < 0x80) {
-                buffer.append(c); // use ASCII value
-            } else {
-                buffer.append("&#"); // use numeric encoding
-                buffer.append((int) c);
-                buffer.append(';');
-            }
-        }
-
-        return buffer.toString();
-    }
-
-    static final void add(String entity, int value) {
-        decoder.put(entity, (new Character((char) value)).toString());
-
-        if (value < 0x100) {
-            encoder[value] = entity;
-        }
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/html/HTMLParser.java b/src/java/org/apache/lenya/lucene/html/HTMLParser.java
deleted file mode 100644
index ace3195..0000000
--- a/src/java/org/apache/lenya/lucene/html/HTMLParser.java
+++ /dev/null
@@ -1,1040 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene.html;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.PipedReader;
-import java.io.PipedWriter;
-import java.io.Reader;
-
-
-/**
- * HTML Parser
- */
-public class HTMLParser implements HTMLParserConstants {
-    /**
-     * <code>SUMMARY_LENGTH</code> Contains the length of the summary.
-     */
-    public static final int SUMMARY_LENGTH = 200;
-    /**
-     * <code>token_source</code>
-     */
-    public HTMLParserTokenManager token_source;
-    /**
-     * <code>token</code>
-     */
-    public Token token;
-    /**
-     * <code>jj_nt</code>
-     */
-    public Token jj_nt;
-    /**
-     * <code>lookingAhead</code>
-     */
-    public boolean lookingAhead = false;
-
-    StringBuffer title = new StringBuffer(SUMMARY_LENGTH);
-    StringBuffer summary = new StringBuffer(SUMMARY_LENGTH * 2);
-    int length = 0;
-    boolean titleComplete = false;
-    boolean inTitle = false;
-    boolean inScript = false;
-    boolean afterTag = false;
-    boolean afterSpace = false;
-    String eol = System.getProperty("line.separator");
-    PipedReader pipeIn = null;
-    PipedWriter pipeOut;
-    int MAX_WAIT = 1000;
-    SimpleCharStream jj_input_stream;
-    private int jj_ntk;
-    private Token jj_scanpos;
-    private Token jj_lastpos;
-    private int jj_la;
-    private int jj_gen;
-    final private int[] jj_la1 = new int[13];
-    final private int[] jj_la1_0 = {
-        0xb3e, 0xb3e, 0x1000, 0x38000, 0x2000, 0x8000, 0x10000, 0x20000, 0x3b000, 0x3b000, 0x800000,
-        0x2000000, 0x18,
-    };
-    final private JJCalls[] jj_2_rtns = new JJCalls[2];
-    private boolean jj_rescan = false;
-    private int jj_gc = 0;
-    private java.util.Vector jj_expentries = new java.util.Vector();
-    private int[] jj_expentry;
-    private int jj_kind = -1;
-    private int[] jj_lasttokens = new int[100];
-    private int jj_endpos;
-
-    /**
-     * Creates a new HTMLParser object from a file
-     * @param file The file
-     * @throws FileNotFoundException if the file was not found
-     */
-    public HTMLParser(File file) throws FileNotFoundException {
-        this(new FileInputStream(file));
-    }
-
-    /**
-     * Creates a new HTMLParser object from a stream
-     * @param stream The stream
-     */
-    public HTMLParser(java.io.InputStream stream) {
-        this.jj_input_stream = new SimpleCharStream(stream, 1, 1);
-        this.token_source = new HTMLParserTokenManager(this.jj_input_stream);
-        this.token = new Token();
-        this.jj_ntk = -1;
-        this.jj_gen = 0;
-
-        for (int i = 0; i < 13; i++)
-            this.jj_la1[i] = -1;
-
-        for (int i = 0; i < this.jj_2_rtns.length; i++)
-            this.jj_2_rtns[i] = new JJCalls();
-    }
-
-    /**
-     * Creates a new HTMLParser object from a reader
-     * @param stream The reader
-     */
-    public HTMLParser(java.io.Reader stream) {
-        this.jj_input_stream = new SimpleCharStream(stream, 1, 1);
-        this.token_source = new HTMLParserTokenManager(this.jj_input_stream);
-        this.token = new Token();
-        this.jj_ntk = -1;
-        this.jj_gen = 0;
-
-        for (int i = 0; i < 13; i++)
-            this.jj_la1[i] = -1;
-
-        for (int i = 0; i < this.jj_2_rtns.length; i++)
-            this.jj_2_rtns[i] = new JJCalls();
-    }
-
-    /**
-     * Creates a new HTMLParser object from a token manager
-     * @param tm The token manager
-     */
-    public HTMLParser(HTMLParserTokenManager tm) {
-        this.token_source = tm;
-        this.token = new Token();
-        this.jj_ntk = -1;
-        this.jj_gen = 0;
-
-        for (int i = 0; i < 13; i++)
-            this.jj_la1[i] = -1;
-
-        for (int i = 0; i < this.jj_2_rtns.length; i++)
-            this.jj_2_rtns[i] = new JJCalls();
-    }
-
-    /**
-     * Get the title
-     * @return The title
-     * @throws IOException if an IO error occurs
-     * @throws InterruptedException if an error occurs
-     */
-    public String getTitle() throws IOException, InterruptedException {
-        if (this.pipeIn == null) {
-            getReader(); // spawn parsing thread
-        }
-
-        int elapsedMillis = 0;
-
-        while (true) {
-            synchronized (this) {
-                if (this.titleComplete || (this.length > SUMMARY_LENGTH)) {
-                    break;
-                }
-
-                wait(10);
-
-                elapsedMillis = elapsedMillis + 10;
-
-                if (elapsedMillis > this.MAX_WAIT) {
-                    break;
-                }
-            }
-        }
-
-        return this.title.toString().trim();
-    }
-
-    /**
-     * Get keywords
-     * @return keywords
-     * @throws IOException if an IO error occurs
-     * @throws InterruptedException if an error occurs
-     */
-    public String getKeywords() throws IOException, InterruptedException {
-        return "";
-    }
-
-    /**
-     * Get the summary
-     * @return The summary
-     * @throws IOException if an IO error occurs
-     * @throws InterruptedException if an error occurs
-     */
-    public String getSummary() throws IOException, InterruptedException {
-        System.out.println("HTMLParser().getSummary()");
-
-        if (this.pipeIn == null) {
-            getReader(); // spawn parsing thread
-        }
-
-        int elapsedMillis = 0;
-
-        while (true) {
-            synchronized (this) {
-                if (this.summary.length() >= SUMMARY_LENGTH) {
-                    break;
-                }
-
-                wait(10);
-
-                elapsedMillis = elapsedMillis + 10;
-
-                if (elapsedMillis > this.MAX_WAIT) {
-                    break;
-                }
-            }
-        }
-
-        if (this.summary.length() > SUMMARY_LENGTH) {
-            this.summary.setLength(SUMMARY_LENGTH);
-        }
-
-        String sum = this.summary.toString().trim();
-        String tit = getTitle();
-
-        if (sum.startsWith(tit)) {
-            return sum;
-        }
-        return sum;
-    }
-
-    /**
-     * Get a reader
-     * @return The reader
-     * @throws IOException if an IO error occurs
-     */
-    public Reader getReader() throws IOException {
-        if (this.pipeIn == null) {
-            this.pipeIn = new PipedReader();
-            this.pipeOut = new PipedWriter(this.pipeIn);
-
-            Thread thread = new ParserThread(this);
-            thread.start(); // start parsing
-        }
-
-        return this.pipeIn;
-    }
-
-    void addToSummary(String text) {
-        if (this.summary.length() < SUMMARY_LENGTH) {
-            this.summary.append(text);
-
-            if (this.summary.length() >= SUMMARY_LENGTH) {
-                synchronized (this) {
-                    notifyAll();
-                }
-            }
-        }
-    }
-
-    void addToTitle(String text) {
-        this.title.append(text);
-    }
-
-    void addText(String text) throws IOException {
-        if (this.inScript) {
-            return;
-        }
-
-        if (this.inTitle) {
-            addToTitle(text);
-        } else {
-            addToSummary(text);
-
-            if (!this.titleComplete && !this.title.equals("")) { // finished title
-
-                synchronized (this) {
-                    this.titleComplete = true; // tell waiting threads
-                    notifyAll();
-                }
-            }
-        }
-
-        this.length += text.length();
-        this.pipeOut.write(text);
-
-        this.afterSpace = false;
-    }
-
-    void addSpace() throws IOException {
-        if (this.inScript) {
-            return;
-        }
-
-        if (!this.afterSpace) {
-            if (this.inTitle) {
-                addToTitle(" ");
-            } else {
-                addToSummary(" ");
-            }
-
-            String space = this.afterTag ? this.eol : " ";
-            this.length += space.length();
-            this.pipeOut.write(space);
-            this.afterSpace = true;
-        }
-    }
-
-    /**
-     * Implements HTMLDocument
-     * @throws ParseException if a parser error occurs
-     * @throws IOException if an IO error occurs
-     */
-    final public void HTMLDocument() throws ParseException, IOException {
-        Token t;
-label_1: 
-        while (true) {
-            switch ((this.jj_ntk == -1) ? jj_ntk() : this.jj_ntk) {
-            case TagName:
-            case DeclName:
-            case Comment1:
-            case Comment2:
-            case Word:
-            case Entity:
-            case Space:
-            case Punct:
-
-                break;
-
-            default:
-                this.jj_la1[0] = this.jj_gen;
-
-                break label_1;
-            }
-
-            switch ((this.jj_ntk == -1) ? jj_ntk() : this.jj_ntk) {
-            case TagName:
-                tag();
-                this.afterTag = true;
-                break;
-
-            case DeclName:
-                t = decl();
-                this.afterTag = true;
-                break;
-
-            case Comment1:
-            case Comment2:
-                commentTag();
-                this.afterTag = true;
-                break;
-
-            case Word:
-                t = jj_consume_token(Word);
-                addText(t.image);
-                this.afterTag = false;
-                break;
-
-            case Entity:
-                t = jj_consume_token(Entity);
-                addText(Entities.decode(t.image));
-                this.afterTag = false;
-                break;
-
-            case Punct:
-                t = jj_consume_token(Punct);
-                addText(t.image);
-                this.afterTag = false;
-                break;
-
-            case Space:
-                jj_consume_token(Space);
-                addSpace();
-                this.afterTag = false;
-                break;
-
-            default:
-                this.jj_la1[1] = this.jj_gen;
-                jj_consume_token(-1);
-                throw new ParseException();
-            }
-        }
-
-        jj_consume_token(0);
-    }
-
-    /**
-     * tag() callback
-     * @throws ParseException if a parser error occurs
-     * @throws IOException if an IO error occurs
-     */
-    final public void tag() throws ParseException, IOException {
-        Token t1;
-        Token t2;
-        boolean inImg = false;
-        t1 = jj_consume_token(TagName);
-        this.inTitle = t1.image.equalsIgnoreCase("<title"); // keep track if in <TITLE>
-        inImg = t1.image.equalsIgnoreCase("<img"); // keep track if in <IMG>
-
-        if (this.inScript) { // keep track if in <SCRIPT>
-            this.inScript = !t1.image.equalsIgnoreCase("</script");
-        } else {
-            this.inScript = t1.image.equalsIgnoreCase("<script");
-        }
-
-label_2: 
-        while (true) {
-            switch ((this.jj_ntk == -1) ? jj_ntk() : this.jj_ntk) {
-            case ArgName:
-                break;
-
-            default:
-                this.jj_la1[2] = this.jj_gen;
-
-                break label_2;
-            }
-
-            t1 = jj_consume_token(ArgName);
-
-            switch ((this.jj_ntk == -1) ? jj_ntk() : this.jj_ntk) {
-            case ArgEquals:
-                jj_consume_token(ArgEquals);
-
-                switch ((this.jj_ntk == -1) ? jj_ntk() : this.jj_ntk) {
-                case ArgValue:
-                case ArgQuote1:
-                case ArgQuote2:
-                    t2 = argValue();
-
-                    if (inImg && t1.image.equalsIgnoreCase("alt") && (t2 != null)) {
-                        addText("[" + t2.image + "]");
-                    }
-
-                    break;
-
-                default:
-                    this.jj_la1[3] = this.jj_gen;
-                }
-
-                break;
-
-            default:
-                this.jj_la1[4] = this.jj_gen;
-            }
-        }
-
-        jj_consume_token(TagEnd);
-    }
-
-    /**
-     * ArgValue() callback
-     * @return The token
-     * @throws ParseException if a parser error occurs
-     * @throws Error if an error occurs
-     */
-    final public Token argValue() throws ParseException {
-        Token t = null;
-
-        switch ((this.jj_ntk == -1) ? jj_ntk() : this.jj_ntk) {
-        case ArgValue:
-            t = jj_consume_token(ArgValue);
-             {
-                if (true) {
-                    return t;
-                }
-            }
-
-            break;
-
-        default:
-            this.jj_la1[5] = this.jj_gen;
-
-            if (jj_2_1(2)) {
-                jj_consume_token(ArgQuote1);
-                jj_consume_token(CloseQuote1);
-
-                if (true) {
-                    return t;
-                }
-            } else {
-                switch ((this.jj_ntk == -1) ? jj_ntk() : this.jj_ntk) {
-                case ArgQuote1:
-                    jj_consume_token(ArgQuote1);
-                    t = jj_consume_token(Quote1Text);
-                    jj_consume_token(CloseQuote1);
-                     {
-                        if (true) {
-                            return t;
-                        }
-                    }
-
-                    break;
-
-                default:
-                    this.jj_la1[6] = this.jj_gen;
-
-                    if (jj_2_2(2)) {
-                        jj_consume_token(ArgQuote2);
-                        jj_consume_token(CloseQuote2);
-
-                        if (true) {
-                            return t;
-                        }
-                    } else {
-                        switch ((this.jj_ntk == -1) ? jj_ntk() : this.jj_ntk) {
-                        case ArgQuote2:
-                            jj_consume_token(ArgQuote2);
-                            t = jj_consume_token(Quote2Text);
-                            jj_consume_token(CloseQuote2);
-                             {
-                                if (true) {
-                                    return t;
-                                }
-                            }
-
-                            break;
-
-                        default:
-                            this.jj_la1[7] = this.jj_gen;
-                            jj_consume_token(-1);
-                            throw new ParseException();
-                        }
-                    }
-                }
-            }
-        }
-
-        throw new Error("Missing return statement in function");
-    }
-
-    /**
-     * Decl() callback
-     * @return The token
-     * @throws ParseException if a parser error occurs
-     * @throws Error if an error occurs
-     */
-    final public Token decl() throws ParseException {
-        Token t;
-        t = jj_consume_token(DeclName);
-label_3: 
-        while (true) {
-            switch ((this.jj_ntk == -1) ? jj_ntk() : this.jj_ntk) {
-            case ArgName:
-            case ArgEquals:
-            case ArgValue:
-            case ArgQuote1:
-            case ArgQuote2:
-
-                break;
-
-            default:
-                this.jj_la1[8] = this.jj_gen;
-
-                break label_3;
-            }
-
-            switch ((this.jj_ntk == -1) ? jj_ntk() : this.jj_ntk) {
-            case ArgName:
-                jj_consume_token(ArgName);
-
-                break;
-
-            case ArgValue:
-            case ArgQuote1:
-            case ArgQuote2:
-                argValue();
-
-                break;
-
-            case ArgEquals:
-                jj_consume_token(ArgEquals);
-
-                break;
-
-            default:
-                this.jj_la1[9] = this.jj_gen;
-                jj_consume_token(-1);
-                throw new ParseException();
-            }
-        }
-
-        jj_consume_token(TagEnd);
-
-        if (true) {
-            return t;
-        }
-
-        throw new Error("Missing return statement in function");
-    }
-
-    /**
-     * CommentTag() callback
-     * @throws ParseException if a parser error occurs
-     */
-    final public void commentTag() throws ParseException {
-        switch ((this.jj_ntk == -1) ? jj_ntk() : this.jj_ntk) {
-        case Comment1:
-            jj_consume_token(Comment1);
-label_4: 
-            while (true) {
-                switch ((this.jj_ntk == -1) ? jj_ntk() : this.jj_ntk) {
-                case CommentText1:
-
-                    break;
-
-                default:
-                    this.jj_la1[10] = this.jj_gen;
-
-                    break label_4;
-                }
-
-                jj_consume_token(CommentText1);
-            }
-
-            jj_consume_token(CommentEnd1);
-
-            break;
-
-        case Comment2:
-            jj_consume_token(Comment2);
-label_5: 
-            while (true) {
-                switch ((this.jj_ntk == -1) ? jj_ntk() : this.jj_ntk) {
-                case CommentText2:
-
-                    break;
-
-                default:
-                    this.jj_la1[11] = this.jj_gen;
-
-                    break label_5;
-                }
-
-                jj_consume_token(CommentText2);
-            }
-
-            jj_consume_token(CommentEnd2);
-
-            break;
-
-        default:
-            this.jj_la1[12] = this.jj_gen;
-            jj_consume_token(-1);
-            throw new ParseException();
-        }
-    }
-
-    final private boolean jj_2_1(int xla) {
-        this.jj_la = xla;
-        this.jj_lastpos = this.jj_scanpos = this.token;
-
-        boolean retval = !jj_3_1();
-        jj_save(0, xla);
-
-        return retval;
-    }
-
-    final private boolean jj_2_2(int xla) {
-        this.jj_la = xla;
-        this.jj_lastpos = this.jj_scanpos = this.token;
-
-        boolean retval = !jj_3_2();
-        jj_save(1, xla);
-
-        return retval;
-    }
-
-    final private boolean jj_3_1() {
-        if (jj_scan_token(ArgQuote1)) {
-            return true;
-        }
-
-        if ((this.jj_la == 0) && (this.jj_scanpos == this.jj_lastpos)) {
-            return false;
-        }
-
-        if (jj_scan_token(CloseQuote1)) {
-            return true;
-        }
-
-        if ((this.jj_la == 0) && (this.jj_scanpos == this.jj_lastpos)) {
-            return false;
-        }
-
-        return false;
-    }
-
-    final private boolean jj_3_2() {
-        if (jj_scan_token(ArgQuote2)) {
-            return true;
-        }
-
-        if ((this.jj_la == 0) && (this.jj_scanpos == this.jj_lastpos)) {
-            return false;
-        }
-
-        if (jj_scan_token(CloseQuote2)) {
-            return true;
-        }
-
-        if ((this.jj_la == 0) && (this.jj_scanpos == this.jj_lastpos)) {
-            return false;
-        }
-
-        return false;
-    }
-
-    /**
-     * Reinitialize the Parser
-     * @param stream The stream
-     */
-    public void reInit(java.io.InputStream stream) {
-        this.jj_input_stream.reInit(stream, 1, 1);
-        this.token_source.reInit(this.jj_input_stream);
-        this.token = new Token();
-        this.jj_ntk = -1;
-        this.jj_gen = 0;
-
-        for (int i = 0; i < 13; i++)
-            this.jj_la1[i] = -1;
-
-        for (int i = 0; i < this.jj_2_rtns.length; i++)
-            this.jj_2_rtns[i] = new JJCalls();
-    }
-
-    /**
-     * Reinitialize the Parser
-     * @param stream The reader
-     */
-    public void reInit(java.io.Reader stream) {
-        this.jj_input_stream.reInit(stream, 1, 1);
-        this.token_source.reInit(this.jj_input_stream);
-        this.token = new Token();
-        this.jj_ntk = -1;
-        this.jj_gen = 0;
-
-        for (int i = 0; i < 13; i++)
-            this.jj_la1[i] = -1;
-
-        for (int i = 0; i < this.jj_2_rtns.length; i++)
-            this.jj_2_rtns[i] = new JJCalls();
-    }
-
-    /**
-     * Reinitialize the Parser
-     * @param tm The token manager
-     */
-    public void reInit(HTMLParserTokenManager tm) {
-        this.token_source = tm;
-        this.token = new Token();
-        this.jj_ntk = -1;
-        this.jj_gen = 0;
-
-        for (int i = 0; i < 13; i++)
-            this.jj_la1[i] = -1;
-
-        for (int i = 0; i < this.jj_2_rtns.length; i++)
-            this.jj_2_rtns[i] = new JJCalls();
-    }
-
-    final private Token jj_consume_token(int kind) throws ParseException {
-        Token oldToken;
-
-        if ((oldToken = this.token).next != null) {
-            this.token = this.token.next;
-        } else {
-            this.token = this.token.next = this.token_source.getNextToken();
-        }
-
-        this.jj_ntk = -1;
-
-        if (this.token.kind == kind) {
-            this.jj_gen++;
-
-            if (++this.jj_gc > 100) {
-                this.jj_gc = 0;
-
-                for (int i = 0; i < this.jj_2_rtns.length; i++) {
-                    JJCalls c = this.jj_2_rtns[i];
-
-                    while (c != null) {
-                        if (c.gen < this.jj_gen) {
-                            c.first = null;
-                        }
-
-                        c = c.next;
-                    }
-                }
-            }
-
-            return this.token;
-        }
-
-        this.token = oldToken;
-        this.jj_kind = kind;
-        throw generateParseException();
-    }
-
-    final private boolean jj_scan_token(int kind) {
-        if (this.jj_scanpos == this.jj_lastpos) {
-            this.jj_la--;
-
-            if (this.jj_scanpos.next == null) {
-                this.jj_lastpos = this.jj_scanpos = this.jj_scanpos.next = this.token_source.getNextToken();
-            } else {
-                this.jj_lastpos = this.jj_scanpos = this.jj_scanpos.next;
-            }
-        } else {
-            this.jj_scanpos = this.jj_scanpos.next;
-        }
-
-        if (this.jj_rescan) {
-            int i = 0;
-            Token tok = this.token;
-
-            while ((tok != null) && (tok != this.jj_scanpos)) {
-                i++;
-                tok = tok.next;
-            }
-
-            if (tok != null) {
-                jj_add_error_token(kind, i);
-            }
-        }
-
-        return (this.jj_scanpos.kind != kind);
-    }
-
-    /**
-     * Get the next token
-     * @return The token
-     */
-    final public Token getNextToken() {
-        if (this.token.next != null) {
-            this.token = this.token.next;
-        } else {
-            this.token = this.token.next = this.token_source.getNextToken();
-        }
-
-        this.jj_ntk = -1;
-        this.jj_gen++;
-
-        return this.token;
-    }
-
-    /**
-     * Get token at position
-     * @param index The position
-     * @return The token
-     */
-    final public Token getToken(int index) {
-        Token t = this.lookingAhead ? this.jj_scanpos : this.token;
-
-        for (int i = 0; i < index; i++) {
-            if (t.next != null) {
-                t = t.next;
-            } else {
-                t = t.next = this.token_source.getNextToken();
-            }
-        }
-
-        return t;
-    }
-
-    final private int jj_ntk() {
-        if ((this.jj_nt = this.token.next) == null) {
-            return (this.jj_ntk = (this.token.next = this.token_source.getNextToken()).kind);
-        }
-        return (this.jj_ntk = this.jj_nt.kind);
-    }
-
-    private void jj_add_error_token(int kind, int pos) {
-        if (pos >= 100) {
-            return;
-        }
-
-        if (pos == (this.jj_endpos + 1)) {
-            this.jj_lasttokens[this.jj_endpos++] = kind;
-        } else if (this.jj_endpos != 0) {
-            this.jj_expentry = new int[this.jj_endpos];
-
-            for (int i = 0; i < this.jj_endpos; i++) {
-                this.jj_expentry[i] = this.jj_lasttokens[i];
-            }
-
-            boolean exists = false;
-
-            for (java.util.Enumeration tEnum = this.jj_expentries.elements(); tEnum.hasMoreElements();) {
-                int[] oldentry = (int[]) (tEnum.nextElement());
-
-                if (oldentry.length == this.jj_expentry.length) {
-                    exists = true;
-
-                    for (int i = 0; i < this.jj_expentry.length; i++) {
-                        if (oldentry[i] != this.jj_expentry[i]) {
-                            exists = false;
-
-                            break;
-                        }
-                    }
-
-                    if (exists) {
-                        break;
-                    }
-                }
-            }
-
-            if (!exists) {
-                this.jj_expentries.addElement(this.jj_expentry);
-            }
-
-            if (pos != 0) {
-                this.jj_lasttokens[(this.jj_endpos = pos) - 1] = kind;
-            }
-        }
-    }
-
-    /**
-     * Generate a parse exception
-     * @return The exception
-     */
-    final public ParseException generateParseException() {
-        this.jj_expentries.removeAllElements();
-
-        boolean[] la1tokens = new boolean[27];
-
-        for (int i = 0; i < 27; i++) {
-            la1tokens[i] = false;
-        }
-
-        if (this.jj_kind >= 0) {
-            la1tokens[this.jj_kind] = true;
-            this.jj_kind = -1;
-        }
-
-        for (int i = 0; i < 13; i++) {
-            if (this.jj_la1[i] == this.jj_gen) {
-                for (int j = 0; j < 32; j++) {
-                    if ((this.jj_la1_0[i] & (1 << j)) != 0) {
-                        la1tokens[j] = true;
-                    }
-                }
-            }
-        }
-
-        for (int i = 0; i < 27; i++) {
-            if (la1tokens[i]) {
-                this.jj_expentry = new int[1];
-                this.jj_expentry[0] = i;
-                this.jj_expentries.addElement(this.jj_expentry);
-            }
-        }
-
-        this.jj_endpos = 0;
-        jj_rescan_token();
-        jj_add_error_token(0, 0);
-
-        int[][] exptokseq = new int[this.jj_expentries.size()][];
-
-        for (int i = 0; i < this.jj_expentries.size(); i++) {
-            exptokseq[i] = (int[]) this.jj_expentries.elementAt(i);
-        }
-
-        return new ParseException(this.token, exptokseq, tokenImage);
-    }
-
-    /**
-     * Enable tracing
-     */
-    final public void enable_tracing() {
-        // do nothing
-    }
-
-    /**
-     * Disable tracing
-     */
-    final public void disable_tracing() {
-        // do nothing
-    }
-
-    final private void jj_rescan_token() {
-        this.jj_rescan = true;
-
-        for (int i = 0; i < 2; i++) {
-            JJCalls p = this.jj_2_rtns[i];
-
-            do {
-                if (p.gen > this.jj_gen) {
-                    this.jj_la = p.arg;
-                    this.jj_lastpos = this.jj_scanpos = p.first;
-
-                    switch (i) {
-                    case 0:
-                        jj_3_1();
-
-                        break;
-
-                    case 1:
-                        jj_3_2();
-
-                        break;
-                    }
-                }
-
-                p = p.next;
-            } while (p != null);
-        }
-
-        this.jj_rescan = false;
-    }
-
-    final private void jj_save(int index, int xla) {
-        JJCalls p = this.jj_2_rtns[index];
-
-        while (p.gen > this.jj_gen) {
-            if (p.next == null) {
-                p = p.next = new JJCalls();
-
-                break;
-            }
-
-            p = p.next;
-        }
-
-        p.gen = (this.jj_gen + xla) - this.jj_la;
-        p.first = this.token;
-        p.arg = xla;
-    }
-
-    static final class JJCalls {
-        int gen;
-        Token first;
-        int arg;
-        JJCalls next;
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/html/HTMLParserConstants.java b/src/java/org/apache/lenya/lucene/html/HTMLParserConstants.java
deleted file mode 100644
index 2f100f9..0000000
--- a/src/java/org/apache/lenya/lucene/html/HTMLParserConstants.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene.html;
-
-/**
- * Constants used by the HTML parser
- */
-public interface HTMLParserConstants {
-    /**
-     * <code>EOF</code> End of file
-     */
-    int EOF = 0;
-    /**
-     * <code>TagName</code> The tag name
-     */
-    int TagName = 1;
-    /**
-     * <code>DeclName</code> The declaration name
-     */
-    int DeclName = 2;
-    /**
-     * <code>Comment1</code> Comment 1
-     */
-    int Comment1 = 3;
-    /**
-     * <code>Comment2</code> Comment 2
-     */
-    int Comment2 = 4;
-    /**
-     * <code>Word</code> Word
-     */
-    int Word = 5;
-    /**
-     * <code>LET</code> LET
-     */
-    int LET = 6;
-    /**
-     * <code>NUM</code> NUM
-     */
-    int NUM = 7;
-    /**
-     * <code>Entity</code> The entity
-     */
-    int Entity = 8;
-    /**
-     * <code>Space</code> The space
-     */
-    int Space = 9;
-    /**
-     * <code>SP</code> SP
-     */
-    int SP = 10;
-    /**
-     * <code>Punct</code> Punct
-     */
-    int Punct = 11;
-    /**
-     * <code>ArgName</code> Argument Name
-     */
-    int ArgName = 12;
-    /**
-     * <code>ArgEquals</code> The equals sign
-     */
-    int ArgEquals = 13;
-    /**
-     * <code>TagEnd</code> The end of the tag
-     */
-    int TagEnd = 14;
-    /**
-     * <code>ArgValue</code> The argument value
-     */
-    int ArgValue = 15;
-    /**
-     * <code>ArgQuote1</code> Quote 1 of the argument
-     */
-    int ArgQuote1 = 16;
-    /**
-     * <code>ArgQuote2</code> Quote 2 of the argument
-     */
-    int ArgQuote2 = 17;
-    /**
-     * <code>Quote1Text</code> Quote 1 of the text
-     */
-    int Quote1Text = 19;
-    /**
-     * <code>CloseQuote1</code> Closing quote 1
-     */
-    int CloseQuote1 = 20;
-    /**
-     * <code>Quote2Text</code> Quote 2 of the text
-     */
-    int Quote2Text = 21;
-    /**
-     * <code>CloseQuote2</code> Closing quote 2
-     */
-    int CloseQuote2 = 22;
-    /**
-     * <code>CommentText1</code> Comment text 1
-     */
-    int CommentText1 = 23;
-    /**
-     * <code>CommentEnd1</code> Comment end 1
-     */
-    int CommentEnd1 = 24;
-    /**
-     * <code>CommentText2</code> Comment text 2
-     */
-    int CommentText2 = 25;
-    /**
-     * <code>CommentEnd2</code> Comment end 2
-     */
-    int CommentEnd2 = 26;
-    /**
-     * <code>DEFAULT</code> Default state
-     */
-    int DEFAULT = 0;
-    /**
-     * <code>WithinTag</code> Within a tag state
-     */
-    int WithinTag = 1;
-    /**
-     * <code>AfterEquals</code> After equals state
-     */
-    int AfterEquals = 2;
-    /**
-     * <code>WithinQuote1</code> Within Quote 1 state
-     */
-    int WithinQuote1 = 3;
-    /**
-     * <code>WithinQuote2</code> Within Quote 2 state
-     */
-    int WithinQuote2 = 4;
-    /**
-     * <code>WithinComment1</code> Within comment 1 state
-     */
-    int WithinComment1 = 5;
-    /**
-     * <code>WithinComment2</code> Within comment 2 state
-     */
-    int WithinComment2 = 6;
-    /**
-     * <code>tokenImage</code> Image Token
-     */
-    String[] tokenImage = {
-        "<EOF>", "<TagName>", "<DeclName>", "\"<!--\"", "\"<!\"", "<Word>", "<LET>", "<NUM>",
-        "<Entity>", "<Space>", "<SP>", "<Punct>", "<ArgName>", "\"=\"", "<TagEnd>", "<ArgValue>",
-        "\"\\\'\"", "\"\\\"\"", "<token of kind 18>", "<Quote1Text>", "<CloseQuote1>",
-        "<Quote2Text>", "<CloseQuote2>", "<CommentText1>", "\"-->\"", "<CommentText2>", "\">\"",
-    };
-}
diff --git a/src/java/org/apache/lenya/lucene/html/HTMLParserTokenManager.java b/src/java/org/apache/lenya/lucene/html/HTMLParserTokenManager.java
deleted file mode 100644
index 9cb1c86..0000000
--- a/src/java/org/apache/lenya/lucene/html/HTMLParserTokenManager.java
+++ /dev/null
@@ -1,1738 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene.html;
-
-/**
- * Auto-generated (by JavaCC) class for HTML Parser tokens
- */
-public class HTMLParserTokenManager implements HTMLParserConstants {
-    static final long[] jjbitVec0 = { 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL };
-    static final int[] jjnextStates = {
-        17, 18, 21, 12, 14, 5, 8, 0, 4, 6, 0, 4, 6, 5, 0, 4, 6, 12, 13,
-    };
-    /**
-     * <code>jjstrLiteralImages</code>
-     */
-    public static final String[] jjstrLiteralImages = {
-        "", null, null, "\74\41\55\55", "\74\41", null, null, null, null, null, null, null, null,
-        "\75", null, null, "\47", "\42", null, null, null, null, null, null, "\55\55\76", null,
-        "\76",
-    };
-    /**
-     * <code>lexStateNames</code> (represents parser states)
-     */
-    public static final String[] lexStateNames = {
-        "DEFAULT", "WithinTag", "AfterEquals", "WithinQuote1", "WithinQuote2", "WithinComment1",
-        "WithinComment2",
-    };
-    /**
-     * <code>jjnewLexState</code> (further parser states)
-     */
-    public static final int[] jjnewLexState = {
-        -1, 1, 1, 5, 6, -1, -1, -1, -1, -1, -1, -1, -1, 2, 0, 1, 3, 4, -1, -1, 1, -1, 1, -1, 0, -1,
-        0,
-    };
-    static final long[] jjtoToken = { 0x7fbfb3fL, };
-    static final long[] jjtoSkip = { 0x40000L, };
-    /**
-     * <code>debugStream</code> The debug stream for this parser
-     */
-    public java.io.PrintStream debugStream = System.out;
-    private SimpleCharStream input_stream;
-    private final int[] jjrounds = new int[25];
-    private final int[] jjstateSet = new int[50];
-    protected char curChar;
-    int curLexState = 0;
-    int defaultLexState = 0;
-    int jjnewStateCnt;
-    int jjround;
-    int jjmatchedPos;
-    int jjmatchedKind;
-
-    /**
-     * Creates a new HTMLParserTokenManager object using a Stream
-     * @param stream The stream
-     */
-    public HTMLParserTokenManager(SimpleCharStream stream) {
-        if (SimpleCharStream.staticFlag) {
-            throw new Error(
-                "ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
-        }
-
-        this.input_stream = stream;
-    }
-
-    /**
-     * Creates a new HTMLParserTokenManager object.
-     * @param stream The stream
-     * @param lexState The parser state
-     */
-    public HTMLParserTokenManager(SimpleCharStream stream, int lexState) {
-        this(stream);
-        switchTo(lexState);
-    }
-
-    /**
-     * Set the debug stream
-     * @param ds The debug stream
-     */
-    public void setDebugStream(java.io.PrintStream ds) {
-        this.debugStream = ds;
-    }
-
-    private final int jjStopStringLiteralDfa_0(int pos, long active0) {
-        switch (pos) {
-        case 0:
-
-            if ((active0 & 0x18L) != 0L) {
-                return 17;
-            }
-
-            return -1;
-
-        case 1:
-
-            if ((active0 & 0x18L) != 0L) {
-                return 22;
-            }
-
-            return -1;
-
-        default:
-            return -1;
-        }
-    }
-
-    private final int jjStartNfa_0(int pos, long active0) {
-        return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1);
-    }
-
-    private final int jjStopAtPos(int pos, int kind) {
-        this.jjmatchedKind = kind;
-        this.jjmatchedPos = pos;
-
-        return pos + 1;
-    }
-
-    private final int jjMoveStringLiteralDfa0_0() {
-        switch (this.curChar) {
-        case 60:
-            return jjMoveStringLiteralDfa1_0(0x18L);
-
-        default:
-            return jjMoveNfa_0(11, 0);
-        }
-    }
-
-    private final int jjMoveStringLiteralDfa1_0(long active0) {
-        try {
-            this.curChar = this.input_stream.readChar();
-        } catch (java.io.IOException e) {
-            jjStopStringLiteralDfa_0(0, active0);
-
-            return 1;
-        }
-
-        switch (this.curChar) {
-        case 33:
-
-            if ((active0 & 0x10L) != 0L) {
-                this.jjmatchedKind = 4;
-                this.jjmatchedPos = 1;
-            }
-
-            return jjMoveStringLiteralDfa2_0(active0, 0x8L);
-
-        default:
-            break;
-        }
-
-        return jjStartNfa_0(0, active0);
-    }
-
-    private final int jjMoveStringLiteralDfa2_0(long old0, long active0) {
-        if ((active0 &= old0) == 0L) {
-            return jjStartNfa_0(0, old0);
-        }
-
-        try {
-            this.curChar = this.input_stream.readChar();
-        } catch (java.io.IOException e) {
-            jjStopStringLiteralDfa_0(1, active0);
-
-            return 2;
-        }
-
-        switch (this.curChar) {
-        case 45:
-            return jjMoveStringLiteralDfa3_0(active0, 0x8L);
-
-        default:
-            break;
-        }
-
-        return jjStartNfa_0(1, active0);
-    }
-
-    private final int jjMoveStringLiteralDfa3_0(long old0, long active0) {
-        if ((active0 &= old0) == 0L) {
-            return jjStartNfa_0(1, old0);
-        }
-
-        try {
-            this.curChar = this.input_stream.readChar();
-        } catch (java.io.IOException e) {
-            jjStopStringLiteralDfa_0(2, active0);
-
-            return 3;
-        }
-
-        switch (this.curChar) {
-        case 45:
-
-            if ((active0 & 0x8L) != 0L) {
-                return jjStopAtPos(3, 3);
-            }
-
-            break;
-
-        default:
-            break;
-        }
-
-        return jjStartNfa_0(2, active0);
-    }
-
-    private final void jjCheckNAdd(int state) {
-        if (this.jjrounds[state] != this.jjround) {
-            this.jjstateSet[this.jjnewStateCnt++] = state;
-            this.jjrounds[state] = this.jjround;
-        }
-    }
-
-    private final void jjAddStates(int start, int end) {
-        do {
-            this.jjstateSet[this.jjnewStateCnt++] = jjnextStates[start];
-        } while (start++ != end);
-    }
-
-    private final void jjCheckNAddTwoStates(int state1, int state2) {
-        jjCheckNAdd(state1);
-        jjCheckNAdd(state2);
-    }
-
-    private final void jjCheckNAddStates(int start, int end) {
-        do {
-            jjCheckNAdd(jjnextStates[start]);
-        } while (start++ != end);
-    }
-
-    private final int jjMoveNfa_0(int startState, int curPos) {
-        int startsAt = 0;
-        this.jjnewStateCnt = 25;
-
-        int i = 1;
-        this.jjstateSet[0] = startState;
-
-        int kind = 0x7fffffff;
-
-        for (;;) {
-            if (++this.jjround == 0x7fffffff) {
-                reInitRounds();
-            }
-
-            if (this.curChar < 64) {
-                long l = 1L << this.curChar;
-MatchLoop: 
-                do {
-                    switch (this.jjstateSet[--i]) {
-                    case 11:
-
-                        if ((0x3ff000000000000L & l) != 0L) {
-                            jjCheckNAddTwoStates(7, 2);
-                        } else if ((0x100002600L & l) != 0L) {
-                            if (kind > 9) {
-                                kind = 9;
-                            }
-
-                            jjCheckNAdd(10);
-                        } else if (this.curChar == 60) {
-                            jjCheckNAddStates(0, 2);
-                        } else if (this.curChar == 38) {
-                            jjAddStates(3, 4);
-                        } else if (this.curChar == 36) {
-                            this.jjstateSet[this.jjnewStateCnt++] = 1;
-                        }
-
-                        if ((0x3ff000000000000L & l) != 0L) {
-                            if (kind > 5) {
-                                kind = 5;
-                            }
-
-                            jjCheckNAddStates(5, 9);
-                        }
-
-                        break;
-
-                    case 17:
-
-                        if (this.curChar == 33) {
-                            this.jjstateSet[this.jjnewStateCnt++] = 22;
-                        } else if (this.curChar == 47) {
-                            jjCheckNAdd(18);
-                        }
-
-                        break;
-
-                    case 0:
-
-                        if (this.curChar == 36) {
-                            this.jjstateSet[this.jjnewStateCnt++] = 1;
-                        }
-
-                        break;
-
-                    case 1:
-
-                        if ((0x3ff000000000000L & l) != 0L) {
-                            jjCheckNAdd(2);
-                        }
-
-                        break;
-
-                    case 2:
-
-                        if ((0x500000000000L & l) != 0L) {
-                            this.jjstateSet[this.jjnewStateCnt++] = 3;
-                        }
-
-                        break;
-
-                    case 3:
-                    case 9:
-
-                        if ((0x3ff000000000000L & l) == 0L) {
-                            break;
-                        }
-
-                        if (kind > 5) {
-                            kind = 5;
-                        }
-
-                        jjCheckNAddStates(10, 12);
-
-                        break;
-
-                    case 4:
-
-                        if ((0x3ff000000000000L & l) == 0L) {
-                            break;
-                        }
-
-                        if (kind > 5) {
-                            kind = 5;
-                        }
-
-                        jjCheckNAddStates(5, 9);
-
-                        break;
-
-                    case 5:
-
-                        if ((0x880000000000L & l) == 0L) {
-                            break;
-                        }
-
-                        if (kind > 5) {
-                            kind = 5;
-                        }
-
-                        jjCheckNAddStates(13, 16);
-
-                        break;
-
-                    case 6:
-
-                        if ((0x3ff000000000000L & l) != 0L) {
-                            jjCheckNAddTwoStates(7, 2);
-                        }
-
-                        break;
-
-                    case 7:
-
-                        if (this.curChar != 34) {
-                            break;
-                        }
-
-                        if (kind > 5) {
-                            kind = 5;
-                        }
-
-                        jjCheckNAddStates(10, 12);
-
-                        break;
-
-                    case 8:
-
-                        if ((0x208000000000L & l) != 0L) {
-                            this.jjstateSet[this.jjnewStateCnt++] = 9;
-                        }
-
-                        break;
-
-                    case 10:
-
-                        if ((0x100002600L & l) == 0L) {
-                            break;
-                        }
-
-                        kind = 9;
-                        jjCheckNAdd(10);
-
-                        break;
-
-                    case 13:
-
-                        if ((this.curChar == 59) && (kind > 8)) {
-                            kind = 8;
-                        }
-
-                        break;
-
-                    case 14:
-
-                        if (this.curChar == 35) {
-                            jjCheckNAdd(15);
-                        }
-
-                        break;
-
-                    case 15:
-
-                        if ((0x3ff000000000000L & l) == 0L) {
-                            break;
-                        }
-
-                        if (kind > 8) {
-                            kind = 8;
-                        }
-
-                        jjCheckNAddTwoStates(15, 13);
-
-                        break;
-
-                    case 16:
-
-                        if (this.curChar == 60) {
-                            jjCheckNAddStates(0, 2);
-                        }
-
-                        break;
-
-                    case 19:
-
-                        if ((0x9fffff7affffd9ffL & l) == 0L) {
-                            break;
-                        }
-
-                        if (kind > 1) {
-                            kind = 1;
-                        }
-
-                        jjCheckNAdd(20);
-
-                        break;
-
-                    case 20:
-
-                        if ((0x9ffffffeffffd9ffL & l) == 0L) {
-                            break;
-                        }
-
-                        if (kind > 1) {
-                            kind = 1;
-                        }
-
-                        jjCheckNAdd(20);
-
-                        break;
-
-                    case 21:
-
-                        if (this.curChar == 33) {
-                            this.jjstateSet[this.jjnewStateCnt++] = 22;
-                        }
-
-                        break;
-
-                    case 23:
-
-                        if ((0x9fffff7affffd9ffL & l) == 0L) {
-                            break;
-                        }
-
-                        if (kind > 2) {
-                            kind = 2;
-                        }
-
-                        jjCheckNAdd(24);
-
-                        break;
-
-                    case 24:
-
-                        if ((0x9ffffffeffffd9ffL & l) == 0L) {
-                            break;
-                        }
-
-                        if (kind > 2) {
-                            kind = 2;
-                        }
-
-                        jjCheckNAdd(24);
-
-                        break;
-
-                    default:
-                        break;
-                    }
-                } while (i != startsAt);
-            } else if (this.curChar < 128) {
-                long l = 1L << (this.curChar & 077);
-MatchLoop: 
-                do {
-                    switch (this.jjstateSet[--i]) {
-                    case 11:
-                    case 4:
-
-                        if ((0x7fffffe07fffffeL & l) == 0L) {
-                            break;
-                        }
-
-                        if (kind > 5) {
-                            kind = 5;
-                        }
-
-                        jjCheckNAddStates(5, 9);
-
-                        break;
-
-                    case 17:
-                    case 18:
-
-                        if ((0x7fffffe07fffffeL & l) == 0L) {
-                            break;
-                        }
-
-                        if (kind > 1) {
-                            kind = 1;
-                        }
-
-                        this.jjstateSet[this.jjnewStateCnt++] = 19;
-
-                        break;
-
-                    case 9:
-
-                        if ((0x7fffffe07fffffeL & l) == 0L) {
-                            break;
-                        }
-
-                        if (kind > 5) {
-                            kind = 5;
-                        }
-
-                        jjCheckNAddStates(10, 12);
-
-                        break;
-
-                    case 12:
-
-                        if ((0x7fffffe07fffffeL & l) == 0L) {
-                            break;
-                        }
-
-                        if (kind > 8) {
-                            kind = 8;
-                        }
-
-                        jjAddStates(17, 18);
-
-                        break;
-
-                    case 19:
-                    case 20:
-
-                        if (kind > 1) {
-                            kind = 1;
-                        }
-
-                        jjCheckNAdd(20);
-
-                        break;
-
-                    case 22:
-
-                        if ((0x7fffffe07fffffeL & l) == 0L) {
-                            break;
-                        }
-
-                        if (kind > 2) {
-                            kind = 2;
-                        }
-
-                        this.jjstateSet[this.jjnewStateCnt++] = 23;
-
-                        break;
-
-                    case 23:
-                    case 24:
-
-                        if (kind > 2) {
-                            kind = 2;
-                        }
-
-                        jjCheckNAdd(24);
-
-                        break;
-
-                    default:
-                        break;
-                    }
-                } while (i != startsAt);
-            } else {
-                int i2 = (this.curChar & 0xff) >> 6;
-                long l2 = 1L << (this.curChar & 077);
-MatchLoop: 
-                do {
-                    switch (this.jjstateSet[--i]) {
-                    case 19:
-                    case 20:
-
-                        if ((jjbitVec0[i2] & l2) == 0L) {
-                            break;
-                        }
-
-                        if (kind > 1) {
-                            kind = 1;
-                        }
-
-                        jjCheckNAdd(20);
-
-                        break;
-
-                    case 23:
-                    case 24:
-
-                        if ((jjbitVec0[i2] & l2) == 0L) {
-                            break;
-                        }
-
-                        if (kind > 2) {
-                            kind = 2;
-                        }
-
-                        jjCheckNAdd(24);
-
-                        break;
-
-                    default:
-                        break;
-                    }
-                } while (i != startsAt);
-            }
-
-            if (kind != 0x7fffffff) {
-                this.jjmatchedKind = kind;
-                this.jjmatchedPos = curPos;
-                kind = 0x7fffffff;
-            }
-
-            ++curPos;
-
-            if ((i = this.jjnewStateCnt) == (startsAt = 25 - (this.jjnewStateCnt = startsAt))) {
-                return curPos;
-            }
-
-            try {
-                this.curChar = this.input_stream.readChar();
-            } catch (java.io.IOException e) {
-                return curPos;
-            }
-        }
-    }
-
-    private final int jjMoveStringLiteralDfa0_4() {
-        return jjMoveNfa_4(1, 0);
-    }
-
-    private final int jjMoveNfa_4(int startState, int curPos) {
-        int startsAt = 0;
-        this.jjnewStateCnt = 2;
-
-        int i = 1;
-        this.jjstateSet[0] = startState;
-
-        int kind = 0x7fffffff;
-
-        for (;;) {
-            if (++this.jjround == 0x7fffffff) {
-                reInitRounds();
-            }
-
-            if (this.curChar < 64) {
-                long l = 1L << this.curChar;
-MatchLoop: 
-                do {
-                    switch (this.jjstateSet[--i]) {
-                    case 1:
-
-                        if ((0xfffffffbffffffffL & l) != 0L) {
-                            if (kind > 21) {
-                                kind = 21;
-                            }
-
-                            jjCheckNAdd(0);
-                        } else if (this.curChar == 34) {
-                            if (kind > 22) {
-                                kind = 22;
-                            }
-                        }
-
-                        break;
-
-                    case 0:
-
-                        if ((0xfffffffbffffffffL & l) == 0L) {
-                            break;
-                        }
-
-                        kind = 21;
-                        jjCheckNAdd(0);
-
-                        break;
-
-                    default:
-                        break;
-                    }
-                } while (i != startsAt);
-            } else if (this.curChar < 128) {
-                long l = 1L << (this.curChar & 077);
-MatchLoop: 
-                do {
-                    switch (this.jjstateSet[--i]) {
-                    case 1:
-                    case 0:
-                        kind = 21;
-                        jjCheckNAdd(0);
-
-                        break;
-
-                    default:
-                        break;
-                    }
-                } while (i != startsAt);
-            } else {
-                int i2 = (this.curChar & 0xff) >> 6;
-                long l2 = 1L << (this.curChar & 077);
-MatchLoop: 
-                do {
-                    switch (this.jjstateSet[--i]) {
-                    case 1:
-                    case 0:
-
-                        if ((jjbitVec0[i2] & l2) == 0L) {
-                            break;
-                        }
-
-                        if (kind > 21) {
-                            kind = 21;
-                        }
-
-                        jjCheckNAdd(0);
-
-                        break;
-
-                    default:
-                        break;
-                    }
-                } while (i != startsAt);
-            }
-
-            if (kind != 0x7fffffff) {
-                this.jjmatchedKind = kind;
-                this.jjmatchedPos = curPos;
-                kind = 0x7fffffff;
-            }
-
-            ++curPos;
-
-            if ((i = this.jjnewStateCnt) == (startsAt = 2 - (this.jjnewStateCnt = startsAt))) {
-                return curPos;
-            }
-
-            try {
-                this.curChar = this.input_stream.readChar();
-            } catch (java.io.IOException e) {
-                return curPos;
-            }
-        }
-    }
-
-    private final int jjMoveStringLiteralDfa0_6() {
-        switch (this.curChar) {
-        case 62:
-            return jjStopAtPos(0, 26);
-
-        default:
-            return jjMoveNfa_6(0, 0);
-        }
-    }
-
-    private final int jjMoveNfa_6(int startState, int curPos) {
-        int startsAt = 0;
-        this.jjnewStateCnt = 1;
-
-        int i = 1;
-        this.jjstateSet[0] = startState;
-
-        int kind = 0x7fffffff;
-
-        for (;;) {
-            if (++this.jjround == 0x7fffffff) {
-                reInitRounds();
-            }
-
-            if (this.curChar < 64) {
-                long l = 1L << this.curChar;
-MatchLoop: 
-                do {
-                    switch (this.jjstateSet[--i]) {
-                    case 0:
-
-                        if ((0xbfffffffffffffffL & l) == 0L) {
-                            break;
-                        }
-
-                        kind = 25;
-                        this.jjstateSet[this.jjnewStateCnt++] = 0;
-
-                        break;
-
-                    default:
-                        break;
-                    }
-                } while (i != startsAt);
-            } else if (this.curChar < 128) {
-                long l = 1L << (this.curChar & 077);
-MatchLoop: 
-                do {
-                    switch (this.jjstateSet[--i]) {
-                    case 0:
-                        kind = 25;
-                        this.jjstateSet[this.jjnewStateCnt++] = 0;
-
-                        break;
-
-                    default:
-                        break;
-                    }
-                } while (i != startsAt);
-            } else {
-                int i2 = (this.curChar & 0xff) >> 6;
-                long l2 = 1L << (this.curChar & 077);
-MatchLoop: 
-                do {
-                    switch (this.jjstateSet[--i]) {
-                    case 0:
-
-                        if ((jjbitVec0[i2] & l2) == 0L) {
-                            break;
-                        }
-
-                        if (kind > 25) {
-                            kind = 25;
-                        }
-
-                        this.jjstateSet[this.jjnewStateCnt++] = 0;
-
-                        break;
-
-                    default:
-                        break;
-                    }
-                } while (i != startsAt);
-            }
-
-            if (kind != 0x7fffffff) {
-                this.jjmatchedKind = kind;
-                this.jjmatchedPos = curPos;
-                kind = 0x7fffffff;
-            }
-
-            ++curPos;
-
-            if ((i = this.jjnewStateCnt) == (startsAt = 1 - (this.jjnewStateCnt = startsAt))) {
-                return curPos;
-            }
-
-            try {
-                this.curChar = this.input_stream.readChar();
-            } catch (java.io.IOException e) {
-                return curPos;
-            }
-        }
-    }
-
-    private final int jjMoveStringLiteralDfa0_3() {
-        return jjMoveNfa_3(1, 0);
-    }
-
-    private final int jjMoveNfa_3(int startState, int curPos) {
-        int startsAt = 0;
-        this.jjnewStateCnt = 2;
-
-        int i = 1;
-        this.jjstateSet[0] = startState;
-
-        int kind = 0x7fffffff;
-
-        for (;;) {
-            if (++this.jjround == 0x7fffffff) {
-                reInitRounds();
-            }
-
-            if (this.curChar < 64) {
-                long l = 1L << this.curChar;
-MatchLoop: 
-                do {
-                    switch (this.jjstateSet[--i]) {
-                    case 1:
-
-                        if ((0xffffff7fffffffffL & l) != 0L) {
-                            if (kind > 19) {
-                                kind = 19;
-                            }
-
-                            jjCheckNAdd(0);
-                        } else if (this.curChar == 39) {
-                            if (kind > 20) {
-                                kind = 20;
-                            }
-                        }
-
-                        break;
-
-                    case 0:
-
-                        if ((0xffffff7fffffffffL & l) == 0L) {
-                            break;
-                        }
-
-                        kind = 19;
-                        jjCheckNAdd(0);
-
-                        break;
-
-                    default:
-                        break;
-                    }
-                } while (i != startsAt);
-            } else if (this.curChar < 128) {
-                long l = 1L << (this.curChar & 077);
-MatchLoop: 
-                do {
-                    switch (this.jjstateSet[--i]) {
-                    case 1:
-                    case 0:
-                        kind = 19;
-                        jjCheckNAdd(0);
-
-                        break;
-
-                    default:
-                        break;
-                    }
-                } while (i != startsAt);
-            } else {
-                int i2 = (this.curChar & 0xff) >> 6;
-                long l2 = 1L << (this.curChar & 077);
-MatchLoop: 
-                do {
-                    switch (this.jjstateSet[--i]) {
-                    case 1:
-                    case 0:
-
-                        if ((jjbitVec0[i2] & l2) == 0L) {
-                            break;
-                        }
-
-                        if (kind > 19) {
-                            kind = 19;
-                        }
-
-                        jjCheckNAdd(0);
-
-                        break;
-
-                    default:
-                        break;
-                    }
-                } while (i != startsAt);
-            }
-
-            if (kind != 0x7fffffff) {
-                this.jjmatchedKind = kind;
-                this.jjmatchedPos = curPos;
-                kind = 0x7fffffff;
-            }
-
-            ++curPos;
-
-            if ((i = this.jjnewStateCnt) == (startsAt = 2 - (this.jjnewStateCnt = startsAt))) {
-                return curPos;
-            }
-
-            try {
-                this.curChar = this.input_stream.readChar();
-            } catch (java.io.IOException e) {
-                return curPos;
-            }
-        }
-    }
-
-    private final int jjMoveStringLiteralDfa0_2() {
-        switch (this.curChar) {
-        case 34:
-            return jjStopAtPos(0, 17);
-
-        case 39:
-            return jjStopAtPos(0, 16);
-
-        default:
-            return jjMoveNfa_2(0, 0);
-        }
-    }
-
-    private final int jjMoveNfa_2(int startState, int curPos) {
-        int startsAt = 0;
-        this.jjnewStateCnt = 3;
-
-        int i = 1;
-        this.jjstateSet[0] = startState;
-
-        int kind = 0x7fffffff;
-
-        for (;;) {
-            if (++this.jjround == 0x7fffffff) {
-                reInitRounds();
-            }
-
-            if (this.curChar < 64) {
-                long l = 1L << this.curChar;
-MatchLoop: 
-                do {
-                    switch (this.jjstateSet[--i]) {
-                    case 0:
-
-                        if ((0x9fffff7affffd9ffL & l) != 0L) {
-                            if (kind > 15) {
-                                kind = 15;
-                            }
-
-                            jjCheckNAdd(1);
-                        } else if ((0x100002600L & l) != 0L) {
-                            if (kind > 18) {
-                                kind = 18;
-                            }
-
-                            jjCheckNAdd(2);
-                        }
-
-                        break;
-
-                    case 1:
-
-                        if ((0xbffffffeffffd9ffL & l) == 0L) {
-                            break;
-                        }
-
-                        if (kind > 15) {
-                            kind = 15;
-                        }
-
-                        jjCheckNAdd(1);
-
-                        break;
-
-                    case 2:
-
-                        if ((0x100002600L & l) == 0L) {
-                            break;
-                        }
-
-                        kind = 18;
-                        jjCheckNAdd(2);
-
-                        break;
-
-                    default:
-                        break;
-                    }
-                } while (i != startsAt);
-            } else if (this.curChar < 128) {
-                long l = 1L << (this.curChar & 077);
-MatchLoop: 
-                do {
-                    switch (this.jjstateSet[--i]) {
-                    case 0:
-                    case 1:
-
-                        if (kind > 15) {
-                            kind = 15;
-                        }
-
-                        jjCheckNAdd(1);
-
-                        break;
-
-                    default:
-                        break;
-                    }
-                } while (i != startsAt);
-            } else {
-                int i2 = (this.curChar & 0xff) >> 6;
-                long l2 = 1L << (this.curChar & 077);
-MatchLoop: 
-                do {
-                    switch (this.jjstateSet[--i]) {
-                    case 0:
-                    case 1:
-
-                        if ((jjbitVec0[i2] & l2) == 0L) {
-                            break;
-                        }
-
-                        if (kind > 15) {
-                            kind = 15;
-                        }
-
-                        jjCheckNAdd(1);
-
-                        break;
-
-                    default:
-                        break;
-                    }
-                } while (i != startsAt);
-            }
-
-            if (kind != 0x7fffffff) {
-                this.jjmatchedKind = kind;
-                this.jjmatchedPos = curPos;
-                kind = 0x7fffffff;
-            }
-
-            ++curPos;
-
-            if ((i = this.jjnewStateCnt) == (startsAt = 3 - (this.jjnewStateCnt = startsAt))) {
-                return curPos;
-            }
-
-            try {
-                this.curChar = this.input_stream.readChar();
-            } catch (java.io.IOException e) {
-                return curPos;
-            }
-        }
-    }
-
-    private final int jjStopStringLiteralDfa_5(int pos, long active0) {
-        switch (pos) {
-        case 0:
-
-            if ((active0 & 0x1000000L) != 0L) {
-                this.jjmatchedKind = 23;
-
-                return -1;
-            }
-
-            return -1;
-
-        case 1:
-
-            if ((active0 & 0x1000000L) != 0L) {
-                if (this.jjmatchedPos == 0) {
-                    this.jjmatchedKind = 23;
-                    this.jjmatchedPos = 0;
-                }
-
-                return -1;
-            }
-
-            return -1;
-
-        default:
-            return -1;
-        }
-    }
-
-    private final int jjStartNfa_5(int pos, long active0) {
-        return jjMoveNfa_5(jjStopStringLiteralDfa_5(pos, active0), pos + 1);
-    }
-
-    private final int jjMoveStringLiteralDfa0_5() {
-        switch (this.curChar) {
-        case 45:
-            return jjMoveStringLiteralDfa1_5(0x1000000L);
-
-        default:
-            return jjMoveNfa_5(1, 0);
-        }
-    }
-
-    private final int jjMoveStringLiteralDfa1_5(long active0) {
-        try {
-            this.curChar = this.input_stream.readChar();
-        } catch (java.io.IOException e) {
-            jjStopStringLiteralDfa_5(0, active0);
-
-            return 1;
-        }
-
-        switch (this.curChar) {
-        case 45:
-            return jjMoveStringLiteralDfa2_5(active0, 0x1000000L);
-
-        default:
-            break;
-        }
-
-        return jjStartNfa_5(0, active0);
-    }
-
-    private final int jjMoveStringLiteralDfa2_5(long old0, long active0) {
-        if ((active0 &= old0) == 0L) {
-            return jjStartNfa_5(0, old0);
-        }
-
-        try {
-            this.curChar = this.input_stream.readChar();
-        } catch (java.io.IOException e) {
-            jjStopStringLiteralDfa_5(1, active0);
-
-            return 2;
-        }
-
-        switch (this.curChar) {
-        case 62:
-
-            if ((active0 & 0x1000000L) != 0L) {
-                return jjStopAtPos(2, 24);
-            }
-
-            break;
-
-        default:
-            break;
-        }
-
-        return jjStartNfa_5(1, active0);
-    }
-
-    private final int jjMoveNfa_5(int startState, int curPos) {
-        int startsAt = 0;
-        this.jjnewStateCnt = 2;
-
-        int i = 1;
-        this.jjstateSet[0] = startState;
-
-        int kind = 0x7fffffff;
-
-        for (;;) {
-            if (++this.jjround == 0x7fffffff) {
-                reInitRounds();
-            }
-
-            if (this.curChar < 64) {
-                long l = 1L << this.curChar;
-MatchLoop: 
-                do {
-                    switch (this.jjstateSet[--i]) {
-                    case 1:
-
-                        if ((0xffffdfffffffffffL & l) != 0L) {
-                            if (kind > 23) {
-                                kind = 23;
-                            }
-
-                            jjCheckNAdd(0);
-                        } else if (this.curChar == 45) {
-                            if (kind > 23) {
-                                kind = 23;
-                            }
-                        }
-
-                        break;
-
-                    case 0:
-
-                        if ((0xffffdfffffffffffL & l) == 0L) {
-                            break;
-                        }
-
-                        kind = 23;
-                        jjCheckNAdd(0);
-
-                        break;
-
-                    default:
-                        break;
-                    }
-                } while (i != startsAt);
-            } else if (this.curChar < 128) {
-                long l = 1L << (this.curChar & 077);
-MatchLoop: 
-                do {
-                    switch (this.jjstateSet[--i]) {
-                    case 1:
-                    case 0:
-                        kind = 23;
-                        jjCheckNAdd(0);
-
-                        break;
-
-                    default:
-                        break;
-                    }
-                } while (i != startsAt);
-            } else {
-                int i2 = (this.curChar & 0xff) >> 6;
-                long l2 = 1L << (this.curChar & 077);
-MatchLoop: 
-                do {
-                    switch (this.jjstateSet[--i]) {
-                    case 1:
-                    case 0:
-
-                        if ((jjbitVec0[i2] & l2) == 0L) {
-                            break;
-                        }
-
-                        if (kind > 23) {
-                            kind = 23;
-                        }
-
-                        jjCheckNAdd(0);
-
-                        break;
-
-                    default:
-                        break;
-                    }
-                } while (i != startsAt);
-            }
-
-            if (kind != 0x7fffffff) {
-                this.jjmatchedKind = kind;
-                this.jjmatchedPos = curPos;
-                kind = 0x7fffffff;
-            }
-
-            ++curPos;
-
-            if ((i = this.jjnewStateCnt) == (startsAt = 2 - (this.jjnewStateCnt = startsAt))) {
-                return curPos;
-            }
-
-            try {
-                this.curChar = this.input_stream.readChar();
-            } catch (java.io.IOException e) {
-                return curPos;
-            }
-        }
-    }
-
-    private final int jjStartNfaWithStates_1(int pos, int kind, int state) {
-        this.jjmatchedKind = kind;
-        this.jjmatchedPos = pos;
-
-        try {
-            this.curChar = this.input_stream.readChar();
-        } catch (java.io.IOException e) {
-            return pos + 1;
-        }
-
-        return jjMoveNfa_1(state, pos + 1);
-    }
-
-    private final int jjMoveStringLiteralDfa0_1() {
-        switch (this.curChar) {
-        case 34:
-            return jjStopAtPos(0, 17);
-
-        case 39:
-            return jjStopAtPos(0, 16);
-
-        case 61:
-            return jjStartNfaWithStates_1(0, 13, 3);
-
-        default:
-            return jjMoveNfa_1(0, 0);
-        }
-    }
-
-    private final int jjMoveNfa_1(int startState, int curPos) {
-        int startsAt = 0;
-        this.jjnewStateCnt = 6;
-
-        int i = 1;
-        this.jjstateSet[0] = startState;
-
-        int kind = 0x7fffffff;
-
-        for (;;) {
-            if (++this.jjround == 0x7fffffff) {
-                reInitRounds();
-            }
-
-            if (this.curChar < 64) {
-                long l = 1L << this.curChar;
-MatchLoop: 
-                do {
-                    switch (this.jjstateSet[--i]) {
-                    case 0:
-
-                        if ((0x9fffff7affffd9ffL & l) != 0L) {
-                            if (kind > 12) {
-                                kind = 12;
-                            }
-
-                            jjCheckNAdd(1);
-                        } else if ((0x100002600L & l) != 0L) {
-                            if (kind > 18) {
-                                kind = 18;
-                            }
-
-                            jjCheckNAdd(5);
-                        } else if (this.curChar == 61) {
-                            this.jjstateSet[this.jjnewStateCnt++] = 3;
-                        } else if (this.curChar == 62) {
-                            if (kind > 14) {
-                                kind = 14;
-                            }
-                        }
-
-                        break;
-
-                    case 1:
-
-                        if ((0x9ffffffeffffd9ffL & l) == 0L) {
-                            break;
-                        }
-
-                        if (kind > 12) {
-                            kind = 12;
-                        }
-
-                        jjCheckNAdd(1);
-
-                        break;
-
-                    case 2:
-                    case 3:
-
-                        if ((this.curChar == 62) && (kind > 14)) {
-                            kind = 14;
-                        }
-
-                        break;
-
-                    case 4:
-
-                        if (this.curChar == 61) {
-                            this.jjstateSet[this.jjnewStateCnt++] = 3;
-                        }
-
-                        break;
-
-                    case 5:
-
-                        if ((0x100002600L & l) == 0L) {
-                            break;
-                        }
-
-                        kind = 18;
-                        jjCheckNAdd(5);
-
-                        break;
-
-                    default:
-                        break;
-                    }
-                } while (i != startsAt);
-            } else if (this.curChar < 128) {
-                long l = 1L << (this.curChar & 077);
-MatchLoop: 
-                do {
-                    switch (this.jjstateSet[--i]) {
-                    case 0:
-                    case 1:
-
-                        if (kind > 12) {
-                            kind = 12;
-                        }
-
-                        jjCheckNAdd(1);
-
-                        break;
-
-                    default:
-                        break;
-                    }
-                } while (i != startsAt);
-            } else {
-                int i2 = (this.curChar & 0xff) >> 6;
-                long l2 = 1L << (this.curChar & 077);
-MatchLoop: 
-                do {
-                    switch (this.jjstateSet[--i]) {
-                    case 0:
-                    case 1:
-
-                        if ((jjbitVec0[i2] & l2) == 0L) {
-                            break;
-                        }
-
-                        if (kind > 12) {
-                            kind = 12;
-                        }
-
-                        jjCheckNAdd(1);
-
-                        break;
-
-                    default:
-                        break;
-                    }
-                } while (i != startsAt);
-            }
-
-            if (kind != 0x7fffffff) {
-                this.jjmatchedKind = kind;
-                this.jjmatchedPos = curPos;
-                kind = 0x7fffffff;
-            }
-
-            ++curPos;
-
-            if ((i = this.jjnewStateCnt) == (startsAt = 6 - (this.jjnewStateCnt = startsAt))) {
-                return curPos;
-            }
-
-            try {
-                this.curChar = this.input_stream.readChar();
-            } catch (java.io.IOException e) {
-                return curPos;
-            }
-        }
-    }
-
-    /**
-     * Reinitialize the parser, passing the stream
-     * @param stream The stream to parse
-     */
-    public void reInit(SimpleCharStream stream) {
-        this.jjmatchedPos = this.jjnewStateCnt = 0;
-        this.curLexState = this.defaultLexState;
-        this.input_stream = stream;
-        reInitRounds();
-    }
-
-    private final void reInitRounds() {
-        int i;
-        this.jjround = 0x80000001;
-
-        for (i = 25; i-- > 0;)
-            this.jjrounds[i] = 0x80000000;
-    }
-
-    /**
-     * Reinitialize the parser with a certain parser state
-     * @param stream The stream to parse
-     * @param lexState The parser state
-     */
-    public void reInit(SimpleCharStream stream, int lexState) {
-        reInit(stream);
-        switchTo(lexState);
-    }
-
-    /**
-     * Switch to a new parser state
-     * @param lexState The state
-     */
-    public void switchTo(int lexState) {
-        if ((lexState >= 7) || (lexState < 0)) {
-            throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState +
-                ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
-        }
-        this.curLexState = lexState;
-    }
-
-    private final Token jjFillToken() {
-        Token t = Token.newToken(this.jjmatchedKind);
-        t.kind = this.jjmatchedKind;
-
-        String im = jjstrLiteralImages[this.jjmatchedKind];
-        t.image = (im == null) ? this.input_stream.getImage() : im;
-        t.beginLine = this.input_stream.getBeginLine();
-        t.beginColumn = this.input_stream.getBeginColumn();
-        t.endLine = this.input_stream.getEndLine();
-        t.endColumn = this.input_stream.getEndColumn();
-
-        return t;
-    }
-
-    /**
-     * Get the next token
-     * @return The token
-     */
-    public final Token getNextToken() {
-        Token matchedToken;
-        int curPos = 0;
-
-EOFLoop: 
-        for (;;) {
-            try {
-                this.curChar = this.input_stream.beginToken();
-            } catch (java.io.IOException e) {
-                this.jjmatchedKind = 0;
-                matchedToken = jjFillToken();
-
-                return matchedToken;
-            }
-
-            switch (this.curLexState) {
-            case 0:
-                this.jjmatchedKind = 0x7fffffff;
-                this.jjmatchedPos = 0;
-                curPos = jjMoveStringLiteralDfa0_0();
-
-                if ((this.jjmatchedPos == 0) && (this.jjmatchedKind > 11)) {
-                    this.jjmatchedKind = 11;
-                }
-
-                break;
-
-            case 1:
-                this.jjmatchedKind = 0x7fffffff;
-                this.jjmatchedPos = 0;
-                curPos = jjMoveStringLiteralDfa0_1();
-
-                break;
-
-            case 2:
-                this.jjmatchedKind = 0x7fffffff;
-                this.jjmatchedPos = 0;
-                curPos = jjMoveStringLiteralDfa0_2();
-
-                break;
-
-            case 3:
-                this.jjmatchedKind = 0x7fffffff;
-                this.jjmatchedPos = 0;
-                curPos = jjMoveStringLiteralDfa0_3();
-
-                break;
-
-            case 4:
-                this.jjmatchedKind = 0x7fffffff;
-                this.jjmatchedPos = 0;
-                curPos = jjMoveStringLiteralDfa0_4();
-
-                break;
-
-            case 5:
-                this.jjmatchedKind = 0x7fffffff;
-                this.jjmatchedPos = 0;
-                curPos = jjMoveStringLiteralDfa0_5();
-
-                break;
-
-            case 6:
-                this.jjmatchedKind = 0x7fffffff;
-                this.jjmatchedPos = 0;
-                curPos = jjMoveStringLiteralDfa0_6();
-
-                break;
-            }
-
-            if (this.jjmatchedKind != 0x7fffffff) {
-                if ((this.jjmatchedPos + 1) < curPos) {
-                    this.input_stream.backup(curPos - this.jjmatchedPos - 1);
-                }
-
-                if ((jjtoToken[this.jjmatchedKind >> 6] & (1L << (this.jjmatchedKind & 077))) != 0L) {
-                    matchedToken = jjFillToken();
-
-                    if (jjnewLexState[this.jjmatchedKind] != -1) {
-                        this.curLexState = jjnewLexState[this.jjmatchedKind];
-                    }
-
-                    return matchedToken;
-                }
-                if (jjnewLexState[this.jjmatchedKind] != -1) {
-                    this.curLexState = jjnewLexState[this.jjmatchedKind];
-                }
-
-                continue EOFLoop;
-            }
-
-            int error_line = this.input_stream.getEndLine();
-            int error_column = this.input_stream.getEndColumn();
-            String error_after = null;
-            boolean EOFSeen = false;
-
-            try {
-                this.input_stream.readChar();
-                this.input_stream.backup(1);
-            } catch (java.io.IOException e1) {
-                EOFSeen = true;
-                error_after = (curPos <= 1) ? "" : this.input_stream.getImage();
-
-                if ((this.curChar == '\n') || (this.curChar == '\r')) {
-                    error_line++;
-                    error_column = 0;
-                } else {
-                    error_column++;
-                }
-            }
-
-            if (!EOFSeen) {
-                this.input_stream.backup(1);
-                error_after = (curPos <= 1) ? "" : this.input_stream.getImage();
-            }
-
-            throw new TokenMgrError(EOFSeen, this.curLexState, error_line, error_column, error_after,
-                this.curChar, TokenMgrError.LEXICAL_ERROR);
-        }
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/html/HtmlContentHandler.java b/src/java/org/apache/lenya/lucene/html/HtmlContentHandler.java
deleted file mode 100644
index ec79991..0000000
--- a/src/java/org/apache/lenya/lucene/html/HtmlContentHandler.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene.html;
-
-import org.xml.sax.ContentHandler;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-
-/**
- * HTML content handler
- */
-public class HtmlContentHandler extends DefaultHandler {
-
-    /**
-     * Command line interface
-     * @param args Command line args
-     */
-    public static void main(String[] args) {
-        ContentHandler ch = new HtmlContentHandler();
-        org.apache.excalibur.xml.sax.JTidyHTMLParser parser = new org.apache.excalibur.xml.sax.JTidyHTMLParser();
-
-        try {
-            parser.parse(new org.xml.sax.InputSource(new java.io.FileInputStream("/usr/local/apache/htdocs/index.html")), ch);
-        } catch (Exception e) {
-            System.err.println(e);
-        }
-    }
-
-    /**
-     * End the document
-     * @throws SAXException
-     */
-    public void endDocument() throws SAXException {
-        // do nothing
-    }
-
-    /**
-     * Start the prefix mapping
-     * @param prefix The prefix
-     * @param uri The URI
-     * @throws SAXException if a parser error occurs
-     */
-    public void startPrefixMapping(String prefix, String uri)
-        throws SAXException {
-        // do nothing
-    }
-
-    /**
-     * Set the document locator
-     * @param locator The locator
-     */
-    public void setDocumentLocator(Locator locator) {
-        // do nothing
-    }
-
-    /**
-     * Start document
-     * @throws SAXException if a parser error occurs
-     */
-    public void startDocument() throws SAXException {
-        // do nothing
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/html/HtmlDocument.java b/src/java/org/apache/lenya/lucene/html/HtmlDocument.java
deleted file mode 100644
index 40ce8d3..0000000
--- a/src/java/org/apache/lenya/lucene/html/HtmlDocument.java
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene.html;
-
-
-// Imports commented out since there is a name clash and fully
-// qualified class names will be used in the code.  Imports are
-// left for ease of maintenance.
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.StringWriter;
-
-import org.apache.log4j.Logger;
-import org.apache.lucene.document.Field;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Text;
-import org.w3c.tidy.Tidy;
-
-
-/**
- * The <code>HtmlDocument</code> class creates a Lucene {@link org.apache.lucene.document.Document}
- * from an HTML document.
- *
- * <P>
- * It does this by using JTidy package. It can take input input from {@link java.io.File} or {@link
- * java.io.InputStream}.
- * </p>
- */
-public class HtmlDocument {
-    private static final Logger log = Logger.getLogger(HtmlDocument.class);
-    private Element rawDoc;
-    private String luceneTagName = null;
-    private String luceneClassValue = null;
-
-    /**
-     * Constructs an <code>HtmlDocument</code> from a {@link java.io.File}.
-     *
-     * @param file the <code>File</code> containing the HTML to parse
-     * @exception IOException if an I/O exception occurs
-     */
-    public HtmlDocument(File file) throws IOException {
-        Tidy tidy = new Tidy();
-        tidy.setQuiet(true);
-        tidy.setShowWarnings(false);
-
-        org.w3c.dom.Document root = tidy.parseDOM(new FileInputStream(file), null);
-        this.rawDoc = root.getDocumentElement();
-    }
-
-    /**
-     * Constructs an <code>HtmlDocument</code> from an {@link java.io.InputStream}.
-     * @param is the <code>InputStream</code> containing the HTML
-     */
-    public HtmlDocument(InputStream is) {
-        Tidy tidy = new Tidy();
-        tidy.setQuiet(true);
-        tidy.setShowWarnings(false);
-
-        org.w3c.dom.Document root = tidy.parseDOM(is, null);
-        this.rawDoc = root.getDocumentElement();
-    }
-
-    /**
-     * Creates a Lucene <code>Document</code> from an {@link java.io.InputStream}.
-     * @param is the <code>InputStream</code> containing the HTML
-     * @return org.apache.lucene.document.Document
-     */
-    public static org.apache.lucene.document.Document getDocument(InputStream is) {
-        HtmlDocument htmlDoc = new HtmlDocument(is);
-        org.apache.lucene.document.Document luceneDoc = new org.apache.lucene.document.Document();
-
-        luceneDoc.add(Field.Text("title", htmlDoc.getTitle()));
-        luceneDoc.add(Field.Text("contents", htmlDoc.getBody()));
-
-        return luceneDoc;
-    }
-
-    /**
-     * Creates a Lucene <code>Document</code> from a {@link java.io.File}.
-     * @param file The tile
-     * @return org.apache.lucene.document.Document
-     * @exception IOException when an IO error occurs
-     */
-    public static org.apache.lucene.document.Document document(File file)
-        throws IOException {
-        BufferedReader br = null;
-        StringWriter sw = null;
-        org.apache.lucene.document.Document luceneDoc = null;
-
-        String contents;
-
-        try {
-            HtmlDocument htmlDoc = new HtmlDocument(file);
-            luceneDoc = new org.apache.lucene.document.Document();
-
-            luceneDoc.add(Field.Text("title", htmlDoc.getTitle()));
-            luceneDoc.add(Field.Text("contents", htmlDoc.getBody()));
-
-            contents = null;
-            br = new BufferedReader(new FileReader(file));
-            sw = new StringWriter();
-            String line = br.readLine();
-
-            while (line != null) {
-                sw.write(line);
-                line = br.readLine();
-            }
-	        contents = sw.toString();
-            luceneDoc.add(Field.UnIndexed("rawcontents", contents));
-
-        } catch (final FileNotFoundException e) {
-            log.error("File not found " +e.toString());
-        } catch (final IOException e) {
-            log.error("IO error " +e.toString());
-        } finally {
-	        if (br != null)
-	            br.close();
-	        if (sw != null)
-	            sw.close();
-        }
-
-        return luceneDoc;
-    }
-
-    /**
-     * Gets the title attribute of the <code>HtmlDocument</code> object.
-     * @return the title value
-     */
-    public String getTitle() {
-        if (this.rawDoc == null) {
-            return null;
-        }
-
-        String title = "";
-
-        NodeList nl = this.rawDoc.getElementsByTagName("title");
-
-        if (nl.getLength() > 0) {
-            Element titleElement = ((Element) nl.item(0));
-            Text text = (Text) titleElement.getFirstChild();
-
-            if (text != null) {
-                title = text.getData();
-            }
-        }
-
-        return title;
-    }
-
-    /**
-     * Gets the body text attribute of the <code>HtmlDocument</code> object.
-     * @return the body text value
-     */
-    public String getBody() {
-        if (this.rawDoc == null) {
-            return null;
-        }
-
-        // NOTE: JTidy will insert a meta tag: <meta name="generator" content="HTML Tidy, see www.w3.org" />
-        //       This means that getLength is always greater than 0
-        NodeList metaNL = this.rawDoc.getElementsByTagName("meta");
-
-        for (int i = 0; i < metaNL.getLength(); i++) {
-            Element metaElement = (Element) metaNL.item(i);
-            Attr nameAttr = metaElement.getAttributeNode("name");
-            Attr valueAttr = metaElement.getAttributeNode("value");
-
-            if ((nameAttr != null) && (valueAttr != null)) {
-                if (nameAttr.getValue().equals("lucene-tag-name")) {
-                    this.luceneTagName = valueAttr.getValue();
-                }
-
-                if (nameAttr.getValue().equals("lucene-class-value")) {
-                    this.luceneClassValue = valueAttr.getValue();
-                }
-            }
-        }
-
-        boolean indexByLucene = true;
-
-        if ((this.luceneTagName != null) && (this.luceneClassValue != null)) {
-            indexByLucene = false;
-        }
-
-        System.out.println("HtmlDocument.getBody(): Index By Lucene (Default): " + indexByLucene);
-
-        String body = "";
-        NodeList nl = this.rawDoc.getElementsByTagName("body");
-
-        if (nl.getLength() > 0) {
-            body = getBodyText(nl.item(0), indexByLucene);
-        }
-
-        return body;
-    }
-
-    /**
-     * Gets the bodyText attribute of the <code>HtmlDocument</code> object.
-     * @param node a DOM Node
-     * @param indexByLucene Whether the index is by Lucene
-     * @return The bodyText value
-     */
-    private String getBodyText(Node node, boolean indexByLucene) {
-        NodeList nl = node.getChildNodes();
-        StringBuffer buffer = new StringBuffer();
-
-        for (int i = 0; i < nl.getLength(); i++) {
-            boolean index = indexByLucene;
-            Node child = nl.item(i);
-
-            switch (child.getNodeType()) {
-            case Node.ELEMENT_NODE:
-
-                if ((this.luceneTagName != null) && (this.luceneClassValue != null)) {
-                    if (child.getNodeName().equals(this.luceneTagName)) {
-                        Attr attribute = ((Element) child).getAttributeNode("class");
-
-                        if (attribute != null) {
-                            if (attribute.getValue().equals(this.luceneClassValue)) {
-                                System.out.println("HtmlDocument.getBodyText(): <" + this.luceneTagName +
-                                    " class=\"" + this.luceneClassValue + "\"> found!");
-                                index = true;
-                            }
-
-                        }
-                    }
-                }
-
-                buffer.append(getBodyText(child, index));
-
-                if (index) {
-                    buffer.append(" ");
-                }
-
-                break;
-
-            case Node.TEXT_NODE:
-
-                if (indexByLucene) {
-                    buffer.append(((Text) child).getData());
-                }
-
-                break;
-            }
-        }
-
-        return buffer.toString();
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/html/ParseException.java b/src/java/org/apache/lenya/lucene/html/ParseException.java
deleted file mode 100644
index 36a4794..0000000
--- a/src/java/org/apache/lenya/lucene/html/ParseException.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene.html;
-
-/**
- * This exception is thrown when parse errors are encountered. You can explicitly create objects of
- * this exception type by calling the method generateParseException in the generated parser. You
- * can modify this class to customize your error reporting mechanisms so long as you retain the
- * public fields.
- */
-public class ParseException extends Exception {
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/**
-     * This variable determines which constructor was used to create this object and thereby
-     * affects the semantics of the "getMessage" method (see below).
-     */
-    protected boolean specialConstructor;
-
-    /**
-     * This is the last token that has been consumed successfully.  If this object has been created
-     * due to a parse error, the token followng this token will (therefore) be the first error
-     * token.
-     */
-    public Token currentToken;
-
-    /**
-     * Each entry in this array is an array of integers.  Each array of integers represents a
-     * sequence of tokens (by their ordinal values) that is expected at this point of the parse.
-     */
-    public int[][] expectedTokenSequences;
-
-    /**
-     * This is a reference to the "tokenImage" array of the generated parser within which the parse
-     * error occurred.  This array is defined in the generated ...Constants interface.
-     */
-    public String[] tokenImage;
-
-    /** The end of line string for this machine. */
-    protected String eol = System.getProperty("line.separator", "\n");
-
-    /**
-     * This constructor is used by the method "generateParseException" in the generated parser.
-     * Calling this constructor generates a new object of this type with the fields
-     * "currentToken", "expectedTokenSequences", and "tokenImage" set.  The boolean flag
-     * "specialConstructor" is also set to true to indicate that this constructor was used to
-     * create this object. This constructor calls its super class with the empty string to force
-     * the "toString" method of parent class "Throwable" to print the error message in the form:
-     * ParseException: &lt;result of getMessage&gt;
-     * @param currentTokenVal Value of the current token
-     * @param expectedTokenSequencesVal Value of the expected token sequences
-     * @param tokenImageVal Value of the image token
-     */
-    public ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal,
-        String[] tokenImageVal) {
-        super("");
-        this.specialConstructor = true;
-        this.currentToken = currentTokenVal;
-        this.expectedTokenSequences = expectedTokenSequencesVal;
-        this.tokenImage = tokenImageVal;
-    }
-
-    /**
-     * The following constructors are for use by you for whatever purpose you can think of.
-     * Constructing the exception in this manner makes the exception behave in the normal way -
-     * i.e., as documented in the class "Throwable".  The fields "errorToken",
-     * "expectedTokenSequences", and "tokenImage" do not contain relevant information.  The JavaCC
-     * generated code does not use these constructors.
-     */
-    public ParseException() {
-        super();
-        this.specialConstructor = false;
-    }
-
-    /**
-     * Creates a new ParseException object.
-     * @param message The message
-     */
-    public ParseException(String message) {
-        super(message);
-        this.specialConstructor = false;
-    }
-
-    /**
-     * This method has the standard behavior when this object has been created using the standard
-     * constructors.  Otherwise, it uses "currentToken" and "expectedTokenSequences" to generate a
-     * parse error message and returns it.  If this object has been created due to a parse error,
-     * and you do not catch it (it gets thrown from the parser), then this method is called during
-     * the printing of the final stack trace, and hence the correct error message gets displayed.
-     *
-     * @return The exception message
-     */
-    public String getMessage() {
-        if (!this.specialConstructor) {
-            return super.getMessage();
-        }
-
-        String expected = "";
-        StringBuffer buf = new StringBuffer();
-        int maxSize = 0;
-
-        for (int i = 0; i < this.expectedTokenSequences.length; i++) {
-            if (maxSize < this.expectedTokenSequences[i].length) {
-                maxSize = this.expectedTokenSequences[i].length;
-            }
-
-            for (int j = 0; j < this.expectedTokenSequences[i].length; j++) {
-                buf.append((this.tokenImage[this.expectedTokenSequences[i][j]] + " "));
-            }
-
-            if (this.expectedTokenSequences[i][this.expectedTokenSequences[i].length - 1] != 0) {
-               buf.append("...");
-            }
-
-            buf.append((this.eol + "    "));
-        }
-
-        expected = buf.toString();
-
-        String retval = null;
-        StringBuffer buf2 = new StringBuffer();
-        buf2.append("Encountered \"");
-        Token tok = this.currentToken.next;
-
-        for (int i = 0; i < maxSize; i++) {
-            if (i != 0) {
-                buf2.append(" ");
-            }
-
-            if (tok.kind == 0) {
-                buf2.append(this.tokenImage[0]);
-
-                break;
-            }
-
-            buf2.append(add_escapes(tok.image));
-            tok = tok.next;
-        }
-
-        buf2.append("\" at line " + this.currentToken.next.beginLine + ", column " +
-        this.currentToken.next.beginColumn);
-        buf2.append("." + this.eol);
-
-        if (this.expectedTokenSequences.length == 1) {
-            buf2.append("Was expecting:" + this.eol + "    ");
-        } else {
-            buf2.append("Was expecting one of:" + this.eol + "    ");
-        }
-
-        buf2.append(expected);
-        retval = buf2.toString();
-
-        return retval;
-    }
-
-    /**
-     * Used to convert raw characters to their escaped version when these raw version cannot be
-     * used as part of an ASCII string literal.
-     * @param str The string to be escaped
-     * @return The escaped string
-     */
-    protected String add_escapes(String str) {
-        StringBuffer retval = new StringBuffer();
-        char ch;
-
-        for (int i = 0; i < str.length(); i++) {
-            switch (str.charAt(i)) {
-            case 0:
-                continue;
-
-            case '\b':
-                retval.append("\\b");
-                continue;
-
-            case '\t':
-                retval.append("\\t");
-                continue;
-
-            case '\n':
-                retval.append("\\n");
-                continue;
-
-            case '\f':
-                retval.append("\\f");
-                continue;
-
-            case '\r':
-                retval.append("\\r");
-                continue;
-
-            case '\"':
-                retval.append("\\\"");
-                continue;
-
-            case '\'':
-                retval.append("\\\'");
-                continue;
-
-            case '\\':
-                retval.append("\\\\");
-                continue;
-
-            default:
-
-                if (((ch = str.charAt(i)) < 0x20) || (ch > 0x7e)) {
-                    String s = "0000" + Integer.toString(ch, 16);
-                    retval.append("\\u" + s.substring(s.length() - 4, s.length()));
-                } else {
-                    retval.append(ch);
-                }
-
-                continue;
-            }
-        }
-
-        return retval.toString();
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/html/ParserThread.java b/src/java/org/apache/lenya/lucene/html/ParserThread.java
deleted file mode 100644
index 5f8c2b1..0000000
--- a/src/java/org/apache/lenya/lucene/html/ParserThread.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene.html;
-
-import java.io.IOException;
-
-
-class ParserThread extends Thread {
-    HTMLParser parser;
-
-    ParserThread(HTMLParser p) {
-        this.parser = p;
-    }
-
-    /**
-     * Run method
-     */
-    public void run() { // convert pipeOut to pipeIn
-
-        try {
-            try { // parse document to pipeOut
-                this.parser.HTMLDocument();
-            } catch (ParseException e) {
-                System.out.println("Parse Aborted: " + e.getMessage());
-            } catch (TokenMgrError e) {
-                System.out.println("Parse Aborted: " + e.getMessage());
-            } finally {
-                this.parser.pipeOut.close();
-
-                synchronized (this.parser) {
-                    this.parser.summary.setLength(HTMLParser.SUMMARY_LENGTH);
-                    this.parser.titleComplete = true;
-                    this.parser.notifyAll();
-                }
-            }
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/html/SimpleCharStream.java b/src/java/org/apache/lenya/lucene/html/SimpleCharStream.java
deleted file mode 100644
index ebd3ac6..0000000
--- a/src/java/org/apache/lenya/lucene/html/SimpleCharStream.java
+++ /dev/null
@@ -1,502 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene.html;
-
-import java.io.Reader;
-import java.io.IOException;
-
-/**
- * An implementation of interface CharStream, where the stream is assumed to contain only ASCII
- * characters (without unicode processing).
- */
-public final class SimpleCharStream {
-    /**
-     * <code>staticFlag</code> Static flag
-     */
-    public static final boolean staticFlag = false;
-    int bufsize;
-    int available;
-    int tokenBegin;
-    /**
-     * <code>bufpos</code> The buffer position
-     */
-    public int bufpos = -1;
-    private int[] bufline;
-    private int[] bufcolumn;
-    private int column = 0;
-    private int line = 1;
-    private boolean prevCharIsCR = false;
-    private boolean prevCharIsLF = false;
-    private java.io.Reader inputStream;
-    private char[] buffer;
-    private int maxNextCharInd = 0;
-    private int inBuf = 0;
-
-    /**
-     * Creates a new SimpleCharStream object.
-     * @param dstream The reader
-     * @param startline The starting line
-     * @param startcolumn The starting column
-     * @param buffersize The buffer size
-     */
-    public SimpleCharStream(Reader dstream, int startline, int startcolumn, int buffersize) {
-        this.inputStream = dstream;
-        this.line = startline;
-        this.column = startcolumn - 1;
-
-        this.available = this.bufsize = buffersize;
-        this.buffer = new char[buffersize];
-        this.bufline = new int[buffersize];
-        this.bufcolumn = new int[buffersize];
-    }
-
-    /**
-     * Creates a new SimpleCharStream object.
-     * @param dstream The reader
-     * @param startline The starting line
-     * @param startcolumn The starting column
-     */
-    public SimpleCharStream(java.io.Reader dstream, int startline, int startcolumn) {
-        this(dstream, startline, startcolumn, 4096);
-    }
-
-    /**
-     * Creates a new SimpleCharStream object.
-     * @param dstream The reader
-     */
-    public SimpleCharStream(java.io.Reader dstream) {
-        this(dstream, 1, 1, 4096);
-    }
-
-    /**
-     * Creates a new SimpleCharStream object.
-     * @param dstream The stream
-     * @param startline The starting line
-     * @param startcolumn The starting column
-     * @param buffersize The buffer size
-     */
-    public SimpleCharStream(java.io.InputStream dstream, int startline, int startcolumn,
-        int buffersize) {
-        this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096);
-    }
-
-    /**
-     * Creates a new SimpleCharStream object.
-     * @param dstream The stream
-     * @param startline The starting line
-     * @param startcolumn The starting column
-     */
-    public SimpleCharStream(java.io.InputStream dstream, int startline, int startcolumn) {
-        this(dstream, startline, startcolumn, 4096);
-    }
-
-    /**
-     * Creates a new SimpleCharStream object.
-     * @param dstream The stream
-     */
-    public SimpleCharStream(java.io.InputStream dstream) {
-        this(dstream, 1, 1, 4096);
-    }
-
-    private final void rxpandBuff(boolean wrapAround) {
-        char[] newbuffer = new char[this.bufsize + 2048];
-        int[] newbufline = new int[this.bufsize + 2048];
-        int[] newbufcolumn = new int[this.bufsize + 2048];
-
-        try {
-            if (wrapAround) {
-                System.arraycopy(this.buffer, this.tokenBegin, newbuffer, 0, this.bufsize - this.tokenBegin);
-                System.arraycopy(this.buffer, 0, newbuffer, this.bufsize - this.tokenBegin, this.bufpos);
-                this.buffer = newbuffer;
-
-                System.arraycopy(this.bufline, this.tokenBegin, newbufline, 0, this.bufsize - this.tokenBegin);
-                System.arraycopy(this.bufline, 0, newbufline, this.bufsize - this.tokenBegin, this.bufpos);
-                this.bufline = newbufline;
-
-                System.arraycopy(this.bufcolumn, this.tokenBegin, newbufcolumn, 0, this.bufsize - this.tokenBegin);
-                System.arraycopy(this.bufcolumn, 0, newbufcolumn, this.bufsize - this.tokenBegin, this.bufpos);
-                this.bufcolumn = newbufcolumn;
-
-                this.maxNextCharInd = (this.bufpos += (this.bufsize - this.tokenBegin));
-            } else {
-                System.arraycopy(this.buffer, this.tokenBegin, newbuffer, 0, this.bufsize - this.tokenBegin);
-                this.buffer = newbuffer;
-
-                System.arraycopy(this.bufline, this.tokenBegin, newbufline, 0, this.bufsize - this.tokenBegin);
-                this.bufline = newbufline;
-
-                System.arraycopy(this.bufcolumn, this.tokenBegin, newbufcolumn, 0, this.bufsize - this.tokenBegin);
-                this.bufcolumn = newbufcolumn;
-
-                this.maxNextCharInd = (this.bufpos -= this.tokenBegin);
-            }
-        } catch (Throwable t) {
-            throw new Error(t.getMessage());
-        }
-
-        this.bufsize += 2048;
-        this.available = this.bufsize;
-        this.tokenBegin = 0;
-    }
-
-    private final void fillBuff() throws java.io.IOException {
-        if (this.maxNextCharInd == this.available) {
-            if (this.available == this.bufsize) {
-                if (this.tokenBegin > 2048) {
-                    this.bufpos = this.maxNextCharInd = 0;
-                    this.available = this.tokenBegin;
-                } else if (this.tokenBegin < 0) {
-                    this.bufpos = this.maxNextCharInd = 0;
-                } else {
-                    rxpandBuff(false);
-                }
-            } else if (this.available > this.tokenBegin) {
-                this.available = this.bufsize;
-            } else if ((this.tokenBegin - this.available) < 2048) {
-                rxpandBuff(true);
-            } else {
-                this.available = this.tokenBegin;
-            }
-        }
-
-        int i;
-
-        try {
-            if ((i = this.inputStream.read(this.buffer, this.maxNextCharInd, this.available - this.maxNextCharInd)) == -1) {
-                this.inputStream.close();
-                throw new java.io.IOException();
-            }
-            this.maxNextCharInd += i;
-
-            return;
-        } catch (java.io.IOException e) {
-            --this.bufpos;
-            backup(0);
-
-            if (this.tokenBegin == -1) {
-                this.tokenBegin = this.bufpos;
-            }
-
-            throw e;
-        }
-    }
-
-    /**
-     * Begin Token callback
-     * @return A character
-     * @throws IOException if an IO error occurs
-     */
-    public final char beginToken() throws IOException {
-        this.tokenBegin = -1;
-
-        char c = readChar();
-        this.tokenBegin = this.bufpos;
-
-        return c;
-    }
-
-    private final void updateLineColumn(char c) {
-        this.column++;
-
-        if (this.prevCharIsLF) {
-            this.prevCharIsLF = false;
-            this.line += (this.column = 1);
-        } else if (this.prevCharIsCR) {
-            this.prevCharIsCR = false;
-
-            if (c == '\n') {
-                this.prevCharIsLF = true;
-            } else {
-                this.line += (this.column = 1);
-            }
-        }
-
-        switch (c) {
-        case '\r':
-            this.prevCharIsCR = true;
-
-            break;
-
-        case '\n':
-            this.prevCharIsLF = true;
-
-            break;
-
-        case '\t':
-            this.column--;
-            this.column += (8 - (this.column & 07));
-
-            break;
-
-        default:
-            break;
-        }
-
-        this.bufline[this.bufpos] = this.line;
-        this.bufcolumn[this.bufpos] = this.column;
-    }
-
-    /**
-     * Read the next character
-     * @return The character
-     * @throws IOException if an IO error occurs
-     */
-    public final char readChar() throws IOException {
-        if (this.inBuf > 0) {
-            --this.inBuf;
-
-            if (++this.bufpos == this.bufsize) {
-                this.bufpos = 0;
-            }
-
-            return this.buffer[this.bufpos];
-        }
-
-        if (++this.bufpos >= this.maxNextCharInd) {
-            fillBuff();
-        }
-
-        char c = this.buffer[this.bufpos];
-
-        updateLineColumn(c);
-
-        return (c);
-    }
-
-    /**
-     * Get the column position
-     * @return The position
-     * @see #getEndColumn
-     * @deprecated
-     */
-    public final int getColumn() {
-        return this.bufcolumn[this.bufpos];
-    }
-
-    /**
-     * Get the line number
-     * @return The line number
-     * @see #getEndLine
-     * @deprecated
-     */
-    public final int getLine() {
-        return this.bufline[this.bufpos];
-    }
-
-    /**
-     * Get the column position
-     * @return The position
-     */
-    public final int getEndColumn() {
-        return this.bufcolumn[this.bufpos];
-    }
-
-    /**
-     * Get the line number
-     * @return The line number
-     */
-    public final int getEndLine() {
-        return this.bufline[this.bufpos];
-    }
-
-    /**
-     * Get the column begin
-     * @return The begin of the column
-     */
-    public final int getBeginColumn() {
-        return this.bufcolumn[this.tokenBegin];
-    }
-
-    /**
-     * Get the line begin
-     * @return The begin of the line
-     */
-    public final int getBeginLine() {
-        return this.bufline[this.tokenBegin];
-    }
-
-    /**
-     * Go backwards in the buffer
-     * @param amount The amount to go backwards
-     */
-    public final void backup(int amount) {
-        this.inBuf += amount;
-
-        if ((this.bufpos -= amount) < 0) {
-            this.bufpos += this.bufsize;
-        }
-    }
-
-    /**
-     * Reinitialize the Parser
-     * @param dstream The reader
-     * @param startline The starting line
-     * @param startcolumn The starting column
-     * @param buffersize The buffer size
-     */
-    public void reInit(java.io.Reader dstream, int startline, int startcolumn, int buffersize) {
-        this.inputStream = dstream;
-        this.line = startline;
-        this.column = startcolumn - 1;
-
-        if ((this.buffer == null) || (buffersize != this.buffer.length)) {
-            this.available = this.bufsize = buffersize;
-            this.buffer = new char[buffersize];
-            this.bufline = new int[buffersize];
-            this.bufcolumn = new int[buffersize];
-        }
-
-        this.prevCharIsLF = this.prevCharIsCR = false;
-        this.tokenBegin = this.inBuf = this.maxNextCharInd = 0;
-        this.bufpos = -1;
-    }
-
-    /**
-     * Reinitialize the parser
-     * @param dstream The reader
-     * @param startline The starting line
-     * @param startcolumn The starting column
-     */
-    public void reInit(java.io.Reader dstream, int startline, int startcolumn) {
-        reInit(dstream, startline, startcolumn, 4096);
-    }
-
-    /**
-     * Reinitialize the parser
-     * @param reader The reader
-     */
-    public void reInit(java.io.Reader reader) {
-        reInit(reader, 1, 1, 4096);
-    }
-
-    /**
-     * Reinitialize the parser
-     * @param dstream The stream
-     * @param startline The starting line
-     * @param startcolumn The starting column
-     * @param buffersize The buffer size
-     */
-    public void reInit(java.io.InputStream dstream, int startline, int startcolumn, int buffersize) {
-        reInit(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096);
-    }
-
-    /**
-     * Reinitialize the parser
-     * @param dstream The stream
-     */
-    public void reInit(java.io.InputStream dstream) {
-        reInit(dstream, 1, 1, 4096);
-    }
-
-    /**
-     * Reinitialize the parser
-     * @param dstream The stream
-     * @param startline The starting line
-     * @param startcolumn The starting column
-     */
-    public void reInit(java.io.InputStream dstream, int startline, int startcolumn) {
-        reInit(dstream, startline, startcolumn, 4096);
-    }
-
-    /**
-     * Get the image
-     * @return The image
-     */
-    public final String getImage() {
-        if (this.bufpos >= this.tokenBegin) {
-            return new String(this.buffer, this.tokenBegin, this.bufpos - this.tokenBegin + 1);
-        }
-        return new String(this.buffer, this.tokenBegin, this.bufsize - this.tokenBegin) +
-        new String(this.buffer, 0, this.bufpos + 1);
-    }
-
-    /**
-     * Get a suffix
-     * @param len The length of the suffix
-     * @return The suffix
-     */
-    public final char[] getSuffix(int len) {
-        char[] ret = new char[len];
-
-        if ((this.bufpos + 1) >= len) {
-            System.arraycopy(this.buffer, this.bufpos - len + 1, ret, 0, len);
-        } else {
-            System.arraycopy(this.buffer, this.bufsize - (len - this.bufpos - 1), ret, 0, len - this.bufpos - 1);
-            System.arraycopy(this.buffer, 0, ret, len - this.bufpos - 1, this.bufpos + 1);
-        }
-
-        return ret;
-    }
-
-    /**
-     * Empty all buffers
-     */
-    public void done() {
-        this.buffer = null;
-        this.bufline = null;
-        this.bufcolumn = null;
-    }
-
-    /**
-     * Method to adjust line and column numbers for the start of a token.<BR>
-     * @param newLine The new line
-     * @param newCol The new column
-     */
-    public void adjustBeginLineColumn(int newLine, int newCol) {
-        int start = this.tokenBegin;
-        int len;
-
-        if (this.bufpos >= this.tokenBegin) {
-            len = this.bufpos - this.tokenBegin + this.inBuf + 1;
-        } else {
-            len = this.bufsize - this.tokenBegin + this.bufpos + 1 + this.inBuf;
-        }
-
-        int i = 0;
-        int j = 0;
-        int k = 0;
-        int nextColDiff = 0;
-        int columnDiff = 0;
-
-        while ((i < len) && (this.bufline[j = start % this.bufsize] == this.bufline[k = ++start % this.bufsize])) {
-            this.bufline[j] = newLine;
-            nextColDiff = (columnDiff + this.bufcolumn[k]) - this.bufcolumn[j];
-            this.bufcolumn[j] = newCol + columnDiff;
-            columnDiff = nextColDiff;
-            i++;
-        }
-
-        if (i < len) {
-            this.bufline[j] = newLine++;
-            this.bufcolumn[j] = newCol + columnDiff;
-
-            while (i++ < len) {
-                if (this.bufline[j = start % this.bufsize] != this.bufline[++start % this.bufsize]) {
-                    this.bufline[j] = newLine++;
-                } else {
-                    this.bufline[j] = newLine;
-                }
-            }
-        }
-
-        this.line = this.bufline[j];
-        this.column = this.bufcolumn[j];
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/html/Token.java b/src/java/org/apache/lenya/lucene/html/Token.java
deleted file mode 100644
index 5d0928d..0000000
--- a/src/java/org/apache/lenya/lucene/html/Token.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene.html;
-
-
-/**
- * Describes the input token stream.
- */
-public class Token {
-    /**
-     * An integer that describes the kind of this token.  This numbering system is determined by
-     * JavaCCParser, and a table of these numbers is stored in the file ...Constants.java.
-     */
-    public int kind;
-
-    /**
-     * beginLine and beginColumn describe the position of the first character of this token;
-     * endLine and endColumn describe the position of the last character of this token.
-     */
-    public int beginLine;
-
-    /**
-     * beginLine and beginColumn describe the position of the first character of this token;
-     * endLine and endColumn describe the position of the last character of this token.
-     */
-    public int beginColumn;
-
-    /**
-     * beginLine and beginColumn describe the position of the first character of this token;
-     * endLine and endColumn describe the position of the last character of this token.
-     */
-    public int endLine;
-
-    /**
-     * beginLine and beginColumn describe the position of the first character of this token;
-     * endLine and endColumn describe the position of the last character of this token.
-     */
-    public int endColumn;
-
-    /** The string image of the token. */
-    public String image;
-
-    /**
-     * A reference to the next regular (non-special) token from the input stream.  If this is the
-     * last token from the input stream, or if the token manager has not read tokens beyond this
-     * one, this field is set to null.  This is true only if this token is also a regular token.
-     * Otherwise, see below for a description of the contents of this field.
-     */
-    public Token next;
-
-    /**
-     * This field is used to access special tokens that occur prior to this token, but after the
-     * immediately preceding regular (non-special) token. If there are no such special tokens,
-     * this field is set to null. When there are more than one such special token, this field
-     * refers to the last of these special tokens, which in turn refers to the next previous
-     * special token through its specialToken field, and so on until the first special token
-     * (whose specialToken field is null). The next fields of special tokens refer to other
-     * special tokens that immediately follow it (without an intervening regular token).  If there
-     * is no such token, this field is null.
-     */
-    public Token specialToken;
-
-    /**
-     * Returns the image.
-     * @return The Image
-     */
-    public final String toString() {
-        return this.image;
-    }
-
-    /**
-     * Returns a new Token object, by default. However, if you want, you can create and return
-     * subclass objects based on the value of ofKind. Simply add the cases to the switch for all
-     * those special cases. For example, if you have a subclass of Token called IDToken that you
-     * want to create if ofKind is ID, simply add something like : case MyParserConstants.ID :
-     * return new IDToken(); to the following switch statement. Then you can cast matchedToken
-     * variable to the appropriate type and use it in your lexical actions.
-     *
-     * @param ofKind The kind of token
-     * @return The token
-     */
-    public static final Token newToken(int ofKind) {
-        switch (ofKind) {
-        default:
-            return new Token();
-        }
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/html/TokenMgrError.java b/src/java/org/apache/lenya/lucene/html/TokenMgrError.java
deleted file mode 100644
index edb3633..0000000
--- a/src/java/org/apache/lenya/lucene/html/TokenMgrError.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene.html;
-
-/**
- * The Token Manager Error class
- */
-public class TokenMgrError extends Error {
-    /*
-     * Ordinals for various reasons why an Error of this type can be thrown.
-     */
-
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/** Lexical error occured. */
-    static final int LEXICAL_ERROR = 0;
-
-    /** An attempt wass made to create a second instance of a static token manager. */
-    static final int STATIC_LEXER_ERROR = 1;
-
-    /** Tried to change to an invalid lexical state. */
-    static final int INVALID_LEXICAL_STATE = 2;
-
-    /** Detected (and bailed out of) an infinite loop in the token manager. */
-    static final int LOOP_DETECTED = 3;
-
-    /** Indicates the reason why the exception is thrown. It will have one of the above 4 values. */
-    int errorCode;
-
-    /**
-     * Constructors of various flavors follow.
-     */
-    public TokenMgrError() {
-        // do nothing
-    }
-
-    /**
-     * Creates a new TokenMgrError object.
-     * @param message The message
-     * @param reason The error code
-     */
-    public TokenMgrError(String message, int reason) {
-        super(message);
-        this.errorCode = reason;
-    }
-
-    /**
-     * Creates a new TokenMgrError object.
-     * @param EOFSeen indicates if EOF caused the lexical error
-     * @param lexState lexical state in which this error occured
-     * @param errorLine line number when the error occured
-     * @param errorColumn column number when the error occured
-     * @param errorAfter prefix that was seen before this error occured
-     * @param curChar the offending character
-     * @param reason The error code
-     */
-    public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn,
-        String errorAfter, char curChar, int reason) {
-        this(lexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
-    }
-
-    /**
-     * Replaces unprintable characters by their espaced (or unicode escaped) equivalents in the
-     * given string
-     * @param str The string
-     * @return The escaped string
-     */
-    protected static final String addEscapes(String str) {
-        StringBuffer retval = new StringBuffer();
-        char ch;
-
-        for (int i = 0; i < str.length(); i++) {
-            switch (str.charAt(i)) {
-            case 0:
-                continue;
-
-            case '\b':
-                retval.append("\\b");
-                continue;
-
-            case '\t':
-                retval.append("\\t");
-                continue;
-
-            case '\n':
-                retval.append("\\n");
-                continue;
-
-            case '\f':
-                retval.append("\\f");
-                continue;
-
-            case '\r':
-                retval.append("\\r");
-                continue;
-
-            case '\"':
-                retval.append("\\\"");
-                continue;
-
-            case '\'':
-                retval.append("\\\'");
-                continue;
-
-            case '\\':
-                retval.append("\\\\");
-                continue;
-
-            default:
-
-                if (((ch = str.charAt(i)) < 0x20) || (ch > 0x7e)) {
-                    String s = "0000" + Integer.toString(ch, 16);
-                    retval.append("\\u" + s.substring(s.length() - 4, s.length()));
-                } else {
-                    retval.append(ch);
-                }
-
-                continue;
-            }
-        }
-
-        return retval.toString();
-    }
-
-    /**
-     * Returns a detailed message for the Error when it is thrown by the token manager to indicate
-     * a lexical error. Note: You can customize the lexical error message by modifying this method.
-     * @param EOFSeen indicates if EOF caused the lexical error
-     * @param lexState lexical state in which this error occured
-     * @param errorLine line number when the error occured
-     * @param errorColumn column number when the error occured
-     * @param errorAfter prefix that was seen before this error occured
-     * @param curChar the offending character
-     * @return The error message
-     */
-    private static final String lexicalError(boolean EOFSeen, int lexState, int errorLine,
-        int errorColumn, String errorAfter, char curChar) {
-        return ("Lexical error at line " + errorLine + ", column " + errorColumn +
-        ".  Encountered: " +
-        (EOFSeen ? "<EOF> "
-                 : (("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int) curChar +
-        "), ")) + "after : \"" + addEscapes(errorAfter) + "\"");
-    }
-
-    /**
-     * You can also modify the body of this method to customize your error messages. For example,
-     * cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not of end-users concern, so you can
-     * return something like :  "Internal Error : Please file a bug report .... " from this method
-     * for such cases in the release version of your parser.
-     * @return The error message
-     */
-    public String getMessage() {
-        return super.getMessage();
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/index/AbstractDocumentCreator.java b/src/java/org/apache/lenya/lucene/index/AbstractDocumentCreator.java
deleted file mode 100644
index 07791c0..0000000
--- a/src/java/org/apache/lenya/lucene/index/AbstractDocumentCreator.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene.index;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.apache.lucene.document.DateField;
-import org.apache.lucene.document.Document;
-import org.apache.lucene.document.Field;
-
-import org.apache.log4j.Logger;
-
-/**
- * Abstract document creator
- */
-public class AbstractDocumentCreator implements DocumentCreator {
-    private static final Logger log = Logger.getLogger(AbstractDocumentCreator.class);
-
-    /** Creates a new instance of AbstractDocumentCreator */
-    public AbstractDocumentCreator() {
-        // do nothing
-    }
-
-    /**
-     * Returns a Lucene document
-     * @param file The file
-     * @param htdocsDumpDir The dump directory
-     * @return The Lucene document
-     * @throws IOException if an error occurs
-     */
-    public Document getDocument(File file, File htdocsDumpDir) throws IOException {
-
-        // make a new, empty document
-        Document doc = new Document();
-
-        // Add the url as a field named "url".  Use an UnIndexed field, so
-        // that the url is just stored with the document, but is not searchable.
-        String requestURI = file.getPath().replace(File.separatorChar, '/').substring(htdocsDumpDir.getPath()
-                                                                                                   .length());
-        if (requestURI.substring(requestURI.length() - 8).equals(".pdf.txt")) {
-            requestURI = requestURI.substring(0, requestURI.length() - 4); // Remove .txt extension from PDF text file
-        }
-
-        doc.add(Field.UnIndexed("url", requestURI));
-
-        // Add the mime-type as a field named "mime-type"
-        if (requestURI.substring(requestURI.length() - 5).equals(".html")) {
-            doc.add(Field.UnIndexed("mime-type", "text/html"));
-        } else if (requestURI.substring(requestURI.length() - 4).equals(".txt")) {
-            doc.add(Field.UnIndexed("mime-type", "text/plain"));
-        } else if (requestURI.substring(requestURI.length() - 4).equals(".pdf")) {
-            doc.add(Field.UnIndexed("mime-type", "application/pdf"));
-        } else {
-            // Don't add any mime-type field
-            //doc.add(Field.UnIndexed("mime-type", "null"));
-        }
-
-        // Add the last modified date of the file a field named "modified".  Use a
-        // Keyword field, so that it's searchable, but so that no attempt is made
-        // to tokenize the field into words.
-        doc.add(Field.Keyword("modified", DateField.timeToString(file.lastModified())));
-
-        // Add the id as a field, so that index can be incrementally maintained.
-        String id = IndexIterator.createID(file, htdocsDumpDir);
-        log.debug(id);
-        doc.add(Field.Keyword("id", id));
-
-        // Add the uid as a field, so that index can be incrementally maintained.
-        // This field is not stored with document, it is indexed, but it is not
-        // tokenized prior to indexing.
-        String uid = IndexIterator.createUID(file, htdocsDumpDir);
-        log.debug(uid);
-        doc.add(new Field("uid", uid, false, true, false));
-
-        return doc;
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/index/AbstractIndexIteratorHandler.java b/src/java/org/apache/lenya/lucene/index/AbstractIndexIteratorHandler.java
deleted file mode 100644
index 4f34ff5..0000000
--- a/src/java/org/apache/lenya/lucene/index/AbstractIndexIteratorHandler.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene.index;
-
-import java.io.File;
-
-import org.apache.lucene.index.IndexReader;
-import org.apache.lucene.index.Term;
-
-/**
- * Abstact base class for Index handling
- */
-public abstract class AbstractIndexIteratorHandler implements IndexIteratorHandler {
-    /** Creates a new instance of AbstractIndexIteratorHandler */
-    public AbstractIndexIteratorHandler() {
-        // do nothing
-    }
-
-    /** Handles a stale document.
-     * @param reader The index reader
-     * @param term The term
-     */
-    public void handleStaleDocument(IndexReader reader, Term term) {
-        // do nothing
-    }
-
-    /** Handles a stale document.
-     * @param reader The reader
-     * @param term The term
-     * @param file The file
-     */
-    public void handleUnmodifiedDocument(IndexReader reader, Term term, File file) {
-        // do nothing
-    }
-
-    /** Handles an unmodified document and the file that represents it.
-     * @param reader The reader
-     * @param term The term
-     * @param file The file
-     */
-    public void handleNewDocument(IndexReader reader, Term term, File file) {
-        // do nothing
-    }
-
-    /** Handles a file. This is called for every file and mainly used for creating a new index.
-     * @param reader The reader
-     * @param file The file
-     */
-    public void handleFile(IndexReader reader, File file) {
-        // do nothing
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/index/AbstractIndexer.java b/src/java/org/apache/lenya/lucene/index/AbstractIndexer.java
deleted file mode 100644
index 4df6d99..0000000
--- a/src/java/org/apache/lenya/lucene/index/AbstractIndexer.java
+++ /dev/null
@@ -1,403 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene.index;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.IOException;
-import java.util.Arrays;
-
-import org.apache.log4j.Logger;
-import org.apache.lenya.lucene.IndexConfiguration;
-import org.apache.lucene.analysis.standard.StandardAnalyzer;
-import org.apache.lucene.document.Document;
-import org.apache.lucene.index.IndexReader;
-import org.apache.lucene.index.IndexWriter;
-import org.apache.lucene.index.Term;
-
-import org.w3c.dom.Element;
-
-/**
- * Abstract base class for indexers.
- * The factory method {@link #getDocumentCreator} is used to create a
- * DocumentCreator from the command-line arguments.
- */
-public abstract class AbstractIndexer implements Indexer {
-    static Logger log = Logger.getLogger(AbstractIndexer.class); 
-    
-    private DocumentCreator documentCreator;
-    private Element indexer;
-    private String configFileName;
-
-    /**
-     * Creates a new instance of AbstractIndexer
-     */
-    public AbstractIndexer() {
-        // do nothing
-    }
-
-    /**
-     * Returns the DocumentCreator of this indexer.
-     * @return The document creator
-     */
-    protected DocumentCreator getDocumentCreator() {
-        return this.documentCreator;
-    }
-
-    /**
-     * Initializes this indexer with command-line parameters.
-     * @param _indexer The indexer
-     * @param _configFileName The config file name
-     * @throws IOException
-     */
-    public void configure(Element _indexer, String _configFileName) throws IOException {
-        this.documentCreator = createDocumentCreator(_indexer, _configFileName);
-        this.indexer = _indexer;
-        this.configFileName = _configFileName;
-    }
-
-    /**
-     * Creates the document creator
-     * @param _indexer The indexer
-     * @param _configFileName The config file name
-     * @return The document creator
-     * @throws IOException if an error occurs
-     */
-    public abstract DocumentCreator createDocumentCreator(Element _indexer, String _configFileName) throws IOException;
-
-    /**
-     * Updates the index incrementally.
-     * Walk directory hierarchy in uid order, while keeping uid iterator from
-     * existing index in sync.  Mismatches indicate one of:
-     * <ol>
-     *   <li>old documents to be deleted</li>
-     *   <li>unchanged documents, to be left alone, or</li>
-     *   <li>new documents, to be indexed.</li>
-     * </ol>
-     * @param dumpDirectory
-     * @param index
-     * @throws IOException
-     */
-    public void updateIndex(File dumpDirectory, File index) throws IOException {
-        deleteStaleDocuments(dumpDirectory, index);
-        doIndex(dumpDirectory, index, false);
-    }
-
-    /**
-     * Updates the index for the document specified
-     * <ol>
-     *   <li>old documents to be deleted</li>
-     *   <li>unchanged documents, to be left alone, or</li>
-     *   <li>new documents, to be indexed.</li>
-     * </ol>
-     * @param file The document
-     * @throws IOException if an error occurs
-     */
-    public void indexDocument(File file) throws IOException {
-        IndexConfiguration config = new IndexConfiguration(this.configFileName);
-        log.debug("File: " + file);
-
-        File dumpDir = new File(config.resolvePath(config.getHTDocsDumpDir()));
-        log.debug("Dump dir: " + dumpDir);
-
-        File indexDir = new File(config.resolvePath(config.getIndexDir()));
-        log.debug("Index dir: " + indexDir);
-
-
-	String id = IndexIterator.createID(file, dumpDir);
-
-	boolean createNewIndex = false;
-        if (!IndexReader.indexExists(indexDir)) {
-            log.warn("Index does not exist yet: " + indexDir);
-            createNewIndex = true;
-        } else {
-	    // Delete from index
-            IndexReader reader = IndexReader.open(indexDir.getAbsolutePath());
-	    Term term = new Term("id", id);
-            log.debug(term.toString());
-            int numberOfDeletedDocuments = reader.delete(term);
-            if (numberOfDeletedDocuments == 1) {
-                log.info("Document has been deleted: " + term);
-            } else {
-                log.warn("No such document found in this index: " + term);
-            }
-            //log.debug("Number of deleted documents: " + numberOfDeletedDocuments);
-            //log.debug("Current number of documents in this index: " + reader.numDocs());
-            reader.close();
-        }
-
-	// Append to index
-        Document doc = getDocumentCreator().getDocument(new File(dumpDir, id), dumpDir);
-        IndexWriter writer = new IndexWriter(indexDir, new StandardAnalyzer(), createNewIndex);
-        writer.maxFieldLength = 1000000;
-        writer.addDocument(doc);
-        //log.debug("Document has been added: " + doc);
-        log.info("Document has been added: " + id);
-        writer.optimize();
-        writer.close();
-    }
-
-    /**
-     * Creates a new index.
-     * @param dumpDirectory The dump directory to use
-     * @param index The index
-     * @throws IOException if an error occurs
-     */
-    public void createIndex(File dumpDirectory, File index)
-        throws IOException {
-        doIndex(dumpDirectory, index, true);
-    }
-
-    /**
-     * Index files
-     * @param dumpDirectory Directory where the files to be indexed are located
-     * @param index Directory where the index shall be located
-     * @param create <strong>true</strong> means the index will be created from scratch, <strong>false</strong> means it will be indexed incrementally
-     * @throws IOException if an error occurs
-     */
-    public void doIndex(File dumpDirectory, File index, boolean create) throws IOException {
-        if (!index.isDirectory()) {
-            index.mkdirs();
-            log.warn("Directory has been created: " + index.getAbsolutePath());
-        }
-            IndexWriter writer = new IndexWriter(index.getAbsolutePath(), new StandardAnalyzer(), create);
-            writer.maxFieldLength = 1000000;
-
-            IndexInformation info = new IndexInformation(index.getAbsolutePath(), dumpDirectory, getFilter(this.indexer, this.configFileName), create);
-
-            IndexHandler handler;
-
-            if (create) {
-                handler = new CreateIndexHandler(dumpDirectory, info, writer);
-            } else {
-                handler = new UpdateIndexHandler(dumpDirectory, info, writer);
-            }
-
-            IndexIterator iterator = new IndexIterator(index.getAbsolutePath(), getFilter(this.indexer, this.configFileName));
-            iterator.addHandler(handler);
-            iterator.iterate(dumpDirectory);
-
-            writer.optimize();
-            writer.close();
-    }
-
-    /**
-     * Delete stale documents.
-     * @param _dumpDirectory The dump directory to use
-     * @param _index The index
-     */
-    protected void deleteStaleDocuments(File _dumpDirectory, File _index) {
-        log.debug("Deleting stale documents");
-
-        IndexIterator iterator = new IndexIterator(_index.getAbsolutePath(), getFilter(this.indexer, this.configFileName));
-        iterator.addHandler(new DeleteHandler());
-        iterator.iterate(_dumpDirectory);
-        log.debug("Deleting stale documents finished");
-    }
-
-    /**
-     * Returns the filter used to receive the indexable files. May be overwritten by inherited class.
-     * @param _indexer The indexer
-     * @param _configFileName The name of the configuration file
-     * @return The filter
-     */
-    public FileFilter getFilter(Element _indexer, String _configFileName) {
-        String[] indexableExtensions = { "html", "htm", "txt" };
-        return new AbstractIndexer.DefaultIndexFilter(indexableExtensions);
-    }
-
-    /**
-     * FileFilter used to obtain the files to index.
-     */
-    public class DefaultIndexFilter implements FileFilter {
-        protected String[] indexableExtensions;
-
-        /**
-         * Default indexable extensions: html, htm, txt
-         */
-        public DefaultIndexFilter() {
-            String[] iE = { "html", "htm", "txt" };
-            this.indexableExtensions = iE;
-        }
-
-        /**
-         * Constructor
-         * @param _indexableExtensions Array of extensions
-         *
-         */
-        public DefaultIndexFilter(String[] _indexableExtensions) {
-            this.indexableExtensions = _indexableExtensions;
-        }
-
-        /** Tests whether or not the specified file should be
-         * included in a pathname list.
-         * @param file The file to be tested
-         *
-         * @return  <code>true</code> if and only if <code>pathname</code> should be included
-         *
-         */
-        public boolean accept(File file) {
-            boolean accept;
-
-            if (file.isDirectory()) {
-                accept = true;
-            } else {
-                String fileName = file.getName();
-                String extension = fileName.substring(fileName.lastIndexOf(".") + 1);
-                accept = Arrays.asList(this.indexableExtensions).contains(extension);
-            }
-
-            return accept;
-        }
-    }
-
-    /**
-     * Deletes all stale documents up to the document representing the next file.
-     * The following documents are deleted:
-     * <ul>
-     *   <li>representing files that where removed</li>
-     *   <li>representing the same file but are older than the current file</li>
-     * </ul>
-     */
-    public class DeleteHandler extends AbstractIndexIteratorHandler {
-        /** Handles a stale document.
-         * @param _reader The reader
-         * @param _term The term
-         *
-         */
-        public void handleStaleDocument(IndexReader _reader, Term _term) {
-            log.debug("deleting " +
-                IndexIterator.uid2url(_term.text()));
-
-            try {
-                int deletedDocuments = _reader.delete(_term);
-                log.debug("deleted " + deletedDocuments +
-                    " documents.");
-            } catch (IOException e) {
-                log.error(e);
-            }
-        }
-    }
-
-    /**
-     * The index handler
-     */
-    public class IndexHandler extends AbstractIndexIteratorHandler {
-        /**
-         * Creates a new IndexHandler object.
-         *
-         * @param _dumpDirectory The dump directory
-         * @param _info The index information
-         * @param _writer The index writer
-         */
-        public IndexHandler(File _dumpDirectory, IndexInformation _info, IndexWriter _writer) {
-            this.info = _info;
-            this.dumpDirectory = _dumpDirectory;
-            this.writer = _writer;
-        }
-
-        private IndexInformation info;
-
-        protected IndexInformation getInformation() {
-            return this.info;
-        }
-
-        private File dumpDirectory;
-
-        protected File getDumpDirectory() {
-            return this.dumpDirectory;
-        }
-
-        private IndexWriter writer;
-
-        protected IndexWriter getWriter() {
-            return this.writer;
-        }
-
-        /**
-         * Add document to index
-         * @param file The file to add
-         */
-        protected void addFile(File file) {
-            log.debug("adding document: " + file.getAbsolutePath());
-
-            try {
-                Document doc = getDocumentCreator().getDocument(file, this.dumpDirectory);
-                this.writer.addDocument(doc);
-            } catch (Exception e) {
-                log.error(e);
-            }
-
-            this.info.increase();
-            log.info(this.info.printProgress());
-        }
-    }
-
-    /**
-     * The factory for the index handler
-     */
-    public class CreateIndexHandler extends IndexHandler {
-        /**
-         * Creates a new CreateIndexHandler object.
-         *
-         * @param dumpDirectory The dump directory to use
-         * @param info The index information
-         * @param writer The index writer
-         */
-        public CreateIndexHandler(File dumpDirectory, IndexInformation info, IndexWriter writer) {
-            super(dumpDirectory, info, writer);
-        }
-
-        /**
-         * Handles a file. Used when creating a new index.
-         * @param reader The reader
-         * @param file The file
-         */
-        public void handleFile(IndexReader reader, File file) {
-            addFile(file);
-        }
-    }
-
-    /**
-     * Class to update the index
-     */
-    public class UpdateIndexHandler extends IndexHandler {
-        /**
-         * Creates a new UpdateIndexHandler object.
-         *
-         * @param dumpDirectory The dump directory to use
-         * @param info The index information
-         * @param writer The index writer
-         */
-        public UpdateIndexHandler(File dumpDirectory, IndexInformation info, IndexWriter writer) {
-            super(dumpDirectory, info, writer);
-        }
-
-        /**
-         * Handles a new document. Used when updating the index.
-         * @param reader The index reader
-         * @param term The term
-         * @param file The file
-         */
-        public void handleNewDocument(IndexReader reader, Term term, File file) {
-            addFile(file);
-        }
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/index/ConfigurableDocumentCreator.java b/src/java/org/apache/lenya/lucene/index/ConfigurableDocumentCreator.java
deleted file mode 100644
index 78ec16f..0000000
--- a/src/java/org/apache/lenya/lucene/index/ConfigurableDocumentCreator.java
+++ /dev/null
@@ -1,281 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene.index;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.Reader;
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.io.Writer;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.FactoryConfigurationError;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.TransformerFactoryConfigurationError;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-
-import org.apache.lenya.lucene.parser.HTMLParser;
-import org.apache.lenya.lucene.parser.HTMLParserFactory;
-import org.apache.lenya.lucene.parser.StringCleaner;
-import org.apache.lenya.xml.DocumentHelper;
-import org.apache.lenya.xml.NamespaceHelper;
-import org.apache.log4j.Logger;
-import org.apache.lucene.document.Document;
-import org.apache.lucene.document.Field;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-/**
- * Uses XSLT to transform a XML into a Lucene document
- */
-public class ConfigurableDocumentCreator extends AbstractDocumentCreator {
-    private static final Logger log = Logger.getLogger(ConfigurableDocumentCreator.class);
-  
-    /**
-     * <code>LUCENE_NAMESPACE</code> The Lucene namespace
-     */
-    public static final String LUCENE_NAMESPACE = "http://apache.org/cocoon/lenya/lucene/1.0";
-    /**
-     * <code>XHTML_NAMESPACE</code> The XHTML namespace
-     */
-    public static final String XHTML_NAMESPACE = "http://www.w3.org/1999/xhtml";
-
-    /**
-     * Creates a new ConfigurableDocumentCreator object.
-     *
-     * @param _stylesheet The stylesheet to use to transform the Document into a Lucene document
-     */
-    public ConfigurableDocumentCreator(String _stylesheet) {
-        this.stylesheet = _stylesheet;
-    }
-
-    private String stylesheet;
-
-    /**
-     * Get the stylesheet
-     * @return The stylesheet
-     */
-    public String getStylesheet() {
-        return this.stylesheet;
-    }
-
-    /**
-     * Transform source document into lucene document and generate a Lucene Document instance
-     *
-     * @param file The file
-     * @param htdocsDumpDir The dump directory
-     * @return The Lucene document
-     * @throws IOException if an error occurs
-     */
-    public Document getDocument(File file, File htdocsDumpDir) throws IOException {
-        log.debug(".getDocument() : indexing " + file.getAbsolutePath());
-
-        try {
-            org.w3c.dom.Document sourceDocument = null;
-            DocumentBuilderFactory parserFactory = DocumentBuilderFactory.newInstance();
-            parserFactory.setValidating(false);
-            parserFactory.setNamespaceAware(true);
-            parserFactory.setIgnoringElementContentWhitespace(true);
-            DocumentBuilder mybuilder = parserFactory.newDocumentBuilder();
-            sourceDocument = mybuilder.parse(file.getAbsolutePath());
-
-
-// FIXME: What is this good for: <?xml version="1.0"?><body>...</body>
-/*
-                NamespaceHelper documentHelper = new NamespaceHelper(XHTML_NAMESPACE, "xhtml", "html");
-                org.w3c.dom.Document sourceDocument = documentHelper.getDocument();
-
-                Element rootNode = sourceDocument.getDocumentElement();
-
-                String bodyText = getBodyText(file);
-                Element bodyElement = documentHelper.createElement("body", bodyText);
-                rootNode.appendChild(bodyElement);
-*/
-
-            DOMSource documentSource = new DOMSource(sourceDocument);
-            Writer documentWriter = new StringWriter();
-
-            TransformerFactory tFactory = TransformerFactory.newInstance();
-            Transformer documentTransformer = tFactory.newTransformer(new StreamSource(new StringReader(getStylesheet())));
-            documentTransformer.setOutputProperty(OutputKeys.INDENT, "yes");
-            documentTransformer.setOutputProperty(OutputKeys.ENCODING, "ISO-8859-1");
-
-            String fileName = file.getName();
-
-            if (fileName.endsWith(".pdf.txt")) {
-                fileName = fileName.substring(0, fileName.lastIndexOf(".txt"));
-            }
-
-            documentTransformer.setParameter("filename", fileName);
-            documentTransformer.transform(documentSource, new StreamResult(documentWriter));
-
-            // DEBUG: debug lucene documents
-            //dumpLuceneDocument(file, documentWriter);
-
-            DocumentBuilder builder = DocumentHelper.createBuilder();
-            org.w3c.dom.Document luceneDocument = builder.parse(new InputSource(new StringReader(documentWriter.toString())));
-
-            NamespaceHelper helper = new NamespaceHelper(LUCENE_NAMESPACE, "luc", luceneDocument);
-            Element root = luceneDocument.getDocumentElement();
-            Element[] fieldElements = helper.getChildren(root, "field");
-
-            Document document = super.getDocument(file, htdocsDumpDir);
-
-            Class[] parameterTypes = { String.class, String.class };
-
-            for (int i = 0; i < fieldElements.length; i++) {
-                String name = fieldElements[i].getAttribute("name");
-                String type = fieldElements[i].getAttribute("type");
-                String text = getText(fieldElements[i]);
-
-                Method method = Field.class.getMethod(type, parameterTypes);
-
-                String[] args = { name, text };
-
-                Field field = (Field) method.invoke(null, args);
-                document.add(field);
-
-            }
-
-            return document;
-        } catch (final TransformerConfigurationException e) {
-            throw new IOException(e.toString());
-        } catch (final IllegalArgumentException e) {
-            throw new IOException(e.toString());
-        } catch (final SecurityException e) {
-            throw new IOException(e.toString());
-        } catch (final FactoryConfigurationError e) {
-            throw new IOException(e.toString());
-        } catch (final ParserConfigurationException e) {
-            throw new IOException(e.toString());
-        } catch (final SAXException e) {
-            throw new IOException(e.toString());
-        } catch (final IOException e) {
-            throw new IOException(e.toString());
-        } catch (final TransformerFactoryConfigurationError e) {
-            throw new IOException(e.toString());
-        } catch (final TransformerException e) {
-            throw new IOException(e.toString());
-        } catch (final NoSuchMethodException e) {
-            throw new IOException(e.toString());
-        } catch (final IllegalAccessException e) {
-            throw new IOException(e.toString());
-        } catch (final InvocationTargetException e) {
-            throw new IOException(e.toString());
-        }
-    }
-
-    /**
-     * Writes the lucene XML document to a file.
-     * @param file The file
-     * @param writer The writer
-     * @throws IOException if an IO error occurs
-     */
-    protected void dumpLuceneDocument(File file, Writer writer) throws IOException {
-        FileWriter fileWriter = null;
-        
-        try {
-            log.debug(".dumpLuceneDocument(): Dump document: " + file.getAbsolutePath());
-
-            File luceneDocumentFile = new File(file.getAbsolutePath() + ".xluc");
-            if (luceneDocumentFile.createNewFile()) log.debug("new lucene file created.");
-
-            fileWriter = new FileWriter(luceneDocumentFile);
-            fileWriter.write(writer.toString());
-        } catch (IOException e) {
-            log.error("IO Error " +e.toString());
-        } finally {
-            if (fileWriter != null)
-                fileWriter.close();
-        }
-    }
-
-    /**
-     * Get the text of a node
-     * @param node The node
-     * @return The text of the node
-     */
-    public static String getText(Node node) {
-        StringBuffer result = new StringBuffer();
-
-        if (!node.hasChildNodes()) {
-            return "";
-        }
-
-        NodeList list = node.getChildNodes();
-
-        for (int i = 0; i < list.getLength(); i++) {
-            Node subnode = list.item(i);
-
-            if (subnode.getNodeType() == Node.TEXT_NODE) {
-                result.append(subnode.getNodeValue());
-            } else if (subnode.getNodeType() == Node.CDATA_SECTION_NODE) {
-                result.append(subnode.getNodeValue());
-            } else if (subnode.getNodeType() == Node.ENTITY_REFERENCE_NODE) {
-                // Recurse into the subtree for text
-                // (and ignore comments)
-                result.append(getText(subnode));
-            }
-        }
-        return result.toString();
-    }
-
-    /**
-     * Get the body text of a file (if that file happens to be HTML)
-     * @param file The file
-     * @return The body text
-     * @throws Exception if an error occurs
-     */
-    public static String getBodyText(File file) throws Exception {
-        HTMLParser parser = HTMLParserFactory.newInstance(file);
-        parser.parse(file);
-
-        Reader reader = parser.getReader();
-        Writer writer = new StringWriter();
-
-        int c;
-
-        while ((c = reader.read()) != -1)
-            writer.write(c);
-
-        String content = writer.toString();
-        reader.close();
-        writer.close();
-
-        content = StringCleaner.clean(content);
-
-        return content;
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/index/ConfigurableIndexer.java b/src/java/org/apache/lenya/lucene/index/ConfigurableIndexer.java
deleted file mode 100644
index 5224649..0000000
--- a/src/java/org/apache/lenya/lucene/index/ConfigurableIndexer.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene.index;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.IOException;
-import java.io.StringWriter;
-import java.io.Writer;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.TransformerFactoryConfigurationError;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-
-import org.apache.cocoon.util.NetUtils;
-import org.apache.lenya.xml.DocumentHelper;
-import org.apache.log4j.Logger;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
-
-/**
- * A configurable indexer
- */
-public class ConfigurableIndexer extends AbstractIndexer {
-    private static final Logger _log = Logger.getLogger(ConfigurableIndexer.class);
-
-    /**
-     * Instantiate a Document Creator for creating Lucene Documents
-     * @param _indexer <code>indexer</code> node
-     * @param _configFileName The name of the configuration file
-     * @return DocumentCreator The document creator
-     * @throws IOException if an error occurs
-     */
-    public DocumentCreator createDocumentCreator(Element _indexer, String _configFileName) throws IOException {
-            _log.debug(".createDocumentCreatort(): Element name: " + _indexer.getNodeName());
-
-            // FIXME: concat these files ...
-            String configurationFileName = new File(_configFileName).getParent() + File.separator + getLuceneDocConfigFileName(_indexer);
-            File configurationFile = new File(configurationFileName);
-            String stylesheet = getStylesheet(configurationFile);
-            return new ConfigurableDocumentCreator(stylesheet);
-    }
-
-    /**
-     * <code>CONFIGURATION_CREATOR_STYLESHEET</code> Path to the configuration stylesheet
-     */
-    public static final String CONFIGURATION_CREATOR_STYLESHEET = "org/apache/lenya/lucene/index/configuration2xslt.xsl";
-
-    /**
-     * Converts the configuration file to an XSLT stylesheet and returns a reader that reads this stylesheet.
-     * @param configurationFile The configuration file
-     * @return The writer as string
-     * @throws IOException if an error occurs
-     */
-    protected String getStylesheet(File configurationFile) throws IOException {
-        Writer stylesheetWriter;
-        try {
-            _log.debug(".getStylesheet(): Configuration file: " + configurationFile.getAbsolutePath());
-
-            URL configurationCreatorURL = ConfigurableIndexer.class.getClassLoader().getResource(CONFIGURATION_CREATOR_STYLESHEET);
-            File configurationStylesheetFile = new File(new URI(NetUtils.encodePath(configurationCreatorURL.toString())));
-            Document configurationDocument = DocumentHelper.readDocument(configurationFile);
-
-            TransformerFactory tFactory = TransformerFactory.newInstance();
-            Transformer configurationTransformer = tFactory.newTransformer(new StreamSource(configurationStylesheetFile));
-
-            DOMSource source = new DOMSource(configurationDocument);
-            stylesheetWriter = new StringWriter();
-            configurationTransformer.transform(source, new StreamResult(stylesheetWriter));
-
-            // Show meta stylesheet which has been created by configuration2xslt.xsl
-            _log.debug(".getStylesheet(): Meta Stylesheet: " + stylesheetWriter.toString());
-        } catch (final TransformerConfigurationException e) {
-            log.error("Transformer configuration error " +e.toString());
-            throw new IOException(e.toString());
-        } catch (final URISyntaxException e) {
-            log.error("URI syntax error " +e.toString());
-            throw new IOException(e.toString());
-        } catch (final ParserConfigurationException e) {
-            log.error("Parser configuration error " +e.toString());
-            throw new IOException(e.toString());
-        } catch (final SAXException e) {
-            log.error("SAX error " +e.toString());
-            throw new IOException(e.toString());
-        } catch (final IOException e) {
-            log.error("IO error " +e.toString());
-            throw new IOException(e.toString());
-        } catch (final TransformerFactoryConfigurationError e) {
-            log.error("Transformer factory error " +e.toString());
-            throw new IOException(e.toString());
-        } catch (final TransformerException e) {
-            log.error("Transformer error " +e.toString());
-            throw new IOException(e.toString());
-        }
-
-        return stylesheetWriter.toString();
-    }
-
-    /**
-     * Returns the filter used to receive the indexable files.
-     * @param _indexer The indexer
-     * @param _configFileName The configuration file name
-     * @return A file filter
-     */
-    public FileFilter getFilter(Element _indexer, String _configFileName) {
-        if (extensionsExists(_indexer)) {
-            String[] indexableExtensions = new String[1];
-	    indexableExtensions[0] = getExtensions(_indexer);
-            return new AbstractIndexer.DefaultIndexFilter(indexableExtensions);
-        } else if (filterExists(_indexer)) {
-            return getFilterFromConfiguration(_indexer);
-        }
-
-        return new AbstractIndexer.DefaultIndexFilter(); 
-    }
-
-    /**
-     * Returns the filename of the Lucence configuration file
-     * @param _indexer The indexer
-     * @return The filename
-     */
-    private String getLuceneDocConfigFileName(Element _indexer) {
-        String luceneDocConfigFileName = null;
-
-        NodeList nl = _indexer.getChildNodes();
-        for (int i = 0; i < nl.getLength(); i++) {
-            Node node = nl.item(i);
-            if (node.getNodeType() == Node.ELEMENT_NODE && node.getNodeName().equals("configuration")) {
-                _log.debug(".getLuceneDocConfigFileName(): Node configuration exists!");
-                luceneDocConfigFileName = ((Element)node).getAttribute("src");
-            }
-        }
-        if (luceneDocConfigFileName == null) {
-            _log.error(".getLuceneDocConfigFileName(): ERROR: Lucene Document Configuration is not specified (indexer/configuration/@src)");
-        }
-        _log.debug(".getLuceneDocConfigFileName(): Lucene Document Configuration: " + luceneDocConfigFileName);
-        return luceneDocConfigFileName;
-    }
-
-    /**
-     * Returns the configured extensions of this Indexer
-     * @param _indexer The indexer
-     * @return The extensions
-     */
-    private String getExtensions(Element _indexer) {
-        String extensions = null;
-
-        NodeList nl = _indexer.getChildNodes();
-        for (int i = 0; i < nl.getLength(); i++) {
-            Node node = nl.item(i);
-            if (node.getNodeType() == Node.ELEMENT_NODE && node.getNodeName().equals("extensions")) {
-                _log.debug("Node extensions exists!");
-                extensions = ((Element)node).getAttribute("src");
-            }
-        }
-        if (extensions == null) {
-            _log.error("Extensions have not been specified (indexer/extensions/@src)");
-        }
-        _log.debug("Extensions: " + extensions);
-        return extensions;
-    }
-
-    /**
-     * Returns the file filter from the configuration of this indexer
-     * @param _indexer The indexer
-     * @return The file filter
-     */
-    private FileFilter getFilterFromConfiguration(Element _indexer) {
-        String className = null;
-
-        NodeList nl = _indexer.getChildNodes();
-        for (int i = 0; i < nl.getLength(); i++) {
-            Node node = nl.item(i);
-            if (node.getNodeType() == Node.ELEMENT_NODE && node.getNodeName().equals("filter")) {
-                _log.debug("Node filter exists!");
-                className = ((Element)node).getAttribute("class");
-            }
-        }
-        if (className == null) {
-            _log.error("Class name has not been specified (indexer/filter/@class)");
-            return null;
-        }
-        _log.debug("Class name: " + className);
-        try {
-            return (FileFilter)Class.forName(className).newInstance();
-        } catch(Exception e) {
-            _log.error("" + e);
-        }
-        return null;
-    }
-
-    /**
-     * Check if node <extensions src="..."/> exists
-     * @param _indexer The indexer to check
-     * @return Whether extensions node exists
-     */
-    private boolean extensionsExists(Element _indexer) {
-        NodeList nl = _indexer.getChildNodes();
-        for (int i = 0; i < nl.getLength(); i++) {
-            Node node = nl.item(i);
-            if (node.getNodeType() == Node.ELEMENT_NODE && node.getNodeName().equals("extensions")) {
-                _log.debug("Node <extensions src=\"...\"/> exist");
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Check if a file filter exists
-     * @param _indexer The indexer to check
-     * @return Whether a file filter exists
-     */
-    private boolean filterExists(Element _indexer) {
-        NodeList nl = _indexer.getChildNodes();
-        for (int i = 0; i < nl.getLength(); i++) {
-            Node node = nl.item(i);
-            if (node.getNodeType() == Node.ELEMENT_NODE && node.getNodeName().equals("filter")) {
-                _log.debug("Node filter exists!");
-                return true;
-            }
-        }
-        return false;
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/index/DefaultDocumentCreator.java b/src/java/org/apache/lenya/lucene/index/DefaultDocumentCreator.java
deleted file mode 100644
index 5d65a24..0000000
--- a/src/java/org/apache/lenya/lucene/index/DefaultDocumentCreator.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene.index;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.apache.lenya.lucene.parser.HTMLParser;
-import org.apache.lenya.lucene.parser.HTMLParserFactory;
-import org.apache.lenya.lucene.parser.ParseException;
-import org.apache.lucene.document.Document;
-import org.apache.lucene.document.Field;
-
-/**
- * The default document creator
- */
-public class DefaultDocumentCreator extends AbstractDocumentCreator {
-
-    /** 
-     * Creates a new instance of DefaultDocumentCreator
-     */
-    public DefaultDocumentCreator() {
-        // do nothing
-    }
-
-    /**
-     * Returns a document
-     * @param file The file
-     * @param htdocsDumpDir The dump directory
-     * @return The document
-     * @throws IOException if an error occurs
-     */
-    public Document getDocument(File file, File htdocsDumpDir) throws IOException {
-        Document document;
-        try {
-            document = super.getDocument(file, htdocsDumpDir);
-
-            HTMLParser parser = HTMLParserFactory.newInstance(file);
-            parser.parse(file);
-
-            document.add(Field.Text("title", parser.getTitle()));
-            document.add(Field.Text("keywords", parser.getKeywords()));
-            document.add(Field.Text("contents", parser.getReader()));
-        } catch (final IOException e) {
-            throw new IOException(e.toString());
-        } catch (final ParseException e) {
-            throw new IOException(e.toString());
-        }
-
-        return document;
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/index/DefaultIndexer.java b/src/java/org/apache/lenya/lucene/index/DefaultIndexer.java
deleted file mode 100644
index 4c3023f..0000000
--- a/src/java/org/apache/lenya/lucene/index/DefaultIndexer.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene.index;
-
-import org.w3c.dom.Element;
-
-import java.io.IOException;
-
-/**
- * The default indexer
- */
-public class DefaultIndexer extends AbstractIndexer {
-
-    /**
-     * Creates a new instance of DefaultIndexer 
-     */
-    public DefaultIndexer() {
-        // do nothing
-    }
-
-    /**
-     * @param indexer Indexer
-     * @param configFileName Lucene Configuration File
-     * @return DefaultDocumentCreator
-     * @throws IOException if an error occurs
-     */
-    public DocumentCreator createDocumentCreator(Element indexer, String configFileName) throws IOException {
-        return new DefaultDocumentCreator();
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/index/DocumentCreator.java b/src/java/org/apache/lenya/lucene/index/DocumentCreator.java
deleted file mode 100644
index 21db7ad..0000000
--- a/src/java/org/apache/lenya/lucene/index/DocumentCreator.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene.index;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.apache.lucene.document.Document;
-
-
-/**
- * An object of a class implementing this interface creates Lucene documents
- * from files.
- */
-public interface DocumentCreator {
-    /**
-     * Create a document from a file.
-     * @param file The file
-     * @param htdocsDumpDir The directory to hold the dumps from spidering
-     * @return The document
-     * @throws IOException
-     */
-    public Document getDocument(File file, File htdocsDumpDir)
-        throws IOException;
-}
diff --git a/src/java/org/apache/lenya/lucene/index/Index.java b/src/java/org/apache/lenya/lucene/index/Index.java
deleted file mode 100644
index ec57f66..0000000
--- a/src/java/org/apache/lenya/lucene/index/Index.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation
- * 
- * Licensed 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.
- *  
- */
-
-package org.apache.lenya.lucene.index;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Date;
-
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.apache.lenya.lucene.IndexConfiguration;
-import org.apache.lenya.xml.DocumentHelper;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.xml.sax.SAXException;
-
-/**
- * Index.
- *
- * @version $Id$
- */
-public class Index {
-    /**
-     * Command line interface
-     * @param argv Lucene Index Configuration
-     */
-    public static void main(String[] argv) {
-
-        try {
-            String index = "index";
-            boolean create = false;
-            File root = null;
-
-            String usage = "Index <lucene.xconf> [file]";
-
-            if (argv.length == 0) {
-                System.err.println("Usage: " + usage);
-
-                return;
-            }
-
-            IndexConfiguration ie = new IndexConfiguration(argv[0]);
-            index = ie.resolvePath(ie.getIndexDir());
-            root = new File(ie.resolvePath(ie.getHTDocsDumpDir()));
-
-            if (ie.getUpdateIndexType().equals("new")) {
-                create = true;
-            } else if (ie.getUpdateIndexType().equals("incremental")) {
-                create = false;
-            } else {
-                System.err.println("ERROR: No such update-index/@type: " + ie.getUpdateIndexType());
-
-                return;
-            }
-
-            Date start = new Date();
-
-            Indexer indexer = (Indexer) ie.getIndexerClass().newInstance();
-
-            String path = argv[0];
-
-            Document config = DocumentHelper.readDocument(new File(path));
-            Element indexerElement = DocumentHelper.getFirstChild(config.getDocumentElement(),
-                    null, "indexer");
-            indexer.configure(indexerElement, argv[0]);
-
-            if (argv.length == 2) {
-                indexer.indexDocument(new File(argv[1]));
-                return;
-            }
-
-            if (create) {
-                indexer.createIndex(root, new File(index));
-            } else {
-                indexer.updateIndex(root, new File(index));
-            }
-
-            Date end = new Date();
-
-            System.out.print(end.getTime() - start.getTime());
-            System.out.println(" total milliseconds");
-        } catch (final InstantiationException e) {
-            e.printStackTrace(System.out);
-        } catch (final IllegalAccessException e) {
-            e.printStackTrace(System.out);
-        } catch (final ParserConfigurationException e) {
-            e.printStackTrace(System.out);
-        } catch (final SAXException e) {
-            e.printStackTrace(System.out);
-        } catch (final IOException e) {
-            e.printStackTrace(System.out);
-        }
-    }
-
-    /**
-     * Get indexer from configuration.
-     * @param luceneConfig The lucene configuration.
-     * @return An indexer.
-     * @throws IOException if an error occurs.
-     */
-    public static Indexer getIndexer(String luceneConfig) throws IOException {
-        try {
-            Indexer indexer;
-            IndexConfiguration ie = new IndexConfiguration(luceneConfig);
-            indexer = (Indexer) ie.getIndexerClass().newInstance();
-            Document config = DocumentHelper.readDocument(new File(luceneConfig));
-            Element indexerElement = DocumentHelper.getFirstChild(config.getDocumentElement(), null,
-                    "indexer");
-            indexer.configure(indexerElement, luceneConfig);
-            return indexer;
-        } catch (InstantiationException e) {
-            throw new IOException(e.toString());
-        } catch (IllegalAccessException e) {
-            throw new IOException(e.toString());
-        } catch (ParserConfigurationException e) {
-            throw new IOException(e.toString());
-        } catch (SAXException e) {
-            throw new IOException(e.toString());
-        } catch (IOException e) {
-            throw new IOException(e.toString());
-        }
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/lucene/index/IndexInformation.java b/src/java/org/apache/lenya/lucene/index/IndexInformation.java
deleted file mode 100644
index f3fdd55..0000000
--- a/src/java/org/apache/lenya/lucene/index/IndexInformation.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene.index;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Collections;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.List;
-
-import org.apache.log4j.Logger;
-import org.apache.lucene.index.IndexReader;
-import org.apache.lucene.index.Term;
-
-/**
- * Helper class to hold some indexing data during the indexing process
- */
-public class IndexInformation {
-    
-    private static Logger log = Logger.getLogger(IndexInformation.class);
-    private String index;
-    private boolean creating;
-    
-    /**
-     * Creates a new IndexInformation object.
-     * @param _index The index
-     * @param dumpDirectory The dump directory
-     * @param filter The filter
-     * @param create Whether this index is being created
-     */
-    public IndexInformation(String _index, File dumpDirectory, FileFilter filter, boolean create) {
-        log.info("Collecting index information for index '" + _index + "'...");
-
-        this.index = _index;
-        this.creating = create;
-        collectFiles(dumpDirectory, filter, _index);
-        this.startTime = new GregorianCalendar();
-
-        log.info(getFileNumber() + " files to index");
-    }
-
-    protected String getIndex() {
-        return this.index;
-    }
-
-    protected boolean isCreating() {
-        return this.creating;
-    }
-
-    private List files = new ArrayList();
-
-    /**
-     * Add a file to the file list
-     * @param _file The file
-     */
-    protected void addFile(File _file) {
-        this.files.add(_file);
-    }
-
-    /**
-     * Get all files in the file list
-     * @return The file list
-     */
-    public File[] getFiles() {
-        Collections.sort(this.files);
-        return (File[]) this.files.toArray(new File[this.files.size()]);
-    }
-
-    private int currentFile = 0;
-
-    /**
-     * Increase the file count
-     */
-    public void increase() {
-        this.currentFile++;
-    }
-
-    /**
-     * Get the number of the current file
-     * @return The number of the current file
-     */
-    public int getCurrentFile() {
-        return this.currentFile;
-    }
-
-    /**
-     * Get number of files to index
-     * @return number of files to index
-     */
-    public int getFileNumber() {
-        return this.files.size();
-    }
-
-    private Calendar startTime;
-
-    /**
-     * Get the start time of the index
-     * @return The start time
-     */
-    public Calendar getStartTime() {
-        return this.startTime;
-    }
-
-    /**
-     * Generate string which tells about the indexing progress
-     * @return indexing progress
-     */
-    public String printProgress() {
-        double percent = (double) this.currentFile / (double) getFileNumber();
-        DateFormat format = new SimpleDateFormat("HH:mm:ss");
-
-        return "added document " + getCurrentFile() + " of " + getFileNumber() + " (" +
-        (int) (percent * 100) + "%" + ", remaining time: " +
-        format.format(getEstimatedTime().getTime()) + ")";
-    }
-
-    /**
-     * Get the estimated time duration for the indexing process
-     * @return The estimated duration
-     */
-    protected Calendar getEstimatedTime() {
-        long elapsedMillis = new Date().getTime() - getStartTime().getTime().getTime();
-
-        double millisPerFile = (double) elapsedMillis / (double) this.currentFile;
-        long estimatedMillis = (long) (millisPerFile * getFileNumber()) - elapsedMillis;
-
-        GregorianCalendar estimatedCalendar = new GregorianCalendar();
-        estimatedCalendar.setTimeInMillis(estimatedMillis);
-        estimatedCalendar.roll(Calendar.HOUR, false);
-
-        return estimatedCalendar;
-    }
-
-    /**
-     * Collect files
-     * @param _dumpDirectory The dump directory
-     * @param _filter The filter
-     * @param _index The index
-     */
-    protected void collectFiles(File _dumpDirectory, FileFilter _filter, String _index) {
-        IndexIterator iterator = new IndexIterator(_index, _filter);
-        IndexIteratorHandler handler;
-
-        if (isCreating()) {
-            handler = new CreateHandler();
-        } else {
-            handler = new UpdateHandler();
-        }
-
-        iterator.addHandler(handler);
-        iterator.iterate(_dumpDirectory);
-    }
-
-    /**
-     * Create Handler class
-     */
-    public class CreateHandler extends AbstractIndexIteratorHandler {
-        /** Handles a file.
-         * @param _reader The reader
-         * @param _file The file
-         */
-        public void handleFile(IndexReader _reader, File _file) {
-            IndexInformation.this.addFile(_file);
-        }
-    }
-
-    /**
-     * Update handler class
-     */
-    public class UpdateHandler extends AbstractIndexIteratorHandler {
-        /** Handles a new document.
-         * @param _reader The reader
-         * @param _term The term
-         * @param _file The file
-         */
-        public void handleNewDocument(IndexReader _reader, Term _term, File _file) {
-            IndexInformation.this.addFile(_file);
-        }
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/index/IndexIterator.java b/src/java/org/apache/lenya/lucene/index/IndexIterator.java
deleted file mode 100644
index af3672a..0000000
--- a/src/java/org/apache/lenya/lucene/index/IndexIterator.java
+++ /dev/null
@@ -1,361 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene.index;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.IOException;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.Logger;
-import org.apache.lucene.document.DateField;
-import org.apache.lucene.index.IndexReader;
-import org.apache.lucene.index.Term;
-import org.apache.lucene.index.TermEnum;
-
-/**
- * The index Iterator
- */
-public class IndexIterator {
-    
-    private static Logger log = Logger.getLogger(IndexIterator.class);
-    
-    /**
-     * Creates a new instance of IndexItertor
-     * @param _index The index to use
-     * @param _filter The filter to use
-     */
-    public IndexIterator(String _index, FileFilter _filter) {
-        this.filter = _filter;
-        this.index = _index;
-    }
-
-    private String index;
-
-    protected String getIndex() {
-        return this.index;
-    }
-
-    private FileFilter filter;
-
-    /**
-     * @return FileFilter
-     */
-    protected FileFilter getFilter() {
-        return this.filter;
-    }
-
-    private List handlers = new ArrayList();
-
-    /**
-     * Adds a handler to the Iterator
-     * @param handler The handler to add
-     */
-    public void addHandler(IndexIteratorHandler handler) {
-        if (!this.handlers.contains(handler)) {
-            this.handlers.add(handler);
-        }
-    }
-
-    protected void handleFile(File file) {
-        for (Iterator i = this.handlers.iterator(); i.hasNext();) {
-            IndexIteratorHandler handler = (IndexIteratorHandler) i.next();
-            handler.handleFile(getReader(), file);
-        }
-    }
-
-    protected void handleStaleDocument(Term term) {
-        for (Iterator i = this.handlers.iterator(); i.hasNext();) {
-            IndexIteratorHandler handler = (IndexIteratorHandler) i.next();
-            handler.handleStaleDocument(getReader(), term);
-        }
-    }
-
-    protected void handleUnmodifiedDocument(Term term, File file) {
-        for (Iterator i = this.handlers.iterator(); i.hasNext();) {
-            IndexIteratorHandler handler = (IndexIteratorHandler) i.next();
-            handler.handleUnmodifiedDocument(getReader(), term, file);
-        }
-    }
-
-    protected void handleNewDocument(Term term, File file) {
-        for (Iterator i = this.handlers.iterator(); i.hasNext();) {
-            IndexIteratorHandler handler = (IndexIteratorHandler) i.next();
-            handler.handleNewDocument(getReader(), term, file);
-        }
-    }
-
-    private IndexReader reader;
-
-    protected IndexReader getReader() {
-        return this.reader;
-    }
-
-    /**
-     * Iterate over all files within directory
-     * @param dumpDirectory Directory over which to iterate
-     */
-    public void iterate(File dumpDirectory) {
-        log.info("Iterating files (" + dumpDirectory + ")");
-
-        try {
-            this.reader = IndexReader.open(getIndex());
-
-            TermEnum iterator = enumerateUIDs(getReader());
-
-	    // TODO: Should be configurable
-	    boolean sort = false;
-
-	    if (sort) {
-                File[] files = getFiles(dumpDirectory);
-
-                for (int i = 0; i < files.length; i++) {
-                    iterateFiles(iterator, files[i], dumpDirectory);
-                }
-            } else {
-                log.debug("Do not sort files ...");
-                traverse(iterator, dumpDirectory, dumpDirectory);
-            }
-
-            // iterate the rest of stale documents
-            while ((iterator.term() != null) && iterator.term().field().equals("uid")) {
-                handleStaleDocument(iterator.term());
-                iterator.next();
-            }
-
-            iterator.close();
-            this.reader.close();
-        } catch (IOException e) {
-            log.error(e);
-        }
-    }
-
-    /**
-     * Iterate over a file
-     * @param iterator The iterator to use
-     * @param file The file to iterate over
-     * @param dumpDirectory The dump directory to use
-     * @throws IOException if an IO error occurs
-     *
-     */
-    protected void iterateFiles(TermEnum iterator, File file, File dumpDirectory)
-        throws IOException {
-        String uid = createUID(file, dumpDirectory);
-        log.debug("-----------------------------------------------------");
-        log.debug("[file]  file uid: " + uid2url(uid));
-
-        handleFile(file);
-
-        // handle all terms with a smaller uid than the modified file and delete their documents
-        while (isStale(iterator.term(), uid)) {
-            log.debug("[stale] term uid: " + uid2url(iterator.term().text()));
-            handleStaleDocument(iterator.term());
-            iterator.next();
-        }
-
-        // handle un-modified file
-        if (hasEqualUID(iterator.term(), uid)) {
-            log.debug("[unmod] term uid: " + uid2url(iterator.term().text()));
-            handleUnmodifiedDocument(iterator.term(), file);
-            iterator.next();
-        }
-        // handle new file
-        else {
-            if (iterator.term() != null) {
-                log.debug("[new]   term uid: " + uid2url(iterator.term().text()));
-                handleNewDocument(iterator.term(), file);
-            }
-        }
-    }
-
-    /**
-     * Returns an term enumerator beginning with the first term that represents a UID field.
-     * @param _reader The reader to get the terms from
-     * @return The term enumerator
-     */
-    protected TermEnum enumerateUIDs(IndexReader _reader) {
-        TermEnum tEnum = null;
-
-        try {
-            tEnum = _reader.terms(new Term("uid", ""));
-        } catch (IOException e) {
-            log.error("Term enumeration failed: ", e);
-        }
-            
-        return tEnum;
-    }
-
-    /**
-     * Returns if the term is not null and decribes a UID field.
-     * @param term The term
-     * @return Whether the term is not null and describes a UID field
-     */
-    protected static boolean isUIDTerm(Term term) {
-        return (term != null) && term.field().equals("uid");
-    }
-
-    /**
-     * Returns <code>true</code> if the file described by uid has a bigger UID than the
-     * file described by the existing UID term.
-     * @param term The term
-     * @param uid The UID
-     * @return Whether the file has a bigger UID
-     */
-    protected static boolean isStale(Term term, String uid) {
-        return isUIDTerm(term) && (term.text().compareTo(uid) < 0);
-    }
-
-    /**
-     * Returns <code>true</code> if the file described by uid has the same UID as the
-     * file described by the existing UID term.
-     * @param term The term
-     * @param uid The UID
-     * @return Whether the file has the same UID
-     */
-    protected static boolean hasEqualUID(Term term, String uid) {
-        return isUIDTerm(term) && term.text().equals(uid);
-    }
-
-    /**
-     * Create a unique id
-     * @param file file to index
-     * @param dumpDir dump directory
-     * @return id
-     */
-    public static String createID(File file, File dumpDir) {
-        if (dumpDir.getPath().length() <= file.getPath().length()) {
-            String id = file.getPath().substring(dumpDir.getPath().length());
-            //id = id.replace(File.separatorChar, '\u0000'));
-            return id;
-        }
-        log.warn("Length of dumping directory is less than length of file name! Absolute path is being returned as id.");
-        return file.getAbsolutePath();
-    }
-
-    /**
-     * Append path and date into a string in such a way that lexicographic sorting gives the same
-     * results as a walk of the file hierarchy.  Thus null (\u0000) is used both to separate
-     * directory components and to separate the path from the date.
-     * @param file The file
-     * @param htdocsDumpDir The dump directory to use
-     * @return The processed string
-     */
-    public static String createUID(File file, File htdocsDumpDir) {
-        String requestURI = file.getPath().substring(htdocsDumpDir.getPath().length());
-        String uid = requestURI.replace(File.separatorChar, '\u0000') + "\u0000" +
-            DateField.timeToString(file.lastModified());
-
-        return uid;
-    }
-
-    /**
-     * Converts a UID to a URL string.
-     * @param uid The UID
-     * @return The converted UID
-     */
-    public static String uid2url(String uid) {
-        String url = uid.replace('\u0000', '/'); // replace nulls with slashes
-        String timeString = uid.substring(uid.lastIndexOf("\u0000") + 1);
-        Date date = DateField.stringToDate(timeString);
-        DateFormat format = new SimpleDateFormat("yyyy.MM.dd  HH:mm:ss");
-
-        return url.substring(0, url.lastIndexOf('/')) + " " + format.format(date);
-    }
-
-    /**
-     * Get Files and sorts by alphabet?
-     * @param dumpDirectory The dump directory to use
-     * @return The files
-     */
-    public File[] getFiles(File dumpDirectory) {
-        List files = new ArrayList();
-        collectFiles(dumpDirectory, files);
-        Collections.sort(files);
-
-        Map uidToFile = new HashMap();
-
-        String[] uids = new String[files.size()];
-
-        for (int i = 0; i < uids.length; i++) {
-            uids[i] = createUID((File) files.get(i), dumpDirectory);
-            uidToFile.put(uids[i], files.get(i));
-        }
-
-        Arrays.sort(uids);
-
-        File[] fileArray = new File[uids.length];
-
-        for (int i = 0; i < uids.length; i++) {
-            File file = (File) uidToFile.get(uids[i]);
-            log.debug(file);
-            fileArray[i] = file;
-        }
-
-        return fileArray;
-    }
-
-    /**
-     * Collect files into a list
-     * @param file The file to collect
-     * @param files The list to collect the file into
-     */
-    protected void collectFiles(File file, List files) {
-        if (file.isDirectory()) {
-            log.debug("Apply filter " + getFilter().getClass().getName() + " to: " + file);
-            File[] fileArray = file.listFiles(getFilter());
-
-            for (int i = 0; i < fileArray.length; i++) {
-                collectFiles(fileArray[i], files);
-            }
-        } else {
-            files.add(file);
-        }
-    }
-
-    /**
-     * Traverse directory
-     * @param iterator The iterator to use
-     * @param file The file to start from
-     * @param dumpDirectory The dump directory to use
-     * @throws IOException if an IO error occurs
-     */
-    protected void traverse(TermEnum iterator, File file, File dumpDirectory) throws IOException {
-        if (file.isDirectory()) {
-            log.debug("Apply filter " + getFilter().getClass().getName() + " to: " + file);
-            File[] fileArray = file.listFiles(getFilter());
-
-            for (int i = 0; i < fileArray.length; i++) {
-                traverse(iterator, fileArray[i], dumpDirectory);
-            }
-        } else {
-            log.debug(file);
-            iterateFiles(iterator, file, dumpDirectory);
-        }
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/index/IndexIteratorHandler.java b/src/java/org/apache/lenya/lucene/index/IndexIteratorHandler.java
deleted file mode 100644
index 0569389..0000000
--- a/src/java/org/apache/lenya/lucene/index/IndexIteratorHandler.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene.index;
-
-import java.io.File;
-
-import org.apache.lucene.index.IndexReader;
-import org.apache.lucene.index.Term;
-
-/**
- * Index Iterator interface
- */
-public interface IndexIteratorHandler {
-    /**
-     * Handles a file. This is called for every file and mainly used for creating a new index.
-     * @param reader The reader
-     * @param file The file
-     */
-    void handleFile(IndexReader reader, File file);
-
-    /**
-     * Handles a stale document.
-     * @param reader The reader
-     * @param term The term
-     */
-    void handleStaleDocument(IndexReader reader, Term term);
-
-    /**
-     * Handles an unmodified document and the file that represents it.
-     * @param reader The reader
-     * @param term The term
-     * @param file The file
-     */
-    void handleUnmodifiedDocument(IndexReader reader, Term term, File file);
-
-    /**
-     * Handles a new document and the file that represents it.
-     * @param reader The reader
-     * @param term The term
-     * @param file The file
-     */
-    void handleNewDocument(IndexReader reader, Term term, File file);
-}
diff --git a/src/java/org/apache/lenya/lucene/index/Indexer.java b/src/java/org/apache/lenya/lucene/index/Indexer.java
deleted file mode 100644
index 54f7076..0000000
--- a/src/java/org/apache/lenya/lucene/index/Indexer.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene.index;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.w3c.dom.Element;
-
-/**
- * The indexer interface
- */
-public interface Indexer {
-    /**
-     * Configures this indexer.
-     * @param _indexer The indexer
-     * @param _configFileName The name of the configuration file
-     * @throws IOException if an error occurs
-     */
-    void configure(Element _indexer, String _configFileName) throws IOException;
-
-    /**
-     * Indexes the contents of a directory.
-     * @param _dumpDirectory The dump directory to use
-     * @param _index The index to use
-     * @throws IOException if an error occurs
-     */
-    void createIndex(File _dumpDirectory, File _index) throws IOException;
-
-    /**
-     * Indexes the contents of a directory.
-     * @param _dumpDirectory The dump directory to use
-     * @param _index The index to use
-     * @throws IOException if an error occurs
-     */
-    void updateIndex(File _dumpDirectory, File _index) throws IOException;
-
-    /**
-     * Indexes the content of one file
-     * @param file The file to index
-     * @throws IOException if an error occurs
-     */
-    void indexDocument(File file) throws IOException;
-}
diff --git a/src/java/org/apache/lenya/lucene/index/configuration2xslt.xsl b/src/java/org/apache/lenya/lucene/index/configuration2xslt.xsl
deleted file mode 100644
index 0e1b61c..0000000
--- a/src/java/org/apache/lenya/lucene/index/configuration2xslt.xsl
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<!--
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
--->
-
-<xsl:stylesheet version="1.0"
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:xsl-out="http://apache.org/cocoon/lenya/alias"
-    xmlns:luc="http://apache.org/cocoon/lenya/lucene/1.0"
-    >
-
-<xsl:namespace-alias stylesheet-prefix="xsl-out" result-prefix="xsl"/>    
-<xsl:preserve-space elements="*"/>
-
-<xsl:output method="xml" indent="yes" encoding="ISO-8859-1" />
-    
-<xsl:template match="luc:document">
-  <xsl-out:stylesheet version="1.0">
-  
-    <xsl-out:param name="filename"/>
-    
-    <xsl:apply-templates select="luc:variable"/>
-  
-    <xsl-out:template match="/">
-      <luc:document>
-        <xsl-out:attribute name="filename"><xsl-out:value-of select="$filename"/></xsl-out:attribute>
-      
-        <xsl:for-each select="luc:field">
-          <luc:field name="{@name}" type="{@type}">
-            <xsl:for-each select="namespace">
-              <xsl:attribute name="{@prefix}:dummy" namespace="{.}"/>
-            </xsl:for-each>
-            <xsl:apply-templates select="@xpath"/>
-            <xsl:apply-templates/>
-            <!--<xsl:apply-templates select="xpath"/>-->
-          </luc:field>
-        </xsl:for-each>
-      
-      </luc:document>
-    </xsl-out:template>
-  
-  </xsl-out:stylesheet>
-</xsl:template>
-
-
-<xsl:template match="luc:variable">
-  <xsl-out:variable name="{@name}" select="{@value}"/>
-</xsl:template>
-
-
-<xsl:template match="@xpath">
-  <xsl-out:value-of select="{.}"/>
-</xsl:template>
-
-
-<xsl:template match="xpath">
-  <xsl-out:value-of select="{.}"/>
-  <xsl:if test="@default">
-    <xsl-out:if test="not({.})">
-      <xsl:value-of select="@default"/>
-    </xsl-out:if>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="text">
-  <xsl:value-of select="."/>
-</xsl:template>
-
-</xsl:stylesheet> 
diff --git a/src/java/org/apache/lenya/lucene/parser/AbstractHTMLParser.java b/src/java/org/apache/lenya/lucene/parser/AbstractHTMLParser.java
deleted file mode 100644
index a45a868..0000000
--- a/src/java/org/apache/lenya/lucene/parser/AbstractHTMLParser.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene.parser;
-
-import java.io.File;
-
-/**
- * Abstract base class for HTML parsers.
- */
-public abstract class AbstractHTMLParser implements HTMLParser {
-    /** Creates a new instance of AbstractHTMLParser */
-    public AbstractHTMLParser() {
-        // do nothing
-    }
-
-    /**
-     * Parses a file.
-     * @param _file The file
-     * @throws ParseException if an error occurs
-     */
-    public void parse(File _file) throws ParseException {
-        parse(_file.toURI());
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/parser/HTMLParser.java b/src/java/org/apache/lenya/lucene/parser/HTMLParser.java
deleted file mode 100644
index c0fb3db..0000000
--- a/src/java/org/apache/lenya/lucene/parser/HTMLParser.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene.parser;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.Reader;
-import java.net.URI;
-
-/**
- * HTMLParser interface
- */
-public interface HTMLParser {
-    /**
-     * Parse a file
-     * @param file The file
-     * @throws ParseException if a parser error occured
-     */
-    void parse(File file) throws ParseException;
-
-    /**
-     * Parse a URI
-     * @param uri The URI
-     * @throws ParseException if a parser error occured
-     */
-    void parse(URI uri) throws ParseException;
-
-    /**
-     * Returns the title of the HTML document.
-     * @return The title
-     * @throws IOException if an IO error occurs
-     */
-    String getTitle() throws IOException;
-
-    /**
-     * Returns keywords
-     * @return The keywords
-     * @throws IOException if an IO error occurs
-     */
-    String getKeywords() throws IOException;
-
-    /**
-     * Returns a reader that reads the contents of the HTML document.
-     * @return The reader
-     * @throws IOException if an IO error occurs
-     */
-    Reader getReader() throws IOException;
-}
diff --git a/src/java/org/apache/lenya/lucene/parser/HTMLParserFactory.java b/src/java/org/apache/lenya/lucene/parser/HTMLParserFactory.java
deleted file mode 100644
index 3cf7d54..0000000
--- a/src/java/org/apache/lenya/lucene/parser/HTMLParserFactory.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene.parser;
-
-import java.io.File;
-
-import org.apache.log4j.Logger;
-
-/**
- * Factory to create HTML parsers that are used for indexing HTML.
- */
-public class HTMLParserFactory {
-    
-   static private final Logger log = Logger.getLogger(HTMLParserFactory.class);
-    
-    /**
-     * Returns an HTMLParser.
-     * @param file The file
-     * @return The HTMLParser
-     */
-    public static HTMLParser newInstance(File file) {
-        HTMLParser parser = null;
-
-        // HTML files
-        if (file.getName().endsWith(".html")) {
-            parser = new SwingHTMLParser();
-        }
-        // PDF files
-        else if (file.getName().endsWith(".txt")) {
-            parser = new PDFParserWrapper();
-        } else {
-            parser = new SwingHTMLParser();
-            log.debug(".newInstance(): WARNING: Suffix did no match (" + file.getName()  + "). SwingHTMLParser as default parser selected!");
-        }
-
-        log.debug("returning a " + parser.getClass().getName() + " for " + file.getName());
-
-        return parser;
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/parser/PDFParserWrapper.java b/src/java/org/apache/lenya/lucene/parser/PDFParserWrapper.java
deleted file mode 100644
index 9d68181..0000000
--- a/src/java/org/apache/lenya/lucene/parser/PDFParserWrapper.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene.parser;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URLConnection;
-
-/**
- * PDF Parser Wrapper
- */
-public class PDFParserWrapper extends AbstractHTMLParser {
-    /** Creates a new instance of PDFParserWrapper */
-    public PDFParserWrapper() {
-        // do nothing
-    }
-
-    /** Returns a reader that reads the contents of the HTML document.
-     * @return The reader
-     * @throws IOException if an IO error occurs
-     */
-    public Reader getReader() throws IOException {
-        return getParser().getReader();
-    }
-
-    /** Returns the title of the HTML document.
-     * @return The title
-     * @throws IOException if an IO error occurs
-     */
-    public String getTitle() throws IOException {
-        try {
-            return getParser().getTitle();
-        } catch (InterruptedException e) {
-            throw new IOException(e.getMessage());
-        }
-    }
-
-    /** Returns the keywords of the HTML document.
-     * @return The keywords
-     * @throws IOException if an IO error occurs
-     */
-    public String getKeywords() throws IOException {
-        try {
-            return getParser().getKeywords();
-        } catch (InterruptedException e) {
-            throw new IOException(e.getMessage());
-        }
-    }
-
-    org.apache.lenya.lucene.html.HTMLParser parser;
-
-    protected org.apache.lenya.lucene.html.HTMLParser getParser() {
-        return this.parser;
-    }
-
-    /**
-     * Parse a file
-     * @param file The File
-     * @throws ParseException if a parser error occurs
-     */
-    public void parse(File file) throws ParseException {
-        try {
-            this.parser = new org.apache.lenya.lucene.html.HTMLParser(file);
-        } catch (FileNotFoundException e) {
-            throw new ParseException(e);
-        }
-    }
-
-    /**
-     * Parse a URL
-     * @param uri The URL
-     * @throws ParseException if a parser error occurs
-     */
-    public void parse(URI uri) throws ParseException {
-        try {
-            URLConnection connection = uri.toURL().openConnection();
-            Reader reader = new InputStreamReader(connection.getInputStream());
-            this.parser = new org.apache.lenya.lucene.html.HTMLParser(reader);
-        } catch (MalformedURLException e) {
-            throw new ParseException(e);
-        } catch (IOException e) {
-            throw new ParseException(e);
-        }
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/parser/ParseException.java b/src/java/org/apache/lenya/lucene/parser/ParseException.java
deleted file mode 100644
index dcc92bb..0000000
--- a/src/java/org/apache/lenya/lucene/parser/ParseException.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene.parser;
-
-/**
- * Parse exception
- */
-public class ParseException extends Exception {
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/** Creates a new instance of ParseException */
-    public ParseException() {
-        // do nothing
-    }
-
-    /**
-     * Creates a new ParseException object.
-     * @param message the error message
-     * @param cause the cause of the exception
-     */
-    public ParseException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    /**
-     * Creates a new ParseException object.
-     * @param message the error message
-     */
-    public ParseException(String message) {
-        super(message);
-    }
-
-    /**
-     * Creates a new ParseException object.
-     * @param cause the cause of the exception
-     */
-    public ParseException(Throwable cause) {
-        super(cause);
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/parser/PreParser.java b/src/java/org/apache/lenya/lucene/parser/PreParser.java
deleted file mode 100644
index aeebda1..0000000
--- a/src/java/org/apache/lenya/lucene/parser/PreParser.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene.parser;
-
-import java.io.IOException;
-import java.io.Reader;
-import java.io.StringReader;
-
-import org.apache.log4j.Logger;
-
-/**
- * The Java HTML parser cannot handle self-closing text.
- * This class converts all "/>" strings to ">" to avoid this problem.
- */
-public class PreParser {
-    
-    private static Logger log = Logger.getLogger(PreParser.class);
-    
-    /** Creates a new instance of PreParser */
-    public PreParser() {
-        log.debug("creating new object");
-    }
-
-    /**
-     * Parses HTML from a reader.
-     * @param reader The reader
-     * @return The Reader
-     * @throws IOException if an IO error occurs
-     */
-    public Reader parse(Reader reader) throws IOException {
-        StringBuffer buffer = new StringBuffer();
-
-        char[] chars = new char[1];
-
-        while (reader.read(chars) != -1) {
-            int lastPosition = buffer.length() - 1;
-
-            if ((chars[0] == '>') && (buffer.charAt(lastPosition) == '/')) {
-                buffer.deleteCharAt(lastPosition);
-            }
-
-            buffer.append(chars[0]);
-        }
-
-        return new StringReader(buffer.toString());
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/parser/StringCleaner.java b/src/java/org/apache/lenya/lucene/parser/StringCleaner.java
deleted file mode 100644
index 2bec059..0000000
--- a/src/java/org/apache/lenya/lucene/parser/StringCleaner.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene.parser;
-
-
-/**
- * A utility class to convert a string to text that can be included in an XML file.
- */
-public class StringCleaner {
-    /** Creates a new instance of StringCleaner */
-    public StringCleaner() {
-        // do nothing
-    }
-
-    /**
-     * Remove all non-word characters from a string.
-     * @param source The string to remove characters from
-     * @return The cleaned string
-     */
-    public static String clean(String source) {
-        String result = "<![CDATA[" + source + "]]>";
-        return result;
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/parser/SwingHTMLHandler.java b/src/java/org/apache/lenya/lucene/parser/SwingHTMLHandler.java
deleted file mode 100644
index e158421..0000000
--- a/src/java/org/apache/lenya/lucene/parser/SwingHTMLHandler.java
+++ /dev/null
@@ -1,504 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene.parser;
-
-import java.io.Reader;
-import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-
-import javax.swing.text.MutableAttributeSet;
-import javax.swing.text.html.HTML;
-import javax.swing.text.html.HTML.Tag;
-import javax.swing.text.html.HTMLEditorKit.ParserCallback;
-
-import org.apache.log4j.Logger;
-
-/**
- *
- */
-public class SwingHTMLHandler extends ParserCallback {
-    private static final Logger log = Logger.getLogger(SwingHTMLHandler.class);
-
-    /** 
-     * Creates a new instance of SwingHTMLHandler
-     */
-    public SwingHTMLHandler() {
-        debug("\n\n\n\n\nCreating " + getClass().getName());
-
-        // index everything by default
-        startIndexing();
-    }
-
-    private TagStack tagStack = new TagStack();
-
-    protected TagStack getStack() {
-        return this.tagStack;
-    }
-
-    private StringBuffer titleBuffer = new StringBuffer();
-    private StringBuffer keywordsBuffer = new StringBuffer();
-
-    /**
-     * @param data Data to append to the title
-     *
-     */
-    protected void appendToTitle(char[] data) {
-        this.titleBuffer.append(data);
-    }
-
-    /**
-     * Get title
-     *
-     * @return The title of the HTML document
-     */
-    public String getTitle() {
-        debug("\n\nTitle: " + this.titleBuffer.toString());
-
-        return this.titleBuffer.toString();
-    }
-
-    /**
-     * Get keywords
-     *
-     * @return The keywords of the HTML document
-     */
-    public String getKeywords() {
-        log.debug("Keywords: " + this.keywordsBuffer.toString());
-
-        return this.keywordsBuffer.toString();
-    }
-
-    private StringBuffer contentsBuffer = new StringBuffer();
-
-    protected void appendToContents(char[] data) {
-        this.contentsBuffer.append(data);
-    }
-
-    /**
-     * Obtain the reader
-     *
-     * @return The reader
-     */
-    public Reader getReader() {
-        debug("\nContents: " + this.contentsBuffer.toString());
-
-        return new StringReader(this.contentsBuffer.toString());
-    }
-
-    private boolean indexing;
-
-    protected boolean isIndexing() {
-        return this.indexing;
-    }
-
-    protected void startIndexing() {
-        this.indexing = true;
-    }
-
-    protected void stopIndexing() {
-        this.indexing = false;
-    }
-
-    //-------------------------------------------------------------------------
-    // Tag handling
-    //-------------------------------------------------------------------------
-
-    /**
-     * Handles a start tag.
-     * @param tag The start tag
-     * @param attributes The attributes
-     * @param pos The position
-     */
-    public void handleStartTag(Tag tag, MutableAttributeSet attributes, int pos) {
-        getStack().push(tag);
-
-        // append whitespace
-        if (!this.contentsBuffer.toString().endsWith(" ")) {
-            this.contentsBuffer.append(" ");
-        }
-
-        if (tag.equals(HTML.Tag.META)) {
-            handleMetaTag(attributes);
-        }
-
-        if (tag.equals(HTML.Tag.TITLE)) {
-            handleTitleStartTag();
-        }
-
-        if (isTagInitialized() && tag.equals(getLuceneTag())) {
-            handleLuceneStartTag(tag, attributes);
-        }
-    }
-
-    /**
-     * Handles an end tag.
-     * @param tag The end tag
-     * @param pos The position
-     */
-    public void handleEndTag(Tag tag, int pos) {
-        // append whitespace
-        if (!this.contentsBuffer.toString().endsWith(" ")) {
-            this.contentsBuffer.append(" ");
-        }
-
-        if (isTagInitialized() && tag.equals(getLuceneTag())) {
-            handleLuceneEndTag();
-        }
-
-        if (tag.equals(HTML.Tag.TITLE)) {
-            handleTitleEndTag();
-        }
-
-        try {
-            getStack().pop();
-        } catch (TagStack.UnderflowException e) {
-            log(e);
-        }
-    }
-
-    //-------------------------------------------------------------------------
-    // Title
-    //-------------------------------------------------------------------------
-    private boolean titleParsing;
-
-    protected boolean isTitleParsing() {
-        return this.titleParsing;
-    }
-
-    protected void startTitleParsing() {
-        this.titleParsing = true;
-    }
-
-    protected void stopTitleParsing() {
-        this.titleParsing = false;
-    }
-
-    protected void handleTitleStartTag() {
-        startTitleParsing();
-    }
-
-    protected void handleTitleEndTag() {
-        stopTitleParsing();
-    }
-
-    //-------------------------------------------------------------------------
-    // Lucene metag tags
-    //-------------------------------------------------------------------------
-    /**
-     * <code>LUCENE_TAG_NAME</code> The Lucene tag name
-     */
-    public static final String LUCENE_TAG_NAME = "lucene-tag-name";
-    /**
-     * <code>LUCENE_CLASS_VALUE</code> The Lucene class value
-     */
-    public static final String LUCENE_CLASS_VALUE = "lucene-class-value";
-    private HTML.Tag luceneTag = null;
-
-    /**
-     * Sets the tag name used to avoid indexing.
-     * @param tag The tag
-     */
-    protected void setLuceneTag(HTML.Tag tag) {
-        debug("Lucene tag:         " + tag);
-        this.luceneTag = tag;
-    }
-
-    /**
-     * Returns the tag name used to avoid indexing.
-     * @return Tag name used to avoid indexing
-     */
-    protected HTML.Tag getLuceneTag() {
-        return this.luceneTag;
-    }
-
-    private String luceneClassValue = null;
-
-    /**
-     * Sets the value for the <code>class</code> attribute used to avoid indexing.
-     * @param value
-     */
-    protected void setLuceneClassValue(String value) {
-        debug("Lucene class value: " + value);
-        this.luceneClassValue = value;
-    }
-
-    /**
-     * Returns the value for the <code>class</code> attribute used to avoid indexing.
-     * @return The value
-     */
-    protected String getLuceneClassValue() {
-        return this.luceneClassValue;
-    }
-
-    /**
-     * Returns if the Lucene META tags are provided.
-     * @return Whether the Lucene Meta tags are provided
-     */
-    protected boolean isTagInitialized() {
-        return (getLuceneTag() != null) && (getLuceneClassValue() != null);
-    }
-
-    /**
-     * Handles a META tag. This method checks for the Lucene configuration tags.
-     * @param attributes The attributes
-     */
-    protected void handleMetaTag(MutableAttributeSet attributes) {
-        Object nameObject = attributes.getAttribute(HTML.Attribute.NAME);
-        Object valueObject = attributes.getAttribute(HTML.Attribute.VALUE);
-
-        if ((nameObject != null) && (valueObject != null)) {
-            String name = (String) nameObject;
-            log.debug("Meta tag found: name = " + name);
-
-            if (name.equals(LUCENE_TAG_NAME)) {
-                String tagName = (String) valueObject;
-                HTML.Tag tag = HTML.getTag(tagName.toLowerCase(Locale.ENGLISH));
-                setLuceneTag(tag);
-            }
-
-            if (name.equals(LUCENE_CLASS_VALUE)) {
-                setLuceneClassValue((String) valueObject);
-            }
-        }
-
-        Object contentObject = attributes.getAttribute(HTML.Attribute.CONTENT);
-        if ((nameObject != null) && (contentObject != null)) {
-            String name = (String) nameObject;
-            log.debug("Meta tag found: name = " + name);
-            if (name.equals("keywords")) {
-                log.debug("Keywords found ...");
-                this.keywordsBuffer = new StringBuffer((String) contentObject);
-            }
-        }
-
-        // do not index everything if tags are provided
-        if (isTagInitialized()) {
-            stopIndexing();
-        }
-    }
-
-    //-------------------------------------------------------------------------
-    // Lucene index control tags
-    //-------------------------------------------------------------------------
-    private TagStack luceneStack = new TagStack();
-
-    protected TagStack getLuceneStack() {
-        return this.luceneStack;
-    }
-
-    /**
-     * Handles a Lucene index control start tag.
-     * @param tag The start tag
-     * @param attributes The attributes
-     */
-    protected void handleLuceneStartTag(HTML.Tag tag, MutableAttributeSet attributes) {
-        Object valueObject = attributes.getAttribute(HTML.Attribute.CLASS);
-
-        if (valueObject != null) {
-            String value = (String) valueObject;
-
-            if (value.equals(getLuceneClassValue())) {
-                getLuceneStack().push(tag);
-                debug("");
-                debug("---------- Starting indexing ----------");
-                startIndexing();
-            }
-        }
-    }
-
-    /**
-     * Handles a Lucene index control end tag.
-     */
-    protected void handleLuceneEndTag() {
-        try {
-            HTML.Tag stackTag = getStack().top();
-
-            if (!getLuceneStack().isEmpty()) {
-                HTML.Tag _luceneTag = getLuceneStack().top();
-
-                if (stackTag == _luceneTag) {
-                    debug("");
-                    debug("---------- Stopping indexing ----------");
-                    getLuceneStack().pop();
-                    stopIndexing();
-                }
-            }
-        } catch (TagStack.UnderflowException e) {
-            log("Lucene index control tag not closed!", e);
-        }
-    }
-
-    /**
-     * Handles an end tag.
-     * @param tag The end tag
-     * @param attributes The attributes
-     * @param pos The position
-     */
-    public void handleSimpleTag(Tag tag, MutableAttributeSet attributes, int pos) {
-        handleStartTag(tag, attributes, pos);
-        handleEndTag(tag, pos);
-    }
-
-    /**
-     * @see javax.swing.text.html.HTMLEditorKit.ParserCallback#handleText(char[], int)
-     */
-    public void handleText(char[] data, int pos) {
-        if (this.isDebug) {
-            System.out.println(".handleText(): data: " + new String(data));
-        }
-
-        /*
-                if (data[0] == '>') {
-                   throw new IllegalStateException();
-                   }
-        */
-        if (isIndexing() || isTitleParsing()) {
-            appendToContents(data);
-        }
-
-        if (isTitleParsing()) {
-            appendToTitle(data);
-        }
-    }
-
-    //-------------------------------------------------------------------------
-    // Logging
-    //-------------------------------------------------------------------------
-    private boolean isDebug = false;
-
-    /**
-     * Logs a message.
-     * @param message The debug message
-     */
-    protected void debug(String message) {
-        if (this.isDebug) {
-            System.out.println(message);
-        }
-    }
-
-    /**
-     * Logs an exception.
-     * @param e The exception
-     */
-    protected void log(Exception e) {
-        log("", e);
-    }
-
-    /**
-     * Logs an exception with a message.
-     * @param message The message
-     * @param e The exception
-     */
-    protected void log(String message, Exception e) {
-        System.out.print(getClass().getName() + ": " + message + " ");
-        e.printStackTrace(System.out);
-    }
-
-    /**
-     * Constructor
-     */
-    public class TagStack {
-        private List tags = new ArrayList();
-
-        /**
-         * Push tag on the tag stack
-         *
-         * @param tag The tag
-         */
-        public void push(HTML.Tag tag) {
-            this.tags.add(0, tag);
-        }
-
-        /**
-         * Pop tag from the tag stack
-         *
-         * @return Tag
-         *
-         * @throws UnderflowException if there are no more elements on the stack
-         */
-        public HTML.Tag pop() throws UnderflowException {
-            HTML.Tag tag = top();
-            this.tags.remove(tag);
-
-            return tag;
-        }
-
-        /**
-         * Returns the top tag on the tag stack
-         *
-         * @return The top element
-         *
-         * @throws UnderflowException If there are no tags on the tag stack
-         */
-        public HTML.Tag top() throws UnderflowException {
-            HTML.Tag tag = null;
-
-            if (!this.tags.isEmpty()) {
-                tag = (HTML.Tag) this.tags.get(0);
-            } else {
-                throw new UnderflowException();
-            }
-
-            return tag;
-        }
-
-        /**
-         * Checks if the tag stack is empty
-         *
-         * @return A boolean
-         */
-        public boolean isEmpty() {
-            return this.tags.isEmpty();
-        }
-
-        /**
-         * Prints out all elements of the tag stack
-         */
-        public void dump() {
-            System.out.print("stack: ");
-
-            for (Iterator i = this.tags.iterator(); i.hasNext();) {
-                System.out.print(i.next() + ", ");
-            }
-
-            System.out.println("");
-        }
-
-        /**
-         * The Underflow exception class
-         */
-        public class UnderflowException extends Exception {
-            /**
-			 * 
-			 */
-			private static final long serialVersionUID = 1L;
-
-			/**
-             * Creates a new UnderflowException object.
-             */
-            public UnderflowException() {
-                super("Stack underflow");
-            }
-        }
-    }
-}
diff --git a/src/java/org/apache/lenya/lucene/parser/SwingHTMLParser.java b/src/java/org/apache/lenya/lucene/parser/SwingHTMLParser.java
deleted file mode 100644
index b8bff62..0000000
--- a/src/java/org/apache/lenya/lucene/parser/SwingHTMLParser.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.lucene.parser;
-
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URLConnection;
-
-import javax.swing.text.html.parser.ParserDelegator;
-
-/**
- * The Swing HTML parser
- */
-public class SwingHTMLParser extends AbstractHTMLParser {
-    /** Creates a new instance of SwingHTMLParser */
-    public SwingHTMLParser() {
-        // do nothing
-    }
-
-    /**
-     * Parses a URI.
-     * @param uri The URI to parse
-     * @throws ParseException if an error occurs
-     */
-    public void parse(URI uri) throws ParseException {
-        try {
-            ParserDelegator delegator = new ParserDelegator();
-            this.handler = new SwingHTMLHandler();
-
-            Reader _reader = new PreParser().parse(getReader(uri));
-            delegator.parse(_reader, this.handler, true);
-        } catch (IOException e) {
-            throw new ParseException(e);
-        }
-    }
-
-    private SwingHTMLHandler handler;
-
-    protected SwingHTMLHandler getHandler() {
-        return this.handler;
-    }
-
-    /**
-     * Get title
-     * @return The title
-     */
-    public String getTitle() {
-        return getHandler().getTitle();
-    }
-
-    /**
-     * Get keywords
-     * @return The keywords
-     */
-    public String getKeywords() {
-        return getHandler().getKeywords();
-    }
-
-    /**
-     * Returns the reader
-     * @return The reader
-     */
-    public Reader getReader() {
-        return getHandler().getReader();
-    }
-
-    protected Reader getReader(URI uri) throws IOException, MalformedURLException {
-        if (uri.toString().startsWith("http:")) {
-            // uri is url
-            URLConnection connection = uri.toURL().openConnection();
-
-            return new InputStreamReader(connection.getInputStream());
-        }
-        // uri is file
-        return new FileReader(new File(uri));
-    }
-}
diff --git a/src/java/org/apache/lenya/net/InetAddressUtil.java b/src/java/org/apache/lenya/net/InetAddressUtil.java
deleted file mode 100644
index 8c25905..0000000
--- a/src/java/org/apache/lenya/net/InetAddressUtil.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.net;
-
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-
-import org.apache.log4j.Logger;
-
-/**
- * A utility class for InetAddress. Also see http://jodies.de/ipcalc
- */
-public class InetAddressUtil {
-
-    private static final Logger log = Logger.getLogger(InetAddressUtil.class);
-
-    /**
-     * Ctor.
-     */
-    private InetAddressUtil() {
-        // do nothing
-    }
-
-    /**
-     * Checks if a subnet contains a specific IP address.
-     * @param network The network address.
-     * @param netmask The subnet mask.
-     * @param ip The IP address to check.
-     * @return A boolean value.
-     */
-    public static boolean contains(InetAddress network, InetAddress netmask, InetAddress ip) {
-        if(log.isDebugEnabled()) {
-            log.debug("=======================================");
-            log.debug("Checking IP address: " + ip + " in " + network + " / " + netmask);
-        }
-        
-        byte[] networkBytes = network.getAddress();
-        byte[] netmaskBytes = netmask.getAddress();
-        byte[] ipBytes = ip.getAddress();
-        
-        /* check IPv4/v6-compatibility or parameters: */
-        if(networkBytes.length != netmaskBytes.length
-            || netmaskBytes.length != ipBytes.length)
-        {
-            /*
-             * FIXME: If network and netmask have the same size
-             * should already be checked whenever
-             * org.apache.lenya.ac.(impl.Abstract)IPRange
-             * is set. In that case the user should be notified
-             * of this configuration-error instead of silently
-             * accepting the buggy IPRange as one not matching
-             * any host!
-             * (Note that changes to the public API of IPRange
-             * and other classes would be necessary to fix this
-             * problem. This method and therefore this whole
-             * class would probably be obsolete in that case.)
-             */
-            if(log.isDebugEnabled()) {
-                log.debug
-                    ("Network address " + network + ", subnet mask "
-                     + netmask + " and/or host address " + ip
-                     + " have different sizes! (return false ...)");
-                log.debug("=======================================");
-            }
-            return false;
-        }
-        
-        /* Check if the masked network and ip addresses match: */
-        for(int i=0; i<netmaskBytes.length; i++) {
-            int mask = netmaskBytes[i] & 0xff;
-            if((networkBytes[i] & mask) != (ipBytes[i] & mask)) {
-                if(log.isDebugEnabled()) {
-                    log.debug
-                        (ip + " is not in " + network + " / " + netmask);
-                    log.debug("=======================================");
-                }
-                return false;
-            }
-        }
-        if(log.isDebugEnabled()) {
-            log.debug
-                (ip + " is in " + network + " / " + netmask);
-            log.debug("=======================================");
-        }
-        return true;
-    }
-
-    /**
-     * Returns the n-th part of an InetAddress.
-     * @param ip The address.
-     * @param partNumber The number of the part.
-     * @return An integer value.
-     * @deprecated This was an internal implementation detail of the
-     *      method {@link #contains} and should never have been
-     *      made public. (And it's inefficient and unnecessary
-     *      too, as well as broken for IPv6. ;-)
-     *      Use <code>ip.getAddress()[partNumber]</code>
-     *      instead.
-     */
-    public static int getClassPart(InetAddress ip, int partNumber) {
-        String[] parts = ip.getHostAddress().split("\\.");
-        String part = parts[partNumber];
-        return new Integer(part).intValue();
-    }
-
-    /**
-     * Check netmask, e.g. 255.255.255.240 is fine, 255.255.240.16 is illegal (needs to be 255.255.240.0)
-     * @param netmask The netmask address.
-     * @return An integer value. -1 if illegal netmask, otherwise 0, 1, 2, 3
-     * @deprecated This was an internal implementation detail of the
-     *      method {@link #contains} and should never have been
-     *      made public. Furthermore it's broken for IPv6.
-     *      (However, there is no real replacement. If you
-     *      need this functionality, you should rewrite it
-     *      yourself.)
-     */
-    public static int checkNetmask(InetAddress netmask) {
-        String[] parts = netmask.getHostAddress().split("\\.");
-        Integer[] numbers = new Integer[4];
-        for (int i = 0; i < 4; i++) {
-            numbers[i] = new Integer(parts[i]);
-        }
-
-        for (int i = 0; i < 4; i++) {
-            log.debug(".checkNetmask(): Check part: " + numbers[i]);
-            if (0 <= numbers[i].intValue() && numbers[i].intValue() <= 255) {
-                if (numbers[i].intValue() != 255) {
-                    for (int k = i + 1; k < 4; k++) {
-                        if (numbers[k].intValue() != 0) {
-                            log.error(".checkNetmask(): Illegal Netmask: " + netmask);
-                            return -1;
-                        }
-                    }
-                    return i;
-                }
-                continue;
-            }
-            // FIXME: This check not really be necessary because java.net.UnknownHostException should be thrown long time before
-            log.error(".checkNetmask(): Illegal Netmask: " + netmask);
-            return -1;
-        }
-        if (log.isDebugEnabled()) {
-            log.debug("All parts equal 255: " + netmask);
-        }
-        return 3;
-    }
-
-    /**
-     * Converts a string to an IP addres.
-     * @param string The IP address, represented by a string.
-     * @return An InetAddress object.
-     * @throws UnknownHostException
-     * @deprecated This was an internal implementation detail of the
-     *      method {@link #contains} and should never have been
-     *      made public. (And it's unnecessary
-     *      too, as well as broken for IPv6. ;-)
-     *      Use <code>InetAddress.getByName(string)</code>
-     *      instead.
-     */
-    public static InetAddress getAddress(String string) throws UnknownHostException {
-        String[] strings = string.split("\\.");
-
-        InetAddress address;
-        byte[] numbers = new byte[strings.length];
-        for (int i = 0; i < strings.length; i++) {
-            int number = Integer.parseInt(strings[i]);
-            if (number > 127) {
-                number = number - 256;
-            }
-            numbers[i] = (byte) number;
-        }
-
-        address = InetAddress.getByAddress(numbers);
-        return address;
-    }
-
-}
diff --git a/src/java/org/apache/lenya/search/Grep.java b/src/java/org/apache/lenya/search/Grep.java
deleted file mode 100644
index 82d49ce..0000000
--- a/src/java/org/apache/lenya/search/Grep.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.search;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.nio.CharBuffer;
-import java.nio.MappedByteBuffer;
-import java.nio.channels.FileChannel;
-import java.nio.charset.CharacterCodingException;
-import java.nio.charset.Charset;
-import java.nio.charset.CharsetDecoder;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.log4j.Logger;
-
-/**
- * Utility class to provide a subset of the grep functionality. 
- */
-public class Grep {
-    private static final Logger log = Logger.getLogger(Grep.class);
-
-    private static Charset charset = Charset.forName("UTF-8");
-    private static CharsetDecoder decoder = charset.newDecoder();
-
-    /**
-     * Check if the given file contains the pattern
-     * @param file the file which is to be searched for the pattern
-     * @param pattern the pattern that is being searched.
-     * @return true if the file contains the string, false otherwise.
-     * @throws IOException
-     */
-    public static boolean containsPattern(File file, Pattern pattern) throws IOException {
-
-        FileChannel fc = null;
-		// Open the file and then get a channel from the stream
-        FileInputStream fis = null;
-		boolean result = false;
-
-		try {
-			fis = new FileInputStream(file);
-			fc = fis.getChannel();
-
-			// Get the file's size and then map it into memory
-			int sz = (int)fc.size();
-			MappedByteBuffer bb = fc.map(FileChannel.MapMode.READ_ONLY, 0, sz);
-
-			// Decode the file into a char buffer
-			CharBuffer cb = decoder.decode(bb);
-
-			// Perform the search
-			Matcher pm = pattern.matcher(cb); // Pattern matcher
-
-			result = pm.find();
-		} catch (FileNotFoundException e) {
-			log.error("File not found: " +e.toString());
-		} catch (CharacterCodingException e) {
-			log.error("Problem with encoding: " +e.toString());
-		} catch (IOException e) {
-			log.error("IO Exception: " +e.toString());
-		} finally {
-	        // Close the channel and the stream
-	        if (fc != null)
-	            fc.close();
-	        if (fis != null)
-	            fis.close();
-		}
-        return result;
-    }
-
-    /**
-     * Find all occurences of pattern in a file.
-     * @param file the file to search for occurences of pattern
-     * @param pattern the pattern to search for
-     * @param group which group in the pattern to return
-     * @return an <code>array</code> of occurences of pattern 
-     * (i.e. the groupth group of the match)
-     * @throws IOException if the file could not be read.
-     */
-    public static String[] findPattern(File file, Pattern pattern, int group) throws IOException {
-
-        ArrayList occurences = new ArrayList();
-        FileInputStream fis = null;
-        FileChannel fc = null;
-
-        try {
-            // Open the file and then get a channel from the stream
-            fis = new FileInputStream(file);
-            fc = fis.getChannel();
-
-            // Get the file's size and then map it into memory
-            int sz = (int)fc.size();
-            MappedByteBuffer bb = fc.map(FileChannel.MapMode.READ_ONLY, 0, sz);
-
-            // Decode the file into a char buffer
-            CharBuffer cb = decoder.decode(bb);
-
-            // Perform the search
-            Matcher pm = pattern.matcher(cb); // Pattern matcher
-
-            while (pm.find()) {
-                occurences.add(pm.group(group));
-            }
-        } catch (FileNotFoundException e) {
-            log.error("file not found " +e.toString());
-        } catch (CharacterCodingException e) {
-            log.error("encoding problem " +e.toString());
-        } catch (IOException e) {
-            log.error("IO exception" +e.toString());
-        } finally {
-	        // Close the channel and the stream
-	        if (fc != null)
-	            fc.close();
-	        if (fis != null)
-	            fis.close();
-        }
-        return (String[])occurences.toArray(new String[occurences.size()]);
-
-    }
-
-    /**
-     * Find all files below the given file which contain the given pattern.
-     * @param file the file where to start the search for the pattern.
-     * @param pattern the pattern to search for.
-     * @return an array of files which contain the pattern
-     * @throws IOException if any of the files could not be opened.
-     */
-    private static List find_internal(File file, Pattern pattern) throws IOException {
-        ArrayList fileList = new ArrayList();
-
-        if (file.isDirectory()) {
-            String[] children = file.list();
-            for (int i = 0; i < children.length; i++) {
-                fileList.addAll(
-                    find_internal(
-                        new File(file.getAbsolutePath(), children[i]),
-                        pattern));
-            }
-        } else if (file.isFile() && containsPattern(file, pattern)) {
-            fileList.add(file);
-        }
-        return fileList;
-    }
-
-    /**
-     * Find all files below the given file which contain the given search string.
-     * 
-     * @param file the where to start the search
-     * @param searchString the string to search for.
-     * 
-     * @return an array of files which contain the search string.
-     * 
-     * @throws IOException if any of the files could not be opened.
-     */
-    public static File[] find(File file, String searchString) throws IOException {
-        Pattern pattern = Pattern.compile(searchString);
-        List fileList = find_internal(file, pattern);
-        return (File[])fileList.toArray(new File[fileList.size()]);
-    }
-}
diff --git a/src/java/org/apache/lenya/search/crawler/ContentHandler.java b/src/java/org/apache/lenya/search/crawler/ContentHandler.java
deleted file mode 100644
index d61a91e..0000000
--- a/src/java/org/apache/lenya/search/crawler/ContentHandler.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.search.crawler;
-
-import java.io.InputStream;
-import java.util.List;
-
-
-/**
- * Content handler interface
- */
-public interface ContentHandler {
-    /**
-     * Return author
-     * @return The author
-     */
-    String getAuthor();
-
-    /**
-     * Return categories (from META tags)
-     * @return The categories
-     */
-    String getCategories();
-
-    /**
-     * Return contents
-     * @return The contents
-     */
-    String getContents();
-
-    /**
-     * Return description (from META tags)
-     * @return The description
-     */
-    String getDescription();
-
-    /**
-     * Return META HREF
-     * @return The META HREF
-     */
-    String getHREF();
-
-    /**
-     * Return keywords (from META tags)
-     * @return The keywords
-     */
-    String getKeywords();
-
-    /**
-     * Return links
-     * @return The links
-     */
-    List getLinks();
-
-    /**
-     * Return published date (from META tag)
-     * @return The published date
-     */
-    long getPublished();
-
-    /**
-     * Return Robot follow (from META tags)
-     * @return The robot follow
-     */
-    boolean getRobotFollow();
-
-    /**
-     * Return Robot index (from META tags)
-     * @return The robot index
-     */
-    boolean getRobotIndex();
-
-    /**
-     * Return page title
-     * @return The title
-     */
-    String getTitle();
-
-    /**
-     * Parse Content.
-     * @param in The Stream
-     */
-    void parse(InputStream in);
-}
diff --git a/src/java/org/apache/lenya/search/crawler/HTMLHandler.java b/src/java/org/apache/lenya/search/crawler/HTMLHandler.java
deleted file mode 100644
index 0721159..0000000
--- a/src/java/org/apache/lenya/search/crawler/HTMLHandler.java
+++ /dev/null
@@ -1,362 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.search.crawler;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Locale;
-
-import javax.swing.text.MutableAttributeSet;
-import javax.swing.text.html.HTML;
-import javax.swing.text.html.HTML.Tag;
-import javax.swing.text.html.HTMLEditorKit.ParserCallback;
-import javax.swing.text.html.parser.ParserDelegator;
-
-
-/**
- * The HTML handler
- */
-public final class HTMLHandler extends ParserCallback implements ContentHandler {
-    private static final char space = ' ';
-    private static final char NONE = 0;
-    private static final char TITLE = 1;
-    private static final char HREF = 2;
-    private static final char SCRIPT = 3;
-    private static ParserDelegator pd = new ParserDelegator();
-
-    // Content
-    private String title;
-    private String description;
-    private String keywords;
-    private String categories;
-    private long published;
-    private String href;
-    private String author;
-    private StringBuffer contents;
-    private ArrayList links;
-
-    // Robot Instructions
-    private boolean robotIndex;
-    private boolean robotFollow;
-    private char state;
-    private SimpleDateFormat dateFormatter;
-
-    /**
-     * Constructor - initializes variables
-     */
-    public HTMLHandler() {
-        this.contents = new StringBuffer();
-        this.links = new ArrayList();
-        this.published = -1;
-
-        // 1996.07.10 15:08:56 PST
-        this.dateFormatter = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss z");
-    }
-
-    /**
-     * Return the author
-     * @return The author
-     */
-    public String getAuthor() {
-        return this.author;
-    }
-
-    /**
-     * Return categories (from META tags)
-     * @return The categories
-     */
-    public String getCategories() {
-        return this.categories;
-    }
-
-    /**
-     * Return contents
-     * @return The contents
-     */
-    public String getContents() {
-        return this.contents.toString();
-    }
-
-    /**
-     * Return description (from META tags)
-     * @return The description
-     */
-    public String getDescription() {
-        return this.description;
-    }
-
-    /**
-     * Return META HREF
-     * @return The Meta HREF
-     */
-    public String getHREF() {
-        return this.href;
-    }
-
-    /**
-     * Return keywords (from META tags)
-     * @return The keywords
-     */
-    public String getKeywords() {
-        return this.keywords;
-    }
-
-    /**
-     * Return links
-     * @return The links
-     */
-    public List getLinks() {
-        return this.links;
-    }
-
-    /**
-     * Return published date (from META tag)
-     * @return The published date
-     */
-    public long getPublished() {
-        return this.published;
-    }
-
-    /**
-     * Return boolean true if links are to be followed
-     * @return Whether to follow links
-     */
-    public boolean getRobotFollow() {
-        return this.robotFollow;
-    }
-
-    /**
-     * Return boolean true if this is to be indexed
-     * @return Whether to index
-     */
-    public boolean getRobotIndex() {
-        return this.robotIndex;
-    }
-
-    /**
-     * Return page title
-     * @return The title
-     */
-    public String getTitle() {
-        return this.title;
-    }
-
-    /**
-     * Handle Anchor <A HREF="~"></A> tags
-     * @param attribs The list of attributes
-     */
-    public void handleAnchor(MutableAttributeSet attribs) {
-        String _href = "";
-        _href = (String) attribs.getAttribute(HTML.Attribute.HREF);
-
-        if (_href == null) {
-            return;
-        }
-
-        this.links.add(_href);
-        this.state = HREF;
-    }
-
-    /**
-     * Handle the Closing tag
-     *
-     * @param tag The tag
-     * @param pos The position
-     */
-    public void handleEndTag(Tag tag, int pos) {
-        if (this.state == NONE) {
-            return;
-        }
-
-        // In order of precedence == > && > ||
-        if ((this.state == TITLE) && tag.equals(HTML.Tag.TITLE)) {
-            this.state = NONE;
-            return;
-        }
-
-        if ((this.state == HREF) && tag.equals(HTML.Tag.A)) {
-            //links.add(linktext);
-            this.state = NONE;
-            return;
-        }
-
-        if ((this.state == SCRIPT) && tag.equals(HTML.Tag.SCRIPT)) {
-            this.state = NONE;
-            return;
-        }
-    }
-
-    /**
-     * Handle META tags
-     * @param attribs The set of attributes
-     */
-    public void handleMeta(MutableAttributeSet attribs) {
-        String name = "";
-        String content = "";
-
-        name = (String) attribs.getAttribute(HTML.Attribute.NAME);
-        content = (String) attribs.getAttribute(HTML.Attribute.CONTENT);
-
-        if ((name == null) || (content == null)) {
-            return;
-        }
-
-        name = name.toUpperCase(Locale.ENGLISH);
-
-        if (name.equals("DESCRIPTION")) {
-            this.description = content;
-            return;
-        }
-
-        if (name.equals("KEYWORDS")) {
-            this.keywords = content;
-            return;
-        }
-
-        if (name.equals("CATEGORIES")) {
-            this.categories = content;
-            return;
-        }
-
-        if (name.equals("PUBLISHED")) {
-            try {
-                this.published = this.dateFormatter.parse(content).getTime();
-            } catch (ParseException e) {
-                e.printStackTrace();
-            }
-            return;
-        }
-
-        if (name.equals("HREF")) {
-            this.href = content;
-            return;
-        }
-
-        if (name.equals("AUTHOR")) {
-            this.author = content;
-            return;
-        }
-
-        if (name.equals("ROBOTS")) {
-            if (content.indexOf("noindex") != -1) {
-                this.robotIndex = false;
-            }
-
-            if (content.indexOf("nofollow") != -1) {
-                this.robotFollow = false;
-            }
-
-            this.author = content;
-            return;
-        }
-    }
-
-    /**
-     * Handle standalone tag
-     *
-     * @param tag The tag
-     * @param attribs The set of attributes
-     * @param pos The position
-     */
-    public void handleSimpleTag(Tag tag, MutableAttributeSet attribs, int pos) {
-        if (tag.equals(HTML.Tag.META)) {
-            handleMeta(attribs);
-        }
-    }
-
-    /**
-     * Handle Opening tag
-     *
-     * @param tag The tag
-     * @param attribs The set of attributes
-     * @param pos The position
-     */
-    public void handleStartTag(Tag tag, MutableAttributeSet attribs, int pos) {
-        if (tag.equals(HTML.Tag.TITLE)) {
-            this.state = TITLE;
-        } else if (tag.equals(HTML.Tag.A)) {
-            handleAnchor(attribs);
-        } else if (tag.equals(HTML.Tag.SCRIPT)) {
-            this.state = SCRIPT;
-        }
-    }
-
-    /**
-     * Handle page text
-     *
-     * @param text The text
-     * @param pos The position
-     */
-    public void handleText(char[] text, int pos) {
-        switch (this.state) {
-        case NONE:
-            this.contents.append(text);
-            this.contents.append(space);
-            break;
-
-        case TITLE:
-            this.title = new String(text);
-            break;
-
-        case HREF:
-            this.contents.append(text);
-            this.contents.append(space);
-            //linktext = new String(text);
-            break;
-        }
-    }
-
-    /**
-     * Parse Content.
-     * @param in The input stream to parse
-     */
-    public void parse(InputStream in) {
-        try {
-            reset();
-            pd.parse(new BufferedReader(new InputStreamReader(in)), this, true);
-        } catch (final IOException e) {
-            e.printStackTrace();
-        }
-    }
-
-    /**
-     * Reset private fields holding content
-     */
-    private void reset() {
-        this.title = null;
-        this.description = null;
-        this.keywords = null;
-        this.categories = null;
-        this.href = null;
-        this.author = null;
-        this.contents.setLength(0);
-        this.links = new ArrayList();
-        this.published = -1;
-        this.robotIndex = true;
-        this.robotFollow = true;
-        this.state = NONE;
-    }
-}
diff --git a/src/java/org/apache/lenya/search/crawler/IterativeHTMLCrawler.java b/src/java/org/apache/lenya/search/crawler/IterativeHTMLCrawler.java
deleted file mode 100644
index b0d01fb..0000000
--- a/src/java/org/apache/lenya/search/crawler/IterativeHTMLCrawler.java
+++ /dev/null
@@ -1,557 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.search.crawler;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PrintWriter;
-import java.net.HttpURLConnection;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Locale;
-import java.util.List;
-import java.util.StringTokenizer;
-import java.util.TreeSet;
-
-import websphinx.RobotExclusion;
-
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
-import org.apache.log4j.Logger;
-import org.xml.sax.SAXException;
-
-
-/**
- * Crawl iteratively
- */
-public class IterativeHTMLCrawler implements Configurable {
-    private static final Logger log = Logger.getLogger(IterativeHTMLCrawler.class);
-
-    java.util.Vector urlsToCrawl;
-    java.util.TreeSet urlsToCrawlLowerCase;
-    String uriList = "url_file.txt";
-    String htdocsDumpDir = "html_dump";
-    private String baseURL;
-    private String rootURL;
-    private String[] scopeURL;
-    private String userAgent;
-    private RobotExclusion robot;
-    private String robotsFile;
-    private String robotsDomain;
-    private String configurationFilePath;
-
-    /**
-     * Command line interface
-     * @param args Configuration file crawler.xconf
-     */
-    public void main(String[] args) {
-        if (args.length == 0) {
-            System.err.println("Usage: IterativeHTMLCrawler crawler.xconf");
-
-            return;
-        }
-
-        try {
-            if (args.length == 1) {
-                this.configurationFilePath = args[0];
-                try {
-                    DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
-                    Configuration configuration = builder.buildFromFile(this.configurationFilePath);
-                    configure(configuration);
-                } catch (final ConfigurationException e1) {
-                	System.err.println("Cannot load crawler configuration!");
-                } catch (final SAXException e1) {
-                	System.err.println("Cannot load crawler configuration!");
-                } catch (final IOException e1) {
-                	System.err.println("Cannot load crawler configuration!");
-                }
-                new IterativeHTMLCrawler(new File(args[0])).crawl(new URL(this.baseURL), this.scopeURL[0]);
-	    } else {
-                System.err.println("Usage: IterativeHTMLCrawler crawler.xconf");
-            }
-        } catch (MalformedURLException e) {
-            log.error("" + e);
-        }
-    }
-
-    /**
-     * Configuration of the IterativeHTMLCrawler
-     * @param configuration The configuration
-     * @throws ConfigurationException if an error occurs
-     */
-    public void configure(Configuration configuration)
-        throws ConfigurationException {
-
-    	this.baseURL = configuration.getChild("base-url").getAttribute("href");
-    	this.scopeURL[0] = configuration.getChild("scope-url").getAttribute("href");
-    	this.userAgent = configuration.getChild("user-agent").getValue();
-    	this.uriList = configuration.getChild("uri-list").getAttribute("src");
-    	this.htdocsDumpDir = configuration.getChild("htdocs-dump-dir").getAttribute("src");
-    	this.robotsFile = configuration.getChild("robots").getAttribute("src");
-    	this.robotsDomain = configuration.getChild("robots").getAttribute("domain");
-    }
-
-    /**
-     * Creates a new IterativeHTMLCrawler object.
-     * @param _uriList File where all dumped files will be listed
-     * @param _htdocsDumpDir Directory where htdocs should be dumped
-     * @param _userAgent User-agent for robots.txt
-     */
-    public IterativeHTMLCrawler(String _uriList, String _htdocsDumpDir, String _userAgent) {
-        this.uriList = _uriList;
-        this.htdocsDumpDir = _htdocsDumpDir;
-        this.robot = new RobotExclusion(_userAgent);
-    }
-
-    /**
-     * Creates a new IterativeHTMLCrawler object.
-     * @param config Configuration File
-     */
-    public IterativeHTMLCrawler(File config) {
-        try {
-            DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
-            Configuration configuration = builder.buildFromFile(config);
-            configure(configuration);
-        } catch (final ConfigurationException e) {
-        	System.err.println("Cannot load crawler configuration! " + e.toString());
-        } catch (final SAXException e) {
-        	System.err.println("Cannot load crawler configuration! " + e.toString());
-        } catch (final IOException e) {
-        	System.err.println("Cannot load crawler configuration! " + e.toString());
-        }
-
-        this.robot = new RobotExclusion(this.userAgent);
-
-        if (this.robotsFile != null && this.robotsDomain != null) {
-            log.debug(this.robotsFile + " " + this.robotsDomain);
-            this.robot.addLocalEntries(this.robotsDomain, new File(this.robotsFile));
-        }
-    }
-
-    /**
-     * Crawl
-     * @param start Start crawling at this URL
-     * @param scope Limit crawling to this scope
-     */
-    public void crawl(URL start, String scope) {
-        this.scopeURL = new String[1];
-        this.scopeURL[0] = scope;
-
-        String seedURL = start.toString();
-        this.rootURL = seedURL.substring(0, seedURL.indexOf("/", 8));
-
-        this.urlsToCrawl = new java.util.Vector();
-        this.urlsToCrawlLowerCase = new java.util.TreeSet();
-
-        String currentURLPath = start.toString().substring(0, start.toString().lastIndexOf("/"));
-
-        try {
-            log.info("Start crawling at: " + start);
-
-            if (addURL(start.getFile(), currentURLPath) != null) {
-                dumpHTDoc(start);
-            } else {
-                log.warn("Start URL has not been dumped: " + start);
-            }
-        } catch (MalformedURLException e) {
-            log.error("" + e);
-        }
-
-        int currentPosition = 0;
-
-        while (currentPosition < this.urlsToCrawl.size()) {
-            URL currentURL = (URL) this.urlsToCrawl.elementAt(currentPosition);
-            currentURLPath = currentURL.toString().substring(0, currentURL.toString().lastIndexOf("/"));
-
-            log.info("INFO: Current Array Size: " + this.urlsToCrawl.size() + ", Current Position: " + currentPosition + ", Current URL: " + currentURL.toString());
-
-
-            java.util.List urlsWithinPage = parsePage(currentURL.toString());
-
-            if (urlsWithinPage != null) {
-                java.util.Iterator iterator = urlsWithinPage.iterator();
-
-                while (iterator.hasNext()) {
-                    String urlCandidate = (String) iterator.next();
-
-                    try {
-                        URL urlToCrawl = null;
-
-                        if ((urlToCrawl = addURL(urlCandidate, currentURLPath)) != null) {
-                            dumpHTDoc(urlToCrawl);
-                        }
-                    } catch (final MalformedURLException e) {
-                        log.warn("" + e + " " + urlCandidate);
-                    }
-                }
-            }
-
-            currentPosition = currentPosition + 1;
-        }
-
-        log.info("Stop crawling at: " + this.urlsToCrawl.elementAt(this.urlsToCrawl.size()-1));
-
-        // Write all crawled URLs into file
-        try {
-            File parent = new File(new File(this.uriList).getParent());
-            if (!parent.isDirectory()) {
-                parent.mkdirs();
-                log.warn("Directory has been created: " + parent);
-            }
-            PrintWriter out = new PrintWriter(new FileOutputStream(this.uriList));
-
-            for (int i = 0; i < this.urlsToCrawl.size(); i++) {
-                out.println("" + this.urlsToCrawl.elementAt(i));
-            }
-
-            out.close();
-        } catch (final FileNotFoundException e) {
-            log.error("" + e);
-        }
-    }
-
-    /**
-     * Add URLs to crawl
-     * @param urlCandidate URL to add
-     * @param currentURLPath The current URL path
-     * @return Added URL
-     * @throws MalformedURLException if the URL is invalid
-     */
-    public URL addURL(String urlCandidate, String currentURLPath)
-        throws MalformedURLException {
-        URL url = new URL(parseHREF(urlCandidate, urlCandidate.toLowerCase(Locale.ENGLISH), currentURLPath));
-        //completeURL(currentURL,urlCandidate)  new URL(currentURLPath+"/"+urlCandidate);
-
-        if (filterURL(urlCandidate, currentURLPath, this.urlsToCrawlLowerCase)) {
-            if (!this.robot.disallowed(url)) {
-                if (url.getQuery() == null) {
-                    this.urlsToCrawl.add(url);
-                    this.urlsToCrawlLowerCase.add(url.toString().toLowerCase(Locale.ENGLISH));
-                    log.debug("URL added: " + url);
-                } else {
-                    log.info("Don't crawl URLs with query string: " + url);
-                }
-
-                return url;
-            }
-            log.info("Disallowed by robots.txt: " + urlCandidate);
-        }
-
-        return null;
-    }
-
-    /**
-     * Parse a URL
-     * @param urlString URL to parse
-     * @return a list of URL
-     */
-    public List parsePage(String urlString) {
-    	HttpURLConnection httpCon = null;
-
-    	try {
-            URL currentURL = new URL(urlString);
-            httpCon = (HttpURLConnection) currentURL.openConnection();
-            httpCon.setRequestProperty("User-Agent", "Lenya Lucene Crawler");
-            httpCon.connect();
-
-            if (httpCon.getResponseCode() == HttpURLConnection.HTTP_OK) {
-                String contentType = httpCon.getContentType();
-
-                if (contentType.indexOf("text/html") != -1) {
-                    return handleHTML(httpCon);
-                } else if (contentType.indexOf("application/pdf") != -1) {
-                    handlePDF(httpCon);
-                }
-            }
-
-        } catch (final Exception e) {
-            log.error(e.getMessage(), e);
-        } finally {
-            httpCon.disconnect();
-        }
-        return null;
-    }
-
-    /**
-     * Returns a list of links for a HTTP connection
-     * @param httpCon The HTTP connection
-     * @return The list of links
-     * @throws IOException if an IO error occurs
-     */
-    public static List handleHTML(HttpURLConnection httpCon) throws IOException {
-        ContentHandler handler = new HTMLHandler();
-        handler.parse(httpCon.getInputStream());
-
-        if (handler.getRobotFollow()) {
-            List links = handler.getLinks();
-            return links;
-        }
-
-        return null;
-    }
-
-    /**
-     * Parse PDF for links
-     * @param httpCon The HTTP connection
-     */
-    public void handlePDF(HttpURLConnection httpCon) {
-        log.debug(".handlePDF(): Not handled yet!");
-    }
-
-    /**
-     * Checks if a URL is in the crawling scope
-     * @param url The URL
-     * @param currentURLPath The current URL path
-     * @param links The list of known links
-     * @return whether the URL is in the crawling scope
-     */
-    public boolean filterURL(String url, String currentURLPath, TreeSet links) {
-        String urlLowCase = url.toLowerCase(Locale.ENGLISH);
-
-        if (!(urlLowCase.startsWith("http://") || urlLowCase.startsWith("https://"))) {
-            url = parseHREF(url, urlLowCase, currentURLPath);
-
-            if (url != null) {
-                urlLowCase = url.toLowerCase(Locale.ENGLISH);
-            }
-        }
-
-        if ((url != null) && inScope(url)) {
-            if (!links.contains(urlLowCase)) {
-                return true;
-            }
-        } else {
-            log.debug("Not in scope: " + url);
-        }
-
-        return false;
-    }
-
-    /**
-     * Parse URL and complete if necessary
-     * @param url URL from href
-     * @param urlLowCase url is lower case
-     * @param currentURLPath URL of current page
-     * @return Completed URL
-     */
-    public String parseHREF(String url, String urlLowCase, String currentURLPath) {
-        if (urlLowCase.startsWith("http://") || urlLowCase.startsWith("https://")) {
-            return url;
-        }
-
-        // Looks for incomplete URL and completes them
-        if (urlLowCase.startsWith("/")) {
-            url = this.rootURL + url;
-        } else if (urlLowCase.startsWith("./")) {
-            url = currentURLPath + url.substring(1, url.length());
-        } else if (urlLowCase.startsWith("../")) {
-            int back = 1;
-
-            // Count number of "../"s
-            while (urlLowCase.indexOf("../", back * 3) != -1)
-                back++;
-
-            int pos = currentURLPath.length();
-            int count = back;
-
-            while (count-- > 0) {
-                pos = currentURLPath.lastIndexOf("/", pos) - 1;
-            }
-
-            String dotsRemoved = url.substring(3 * back, url.length());
-            if (dotsRemoved.length() > 0 && dotsRemoved.charAt(0) == '.') {
-                log.error("Parsing failed: " + url + " (" + currentURLPath + ")");
-                url = null;
-            } else {
-                url = currentURLPath.substring(0, pos + 2) + dotsRemoved;
-            }
-        } else if (urlLowCase.startsWith("javascript:")) {
-            // handle javascript:...
-            log.debug("\"javascript:\" is not implemented yet!");
-            url = null;
-        } else if (urlLowCase.startsWith("#")) {
-            log.debug("\"#\" (anchor) will be ignored!");
-
-            // internal anchor... ignore.
-            url = null;
-        } else if (urlLowCase.startsWith("mailto:")) {
-            log.debug("\"mailto:\" is not a URL to be followed!");
-
-            // handle mailto:...
-            url = null;
-        } else {
-            url = currentURLPath + "/" + url;
-        }
-
-        // strip anchor if exists otherwise crawler may index content multiple times
-        // links to the same url but with unique anchors would be considered unique
-        // by the crawler when they should not be
-        if (url != null) {
-            int i;
-
-            if ((i = url.indexOf("#")) != -1) {
-                url = url.substring(0, i);
-            }
-        }
-
-
-        return url;
-    }
-
-    /**
-     * Checks if a URL is in the crawling scope
-     * @param url The URL
-     * @return whether the URL is in the crawling scope
-     */
-    public boolean inScope(String url) {
-        for (int i = 0; i < this.scopeURL.length; i++) {
-            if (url.startsWith(this.scopeURL[i])) {
-                return true;
-            }
-        }
-
-        return false;
-    }
-
-    /**
-     * Returns the complete URL for a child
-     * @param parent The parent URL
-     * @param child The child
-     * @return The complete URL
-     * @throws MalformedURLException if the URL was not valid
-     * FIXME this looks wrong
-     */
-    public URL completeURL(URL parent, String child) throws MalformedURLException {
-        return parent;
-    }
-
-    /**
-     * Dumps the content of a URL to the dump directory
-     * @param url The URL
-     */
-    public void dumpHTDoc(URL url) {
-        InputStream in = null;
-        FileOutputStream out = null;
-        
-        String ext = getExtension(url);
-
-        String filename = this.htdocsDumpDir + url.getFile();
-        File file = new File(filename);
-
-        if (filename.charAt(filename.length() - 1) == '/') {
-            file = new File(filename + "index.html");
-            ext = getExtension(file);
-        }
-
-        if (ext.equals("html") || ext.equals("htm") || ext.equals("txt") || ext.equals("pdf")) {
-
-            try {
-                File parent = new File(file.getParent());
-
-                if (!parent.exists()) {
-                    parent.mkdirs();
-                }
-
-                HttpURLConnection httpConnection = (HttpURLConnection) url.openConnection();
-                in = httpConnection.getInputStream();
-
-                out = new FileOutputStream(file);
-                byte[] buffer = new byte[1024];
-                int bytesRead = -1;
-                while ((bytesRead = in.read(buffer)) >= 0) {
-                    out.write(buffer, 0, bytesRead);
-                }
-
-                httpConnection.disconnect();
-
-                log.info("URL dumped: " + url + " (" + file + ")");
-            } catch (final Exception e) {
-                log.error(e.getMessage(), e);
-            } finally {
-                try {
-                    if (in !=null)
-                        in.close();
-                    if (out != null)
-                        out.close();
-                } catch (final IOException e1) {
-                    log.error("Failed to close stream: " +e1.toString());
-                }
-            }
-
-        } else {
-            log.info("URL not dumped: " + url);
-        }
-    }
-
-    /**
-     *
-     */
-/*
-    public void saveToFile(String filename, byte[] bytes)
-        throws FileNotFoundException, IOException {
-        File file = new File(filename);
-
-        if (filename.charAt(filename.length() - 1) == '/') {
-            file = new File(filename + "index.html");
-        }
-
-        File parent = new File(file.getParent());
-
-        if (!parent.exists()) {
-            log.warn("Directory will be created: " + parent.getAbsolutePath());
-            parent.mkdirs();
-        }
-
-        FileOutputStream out = new FileOutputStream(file.getAbsolutePath());
-        out.write(bytes);
-        out.close();
-    }
-*/
-
-    /**
-     * Returns the extension of a URL
-     * @param url The URL
-     * @return The extension
-     */
-    public String getExtension(URL url) {
-        return getExtension(new File(url.getPath()));
-    }
-
-    /**
-     * Returns the extension of a file
-     * @param file The file
-     * @return The extension
-     */
-    public String getExtension(File file) {
-        StringTokenizer st = new StringTokenizer(file.getPath(), ".");
-        String extension = null;
-
-        while (st.hasMoreElements()) {
-            extension = st.nextToken();
-        }
-
-        return extension;
-    }
-}
diff --git a/src/java/org/apache/lenya/transaction/AbstractOperation.java b/src/java/org/apache/lenya/transaction/AbstractOperation.java
deleted file mode 100644
index ba6a50d..0000000
--- a/src/java/org/apache/lenya/transaction/AbstractOperation.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.transaction;
-
-import org.apache.avalon.framework.activity.Disposable;
-import org.apache.avalon.framework.activity.Initializable;
-import org.apache.avalon.framework.container.ContainerUtil;
-import org.apache.avalon.framework.context.Context;
-import org.apache.avalon.framework.context.ContextException;
-import org.apache.avalon.framework.context.Contextualizable;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.cocoon.components.ContextHelper;
-import org.apache.cocoon.environment.Request;
-
-/**
- * Abstract operation implementation.
- * 
- * @version $Id$
- */
-public class AbstractOperation extends AbstractLogEnabled implements Operation, Serviceable,
-        Initializable, Disposable, Contextualizable {
-
-    /**
-     * Ctor.
-     */
-    public AbstractOperation() {
-        super();
-    }
-
-    private UnitOfWork unitOfWork;
-
-    /**
-     * Retrieves a unit-of-work, which gives the operation access to business objects affected by
-     * the operation.
-     * 
-     * @return a UnitOfWork, the interface to access the objects
-     * @throws ServiceException if the unit-of-work component can not be initialized by the
-     *             component framework
-     * 
-     * @see org.apache.lenya.transaction.Operation#getUnitOfWork()
-     */
-    public UnitOfWork getUnitOfWork() throws ServiceException {
-        if (this.unitOfWork == null) {
-            setUnitOfWork(new UnitOfWorkImpl());
-        }
-
-        return this.unitOfWork;
-    }
-
-    /**
-     * @param unit The unit of work.
-     */
-    public void setUnitOfWork(UnitOfWork unit) {
-        this.unitOfWork = unit;
-        ContainerUtil.enableLogging(this.unitOfWork, getLogger());
-        Request request = ContextHelper.getRequest(this.context);
-        request.setAttribute(UnitOfWork.class.getName(), unit);
-    }
-
-    protected ServiceManager manager;
-
-    /**
-     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service(ServiceManager _manager) throws ServiceException {
-        this.manager = _manager;
-    }
-
-    /**
-     * @see org.apache.avalon.framework.activity.Initializable#initialize()
-     */
-    public void initialize() throws Exception {
-        // reset the unit of work
-        /*
-         * Session session = ContextHelper.getRequest(this.context).getSession(false); if (session !=
-         * null) { session.setAttribute(UnitOfWork.class.getName(), null); }
-         */
-    }
-
-    /**
-     * @see org.apache.avalon.framework.activity.Disposable#dispose()
-     */
-    public void dispose() {
-        if (this.manager != null) {
-            if (this.unitOfWork != null) {
-                // FIXME: determine if unitOfWork needs some message
-                // that it should clean up itself
-            }
-        }
-    }
-
-    protected Context context;
-
-    /**
-     * @see org.apache.avalon.framework.context.Contextualizable#contextualize(org.apache.avalon.framework.context.Context)
-     */
-    public void contextualize(Context context) throws ContextException {
-        this.context = context;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/transaction/Identifiable.java b/src/java/org/apache/lenya/transaction/Identifiable.java
deleted file mode 100644
index 5db1753..0000000
--- a/src/java/org/apache/lenya/transaction/Identifiable.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Created on 08.04.2005
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.apache.lenya.transaction;
-
-/**
- * @author nobby
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public interface Identifiable {
-
-    /**
-     * @return The type of the identifiable.
-     */
-    String getIdentifiableType();
-    
-}
diff --git a/src/java/org/apache/lenya/transaction/IdentifiableFactory.java b/src/java/org/apache/lenya/transaction/IdentifiableFactory.java
deleted file mode 100644
index 3ba597e..0000000
--- a/src/java/org/apache/lenya/transaction/IdentifiableFactory.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.transaction;
-
-/**
- * Factory for transactionables.
- *
- * @version $Id$
- */
-public interface IdentifiableFactory {
-
-    /**
-     * Builds an identifiable.
-     * @param map The identity map.
-     * @param key The key.
-     * @return A transactionable.
-     * @throws Exception if an error occurs.
-     */
-    Identifiable build(IdentityMap map, String key) throws Exception;
-    
-}
diff --git a/src/java/org/apache/lenya/transaction/IdentityMap.java b/src/java/org/apache/lenya/transaction/IdentityMap.java
deleted file mode 100644
index ea049c8..0000000
--- a/src/java/org/apache/lenya/transaction/IdentityMap.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.transaction;
-
-/**
- * Identity map.
- * 
- * @version $Id$
- */
-public interface IdentityMap {
-
-    /**
-     * Retrieve an instance from the map. If no instance exists
-     * for the given key, the factory is used to build one.
-     * @see #getFactory(java.lang.String)
-     * @param type The type of the transactionable.
-     * @param key The key for the transactionable.
-     * @return A transactionable.
-     */
-    Identifiable get(String type, String key);
-
-    /**
-     * Sets the factory.
-     * @param type The transactionable type to use the factory for.
-     * @param factory The factory to use.
-     */
-    void setFactory(String type, IdentifiableFactory factory);
-
-    /**
-     * @param type The type to return the factory for.
-     * @return The factory.
-     */
-    IdentifiableFactory getFactory(String type);
-
-    /**
-     * Returns the unit of work. This maybe <code>null</code> if the identity map is not involved
-     * in a transaction.
-     * @return The unit of work.
-     */
-    UnitOfWork getUnitOfWork();
-
-    /**
-     * @param unit The unit of work to use.
-     */
-    void setUnitOfWork(UnitOfWork unit);
-    
-    /**
-     * @return All objects in this map.
-     */
-    Identifiable[] getObjects();
-
-}
diff --git a/src/java/org/apache/lenya/transaction/IdentityMapImpl.java b/src/java/org/apache/lenya/transaction/IdentityMapImpl.java
deleted file mode 100644
index 9f9d7f2..0000000
--- a/src/java/org/apache/lenya/transaction/IdentityMapImpl.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.transaction;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-
-/**
- * Identity map implementation.
- * 
- * @version $Id$
- */
-public class IdentityMapImpl extends AbstractLogEnabled implements IdentityMap {
-
-    private Map maps = new HashMap();
-
-    /**
-     * @see org.apache.lenya.transaction.IdentityMap#get(java.lang.String, java.lang.String)
-     */
-    public Identifiable get(String type, String key) {
-        Map map = (Map) this.maps.get(type);
-        if (map == null) {
-            map = new HashMap();
-            this.maps.put(type, map);
-        }
-        Identifiable object = (Identifiable) map.get(key);
-
-        if (getLogger().isDebugEnabled())
-            getLogger().debug("IdentityMapImpl::get() looked up type [" + type + "], key [" + key + "] in map, is it there ? " + (object != null));
-
-        if (object == null) {
-            try {
-                object = getFactory(type).build(this, key);
-            } catch (Exception e) {
-                throw new RuntimeException(e);
-            }
-            map.put(key, object);
-        }
-        return object;
-    }
-
-    private Map factories = new HashMap();
-
-    /**
-     * @see org.apache.lenya.transaction.IdentityMap#setFactory(java.lang.String,
-     *      org.apache.lenya.transaction.IdentifiableFactory)
-     */
-    public void setFactory(String type, IdentifiableFactory factory) {
-        this.factories.put(type, factory);
-    }
-
-    /**
-     * @see org.apache.lenya.transaction.IdentityMap#getFactory(java.lang.String)
-     */
-    public IdentifiableFactory getFactory(String type) {
-        return (IdentifiableFactory) this.factories.get(type);
-    }
-
-    private UnitOfWork unitOfWork;
-
-    /**
-     * @see org.apache.lenya.transaction.IdentityMap#getUnitOfWork()
-     */
-    public UnitOfWork getUnitOfWork() {
-        return this.unitOfWork;
-    }
-
-    /**
-     * @see org.apache.lenya.transaction.IdentityMap#setUnitOfWork(org.apache.lenya.transaction.UnitOfWork)
-     */
-    public void setUnitOfWork(UnitOfWork unit) {
-        this.unitOfWork = unit;
-    }
-
-    /**
-     * @see org.apache.lenya.transaction.IdentityMap#getObjects()
-     */
-    public Identifiable[] getObjects() {
-        Set objects = new HashSet();
-        for (Iterator i = this.maps.values().iterator(); i.hasNext(); ) {
-            Map map = (Map) i.next();
-            for (Iterator j = map.values().iterator(); j.hasNext(); ) {
-                objects.add(j.next());
-            }
-        }
-        return (Identifiable[]) objects.toArray(new Identifiable[objects.size()]);
-    }
-
-}
diff --git a/src/java/org/apache/lenya/transaction/Lock.java b/src/java/org/apache/lenya/transaction/Lock.java
deleted file mode 100644
index 15b867e..0000000
--- a/src/java/org/apache/lenya/transaction/Lock.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.transaction;
-
-/**
- * A lock on a transactionable.
- *
- * @version $Id:$
- */
-public class Lock {
-
-    /**
-     * Ctor.
-     * @param version The version of the transactionable when it was locked.
-     */
-    public Lock(int version) {
-        this.version = version;
-    }
-    
-    private int version;
-    
-    /**
-     * @return The version number.
-     */
-    public int getVersion() {
-        return this.version;
-    }
-    
-}
diff --git a/src/java/org/apache/lenya/transaction/LockException.java b/src/java/org/apache/lenya/transaction/LockException.java
deleted file mode 100644
index 654e9e6..0000000
--- a/src/java/org/apache/lenya/transaction/LockException.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.transaction;
-
-/**
- * Lock exception.
- *
- * @version $Id:$
- */
-public class LockException extends TransactionException {
-
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-	/**
-     * Ctor.
-     */
-    public LockException() {
-        super();
-    }
-    /**
-     * Ctor.
-     * @param message The message.
-     */
-    public LockException(String message) {
-        super(message);
-    }
-    /**
-     * Ctor.
-     * @param message The message.
-     * @param cause The cause.
-     */
-    public LockException(String message, Throwable cause) {
-        super(message, cause);
-    }
-    /**
-     * Ctor.
-     * @param cause The cause.
-     */
-    public LockException(Throwable cause) {
-        super(cause);
-    }
-}
diff --git a/src/java/org/apache/lenya/transaction/Lockable.java b/src/java/org/apache/lenya/transaction/Lockable.java
deleted file mode 100644
index 1712529..0000000
--- a/src/java/org/apache/lenya/transaction/Lockable.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.transaction;
-
-/**
- * Object that can be locked.
- *
- * @version $Id:$
- */
-public interface Lockable {
-    
-    /**
-     * Locks this object.
-     * @throws TransactionException if an error occurs.
-     */
-    void lock() throws TransactionException;
-
-    /**
-     * Unlocks this object.
-     * @throws TransactionException if an error occurs.
-     */
-    void unlock() throws TransactionException;
-
-    /**
-     * @return if this object is locked.
-     * @throws TransactionException if an error occurs.
-     */
-    boolean isLocked() throws TransactionException;
-
-    /**
-     * @return The lock which is held by this object.
-     */
-    Lock getLock();
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/transaction/Operation.java b/src/java/org/apache/lenya/transaction/Operation.java
deleted file mode 100644
index 33c49ce..0000000
--- a/src/java/org/apache/lenya/transaction/Operation.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.transaction;
-
-import org.apache.avalon.framework.service.ServiceException;
-
-/**
- * Operation interface.
- * 
- * @version $Id$
- */
-public interface Operation {
-
-    /**
-     * The Avalon role.
-     */
-    String ROLE = Operation.class.getName();
-    
-    /**
-     * Returns the unit of work object.
-     * @return A unit of work.
-     * @throws ServiceException if the unit-of-work component could not be retrieved by the service manager
-     */
-    UnitOfWork getUnitOfWork() throws ServiceException;
-    
-    /**
-     * @param unit The unit of work.
-     */
-    void setUnitOfWork(UnitOfWork unit);
-
-}
diff --git a/src/java/org/apache/lenya/transaction/TransactionException.java b/src/java/org/apache/lenya/transaction/TransactionException.java
deleted file mode 100644
index e0e40a3..0000000
--- a/src/java/org/apache/lenya/transaction/TransactionException.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.transaction;
-
-/**
- * Transaction exception.
- *
- * @version $Id$
- */
-public class TransactionException extends Exception {
-
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-	/**
-     * Ctor.
-     */
-    public TransactionException() {
-        super();
-    }
-    /**
-     * Ctor.
-     * @param message The message.
-     */
-    public TransactionException(String message) {
-        super(message);
-    }
-    /**
-     * Ctor.
-     * @param message The message.
-     * @param cause The cause.
-     */
-    public TransactionException(String message, Throwable cause) {
-        super(message, cause);
-    }
-    /**
-     * Ctor.
-     * @param cause The cause.
-     */
-    public TransactionException(Throwable cause) {
-        super(cause);
-    }
-}
diff --git a/src/java/org/apache/lenya/transaction/Transactionable.java b/src/java/org/apache/lenya/transaction/Transactionable.java
deleted file mode 100644
index 3bf3d74..0000000
--- a/src/java/org/apache/lenya/transaction/Transactionable.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.transaction;
-
-/**
- * Object to take part in a transaction.
- *
- * @version $Id$
- */
-public interface Transactionable extends Identifiable, Versionable {
-
-    /**
-     * Saves the object.
-     * @throws TransactionException if an error occurs.
-     */
-    void saveTransactionable() throws TransactionException;
-
-    /**
-     * Deletes the object.
-     * @throws TransactionException if an error occurs.
-     */
-    void deleteTransactionable() throws TransactionException;
-    
-    /**
-     * Creates the object.
-     * @throws TransactionException if an error occurs.
-     */
-    void createTransactionable() throws TransactionException;
-    
-}
diff --git a/src/java/org/apache/lenya/transaction/UnitOfWork.java b/src/java/org/apache/lenya/transaction/UnitOfWork.java
deleted file mode 100644
index e775427..0000000
--- a/src/java/org/apache/lenya/transaction/UnitOfWork.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.transaction;
-
-import org.apache.lenya.ac.Identity;
-
-/**
- * This is a "Unit of Work" object (see "Unit of Work" pattern by Martin Fowler, 
- * <a href="http://www.martinfowler.com/eaaCatalog/unitOfWork.html">
- *   http://www.martinfowler.com/eaaCatalog/unitOfWork.html
- * </a>: the unit of work "maintains a list of objects affected by a business transaction and coordinates the writing out of changes and the resolution of concurrency problems".
- * 
- * <p>In the current design, this interface allows a use case to generate documents, while ensuring that only one instance of a document is created. This access is provided by the DocumentIdentityMap's DocumentFactory.</p>
- *
- * <p>This interface may be extended in the future to allow for access to further types of business objects.</p>
- * 
- * @version $Id$
- */
-public interface UnitOfWork {
-
-    /**
-     * Returns the identity map.
-     * @return An identity map.
-     */
-    IdentityMap getIdentityMap();
-    
-    /**
-     * @param map The identity map to use.
-     */
-    void setIdentityMap(IdentityMap map);
-    
-    /**
-     * Registers an object as new.
-     * @param object The object.
-     * @throws TransactionException if an error occurs.
-     */
-    void registerNew(Transactionable object) throws TransactionException;
-    
-    /**
-     * Registers an object as modified.
-     * @param object The object.
-     * @throws TransactionException if an error occurs.
-     */
-    void registerDirty(Transactionable object) throws TransactionException;
-    
-    /**
-     * Registers an object as removed.
-     * @param object The object.
-     * @throws TransactionException if an error occurs.
-     */
-    void registerRemoved(Transactionable object) throws TransactionException;
-    
-    /**
-     * Commits the transaction.
-     * @throws TransactionException if an error occurs.
-     */
-    void commit() throws TransactionException;
-    
-    /**
-     * Rolls the transaction back.
-     * @throws TransactionException if an error occurs.
-     */
-    void rollback() throws TransactionException;
-    
-    /**
-     * @return The identity.
-     */
-    Identity getIdentity();
-    
-    /**
-     * @param identity The identity.
-     */
-    void setIdentity(Identity identity);
-    
-    /**
-     * @param transactionable A transactionable.
-     * @return If the transactionable is registered as dirty.
-     */
-    boolean isDirty(Transactionable transactionable);
-}
diff --git a/src/java/org/apache/lenya/transaction/UnitOfWorkImpl.java b/src/java/org/apache/lenya/transaction/UnitOfWorkImpl.java
deleted file mode 100644
index efe76ff..0000000
--- a/src/java/org/apache/lenya/transaction/UnitOfWorkImpl.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.transaction;
-
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.lenya.ac.Identity;
-
-/**
- * Default implementation of a unit of work.
- * 
- * @version $Id$
- */
-public class UnitOfWorkImpl extends AbstractLogEnabled implements UnitOfWork {
-
-    /**
-     * Ctor.
-     */
-    public UnitOfWorkImpl() {
-    }
-
-    private IdentityMap identityMap;
-
-    /**
-     * @see org.apache.lenya.transaction.UnitOfWork#getIdentityMap()
-     */
-    public IdentityMap getIdentityMap() {
-        return this.identityMap;
-    }
-
-    /**
-     * @see org.apache.lenya.transaction.UnitOfWork#setIdentityMap(org.apache.lenya.transaction.IdentityMap)
-     */
-    public void setIdentityMap(IdentityMap map) {
-        this.identityMap = map;
-        map.setUnitOfWork(this);
-    }
-
-    private Set newObjects = new HashSet();
-    private Set modifiedObjects = new HashSet();
-    private Set removedObjects = new HashSet();
-
-    /**
-     * @see org.apache.lenya.transaction.UnitOfWork#registerNew(org.apache.lenya.transaction.Transactionable)
-     */
-    public void registerNew(Transactionable object) throws TransactionException {
-        if (!object.isLocked()) {
-            throw new LockException("Object [" + object
-                    + "] cannot be registered, it is not locked.");
-        }
-        this.newObjects.add(object);
-    }
-
-    /**
-     * @throws TransactionException
-     * @throws LockException
-     * @see org.apache.lenya.transaction.UnitOfWork#registerDirty(org.apache.lenya.transaction.Transactionable)
-     */
-    public void registerDirty(Transactionable object) throws TransactionException {
-        if (!object.isLocked()) {
-            throw new LockException("Object [" + object
-                    + "] cannot be registered, it is not locked.");
-        }
-        this.modifiedObjects.add(object);
-    }
-
-    /**
-     * @see org.apache.lenya.transaction.UnitOfWork#registerRemoved(org.apache.lenya.transaction.Transactionable)
-     */
-    public void registerRemoved(Transactionable object) throws TransactionException {
-        if (!object.isLocked()) {
-            throw new LockException("Object [" + object
-                    + "] cannot be registered, it is not locked.");
-        }
-        this.removedObjects.add(object);
-    }
-
-    /**
-     * @see org.apache.lenya.transaction.UnitOfWork#commit()
-     */
-    public synchronized void commit() throws TransactionException {
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("UnitOfWorkImpl::commit() called");
-        }
-
-        Set involvedObjects = new HashSet();
-        involvedObjects.addAll(this.newObjects);
-        involvedObjects.addAll(this.modifiedObjects);
-        involvedObjects.addAll(this.removedObjects);
-        
-        for (Iterator i = involvedObjects.iterator(); i.hasNext();) {
-            Transactionable t = (Transactionable) i.next();
-            if (t.hasChanged()) {
-                throw new LockException("Cannot commit transaction: The object [" + t
-                        + "] was modified after it has been locked.");
-            }
-            t.checkout();
-        }
-
-        for (Iterator i = this.newObjects.iterator(); i.hasNext();) {
-            Transactionable t = (Transactionable) i.next();
-            t.createTransactionable();
-            t.saveTransactionable();
-        }
-        for (Iterator i = this.modifiedObjects.iterator(); i.hasNext();) {
-            Transactionable t = (Transactionable) i.next();
-            if (getLogger().isDebugEnabled()) {
-                getLogger().debug("UnitOfWorkImpl::commit() calling save on [" + t + "]");
-            }
-            t.saveTransactionable();
-        }
-        for (Iterator i = this.removedObjects.iterator(); i.hasNext();) {
-            Transactionable t = (Transactionable) i.next();
-            t.deleteTransactionable();
-        }
-
-        if (getIdentityMap() != null) {
-            Identifiable[] objects = getIdentityMap().getObjects();
-            for (int i = 0; i < objects.length; i++) {
-                if (objects[i] instanceof Transactionable) {
-                    Transactionable t = (Transactionable) objects[i];
-                    if (t.isCheckedOut()) {
-                        t.checkin();
-                    }
-                    if (t.isLocked()) {
-                        t.unlock();
-                    }
-                }
-            }
-        }
-    }
-
-    private Identity identity;
-
-    /**
-     * @see org.apache.lenya.transaction.UnitOfWork#getIdentity()
-     */
-    public Identity getIdentity() {
-        return this.identity;
-    }
-
-    /**
-     * @see org.apache.lenya.transaction.UnitOfWork#setIdentity(org.apache.lenya.ac.Identity)
-     */
-    public void setIdentity(Identity identity) {
-        this.identity = identity;
-    }
-
-    /**
-     * @see org.apache.lenya.transaction.UnitOfWork#isDirty(org.apache.lenya.transaction.Transactionable)
-     */
-    public boolean isDirty(Transactionable transactionable) {
-        return this.modifiedObjects.contains(transactionable);
-    }
-
-    /**
-     * @see org.apache.lenya.transaction.UnitOfWork#rollback()
-     */
-    public synchronized void rollback() throws TransactionException {
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("UnitOfWorkImpl::rollback() called");
-        }
-        if (getIdentityMap() != null) {
-            Identifiable[] objects = getIdentityMap().getObjects();
-            for (int i = 0; i < objects.length; i++) {
-                if (objects[i] instanceof Transactionable) {
-                    Transactionable t = (Transactionable) objects[i];
-                    if (t.isCheckedOut()) {
-                        t.checkin();
-                    }
-                    if (t.isLocked()) {
-                        t.unlock();
-                    }
-                }
-            }
-        }
-    }
-
-}
diff --git a/src/java/org/apache/lenya/transaction/Versionable.java b/src/java/org/apache/lenya/transaction/Versionable.java
deleted file mode 100644
index 3531e46..0000000
--- a/src/java/org/apache/lenya/transaction/Versionable.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.transaction;
-
-/**
- * A versionable object.
- *
- * @version $Id:$
- */
-public interface Versionable extends Lockable {
-
-    /**
-     * Checks the object in.
-     * @throws TransactionException if an error occurs.
-     */
-    void checkin() throws TransactionException;
-
-    /**
-     * Checks the object out.
-     * @throws TransactionException if an error occurs.
-     */
-    void checkout() throws TransactionException;
-
-    /**
-     * @return if the object is checked out.
-     * @throws TransactionException if an error occurs.
-     */
-    boolean isCheckedOut() throws TransactionException;
-
-    /**
-     * Checks if the object has been changed since it has been locked.
-     * @return A boolean value.
-     * @throws TransactionException if an error occurs.
-     */
-    boolean hasChanged() throws TransactionException;
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/util/CacheMap.java b/src/java/org/apache/lenya/util/CacheMap.java
deleted file mode 100644
index d08c0c6..0000000
--- a/src/java/org/apache/lenya/util/CacheMap.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.util;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.SortedMap;
-import java.util.TreeMap;
-
-import org.apache.log4j.Logger;
-
-/**
- * A map with a maximum capacity. When the map is full, the oldest entry is removed.
- */
-public class CacheMap extends HashMap {
-    
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-	private static final Logger log = Logger.getLogger(CacheMap.class);
-    
-    /**
-     * Ctor.
-     * @param _capacity The maximum number of entries.
-     */
-    public CacheMap(int _capacity) {
-        assert _capacity > -1;
-        this.capacity = _capacity;
-    }
-    
-    private int capacity;
-    private SortedMap timeToKey = new TreeMap();
-    
-    /**
-     * @see java.util.Map#put(Object, Object)
-     */
-    public Object put(Object key, Object value) {
-        
-        if (size() == this.capacity) {
-            Object oldestKey = this.timeToKey.get(this.timeToKey.firstKey());
-            remove(oldestKey);
-            if (log.isDebugEnabled()) {
-                log.debug("Clearing cache");
-            }
-        }
-        this.timeToKey.put(new Date(), key);
-        return super.put(key, value);
-    }
-    
-    /**
-     * @see java.util.Map#get(java.lang.Object)
-     */
-    public Object get(Object key) {
-        Object result = super.get(key);
-        if (log.isDebugEnabled()) {
-            if (result != null) {
-                log.debug("Using cached object for key [" + key + "]");
-            }
-            else {
-                log.debug("No cached object for key [" + key + "]");
-            }
-        }
-        return result;
-    }
-
-}
diff --git a/src/java/org/apache/lenya/util/HTML.java b/src/java/org/apache/lenya/util/HTML.java
deleted file mode 100644
index 8c5c1cf..0000000
--- a/src/java/org/apache/lenya/util/HTML.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.util;
-
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.swing.text.html.parser.ParserDelegator;
-
-
-/**
- * http://developer.java.sun/developer/TechTips/1999/tt0923.html
- */
-public class HTML {
-    HTMLHandler htmlHandler;
-
-    /**
-     * Creates a new HTML object from a URI
-     * @param uri The URI
-     * @throws IOException if a IO error occurs
-     */
-    public HTML(String uri) throws IOException {
-        ParserDelegator pd = new ParserDelegator();
-        this.htmlHandler = new HTMLHandler();
-        pd.parse(getReader(uri), this.htmlHandler, true);
-    }
-
-    /**
-     * Command line interface
-     * @param args Command line args
-     */
-    public static void main(String[] args) {
-        if (args.length != 1) {
-            System.err.println("Usage: HTML uri (file or url)");
-
-            return;
-        }
-
-        try {
-            HTML html = new HTML(args[0]);
-
-            List img_src_list = html.getImageSrcs(false);
-            System.out.println("<im src");
-
-            Iterator img_src_iterator = img_src_list.iterator();
-
-            while (img_src_iterator.hasNext()) {
-                System.out.println((String) img_src_iterator.next());
-            }
-
-            List a_href_list = html.getAnchorHRefs(false);
-            System.out.println("<a href");
-
-            Iterator a_href_iterator = a_href_list.iterator();
-
-            while (a_href_iterator.hasNext()) {
-                System.out.println((String) a_href_iterator.next());
-            }
-
-            List link_href_list = html.getLinkHRefs(false);
-            System.out.println("<link href");
-
-            Iterator link_href_iterator = link_href_list.iterator();
-
-            while (link_href_iterator.hasNext()) {
-                System.out.println((String) link_href_iterator.next());
-            }
-        } catch (final IOException e) {
-            System.err.println("IO error : " + e);
-        }
-    }
-
-    /**
-     * Get Anchor Hrefs
-     * @param duplicate Whether you want duplicate HREFS
-     * @return A list of Hrefs
-     */
-    public List getAnchorHRefs(boolean duplicate) {
-        if (duplicate) {
-            return this.htmlHandler.getAllAHRefs();
-        }
-        return this.htmlHandler.getAHRefs();
-    }
-
-    /**
-     * Get Link hrefs
-     * @param duplicate Whether you want duplicate Hrefs
-     * @return A list of Hrefs
-     */
-    public List getLinkHRefs(boolean duplicate) {
-        if (duplicate) {
-            return this.htmlHandler.getAllLinkHRefs();
-        }
-        return this.htmlHandler.getLinkHRefs();
-    }
-
-    /**
-     * Get Image src attributes
-     * @param duplicate Whether you want duplicates
-     * @return A list of src Attributes
-     */
-    public List getImageSrcs(boolean duplicate) {
-        if (duplicate) {
-            return this.htmlHandler.getAllImageSrcs();
-        }
-        return this.htmlHandler.getImageSrcs();
-    }
-
-    private Reader getReader(String uri) throws IOException {
-        if (uri.startsWith("http:")) {
-            // uri is url
-            URLConnection connection = new URL(uri).openConnection();
-
-            return new InputStreamReader(connection.getInputStream());
-        }
-        // uri is file
-        return new FileReader(uri);
-    }
-}
diff --git a/src/java/org/apache/lenya/util/HTMLHandler.java b/src/java/org/apache/lenya/util/HTMLHandler.java
deleted file mode 100644
index d9e8c9b..0000000
--- a/src/java/org/apache/lenya/util/HTMLHandler.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.util;
-
-import java.util.ArrayList;
-
-import javax.swing.text.MutableAttributeSet;
-import javax.swing.text.html.HTML;
-import javax.swing.text.html.HTML.Tag;
-import javax.swing.text.html.HTMLEditorKit.ParserCallback;
-
-
-/**
- * HTML handler class
- */
-public class HTMLHandler extends ParserCallback {
-    private ArrayList img_src;
-    private ArrayList img_src_all;
-    private ArrayList a_href;
-    private ArrayList a_href_all;
-    private ArrayList link_href;
-    private ArrayList link_href_all;
-
-    /**
-     * Creates a new HTMLHandler object.
-     */
-    public HTMLHandler() {
-        this.img_src_all = new ArrayList();
-        this.img_src = new ArrayList();
-        this.a_href_all = new ArrayList();
-        this.a_href = new ArrayList();
-        this.link_href_all = new ArrayList();
-        this.link_href = new ArrayList();
-    }
-
-    /**
-     * Handle the start tag
-     * @param tag The tag
-     * @param attributes The set of attributes
-     * @param pos The position
-     */
-    public void handleStartTag(Tag tag, MutableAttributeSet attributes, int pos) {
-        if (tag.equals(HTML.Tag.A)) {
-            String href = (String) attributes.getAttribute(HTML.Attribute.HREF);
-
-            if (href != null) {
-                this.a_href_all.add(href);
-
-                if (!this.a_href.contains(href)) {
-                    this.a_href.add(href);
-                }
-            }
-        }
-    }
-
-    /**
-     * Handle a simple tag
-     * @param tag The tag
-     * @param attributes The set of attributes
-     * @param pos The position
-     */
-    public void handleSimpleTag(Tag tag, MutableAttributeSet attributes, int pos) {
-        if (tag.equals(HTML.Tag.IMG)) {
-            String src = (String) attributes.getAttribute(HTML.Attribute.SRC);
-
-            if (src != null) {
-                this.img_src_all.add(src);
-
-                if (!this.img_src.contains(src)) {
-                    this.img_src.add(src);
-                }
-            }
-        }
-
-        if (tag.equals(HTML.Tag.LINK)) {
-            String href = (String) attributes.getAttribute(HTML.Attribute.HREF);
-
-            if (href != null) {
-                this.link_href_all.add(href);
-
-                if (!this.link_href.contains(href)) {
-                    this.link_href.add(href);
-                }
-            }
-        }
-    }
-
-    /**
-     * Get the list of src attributes for images
-     * @return The list of src attributes
-     */
-    public ArrayList getImageSrcs() {
-        return this.img_src;
-    }
-
-    /**
-     * Get the list of src attributes for all images
-     * @return  The list of src attributes
-     */
-    public ArrayList getAllImageSrcs() {
-        return this.img_src_all;
-    }
-
-    /**
-     * Get a list of links
-     * @return  The list of links
-     */
-    public ArrayList getLinkHRefs() {
-        return this.link_href;
-    }
-
-    /**
-     * Get a list of all links
-     * @return The list of links
-     */
-    public ArrayList getAllLinkHRefs() {
-        return this.link_href_all;
-    }
-
-    /**
-     * Get a list of a href=
-     * @return The list of a href
-     */
-    public ArrayList getAHRefs() {
-        return this.a_href;
-    }
-
-    /**
-     * Get a list of all a href=
-     * @return The list of a href
-     */
-    public ArrayList getAllAHRefs() {
-        return this.a_href_all;
-    }
-}
diff --git a/src/java/org/apache/lenya/util/NamespaceMap.java b/src/java/org/apache/lenya/util/NamespaceMap.java
deleted file mode 100644
index 635ea7e..0000000
--- a/src/java/org/apache/lenya/util/NamespaceMap.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.util;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-
-/**
- * An object of this class provides an easy way to access
- * Strings in a Map that are prefixed like "prefix.foo".
- * The actual map wrapped by this object can contain more
- * key-value-pairs, but you can access only the prefixed keys
- * through the mapper.
- */
-public class NamespaceMap {
-    /**
-     * <code>SEPARATOR</code> The seperator character
-     */
-    public static final String SEPARATOR = ".";
-    private Map map;
-    private String prefix;
-
-    /**
-     * Creates a new NamespaceMap object.
-     * @param _prefix The prefix.
-     */
-    public NamespaceMap(String _prefix) {
-        this(new HashMap(), _prefix);
-    }
-
-    /**
-     * Creates a new NamespaceMap.
-     * @param _map A map containing the prefixed key-value-pairs.
-     * @param _prefix The prefix.
-     */
-    public NamespaceMap(Map _map, String _prefix) {
-        this.map = _map;
-        this.prefix = _prefix;
-    }
-
-    /**
-     * Returns the prefix.
-     * @return A string.
-     */
-    public String getPrefix() {
-        return this.prefix;
-    }
-
-    /**
-     * Returns the namespace prefix.
-     * @return The namespace prefix.
-     */
-    protected Map getMapObject() {
-        return this.map;
-    }
-
-    /**
-     * Returns a map that contains only the un-prefixed key-value-pairs.
-     * @return The map.
-     */
-    public Map getMap() {
-        Map resultMap = new HashMap();
-
-        Set keys = getMapObject().keySet();
-
-        for (Iterator i = keys.iterator(); i.hasNext();) {
-            Object key = i.next();
-
-            if (key instanceof String) {
-                String keyString = (String) key;
-
-                if (keyString.startsWith(getPrefix() + SEPARATOR)) {
-                    resultMap.put(getShortName(getPrefix(), keyString), getMapObject().get(key));
-                }
-            }
-        }
-
-        return resultMap;
-    }
-
-    /**
-     * Puts a value for prefixed key into the map.
-     * @param key The key without prefix.
-     * @param value The value.
-     */
-    public void put(String key, Object value) {
-        getMapObject().put(getFullName(getPrefix(), key), value);
-    }
-
-    /**
-     * Returns the value for a prefixed key.
-     * @param key The key without prefix.
-     * @return The value.
-     */
-    public Object get(String key) {
-        return getMap().get(key);
-    }
-
-    /**
-     * Returns the full (prefixed) key for a short (un-prefixed) key.
-     * @param prefix The prefix.
-     * @param key The un-prefixed key.
-     * @return A string (prefix + {@link #SEPARATOR} + key).
-     */
-    public static String getFullName(String prefix, String key) {
-        return prefix + SEPARATOR + key;
-    }
-
-    /**
-     * Returns the short (un-prefixed) key for a full (prefixed) key.
-     * @param prefix The prefix.
-     * @param key The full (prefixed) key.
-     * @return A string.
-     */
-    public static String getShortName(String prefix, String key) {
-        return key.substring(prefix.length() + SEPARATOR.length());
-    }
-    
-    /**
-     * Puts all prefixed key-value-pairs of map into this map.
-     * @param _map A map.
-     */
-    public void putAll(Map _map) {
-        for (Iterator i = _map.keySet().iterator(); i.hasNext(); ) {
-            String key = (String) i.next();
-            put(key, _map.get(key));
-        }
-    }
-    
-    /**
-     * Returns a map with prefixed keys.
-     * @return A map.
-     */
-    public Map getPrefixedMap() {
-        return new HashMap(getMapObject());
-    }
-    
-}
diff --git a/src/java/org/apache/lenya/util/ServletHelper.java b/src/java/org/apache/lenya/util/ServletHelper.java
deleted file mode 100644
index 6ac801d..0000000
--- a/src/java/org/apache/lenya/util/ServletHelper.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.util;
-
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.cocoon.environment.Request;
-
-/**
- * Servlet utility class.
- */
-public final class ServletHelper {
-	
-    /**
-     * Ctor.
-     */
-    private ServletHelper() {
-        // do nothing
-    }
-
-    /**
-     * Returns the URL inside the web application (without the context prefix). 
-     * @param request The request.
-     * @return A string.
-     */
-    public static String getWebappURI(Request request) {
-        String context = request.getContextPath();
-        String requestUri = request.getRequestURI();
-        return getWebappURI(context, requestUri);
-    }
-
-    /**
-     * Returns the URL inside the web application (without the context prefix). 
-     * @param context The context prefix.
-     * @param requestUri The complete request URI.
-     * @return A string.
-     */
-    public static String getWebappURI(String context, String requestUri) {
-        if (context == null) {
-            context = "";
-        }
-        String url = requestUri.substring(context.length());
-		if (url.length() > 0 && !url.startsWith("/")) {
-			url = "/" + url;
-		}
-		
-        return url;
-    }
-
-    /**
-     * Converts the request parameters to a map.
-     * If a key is mapped to multiple parameters, a string array is used as the value.
-     * @param request The request.
-     * @return A map.
-     */
-    public static Map getParameterMap(Request request) {
-        Map requestParameters = new HashMap();
-        for (Enumeration e = request.getParameterNames(); e.hasMoreElements();) {
-            String key = (String) e.nextElement();
-            String[] values = request.getParameterValues(key);
-            Object value;
-            if (values.length == 1) {
-                value = values[0];
-            }
-            else {
-                value = values;
-            }
-            requestParameters.put(key, value);
-        }
-        return requestParameters;
-    }
-
-}
diff --git a/src/java/org/apache/lenya/util/Stack.java b/src/java/org/apache/lenya/util/Stack.java
deleted file mode 100644
index f7a9599..0000000
--- a/src/java/org/apache/lenya/util/Stack.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.util;
-
-import java.util.Vector;
-
-
-/**
- * A helper class to implement a stack. Unlike java.util.Stack, this stack
- * discards old elements once maxsize is reached.
- * @see java.util.Stack
- */
-public class Stack extends Vector {
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-	int maxsize = 0;
-
-    /**
-     * Creates a new Stack object.
-     * @param _maxsize The maximum size of the stack
-     */
-    public Stack(int _maxsize) {
-        this.maxsize = _maxsize;
-    }
-
-    /**
-     * Push an object on the stack
-     * @param object The object
-     */
-    public void push(Object object) {
-        insertElementAt(object, 0);
-
-        if (size() == (this.maxsize + 1)) {
-            removeElementAt(this.maxsize);
-        }
-    }
-}
diff --git a/src/java/org/apache/lenya/workflow/Action.java b/src/java/org/apache/lenya/workflow/Action.java
deleted file mode 100644
index 50cf862..0000000
--- a/src/java/org/apache/lenya/workflow/Action.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.workflow;
-
-
-/**
- * Workflow action.
- */
-public interface Action {
-	
-    /**
-     * Executes this action for a given workflow instance.
-     * @param resultingVersion The resulting version.
-     * @throws WorkflowException if the execution failed
-     */
-    void execute(Version resultingVersion) throws WorkflowException;
-}
diff --git a/src/java/org/apache/lenya/workflow/BooleanVariable.java b/src/java/org/apache/lenya/workflow/BooleanVariable.java
deleted file mode 100644
index 758abd7..0000000
--- a/src/java/org/apache/lenya/workflow/BooleanVariable.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.workflow;
-
-
-/**
- * <p>Boolean state variable.</p>
- * <p>
- * A workflow schema can contain a set of state variables.
- * For each instance, the state variables hold certain values.
- * Values can be assigned during transitions, so a variable can
- * change its value when a transition fires. Currently,
- * the workflow supports only boolean state variables.
- * </p>
- */
-public interface BooleanVariable {
-	
-    /**
-     * Returns the name of this variable.
-     * @return the name
-     */
-    String getName();
-
-    /**
-     * Returns the initial value of this variable.
-     * @return A boolean value.
-     */
-    boolean getInitialValue();
-}
diff --git a/src/java/org/apache/lenya/workflow/BooleanVariableAssignment.java b/src/java/org/apache/lenya/workflow/BooleanVariableAssignment.java
deleted file mode 100644
index b4067f8..0000000
--- a/src/java/org/apache/lenya/workflow/BooleanVariableAssignment.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.workflow;
-
-
-/**
- * Boolean variable assignment.
- */
-public interface BooleanVariableAssignment extends Action {
-    // do nothing
-}
diff --git a/src/java/org/apache/lenya/workflow/Condition.java b/src/java/org/apache/lenya/workflow/Condition.java
deleted file mode 100644
index 7987711..0000000
--- a/src/java/org/apache/lenya/workflow/Condition.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.workflow;
-
-/**
- * <p>A condition can prevent a transition from firing,
- * based on the current situation. Examples:</p>
- * <ul>
- * <li>Does the current user have a certain role on the current URL?</li>
- * <li>Does a certain state variable have a certain value (e.g., is the document published)? (BooleanVariableCondition)<li>
- * <li>Is the sun shining? (e.g., if the weather report may only be published on sunny days)</li>
- * </ul>
- */
-public interface Condition {
-
-    /**
-     * Returns if the condition is complied in a certain situation.
-     * @param workflow The workflow to use.
-     * @param situation The situation to check.
-     * @param workflowable The workflowable to check the condition on.
-     * @return if the condition is complied.
-     * @throws WorkflowException when the expression could not be evaluated.
-     */
-    boolean isComplied(Workflow workflow, Situation situation, Workflowable workflowable) throws WorkflowException;
-
-    /** Sets the expression for this condition.
-     * @param expression The expression.
-     * @throws WorkflowException when the expression is not valid.
-     */
-    void setExpression(String expression) throws WorkflowException;
-}
diff --git a/src/java/org/apache/lenya/workflow/Situation.java b/src/java/org/apache/lenya/workflow/Situation.java
deleted file mode 100644
index 990faee..0000000
--- a/src/java/org/apache/lenya/workflow/Situation.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.workflow;
-
-/**
- * A situation contains all information that is needed to decide which
- * workflow transitions can fire at a certain moment.
- */
-public interface Situation {
-    // do nothing
-}
diff --git a/src/java/org/apache/lenya/workflow/Transition.java b/src/java/org/apache/lenya/workflow/Transition.java
deleted file mode 100644
index 60156b0..0000000
--- a/src/java/org/apache/lenya/workflow/Transition.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.workflow;
-
-
-/**
- * <p>
- * A transition describes the switching of a workflow instance
- * from one state to another. A transition has
- * </p>
- * 
- * <ul>
- * <li>a source state,</li>
- * <li>a destination state,</li>
- * <li>an event,</li>
- * <li>a set of conditions,</li>
- * <li>a set of assignments.</li>
- * </ul>
- * 
- * <p>
- * Additionally, a transition can be marked as synchronized.
- * </p>
- */
-public interface Transition {
-	
-    /**
-     * Returns the event of this transition.
-     * @return the event
-     */
-    String getEvent();
-    
-    /**
-     * @return The source state.
-     */
-    String getSource();
-    
-    /**
-     * @return The destination state.
-     */
-    String getDestination();
-
-    /**
-     * Returns the actions of this transition.
-     * @return the actions
-     */
-    Action[] getActions();
-    
-    /**
-     * @return The conditions.
-     */
-    Condition[] getConditions();
-
-    /**
-     * Returns if this transition is synchronized.
-     * @return A boolean value.
-     */
-    boolean isSynchronized();
-}
diff --git a/src/java/org/apache/lenya/workflow/Version.java b/src/java/org/apache/lenya/workflow/Version.java
deleted file mode 100644
index b0905a1..0000000
--- a/src/java/org/apache/lenya/workflow/Version.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.workflow;
-
-/**
- * A version of the workflow history.
- * 
- * @version $Id:$
- */
-public interface Version {
-    
-    /**
-     * Returns the event.
-     * @return An event.
-     */
-    String getEvent();
-
-    /**
-     * Returns the state.
-     * @return A state.
-     */
-    String getState();
-    
-    /**
-     * Returns the value of a variable.
-     * @param variableName The variable name.
-     * @return A boolean value.
-     */
-    boolean getValue(String variableName);
-
-    /**
-     * Sets a variable value.
-     * @param variableName The variable name.
-     * @param value The value.
-     */
-    void setValue(String variableName, boolean value);
-    
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/workflow/Workflow.java b/src/java/org/apache/lenya/workflow/Workflow.java
deleted file mode 100644
index ae24e90..0000000
--- a/src/java/org/apache/lenya/workflow/Workflow.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.workflow;
-
-/**
- * <p>A workflow schema.</p>
- * <p>
- * A workflow schema defines a state machine (deterministic finite
- * automaton - DFA), consisting of
- * </p>
- * <ul>
- * <li>states, including a marked initial state,</li>
- * <li>transitions, and</li>
- * <li>state variables.</li>
- */
-public interface Workflow {
-    /**
-     * <code>NAMESPACE</code> Workflow namespace URI
-     */
-    String NAMESPACE = "http://apache.org/cocoon/lenya/workflow/1.0";
-    /**
-     * <code>DEFAULT_PREFIX</code> Default workflow namespace prefix
-     */
-    String DEFAULT_PREFIX = "wf";
-    
-    /**
-     * Returns the initial state of this workflow.
-     * @return The initial state
-     */
-    String getInitialState();
-
-    /**
-     * Returns the transitions that leave a state.
-     * This method is used, e.g., to disable menu items.
-     * @param state A state.
-     * @return The transitions that leave the state.
-     * @throws WorkflowException if the state is not contained.
-     */
-    Transition[] getLeavingTransitions(String state) throws WorkflowException;
-    
-    /**
-     * Returns the variable names.
-     * @return A string array.
-     */
-    String[] getVariableNames();
-    
-    /**
-     * @return The name of this workflow.
-     */
-    String getName();
-    
-    /**
-     * @param variableName The variable name.
-     * @return The initial value of the variable.
-     * @throws WorkflowException if the variable does not exist.
-     */
-    boolean getInitialValue(String variableName) throws WorkflowException;
-    
-    /**
-     * @return The events.
-     */
-    String[] getEvents();
-}
diff --git a/src/java/org/apache/lenya/workflow/WorkflowEngine.java b/src/java/org/apache/lenya/workflow/WorkflowEngine.java
deleted file mode 100644
index f067776..0000000
--- a/src/java/org/apache/lenya/workflow/WorkflowEngine.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.workflow;
-
-/**
- * Workflow engine.
- * 
- * @version $Id:$
- */
-public interface WorkflowEngine {
-
-    /**
-     * Checks if an event can be invoked.
-     * @param workflowable The workflowable.
-     * @param workflow The workflow schema.
-     * @param situation The situation.
-     * @param event The event.
-     * @return A boolean value.
-     * @throws WorkflowException if an error occurs.
-     */
-    boolean canInvoke(Workflowable workflowable, Workflow workflow, Situation situation, String event)
-            throws WorkflowException;
-
-    /**
-     * Invokes an event.
-     * @param workflowable The workflowable.
-     * @param workflow The workflow.
-     * @param situation The situation.
-     * @param event The event.
-     * @throws WorkflowException if an error occurs.
-     */
-    void invoke(Workflowable workflowable, Workflow workflow, Situation situation, String event)
-            throws WorkflowException;
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/workflow/WorkflowException.java b/src/java/org/apache/lenya/workflow/WorkflowException.java
deleted file mode 100644
index 93f7686..0000000
--- a/src/java/org/apache/lenya/workflow/WorkflowException.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.workflow;
-
-
-/**
- * Workflow exception.
- */
-public class WorkflowException extends Exception {
-    /**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/**
-     * Constructor
-     */
-    public WorkflowException() {
-        super();
-    }
-
-    /**
-     * Create a WorkflowException.
-     * @param message The message.
-     */
-    public WorkflowException(String message) {
-        super(message);
-    }
-
-    /**
-     * Create a WorkflowException.
-     * @param message The message.
-     * @param cause The cause.
-     */
-    public WorkflowException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    /**
-     * Create a WorkflowException.
-     * @param cause The cause.
-     */
-    public WorkflowException(Throwable cause) {
-        super(cause);
-    }
-}
diff --git a/src/java/org/apache/lenya/workflow/WorkflowManager.java b/src/java/org/apache/lenya/workflow/WorkflowManager.java
deleted file mode 100644
index d18d535..0000000
--- a/src/java/org/apache/lenya/workflow/WorkflowManager.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.workflow;
-
-/**
- * Manager for workflow issues. This is the main entry point for
- * workflow-related tasks. You can safely invoke all methods for non-workflow
- * documents.
- * 
- * @version $Id: WorkflowManager.java 179751 2005-06-03 09:13:35Z andreas $
- */
-public interface WorkflowManager {
-
-    /**
-     * The Avalon role.
-     */
-    String ROLE = WorkflowManager.class.getName();
-
-    /**
-     * Invokes a workflow event on a document. This is the same as
-     * <code>invoke(Document, String, true)</code>.
-     * @param workflowable The workflowable.
-     * @param event The name of the event.
-     * @throws WorkflowException if the event could not be invoked in the
-     *             current situation.
-     */
-    void invoke(Workflowable workflowable, String event) throws WorkflowException;
-
-    /**
-     * Invokes a workflow event on a document.
-     * @param workflowable The document.
-     * @param event The name of the event.
-     * @param force If this is set to <code>true</code>, the execution is
-     *            forced, which means an exception is thrown if the workflowable in
-     *            the set does not support the event. If set to
-     *            <code>false</code>, non-supporting documents are ignored.
-     * @throws WorkflowException if the event could not be invoked in the
-     *             current situation.
-     */
-    void invoke(Workflowable workflowable, String event, boolean force) throws WorkflowException;
-
-    /**
-     * Checks if an event can be invoked on a document.
-     * @param workflowable The workflowable.
-     * @param event The event.
-     * @return A boolean value.
-     */
-    boolean canInvoke(Workflowable workflowable, String event);
-
-    /**
-     * Checks if a workflowable has a workflow.
-     * @param workflowable The workflowable.
-     * @return A boolean value.
-     */
-    boolean hasWorkflow(Workflowable workflowable);
-
-    /**
-     * Resolves the workflow schema of a workflowable.
-     * @param workflowable The workflowable.
-     * @return A workflow schema.
-     * @throws WorkflowException if the document has no workflow.
-     */
-    Workflow getWorkflowSchema(Workflowable workflowable) throws WorkflowException;
-
-    /**
-     * Resolves the current workflow situation.
-     * @return A situation object.
-     */
-    Situation getSituation();
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/workflow/Workflowable.java b/src/java/org/apache/lenya/workflow/Workflowable.java
deleted file mode 100644
index 88617e4..0000000
--- a/src/java/org/apache/lenya/workflow/Workflowable.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.workflow;
-
-/**
- * Interface for objects which can be workflowed.
- *
- * @version $Id$
- */
-public interface Workflowable {
-
-    /**
-     * @return The versions in chronological order.
-     */
-    Version[] getVersions();
-    
-    /**
-     * @return The latest version.
-     */
-    Version getLatestVersion();
-    
-    /**
-     * Adds a new version.
-     * @param workflow The workflow.
-     * @param version The version.
-     * @param situation The situation in which the version was added.
-     */
-    void newVersion(Workflow workflow, Version version, Situation situation);
-    
-    /**
-     * @return The URI to resolve the schema configuration from.
-     */
-    String getWorkflowSchemaURI();
-    
-}
diff --git a/src/java/org/apache/lenya/workflow/impl/AbstractCondition.java b/src/java/org/apache/lenya/workflow/impl/AbstractCondition.java
deleted file mode 100644
index 736db49..0000000
--- a/src/java/org/apache/lenya/workflow/impl/AbstractCondition.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.workflow.impl;
-
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.lenya.workflow.Condition;
-import org.apache.lenya.workflow.WorkflowException;
-
-/**
- * Abstract base class for workflow conditions.
- */
-public abstract class AbstractCondition extends AbstractLogEnabled implements Condition {
-
-    private String expression;
-
-    /**
-     * @see org.apache.lenya.workflow.impl.AbstractCondition#setExpression(java.lang.String)
-     */
-    public void setExpression(String ex) throws WorkflowException {
-        this.expression = ex.trim();
-    }
-
-    /**
-     * Returns the expression of this condition.
-     * @return A string.
-     */
-    public String getExpression() {
-        return this.expression;
-    }
-
-    /**
-     * @see java.lang.Object#toString()
-     */
-    public String toString() {
-        return getExpression();
-    }
-    
-}
diff --git a/src/java/org/apache/lenya/workflow/impl/ActionImpl.java b/src/java/org/apache/lenya/workflow/impl/ActionImpl.java
deleted file mode 100644
index 6a0190f..0000000
--- a/src/java/org/apache/lenya/workflow/impl/ActionImpl.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.workflow.impl;
-
-import org.apache.lenya.workflow.Action;
-
-/**
- * Basic action implementation.
- */
-public abstract class ActionImpl implements Action {
-    
-    /**
-     * Creates a new instance of ActionImpl.
-     * @param actionId The action ID.
-     */
-    protected ActionImpl(String actionId) {
-        this.id = actionId;
-    }
-
-    private String id;
-
-    /**
-     * Returns the action ID.
-     * @return A string.
-     */
-    public String getId() {
-        return this.id;
-    }
-
-    /**
-     * @see java.lang.Object#toString()
-     */
-    public String toString() {
-        return getId();
-    }
-
-}
diff --git a/src/java/org/apache/lenya/workflow/impl/BooleanVariableAssignmentImpl.java b/src/java/org/apache/lenya/workflow/impl/BooleanVariableAssignmentImpl.java
deleted file mode 100644
index 1cd487e..0000000
--- a/src/java/org/apache/lenya/workflow/impl/BooleanVariableAssignmentImpl.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.workflow.impl;
-
-import org.apache.lenya.workflow.BooleanVariableAssignment;
-import org.apache.lenya.workflow.Version;
-import org.apache.lenya.workflow.WorkflowException;
-
-/**
- * Implementation of a boolean variable assignment.
- */
-public class BooleanVariableAssignmentImpl implements BooleanVariableAssignment {
-    
-    /**
-     * Ctor.
-     * @param name The variable name.
-     * @param value The value.
-     */
-    protected BooleanVariableAssignmentImpl(String name, boolean value) {
-        this.variable = name;
-        this.value = value;
-    }
-
-    private String variable;
-    private boolean value;
-
-    /**
-     * @see org.apache.lenya.workflow.Action#execute(org.apache.lenya.workflow.Version)
-     */
-    public void execute(Version resultingVersion) throws WorkflowException {
-        resultingVersion.setValue(getVariable(), getValue());
-    }
-
-    /**
-     * Returns the value of this assignment.
-     * @return A boolean value.
-     */
-    public boolean getValue() {
-        return this.value;
-    }
-
-    /**
-     * Returns the variable of this assignment.
-     * @return A variable.
-     */
-    public String getVariable() {
-        return this.variable;
-    }
-}
diff --git a/src/java/org/apache/lenya/workflow/impl/BooleanVariableCondition.java b/src/java/org/apache/lenya/workflow/impl/BooleanVariableCondition.java
deleted file mode 100644
index 37e62da..0000000
--- a/src/java/org/apache/lenya/workflow/impl/BooleanVariableCondition.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.workflow.impl;
-
-import org.apache.lenya.workflow.Situation;
-import org.apache.lenya.workflow.Version;
-import org.apache.lenya.workflow.Workflow;
-import org.apache.lenya.workflow.WorkflowException;
-import org.apache.lenya.workflow.Workflowable;
-
-/**
- * Implementation of a boolean variable condition.
- */
-public class BooleanVariableCondition extends AbstractCondition {
-
-    private String variableName;
-    private boolean value;
-
-    /**
-     * Returns the variable value to check.
-     * @return A boolean value.
-     */
-    protected boolean getValue() {
-        return this.value;
-    }
-
-    /**
-     * Returns the variable name to check.
-     * @return A string.
-     */
-    protected String getVariableName() {
-        return this.variableName;
-    }
-
-    /**
-     * @see org.apache.lenya.workflow.Condition#setExpression(java.lang.String)
-     */
-    public void setExpression(String expression) throws WorkflowException {
-        super.setExpression(expression);
-        String[] sides = expression.split("=");
-        if (sides.length != 2) {
-            throw new WorkflowException("The expression '" + expression
-                    + "' must be of the form 'name = [true|false]'");
-        }
-
-        this.variableName = sides[0].trim();
-        this.value = Boolean.valueOf(sides[1].trim()).booleanValue();
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Expression:    [" + sides[1].trim() + "]");
-            getLogger().debug("Setting value: [" + this.value + "]");
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.workflow.Condition#isComplied(org.apache.lenya.workflow.Workflow,
-     *      org.apache.lenya.workflow.Situation,
-     *      org.apache.lenya.workflow.Workflowable)
-     */
-public boolean isComplied(Workflow workflow, Situation situation, Workflowable workflowable) throws WorkflowException {
-        Version latestVersion = workflowable.getLatestVersion();
-        boolean value = false;
-        if (latestVersion == null) {
-            value = workflow.getInitialValue(getVariableName());
-        }
-        else {
-            value = latestVersion.getValue(getVariableName());
-        }
-        
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Checking boolean variable condition");
-            getLogger().debug("    Condition value: [" + getValue() + "]");
-            getLogger().debug("    Variable value:  [" + value + "]");
-        }
-        return value == getValue();
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/workflow/impl/BooleanVariableImpl.java b/src/java/org/apache/lenya/workflow/impl/BooleanVariableImpl.java
deleted file mode 100644
index 6483823..0000000
--- a/src/java/org/apache/lenya/workflow/impl/BooleanVariableImpl.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.workflow.impl;
-
-import org.apache.lenya.workflow.BooleanVariable;
-
-
-/**
- * Implementation of a boolean variable.
- */
-public class BooleanVariableImpl implements BooleanVariable {
-    
-    /**
-     * Creates a new instance of BooleanVariableImpl.
-     * @param variableName The variable name.
-     * @param _initialValue The initial value of the corresponding variable instances.
-     */
-    protected BooleanVariableImpl(String variableName, boolean _initialValue) {
-        this.name = variableName;
-        this.initialValue = _initialValue;
-    }
-
-    private String name;
-
-    /**
-     * @see org.apache.lenya.workflow.BooleanVariable#getName()
-     */
-    public String getName() {
-        return this.name;
-    }
-
-    private boolean initialValue;
-
-    /**
-     * @see org.apache.lenya.workflow.BooleanVariable#getInitialValue()
-     */
-    public boolean getInitialValue() {
-        return this.initialValue;
-    }
-}
diff --git a/src/java/org/apache/lenya/workflow/impl/ConditionFactory.java b/src/java/org/apache/lenya/workflow/impl/ConditionFactory.java
deleted file mode 100644
index c5f0b3b..0000000
--- a/src/java/org/apache/lenya/workflow/impl/ConditionFactory.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.workflow.impl;
-
-import org.apache.avalon.framework.container.ContainerUtil;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.lenya.workflow.Condition;
-import org.apache.lenya.workflow.WorkflowException;
-
-
-/**
- * Factory to build conditions.
- */
-public final class ConditionFactory extends AbstractLogEnabled {
-    
-    /**
-     * Ctor.
-     * @param logger The logger to use.
-     */
-    public ConditionFactory(Logger logger) {
-        ContainerUtil.enableLogging(this, logger);
-    }
-
-    /**
-     * Creates a condition.
-     * @param className The condition class name.
-     * @param expression The condition expression.
-     * @return A condition.
-     * @throws WorkflowException when creating the condition failed.
-     */
-    protected Condition createCondition(String className, String expression)
-        throws WorkflowException {
-
-        Condition condition;
-
-        try {
-            Class clazz = Class.forName(className);
-            condition = (Condition) clazz.newInstance();
-            ContainerUtil.enableLogging(condition, getLogger());
-            condition.setExpression(expression);
-        } catch (ClassNotFoundException e) {
-            throw new WorkflowException(e);
-        } catch (InstantiationException e) {
-            throw new WorkflowException(e);
-        } catch (IllegalAccessException e) {
-            throw new WorkflowException(e);
-        }
-
-        return condition;
-    }
-}
diff --git a/src/java/org/apache/lenya/workflow/impl/SituationImpl.java b/src/java/org/apache/lenya/workflow/impl/SituationImpl.java
deleted file mode 100644
index 8a1c3fb..0000000
--- a/src/java/org/apache/lenya/workflow/impl/SituationImpl.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.workflow.impl;
-
-import org.apache.lenya.workflow.Situation;
-
-/**
- * Simple situation.
- * 
- * @version $Id:$
- */
-public class SituationImpl implements Situation {
-
-}
diff --git a/src/java/org/apache/lenya/workflow/impl/TransitionImpl.java b/src/java/org/apache/lenya/workflow/impl/TransitionImpl.java
deleted file mode 100644
index c644cbf..0000000
--- a/src/java/org/apache/lenya/workflow/impl/TransitionImpl.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.workflow.impl;
-
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.lenya.workflow.Action;
-import org.apache.lenya.workflow.Condition;
-import org.apache.lenya.workflow.Transition;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Implementation of a transition.
- */
-public class TransitionImpl extends AbstractLogEnabled implements Transition {
-
-    /**
-     * Ctor.
-     * @param sourceState The source state.
-     * @param destinationState The destination state.
-     */
-    protected TransitionImpl(String sourceState, String destinationState) {
-        this.source = sourceState;
-        this.destination = destinationState;
-    }
-
-    private List actions = new ArrayList();
-    private boolean isSynchronized = false;
-
-    /**
-     * Returns the actions which are assigned tothis transition.
-     * @return An array of actions.
-     */
-    public Action[] getActions() {
-        return (Action[]) this.actions.toArray(new Action[this.actions.size()]);
-    }
-
-    /**
-     * Assigns an action to this transition.
-     * @param action The action.
-     */
-    public void addAction(Action action) {
-        this.actions.add(action);
-    }
-
-    private List conditions = new ArrayList();
-
-    /**
-     * @see org.apache.lenya.workflow.Transition#getConditions()
-     */
-    public Condition[] getConditions() {
-        return (Condition[]) this.conditions.toArray(new Condition[this.conditions.size()]);
-    }
-
-    /**
-     * Assigns a condition to this transition.
-     * @param condition The condition.
-     */
-    public void addCondition(Condition condition) {
-        this.conditions.add(condition);
-    }
-
-    private String event;
-
-    /**
-     * Returns the event which invokes this transition.
-     * @return An event.
-     */
-    public String getEvent() {
-        return this.event;
-    }
-
-    /**
-     * Sets the event to invoke this transition.
-     * @param anEvent An event.
-     */
-    public void setEvent(String anEvent) {
-        this.event = anEvent;
-    }
-
-    private String source;
-
-    /**
-     * @see org.apache.lenya.workflow.Transition#getSource()
-     */
-    public String getSource() {
-        return this.source;
-    }
-
-    private String destination;
-
-    /**
-     * @see org.apache.lenya.workflow.Transition#getDestination()
-     */
-    public String getDestination() {
-        return this.destination;
-    }
-
-    /**
-     * @see java.lang.Object#toString()
-     */
-    public String toString() {
-        StringBuffer buf = new StringBuffer();
-        buf.append(getEvent() + " [");
-        Condition[] _conditions = getConditions();
-
-        for (int i = 0; i < _conditions.length; i++) {
-            if (i > 0) {
-                buf.append(", ");
-            }
-
-            buf.append(_conditions[i].toString());
-        }
-
-        buf.append("]");
-
-        Action[] _actions = getActions();
-
-        if (_actions.length > 0) {
-            buf.append(" / ");
-
-            for (int i = 0; i < _actions.length; i++) {
-                if (i > 0) {
-                    buf.append(", ");
-                }
-
-                buf.append(_actions[i].toString());
-            }
-        }
-
-        return buf.toString();
-    }
-
-    /**
-     * Returns if this transition is synchronized.
-     * @return A boolean value.
-     */
-    public boolean isSynchronized() {
-        return this.isSynchronized;
-    }
-
-    /**
-     * Sets if this transition is synchronized.
-     * @param _isSynchronized A boolean value.
-     */
-    protected void setSynchronized(boolean _isSynchronized) {
-        this.isSynchronized = _isSynchronized;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/workflow/impl/VersionImpl.java b/src/java/org/apache/lenya/workflow/impl/VersionImpl.java
deleted file mode 100644
index f2b73f4..0000000
--- a/src/java/org/apache/lenya/workflow/impl/VersionImpl.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.workflow.impl;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.lenya.workflow.Version;
-
-/**
- * A version of the workflow history.
- */
-public class VersionImpl implements Version {
-
-    private String event;
-    private String state;
-    private Map variableValues = new HashMap();
-    
-    /**
-     * @see org.apache.lenya.workflow.Version#getEvent()
-     */
-    public String getEvent() {
-        return this.event;
-    }
-
-    /**
-     * @see org.apache.lenya.workflow.Version#getState()
-     */
-    public String getState() {
-        return this.state;
-    }
-
-    /**
-     * Ctor.
-     * @param _event The event that caused the version change.
-     * @param _state The destination state.
-     */
-    public VersionImpl(String _event, String _state) {
-        this.event = _event;
-        this.state = _state;
-    }
-
-    /**
-     * @see org.apache.lenya.workflow.Version#getValue(java.lang.String)
-     */
-    public boolean getValue(String variableName) {
-        Boolean value = (Boolean) this.variableValues.get(variableName);
-        return value.booleanValue();
-    }
-
-    /**
-     * @see org.apache.lenya.workflow.Version#setValue(java.lang.String, boolean)
-     */
-    public void setValue(String variableName, boolean value) {
-        this.variableValues.put(variableName, Boolean.valueOf(value));
-    }
-
-}
diff --git a/src/java/org/apache/lenya/workflow/impl/WorkflowBuilder.java b/src/java/org/apache/lenya/workflow/impl/WorkflowBuilder.java
deleted file mode 100644
index 4e07730..0000000
--- a/src/java/org/apache/lenya/workflow/impl/WorkflowBuilder.java
+++ /dev/null
@@ -1,284 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.workflow.impl;
-
-import java.io.File;
-
-import org.apache.avalon.framework.container.ContainerUtil;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.lenya.workflow.Condition;
-import org.apache.lenya.workflow.Workflow;
-import org.apache.lenya.workflow.WorkflowException;
-import org.apache.lenya.xml.DocumentHelper;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-/**
- * Utility class to build a workflow schema from a file.
- */
-public class WorkflowBuilder extends AbstractLogEnabled {
-
-    /**
-     * Ctor.
-     * @param logger The logger to use.
-     */
-    public WorkflowBuilder(Logger logger) {
-        ContainerUtil.enableLogging(this, logger);
-    }
-
-    /**
-     * Builds a workflow schema from a file.
-     * @param name The workflow name.
-     * @param file The file.
-     * @return A workflow schema implementation.
-     * @throws WorkflowException if the file does not represent a valid workflow
-     *             schema.
-     */
-    public WorkflowImpl buildWorkflow(String name, File file) throws WorkflowException {
-        WorkflowImpl workflow;
-
-        try {
-            Document document = DocumentHelper.readDocument(file);
-            workflow = buildWorkflow(name, document);
-        } catch (Exception e) {
-            throw new WorkflowException(e);
-        }
-
-        return workflow;
-    }
-
-    /**
-     * Builds a workflow object from an XML document.
-     * @param name The workflow name.
-     * @param document The XML document.
-     * @return A workflow implementation.
-     * @throws WorkflowException when something went wrong.
-     */
-    protected WorkflowImpl buildWorkflow(String name, Document document) throws WorkflowException {
-
-        Element root = document.getDocumentElement();
-        String initialState = null;
-
-        // load states
-        NodeList stateElements = root.getElementsByTagNameNS(Workflow.NAMESPACE, STATE_ELEMENT);
-
-        for (int i = 0; i < stateElements.getLength(); i++) {
-            Element element = (Element) stateElements.item(i);
-            String state = buildState(element);
-
-            if (isInitialStateElement(element)) {
-                initialState = state;
-            }
-        }
-
-        WorkflowImpl workflow = new WorkflowImpl(name, initialState);
-
-        // load variables
-        NodeList variableElements = root.getElementsByTagNameNS(Workflow.NAMESPACE,
-                VARIABLE_ELEMENT);
-
-        for (int i = 0; i < variableElements.getLength(); i++) {
-            Element element = (Element) variableElements.item(i);
-            BooleanVariableImpl variable = buildVariable(element);
-            workflow.addVariable(variable);
-        }
-
-        // load events
-        NodeList eventElements = root.getElementsByTagNameNS(Workflow.NAMESPACE, EVENT_ELEMENT);
-
-        for (int i = 0; i < eventElements.getLength(); i++) {
-            String event = buildEvent((Element) eventElements.item(i));
-            workflow.addEvent(event);
-        }
-
-        // load transitions
-        NodeList transitionElements = root.getElementsByTagNameNS(Workflow.NAMESPACE,
-                TRANSITION_ELEMENT);
-
-        for (int i = 0; i < transitionElements.getLength(); i++) {
-            TransitionImpl transition = buildTransition((Element) transitionElements.item(i));
-            workflow.addTransition(transition);
-        }
-
-        return workflow;
-    }
-
-    /**
-     * Checks if a state element contains the initial state.
-     * @param element An XML element.
-     * @return A boolean value.
-     */
-    protected boolean isInitialStateElement(Element element) {
-        String initialAttribute = element.getAttribute(INITIAL_ATTRIBUTE);
-
-        return (initialAttribute != null)
-                && (initialAttribute.equals("yes") || initialAttribute.equals("true"));
-    }
-
-    protected static final String STATE_ELEMENT = "state";
-    protected static final String TRANSITION_ELEMENT = "transition";
-    protected static final String EVENT_ELEMENT = "event";
-    protected static final String CONDITION_ELEMENT = "condition";
-    protected static final String ACTION_ELEMENT = "action";
-    protected static final String ID_ATTRIBUTE = "id";
-    protected static final String INITIAL_ATTRIBUTE = "initial";
-    protected static final String SOURCE_ATTRIBUTE = "source";
-    protected static final String DESTINATION_ATTRIBUTE = "destination";
-    protected static final String CLASS_ATTRIBUTE = "class";
-    protected static final String VARIABLE_ELEMENT = "variable";
-    protected static final String ASSIGNMENT_ELEMENT = "assign";
-    protected static final String VARIABLE_ATTRIBUTE = "variable";
-    protected static final String VALUE_ATTRIBUTE = "value";
-    protected static final String NAME_ATTRIBUTE = "name";
-    protected static final String SYNCHRONIZED_ATTRIBUTE = "synchronized";
-
-    /**
-     * Builds a state from an XML element.
-     * @param element An XML element.
-     * @return A state.
-     */
-    protected String buildState(Element element) {
-        return element.getAttribute(ID_ATTRIBUTE);
-    }
-
-    /**
-     * Builds a transition from an XML element.
-     * @param element An XML element.
-     * @return A transition.
-     * @throws WorkflowException when something went wrong.
-     */
-    protected TransitionImpl buildTransition(Element element) throws WorkflowException {
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Building transition");
-        }
-
-        String source = element.getAttribute(SOURCE_ATTRIBUTE);
-        String destination = element.getAttribute(DESTINATION_ATTRIBUTE);
-
-        TransitionImpl transition = new TransitionImpl(source, destination);
-        ContainerUtil.enableLogging(transition, getLogger());
-
-        // set event
-        Element eventElement = (Element) element.getElementsByTagNameNS(Workflow.NAMESPACE,
-                EVENT_ELEMENT).item(0);
-        String event = eventElement.getAttribute(ID_ATTRIBUTE);
-        transition.setEvent(event);
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("    Event: [" + event + "]");
-        }
-
-        // load conditions
-        NodeList conditionElements = element.getElementsByTagNameNS(Workflow.NAMESPACE,
-                CONDITION_ELEMENT);
-
-        for (int i = 0; i < conditionElements.getLength(); i++) {
-            Condition condition = buildCondition((Element) conditionElements.item(i));
-            transition.addCondition(condition);
-        }
-
-        // load assignments
-        NodeList assignmentElements = element.getElementsByTagNameNS(Workflow.NAMESPACE,
-                ASSIGNMENT_ELEMENT);
-
-        for (int i = 0; i < assignmentElements.getLength(); i++) {
-            BooleanVariableAssignmentImpl action = buildAssignment((Element) assignmentElements
-                    .item(i));
-            transition.addAction(action);
-        }
-
-        // load actions
-        /*
-         * NodeList actionElements = element
-         * .getElementsByTagNameNS(Workflow.NAMESPACE, ACTION_ELEMENT);
-         * 
-         * for (int i = 0; i < actionElements.getLength(); i++) { Action action =
-         * buildAction((Element) actionElements.item(i));
-         * transition.addAction(action); }
-         */
-
-        // set synchronization
-        if (element.hasAttribute(SYNCHRONIZED_ATTRIBUTE)) {
-            Boolean isSynchronized = Boolean.valueOf(element.getAttribute(SYNCHRONIZED_ATTRIBUTE));
-            transition.setSynchronized(isSynchronized.booleanValue());
-        }
-
-        return transition;
-    }
-
-    /**
-     * Builds an event from an XML element.
-     * @param element An XML element.
-     * @return An event.
-     */
-    protected String buildEvent(Element element) {
-        return element.getAttribute(ID_ATTRIBUTE);
-    }
-
-    private ConditionFactory conditionFactory = null;
-
-    /**
-     * Builds a condition from an XML element.
-     * @param element An XML element.
-     * @return A condition.
-     * @throws WorkflowException when something went wrong.
-     */
-    protected Condition buildCondition(Element element) throws WorkflowException {
-        String className = element.getAttribute(CLASS_ATTRIBUTE);
-        String expression = DocumentHelper.getSimpleElementText(element);
-        if (this.conditionFactory == null) {
-            this.conditionFactory = new ConditionFactory(getLogger());
-        }
-        Condition condition = this.conditionFactory.createCondition(className, expression);
-
-        return condition;
-    }
-
-    /**
-     * Builds a boolean variable from an XML element.
-     * @param element An XML element.
-     * @return A boolean variable.
-     */
-    protected BooleanVariableImpl buildVariable(Element element) {
-        String name = element.getAttribute(NAME_ATTRIBUTE);
-        String value = element.getAttribute(VALUE_ATTRIBUTE);
-
-        return new BooleanVariableImpl(name, Boolean.getBoolean(value));
-    }
-
-    /**
-     * Builds an assignment object from an XML element.
-     * @param element An XML element.
-     * @return An assignment object.
-     * @throws WorkflowException when something went wrong.
-     */
-    protected BooleanVariableAssignmentImpl buildAssignment(Element element)
-            throws WorkflowException {
-        String variableName = element.getAttribute(VARIABLE_ATTRIBUTE);
-
-        String valueString = element.getAttribute(VALUE_ATTRIBUTE);
-        boolean value = Boolean.valueOf(valueString).booleanValue();
-
-        return new BooleanVariableAssignmentImpl(variableName, value);
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/workflow/impl/WorkflowEngineImpl.java b/src/java/org/apache/lenya/workflow/impl/WorkflowEngineImpl.java
deleted file mode 100644
index 22ab980..0000000
--- a/src/java/org/apache/lenya/workflow/impl/WorkflowEngineImpl.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.workflow.impl;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.lenya.workflow.Action;
-import org.apache.lenya.workflow.Condition;
-import org.apache.lenya.workflow.Situation;
-import org.apache.lenya.workflow.Transition;
-import org.apache.lenya.workflow.Version;
-import org.apache.lenya.workflow.Workflow;
-import org.apache.lenya.workflow.WorkflowEngine;
-import org.apache.lenya.workflow.WorkflowException;
-import org.apache.lenya.workflow.Workflowable;
-
-/**
- * Workflow engine implementation.
- * 
- * @version $Id:$
- */
-public class WorkflowEngineImpl implements WorkflowEngine {
-
-    /**
-     * @see org.apache.lenya.workflow.WorkflowEngine#canInvoke(org.apache.lenya.workflow.Workflowable,
-     *      org.apache.lenya.workflow.Workflow, Situation, java.lang.String)
-     */
-    public boolean canInvoke(Workflowable workflowable, Workflow workflow, Situation situation,
-            String event) throws WorkflowException {
-        List firingTransitions = getFiringTransitions(workflowable, workflow, situation, event);
-        return firingTransitions.size() == 1;
-    }
-
-    /**
-     * @see org.apache.lenya.workflow.WorkflowEngine#invoke(org.apache.lenya.workflow.Workflowable,
-     *      org.apache.lenya.workflow.Workflow, Situation, java.lang.String)
-     */
-    public void invoke(Workflowable workflowable, Workflow workflow, Situation situation,
-            String event) throws WorkflowException {
-
-        Transition firingTransition = null;
-        List firingTransitions = getFiringTransitions(workflowable, workflow, situation, event);
-
-        if (firingTransitions.size() == 0) {
-            throw new WorkflowException("No transition can fire!");
-        } else if (firingTransitions.size() > 1) {
-            throw new WorkflowException("More than one transitions can fire!");
-        } else {
-            firingTransition = (Transition) firingTransitions.get(0);
-        }
-
-        String destination = firingTransition.getDestination();
-
-        Version newVersion = createNewVersion(workflowable, workflow, event, destination);
-
-        Action[] actions = firingTransition.getActions();
-        for (int i = 0; i < actions.length; i++) {
-            actions[i].execute(newVersion);
-        }
-
-        workflowable.newVersion(workflow, newVersion, situation);
-    }
-
-    /**
-     * Creates a new version.
-     * @param workflowable The workflowable.
-     * @param workflow The workflow.
-     * @param event The event.
-     * @param destination The destination.
-     * @return A version.
-     * @throws WorkflowException if an error occurs.
-     */
-    protected Version createNewVersion(Workflowable workflowable, Workflow workflow, String event,
-            String destination) throws WorkflowException {
-        Version latestVersion = workflowable.getLatestVersion();
-        Version newVersion = new VersionImpl(event, destination);
-        String[] variableNames = workflow.getVariableNames();
-        for (int i = 0; i < variableNames.length; i++) {
-            String name = variableNames[i];
-            boolean value;
-            if (latestVersion == null) {
-                value = workflow.getInitialValue(name);
-            } else {
-                value = latestVersion.getValue(name);
-            }
-            newVersion.setValue(name, value);
-        }
-        return newVersion;
-    }
-
-    /**
-     * Returns the transitions that would fire in a certain situation.
-     * @param workflowable The workflowable.
-     * @param workflow The workflow.
-     * @param situation The situation.
-     * @param event The event.
-     * @return A list of transitions.
-     * @throws WorkflowException if an error occurs.
-     */
-    protected List getFiringTransitions(Workflowable workflowable, Workflow workflow,
-            Situation situation, String event) throws WorkflowException {
-        Version lastVersion = workflowable.getLatestVersion();
-        
-        String currentState;
-        if (lastVersion == null) {
-            currentState = workflow.getInitialState();
-        }
-        else {
-            currentState = lastVersion.getState();
-        }
-        
-        Transition[] transitions = workflow.getLeavingTransitions(currentState);
-        List firingTransitions = new ArrayList();
-
-        for (int i = 0; i < transitions.length; i++) {
-            if (transitions[i].getEvent().equals(event)
-                    && canFire(transitions[i], workflow, situation, workflowable)) {
-                firingTransitions.add(transitions[i]);
-            }
-        }
-        return firingTransitions;
-    }
-
-    /**
-     * Checks if a transition can fire.
-     * @param transition The transition.
-     * @param workflow The workflow.
-     * @param situation The situation.
-     * @param workflowable The workflowable.
-     * @return A boolean value.
-     * @throws WorkflowException if an error occurs.
-     */
-    public boolean canFire(Transition transition, Workflow workflow, Situation situation,
-            Workflowable workflowable) throws WorkflowException {
-        Condition[] _conditions = transition.getConditions();
-        boolean canFire = true;
-
-        int i = 0;
-        while (canFire && i < _conditions.length) {
-            canFire = canFire && _conditions[i].isComplied(workflow, situation, workflowable);
-            i++;
-        }
-
-        return canFire;
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/workflow/impl/WorkflowImpl.java b/src/java/org/apache/lenya/workflow/impl/WorkflowImpl.java
deleted file mode 100644
index 4731a05..0000000
--- a/src/java/org/apache/lenya/workflow/impl/WorkflowImpl.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.workflow.impl;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.lenya.workflow.Transition;
-import org.apache.lenya.workflow.Workflow;
-import org.apache.lenya.workflow.WorkflowException;
-
-/**
- * Implementation of a workflow schema.
- */
-public class WorkflowImpl implements Workflow {
-
-    /**
-     * Creates a new instance of WorkflowImpl.
-     * @param _name The name.
-     * @param _initialState the initial state of the workflow.
-     */
-    protected WorkflowImpl(String _name, String _initialState) {
-        this.initialState = _initialState;
-        this.name = _name;
-        addState(_initialState);
-    }
-
-    private String initialState;
-    private String name;
-
-    /**
-     * Returns the initial state of this workflow.
-     * @return The initial state.
-     *  
-     */
-    public String getInitialState() {
-        return this.initialState;
-    }
-
-    private Set transitions = new HashSet();
-    private Set states = new HashSet();
-
-    /**
-     * Adds a state.
-     * @param state A state.
-     */
-    private void addState(String state) {
-        this.states.add(state);
-    }
-
-    /**
-     * Adds a transition.
-     * @param transition The transition.
-     */
-    protected void addTransition(TransitionImpl transition) {
-        this.transitions.add(transition);
-        addState(transition.getSource());
-        addState(transition.getDestination());
-    }
-
-    /**
-     * Returns the transitions.
-     * @return An array of transitions.
-     */
-    protected TransitionImpl[] getTransitions() {
-        return (TransitionImpl[]) this.transitions.toArray(new TransitionImpl[this.transitions.size()]);
-    }
-
-    /**
-     * @see org.apache.lenya.workflow.Workflow#getLeavingTransitions(java.lang.String)
-     */
-    public Transition[] getLeavingTransitions(String state) throws WorkflowException {
-        Set leavingTransitions = new HashSet();
-        TransitionImpl[] _transitions = getTransitions();
-        for (int i = 0; i < _transitions.length; i++) {
-            if (_transitions[i].getSource().equals(state)) {
-                leavingTransitions.add(_transitions[i]);
-            }
-        }
-
-        return (Transition[]) leavingTransitions.toArray(new Transition[leavingTransitions.size()]);
-    }
-
-    /**
-     * Checks if this workflow contains a state.
-     * @param state The state to check.
-     * @return <code>true</code> if the state is contained, <code>false</code>
-     *         otherwise.
-     */
-    protected boolean containsState(String state) {
-        return this.states.contains(state);
-    }
-
-    /**
-     * Returns the states.
-     * @return An array of states.
-     */
-    protected String[] getStates() {
-        return (String[]) this.states.toArray(new String[this.states.size()]);
-    }
-
-    private Set events = new HashSet();
-
-    /**
-     * Adds an event.
-     * @param event An event.
-     */
-    protected void addEvent(String event) {
-        this.events.add(event);
-    }
-
-    private Map variables = new HashMap();
-
-    /**
-     * Adds a variable.
-     * @param variable A variable.
-     */
-    protected void addVariable(BooleanVariableImpl variable) {
-        this.variables.put(variable.getName(), variable);
-    }
-
-    /**
-     * Returns the variable for a certain name.
-     * @param _name The name of the variable.
-     * @return A variable.
-     * @throws WorkflowException if no variable with the given name exists.
-     */
-    public BooleanVariableImpl getVariable(String _name) throws WorkflowException {
-        if (!this.variables.containsKey(_name)) {
-            throw new WorkflowException("Workflow does not contain the variable '" + _name + "'!");
-        }
-
-        return (BooleanVariableImpl) this.variables.get(_name);
-    }
-
-    /**
-     * Returns the variables.
-     * @return An array of variables.
-     */
-    protected BooleanVariableImpl[] getVariables() {
-        return (BooleanVariableImpl[]) this.variables.values().toArray(new BooleanVariableImpl[this.variables
-                .size()]);
-    }
-
-    /**
-     * @see org.apache.lenya.workflow.Workflow#getVariableNames()
-     */
-    public String[] getVariableNames() {
-        BooleanVariableImpl[] _variables = getVariables();
-        String[] names = new String[_variables.length];
-        for (int i = 0; i < names.length; i++) {
-            names[i] = _variables[i].getName();
-        }
-        return names;
-    }
-
-    /**
-     * @see org.apache.lenya.workflow.Workflow#getName()
-     */
-    public String getName() {
-        return this.name;
-    }
-
-    /**
-     * @see org.apache.lenya.workflow.Workflow#getInitialValue(java.lang.String)
-     */
-    public boolean getInitialValue(String variableName) throws WorkflowException {
-        BooleanVariableImpl[] variables = getVariables();
-        for (int i = 0; i < variables.length; i++) {
-            if (variables[i].getName().equals(variableName)) {
-                return variables[i].getInitialValue();
-            }
-        }
-        throw new WorkflowException("The variable [" + variableName + "] does not exist.");
-    }
-
-    /**
-     * @see org.apache.lenya.workflow.Workflow#getEvents()
-     */
-    public String[] getEvents() {
-        return (String[]) this.events.toArray(new String[this.events.size()]);
-    }
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/workflow/impl/WorkflowManagerImpl.java b/src/java/org/apache/lenya/workflow/impl/WorkflowManagerImpl.java
deleted file mode 100644
index efd01fe..0000000
--- a/src/java/org/apache/lenya/workflow/impl/WorkflowManagerImpl.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.workflow.impl;
-
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.lenya.cms.cocoon.source.SourceUtil;
-import org.apache.lenya.workflow.Situation;
-import org.apache.lenya.workflow.Workflow;
-import org.apache.lenya.workflow.WorkflowEngine;
-import org.apache.lenya.workflow.WorkflowException;
-import org.apache.lenya.workflow.WorkflowManager;
-import org.apache.lenya.workflow.Workflowable;
-import org.w3c.dom.Document;
-
-/**
- * Workflow manager implementation.
- * 
- * @version $Id: WorkflowManagerImpl.java 179751 2005-06-03 09:13:35Z andreas $
- */
-public class WorkflowManagerImpl extends AbstractLogEnabled implements WorkflowManager,
-        Serviceable {
-
-    /**
-     * @see org.apache.lenya.workflow.WorkflowManager#invoke(org.apache.lenya.workflow.Workflowable,
-     *      java.lang.String, boolean)
-     */
-    public void invoke(Workflowable workflowable, String event, boolean force)
-            throws WorkflowException {
-        if (hasWorkflow(workflowable)) {
-            WorkflowEngine engine = new WorkflowEngineImpl();
-            Situation situation = getSituation();
-            Workflow workflow = getWorkflowSchema(workflowable);
-
-            if (force && !engine.canInvoke(workflowable, workflow, situation, event)) {
-                throw new WorkflowException("The event [" + event
-                        + "] cannot be invoked on the document [" + workflowable
-                        + "] in the situation [" + situation + "]");
-            }
-            engine.invoke(workflowable, workflow, situation, event);
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.workflow.WorkflowManager#invoke(org.apache.lenya.workflow.Workflowable,
-     *      java.lang.String)
-     */
-    public void invoke(Workflowable workflowable, String event) throws WorkflowException {
-        invoke(workflowable, event, true);
-    }
-
-    /**
-     * @see org.apache.lenya.workflow.WorkflowManager#canInvoke(org.apache.lenya.workflow.Workflowable,
-     *      java.lang.String)
-     */
-    public boolean canInvoke(Workflowable workflowable, String event) {
-        boolean canInvoke = true;
-        try {
-            if (hasWorkflow(workflowable)) {
-                Workflow workflow = getWorkflowSchema(workflowable);
-                WorkflowEngine engine = new WorkflowEngineImpl();
-                Situation situation = getSituation();
-                canInvoke = engine.canInvoke(workflowable, workflow, situation, event);
-            }
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-        return canInvoke;
-    }
-
-    protected ServiceManager manager;
-
-    /**
-     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service(ServiceManager manager) throws ServiceException {
-        this.manager = manager;
-    }
-
-    /**
-     * @see org.apache.lenya.workflow.WorkflowManager#getWorkflowSchema(org.apache.lenya.workflow.Workflowable)
-     */
-    public Workflow getWorkflowSchema(Workflowable workflowable) throws WorkflowException {
-        WorkflowImpl workflow = null;
-
-        try {
-            String uri = workflowable.getWorkflowSchemaURI();
-            if (uri != null) {
-                Document document = SourceUtil.readDOM(uri, this.manager);
-                WorkflowBuilder builder = new WorkflowBuilder(getLogger());
-                workflow = builder.buildWorkflow(uri, document);
-            }
-        } catch (final Exception e) {
-            throw new WorkflowException(e);
-        }
-
-        return workflow;
-    }
-
-    /**
-     * @see org.apache.lenya.workflow.WorkflowManager#hasWorkflow(org.apache.lenya.workflow.Workflowable)
-     */
-    public boolean hasWorkflow(Workflowable workflowable) {
-        return workflowable.getWorkflowSchemaURI() != null;
-    }
-
-    /**
-     * @see org.apache.lenya.workflow.WorkflowManager#getSituation()
-     */
-    public Situation getSituation() {
-        return new SituationImpl();
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/xml/DocumentHelper.java b/src/java/org/apache/lenya/xml/DocumentHelper.java
deleted file mode 100644
index 7a299ed..0000000
--- a/src/java/org/apache/lenya/xml/DocumentHelper.java
+++ /dev/null
@@ -1,444 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.xml;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Writer;
-import java.net.URI;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
-import org.apache.xml.resolver.tools.CatalogResolver;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Document;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Text;
-import org.xml.sax.SAXException;
-
-/**
- * Various utility methods to work with JAXP.
- * @version $Id$
- */
-public class DocumentHelper {
-    /**
-     * Creates a non-validating and namespace-aware DocumentBuilder.
-     * @return A new DocumentBuilder object.
-     * @throws ParserConfigurationException if an error occurs
-     */
-    public static DocumentBuilder createBuilder() throws ParserConfigurationException {
-        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-        factory.setNamespaceAware(true);
-        DocumentBuilder builder = factory.newDocumentBuilder();
-
-        CatalogResolver cr = new CatalogResolver();
-        builder.setEntityResolver(cr);
-        return builder;
-    }
-
-    /**
-     * Creates a document. A xmlns:prefix="namespaceUri" attribute is added to
-     * the document element.
-     * @param namespaceUri The namespace URL of the root element.
-     * @param qualifiedName The qualified name of the root element.
-     * @param documentType The type of document to be created or null. When
-     *            doctype is not null, its Node.ownerDocument attribute is set
-     *            to the document being created.
-     * @return A new Document object.
-     * @throws DOMException if an error occurs
-     * @throws ParserConfigurationException if an error occurs
-     * @see org.w3c.dom.DOMImplementation#createDocument(String, String,
-     *      DocumentType)
-     */
-    public static Document createDocument(String namespaceUri, String qualifiedName,
-            DocumentType documentType) throws DOMException, ParserConfigurationException {
-        DocumentBuilder builder = createBuilder();
-        Document document = builder.getDOMImplementation().createDocument(namespaceUri,
-                qualifiedName,
-                documentType);
-
-        // add xmlns:prefix attribute
-        String name = "xmlns";
-        int index = qualifiedName.indexOf(":");
-
-        if (index > -1) {
-            name += (":" + qualifiedName.substring(0, index));
-        }
-
-        document.getDocumentElement().setAttributeNS("http://www.w3.org/2000/xmlns/",
-                name,
-                namespaceUri);
-
-        return document;
-    }
-
-    /**
-     * Reads a document from a file.
-     * @return A document.
-     * @param file The file to load the document from.
-     * @throws ParserConfigurationException if an error occurs
-     * @throws SAXException if an error occurs
-     * @throws IOException if an error occurs
-     */
-    public static Document readDocument(File file) throws ParserConfigurationException,
-            SAXException, IOException {
-        DocumentBuilder builder = createBuilder();
-        return builder.parse(file);
-    }
-
-    /**
-     * Reads a document from a URL.
-     * @return A document.
-     * @param url The URL to load the document from.
-     * @throws ParserConfigurationException if an error occurs
-     * @throws SAXException if an error occurs
-     * @throws IOException if an error occurs
-     */
-    public static Document readDocument(URL url) throws ParserConfigurationException, SAXException,
-            IOException {
-        DocumentBuilder builder = createBuilder();
-        return builder.parse(url.toString());
-    }
-
-    /**
-     * Reads a document from a URI.
-     * @return A document.
-     * @param uri The URI to load the document from.
-     * @throws ParserConfigurationException if an error occurs
-     * @throws SAXException if an error occurs
-     * @throws IOException if an error occurs
-     */
-    public static Document readDocument(URI uri) throws ParserConfigurationException, SAXException,
-            IOException {
-        DocumentBuilder builder = createBuilder();
-        return builder.parse(uri.toString());
-    }
-
-    /**
-     * Reads a document from a string.
-     * @return A document.
-     * @param string The string to load the document from.
-     * @throws ParserConfigurationException if an error occurs
-     * @throws SAXException if an error occurs
-     * @throws IOException if an error occurs
-     */
-    public static Document readDocument(String string) throws ParserConfigurationException,
-            SAXException, IOException {
-        DocumentBuilder builder = createBuilder();
-        return builder.parse(string);
-    }
-
-    /**
-     * Reads a document from an input stream.
-     * @return A document.
-     * @param stream The input stream to load the document from.
-     * @throws ParserConfigurationException if an error occurs
-     * @throws SAXException if an error occurs
-     * @throws IOException if an error occurs
-     */
-    public static Document readDocument(InputStream stream) throws ParserConfigurationException,
-            SAXException, IOException {
-        DocumentBuilder builder = createBuilder();
-        return builder.parse(stream);
-    }
-
-    /**
-     * Writes a document to a file. A new file is created if it does not exist.
-     * @param document The document to save.
-     * @param file The file to save the document to.
-     * @throws IOException if an error occurs
-     * @throws TransformerConfigurationException if an error occurs
-     * @throws TransformerException if an error occurs
-     */
-    public static void writeDocument(Document document, File file)
-            throws TransformerConfigurationException, TransformerException, IOException {
-        // sanity checks
-        if (document == null)
-            throw new IllegalArgumentException("illegal usage, parameter document may not be null");
-        if (file == null)
-            throw new IllegalArgumentException("illegal usage, parameter file may not be null");
-
-        file.getParentFile().mkdirs();
-        file.createNewFile();
-
-        DOMSource source = new DOMSource(document);
-        StreamResult result = new StreamResult(file);
-        getTransformer(document.getDoctype()).transform(source, result);
-    }
-
-    /**
-     * Writes a document to a writer.
-     * @param document The document to write.
-     * @param writer The writer to write the document to.
-     * @throws TransformerConfigurationException if an error occurs
-     * @throws TransformerException if an error occurs
-     */
-    public static void writeDocument(Document document, Writer writer)
-            throws TransformerConfigurationException, TransformerException {
-
-        // sanity checks
-        if (document == null)
-            throw new IllegalArgumentException("illegal usage of DocumentHelper::writeDocument(), parameter document may not be null");
-
-        DOMSource source = new DOMSource(document);
-        StreamResult result = new StreamResult(writer);
-        getTransformer(document.getDoctype()).transform(source, result);
-    }
-
-    /**
-     * Get the transformer.
-     * @param documentType the document type
-     * @return a transformer
-     * @throws TransformerConfigurationException if an error occurs
-     */
-    protected static Transformer getTransformer(DocumentType documentType)
-            throws TransformerConfigurationException {
-        TransformerFactory factory = TransformerFactory.newInstance();
-        Transformer transformer = factory.newTransformer();
-        transformer.setOutputProperty(OutputKeys.INDENT, "yes");
-        transformer.setOutputProperty(OutputKeys.METHOD, "xml");
-
-        if (documentType != null) {
-            transformer.setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, documentType.getPublicId());
-            transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, documentType.getSystemId());
-        }
-
-        return transformer;
-    }
-
-    /**
-     * Creates a document type.
-     * @param qualifiedName The qualified name of the document type.
-     * @param publicId The public identifier.
-     * @param systemId The system identifier.
-     * @return the document type
-     * @throws ParserConfigurationException if an error occurs
-     * @see org.w3c.dom.DOMImplementation#createDocumentType(java.lang.String,
-     *      java.lang.String, java.lang.String)
-     */
-    public DocumentType createDocumentType(String qualifiedName, String publicId, String systemId)
-            throws ParserConfigurationException {
-        DocumentBuilder builder = createBuilder();
-
-        return builder.getDOMImplementation().createDocumentType(qualifiedName, publicId, systemId);
-    }
-
-    /**
-     * Returns the first child element of an element that belong to a certain
-     * namespace or <code>null</code> if none exists.
-     * @param element The parent element.
-     * @param namespaceUri The namespace that the childen must belong to.
-     * @return The first child element or <code>null</code> if none exists.
-     */
-    public static Element getFirstChild(Element element, String namespaceUri) {
-        return getFirstChild(element, namespaceUri, "*");
-    }
-
-    /**
-     * Returns the first child element of an element that belongs to a certain
-     * namespace and has a certain local name or <code>null</code> if none
-     * exists.
-     * @param element The parent element.
-     * @param namespaceUri The namespace that the childen must belong to.
-     * @param localName The local name of the children.
-     * @return The child element or <code>null</code> if none exists.
-     */
-    public static Element getFirstChild(Element element, String namespaceUri, String localName) {
-        Element[] children = getChildren(element, namespaceUri, localName);
-
-        if (children.length > 0) {
-            return children[0];
-        }
-        return null;
-    }
-
-    /**
-     * Returns all child elements of an element, regardless of the namespace.
-     * @param element The parent element.
-     * @return The child elements.
-     */
-    public static Element[] getChildren(Element element) {
-        List childElements = new ArrayList();
-        NodeList children = element.getElementsByTagName("*");
-
-        for (int i = 0; i < children.getLength(); i++) {
-            if (children.item(i).getParentNode() == element) {
-                childElements.add(children.item(i));
-            }
-        }
-
-        return (Element[]) childElements.toArray(new Element[childElements.size()]);
-    }
-
-    /**
-     * Returns all child elements of an element that belong to a certain
-     * namespace.
-     * @param element The parent element.
-     * @param namespaceUri The namespace that the childen must belong to.
-     * @return The child elements.
-     */
-    public static Element[] getChildren(Element element, String namespaceUri) {
-        return getChildren(element, namespaceUri, "*");
-    }
-
-    /**
-     * Returns all child elements of an element that belong to a certain
-     * namespace and have a certain local name.
-     * @param element The parent element.
-     * @param namespaceUri The namespace that the childen must belong to.
-     * @param localName The local name of the children.
-     * @return The child elements.
-     */
-    public static Element[] getChildren(Element element, String namespaceUri, String localName) {
-        List childElements = new ArrayList();
-        NodeList children = element.getElementsByTagNameNS(namespaceUri, localName);
-
-        for (int i = 0; i < children.getLength(); i++) {
-            if (children.item(i).getParentNode() == element) {
-                childElements.add(children.item(i));
-            }
-        }
-
-        return (Element[]) childElements.toArray(new Element[childElements.size()]);
-    }
-
-    /**
-     * Returns the text inside an element. Only the child text nodes of this
-     * element are collected.
-     * @param element The element.
-     * @return The text inside the element.
-     */
-    public static String getSimpleElementText(Element element) {
-        StringBuffer buffer = new StringBuffer();
-        NodeList children = element.getChildNodes();
-
-        for (int i = 0; i < children.getLength(); i++) {
-            Node child = children.item(i);
-
-            if (child instanceof Text) {
-                buffer.append(child.getNodeValue());
-            }
-        }
-
-        return buffer.toString();
-    }
-
-    /**
-     * Replaces all child nodes of an element by a single text node.
-     * @param element The element.
-     * @param text The text to insert.
-     */
-    public static void setSimpleElementText(Element element, String text) {
-        NodeList children = element.getChildNodes();
-
-        for (int i = 0; i < children.getLength(); i++) {
-            Node child = children.item(i);
-            element.removeChild(child);
-        }
-
-        Node textNode = element.getOwnerDocument().createTextNode(text);
-        element.appendChild(textNode);
-    }
-
-    /**
-     * Returns all following sibling elements of an element that belong to a
-     * certain namespace.
-     * @param element The parent element.
-     * @param namespaceUri The namespace that the childen must belong to.
-     * @return The following sibling elements.
-     */
-    public static Element[] getNextSiblings(Element element, String namespaceUri) {
-        return getNextSiblings(element, namespaceUri, "*");
-    }
-
-    /**
-     * Returns all following sibling elements of an element that belong to a
-     * certain namespace. and have a certain local name.
-     * @param element The parent element.
-     * @param namespaceUri The namespace that the childen must belong to.
-     * @param localName The local name of the children.
-     * @return The following sibling elements.
-     */
-    public static Element[] getNextSiblings(Element element, String namespaceUri, String localName) {
-        List childElements = new ArrayList();
-        Element parent = (Element) element.getParentNode();
-        Element[] children = getChildren(parent, namespaceUri, localName);
-
-        int l = children.length;
-        for (int i = 0; i < children.length; i++) {
-            if (children[i] == element) {
-                l = i;
-            }
-            if (i > l) {
-                childElements.add(children[i]);
-            }
-        }
-
-        return (Element[]) childElements.toArray(new Element[childElements.size()]);
-    }
-
-    /**
-     * Returns all preceding sibling elements of an element that belong to a
-     * certain namespace.
-     * @param element The parent element.
-     * @param namespaceUri The namespace that the childen must belong to.
-     * @return The preceding sibling elements.
-     */
-    public static Element[] getPrecedingSiblings(Element element, String namespaceUri) {
-        return getPrecedingSiblings(element, namespaceUri, "*");
-    }
-
-    /**
-     * Returns all preceding sibling elements of an element that belong to a
-     * certain namespace. and have a certain local name.
-     * @param element The parent element.
-     * @param namespaceUri The namespace that the childen must belong to.
-     * @param localName The local name of the children.
-     * @return The preceding sibling elements.
-     */
-    public static Element[] getPrecedingSiblings(Element element, String namespaceUri,
-            String localName) {
-        List childElements = new ArrayList();
-        Element parent = (Element) element.getParentNode();
-        Element[] children = getChildren(parent, namespaceUri, localName);
-
-        int i = 0;
-        while (children[i] != element && i < children.length) {
-            childElements.add(children[i]);
-            i++;
-        }
-
-        return (Element[]) childElements.toArray(new Element[childElements.size()]);
-    }
-}
diff --git a/src/java/org/apache/lenya/xml/NamespaceHelper.java b/src/java/org/apache/lenya/xml/NamespaceHelper.java
deleted file mode 100644
index ade63e7..0000000
--- a/src/java/org/apache/lenya/xml/NamespaceHelper.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.xml;
-
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Text;
-
-
-/**
- * A NamespaceHelper object simplifies the creation of elements in a certain
- * namespace. All elements are owned by a document that is passed to the
- * {@link #NamespaceHelper(String, String, Document)} constructor or created
- * using the {@link #NamespaceHelper(String, String, String)} constructor.
- */
-public class NamespaceHelper {
-    private String namespaceUri;
-    private String prefix;
-    private Document document;
-
-    /**
-     * Creates a new instance of NamespaceHelper using an existing document. The
-     * document is not affected. If you omit the prefix, the default namespace is used.
-     * @param _document The document.
-     * @param _namespaceUri The namespace URI.
-     * @param _prefix The namespace prefix.
-     */
-    public NamespaceHelper(String _namespaceUri, String _prefix, Document _document) {
-        this.namespaceUri = _namespaceUri;
-        this.prefix = _prefix;
-        this.document = _document;
-    }
-
-    /**
-     * <p>
-     * Creates a new instance of NamespaceHelper. A new document is created
-     * using a document element in the given namespace with the given prefix.
-     * If you omit the prefix, the default namespace is used.
-     * </p>
-     * <p>
-     * NamespaceHelper("http://www.w3.org/2000/svg", "svg", "svg"):<br/>
-     * &lt;?xml version="1.0"&gt;<br/>
-     * &lt;svg:svg xmlns:svg="http://www.w3.org/2000/svg"&gt;<br/>
-     * &lt;/svg:svg&gt;
-     * </p>
-     * @param localName The local name of the document element.
-     * @param _namespaceUri The namespace URI.
-     * @param _prefix The namespace prefix.
-     * @throws ParserConfigurationException if an error occured
-     */
-    public NamespaceHelper(String _namespaceUri, String _prefix, String localName)
-        throws ParserConfigurationException {
-        this.namespaceUri = _namespaceUri;
-        this.prefix = _prefix;
-        setDocument(DocumentHelper.createDocument(getNamespaceURI(), getQualifiedName(localName),
-                null));
-    }
-
-    /**
-     * Sets the document of this NamespaceHelper.
-     * @param _document the document
-     */
-    protected void setDocument(Document _document) {
-        this.document = _document;
-    }
-
-    /**
-     * Returns the document that is used to create elements.
-     * @return A document object.
-     */
-    public Document getDocument() {
-        return this.document;
-    }
-
-    /**
-     * Returns the namespace URI of this NamespaceHelper.
-     * @return The namespace URI.
-     */
-    public String getNamespaceURI() {
-        return this.namespaceUri;
-    }
-
-    /**
-     * Returns the namespace prefix that is used to create elements.
-     * @return The namespace prefix.
-     */
-    public String getPrefix() {
-        return this.prefix;
-    }
-
-    /**
-     * Returns the qualified name for a local name using the prefix of this
-     * NamespaceHelper.
-     * @param localName The local name.
-     * @return The qualified name, i.e. prefix:localName.
-     */
-    public String getQualifiedName(String localName) {
-        if (getPrefix().equals("")) {
-            return localName;
-        }
-        return getPrefix() + ":" + localName;
-    }
-
-    /**
-     * <p>
-     * Creates an element within the namespace of this NamespaceHelper object with
-     * a given local name containing a text node.<br/>
-     * </p>
-     * <p>
-     * <code>createElement("text")</code>: <code>&lt;prefix:text/&gt;<code>.
-     * </p>
-     * @param localName The local name of the element.
-     * @return A new element.
-     */
-    public Element createElement(String localName) {
-        return getDocument().createElementNS(getNamespaceURI(), getQualifiedName(localName));
-    }
-
-    /**
-     * <p>
-     * Creates an element within the namespace of this NamespaceHelper object with
-     * a given local name containing a text node.
-     * </p>
-     * <p>
-     * <code>createElement("text", "Hello World!")</code>:
-     * <code>&lt;prefix:text&gt;Hello World!&lt;/prefix:text&gt;</code>.
-     * </p>
-     * @param localName The local name of the element.
-     * @param text The text for the text node inside the element.
-     * @return A new element containing a text node.
-     */
-    public Element createElement(String localName, String text) {
-        Element element = createElement(localName);
-        Text textNode = getDocument().createTextNode(text);
-        element.appendChild(textNode);
-
-        return element;
-    }
-
-    /**
-     * Returns all children of an element in the namespace
-     * of this NamespaceHelper.
-     * @param element The parent element.
-     * @return the children.
-     */
-    public Element[] getChildren(Element element) {
-        return DocumentHelper.getChildren(element, getNamespaceURI());
-    }
-
-    /**
-     * Returns all children of an element with a local name in the namespace
-     * of this NamespaceHelper.
-     * @param element The parent element.
-     * @param localName The local name of the children to return.
-     * @return the children.
-     */
-    public Element[] getChildren(Element element, String localName) {
-        return DocumentHelper.getChildren(element, getNamespaceURI(), localName);
-    }
-
-    /**
-     * Returns the first childr of an element with a local name in the namespace
-     * of this NamespaceHelper or <code>null</code> if none exists.
-     * @param element The parent element.
-     * @param localName The local name of the children to return.
-     * @return the first child.
-     */
-    public Element getFirstChild(Element element, String localName) {
-        return DocumentHelper.getFirstChild(element, getNamespaceURI(), localName);
-    }
-
-	/**
-	 * Returns the next siblings of an element with a local name in the namespace
-	 * of this NamespaceHelper or <code>null</code> if none exists.
-	 * @param element The parent element.
-	 * @param localName The local name of the children to return.
-	 * @return the next siblings.
-	 */
-	public Element[] getNextSiblings(Element element, String localName) {
-		return DocumentHelper.getNextSiblings(element, getNamespaceURI(), localName);
-	}
-
-    /**
-     * Returns the preceding siblings of an element with a local name in the namespace
-     * of this NamespaceHelper or <code>null</code> if none exists.
-     * @param element The parent element.
-     * @param localName The local name of the children to return.
-     * @return the preceding siblings.
-     */
-    public Element[] getPrecedingSiblings(Element element, String localName) {
-        return DocumentHelper.getPrecedingSiblings(element, getNamespaceURI(), localName);
-    }
-}
diff --git a/src/java/org/apache/lenya/xml/RelaxNG.java b/src/java/org/apache/lenya/xml/RelaxNG.java
deleted file mode 100644
index a90f5ff..0000000
--- a/src/java/org/apache/lenya/xml/RelaxNG.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.xml;
-
-import java.io.BufferedWriter;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-import com.thaiopensource.util.PropertyMapBuilder;
-import com.thaiopensource.validate.SchemaReader;
-import com.thaiopensource.validate.ValidateProperty;
-import com.thaiopensource.validate.ValidationDriver;
-import com.thaiopensource.validate.auto.AutoSchemaReader;
-import com.thaiopensource.xml.sax.ErrorHandlerImpl;
-
-import org.apache.log4j.Logger;
-
-/**
- * Validate XML Document with RELAX NG Schema
- */
-public class RelaxNG {
-    private static final Logger log = Logger.getLogger(RelaxNG.class);
-
-    /**
-     * Command line interface
-     * @param args Command line args
-     */
-    public static void main(String[] args) {
-        if (args.length == 0) {
-            System.out.println("Usage: relaxng.rng sample.xml");
-            return;
-        }
-
-        try {
-            String message = RelaxNG.validate(new File(args[0]), new File(args[1]));
-            if (message == null) {
-                System.out.println("Document is valid");
-            } else {
-                System.out.println("Document not valid: " + message);
-            }
-        } catch (IOException e) {
-            log.error("" +e.toString());
-        }
-    }
-
-    /**
-     * Validates an XML file against a schema.
-     * @param schema The schema file.
-     * @param xml The XML file.
-     * @return A string. FIXME: what does this mean?
-     * @throws IOException if an error occurs.
-     */
-    public static String validate(File schema, File xml) throws IOException {
-
-        InputSource schemaInputSource = ValidationDriver.uriOrFileInputSource(schema
-                .getAbsolutePath());
-        InputSource xmlInputSource = ValidationDriver.uriOrFileInputSource(xml.getAbsolutePath());
-
-        return validate(schemaInputSource, xmlInputSource);
-    }
-
-    /**
-     * Validates an XML input source against a schema.
-     * @param schemaInputSource The schema input source.
-     * @param xmlInputSource The XML input source.
-     * @return A string.
-     * @throws IOException if an error occurs.
-     */
-    public static String validate(InputSource schemaInputSource, InputSource xmlInputSource)
-            throws IOException {
-        ByteArrayOutputStream error;
-        try {
-            PropertyMapBuilder properties = new PropertyMapBuilder();
-            error = new ByteArrayOutputStream();
-            ErrorHandlerImpl eh = new ErrorHandlerImpl(
-                    new BufferedWriter(new OutputStreamWriter(error)));
-            ValidateProperty.ERROR_HANDLER.put(properties, eh);
-            SchemaReader schemaReader = new AutoSchemaReader();
-            ValidationDriver driver = new ValidationDriver(properties.toPropertyMap(), schemaReader);
-            if (driver.loadSchema(schemaInputSource)) {
-                if (driver.validate(xmlInputSource)) {
-                    log.debug("" + error);
-                    return null;
-                } 
-            	log.error("" + error);
-            	return "" + error;
-            }
-            throw new IOException("Could not load schema!\n" + error);
-        } catch (final SAXException e) {
-            log.error("" +e.toString());
-            throw new IOException("Could not load schema!\n" + e);
-        } catch (final IOException e) {
-            log.error("" +e.toString());
-            throw new IOException("Could not load schema!\n" + e);
-        }
-    }
-
-}
\ No newline at end of file
diff --git a/src/java/org/apache/lenya/xml/XLink.java b/src/java/org/apache/lenya/xml/XLink.java
deleted file mode 100644
index c7871f9..0000000
--- a/src/java/org/apache/lenya/xml/XLink.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id: XLink.java 42598 2004-03-01 16:18:28Z gregor $  */
-
-package org.apache.lenya.xml;
-
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-
-/**
- * Helper class for XLinks
- */
-public class XLink {
-
-    /**
-     * <code>type</code> The Xlink type
-     */
-    public String type = null;
-    /**
-     * <code>href</code> The XLink href
-     */
-    public String href = null;
-    /**
-     * <code>show</code> The value of the show attribute
-     */
-    public String show = null;
-    /**
-     * <code>name</code> The Xlink name
-     */
-    public String name = null;
-    /**
-     * <code>element</code> The Xlink element
-     */
-    public Element element = null;
-    /**
-     * <code>XLINK_NAMESPACE</code> The XLink namespace
-     */
-    public static final String XLINK_NAMESPACE = "http://www.w3.org/1999/xlink";
-    /**
-     * <code>ATTRIBUTE_HREF</code> The href attribte
-     */
-    public static final String ATTRIBUTE_HREF = "href";
-    /**
-     * <code>ATTRIBUTE_SHOW</code> The show attribute
-     */
-    public static final String ATTRIBUTE_SHOW = "show";
-    /**
-     * <code>ATTRIBUTE_TYPE</code> The type attribute
-     */
-    public static final String ATTRIBUTE_TYPE = "type";
-
-    /**
-     * Constructor
-     */
-    public XLink() {
-        this.type = "simple";
-        this.show = "undefined";
-    }
-
-    /**
-     * Constructor
-     * @param _element The element
-     */
-    public XLink(Element _element) {
-        this();
-        this.element = _element;
-
-        this.name = _element.getNodeName();
-
-        Attr hrefAttribute = _element.getAttributeNodeNS(XLINK_NAMESPACE, ATTRIBUTE_HREF);
-        if (hrefAttribute != null) {
-            this.href = hrefAttribute.getNodeValue();
-        }
-        Attr typeAttribute = _element.getAttributeNodeNS(XLINK_NAMESPACE, ATTRIBUTE_TYPE);
-        if (typeAttribute != null) {
-            this.type = typeAttribute.getNodeValue();
-        }
-        Attr showAttribute = _element.getAttributeNodeNS(XLINK_NAMESPACE, ATTRIBUTE_SHOW);
-        if (showAttribute != null) {
-            this.show = showAttribute.getNodeValue();
-        }
-
-    }
-
-    /**
-     * Returns a printout of the XLink values
-     * @return The printout
-     */
-    public String toString() {
-        return "XLink: type=\""
-            + this.type
-            + "\", href=\""
-            + this.href
-            + "\", show=\""
-            + this.show
-            + "\", name=\""
-            + this.name
-            + "\"";
-    }
-}
diff --git a/src/java/org/apache/lenya/xml/XPath.java b/src/java/org/apache/lenya/xml/XPath.java
deleted file mode 100644
index 6471b35..0000000
--- a/src/java/org/apache/lenya/xml/XPath.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id: XPath.java 42598 2004-03-01 16:18:28Z gregor $  */
-
-package org.apache.lenya.xml;
-
-import java.util.StringTokenizer;
-
-import org.w3c.dom.Node;
-
-/**
- * Helper class for XPath operations
- */
-public class XPath {
-    String xpath = null;
-    String[] parts = null;
-
-    /**
-     * Constructor
-     * @param _xpath The Xpath
-     */
-    public XPath(String _xpath) {
-        this.xpath = _xpath;
-
-        StringTokenizer st = new StringTokenizer(_xpath, "/");
-        int length = st.countTokens();
-        this.parts = new String[length];
-
-        for (int i = 0; i < length; i++) {
-            this.parts[i] = st.nextToken();
-        }
-    }
-
-    /**
-     * Get the parent path
-     * @return The parent path
-     */
-    public XPath getParent() {
-        StringBuffer buf = new StringBuffer();
-
-        for (int i = 0; i < (this.parts.length - 1); i++) {
-            buf.append("/" + this.parts[i]);
-        }
-
-        return new XPath(buf.toString());
-    }
-
-    /**
-     * Get the type of a node. Only supports attribute and element nodes
-     * @return The node type
-     */
-    public short getType() {
-        if (this.parts[this.parts.length - 1].indexOf("@") == 0) {
-            return Node.ATTRIBUTE_NODE;
-        }
-        return Node.ELEMENT_NODE;
-    }
-
-    /**
-     * Return a string representation of the XPath
-     * @return The Xpath
-     */
-    public String toString() {
-        return this.xpath;
-    }
-
-    /**
-     * Get the name
-     * @return The name
-     */
-    public String getName() {
-        if (getType() == Node.ATTRIBUTE_NODE) {
-            return this.parts[this.parts.length - 1].substring(1);
-        }
-        return this.parts[this.parts.length - 1];
-    }
-
-    /**
-     * Return the name of the element
-     * @return the name of the element
-     */
-    public String getElementName() {
-        if (getType() == Node.ATTRIBUTE_NODE) {
-            return this.parts[this.parts.length - 2];
-        }
-        return this.parts[this.parts.length - 1];
-    }
-
-    /**
-     * Get the name without predicates
-     * @return The name without predicates
-     */
-    public String getNameWithoutPredicates() {
-        return removePredicates(getName());
-    }
-
-    /**
-     * Remove predicates (square brackets), http://www.w3.org/TR/xpath
-     * @param s The string to remove predicates from
-     * @return The string without predicates
-     */
-    public String removePredicates(String s) {
-        int index = s.indexOf("[");
-
-        if (index >= 0) {
-            return s.substring(0, index);
-        }
-
-        return s;
-    }
-}
diff --git a/src/resources/dev/eclipse/checkstyle-plugin.cfg b/src/resources/dev/eclipse/checkstyle-plugin.cfg
deleted file mode 100644
index bcbecd4..0000000
--- a/src/resources/dev/eclipse/checkstyle-plugin.cfg
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: checkstyle-plugin.cfg,v 1.3 2004/03/13 12:44:37 gregor Exp $ -->
-
-<checkstyle-configurations file-format-version="1.0.0">
-    <check-configuration name="standard">
-        <rule-configuration
-            classname="com.puppycrawl.tools.checkstyle.checks.JavadocTypeCheck" severity="warning">
-            <config-properties>
-                <config-property name="severity" value="warning"/>
-                <config-property name="tokens" value="CLASS_DEF, INTERFACE_DEF"/>
-                <config-property name="authorFormat" value=""/>
-                <config-property name="scope" value="private"/>
-                <config-property name="versionFormat" value=""/>
-            </config-properties>
-        </rule-configuration>
-        <rule-configuration
-            classname="com.puppycrawl.tools.checkstyle.checks.JavadocMethodCheck" severity="warning">
-            <config-properties>
-                <config-property name="allowThrowsTagsForSubclasses" value="false"/>
-                <config-property name="allowUndeclaredRTE" value="false"/>
-                <config-property name="severity" value="warning"/>
-                <config-property name="tokens" value="METHOD_DEF, CTOR_DEF"/>
-                <config-property name="allowMissingParamTags" value="false"/>
-                <config-property name="scope" value="private"/>
-                <config-property name="allowMissingReturnTag" value="false"/>
-                <config-property name="allowMissingThrowsTags" value="false"/>
-            </config-properties>
-        </rule-configuration>
-        <rule-configuration
-            classname="com.puppycrawl.tools.checkstyle.checks.RedundantModifierCheck" severity="warning">
-            <config-properties>
-                <config-property name="severity" value="warning"/>
-                <config-property name="tokens" value="METHOD_DEF, VARIABLE_DEF"/>
-            </config-properties>
-        </rule-configuration>
-        <rule-configuration
-            classname="com.puppycrawl.tools.checkstyle.checks.VisibilityModifierCheck" severity="warning">
-            <config-properties>
-                <config-property name="packageAllowed" value="false"/>
-                <config-property name="severity" value="warning"/>
-                <config-property name="publicMemberPattern" value="^serialVersionUID"/>
-                <config-property name="protectedAllowed" value="false"/>
-            </config-properties>
-        </rule-configuration>
-        <rule-configuration
-            classname="com.puppycrawl.tools.checkstyle.checks.FinalClassCheck" severity="warning">
-            <config-properties>
-                <config-property name="severity" value="warning"/>
-            </config-properties>
-        </rule-configuration>
-        <rule-configuration
-            classname="com.puppycrawl.tools.checkstyle.checks.HideUtilityClassConstructorCheck" severity="warning">
-            <config-properties>
-                <config-property name="severity" value="warning"/>
-            </config-properties>
-        </rule-configuration>
-    </check-configuration>
-</checkstyle-configurations>
diff --git a/src/resources/dev/eclipse/classpath-tmpl.xml b/src/resources/dev/eclipse/classpath-tmpl.xml
deleted file mode 100644
index 9348787..0000000
--- a/src/resources/dev/eclipse/classpath-tmpl.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-<data>
-  <src-dirs><item>@SRC_DIRS@</item></src-dirs>
-  <libs><item>@LIBS@</item></libs>
-  <output>@OUTPUT_DIR@</output>
-</data>
\ No newline at end of file
diff --git a/src/resources/dev/eclipse/make-classpath.xsl b/src/resources/dev/eclipse/make-classpath.xsl
deleted file mode 100644
index f2e0957..0000000
--- a/src/resources/dev/eclipse/make-classpath.xsl
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!--
-  Build the Eclipse .classpath file from a list of path items
-  (see "eclipse-project" target in build.xml)
-  
-  $Id: make-classpath.xsl,v 1.1 2004/03/21 21:26:21 gregor Exp $
--->
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-  <xsl:output indent="yes" method="xml"/>
-  <xsl:param name="exportlib"/>
-  
-  <xsl:strip-space elements="*"/>
-
-  <xsl:template match="/data">
-    <classpath>
-
-      <!-- 1. source dirs -->
-      <xsl:for-each select="src-dirs/item">
-        <!-- alphabetical sorting, complete path -->
-        <xsl:sort select="."/>
-        <classpathentry kind="src" path="{.}"/>
-      </xsl:for-each>
-          
-      <!-- 2. libraries -->
-      <xsl:for-each select="libs/item">
-        <!-- alphabetical sorting, only file name -->
-        <!-- heavy calculation, but here's the logic:
-             1. returns the string after 4 slashes (4 is the max (blocks)),
-                returns empty string if string does not contain 4 slashes
-             2. ... 3 slashes ...
-             3. ... 2 slashes ... (the minimum) -->
-        <xsl:sort select="concat(substring-after(substring-after(substring-after(substring-after(., '/'), '/'), '/'), '/'),
-                                                 substring-after(substring-after(substring-after(., '/'), '/'), '/'),
-                                                                 substring-after(substring-after(., '/'), '/'))"/>
-        <classpathentry exported="{$exportlib}" kind="lib" path="{.}"/>
-      </xsl:for-each>
-
-      <!-- 3. JRE runtime -->
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-     
-      <!-- 4. output directory
-           Build in a separate dir since Eclipse is confused
-           by classes compiled externally by Sun's Javac -->
-      <classpathentry kind="output" path="{output}"/>
-
-      <!-- 5. Dependance on Cocoon. There needs to be a cocoon-2.1 eclipse project -->
-	  <classpathentry kind="src" path="/cocoon-2.1"/>
-
-    </classpath>
-  </xsl:template>
-
-</xsl:stylesheet>
diff --git a/src/resources/dev/eclipse/project b/src/resources/dev/eclipse/project
deleted file mode 100644
index f6bf20b..0000000
--- a/src/resources/dev/eclipse/project
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>lenya</name>
-	<comment></comment>
-	<projects>
-		<project>cocoon-2.1</project>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-	</natures>
-</projectDescription>
diff --git a/src/resources/javadoc.css b/src/resources/javadoc.css
deleted file mode 100644
index 9583c31..0000000
--- a/src/resources/javadoc.css
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
-* Copyright 1999-2004 The Apache Software Foundation
-*
-* Licensed 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.
-*/
-/* Apache Javadoc style sheet */
-
-/* Page background color */
-body { background-color: #FFFFFF }
-
-/* Table colors */
-.TableHeadingColor     { background: #D0D0D0 }
-.TableSubHeadingColor  { background: #E0E0E0 }
-.TableRowColor         { background: #F9F9F9 }
-
-/* Navigation bar fonts and colors */
-.NavBarCell1    { background-color:#D0D0D0;}
-.NavBarCell1Rev { background-color:#A0A0A0;}
-.NavBarFont1    { font-family: Arial, Helvetica, sans-serif; color:#000000;}
-.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;}
-.NavBarCell2    { font-family: Arial, Helvetica, sans-serif; background-color:#E0E0E0;}
-.NavBarCell3    { font-family: Arial, Helvetica, sans-serif; background-color:#F0F0F0;}
-
-/* Font used in left-hand frame lists */
-.FrameTitleFont   { font-size: normal; font-family: Helvetica, Arial, sans-serif }
-.FrameHeadingFont { font-size: normal; font-family: Helvetica, Arial, sans-serif }
-.FrameItemFont    { font-size: 10pt; font-family: Helvetica, Arial, sans-serif }
-
-/* Link colors styling */
-A:link { color: #0000A0 }          /* unvisited link */
-A:visited { color: #A00000 }       /* visited links */
-A:active { color: #00A000 }        /* active links */
diff --git a/src/targets/compile-build.xml b/src/targets/compile-build.xml
deleted file mode 100644
index bc735c8..0000000
--- a/src/targets/compile-build.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<project name="lenya-compile">
-
-  <description>
-    Compilation Targets
-  </description>
-
-  <!-- The main compilation target -->
-  <!-- Compile the core Lenya classes plus the assembled publication classes -->
-  <target name="compile" depends="prepare-src"
-          description="Compile the sources">
-    <mkdir dir="${build.webapp}/WEB-INF/classes"/>
-    <javac destdir="${build.webapp}/WEB-INF/classes"
-           debug="${debug}"
-           optimize="${optimize}"
-           deprecation="${deprecation}"
-           target="${target.vm}"
-           nowarn="${nowarn}"
-           source="1.4">
-      <src path="${java.dir}"/>
-      <src path="${build.src}"/>
-      <classpath refid="classpath"/>
-    </javac>
-  </target>
-
-	<!-- package lenya -->
-	  <target name="package" depends="compile">
-	    <jar jarfile="${build.dir}/${fullname}.jar" index="true">
-	      <fileset dir="${build.webapp}/WEB-INF/classes">
-	         <exclude name="**/Manifest.mf"/>
-	      </fileset>
-	    </jar>
-	  </target>
-
-</project>
diff --git a/src/targets/dist-build.xml b/src/targets/dist-build.xml
deleted file mode 100644
index 096dd32..0000000
--- a/src/targets/dist-build.xml
+++ /dev/null
@@ -1,164 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<project name="dist">
-
-  <description>
-    Distribution Targets
-  </description>
-
-  <target name="dist" depends="clean,dist-src,dist-bin" description="Build all distribution relevant tarballs"/>
-
-  <!--
-  This target prepares the binary distribution tarball for
-  end users. It forces a complete rebuild of everything through its
-  dependency on the "clean" target in order to prevent garbage
-  like the cocoon logfiles from ending up in the distribution tarball.
-  -->
-  <target name="prepare-dist-bin" depends="clean,kupu,war">
-
-    <copy todir="${dist.bin.dir}">
-      <fileset dir="${basedir}">
-        <include name="INSTALL-BIN.txt"/>
-        <include name="README.txt"/>
-        <include name="LICENSE.txt"/>
-        <include name="NOTICE.txt"/>
-        <include name="CREDITS.txt"/>
-        <include name="lenya.sh"/>
-        <include name="lenya.bat"/>
-        <include name="legal/**"/>
-      </fileset>
-    </copy>
-
-    <!-- Copy Jetty -->
-    <copy todir="${dist.bin.dir}/tools">
-      <fileset dir="tools"/>
-    </copy>
-    <delete dir="${dist.bin.dir}/tools/anttasks"/>
-    
-     <!-- Make shell scripts executable -->
-    <chmod file="${dist.bin.dir}/*.sh" perm="ugo+rx"/>
-
-  	<!-- Make sure linefeeds in shell scripts are UNIX-style -->
-   <fixcrlf srcdir="${dist.bin.dir}" eol="lf" includes="*.sh"/>
-
-  	<!-- Make sure linefeeds in batch files are Windows-style -->
-   <fixcrlf srcdir="${dist.bin.dir}" eol="crlf" includes="*.bat"/>
-  </target>
-
-  <target name="dist-bin" depends="prepare-dist-bin" description="Build a regular binary distribution tar ball">
-
-    <tar tarfile="${dist.bin.dir}.tar" basedir="${dist.root}" includes="${distname}-bin/**"/>
-
-    <gzip zipfile="${dist.bin.dir}.tar.gz" src="${dist.bin.dir}.tar"/>
-    <delete file="${dist.bin.dir}.tar"/>
-    <checksum file="${dist.bin.dir}.tar.gz" fileext=".md5"/>
-    
-    <zip zipfile="${dist.bin.dir}.zip" basedir="${dist.root}" includes="${distname}-bin/**"/>
-    <checksum file="${dist.bin.dir}.zip" fileext=".md5"/>
-  </target>
-
-  <!--
-  This target prepares the binary distribution tarball for
-  end users. It forces a complete rebuild of everything through its
-  dependency on the "clean" target in order to prevent garbage
-  like the cocoon logfiles from ending up in the distribution tarball.
-  -->
-  <target name="snapshot-bin" depends="prepare-dist-bin" description="Build a snapshot binary distribution tar ball (the same as 'dist' except for the filename)">
-    <copy todir="${snapshot.bin.dir}">
-      <fileset dir="${dist.root}/${distname}-bin"/>
-    </copy>
-
-    <tar tarfile="${snapshot.bin.dir}.tar" basedir="${dist.root}" includes="${snapshot.bin.name}/**"/>
-
-    <gzip zipfile="${snapshot.bin.dir}.tar.gz" src="${snapshot.bin.dir}.tar"/>
-    <delete file="${snapshot.bin.dir}.tar"/>
-    <zip zipfile="${snapshot.bin.dir}.zip" basedir="${dist.root}/${snapshot.bin.name}"/>
-  </target>
-
-  <!--
-  The dist-src target prepares the source distribution tarball for
-  developers. It also depends on the clean target to remove all build stuff.
-  -->
-  <target name="prepare-dist-src" depends="clean">
-    <mkdir dir="${dist.src.dir}"/>
-
-    <copy todir="${dist.src.dir}">
-      <fileset dir=".">
-        <exclude name="local.build.properties"/>
-        <exclude name=".classpath"/>
-        <exclude name=".project"/>
-        <exclude name=".fbprefs"/>
-        <exclude name="dist/**"/>
-        <exclude name="build/**"/>
-        <exclude name="bin/**"/>
-      </fileset>
-    </copy>
-  	
-  	<!-- Replace version placeholder with build version -->
-  	<replace dir="${dist.src.dir}">
-	  <include name="**/publication.xml"/>
-  	  <include name="**/introduction.xml"/>
-  	  <include name="**/about.xml"/>
-  	  <replacefilter token="@lenya.version@" value="${version}"/>
-  	</replace>
-
-    <!-- Make shell scripts executable -->
-   <chmod file="${dist.src.dir}/*.sh" perm="ugo+rx"/>
-
-  	<!-- Make sure linefeeds in shell scripts are UNIX-style -->
-   <fixcrlf srcdir="${dist.src.dir}" eol="lf" includes="*.sh"/>
-
-  	<!-- Make sure linefeeds in batch files are Windows-style -->
-   <fixcrlf srcdir="${dist.src.dir}" eol="crlf" includes="*.bat"/>
-  </target>
-
-  <target name="dist-src" depends="prepare-dist-src" description="Builds a regular tar ball containing the sources for developers">
-    <tar tarfile="${dist.src.dir}.tar" basedir="${dist.root}" includes="${distname}-src/**"/>
-
-    <gzip zipfile="${dist.src.dir}.tar.gz" src="${dist.src.dir}.tar"/>
-    <delete file="${dist.src.dir}.tar"/>
-    <checksum file="${dist.src.dir}.tar.gz" fileext=".md5"/>
-
-    <zip zipfile="${dist.src.dir}.zip" basedir="${dist.root}" includes="${distname}-src/**"/>
-    <checksum file="${dist.src.dir}.zip" fileext=".md5"/>
-  </target>
-
-  <!--
-  This target prepares the source distribution tarball for
-  end users. It forces a complete rebuild of everything through its
-  dependency on the "clean" target in order to prevent garbage
-  like the cocoon logfiles from ending up in the distribution tarball.
-  -->
-  <target name="snapshot-src" depends="prepare-dist-src" description="Builds a snapshot tar ball containing the sources for developers (the same as 'dist-src' except for the filename)">
-    <copy todir="${snapshot.src.dir}">
-      <fileset dir="${dist.src.dir}"/>
-    </copy>
-
-    <tar tarfile="${snapshot.src.dir}.tar" basedir="${dist.root}" includes="${snapshot.src.name}/**"/>
-    <gzip zipfile="${snapshot.src.dir}.tar.gz" src="${snapshot.src.dir}.tar"/>
-    <delete file="${snapshot.src.dir}.tar"/>
-  </target>
-
-  <target name="zip-webapp" depends="init" description="Zips the webapp in order to deploy within another servlet container">
-    <tar tarfile="./${build.dir}/${snapshot.bin.name}.tar" basedir="${build.webapp}"/>
-    <gzip zipfile="./${build.dir}/${snapshot.bin.name}.tar.gz" src="./${build.dir}/${snapshot.bin.name}.tar"/>
-    <delete file="./${build.dir}/${snapshot.bin.name}.tar"/>    
-  </target>
-</project>
diff --git a/src/targets/docs-build.xml b/src/targets/docs-build.xml
deleted file mode 100644
index 7c5d237..0000000
--- a/src/targets/docs-build.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<project name="lenya-documentation">
-
-  <description>
-    Documentation Targets
-  </description>
-
-  <!-- Set a variable if javadoc is already up-to-date -->
-  <target name="javadocs_check">
-    <uptodate property="javadocs.notrequired" targetfile="${dist.bin.javadocs}/packages.html" >
-      <srcfiles dir="${src.java.dir}" includes="**/*.java"/>
-    </uptodate>
-  </target>
-
-  <!-- If javadoc is already up-to-date, print a message saying so -->
-  <target name="javadocs_done" if="javadocs.notrequired">
-    <echo message="-------------------------------------------------------------"/>
-    <echo message="  Not rebuilding Javadocs, as they are up-to-date:"/>
-    <echo message="  ${dist.bin.javadocs}/packages.html is more recent than"/>
-    <echo message="  ${src.java.dir}/**/*.java"/>
-    <echo message="-------------------------------------------------------------"/>
-  </target>
-
-  <!-- Creates the API documentation -->
-  <target name="javadocs" depends="prepare-src, javadocs_check, javadocs_done" unless="javadocs.notrequired" description="Generates the API documentation">
-    <mkdir dir="${dist.bin.javadocs}"/>
-    <javadoc packagenames="${packages}"
-             destdir="${dist.bin.javadocs}"
-             author="true"
-             version="true"
-             use="false"
-             noindex="true"
-             breakiterator="true"
-             windowtitle="${Name} API - Version ${version}"
-             doctitle="${Name}"
-             bottom="Copyright &#169; ${year} Apache Software Foundation. All Rights Reserved."
-             stylesheetfile="${src.resource.dir}/javadoc.css"
-             source="1.4">
-      <!-- sources -->
-      <sourcepath>
-         <pathelement path="${src.java.dir}"/>
-         <pathelement path="${build.src}"/>
-      </sourcepath>
-
-      <!-- pass ant in the classpath to avoid class not found errors -->
-      <classpath>
-        <fileset dir="${lib.dir}">
-          <include name="*.jar"/>
-        </fileset>
-        <fileset dir="${cocoon.webapp.dir}/WEB-INF/lib">
-          <include name="*.jar"/>
-        </fileset>
-        <fileset dir="tools/jetty/lib">
-          <include name="servlet-2.3.jar"/>
-        </fileset>
-        <fileset dir="tools/lib">
-          <include name="*.jar"/>
-        </fileset>
-      </classpath>
-    </javadoc>
-  </target>
-</project>
\ No newline at end of file
diff --git a/src/targets/export-build.xml b/src/targets/export-build.xml
deleted file mode 100644
index 074a8b7..0000000
--- a/src/targets/export-build.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<project name="lenya-export">
-
-  <description>
-    Export Targets
-  </description>
-
-<!-- Export the webapp -->
-<target name="export" depends="webapp" description="Exports a publication to static HTML.">
-  <property name="publication" value=""/>
-  <property name="publication.dir" value="${build.webapp}/lenya/pubs/${publication}"/>
-  <property name="build.export" value="${build.dir}/export"/>
-  <property name="build.work" value="${build.dir}/work"/>
-    
-  <property name="project.debuglevel" value="DEBUG"/>
-      
-  <!-- Copying source files from authoring to live -->
-  <copy todir="${publication.dir}/content/live">
-    <fileset dir="${publication.dir}/content/authoring"/>
-  </copy>
-
-  <java classname="org.apache.cocoon.Main"
-    fork="true"
-    maxmemory="128m"
-    dir="."
-    failonerror="true">
-    
-  <classpath>
-    <pathelement location="${build.webapp}/WEB-INF/classes"/>
-    <fileset dir="${build.webapp}/WEB-INF/lib" includes="*.jar"/>
-    <fileset dir="tools/jetty/lib">
-      <include name="servlet-2.3.jar"/>
-    </fileset>
-  </classpath>
-  
-    <jvmarg value="-Djava.endorsed.dirs=${build.webapp}/WEB-INF/lib/endorsed${path.separator}${java.endorsed.dirs}"/>
-    <jvmarg value="-ea"/>
-    
-    <arg value="-c${build.webapp}"/>   <!-- input to the process -->
-    <arg value="-d${build.export}"/>   <!-- output to be put -->
-    <arg value="-w${build.work}"/>   <!-- temp dir to use for e.g. cache -->
-    <arg value="-u${project.debuglevel}"/> <!-- threshold for log messages -->
-    <arg value="-C${build.webapp}/WEB-INF/cocoon.xconf"/> <!-- cocoon.xconf file to use -->
-    <arg value="-b${build.export}/brokenlinks.txt"/>  <!-- output list of broken links -->
-    <arg value="-k${build.webapp}/WEB-INF/logkit.xconf"/>  <!-- logkit configuration -->
-    <arg value="/${publication}/live/index.html"/>  <!-- starting page -->
-    <arg value="-efalse"/> <!-- don't confirm extensions -->
-    <arg value="-V" />  <!-- be verbose -->
-  </java>
-  
-</target>
-</project>
\ No newline at end of file
diff --git a/src/targets/ide-build.xml b/src/targets/ide-build.xml
deleted file mode 100644
index 804fa2a..0000000
--- a/src/targets/ide-build.xml
+++ /dev/null
@@ -1,122 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-<project name="lenya-ide">
-  
-  <description>
-    IDE targets
-  </description>
-
-  <!-- Build the Eclipse projects files -->
-  <target name="eclipse-project" depends="prepare" description="Generate the Eclipse project files">
-
-    <echo message="Building Eclipse Project Files"/>
-
-    <!-- prepare the various paths that will form the project -->
-    <path id="srcs">
-      <!-- main source dir -->
-      <pathelement path="${src.java.dir}"/>
-      <!-- test source dir -->
-      <pathelement path="${src.test.dir}"/>
-    </path>
-
-    <path id="libs">
-      <!-- Cocoon libs -->
-      <fileset dir="${cocoon.src.dir}/${lib.dir}">
-        <include name="core/*.jar"/>
-        <!-- Currently, we have no JVM dependent libraries       
-          <include name="core/jvm${target.vm}/*.jar"/>
-        -->
-        <include name="optional/*.jar"/>
-        <include name="local/*.jar"/>
-        <include name="endorsed/*.jar"/>
-      </fileset>
-      <!-- Cocoon blocks lib -->
-      <fileset dir="${cocoon.src.dir}/src/blocks">
-        <include name="**/*.jar"/>
-      </fileset>
-      <!-- Cocoon tools libs -->
-      <fileset dir="${cocoon.src.dir}/tools/lib">
-        <include name="*.jar"/>
-        <exclude name="xalan*.jar"/>
-        <exclude name="xml-api*.jar"/>
-        <exclude name="xerces*.jar"/>
-      </fileset>      
-      <!-- main libs -->
-      <fileset dir="${lib.dir}">
-        <include name="*.jar"/>
-        <include name="endorsed/*.jar"/>
-      </fileset>
-    </path>
-
-    <!-- convert paths to properties -->
-    <property name="srcs" refid="srcs"/>
-    <property name="libs" refid="libs"/>
-
-    <!-- expand properties in the template file -->
-    <copy file="${src.resource.dir}/dev/eclipse/classpath-tmpl.xml"
-          tofile="${build.temp}/classpath-temp.xml"
-          filtering="yes"
-          overwrite="yes">
-      <filterset>
-        <filter token="SRC_DIRS" value="${srcs}"/>
-        <filter token="LIBS" value="${libs}"/>
-        <filter token="OUTPUT_DIR" value="${ide.eclipse.outputdir}"/>
-      </filterset>
-    </copy>
-
-    <!-- split the path in 'item' XML elements -->
-    <replace file="${build.temp}/classpath-temp.xml"
-             token="${path.separator}" value="&lt;/item&gt;&#xA; &lt;item&gt;"/>
-    <!-- relativize file names by removing the current directory -->
-    <replace file="${build.temp}/classpath-temp.xml"
-             token="${user}${file.separator}" value=""/>
-    <!-- and in case that fails, remove the base directory -->
-    <replace file="${build.temp}/classpath-temp.xml"
-             token="${basedir}${file.separator}" value=""/>
-
-    <!-- replace platform-dependent path separator by '/' -->
-    <replace file="${build.temp}/classpath-temp.xml"
-             token="${file.separator}" value="/"/>
-
-    <!-- now build the .classpath file -->
-    <xslt in="${build.temp}/classpath-temp.xml" out="${basedir}/.classpath"
-          processor="trax"
-          style="${src.resource.dir}/dev/eclipse/make-classpath.xsl">
-       <param name="exportlib" expression="${ide.eclipse.export.libs}"/>
-    </xslt>
-
-    <!-- copy the project file (expand version) -->
-    <copy file="${src.resource.dir}/dev/eclipse/project"
-          tofile="${basedir}/.project"
-          overwrite="yes">
-    </copy>
-  </target>
-
-  <!-- Prepares the webapp to make it directly usable with the eclipse project -->
-  <target name="eclipse-webapp-prepare" depends="eclipse-webapp-delete-jars"
-          description="Prepares the webapp directory to make it usable within Eclipse"/>
-  
-  <target name="eclipse-webapp-delete-jars" depends="prepare">
-      <!-- delete all jars and class files, they are already included in the project -->
-      <delete>
-          <fileset dir="${build.webapp}/WEB-INF">
-            <include name="lib/*.jar" />
-            <include name="classes/**/*.class" />
-          </fileset>
-      </delete>
-  </target>
-</project>
diff --git a/src/targets/init-build.xml b/src/targets/init-build.xml
deleted file mode 100644
index 561f706..0000000
--- a/src/targets/init-build.xml
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<project name="lenya-init">
-
-  <description>
-    Initialization Targets
-  </description>
-
-  <!-- Initialization target -->
-  <target name="init" depends="init-tasks">
-    <tstamp>
-      <format property="SNAPSHOT_STAMP" pattern="yyyyMMddhhmmss"/>
-    </tstamp>
-    
-    <echo message="------------------- ${Name} ${version} [${year}] ----------------"/>
-    <echo>Building with ${ant.version}</echo>
-    <echo>Using build file ${ant.file}</echo>
-
-    <property name="snapshot.bin.name" value="${fullname}-${SNAPSHOT_STAMP}-bin"/>
-    <property name="snapshot.src.name" value="${fullname}-${SNAPSHOT_STAMP}-src"/>
-    <property name="snapshot.bin.dir" value="${dist.root}/${snapshot.bin.name}"/>
-    <property name="snapshot.src.dir" value="${dist.root}/${snapshot.src.name}"/>
-  </target>
-
-  <!-- Prepare the build webapp directory -->
-  <target name="check-cocoon" depends="init" unless="gump.skipcocoonbuild">
-    <available file="${cocoon.src.dir}/build/webapp" type="dir" property="cocoon.build.webapp.dir.exists"/>
-    <antcall target="build-cocoon"/>
-  </target>
-
-  <!-- Build Cocoon with our properties -->
-  <target name="build-cocoon" unless="cocoon.build.webapp.dir.exists">
-    <copy todir="${cocoon.src.dir}" filtering="off">
-      <fileset dir="${src.cocoon.properties.dir}"/>
-    </copy>
-    <ant dir="${cocoon.src.dir}" inheritall="false"/>
-  </target>
-
-  <!-- Copy the bulk of the cocoon webapp to our destination -->
-  <target name="prepare-cocoon" depends="check-cocoon" unless="gump.skipcocoonbuild">
-    <copy todir="${build.webapp}" filtering="off">
-      <fileset dir="${cocoon.webapp.dir}">
-        <exclude name="resources/**"/>
-        <exclude name="stylesheets**"/>
-        <exclude name="*.xml"/>
-        <exclude name="*.xslt"/>
-        <exclude name="test-suite/**"/>
-        <exclude name="legal/**"/>
-        <exclude name="WEB-INF/db/**"/>
-        <exclude name="WEB-INF/xconf/**"/>
-        <exclude name="WEB-INF/cocoon.xconf"/>
-        <exclude name="**/javac.jar"/>
-      </fileset>
-    </copy>
-
-    <!-- patch sitemap.xmap -->
-    <xpatch file="${build.webapp}/sitemap.xmap" 
-            includes="src/confpatch/*.xmap"/> 
-
-    <!-- patch cocoon.xconf -->
-  	<xslt
-        in="${cocoon.webapp.dir}/WEB-INF/cocoon.xconf"
-        out="${build.webapp}/WEB-INF/cocoon.xconf"
-        style="${src.webapp.dir}/WEB-INF/cocoon-xconf.xsl"
-        >
-      <param name="xopus-context" expression="${xopus.context}"/>
-      <outputproperty name="indent" value="yes"/>
-    </xslt>
-    
-    <!-- patch logkit.xconf -->
-    <xpatch file="${build.webapp}/WEB-INF/logkit.xconf"
-        includes="src/confpatch/logkit-*.xconf"/> 
-    
-    <!-- patch web.xml -->
-    <xpatch file="${build.webapp}/WEB-INF/web.xml" 
-            includes="src/confpatch/*.xweb"/> 
-
-    <!-- Copy Entities 
-    <copyJavaSources pubsrootdirs="${pubs.root.dirs}" javadir="${src.entities.dir}" builddir="${build.webapp}/${build.entities.dir}" />    
-    -->
-  </target>
-
-  <target name="prepare" depends="prepare-cocoon">
-    <mkdir dir="${build.dir}"/>
-    <mkdir dir="${build.webapp}"/>
-  </target>
-
-  <!-- Copy publication source code and libraries to ${build.src} -->
-  <target name="prepare-src" depends="prepare">
-    
-    <!-- FIXME: Use bulkCopy task in the future; needs regexp mapper which is part of ant optional package. -->
-    <!-- Copy java source files from ${pubs.root.dirs} to ${build.src} -->
-    <copyJavaSources pubsrootdirs="${pubs.root.dirs}" javadir="java/src" builddir="${build.src}" />
-    
-    <!-- Copy publication specific libraries from ${pubs.root.dirs} (java/lib) to ${build.webapp}/WEB-INF/lib -->
-    <bulkCopy 
-      sourcedirs="${pubs.root.dirs}" 
-      todir="${build.webapp}/WEB-INF/lib" 
-      flatten="true">
-      <fileset includes="*/java/lib/*"/>
-    </bulkCopy>
-  </target>
-</project>
diff --git a/src/targets/kupu-build.xml b/src/targets/kupu-build.xml
deleted file mode 100644
index a7315bd..0000000
--- a/src/targets/kupu-build.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-<project name="kupu" default="kupu">
-  
-  <description>
-    Kupu targets
-  </description>
-
-  <target name="kupu" depends="webapp" description="Build Kupu">
-
-    <echo>
-      ********************************************
-      *               Build Kupu.                *
-      ********************************************
-    </echo>
-    
-    <exec 
-      dir="${build.webapp}/lenya/resources/kupu" 
-      executable="xsltproc" 
-      failonerror="false" 
-      failifexecutionfails="false" 
-      outputproperty="xsltproc.output"
-    />
-    
-    <fail unless="xsltproc.output">:            
-      ********************************************
-      * Please install "xsltproc" to build Kupu. *
-	  *                                          *
-	  * xsltproc can be downloaded from          *
-	  * ftp://ftp.zlatkovic.com/pub/libxml/      *
-	  * (you also need zlib and iconv)           *
-      ********************************************
-      
-    </fail>
-    
-    <exec dir="${build.webapp}/lenya/resources/kupu" 
-      executable="make" 
-      failonerror="true" 
-      failifexecutionfails="false"
-    />
-
-  </target>
-</project>
diff --git a/src/targets/message-build.xml b/src/targets/message-build.xml
deleted file mode 100644
index 4e0e410..0000000
--- a/src/targets/message-build.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<project name="message">
-
-  <description>
-    Message targets
-  </description>
-
-  <target name="successfully-built-message-jetty" if="servlet.engine.jetty">
-    <echo message="*****************************************************************"/>
-    <echo message="*"/>
-    <echo message="* You have successfully built ${Name} ${version} based on"/>
-    <echo message="*"/>
-    <echo message="*      Cocoon (${cocoon.src.dir})"/>
-    <echo message="*"/>
-    <echo message="* Start using ${Name} with Jetty by typing"/>
-    <echo message="*      Linux/UNIX: ./lenya.sh servlet"/>
-    <echo message="*      Windows:      lenya"/>
-    <echo message="*"/>
-    <echo message="* and browse to "/>
-    <echo message="*      http://127.0.0.1:8888"/>
-    <echo message="*"/>
-    <echo message="* Thanks for using ${Name}"/>
-    <echo message="*"/>
-    <echo message="*****************************************************************"/>
-  </target>
-
-  <target name="successfully-built-message-tomcat" if="servlet.engine.tomcat">
-    <echo message="*****************************************************************"/>
-    <echo message="*"/>
-    <echo message="* You have successfully built ${Name} ${version} based on"/>
-    <echo message="*"/>
-    <echo message="*      Cocoon (${cocoon.src.dir})"/>
-    <echo message="*"/>
-    <echo message="* Start using ${Name} with Tomcat by typing"/>
-    <echo message="*      Linux/UNIX: ${tomcat.home.dir}/bin/startup.sh"/>
-    <echo message="*      Windows:    ${tomcat.home.dir}/bin/startup.bat"/>
-    <echo message="*"/>
-    <echo message="* and browse to "/>
-    <echo message="*      http://127.0.0.1:8080/lenya/"/>
-    <echo message="*"/>
-    <echo message="* Thanks for using ${Name}"/>
-    <echo message="*"/>
-    <echo message="*****************************************************************"/>
-  </target>
-
-</project>
diff --git a/src/targets/properties-build.xml b/src/targets/properties-build.xml
deleted file mode 100644
index 3d9774c..0000000
--- a/src/targets/properties-build.xml
+++ /dev/null
@@ -1,135 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<project name="lenya-properties">
-
-  <description>
-    Properties Targets
-  </description>
-
-  <!-- Set up some global properties -->
-  <!--
-  Give user a chance to override without editing build.properties
-  (local.build.properties takes precedence)
-  -->
-  <property file="local.build.properties"/>
-  <property file="build.properties"/>
-
-  <condition property="local.properties.in.sync">
-    <equals arg1="${build.properties.version}" arg2="156028"/>
-  </condition>
-
-  <fail unless="local.properties.in.sync" message="It seems that your local.build.properties is NOT in sync with build.properties! The file build.properties has probably been modified by some Apache Lenya developer. Re-copy build.properties to local.build.properties and re-set your local properties to get the two files back in sync. Please apologoize the inconvenience."/>
-
-  <!-- Project version and name -->
-  <property name="version" value="1.4-dev"/>
-  <property name="fullname" value="${ant.project.name}-${version}"/>
-  <property name="distname" value="apache-${ant.project.name}-${version}"/>
-  <property name="Name"     value="Apache Lenya"/>
-  <property name="year"     value="1999-2005"/>
-
-  <property name="debug"          value="on"/>
-  <property name="optimize"       value="on"/>
-  <property name="deprecation"    value="on"/>
-  <property name="nowarn"         value="off"/>
-  <property name="target.vm"      value="1.4"/>
-
-  <property name="packages"      value="*.*"/>
-
-  <!-- The libraries we use and which are not already included in the cocoon package -->
-  <property name="lib.dir" value="lib"/>
-  <property name="tools.lib.dir" value="tools/lib"/>
-  <!-- All compilation and preparation takes place in build.root -->
-  <property name="build.root" value="build"/>
-  <!-- Destination for the compliation of our own classes in the "compile" target -->
-  <property name="build.dir" value="${build.root}/${ant.project.name}"/>
-  <!-- Destination for the filtered source files  -->
-  <property name="build.src" value="${build.dir}/src"/>
-  <!-- Destination for temporary files during the build  -->
-  <property name="build.temp" value="${build.dir}/temp"/>
-  <!-- This is where we assemble the webapp directory in the "webapp" task -->
-  <property name="build.webapp" value="${build.dir}/webapp"/>
-  <!-- This is where we do the tests -->
-  <property name="build.test" value="${build.root}/test"/>
-  <!-- All packaging for distribution takes place in dist.root -->
-  <property name="dist.root" value="dist"/>
-  <!-- The toplevel directory for the final end-user distribution -->
-  <property name="dist.bin.dir" value="${dist.root}/${distname}-bin"/>
-  <!-- The javadoc destination directory -->
-  <property name="dist.bin.javadocs" value="${build.webapp}/site/apidocs"/>
-  <!-- The filename of the final end-user war package -->
-  <property name="dist.bin.warfile" value="${dist.bin.dir}/${ant.project.name}.war"/>
-  <!-- The toplevel directory for the final developer source distribution -->
-  <property name="dist.src.dir" value="${dist.root}/${distname}-src"/>
-  <!--
-  The files that should be copied into the dist
-  directory and packed up as tar.gz file, along with the .war file
-  -->
-  <property name="src.dist.dir" value="./src/dist"/>
-  <!--
-  The files that should be copied into the source dist
-  directory and packed up as tar.gz file, along with the sources etc.
-  -->
-  <property name="src.dist-src.dir" value="./src/dist-src"/>
-  <!-- Our own source code tree is here -->
-  <property name="src.java.dir" value="./src/java"/>
-  <property name="java.dir" value="src/java"/>
-  <!-- This is where the source of the tests are located -->
-  <property name="src.test.dir" value="src/test"/>
-  <!-- Publication-specific entities are here -->
-  <property name="src.entities.dir" value="resources/entities"/>
-  <property name="build.entities.dir" value="WEB-INF/entities"/>
-  <!--
-  Our own webapp resources to be merged with the
-  contents of the cocoon webapp are here
-  -->
-  <property name="src.webapp.dir" value="src/webapp"/>
-  <property name="tools.tasks.dest" value="tools/anttasks"/>
-  <property name="src.resource.dir"  value="src/resources"/>
-  <!-- cocoon build properties directory -->
-  <property name="src.cocoon.properties.dir" value="src/cocoon"/>
-  <!-- hsqldb database config files directory -->
-  <property name="src.database.dir" value="src/webapp/WEB-INF/db"/>
-
-  <!-- Set up classpath -->
-  <path id="classpath">
-    <fileset dir="${lib.dir}">
-      <include name="*.jar"/>
-    </fileset>
-    <fileset dir="${cocoon.webapp.dir}/WEB-INF/lib">
-      <include name="*.jar"/>
-    </fileset>
-    <fileset dir="tools/jetty/lib">
-      <include name="servlet-2.3.jar"/>
-    </fileset>
-  </path>
-
-  <target name="cocoon-init-tasks">
-    <ant dir="${cocoon.src.dir}" target="init-tasks" inheritall="false"/>
-  </target>
-
-  <!-- Custom Ant tasks used for building Lenya -->
-  <target name="init-tasks" depends="cocoon-init-tasks">
-    <taskdef name="copyJavaSources" classpath="${tools.tasks.dest}" classname="org.apache.lenya.cms.ant.CopyJavaSourcesTask"/>
-    <taskdef name="bulkCopy"        classpath="${tools.tasks.dest}" classname="org.apache.lenya.cms.ant.BulkCopyTask"/>
-    <taskdef name="copyPubs"        classpath="${tools.tasks.dest}" classname="org.apache.lenya.cms.ant.CopyTask"/>
-    <taskdef name="xpatch"          classpath="${cocoon.src.dir}/tools/anttasks" classname="XConfToolTask" />
-  </target>  
-
-</project>
diff --git a/src/targets/publication-test-build-template.xml b/src/targets/publication-test-build-template.xml
deleted file mode 100644
index 4de3a73..0000000
--- a/src/targets/publication-test-build-template.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-<project name="lenya-pubtest">
-
-  <description>
-    Publication Test Targets
-  </description>
-
-<target depends="init, tests.prepare" name="test.publications">
-</target>
-</project>
\ No newline at end of file
diff --git a/src/targets/publication-test-build.xml b/src/targets/publication-test-build.xml
deleted file mode 100644
index 4de3a73..0000000
--- a/src/targets/publication-test-build.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-<project name="lenya-pubtest">
-
-  <description>
-    Publication Test Targets
-  </description>
-
-<target depends="init, tests.prepare" name="test.publications">
-</target>
-</project>
\ No newline at end of file
diff --git a/src/targets/test-build.xml b/src/targets/test-build.xml
deleted file mode 100644
index 17a3ab7..0000000
--- a/src/targets/test-build.xml
+++ /dev/null
@@ -1,242 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<project name="lenya-test">
-
-  <description>
-    Test Targets
-  </description>
-
-    <!-- === Test targets =========================================================== -->
-
-  <property name="test.pub.id" value="test"/>
-  <property name="test.pub.source.id" value="default"/>
-
-  <path id="classpath.default">
-    <path refid="classpath"/>
-    <pathelement location="${build.test}" />
-    <pathelement path="${build.webapp}/WEB-INF/classes" />
-    <fileset dir="${build.webapp}/WEB-INF/lib">
-      <include name="**.jar"/>
-    </fileset>
-  </path>
-      
-  <!-- Runs all tests -->
-  <target name="test"
-      description="Runs all tests"
-      depends="tests.junit, tests.anteater, tests.webtest"/>
-  
-  <!-- Prepares the test publication -->
-  <target name="test.pub.prepare">
-    
-    <property name="test.pub.dir" value="${build.webapp}/lenya/pubs/${test.pub.id}"/>
-    
-    <delete dir="${test.pub.dir}"/>
-    <mkdir dir="${test.pub.dir}"/>
-    
-    <copy todir="${test.pub.dir}">
-      <fileset dir="${build.webapp}/lenya/pubs/${test.pub.source.id}"/>
-    </copy>
-    
-  </target>
-  
-  <!-- prepares the tests. -->
-  <target name="tests.prepare">
-    <mkdir dir="${build.test}"/>
-
-    <!-- Copy test files to build test dir -->
-    <copy todir="${build.test}" filtering="on">
-      <fileset dir="${src.test.dir}" excludes="**/*.java"/>
-    </copy>
-
-    <copyJavaSources pubsrootdirs="${pubs.root.dirs}" javadir="java/test" builddir="${src.test.dir}" />
-
-    <!-- Compile tests -->
-    <javac srcdir="${src.test.dir}"
-           destdir="${build.test}"
-           debug="{debug}"
-           optimize="{optimize}"
-           deprecation="{deprecation}"
-           target="${target.vm}"
-           fork="true"
-           source="1.4">
-      <classpath refid="classpath"/>
-      <classpath>
-        <pathelement path="${build.webapp}/WEB-INF/classes" />
-      </classpath>
-    </javac>
-  </target>
-
-
-  <!-- Runs JUnit tests -->
-  <target name="tests.junit"	depends="init, tests.prepare,
-  			test.identity,
-  			test.workflow,
-  			test.anttask,
-  			test.publisher,
-  			test.accesscontrol,
-        test.deactivate,
-        test.publications" />
- 
-
-  
-  <!-- Identity Test -->
-  <target name="test.identity">
-    <java fork="yes" classname="org.apache.lenya.ac.impl.IdentityTest">
-      <arg value="${build.webapp}"/>
-      <arg value="default"/>
-      <classpath refid="classpath"/>
-      <classpath>
-        <pathelement location="${build.test}" />
-        <pathelement path="${build.webapp}/WEB-INF/classes" />
-        <pathelement path="${build.webapp}/WEB-INF/lib" />
-      </classpath>
-    </java>
-  </target>
-  
-    
-  <!-- AntTask Test -->
-  <target name="test.anttask" depends="test.pub.prepare">
-    <java
-    	fork="yes"
-    	classname="org.apache.lenya.cms.task.AntTaskTest"
-    	>
-      <jvmarg value="-enableassertions"/>
-      <arg value="${build.webapp}"/>
-      <arg value="${test.pub.id}"/>
-      <classpath refid="classpath.default"/>
-    </java>
-  </target>
-  
-
-  <!-- Workflow Test -->
-  <target name="test.workflow" depends="test.pub.prepare">
-    <java fork="yes" classname="org.apache.lenya.cms.workflow.WorkflowTest">
-      <jvmarg value="-enableassertions"/>
-      <arg value="${build.webapp}"/>
-      <arg value="${test.pub.id}"/>
-      <arg value="xhtml"/> <!-- document type -->
-      <classpath refid="classpath.default"/>
-    </java>
-  </target>  
-  
-  <!-- Publisher Test -->
-  <target name="test.publisher" depends="test.pub.prepare">
-    <java fork="yes" classname="org.apache.lenya.cms.task.PublisherTest">
-      <jvmarg value="-enableassertions"/>
-      <arg value="${build.webapp}"/>
-      <arg value="${test.pub.id}"/>
-      <classpath refid="classpath.default"/>
-    </java>
-  </target>  
-
-  <!-- Access Control Test -->
-  <target name="test.accesscontrol" depends="test.pub.prepare">
-    <java fork="yes" classname="org.apache.lenya.ac.impl.AccessControllerTest">
-      <jvmarg value="-enableassertions"/>
-      <arg value="${build.webapp}"/>
-      <arg value="${test.pub.id}"/>
-      <classpath refid="classpath.default"/>
-    </java>
-  </target>  
-
-  <!-- Publication Test -->
-  <target name="test.publication" depends="test.pub.prepare">
-    <java fork="yes" classname="org.apache.lenya.cms.publication.PublicationTest">
-      <jvmarg value="-enableassertions"/>
-      <arg value="${build.webapp}"/>
-      <arg value="${test.pub.id}"/>
-      <classpath refid="classpath.default"/>
-    </java>
-  </target>  
-
-  <!-- Deactivate Document Test -->
-  <target name="test.deactivate" depends="test.pub.prepare">
-    <java fork="yes" classname="org.apache.lenya.cms.task.DocumentDeactivateTaskTest">
-      <jvmarg value="-enableassertions"/>
-      <arg value="C:\digitas\src\lenya-trunk\build\lenya\webapp"/>
-      <arg value="${test.pub.id}"/>
-      <classpath refid="classpath.default"/>
-    </java>
-  </target>
-
-  <!-- ================================================ -->
-  <!-- Anteater tests -->
-  <!-- ================================================ -->
-  <target name="tests.anteater">
-    <property name="anteater.home" value=""/>
-    <property name="anteater.buildfile" value="src/test/anteater/tests.xml"/>
-    <java classname="org.apache.tools.ant.Main" fork="true">
-      <classpath>
-        <pathelement location="${anteater.home}/resources"/>
-        <fileset dir="${anteater.home}">
-          <include name="lib/**/*.jar"/>
-        </fileset>
-      </classpath>
-      <jvmarg value="-Dant.home=${anteater.home}"/>
-      <jvmarg value="-Danteater.home=${anteater.home}" />
-      <jvmarg value="-Danteater.report=${anteater.home}/resources/scripts/report.xml" />
-      <jvmarg value="-Danteater.resources=${anteater.home}/resources" />
-      <arg line="-f ${anteater.buildfile}"/>
-      <arg value="-propertyfile" />
-      <arg value="${anteater.home}/resources/META-INF/Anteater.properties" />
-      <!--
-      <arg value="-Ddefault.debug=10"/>
-      -->
-    </java>
-  </target>
-
-
-  <!-- ================================================ -->
-  <!-- Canoo Webtest tests -->
-  <!-- ================================================ -->
-  <target name="tests.webtest">
-    <property name="webtest.home" value=""/>
-    <property name="webtest.buildfile" value="src/test/webtest/tests.xml"/>
-    <java classname="org.apache.tools.ant.Main" fork="true">
-      <classpath>
-        <fileset dir="${webtest.home}">
-          <include name="lib/**/*.jar"/>
-        </fileset>
-        <pathelement location="${webtest.home}/lib"/>
-      </classpath>
-      <jvmarg value="-Dwebtest.home=${webtest.home}" />
-      <arg line="-f ${webtest.buildfile}"/>
-    </java>
-  </target>
-
-<!-- The XSP compilation target -->
-  <target name="compile-xsp" depends="tests.prepare"
-          description="Compile the XSP sources">
-    <mkdir dir="${build.dir}/work"/>
-    <java classname="org.apache.cocoon.bean.XSPPrecompileWrapper">
-      <arg value="-c${build.webapp}"/>
-      <arg value="-w${build.dir}/work"/>
-      <classpath>
-         <pathelement path="${build.webapp}/WEB-INF/classes"/>
-         <fileset dir="${build.webapp}/WEB-INF/lib">
-            <include name="*.jar"/>
-         </fileset>
-         <fileset dir="tools/jetty/lib">
-          <include name="servlet-2.3.jar"/>
-         </fileset>
-      </classpath>
-    </java>
-  </target>
-</project>
\ No newline at end of file
diff --git a/src/targets/webapp-build.xml b/src/targets/webapp-build.xml
deleted file mode 100644
index b38f078..0000000
--- a/src/targets/webapp-build.xml
+++ /dev/null
@@ -1,221 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<project name="lenya-webapp">
-
-  <description>
-    Webapp Targets
-  </description>
-
-  <!-- 
-  This target creates a webapp directory which exactly mirrors how
-  the war file will look. It is used to create the war file for
-  the "war" target but it can also be used by developers
-  directly.
-  This is useful if the reloadable attribute of the context
-  in the server.xml configuration is set to true so changes in the classes
-  are reflected immediately.
-  -->
-  <target name="webapp" depends="compile" 
-      description="Builds the webapp directory ready to be linked into a servlet engines context directory">  
-    <!--
-    Copy CMS files and overwrite some parts of the previously copied cocoon webapp package with our customized files
-    -->
-    <copy todir="${build.webapp}">
-      <fileset dir="${src.webapp.dir}">
-        <exclude name="lenya/pubs/**"/>
-        <exclude name="WEB-INF/*-xconf.xsl"/>
-      </fileset>
-    </copy>
-
-    <!-- Copy publications -->
-    <copyPubs todir="${build.webapp}/lenya/pubs" pubsrootdirs="${pubs.root.dirs}" excludes="CVS,.svn"/>
-
-    <!-- Patch cocoon.xconf -->
-    <copy file="${build.webapp}/WEB-INF/cocoon.xconf"
-          toFile="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch"/>
-    <xpatch file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch"
-             srcdir="${build.webapp}/lenya/pubs" 
-             includes="*/config/*.xconf"
-             excludes="*/config/publication.xconf"
-             addComments="true"/>
-    <checksum
-        file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch"
-        property="cocoon.xconf.md5"/>
-    <checksum
-        file="${build.webapp}/WEB-INF/cocoon.xconf"
-        property="${cocoon.xconf.md5}"
-        verifyProperty="cocoon.xconf.isEqual"/>
-    <condition property="cocoon.xconf.copy">
-       <isfalse value="${cocoon.xconf.isEqual}"/>
-    </condition>
-    <antcall target="copy-cocoon.xconf"/>
-    <delete file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch"/>
-
-    <!-- Patch web.xml -->
-    <!--
-    <xpatch file="${build.webapp}/WEB-INF/web.xml"
-            srcdir="${build.webapp}/lenya/pubs" 
-            includes="*/config/web.xml"
-            addComments="false"/>
-    -->
-            
-    <!-- Patch publication tests -->
-    <copy file="./src/targets/publication-test-build-template.xml"
-          tofile="./src/targets/publication-test-build.xml"
-          overwrite="true"/>
-    <xpatch file="./src/targets/publication-test-build.xml"
-            srcdir="${build.webapp}/lenya/pubs" 
-            includes="*/targets/test-build.xconf"
-            addComments="true"/>
-
-    <!--  copy properties, xml configuration files and roles -->
-    <copy todir="${build.webapp}/WEB-INF/classes">
-      <fileset dir="${build.src}">
-        <include name="**/*.properties"/>
-        <include name="**/*.roles"/>
-        <include name="**/*.xml"/>
-      </fileset>
-        <fileset dir="${java.dir}">
-          <include name="**/*.roles"/>
-        </fileset>
-    </copy>
-
-    <!-- now create logs directory, where log4j can write to -->
-    <mkdir dir="${build.webapp}/WEB-INF/logs"/>
-    
-    <!-- now copy any additional libraries in ./lib -->
-    <mkdir dir="${build.webapp}/WEB-INF/lib"/>
-
-    <!-- Copy libraries from ${lib.dir} and ${tools.lib.dir} to ${build.webapp}/WEB-INF/lib -->
-    <copy todir="${build.webapp}/WEB-INF/lib">
-      <fileset dir="${lib.dir}">
-        <include name="**/*"/>
-      </fileset>
-      <fileset dir="${tools.lib.dir}">
-        <include name="**/*"/>
-      </fileset>
-    </copy>
-
-    <!-- Copy database files to ${build.webapp}/WEB-INF/db -->
-    <copy todir="${build.webapp}/WEB-INF/db">
-      <fileset dir="${src.database.dir}">
-        <include name="**/*"/>
-      </fileset>
-    </copy>
-  	
-  	<!-- Replace version placeholder with build version -->
-  	<replace dir="${build.webapp}">
-	  <include name="**/publication.xml"/>
-  	  <include name="**/introduction.xml"/>
-  	  <include name="**/about.xml"/>
-  	  <replacefilter token="@lenya.version@" value="${version}"/>
-  	</replace>
-
-  	<condition property="servlet.engine.tomcat">
-      <equals arg1="${web.app.server}" arg2="Tomcat"/>
-    </condition>
-    <antcall target="successfully-built-message-tomcat"/>
-
-    <condition property="servlet.engine.jetty">
-      <equals arg1="${web.app.server}" arg2="Jetty"/>
-    </condition>
-    <antcall target="successfully-built-message-jetty"/>
-
-  </target>
-
-  <!-- Copy cocoon.xconf -->
-  <target name="copy-cocoon.xconf" if="cocoon.xconf.copy">
-    <copy
-       file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch"
-       toFile="${build.webapp}/WEB-INF/cocoon.xconf"/>
-  </target>
-
-  <!--
-  The war target just packs up what was created in the webapp target
-  (and triggers the javadoc target with the dependency)
-  -->
-  <target name="war" depends="webapp" description="Builds the deployable war file">
-    <mkdir dir="${dist.bin.dir}"/>
-    <jar jarfile="${dist.bin.warfile}" basedir="${build.webapp}" excludes="META-INF/MANIFEST.MF"/>
-  </target>
-
-  <!-- Clean targets -->
-  <target name="reset" depends="clean" description="Resets the deployment by also cleaning the servlet engine context">
-    <!-- Empty server cache - this directory is set in the "local.build.properties" file -->
-    <delete dir="${tomcat.cache.dir}"/>
-    <mkdir dir="${tomcat.webapps.dir}" />
-    <delete includeEmptyDirs="true">
-      <fileset dir="${tomcat.webapps.dir}" excludes="${target.reset.excludes}" />
-    </delete>
-  </target>
-
-  <!-- Cleans the build directory, with the exception of target.reset.excludes -->
-  <target name="clean" depends="init" description="Cleans the build directories">
-    <mkdir dir="${build.root}"/> <!-- Create dir such that build process does not fail if build dir does not exist -->
-    <delete includeEmptyDirs="true">
-      <fileset dir="${build.root}" excludes="${target.reset.excludes}" />
-    </delete>
-    <delete dir="${dist.root}"/>
-  </target>
-
-  <!-- Install the webapp -->
-  <target name="install" depends="webapp" description="Install the webapp into servlet engine context">
-    <!-- Copy From build.webapp=${build.webapp} To tomcat.webapps.dir=${tomcat.webapps.dir} -->
-    <copy todir="${tomcat.webapps.dir}" filtering="off">
-      <fileset dir="${build.webapp}" excludes="${target.install.excludes}"/>
-    </copy>
-
-    <!-- Copy endorsed libraries -->
-    <copy todir="${tomcat.endorsed.dir}">
-      <fileset dir="${build.webapp}/WEB-INF/lib/">
-        <include name="xercesImpl-*.jar"/>
-        <include name="xalan-*.jar"/>
-        <include name="jakarta-regexp-*.jar"/>
-        <include name="jakarta-bcel-*.jar"/>
-      </fileset>
-    </copy>
-    <copy file="${build.webapp}/WEB-INF/lib/xml-apis.jar" todir="${tomcat.endorsed.dir}"/>
-  </target>
-
-  <!-- Install publication -->
-  <target name="install-pub" depends="webapp" description="Install a publication into servlet engine context. Usage: -Dpub.prefix=blog">
-    <!-- Copy From build.webapp=${build.webapp}/lenya/pubs/${pub.prefix} To tomcat.webapps.dir=${tomcat.webapps.dir}/lenya/pubs/${pub.prefix} -->
-    <copy todir="${tomcat.webapps.dir}/lenya/pubs/${pub.prefix}" filtering="off">
-      <fileset dir="${build.webapp}/lenya/pubs/${pub.prefix}" excludes="${target.install.excludes}"/>
-    </copy>
-  </target>
-
-  <!-- Reload Tomcat -->
-  <target name="reload">
-    <!-- For Tomcat Tasks -->
-    <path id="tomcat.classpath">
-        <fileset dir="${tomcat.webapps.dir}/../../server/lib" 
-            includes="catalina-ant.jar" />
-    </path>
-    <taskdef name="reload" 
-        classname="org.apache.catalina.ant.ReloadTask"
-        classpathref="tomcat.classpath" /> 
-    <reload
-    		url="http://localhost:8080/manager"
-    		username="user"
-    		password="password"
-    	  path="/lenya"/>
-  </target>
-</project>
diff --git a/src/test/anteater/tests.xml b/src/test/anteater/tests.xml
deleted file mode 100644
index 88ba034..0000000
--- a/src/test/anteater/tests.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: tests.xml,v 1.4 2004/03/13 12:44:37 gregor Exp $ -->
-
-<!DOCTYPE project [
-  <!ENTITY default SYSTEM "../../webapp/lenya/pubs/default/test/anteater/tests.xml"> 
-]>
-
-<project name="Lenya Anteater Tests" default="tests">
-
-  <taskdef resource="META-INF/Anteater.tasks"/>
-  <typedef resource="META-INF/Anteater.types"/>
-  
-  <property name="default.port" value="8888"/>
-  <property name="default.haltonerror" value="true"/>
-
-  <target name="tests"
-    depends="
-        pubs.default
-    "/>
-
-  &default;
-
-</project>
\ No newline at end of file
diff --git a/src/test/org/apache/cocoon/SitemapComponentTestCase.java b/src/test/org/apache/cocoon/SitemapComponentTestCase.java
deleted file mode 100644
index d74e416..0000000
--- a/src/test/org/apache/cocoon/SitemapComponentTestCase.java
+++ /dev/null
@@ -1,761 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation.
- * 
- * Licensed 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.
- */
-
-package org.apache.cocoon;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
-import org.apache.avalon.framework.context.DefaultContext;
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.cocoon.acting.Action;
-import org.apache.cocoon.components.ContextHelper;
-import org.apache.cocoon.components.flow.AbstractInterpreter;
-import org.apache.cocoon.components.flow.FlowHelper;
-import org.apache.cocoon.components.flow.Interpreter;
-import org.apache.cocoon.components.source.SourceResolverAdapter;
-import org.apache.cocoon.core.container.ContainerTestCase;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.mock.MockContext;
-import org.apache.cocoon.environment.mock.MockRedirector;
-import org.apache.cocoon.environment.mock.MockRequest;
-import org.apache.cocoon.environment.mock.MockResponse;
-import org.apache.cocoon.generation.Generator;
-import org.apache.cocoon.matching.Matcher;
-import org.apache.cocoon.serialization.Serializer;
-import org.apache.cocoon.sitemap.PatternException;
-import org.apache.cocoon.transformation.Transformer;
-import org.apache.cocoon.xml.WhitespaceFilter;
-import org.apache.cocoon.xml.dom.DOMBuilder;
-import org.apache.cocoon.xml.dom.DOMStreamer;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.excalibur.xml.sax.SAXParser;
-import org.custommonkey.xmlunit.Diff;
-import org.w3c.dom.Document;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-/**
- * Testcase for actions, generators, transformers and serializer components. 
- *
- * @author <a href="mailto:stephan@apache.org">Stephan Michels</a>
- * @author <a href="mailto:mark.leicester@energyintellect.com">Mark Leicester</a>
- * @version CVS $Id$
- */
-public abstract class SitemapComponentTestCase extends ContainerTestCase {
-    
-    public final static Parameters EMPTY_PARAMS = Parameters.EMPTY_PARAMETERS;
-
-    private MockRequest request = new MockRequest();
-    private MockResponse response = new MockResponse();
-    private MockContext context = new MockContext();
-    private MockRedirector redirector = new MockRedirector();
-    private Map objectmodel = new HashMap();
-
-    public final MockRequest getRequest() {
-        return request;
-    }
-
-    public final MockResponse getResponse() {
-        return response;
-    }
-
-    public final MockContext getContext() {
-        return context;
-    }
-
-    public final MockRedirector getRedirector() { 
-        return redirector;
-    }
-
-    public final Map getObjectModel() {
-        return objectmodel;
-    }
-    
-    protected void addContext(DefaultContext context) {
-        context.put(ContextHelper.CONTEXT_REQUEST_OBJECT, request);
-        context.put(ContextHelper.CONTEXT_RESPONSE_OBJECT, response);
-        context.put(ContextHelper.CONTEXT_OBJECT_MODEL, objectmodel);
-    }
-
-    public void setUp() throws Exception {
-        super.setUp();
-        objectmodel.clear();
-
-        request.reset();
-        objectmodel.put(ObjectModelHelper.REQUEST_OBJECT, request);
-
-        response.reset();
-        objectmodel.put(ObjectModelHelper.RESPONSE_OBJECT, response);
-
-        context.reset();
-        objectmodel.put(ObjectModelHelper.CONTEXT_OBJECT, context);
-
-        redirector.reset();
-    }
-
-    /**
-     * Match with a pattern.
-     *
-     * @param type Hint of the matcher. 
-     * @param pattern Pattern for the matcher.
-     * @param parameters Matcher parameters.
-     */
-    public final Map match(String type, String pattern, Parameters parameters) throws PatternException {
-
-        ServiceSelector selector = null;
-        Matcher matcher = null;
-        SourceResolver resolver = null;
-
-        Map result = null;
-        try {
-            selector = (ServiceSelector) this.lookup(Matcher.ROLE +
-                "Selector");
-            assertNotNull("Test lookup of matcher selector", selector);
-
-            resolver = (SourceResolver) this.lookup(SourceResolver.ROLE);
-            assertNotNull("Test lookup of source resolver", resolver);
-
-            assertNotNull("Test if matcher name is not null", type);
-            matcher = (Matcher) selector.select(type);
-            assertNotNull("Test lookup of matcher", matcher);
-
-            result = matcher.match(pattern, objectmodel, parameters);
-
-        } catch (ServiceException ce) {
-            getLogger().error("Could not retrieve matcher", ce);
-            fail("Could not retrieve matcher: " + ce.toString());
-        } finally {
-            if (matcher != null) {
-                selector.release(matcher);
-            }
-            this.release(selector);
-            this.release(resolver);
-        }
-        return result;
-    }
-
-    /**
-     * Select with a pattern.
-     *
-     * @param type Hint of the matcher. 
-     * @param expression Expression for the selector.
-     * @param parameters Matcher parameters.
-     */
-    public final boolean select(String type, String expression, Parameters parameters) {
-
-        ServiceSelector selector = null;
-        org.apache.cocoon.selection.Selector sel = null;
-        SourceResolver resolver = null;
-
-        boolean result = false;
-        try {
-            selector = (ServiceSelector) this.lookup(org.apache.cocoon.selection.Selector.ROLE +
-                "Selector");
-            assertNotNull("Test lookup of selector selector", selector);
-
-            resolver = (SourceResolver) this.lookup(SourceResolver.ROLE);
-            assertNotNull("Test lookup of source resolver", resolver);
-
-            assertNotNull("Test if selector name is not null", type);
-            sel = (org.apache.cocoon.selection.Selector) selector.select(type);
-            assertNotNull("Test lookup of selector", sel);
-            
-
-            result = sel.select(expression, objectmodel, parameters);
-
-        } catch (ServiceException ce) {
-            getLogger().error("Could not retrieve selector", ce);
-            fail("Could not retrieve selector: " + ce.toString());
-        } finally {
-            if (sel != null) {
-                selector.release(sel);
-            }
-            this.release(selector);
-            this.release(resolver);
-        }
-        return result;
-    }
-
-    /**
-     * Perform the action component.
-     *
-     * @param type Hint of the action. 
-     * @param source Source for the action.
-     * @param parameters Action parameters.
-     */
-    public final Map act(String type, String source, Parameters parameters) throws Exception {
-        
-        redirector.reset();
-
-        ServiceSelector selector = null;
-        Action action = null;
-        SourceResolver resolver = null;
-
-        Map result = null;
-        try {
-            selector = (ServiceSelector) this.lookup(Action.ROLE +
-                "Selector");
-            assertNotNull("Test lookup of action selector", selector);
-
-            resolver = (SourceResolver) this.lookup(SourceResolver.ROLE);
-            assertNotNull("Test lookup of source resolver", resolver);
-
-            assertNotNull("Test if action name is not null", type);
-            action = (Action) selector.select(type);
-            assertNotNull("Test lookup of action", action);
-
-            result = action.act(redirector, new SourceResolverAdapter(resolver),
-                                objectmodel, source, parameters);
-
-        } catch (ServiceException ce) {
-            getLogger().error("Could not retrieve action", ce);
-            fail("Could not retrieve action: " + ce.toString());
-        } finally {
-            if (action != null) {
-                selector.release(action);
-            }
-            this.release(selector);
-            this.release(resolver);
-        }
-        return result;
-    }
-
-    /**
-     * Generate the generator output.
-     *
-     * @param type Hint of the generator. 
-     * @param source Source for the generator.
-     * @param parameters Generator parameters.
-     */
-    public final Document generate(String type, String source, Parameters parameters) 
-        throws IOException, SAXException, ProcessingException {
-
-        ServiceSelector selector = null;
-        Generator generator = null;
-        SourceResolver resolver = null;
-        SAXParser parser = null;
-
-        Document document = null;
-        try {
-            selector = (ServiceSelector) this.lookup(Generator.ROLE +
-                "Selector");
-            assertNotNull("Test lookup of generator selector", selector);
-
-            resolver = (SourceResolver) this.lookup(SourceResolver.ROLE);
-            assertNotNull("Test lookup of source resolver", resolver);
-
-            parser = (SAXParser) this.lookup(SAXParser.ROLE);
-            assertNotNull("Test lookup of parser", parser);
-
-            assertNotNull("Test if generator name is not null", type);
-
-            generator = (Generator) selector.select(type);
-            assertNotNull("Test lookup of generator", generator);
-
-            generator.setup(new SourceResolverAdapter(resolver),
-                            objectmodel, source, parameters);
-
-            DOMBuilder builder = new DOMBuilder();
-            generator.setConsumer(new WhitespaceFilter(builder));
-
-            generator.generate();
-
-            document = builder.getDocument();
-
-            assertNotNull("Test for generator document", document);
-
-        } catch (ServiceException ce) {
-            getLogger().error("Could not retrieve generator", ce);
-            fail("Could not retrieve generator: " + ce.toString());
-        } finally {
-            if (generator != null) {
-                selector.release(generator);
-            }
-            this.release(selector);
-            this.release(resolver);
-            this.release(parser);
-        }
-
-        return document;
-    }
-
-    /**     
-     * Trannsform a document by a transformer
-     *      
-     * @param type Hint of the transformer. 
-     * @param source Source for the transformer.
-     * @param parameters Generator parameters.
-     * @param input Input document.
-     */ 
-    public final Document transform(String type, String source, Parameters parameters, Document input) 
-        throws SAXException, ProcessingException, IOException {
-
-        ServiceSelector selector = null;
-        Transformer transformer = null;
-        SourceResolver resolver = null;
-        SAXParser parser = null;
-        Source inputsource = null;
-
-        assertNotNull("Test for component manager", this.getManager());
-
-        Document document = null;
-        try {
-            selector = (ServiceSelector) this.lookup(Transformer.ROLE+
-                "Selector");
-            assertNotNull("Test lookup of transformer selector", selector);
-
-            resolver = (SourceResolver) this.lookup(SourceResolver.ROLE);
-            assertNotNull("Test lookup of source resolver", resolver);
-
-            parser = (SAXParser) this.lookup(SAXParser.ROLE);
-            assertNotNull("Test lookup of parser", parser);
-
-
-            assertNotNull("Test if transformer name is not null", type);
-            transformer = (Transformer) selector.select(type);
-            assertNotNull("Test lookup of transformer", transformer);
-
-            transformer.setup(new SourceResolverAdapter(resolver),
-                                  objectmodel, source, parameters);
-
-            DOMBuilder builder = new DOMBuilder();
-            transformer.setConsumer(new WhitespaceFilter(builder));
-
-            assertNotNull("Test if input document is not null", input);
-            DOMStreamer streamer = new DOMStreamer(transformer);
-            streamer.stream(input);
-
-            document = builder.getDocument();
-            assertNotNull("Test for transformer document", document);
-
-        } catch (ServiceException ce) {
-            getLogger().error("Could not retrieve transformer", ce);
-            ce.printStackTrace();
-            fail("Could not retrieve transformer:"+ce.toString());
-        } finally {
-            if (transformer!=null) {
-                selector.release(transformer);
-            }
-
-            if (selector!=null) {
-                this.release(selector);
-            }
-
-            if (inputsource!=null) {
-                resolver.release(inputsource);
-            }
-
-            if (resolver!=null) {
-                this.release(resolver);
-            }
-
-            if (parser!=null) {
-                this.release(parser);
-            }
-        }
-
-        return document; 
-    }
-
-    /**
-     * Serialize a document by a serializer
-     *
-     * @param type Hint of the serializer.
-     * @param parameters Serializer parameters.
-     * @param input Input document.
-     *
-     * @return Serialized data.
-     */
-    public final byte[] serialize(String type, Parameters parameters,
-                                  Document input) throws SAXException, IOException{
-
-        ServiceSelector selector = null;
-        Serializer serializer = null;
-        SourceResolver resolver = null;
-        Source inputsource = null;
-
-        assertNotNull("Test for component manager", this.getManager());
-
-        ByteArrayOutputStream document = null;
-
-        try {
-            selector = (ServiceSelector) this.lookup(Serializer.ROLE+
-                "Selector");
-            assertNotNull("Test lookup of serializer selector", selector);
-
-            resolver = (SourceResolver) this.lookup(SourceResolver.ROLE);
-            assertNotNull("Test lookup of source resolver", resolver);
-
-            assertNotNull("Test if serializer name is not null", type);
-            serializer = (Serializer) selector.select(type);
-            assertNotNull("Test lookup of serializer", serializer);
-
-            document = new ByteArrayOutputStream();
-            serializer.setOutputStream(document);
-
-            assertNotNull("Test if input document is not null", input);
-            DOMStreamer streamer = new DOMStreamer(serializer);
-
-            streamer.stream(input);
-        } catch (ServiceException ce) {
-            getLogger().error("Could not retrieve serializer", ce);
-            fail("Could not retrieve serializer:"+ce.toString());
-        } finally {
-            if (serializer!=null) {
-                selector.release(serializer);
-            }
-
-            if (selector!=null) {
-                this.release(selector);
-            }
-
-            if (inputsource!=null) {
-                resolver.release(inputsource);
-            }
-
-            if (resolver!=null) {
-                this.release(resolver);
-            }
-        }
-
-        return document.toByteArray();
-    }
-    
-    public String callFunction(String type, String source, String function, Map params) throws Exception {
-        
-        redirector.reset();
-        
-        ServiceSelector selector = null;
-        Interpreter interpreter = null;
-        SourceResolver resolver = null;
-
-        try {
-            selector = (ServiceSelector) this.lookup(Interpreter.ROLE);
-            assertNotNull("Test lookup of interpreter selector", selector);
-
-            resolver = (SourceResolver) this.lookup(SourceResolver.ROLE);
-            assertNotNull("Test lookup of source resolver", resolver);
-
-            assertNotNull("Test if interpreter name is not null", type);
-            interpreter = (Interpreter) selector.select(type);
-            assertNotNull("Test lookup of interpreter", interpreter);
-            
-            ((AbstractInterpreter)interpreter).register(source);
-            
-            ArrayList parameters = new ArrayList();
-            for (Iterator i = params.entrySet().iterator(); i.hasNext();) {
-                Map.Entry me = (Map.Entry)i.next();
-                String name = (String)me.getKey();
-                String value = (String)me.getValue();
-                parameters.add(new Interpreter.Argument(name, value));
-            }
-            interpreter.callFunction(function, parameters, getRedirector());
-            
-        } catch (ServiceException ce) {
-            getLogger().error("Could not retrieve interpeter", ce);
-            fail("Could not retrieve interpreter: " + ce.toString());
-        } finally {
-            if (interpreter != null) {
-                selector.release(interpreter);
-            }
-            this.release(selector);
-            this.release(resolver);
-        }
-        return FlowHelper.getWebContinuation(getObjectModel()).getId();
-    }
-    
-    public String callContinuation(String type, String source, String id, Map params) throws Exception {
-        
-        redirector.reset();
-        
-        ServiceSelector selector = null;
-        Interpreter interpreter = null;
-        SourceResolver resolver = null;
-
-        try {
-            selector = (ServiceSelector) this.lookup(Interpreter.ROLE);
-            assertNotNull("Test lookup of interpreter selector", selector);
-
-            resolver = (SourceResolver) this.lookup(SourceResolver.ROLE);
-            assertNotNull("Test lookup of source resolver", resolver);
-
-            assertNotNull("Test if interpreter name is not null", type);
-            interpreter = (Interpreter) selector.select(type);
-            assertNotNull("Test lookup of interpreter", interpreter);
-
-            ((AbstractInterpreter)interpreter).register(source);
-            
-            ArrayList parameters = new ArrayList();
-            for (Iterator i = params.entrySet().iterator(); i.hasNext();) {
-                Map.Entry me = (Map.Entry)i.next();
-                String name = (String)me.getKey();
-                String value = (String)me.getValue();
-                parameters.add(new Interpreter.Argument(name, value));
-            }
-            interpreter.handleContinuation(id, parameters, getRedirector());
-
-        } catch (ServiceException ce) {
-            getLogger().error("Could not retrieve interpreter", ce);
-            fail("Could not retrieve interpreter: " + ce.toString());
-        } finally {
-            if (interpreter != null) {
-                selector.release(interpreter);
-            }
-            this.release(selector);
-            this.release(resolver);
-        }
-        return FlowHelper.getWebContinuation(getObjectModel()).getId();
-    }
-    
-    public Object getFlowContextObject() {
-        return FlowHelper.getContextObject(getObjectModel());
-    }
-
-    public final void print(Document document) {
-        TransformerFactory factory = TransformerFactory.newInstance();
-        try
-        {
-          javax.xml.transform.Transformer serializer = factory.newTransformer();
-          serializer.transform(new DOMSource(document), new StreamResult(System.out));
-          System.out.println();
-        } 
-        catch (TransformerException te)
-        {
-          te.printStackTrace();
-        }
-    }
-
-    public final Document load(String source) {
-
-        SourceResolver resolver = null;
-        SAXParser parser = null;
-        Source assertionsource = null;
-
-        assertNotNull("Test for component manager", this.getManager());
-
-        Document assertiondocument = null;
-        try {
-            resolver = (SourceResolver) this.lookup(SourceResolver.ROLE);
-            assertNotNull("Test lookup of source resolver", resolver);
-
-            parser = (SAXParser) this.lookup(SAXParser.ROLE);
-            assertNotNull("Test lookup of parser", parser);
-
-            assertNotNull("Test if assertion document is not null",
-                          source);
-            assertionsource = resolver.resolveURI(source);
-            assertNotNull("Test lookup of assertion source",
-                          assertionsource);
-            assertTrue("Test if source exist", assertionsource.exists());
-
-            DOMBuilder builder = new DOMBuilder();
-            assertNotNull("Test if inputstream of the assertion source is not null",
-                          assertionsource.getInputStream());
-
-            parser.parse(new InputSource(assertionsource.getInputStream()),
-                         new WhitespaceFilter(builder),
-                         builder);
-
-            assertiondocument = builder.getDocument();
-            assertNotNull("Test if assertion document exists", assertiondocument);
-
-        } catch (ServiceException ce) {
-            getLogger().error("Could not retrieve generator", ce);
-            fail("Could not retrieve generator: " + ce.toString());
-        } catch (Exception e) {
-            getLogger().error("Could not execute test", e);
-            fail("Could not execute test: " + e);
-        } finally {
-            if (resolver != null) {
-                resolver.release(assertionsource);
-            }
-            this.release(resolver);
-            this.release(parser);
-        }
-
-        return assertiondocument;
-    }
-
-    /**
-     * Load a binary document.
-     *
-     * @param source Source location.
-     *
-     * @return Binary data.
-     */
-    public final byte[] loadByteArray(String source) {
-
-        SourceResolver resolver = null;
-        SAXParser parser = null;
-        Source assertionsource = null;
-
-        assertNotNull("Test for component manager", this.getManager());
-
-        byte[] assertiondocument = null;
-
-        try {
-            resolver = (SourceResolver) this.lookup(SourceResolver.ROLE);
-            assertNotNull("Test lookup of source resolver", resolver);
-
-            parser = (SAXParser) this.lookup(SAXParser.ROLE);
-            assertNotNull("Test lookup of parser", parser);
-
-            assertNotNull("Test if assertion document is not null", source);
-            assertionsource = resolver.resolveURI(source);
-            assertNotNull("Test lookup of assertion source", assertionsource);
-            assertTrue("Test if source exist", assertionsource.exists());
-
-            assertNotNull("Test if inputstream of the assertion source is not null",
-                          assertionsource.getInputStream());
-
-            InputStream input = assertionsource.getInputStream();
-            long size = assertionsource.getContentLength();
-
-            assertiondocument = new byte[(int) size];
-            int i = 0;
-            int c;
-
-            while ((c = input.read())!=-1) {
-                assertiondocument[i] = (byte) c;
-                i++;
-            }
-
-        } catch (ServiceException ce) {
-            getLogger().error("Could not retrieve generator", ce);
-            fail("Could not retrieve generator: "+ce.toString());
-        } catch (Exception e) {
-            getLogger().error("Could not execute test", e);
-            fail("Could not execute test: "+e);
-        } finally {
-            if (resolver!=null) {
-                resolver.release(assertionsource);
-            }
-            this.release(resolver);
-            this.release(parser);
-        }
-
-        return assertiondocument;
-    }
-
-    /**
-     * Compare two XML documents provided as strings
-     * @param control Control document
-     * @param test Document to test
-     * @return Diff object describing differences in documents
-     */
-    public final Diff compareXML(Document control, Document test) {
-        return new Diff(control, test);
-    }
-
-    /**
-     * Assert that the result of an XML comparison is similar.
-     *
-     * @param msg The assertion message
-     * @param expected The expected XML document
-     * @param actual The actual XML Document
-     */
-    public final void assertEqual(String msg, Document expected, Document actual) {
-
-        expected.getDocumentElement().normalize();
-        actual.getDocumentElement().normalize();
-
-        Diff diff = compareXML(expected, actual);
-
-        assertEquals(msg + ", " + diff.toString(), true, diff.similar());
-    }
-
-    /**
-     * Assert that the result of an XML comparison is similar.
-     *
-     * @param expected The expected XML document
-     * @param actual The actual XML Document
-     */  
-    public final void assertEqual(Document expected, Document actual) {
-
-        expected.getDocumentElement().normalize();
-        actual.getDocumentElement().normalize();
-
-        Diff diff = compareXML(expected, actual);
-
-        assertEquals("Test if the assertion document is equal, " + diff.toString(), true, diff.similar());
-    }
-
-    /**
-     * Assert that the result of an XML comparison is identical.
-     *
-     * @param msg The assertion message
-     * @param expected The expected XML document
-     * @param actual The actual XML Document
-     */
-    public final void assertIdentical(String msg, Document expected, Document actual) {
-
-        expected.getDocumentElement().normalize();
-        actual.getDocumentElement().normalize();
-
-        Diff diff = compareXML(expected, actual);
-
-        assertEquals(msg + ", " + diff.toString(), true, diff.identical());
-    }
-
-    /**
-     * Assert that the result of an XML comparison is identical.
-     *
-     * @param expected The expected XML document
-     * @param actual The actual XML Document
-     */
-    public final void assertIdentical(Document expected, Document actual) {
-
-        expected.getDocumentElement().normalize();
-        actual.getDocumentElement().normalize();
-
-        Diff diff = compareXML(expected, actual);
-
-        assertEquals("Test if the assertion document is equal, " + diff.toString(), true, diff.identical());
-    }
-
-    /**
-     * Assert that the result of a byte comparison is identical.
-     *
-     * @param expected The expected byte array
-     * @param actual The actual byte array
-     */
-    public final void assertIdentical(byte[] expected, byte[] actual) {
-        assertEquals("Byte arrays of differing sizes, ", expected.length,
-                     actual.length);
-
-        if (expected.length>0) {
-            for (int i = 0; i<expected.length; i++) {
-                assertEquals("Byte array differs at index "+i, expected[i],
-                             actual[i]);
-            }
-        }
-
-    }
-}
diff --git a/src/test/org/apache/cocoon/bean/XSPPrecompileWrapper.java b/src/test/org/apache/cocoon/bean/XSPPrecompileWrapper.java
deleted file mode 100644
index f47b4ec..0000000
--- a/src/test/org/apache/cocoon/bean/XSPPrecompileWrapper.java
+++ /dev/null
@@ -1,903 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation.
- *
- * Licensed 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.
- */
-package org.apache.lenya.cms.cocoon.bean;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.net.MalformedURLException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.TreeMap;
-
-import org.apache.avalon.excalibur.component.ExcaliburComponentManager;
-import org.apache.avalon.excalibur.logger.LogKitLoggerManager;
-import org.apache.avalon.framework.component.ComponentException;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
-import org.apache.avalon.framework.container.ContainerUtil;
-import org.apache.avalon.framework.context.ContextException;
-import org.apache.avalon.framework.context.DefaultContext;
-import org.apache.avalon.framework.logger.LogKitLogger;
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.cocoon.Cocoon;
-import org.apache.cocoon.Constants;
-import org.apache.cocoon.ProcessingException;
-import org.apache.cocoon.components.CocoonComponentManager;
-import org.apache.cocoon.components.language.generator.CompiledComponent;
-import org.apache.cocoon.components.language.generator.ProgramGenerator;
-import org.apache.cocoon.environment.Environment;
-import org.apache.cocoon.environment.commandline.CommandLineContext;
-import org.apache.cocoon.environment.commandline.FileSavingEnvironment;
-import org.apache.cocoon.environment.commandline.LinkSamplingEnvironment;
-import org.apache.cocoon.util.ClassUtils;
-import org.apache.cocoon.util.IOUtils;
-import org.apache.cocoon.util.NetUtils;
-import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.HelpFormatter;
-import org.apache.commons.cli.Option;
-import org.apache.commons.cli.Options;
-import org.apache.commons.cli.PosixParser;
-import org.apache.commons.lang.SystemUtils;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.log.Hierarchy;
-import org.apache.log.Priority;
-import org.xml.sax.SAXException;
-
-
-/**
- * This is simple Wrapper like CocoonWrapper and can only
- * precompile all XSP in the context-directory.
- */
-public class XSPPrecompileWrapper {
-
-	protected static final String DEFAULT_USER_AGENT = Constants.COMPLETE_NAME;
-
-	protected static final String DEFAULT_ACCEPT = "text/html, */*";
-
-	// User Supplied Parameters
-	private String contextDir = Constants.DEFAULT_CONTEXT_DIR;
-
-	private String configFile = null;
-
-	private String workDir = Constants.DEFAULT_WORK_DIR;
-
-	private String logKit = null;
-
-	protected String logger = null;
-
-	protected String logLevel = "ERROR";
-
-	private String userAgent = DEFAULT_USER_AGENT;
-
-	private String accept = DEFAULT_ACCEPT;
-
-	private List classList = new ArrayList();
-
-	// Objects used alongside User Supplied Parameters
-	private File context;
-
-	private File work;
-
-	private File conf;
-
-	// Internal Objects
-	private CommandLineContext cliContext;
-
-	private LogKitLoggerManager logManager;
-
-	private Cocoon cocoon;
-
-	protected Logger log;
-
-	private Map attributes = new HashMap();
-
-	private HashMap empty = new HashMap();
-
-	private boolean initialized = false;
-
-	private SourceResolver sourceResolver;
-
-	private static Options options;
-
-	protected static final String HELP_OPT = "h";
-
-	protected static final String LOG_KIT_OPT = "k";
-
-	protected static final String CONTEXT_DIR_OPT = "c";
-
-	protected static final String WORK_DIR_OPT = "w";
-
-	protected static final String CONFIG_FILE_OPT = "C";
-
-	protected static final String LOG_KIT_LONG = "logKitconfig";
-
-	protected static final String CONTEXT_DIR_LONG = "contextDir";
-
-	protected static final String WORK_DIR_LONG = "workDir";
-
-	protected static final String HELP_LONG = "help";
-
-	protected static final String CONFIG_FILE_LONG = "configFile";
-
-	/**
-	 * INITIALISATION METHOD
-	 * @throws IOException
-	 */
-	public void initialize() throws IOException {
-		// @todo@ these should log then throw exceptions back to the caller, not
-		// use system.exit()
-
-		// Create a new hierarchy. This is needed when CocoonBean is called from
-		// within a CocoonServlet call, in order not to mix logs
-		final Hierarchy hierarchy = new Hierarchy();
-
-		final Priority priority = Priority.getPriorityForName(this.logLevel);
-		hierarchy.setDefaultPriority(priority);
-
-		// Install a temporary logger so that getDir() can log if needed
-		this.log = new LogKitLogger(hierarchy.getLoggerFor(""));
-
-		try {
-            // First of all, initialize the logging system
-
-            // Setup the application context with context-dir and work-dir that
-            // can be used in logkit.xconf
-            this.context = getDir(this.contextDir, "context");
-            this.work = getDir(this.workDir, "working");
-            DefaultContext appContext = new DefaultContext();
-            appContext.put(Constants.CONTEXT_WORK_DIR, this.work);
-
-            this.logManager = new LogKitLoggerManager(hierarchy);
-            this.logManager.enableLogging(this.log);
-
-            if (this.logKit != null) {
-            	final FileInputStream fis = new FileInputStream(this.logKit);
-            	final DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
-            	final Configuration logKitConf = builder.build(fis);
-            	final DefaultContext subcontext = new DefaultContext(appContext);
-            	subcontext.put("context-root", this.contextDir);
-            	subcontext.put("context-work", this.workDir);
-            	this.logManager.contextualize(subcontext);
-            	this.logManager.configure(logKitConf);
-            	if (this.logger != null) {
-            		this.log = this.logManager.getLoggerForCategory(this.logger);
-            	} else {
-            		this.log = this.logManager.getLoggerForCategory("cocoon");
-            	}
-            }
-
-            this.conf = getConfigurationFile(this.context, this.configFile);
-
-            this.cliContext = new CommandLineContext(this.contextDir);
-            this.cliContext.enableLogging(this.log);
-
-            appContext.put(Constants.CONTEXT_ENVIRONMENT_CONTEXT, this.cliContext);
-            appContext.put(Constants.CONTEXT_CLASS_LOADER, org.apache.cocoon.bean.CocoonWrapper.class
-            		.getClassLoader());
-            appContext.put(Constants.CONTEXT_CLASSPATH,
-            		getClassPath(this.contextDir));
-            appContext.put(Constants.CONTEXT_UPLOAD_DIR, this.contextDir
-            		+ "upload-dir");
-            File cacheDir = getDir(this.workDir + File.separator + "cache-dir",
-            		"cache");
-            appContext.put(Constants.CONTEXT_CACHE_DIR, cacheDir);
-            appContext.put(Constants.CONTEXT_CONFIG_URL, this.conf.toURL());
-            appContext.put(Constants.CONTEXT_DEFAULT_ENCODING, "ISO-8859-1");
-
-            loadClasses(this.classList);
-
-            this.cocoon = new Cocoon();
-            ContainerUtil.enableLogging(this.cocoon, this.log);
-            ContainerUtil.contextualize(this.cocoon, appContext);
-            this.cocoon.setLoggerManager(this.logManager);
-            ContainerUtil.initialize(this.cocoon);
-
-            this.sourceResolver = (SourceResolver) getComponentManager().lookup(
-            		SourceResolver.ROLE);
-        } catch (final IllegalStateException e) {
-			this.log.fatalError("Exception caught", e);
-			throw new IOException(e.toString());
-        } catch (final FileNotFoundException e) {
-			this.log.fatalError("Exception caught", e);
-			throw new IOException(e.toString());
-        } catch (final ConfigurationException e) {
-			this.log.fatalError("Exception caught", e);
-			throw new IOException(e.toString());
-        } catch (final ContextException e) {
-			this.log.fatalError("Exception caught", e);
-			throw new IOException(e.toString());
-        } catch (final MalformedURLException e) {
-			this.log.fatalError("Exception caught", e);
-			throw new IOException(e.toString());
-        } catch (final ComponentException e) {
-			this.log.fatalError("Exception caught", e);
-			throw new IOException(e.toString());
-        } catch (final IOException e) {
-			this.log.fatalError("Exception caught", e);
-			throw new IOException(e.toString());
-        } catch (final SAXException e) {
-			this.log.fatalError("Exception caught", e);
-			throw new IOException(e.toString());
-        } catch (final Exception e) {
-			this.log.fatalError("Exception caught", e);
-			throw new IOException(e.toString());
-        }
-
-
-		this.initialized = true;
-	}
-
-	protected ExcaliburComponentManager getComponentManager() {
-		return this.cocoon.getComponentManager();
-	}
-
-	/**
-	 * Look around for the configuration file.
-	 * 
-	 * @param dir
-	 *            a <code>File</code> where to look for configuration files
-	 * @param _configFile The config file
-	 * @return a <code>File</code> representing the configuration
-	 * @exception IOException
-	 *                if an error occurs
-	 */
-	private File getConfigurationFile(File dir, String _configFile)
-			throws IOException {
-		File _conf;
-		if (_configFile == null) {
-			_conf = tryConfigurationFile(dir + File.separator
-					+ Constants.DEFAULT_CONF_FILE);
-			if (_conf == null) {
-				_conf = tryConfigurationFile(dir + File.separator + "WEB-INF"
-						+ File.separator + Constants.DEFAULT_CONF_FILE);
-			}
-			if (_conf == null) {
-				_conf = tryConfigurationFile(SystemUtils.USER_DIR
-						+ File.separator + Constants.DEFAULT_CONF_FILE);
-			}
-			if (_conf == null) {
-				_conf = tryConfigurationFile("/usr/local/etc/"
-						+ Constants.DEFAULT_CONF_FILE);
-			}
-		} else {
-			_conf = new File(_configFile);
-			if (!_conf.exists()) {
-				_conf = new File(dir, _configFile);
-			}
-		}
-		if (_conf == null) {
-			this.log.error("Could not find the configuration file.");
-			throw new FileNotFoundException(
-					"The configuration file could not be found.");
-		}
-		return _conf;
-	}
-
-	/**
-	 * Try loading the configuration file from a single location
-	 * @param filename The configuration filename
-	 * @return The configuration file
-	 */
-	private File tryConfigurationFile(String filename) {
-		if (this.log.isDebugEnabled()) {
-			this.log.debug("Trying configuration file at: " + filename);
-		}
-		File _conf = new File(filename);
-		if (_conf.canRead()) {
-			return _conf;
-		}
-		return null;
-	}
-
-	/**
-	 * Get a <code>File</code> representing a directory.
-	 * @param dir
-	 *            a <code>String</code> with a directory name
-	 * @param type
-	 *            a <code>String</code> describing the type of directory
-	 * @return a <code>File</code> value
-	 * @exception IOException
-	 *                if an error occurs
-	 */
-	private File getDir(String dir, String type) throws IOException {
-		if (this.log.isDebugEnabled()) {
-			this.log.debug("Getting handle to " + type + " directory '" + dir + "'");
-		}
-		File d = new File(dir);
-
-		if (!d.exists()) {
-			if (!d.mkdirs()) {
-				throw new IOException("Error creating " + type + " directory '"
-						+ d + "'");
-			}
-		}
-
-		if (!d.isDirectory()) {
-			throw new IOException("'" + d + "' is not a directory.");
-		}
-
-		if (!d.canRead()) {
-			throw new IOException("Directory '" + d + "' is not readable");
-		}
-
-		if ("working".equals(type) && !d.canWrite()) {
-			throw new IOException("Directory '" + d + "' is not writable");
-		}
-
-		return d;
-	}
-
-	protected void finalize() throws Throwable {
-		dispose();
-		super.finalize();
-	}
-
-	protected void loadClasses(List _classList) {
-		if (_classList != null) {
-			for (Iterator i = _classList.iterator(); i.hasNext();) {
-				String className = (String) i.next();
-				try {
-                    if (this.log.isDebugEnabled()) {
-                    	this.log.debug("Trying to load class: " + className);
-                    }
-                    ClassUtils.loadClass(className).newInstance();
-                } catch (final InstantiationException e) {
-					if (this.log.isWarnEnabled()) {
-						this.log.warn("Could not force-load class: " + className, e);
-					}
-					// Do not throw an exception, because it is not a fatal
-					// error.
-                } catch (final IllegalAccessException e) {
-					if (this.log.isWarnEnabled()) {
-						this.log.warn("Could not force-load class: " + className, e);
-					}
-					// Do not throw an exception, because it is not a fatal
-					// error.
-                } catch (final ClassNotFoundException e) {
-					if (this.log.isWarnEnabled()) {
-						this.log.warn("Could not force-load class: " + className, e);
-					}
-					// Do not throw an exception, because it is not a fatal
-					// error.
-                }
-			}
-		}
-	}
-
-	//
-	// GETTERS AND SETTERS FOR CONFIGURATION PROPERTIES
-	//
-
-	/**
-	 * Set LogKit configuration file name
-	 * @param _logKit
-	 *            LogKit configuration file
-	 */
-	public void setLogKit(String _logKit) {
-		this.logKit = _logKit;
-	}
-
-	/**
-	 * Set log level. Default is DEBUG.
-	 * @param _logLevel
-	 *            log level
-	 */
-	public void setLogLevel(String _logLevel) {
-		this.logLevel = _logLevel;
-	}
-
-	/**
-	 * Set logger category as default logger for the Cocoon engine
-	 * 
-	 * @param _logger
-	 *            logger category
-	 */
-	public void setLogger(String _logger) {
-		this.logger = _logger;
-	}
-
-	/**
-	 * Return the name of the logger
-	 * @return The name of the logger
-	 */
-	public String getLoggerName() {
-		return this.logger;
-	}
-
-	/**
-	 * Set context directory
-	 * 
-	 * @param _contextDir
-	 *            context directory
-	 */
-	public void setContextDir(String _contextDir) {
-		this.contextDir = _contextDir;
-	}
-
-	/**
-	 * Set working directory
-	 * 
-	 * @param wDir
-	 *            working directory
-	 */
-	public void setWorkDir(String wDir) {
-		this.workDir = wDir;
-	}
-
-	/**
-	 * Set the configuration file
-	 * @param cFile The configuration file
-	 */
-	public void setConfigFile(String cFile) {
-		this.configFile = cFile;
-	}
-
-	/**
-	 * Set user agent options
-	 * @param _userAgent The user agent
-	 */
-	public void setAgentOptions(String _userAgent) {
-		this.userAgent = _userAgent;
-	}
-
-	/**
-	 * Set the accept header
-	 * @param _accept The accept header
-	 */
-	public void setAcceptOptions(String _accept) {
-		this.accept = _accept;
-	}
-
-	/**
-	 * Set the class name
-	 * @param _className The class name
-	 */
-	public void addLoadedClass(String _className) {
-		this.classList.add(_className);
-	}
-
-	/**
-	 * Add the loaded classes
-	 * @param cList The list of classes to load
-	 */
-	public void addLoadedClasses(List cList) {
-		this.classList.addAll(cList);
-	}
-
-	/**
-	 * Process single URI into given output stream.
-	 * 
-	 * @param uri
-	 *            to process
-	 * @param outputStream
-	 *            to write generated contents into
-	 * @throws Exception
-	 */
-	public void processURI(String uri, OutputStream outputStream)
-			throws Exception {
-
-		if (!this.initialized) {
-			initialize();
-		}
-		this.log.info("Processing URI: " + uri);
-
-		// Get parameters, deparameterized URI and path from URI
-		final TreeMap parameters = new TreeMap();
-		final String deparameterizedURI = NetUtils.deparameterize(uri,
-				parameters);
-		parameters.put("user-agent", this.userAgent);
-		parameters.put("accept", this.accept);
-
-		int status = getPage(deparameterizedURI, 0L, parameters, null, null,
-				outputStream);
-
-		if (status >= 400) {
-			throw new ProcessingException("Resource not found: " + status);
-		}
-	}
-
-	/**
-	 * Disposal method
-	 */
-	public void dispose() {
-		if (this.initialized) {
-			this.initialized = false;
-			ContainerUtil.dispose(this.cocoon);
-			this.cocoon = null;
-			this.logManager.dispose();
-			if (this.log.isDebugEnabled()) {
-				this.log.debug("Disposed");
-			}
-		}
-	}
-
-	/**
-	 * Samples an URI for its links.
-	 * 
-	 * @param deparameterizedURI
-	 *            a <code>String</code> value of an URI to start sampling from
-	 * @param parameters
-	 *            a <code>Map</code> value containing request parameters
-	 * @return a <code>Collection</code> of links
-	 * @exception Exception
-	 *                if an error occurs
-	 */
-	protected Collection getLinks(String deparameterizedURI, Map parameters)
-			throws Exception {
-
-		parameters.put("user-agent", this.userAgent);
-		parameters.put("accept", this.accept);
-
-		LinkSamplingEnvironment env = new LinkSamplingEnvironment(
-				deparameterizedURI, this.context, this.attributes, parameters,
-				this.cliContext, this.log);
-		processLenient(env);
-		return env.getLinks();
-	}
-
-	/**
-	 * Processes an URI for its content.
-	 * 
-	 * @param deparameterizedURI
-	 *            a <code>String</code> value of an URI to start sampling from
-	 * @param lastModified The last modified date
-	 * @param parameters
-	 *            a <code>Map</code> value containing request parameters
-	 * @param links
-	 *            a <code>Map</code> value
-	 * @param gatheredLinks
-	 * @param stream
-	 *            an <code>OutputStream</code> to write the content to
-	 * @return a <code>String</code> value for the content
-	 * @exception Exception
-	 *                if an error occurs
-	 */
-	protected int getPage(String deparameterizedURI, long lastModified,
-			Map parameters, Map links, List gatheredLinks, OutputStream stream)
-			throws Exception {
-
-		parameters.put("user-agent", this.userAgent);
-		parameters.put("accept", this.accept);
-
-		FileSavingEnvironment env = new FileSavingEnvironment(
-				deparameterizedURI, lastModified, this.context, this.attributes,
-				parameters, links, gatheredLinks, this.cliContext, stream, this.log);
-
-		// Here Cocoon can throw an exception if there are errors in processing
-		// the page
-		this.cocoon.process(env);
-
-		// if we get here, the page was created :-)
-		int status = env.getStatus();
-		if (!env.isModified()) {
-			status = -1;
-		}
-		return status;
-	}
-
-	/** Class <code>NullOutputStream</code> here. */
-	static class NullOutputStream extends OutputStream {
-		/** 
-		 * @see java.io.OutputStream#write(int)
-		 */
-		public void write(int b) throws IOException {
-		    // do nothing
-		}
-
-		/**
-		 * @see java.io.OutputStream#write(byte[])
-		 */
-		public void write(byte b[]) throws IOException {
-		    // do nothing
-		}
-
-		/**
-		 * @see java.io.OutputStream#write(byte[], int, int)
-		 */
-		public void write(byte b[], int off, int len) throws IOException {
-		    // do nothing
-		}
-	}
-
-	/**
-	 * Analyze the type of content for an URI.
-	 * @param deparameterizedURI
-	 *            a <code>String</code> value to analyze
-	 * @param parameters
-	 *            a <code>Map</code> value for the request
-	 * @return a <code>String</code> value denoting the type of content
-	 * @exception Exception
-	 *                if an error occurs
-	 */
-	protected String getType(String deparameterizedURI, Map parameters)
-			throws Exception {
-
-		parameters.put("user-agent", this.userAgent);
-		parameters.put("accept", this.accept);
-
-		FileSavingEnvironment env = new FileSavingEnvironment(
-				deparameterizedURI, this.context, this.attributes, parameters, this.empty,
-				null, this.cliContext, new NullOutputStream(), this.log);
-		processLenient(env);
-		return env.getContentType();
-	}
-
-	/**
-	 * Try to process something but don't throw a ProcessingException.
-	 * @param env
-	 *            the <code>Environment</code> to process
-	 * @return boolean true if no error were cast, false otherwise
-	 * @exception Exception
-	 *                if an error occurs, except RNFE
-	 */
-	private boolean processLenient(Environment env) throws Exception {
-		try {
-			this.cocoon.process(env);
-		} catch (ProcessingException pe) {
-			return false;
-		}
-		return true;
-	}
-
-	/**
-	 * This builds the important ClassPath used by this class. It does so in a
-	 * neutral way. It iterates in alphabetical order through every file in the
-	 * lib directory and adds it to the classpath.
-	 * Also, we add the files to the ClassLoader for the Cocoon system. In order
-	 * to protect ourselves from skitzofrantic classloaders, we need to work
-	 * with a known one.
-	 * @param _context
-	 *            The context path
-	 * @return a <code>String</code> value
-	 */
-	protected String getClassPath(final String _context) {
-		StringBuffer buildClassPath = new StringBuffer();
-
-		String classDir = _context + "/WEB-INF/classes";
-		buildClassPath.append(classDir);
-
-		File root = new File(_context + "/WEB-INF/lib");
-		if (root.isDirectory()) {
-			File[] libraries = root.listFiles();
-			Arrays.sort(libraries);
-			for (int i = 0; i < libraries.length; i++) {
-				if (libraries[i].getAbsolutePath().endsWith(".jar")) {
-					buildClassPath.append(File.pathSeparatorChar).append(
-							IOUtils.getFullFilename(libraries[i]));
-				}
-			}
-		}
-
-		buildClassPath.append(File.pathSeparatorChar).append(
-				SystemUtils.JAVA_CLASS_PATH);
-
-		// Extra class path is necessary for non-classloader-aware java
-		// compilers to compile XSPs
-		// buildClassPath.append(File.pathSeparatorChar)
-		// .append(getExtraClassPath(context));
-
-		if (this.log.isDebugEnabled()) {
-			this.log.debug("Context classpath: " + buildClassPath);
-		}
-		return buildClassPath.toString();
-	}
-
-	/**
-	 * Allow subclasses to recursively precompile XSPs.
-	 */
-	protected void precompile() {
-		recursivelyPrecompile(this.context, this.context);
-	}
-
-	/**
-	 * Recurse the directory hierarchy and process the XSP's.
-	 * @param _contextDir
-	 *            a <code>File</code> value for the context directory
-	 * @param file
-	 *            a <code>File</code> value for a single XSP file or a
-	 *            directory to scan recursively
-	 */
-	private void recursivelyPrecompile(File _contextDir, File file) {
-		if (file.isDirectory()) {
-			String entries[] = file.list();
-			for (int i = 0; i < entries.length; i++) {
-				recursivelyPrecompile(_contextDir, new File(file, entries[i]));
-			}
-		} else if (file.getName().toLowerCase(Locale.ENGLISH).endsWith(".xmap")) {
-			try {
-				// necessary?
-				this.processXMAP(IOUtils.getContextFilePath(_contextDir
-						.getCanonicalPath(), file.getCanonicalPath()));
-			} catch (Exception e) {
-				System.err.println(e.toString());
-			}
-		} else if (file.getName().toLowerCase(Locale.ENGLISH).endsWith(".xsp")) {
-			try {
-				this.processXSP(IOUtils.getContextFilePath(_contextDir
-						.getCanonicalPath(), file.getCanonicalPath()));
-			} catch (Exception e) {
-				System.err.println(e.toString());
-			}
-		}
-	}
-
-	/**
-	 * Process a single XSP file
-	 * @param uri
-	 *            a <code>String</code> pointing to an xsp URI
-	 * @exception Exception
-	 *                if an error occurs
-	 */
-	protected void processXSP(String uri) throws Exception {
-
-		String markupLanguage = "xsp";
-		String programmingLanguage = "java";
-		Environment env = new LinkSamplingEnvironment("/", this.context, this.attributes,
-				null, this.cliContext, this.log);
-		precompile(uri, env, markupLanguage, programmingLanguage);
-	
-	}
-
-	/**
-	 * Process a single XMAP file
-	 * @param uri
-	 *            a <code>String</code> pointing to an xmap URI
-	 * @exception Exception
-	 *                if an error occurs
-	 */
-	protected void processXMAP(String uri) throws Exception {
-
-		String markupLanguage = "sitemap";
-		String programmingLanguage = "java";
-		Environment env = new LinkSamplingEnvironment("/", this.context, this.attributes,
-				null, this.cliContext, this.log);
-		precompile(uri, env, markupLanguage, programmingLanguage);
-	}
-
-	/**
-	 * Process the given <code>Environment</code> to generate Java code for
-	 * specified XSP files.
-	 * @param fileName
-	 *            a <code>String</code> value
-	 * @param environment
-	 *            an <code>Environment</code> value
-	 * @param markupLanguage The markup language
-	 * @param programmingLanguage The programming language
-	 * @exception Exception
-	 *                if an error occurs
-	 */
-	public void precompile(String fileName, Environment environment,
-			String markupLanguage, String programmingLanguage) throws Exception {
-
-		ProgramGenerator programGenerator = null;
-		Source source = null;
-		Object key = CocoonComponentManager.startProcessing(environment);
-		CocoonComponentManager.enterEnvironment(environment,
-				getComponentManager(), this.cocoon);
-		try {
-			if (this.log.isDebugEnabled()) {
-				this.log.debug("XSP generation begin:" + fileName);
-			}
-
-			programGenerator = (ProgramGenerator) getComponentManager().lookup(
-					ProgramGenerator.ROLE);
-			source = this.sourceResolver.resolveURI(fileName);
-			CompiledComponent xsp = programGenerator.load(
-					getComponentManager(), source, markupLanguage,
-					programmingLanguage, environment);
-			System.out.println("[XSP generated] " + xsp);
-			if (this.log.isDebugEnabled()) {
-				this.log.debug("XSP generation complete:" + xsp);
-
-			}
-		} finally {
-			this.sourceResolver.release(source);
-			getComponentManager().release(programGenerator);
-
-			CocoonComponentManager.leaveEnvironment();
-			CocoonComponentManager.endProcessing(environment, key);
-		}
-	}
-
-	/**
-	 * To invoke the wrapper from the command line
-	 * @param args
-	 * @throws Exception
-	 */
-	public static void main(String[] args) throws Exception {
-
-		XSPPrecompileWrapper.setOptions();
-		CommandLine line = new PosixParser().parse(options, args);
-		XSPPrecompileWrapper wrapper = new XSPPrecompileWrapper();
-		if (line.hasOption(HELP_OPT)) {
-			printUsage();
-		}
-
-		if (line.hasOption(WORK_DIR_OPT)) {
-			String workDir = line.getOptionValue(WORK_DIR_OPT);
-			if (workDir.equals("")) {
-				System.exit(1);
-			} else {
-				wrapper.setWorkDir(line.getOptionValue(WORK_DIR_OPT));
-			}
-		}
-
-		if (line.hasOption(CONTEXT_DIR_OPT)) {
-			String contextDir = line.getOptionValue(CONTEXT_DIR_OPT);
-			if (contextDir.equals("")) {
-
-				System.exit(1);
-			} else {
-				wrapper.setContextDir(contextDir);
-			}
-		}
-		if (line.hasOption(LOG_KIT_OPT)) {
-			wrapper.setLogKit(line.getOptionValue(LOG_KIT_OPT));
-		}
-
-		if (line.hasOption(CONFIG_FILE_OPT)) {
-			wrapper.setConfigFile(line.getOptionValue(CONFIG_FILE_OPT));
-		}
-		wrapper.initialize();
-		wrapper.precompile();
-		wrapper.dispose();
-		System.exit(0);
-	}
-
-	private static void setOptions() {
-		options = new Options();
-
-		options.addOption(new Option(LOG_KIT_OPT, LOG_KIT_LONG, true,
-				"use given file for LogKit Management configuration"));
-
-		options.addOption(new Option(CONTEXT_DIR_OPT, CONTEXT_DIR_LONG, true,
-				"use given dir as context"));
-		options.addOption(new Option(WORK_DIR_OPT, WORK_DIR_LONG, true,
-				"use given dir as working directory"));
-
-		options.addOption(new Option(HELP_OPT, HELP_LONG, false,
-				"print this message and exit"));
-
-		options.addOption(new Option(CONFIG_FILE_OPT, CONFIG_FILE_LONG, true,
-				"specify alternate location of the configuration"
-						+ " file (default is ${contextDir}/cocoon.xconf)"));
-
-	}
-
-	/**
-	 * Print the usage message and exit
-	 */
-	private static void printUsage() {
-		HelpFormatter formatter = new HelpFormatter();
-
-		formatter.printHelp(
-				"java org.apache.cocoon.bean.XSPPrecompileWrapper [options] ",
-
-				options);
-	}
-
-}
diff --git a/src/test/org/apache/cocoon/components/sax/XMLByteStreamCompilerInterpreterTestCase.java b/src/test/org/apache/cocoon/components/sax/XMLByteStreamCompilerInterpreterTestCase.java
deleted file mode 100644
index f03bae1..0000000
--- a/src/test/org/apache/cocoon/components/sax/XMLByteStreamCompilerInterpreterTestCase.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation.
- * 
- * Licensed 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.
- */
-package org.apache.cocoon.components.sax;
-
-import org.xml.sax.helpers.DefaultHandler;
-import org.xml.sax.ContentHandler;
-import org.apache.cocoon.xml.dom.DOMBuilder;
-import org.apache.cocoon.xml.AbstractXMLTestCase;
-import org.apache.cocoon.xml.DefaultHandlerWrapper;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-import java.io.ByteArrayInputStream;
-
-/**
- * Testcase for XMLByteStreamCompiler and Interpreter
- *
- * @author <a href="mailto:tcurdt@apache.org">Torsten Curdt</a>
- * @version
- */
-
-public final class XMLByteStreamCompilerInterpreterTestCase extends AbstractXMLTestCase {
-    public XMLByteStreamCompilerInterpreterTestCase(String s) {
-        super(s);
-    }
-
-    public void testCompareDOM() throws Exception {
-        // reference
-        DOMBuilder in = new DOMBuilder();
-        generateLargeSAX(in);
-
-        // capture events
-        XMLByteStreamCompiler xmlc = new XMLByteStreamCompiler();
-        generateLargeSAX(xmlc);
-
-        // recall events and build a DOM from it
-        XMLByteStreamInterpreter xmli = new XMLByteStreamInterpreter();
-        DOMBuilder out = new DOMBuilder();
-        xmli.setConsumer(out);
-        xmli.deserialize(xmlc.getSAXFragment());
-
-        // compare DOMs
-        assertXMLEqual(in.getDocument(), out.getDocument());
-    }
-
-    public void testCompareByteArray() throws Exception {
-        // capture events
-        XMLByteStreamCompiler sa = new XMLByteStreamCompiler();
-        generateLargeSAX(sa);
-
-        // serialize events
-        byte[] aa = (byte[]) sa.getSAXFragment();
-
-        // deserialize and capture
-        XMLByteStreamCompiler sb = new XMLByteStreamCompiler();
-        XMLByteStreamInterpreter xmli = new XMLByteStreamInterpreter();
-        xmli.setConsumer(sb);
-        xmli.deserialize(aa);
-
-        // serialize again
-        byte[] ab = (byte[]) sb.getSAXFragment();
-
-        assertTrue(aa.length == ab.length);
-
-        for (int i=0;i<aa.length;i++) {
-            assertEquals(aa[i],ab[i]);
-        }
-    }
-
-    public void testStressLoop() throws Exception {
-        XMLByteStreamCompiler xmlc = new XMLByteStreamCompiler();
-
-        long loop = 10000;
-
-        // simply consume documents
-        long start = System.currentTimeMillis();
-        for(int i=0;i<loop;i++) {
-            generateSmallSAX(xmlc);
-            xmlc.recycle();
-        }
-        long stop = System.currentTimeMillis();
-
-        double r = 1000*loop/(stop-start);
-        System.out.println("consuming: "+ r + " documents per second");
-    }
-
-    public void testCompareToParsing() throws Exception {
-        DOMBuilder in = new DOMBuilder();
-        generateSmallSAX(in);
-
-        SAXParserFactory pfactory = SAXParserFactory.newInstance();
-        SAXParser p = pfactory.newSAXParser();
-
-        XMLByteStreamCompiler xmlc = new XMLByteStreamCompiler();
-        DefaultHandlerWrapper wrapper = new DefaultHandlerWrapper(xmlc);
-
-        ByteArrayInputStream bis = new ByteArrayInputStream(generateByteArray());
-
-        long loop = 10000;
-
-        // parse documents
-        long start = System.currentTimeMillis();
-        for(int i=0;i<loop;i++) {
-            xmlc.recycle();
-            bis.reset();
-            p.parse(bis,wrapper);
-        }
-        long stop = System.currentTimeMillis();
-
-        double r = 1000*loop/(stop-start);
-        System.out.println("parsed: " + r + " documents per second");
-
-
-        XMLByteStreamInterpreter xmli = new XMLByteStreamInterpreter();
-        ContentHandler ch = new DefaultHandler();
-
-        // recall documents
-        start = System.currentTimeMillis();
-        for(int i=0;i<loop;i++) {
-            xmli.setContentHandler(ch);
-            xmli.deserialize(xmlc.getSAXFragment());
-        }
-        stop = System.currentTimeMillis();
-
-        r = 1000*loop/(stop-start);
-        System.out.println("recalling: " + r + " documents per second");
-    }
-}
diff --git a/src/test/org/apache/cocoon/components/source/SourceResolverAdapter.java b/src/test/org/apache/cocoon/components/source/SourceResolverAdapter.java
deleted file mode 100644
index cbe9691..0000000
--- a/src/test/org/apache/cocoon/components/source/SourceResolverAdapter.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation.
- * 
- * Licensed 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.
- */
-
-package org.apache.cocoon.components.source;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.util.Map;
-
-import org.apache.cocoon.ProcessingException;
-import org.apache.cocoon.environment.Source;
-import org.apache.cocoon.environment.SourceResolver;
-import org.xml.sax.SAXException;
-
-/**
- * An adapter for the Excalibur SourceResolver.
- *
- * @version CVS $Id$
- */
-public class SourceResolverAdapter implements SourceResolver
-{
-    private org.apache.excalibur.source.SourceResolver resolver;
-
-    public SourceResolverAdapter(org.apache.excalibur.source.SourceResolver resolver) {
-        this.resolver = resolver;
-    }
-
-    /**
-     * Get a <code>Source</code> object.
-     * This is a shortcut for <code>resolve(location, null, null)</code>
-     * @throws org.apache.excalibur.source.SourceException if the source cannot be resolved
-     */
-    public org.apache.excalibur.source.Source resolveURI( String location )
-        throws MalformedURLException, IOException, org.apache.excalibur.source.SourceException {
-  
-        return this.resolver.resolveURI(location);
-    }
-
-    /**
-     * Get a <code>Source</code> object.
-     * @param location - the URI to resolve. If this is relative it is either
-     *                   resolved relative to the base parameter (if not null)
-     *                   or relative to a base setting of the source resolver
-     *                   itself.
-     * @param base - a base URI for resolving relative locations. This
-     *               is optional and can be <code>null</code>.
-     * @param parameters - Additional parameters for the URI. The parameters
-     *                     are specific to the used protocol.
-     * @throws org.apache.excalibur.source.SourceException if the source cannot be resolved
-     */
-    public org.apache.excalibur.source.Source resolveURI( String location,
-                                                          String base,
-                                                          Map parameters )
-        throws MalformedURLException, IOException, org.apache.excalibur.source.SourceException {
-
-        return this.resolver.resolveURI(location, base, parameters);
-    }
-
-    /**
-     * Releases a resolved resource
-     */
-    public void release( org.apache.excalibur.source.Source source ) {
-        this.resolver.release(source);
-    }
-
-    /**
-     * Resolve the source.
-     * @param systemID This is either a system identifier
-     * (<code>java.net.URL</code> or a local file.
-     * @deprecated Use the resolveURI methods instead
-     */
-    public Source resolve(String systemID)
-        throws ProcessingException, SAXException, IOException {
-
-        throw new RuntimeException("Method SourceResolver.resolve(String) is deprecated");
-    }
-}
diff --git a/src/test/org/apache/cocoon/components/treeprocessor/variables/PreparedVariableResolverTestCase.java b/src/test/org/apache/cocoon/components/treeprocessor/variables/PreparedVariableResolverTestCase.java
deleted file mode 100644
index a17e0f6..0000000
--- a/src/test/org/apache/cocoon/components/treeprocessor/variables/PreparedVariableResolverTestCase.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation.
- * 
- * Licensed 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.
- */
-
-package org.apache.cocoon.components.treeprocessor.variables;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.cocoon.SitemapComponentTestCase;
-import org.apache.cocoon.components.treeprocessor.InvokeContext;
-import org.apache.cocoon.environment.mock.MockRequest;
-import org.apache.cocoon.sitemap.PatternException;
-
-/**
- * Test case for the nested variant of the PreparedVariableResolver
- *
- * @author <a href="mailto:uv@upaya.co.uk">Upayavira</a>
- * @version CVS $Id$
- */
-public class PreparedVariableResolverTestCase extends SitemapComponentTestCase {
-
-    public void testNestedExpressions() throws Exception {
-        String expr = "{request-param:{request-param:foo}}";
-        MockRequest request = getRequest();
-        request.reset();
-        request.addParameter("foo", "bar");
-        request.addParameter("bar", "123");
-        InvokeContext context = new InvokeContext(true);
-        context.enableLogging(getLogger());
-        
-        Map sitemapElements = new HashMap();
-        context.pushMap("sitemap", sitemapElements);
-        PreparedVariableResolver resolver = new PreparedVariableResolver(expr, getManager());
-        assertEquals("123", resolver.resolve(context, getObjectModel()));
-    }
-
-    public void testNestedModuleAndSitemapExpressions() throws Exception {
-        String expr = "{request-param:f{1}}";
-        MockRequest request = getRequest();
-        request.reset();
-        request.addParameter("foo", "123");
-        InvokeContext context = new InvokeContext(true);
-        context.enableLogging(getLogger());
-        
-        Map sitemapElements = new HashMap();
-        sitemapElements.put("1", "oo");
-        context.pushMap("sitemap", sitemapElements);
-        PreparedVariableResolver resolver = new PreparedVariableResolver(expr, getManager());
-        assertEquals("123", resolver.resolve(context, getObjectModel()));
-    }
-    
-    public void testAnchors() throws PatternException {
-        String expr = "{#label:name}";
-        
-        InvokeContext context = new InvokeContext(true);
-        context.enableLogging(getLogger());
-        
-        Map sitemapElements = new HashMap();
-        sitemapElements.put("name", "123");
-        context.pushMap("label", sitemapElements);
-        PreparedVariableResolver resolver = new PreparedVariableResolver(expr, getManager());
-        assertEquals("123", resolver.resolve(context, getObjectModel()));        
-    }
-    
-    public void testSitemapVariables() throws PatternException {
-        String expr = "123{1}";
-        
-        InvokeContext context = new InvokeContext(true);
-        context.enableLogging(getLogger());
-
-        Map sitemapElements = new HashMap();
-        sitemapElements.put("1", "abc");
-        context.pushMap("label", sitemapElements);
-        PreparedVariableResolver resolver = new PreparedVariableResolver(expr, getManager());
-        assertEquals("123abc", resolver.resolve(context, getObjectModel()));
-    }
-
-    public void testSitemapVariablesWithText() throws PatternException {
-        String expr = "123{1}/def";
-    
-        InvokeContext context = new InvokeContext(true);
-        context.enableLogging(getLogger());
-
-        Map sitemapElements = new HashMap();
-        sitemapElements.put("1", "abc");
-        context.pushMap("label", sitemapElements);
-        PreparedVariableResolver resolver = new PreparedVariableResolver(expr, getManager());
-        assertEquals("123abc/def", resolver.resolve(context, getObjectModel()));
-    }
-    
-    public void testPrefixedSitemapVariable() throws PatternException {
-        String expr = "123{sitemap:1}/def";
-    
-        InvokeContext context = new InvokeContext(true);
-        context.enableLogging(getLogger());
-
-        Map sitemapElements = new HashMap();
-        sitemapElements.put("1", "abc");
-        context.pushMap("label", sitemapElements);
-        PreparedVariableResolver resolver = new PreparedVariableResolver(expr, getManager());
-        assertEquals("123abc/def", resolver.resolve(context, getObjectModel()));
-    }
-
-    public void testMultilevelSitemapVariables() throws PatternException {
-        String expr = "from {../1} to {1}";
-        
-        InvokeContext context = new InvokeContext(true);
-        context.enableLogging(getLogger());
-
-        Map sitemapElements;
-        sitemapElements = new HashMap();
-        sitemapElements.put("1", "juliet");
-        context.pushMap("label1", sitemapElements);
-        
-        sitemapElements = new HashMap();
-        sitemapElements.put("1", "oscar");
-        context.pushMap("label2", sitemapElements);
-
-        PreparedVariableResolver resolver = new PreparedVariableResolver(expr, getManager());
-        assertEquals("from juliet to oscar", resolver.resolve(context, getObjectModel()));
-    }
-
-    public void testRootSitemapVariables() throws PatternException {
-        String expr = "from {/1} to {1}";
-        
-        InvokeContext context = new InvokeContext(true);
-        context.enableLogging(getLogger());
-
-        Map sitemapElements;
-        sitemapElements = new HashMap();
-        sitemapElements.put("1", "juliet");
-        context.pushMap("label1", sitemapElements);
-        
-        sitemapElements = new HashMap();
-        sitemapElements.put("1", "oscar");
-        context.pushMap("label2", sitemapElements);
-
-        PreparedVariableResolver resolver = new PreparedVariableResolver(expr, getManager());
-        assertEquals("from juliet to oscar", resolver.resolve(context, getObjectModel()));
-    }
-    
-    public void testColonInTextContent() throws PatternException {
-        String expr = "http://cocoon.apache.org";
-        
-        InvokeContext context = new InvokeContext(true);
-        context.enableLogging(getLogger());
-
-        Map sitemapElements;
-        sitemapElements = new HashMap();
-        context.pushMap("label", sitemapElements);
-        
-        PreparedVariableResolver resolver = new PreparedVariableResolver(expr, getManager());
-        assertEquals("http://cocoon.apache.org", resolver.resolve(context, getObjectModel()));
-    }
-    
-    public void testColonBeginningTextContent() throws PatternException {
-        String expr = ":colon-starts-this";
-        
-        InvokeContext context = new InvokeContext(true);
-        context.enableLogging(getLogger());
-
-        Map sitemapElements;
-        sitemapElements = new HashMap();
-        context.pushMap("label", sitemapElements);
-        
-        PreparedVariableResolver resolver = new PreparedVariableResolver(expr, getManager());
-        assertEquals(":colon-starts-this", resolver.resolve(context, getObjectModel()));
-    }
-    
-    public void testEmbeddedColon() throws PatternException {
-        String expr = "{1}:{1}";
-        
-        InvokeContext context = new InvokeContext(true);
-        context.enableLogging(getLogger());
-
-        Map sitemapElements;
-        sitemapElements = new HashMap();
-        sitemapElements.put("1", "abc");
-        context.pushMap("label", sitemapElements);
-        
-        PreparedVariableResolver resolver = new PreparedVariableResolver(expr, getManager());
-        assertEquals("abc:abc", resolver.resolve(context, getObjectModel()));
-    }
-
-    public void testEscapedBraces() throws PatternException {
-        String expr = "This is a \\{brace\\}";
-        
-        InvokeContext context = new InvokeContext(true);
-        context.enableLogging(getLogger());
-
-        Map sitemapElements;
-        sitemapElements = new HashMap();
-        context.pushMap("label", sitemapElements);
-
-        PreparedVariableResolver resolver = new PreparedVariableResolver(expr, getManager());
-        assertEquals("This is a {brace}", resolver.resolve(context, getObjectModel()));
-    }
-
-    public void testModuleWithoutOption() throws PatternException {
-        String expr = "{baselink:}";
-        InvokeContext context = new InvokeContext(true);
-        context.enableLogging(getLogger());
-        
-        Map sitemapElements = new HashMap();
-        context.pushMap("sitemap", sitemapElements);
-        PreparedVariableResolver resolver = new PreparedVariableResolver(expr, getManager());
-        assertEquals("", resolver.resolve(context, getObjectModel()));
-    }
-}
diff --git a/src/test/org/apache/cocoon/components/treeprocessor/variables/PreparedVariableResolverTestCase.xtest b/src/test/org/apache/cocoon/components/treeprocessor/variables/PreparedVariableResolverTestCase.xtest
deleted file mode 100644
index 960d2f3..0000000
--- a/src/test/org/apache/cocoon/components/treeprocessor/variables/PreparedVariableResolverTestCase.xtest
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" ?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-<testcase>
- <roles>
-  <role name="org.apache.cocoon.components.modules.input.InputModuleSelector"
-        shorthand="input-modules"
-        default-class="org.apache.cocoon.components.ExtendedComponentSelector"/>
- </roles>
-
- <components>
-     <input-modules>
-       <component-instance class="org.apache.cocoon.components.modules.input.RequestParameterModule" logger="core.modules.input" name="request-param"/>
-       <component-instance class="org.apache.cocoon.components.modules.input.BaseLinkModule" logger="core.modules.input" name="baselink"/>
-   </input-modules>
-
- </components>
-
-</testcase>
diff --git a/src/test/org/apache/cocoon/core/container/ContainerTestCase.java b/src/test/org/apache/cocoon/core/container/ContainerTestCase.java
deleted file mode 100644
index c81337e..0000000
--- a/src/test/org/apache/cocoon/core/container/ContainerTestCase.java
+++ /dev/null
@@ -1,299 +0,0 @@
-/*
- * Copyright 2002-2004 The Apache Software Foundation
- * Licensed  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.
- */
-package org.apache.cocoon.core.container;
-
-import java.io.InputStream;
-import java.net.URL;
-
-import junit.framework.TestCase;
-
-import org.apache.avalon.excalibur.component.DefaultRoleManager;
-import org.apache.avalon.excalibur.component.ExcaliburComponentManager;
-import org.apache.avalon.excalibur.logger.LoggerManager;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
-import org.apache.avalon.framework.container.ContainerUtil;
-import org.apache.avalon.framework.context.Context;
-import org.apache.avalon.framework.context.DefaultContext;
-import org.apache.avalon.framework.logger.ConsoleLogger;
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.WrapperServiceManager;
-
-/**
- * JUnit TestCase for Cocoon Components.
- * <p>
- *   This class extends the JUnit TestCase class to setup an environment which
- *   makes it possible to easily test Cocoon Components. The following methods
- *   and instance variables are exposed for convenience testing:
- * </p>
- * <dl>
- *   <dt>getManager()</dt>
- *   <dd>
- *     This instance variable contains an initialized service manager which
- *     can be used to lookup components configured in the test configuration
- *     file. (see below)
- *   </dd>
- *   <dt>getLogger()</dt>
- *   <dd>
- *     This method returns a logger for this test case. By default this
- *     logger logs with log level DEBUG.
- *   </dd>
- * </dl>
- * <p>
- *   The following test case configuration can be used as a basis for new tests.
- *   Detailed explanations of the configuration elements can be found after
- *   the example.
- * </p>
- * <pre>
- *   &lt;testcase&gt;
- *     &lt;context&gt;
- *       &lt;entry name="foo" value="bar"/&gt;
- *       &lt;entry name="baz" class="my.context.Class"/&gt;
- *     &lt;/context&gt;
- *
- *     &lt;roles&gt;
- *       &lt;role name="org.apache.avalon.excalibur.datasource.DataSourceComponentSelector"
- *             shorthand="datasources"
- *             default-class="org.apache.avalon.excalibur.component.ExcaliburComponentSelector"&gt;
- *          &lt;hint shorthand="jdbc" class="org.apache.avalon.excalibur.datasource.JdbcDataSource"/&gt;
- *       &lt;/role&gt;
- *     &lt;/roles&gt;
- *
- *     &lt;components&gt;
- *       &lt;datasources&gt;
- *         &lt;jdbc name="personell"&gt;
- *           &lt;pool-controller min="5" max="10"/&gt;
- *           &lt;jdbc name="personnel"/&gt;
- *           &lt;dburl&gt;jdbc:odbc:test&lt;/dburl&gt;
- *           &lt;user&gt;test&lt;/user&gt;
- *           &lt;password&gt;test&lt;/password&gt;
- *           &lt;driver&gt;sun.jdbc.odbc.JdbcOdbcDriver&lt;/driver&gt;
- *         &lt;/jdbc&gt;
- *       &lt;/datasources&gt;
- *     &lt;/components&gt;
- *   &lt;/testcase&gt;
- * </pre>
- * <p>
- * Element Explanation:
- * <dl>
- * <dt>testcase</dt>
- * <dd>Defines a test case configuration.  Must contain one each of the
- *  following elements: <code>annotation</code>,
- *  <code>context</code>, <code>roles</code>, and <code>components</code>
- *  </dd>.
- *
- * <dt>context</dt>
- * <dd>Allows context properties to be set in the context passed to any
- *  Contextualizable components.</dd>
- *
- * <dt>roles</dt>
- * <dd>Roles configuration for the components configured in the
- *  <code>components</code> element.
- * </dd>
- *
- * <dt>components</dt>
- * <dd>Used to configure any Components used by the test cases.
- * </dd>
- *
- * </dl>
- *
- * @version $Id$
- */
-public class ContainerTestCase extends TestCase {
-
-    /** The default logger */
-    private Logger logger;
-
-    /** The service manager to use */
-    private ServiceManager manager;
-
-    /** Return the logger */
-    protected Logger getLogger() {
-        return logger;
-    }
-
-    /** Return the service manager */
-    protected ServiceManager getManager() {
-        return this.manager;
-    }
-
-    /* (non-Javadoc)
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        String level = System.getProperty("junit.test.loglevel", "" + ConsoleLogger.LEVEL_DEBUG);
-        this.logger = new ConsoleLogger(Integer.parseInt(level));
-
-        prepare();
-    }
-
-    /**
-     * Initializes the ComponentLocator
-     *
-     * The configuration file is determined by the class name plus .xtest appended,
-     * all '.' replaced by '/' and loaded as a resource via classpath
-     */
-    protected void prepare()
-    throws Exception {
-        final String resourceName = getClass().getName().replace( '.', '/' ) + ".xtest";
-        URL resource = getClass().getClassLoader().getResource( resourceName );
-
-        if (resource != null) {
-            getLogger().debug("Loading resource " + resourceName);
-            prepare(resource.openStream());
-        } else {
-            getLogger().debug("Resource not found " + resourceName);
-        }
-    }
-
-    /**
-     * Initializes the ComponentLocator
-     *
-     * @param testconf The configuration file is passed as a <code>InputStream</code>
-     *
-     * A common way to supply a InputStream is to overwrite the initialize() method
-     * in the sub class, do there whatever is needed to get the right InputStream object
-     * supplying a conformant xtest configuartion and pass it to this initialize method.
-     * the mentioned initialize method is also the place to set a different logging priority
-     * to the member variable m_logPriority.
-     */
-    protected final void prepare(final InputStream testconf)
-    throws Exception {
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("ContainerTestCase.initialize");
-        }
-
-        final DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
-        final Configuration conf = builder.build(testconf);
-
-        Context context = this.setupContext(conf.getChild("context"));
-
-        setupManagers(conf.getChild("components"),
-                      conf.getChild("roles"),
-                      context);
-    }
-
-    /* (non-Javadoc)
-     * @see junit.framework.TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        done();
-        super.tearDown();
-    }
-
-    /**
-     * Disposes the <code>ComponentLocator</code>
-     */
-    final private void done() {
-        if (manager != null) {
-            ContainerUtil.dispose(manager);
-            manager = null;
-        }
-    }
-
-    /**
-     * set up a context according to the xtest configuration specifications context
-     * element.
-     *
-     * A method addContext(DefaultContext context) is called here to enable subclasses
-     * to put additional objects into the context programmatically.
-     */
-    final private Context setupContext( final Configuration conf )
-    throws Exception {
-        final DefaultContext context = new DefaultContext();
-        final Configuration[] confs = conf.getChildren( "entry" );
-        for (int i = 0; i < confs.length; i++) {
-            final String key = confs[i].getAttribute("name");
-            final String value = confs[i].getAttribute("value", null);
-            if (value == null) {
-                String clazz = confs[i].getAttribute("class");
-                Object obj = getClass().getClassLoader().loadClass(clazz).newInstance();
-                context.put(key, obj);
-                if (getLogger().isInfoEnabled()) {
-                    getLogger().info("ContainerTestCase: added an instance of class " + clazz + " to context entry " + key);
-                }
-            } else {
-                context.put(key, value);
-                if (getLogger().isInfoEnabled()) {
-                    getLogger().info("ContainerTestCase: added value \"" + value + "\" to context entry " + key);
-                }
-            }
-        }
-        addContext(context);
-        return context ;
-    }
-
-    /**
-     * This method may be overwritten by subclasses to put additional objects
-     * into the context programmatically.
-     */
-    protected void addContext(DefaultContext context) {
-    }
-
-    final private void setupManagers(final Configuration confCM,
-                                     final Configuration confRM,
-                                     final Context context)
-    throws Exception {
-        // Setup the RoleManager
-        DefaultRoleManager roleManager = new DefaultRoleManager();
-        roleManager.enableLogging(getLogger());
-        roleManager.configure(confRM);
-
-        // Set up the ComponentLocator
-        ExcaliburComponentManager ecManager = new ExcaliburComponentManager();
-        ecManager.enableLogging(getLogger());
-        ecManager.contextualize(context);
-        ecManager.setRoleManager(roleManager);
-        ecManager.setLoggerManager(new DefaultLoggerManager(getLogger()));
-        ecManager.configure(confCM);
-        ecManager.initialize();
-        this.manager = new WrapperServiceManager(ecManager);
-    }
-
-    protected final Object lookup(final String key)
-    throws ServiceException {
-        return manager.lookup(key);
-    }
-
-    protected final void release(final Object object) {
-        manager.release(object);
-    }
-
-    protected static class DefaultLoggerManager implements LoggerManager {
-        private Logger logger;
-
-        public DefaultLoggerManager(Logger logger) {
-            this.logger = logger;
-        }
-        /* (non-Javadoc)
-         * @see org.apache.avalon.excalibur.logger.LoggerManager#getDefaultLogger()
-         */
-        public Logger getDefaultLogger() {
-            return this.logger;
-        }
-        /* (non-Javadoc)
-         * @see org.apache.avalon.excalibur.logger.LoggerManager#getLoggerForCategory(java.lang.String)
-         */
-        public Logger getLoggerForCategory(String arg0) {
-            return this.logger;
-        }
-    }
-}
diff --git a/src/test/org/apache/cocoon/environment/commandline/test/CommandLineContextTestCase.java b/src/test/org/apache/cocoon/environment/commandline/test/CommandLineContextTestCase.java
deleted file mode 100644
index 832a5d6..0000000
--- a/src/test/org/apache/cocoon/environment/commandline/test/CommandLineContextTestCase.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation.
- *
- * Licensed 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.
- */
-package org.apache.cocoon.environment.commandline.test;
-
-import org.apache.avalon.framework.logger.ConsoleLogger;
-import org.apache.avalon.framework.logger.Logger;
-
-import org.apache.cocoon.environment.commandline.CommandLineContext;
-
-import junit.framework.TestCase;
-import junit.swingui.TestRunner;
-
-import java.io.File;
-import java.net.URL;
-
-/**
- * A simple test case for CommandLineContext.
- *
- * @author <a href="mailto:berni_huber@a1.net">Bernhard Huber</a>
- * @version CVS $Id$
- */
-public final class CommandLineContextTestCase extends TestCase {
-
-    private String commandLineContextDir;
-    private CommandLineContext commandLineContext;
-
-
-    /**
-     * Constructor for the CommandLineContextTestCase object
-     */
-    public CommandLineContextTestCase() {
-        this("CommandLineContextTestCase");
-    }
-
-    /**
-     * Constructor for the CommandLineContextTestCase object
-     */
-    public CommandLineContextTestCase(String name) {
-        super(name);
-    }
-
-    /**
-     * The main program for the CommandLineContextTestCase class
-     *
-     * @param  args           The command line arguments
-     */
-    public static void main(final String[] args) throws Exception {
-        final String[] testCaseName = {CommandLineContextTestCase.class.getName()};
-        TestRunner.main(testCaseName);
-    }
-
-
-    /**
-     * The JUnit setup method
-     */
-    public void setUp() throws Exception {
-        super.setUp();
-        commandLineContextDir = System.getProperty("java.io.tmpdir", "/tmp");
-        new File(commandLineContextDir, "foo" + File.separator + "bar").mkdirs();
-
-        String level = System.getProperty("junit.test.loglevel", "" + ConsoleLogger.LEVEL_DEBUG);
-        Logger logger = new ConsoleLogger(Integer.parseInt(level));
-
-        commandLineContext = new CommandLineContext(commandLineContextDir);
-        commandLineContext.enableLogging(logger);
-    }
-
-    /**
-     * The teardown method for JUnit
-     */
-    public void tearDown() throws Exception {
-        super.tearDown();
-        new File(commandLineContextDir, "foo" + File.separator + "bar").delete();
-        new File(commandLineContextDir, "foo").delete();
-    }
-
-    /**
-     * A unit test for <code>getResource()</code>
-     */
-    public void testGetResource() throws Exception {
-        Object[] test_values = {
-                new String[]{"", commandLineContextDir},
-                new String[]{"/", commandLineContextDir},
-                new String[]{"foo", commandLineContextDir + File.separator + "foo"},
-                new String[]{"foo/bar", commandLineContextDir + File.separator + "foo/bar"},
-                new String[]{"foo/bar/nonexistent", null}
-                };
-        for (int i = 0; i < test_values.length; i++) {
-            String tests[] = (String[]) test_values[i];
-            String test = tests[0];
-            URL result = commandLineContext.getResource(test);
-            URL expected = null;
-            if (result != null) {
-                expected = new File(tests[1]).toURL();
-            }
-            String message = "Test " + "'" + test + "'";
-            assertEquals(message, expected, result);
-        }
-    }
-
-    /**
-     * A unit test for <code>getRealPath()</code>
-     */
-    public void testGetRealPath() throws Exception {
-        Object[] test_values = {
-                new String[]{"", ""},
-                new String[]{"/", "/"},
-                new String[]{"foo", "foo"},
-                new String[]{"foo/bar", "foo/bar"}
-                };
-        for (int i = 0; i < test_values.length; i++) {
-            String tests[] = (String[]) test_values[i];
-            String test = tests[0];
-            File expected_file = new File(commandLineContextDir, tests[1]);
-            String expected = expected_file.getAbsolutePath();
-
-            String result = commandLineContext.getRealPath(test);
-            String message = "Test " +
-                    "'" + test + "'";
-            assertEquals(message, expected, result);
-        }
-    }
-
-    /**
-     * A unit test for <code>getAttribute</code>,
-     * <code>setAttribute</code>, and <code>removeAttribute()</code>
-     */
-    public void testAttributes() throws Exception {
-        Object[] test_values = {
-                new String[]{"a", "b"},
-                new String[]{"foo", "foo"},
-                new String[]{"foo/bar", "foo/bar"}
-                };
-        for (int i = 0; i < test_values.length; i++) {
-            String tests[] = (String[]) test_values[i];
-            String name = tests[0];
-            String expected = tests[1];
-
-            commandLineContext.setAttribute(name, expected);
-
-            String result = (String) commandLineContext.getAttribute(name);
-            assertEquals("Test " + "'" + "n" + "'", expected, result);
-
-            commandLineContext.removeAttribute(name);
-            result = (String) commandLineContext.getAttribute(name);
-            assertEquals("Test " + "'" + "<null>" + "'", null, result);
-        }
-    }
-}
diff --git a/src/test/org/apache/cocoon/environment/commandline/test/package.html b/src/test/org/apache/cocoon/environment/commandline/test/package.html
deleted file mode 100644
index ebb8cde..0000000
--- a/src/test/org/apache/cocoon/environment/commandline/test/package.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-<html>
-<head>
-  <title>Search</title>
-</head>
-<body>
-  <h1>Test Cases Environment Commandline</h1>
-  <p>
-    This package provides Cocoon environment commandline test cases.
-  </p>
-  <p>
-    For more information @see org.apache.cocoon.environment.commandline
-  </p>
-</body>
diff --git a/src/test/org/apache/cocoon/environment/mock/MockContext.java b/src/test/org/apache/cocoon/environment/mock/MockContext.java
deleted file mode 100644
index 07009dc..0000000
--- a/src/test/org/apache/cocoon/environment/mock/MockContext.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation.
- * 
- * Licensed 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.
- */
-package org.apache.cocoon.environment.mock;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.io.InputStream;
-
-import org.apache.cocoon.environment.Context;
-
-public class MockContext implements Context {
-
-    private Hashtable attributes = new Hashtable();
-    private Hashtable resources = new Hashtable();
-    private Hashtable mappings = new Hashtable();
-    private Hashtable initparameters = new Hashtable();
-
-    public Object getAttribute(String name) {
-        return attributes.get(name);
-    }
-
-    public void setAttribute(String name, Object value) {
-        attributes.put(name, value);
-    }
-
-    public void removeAttribute(String name) {
-        attributes.remove(name);
-    }
-
-    public Enumeration getAttributeNames() {
-        return attributes.keys();
-    }
-
-    public void setResource(String path, URL url) {
-        resources.put(path, url);
-    }
-
-    public URL getResource(String path) throws MalformedURLException {
-        return (URL)resources.get(path);
-    }
-
-    public String getRealPath(String path) {
-      return path;
-    }
-
-    public String getMimeType(String file) {
-        return (String)mappings.get(file.substring(file.lastIndexOf(".")+1)); 
-    }
-
-    public void setInitParameter(String name, String value) {
-        initparameters.put(name, value);
-    }
-
-    public String getInitParameter(String name) {
-        return (String)initparameters.get(name);
-    }
-
-    public InputStream getResourceAsStream(String path) {
-        return null;
-    }
-
-    public void reset() {
-        attributes.clear();
-        resources.clear();
-        mappings.clear();
-        initparameters.clear();
-    }
-}
diff --git a/src/test/org/apache/cocoon/environment/mock/MockCookie.java b/src/test/org/apache/cocoon/environment/mock/MockCookie.java
deleted file mode 100644
index 1a6fe5c..0000000
--- a/src/test/org/apache/cocoon/environment/mock/MockCookie.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation.
- * 
- * Licensed 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.
- */
-package org.apache.cocoon.environment.mock;
-
-import org.apache.cocoon.environment.Cookie;
-
-public class MockCookie implements Cookie {
-
-    private String comment;
-    private String domain;
-    private int maxage;
-    private String path;
-    private boolean secure;
-    private String name;
-    private String value;
-    private int version; 
-
-    public void setComment(String comment) {
-        this.comment = comment;
-    }
-
-    public String getComment() {
-        return comment;
-    }
-
-    public void setDomain(String domain) {
-        this.domain = domain;
-    }
-
-    public String getDomain() {
-        return domain;
-    }
-
-    public void setMaxAge(int maxage) {
-        this.maxage = maxage;
-    }
-
-    public int getMaxAge() {
-        return maxage;
-    }
-
-    public void setPath(String path) {
-        this.path = path;
-    }
-
-    public String getPath() {
-        return path;
-    }
-
-    public void setSecure(boolean secure) {
-        this.secure = secure;
-    }
-
-    public boolean getSecure() {
-        return secure;
-    }
-
-    public void setName(String name) {
-        this.name= name;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setValue(String value) {
-        this.value = value;
-    }
-
-    public String getValue() {
-        return value;
-    }
-
-    public int getVersion() {
-        return version;
-    }
-
-    public void setVersion(int version) {
-        this.version = version;
-    }
-}
-
diff --git a/src/test/org/apache/cocoon/environment/mock/MockEnvironment.java b/src/test/org/apache/cocoon/environment/mock/MockEnvironment.java
deleted file mode 100644
index 137399b..0000000
--- a/src/test/org/apache/cocoon/environment/mock/MockEnvironment.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation.
- * 
- * Licensed 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.
- */
-package org.apache.cocoon.environment.mock;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.net.MalformedURLException;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.Map;
-
-import junit.framework.AssertionFailedError;
-
-import org.apache.cocoon.ProcessingException;
-import org.apache.cocoon.environment.Environment;
-import org.apache.cocoon.environment.Source;
-import org.apache.excalibur.source.SourceResolver;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-
-public class MockEnvironment implements Environment {
-
-    private SourceResolver resolver;
-
-    private String uri;
-    private String uriprefix;
-    private String rootcontext;
-    private String context;
-    private String view;
-    private String action;
-    private String contenttype;
-    private int contentlength;
-    private int status;
-    private ByteArrayOutputStream outputstream;
-    private HashMap objectmodel;
-    private Hashtable attributes = new Hashtable();
-
-    public MockEnvironment(SourceResolver resolver) {
-        this.resolver = resolver;
-    }
-
-    public String getURI() {
-        return uri;
-    }
-
-    public String getURIPrefix() {
-        return uriprefix;
-    }
-
-    public String getRootContext() {
-        return rootcontext;
-    }
-
-    public String getContext() {
-        return context;
-    }
-
-    public String getView() {
-        return view;
-    }
-
-    public String getAction() {
-        return action;
-    }
-
-    public void setContext(String prefix, String uri, String context) {
-        throw new AssertionFailedError("Not implemented");
-    }
-
-    public void changeContext(String uriprefix, String context) throws Exception {
-        throw new AssertionFailedError("Not implemented");
-    }
-
-    public void redirect(boolean sessionmode, String url) throws IOException {
-        throw new AssertionFailedError("Use Redirector.redirect instead!");
-    }
-
-    public void setContentType(String contenttype) {
-        this.contenttype = contenttype;
-    }
-
-    public String getContentType() {
-        return contenttype;
-    }
-
-    public void setContentLength(int length) {
-        this.contentlength = length;
-    }
-
-    public int getContentLength() {
-        return contentlength;
-    }
-
-    public void setStatus(int statusCode) {
-        this.status = statusCode;
-    }
-
-    public int getStatus() {
-        return status;
-    }
-
-    public OutputStream getOutputStream() throws IOException {
-        outputstream = new ByteArrayOutputStream();
-        return outputstream;
-    }
-
-    public OutputStream getOutputStream(int bufferSize) throws IOException {
-        outputstream = new ByteArrayOutputStream();
-        return outputstream;
-    }
-
-    public byte[] getOutput() {
-        return outputstream.toByteArray();
-    }
-
-    public Map getObjectModel() {
-        return objectmodel;
-    }
-
-    public boolean isResponseModified(long lastModified) {
-        throw new AssertionFailedError("Not implemented");
-    }
-
-    public void setResponseIsNotModified() {
-        throw new AssertionFailedError("Not implemented");
-    }
-
-    public void setAttribute(String name, Object value) {
-        attributes.put(name, value);
-    }
-
-    public Object getAttribute(String name) {
-        return attributes.get(name);
-    }
-
-    public void removeAttribute(String name) {
-        attributes.remove(name);
-    }
-
-    public Enumeration getAttributeNames() {
-        return attributes.keys();
-    }
-
-    public boolean tryResetResponse() throws IOException {
-        throw new AssertionFailedError("Not implemented");
-    }
-
-    public void commitResponse() throws IOException {
-        throw new AssertionFailedError("Not implemented");
-    }
-    
-    public void startingProcessing() {
-        throw new AssertionFailedError("Not implemented");
-    }
-    
-    public void finishingProcessing() {
-        throw new AssertionFailedError("Not implemented");
-    }
-
-
-    public Source resolve(String systemID)
-      throws ProcessingException, SAXException, IOException {
-  
-        throw new AssertionFailedError("Not not use deprecated methods!");
-    }
-
-    public void toSAX(org.apache.excalibur.source.Source source,
-                ContentHandler handler)
-      throws SAXException, IOException, ProcessingException {
-
-        throw new AssertionFailedError("Not not use deprecated methods!");
-    }
-
-    public void toSAX(org.apache.excalibur.source.Source source,
-               String         mimeTypeHint,
-               ContentHandler handler)
-      throws SAXException, IOException, ProcessingException {
-
-        throw new AssertionFailedError("Not not use deprecated methods!");
-    }
-
-    public org.apache.excalibur.source.Source resolveURI(String location)
-        throws MalformedURLException, IOException, org.apache.excalibur.source.SourceException {
-
-        return resolver.resolveURI(location);
-    }
-
-    public org.apache.excalibur.source.Source resolveURI(String location,
-                                                         String base,
-                                                         Map parameters)
-        throws MalformedURLException, IOException, org.apache.excalibur.source.SourceException {
-
-        return resolver.resolveURI(location, base, parameters);
-    }
-
-    /**
-     * Releases a resolved resource
-     */
-    public void release(org.apache.excalibur.source.Source source) {
-        resolver.release(source);
-    }
-    
-    /**
-     * Always return <code>true</code>.
-     */
-    public boolean isExternal() {
-        return true;
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.cocoon.environment.Environment#isInternRedirect()
-     */
-    public boolean isInternalRedirect() {
-        return false;
-    }
-}
-
diff --git a/src/test/org/apache/cocoon/environment/mock/MockRedirector.java b/src/test/org/apache/cocoon/environment/mock/MockRedirector.java
deleted file mode 100644
index 9bf1b28..0000000
--- a/src/test/org/apache/cocoon/environment/mock/MockRedirector.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation.
- * 
- * Licensed 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.
- */
-package org.apache.cocoon.environment.mock;
-
-import org.apache.cocoon.ProcessingException;
-import java.io.IOException;
-
-import org.apache.cocoon.environment.Redirector;
-
-public class MockRedirector implements Redirector {
-
-    protected boolean hasRedirected = false;
-
-    private String redirect;
-
-    public void redirect(boolean sessionmode, String url) throws IOException, ProcessingException {
-        this.hasRedirected = true;
-
-        redirect = url;
-    }
-  
-    public void globalRedirect(boolean sessionmode, String url) throws IOException, ProcessingException {
-        redirect(sessionmode, url);
-    }
-
-    public String getRedirect() {
-        return redirect;
-    }
-    
-    public boolean hasRedirected() {
-        return this.hasRedirected;
-    }
-
-    public void reset() {
-        redirect = null;
-        hasRedirected = false;
-    }
-    
-    public void sendStatus(int sc) {
-        hasRedirected = true;
-    }
-}
-
diff --git a/src/test/org/apache/cocoon/environment/mock/MockRequest.java b/src/test/org/apache/cocoon/environment/mock/MockRequest.java
deleted file mode 100644
index 4eae9fb..0000000
--- a/src/test/org/apache/cocoon/environment/mock/MockRequest.java
+++ /dev/null
@@ -1,346 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation.
- * 
- * Licensed 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.
- */
-package org.apache.cocoon.environment.mock;
-
-import java.security.Principal;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.Map;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.text.ParseException;
-
-import junit.framework.AssertionFailedError;
-
-import org.apache.cocoon.environment.Cookie;
-import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.environment.Session;
-
-public class MockRequest implements Request {
-
-    private Hashtable attributes = new Hashtable();
-    private String scheme;
-    private String protocol = "HTTP/1.1";
-    private String requestURI;
-    private String contextPath = "";
-    private String servletPath;
-    private String pathInfo;
-    private String queryString;
-    private String method = "GET";
-    private String contentType;
-    private Locale locale;
-    private Principal principal;
-    private String remoteAddr;
-    private String remoteHost;
-    private String remoteUser;
-    private String userRole;
-    private String reqSessionId;
-    private String authType;
-    private String charEncoding;
-    private String serverName;
-    private int port = 80;
-
-    private Hashtable parameters = new Hashtable();
-    private Hashtable headers = new Hashtable();
-    private HashMap cookies = new HashMap();
-
-    private MockSession session;
-
-    public Object get(String name) {
-        return getAttribute(name);
-    }
-
-    public Object getAttribute(String name) {
-        return attributes.get(name);
-    }
-
-    public Enumeration getAttributeNames() {
-        return attributes.keys();
-    }
-
-    public void setAttribute(String name, Object o) {
-        if (o == null)
-            attributes.remove(name);
-        else
-            attributes.put(name, o);
-    }
-
-    public void removeAttribute(String name) {
-        attributes.remove(name);
-    }
-
-    public String getAuthType() {
-        return authType;
-    }
-
-    public String getCharacterEncoding() {
-        return charEncoding;
-    }
-
-    public void setCharacterEncoding(String enc) throws java.io.UnsupportedEncodingException {
-        charEncoding = enc;
-    }
-
-    public int getContentLength() {
-        return -1;
-    }
-
-    public String getContentType() {
-        return contentType;
-    }
-
-    public String getParameter(String name) {
-        return (String)parameters.get(name);
-    }
-
-    public Enumeration getParameterNames() {
-        return parameters.keys();
-    }
-
-    public String[] getParameterValues(String name) {
-        Object param = parameters.get(name);
-        if( null == param )
-            return null;
-        else {
-            if (param.getClass().isArray()) {
-                return (String[]) param;
-            } else {
-                return new String[] {(String) param};
-            }
-        }
-    }
-
-    public void addParameter(String name, String value) {
-        parameters.put(name, value);
-    }
-
-    public String getProtocol() {
-        return protocol;
-    }
-
-    public String getScheme() {
-        return scheme;
-    }
-
-    public String getServerName() {
-        return serverName;
-    }
-
-    public int getServerPort() {
-        return port;
-    }
-
-    public String getRemoteAddr() {
-        return remoteAddr;
-    }
-
-    public String getRemoteHost() {
-        return remoteHost;
-    }
-
-    public Locale getLocale() {
-        return locale;
-    }
-
-    public Enumeration getLocales() {
-        return Collections.enumeration(Collections.singleton(getLocale()));
-    }
-
-    public boolean isSecure() {
-        if(scheme==null){
-            return false;
-        } else{
-            return scheme.equalsIgnoreCase("HTTPS");
-        }
-    }
-
-    public Cookie[] getCookies() {
-        if (cookies.isEmpty())
-            return null;
-        else {
-            Cookie[] cookieArray = new Cookie[cookies.size()];
-            return (Cookie []) cookies.values().toArray(cookieArray);
-        }
-    }
-
-    public Map getCookieMap() {
-        return cookies;
-    }
-
-    public long getDateHeader(String name) {
-        String s1 = getHeader(name);
-        if(s1 == null)
-            return -1L;
-        try
-        {
-            DateFormat dateFormat = new SimpleDateFormat();
-            return dateFormat.parse(s1).getTime();
-        }
-        catch(ParseException exception) {
-            throw new IllegalArgumentException("Cannot parse date: " + s1);
-        }
-    }
-
-    public String getHeader(String name) {
-        return (String) headers.get(name);
-    }
-
-    public Enumeration getHeaders(String name) {
-        throw new AssertionFailedError("Not implemented");
-    }
-
-    public Enumeration getHeaderNames() {
-        return headers.keys();
-    }
-
-    public String getMethod() {
-        return method;
-    }
-
-    public String getPathInfo() {
-        return pathInfo;
-    }
-
-    public String getPathTranslated() {
-        throw new AssertionFailedError("Not implemented");
-    }
-
-    public String getContextPath() {
-        return contextPath;
-    }
-
-    public void setContextPath(String path) {
-        contextPath = path;
-    }
-
-    public String getQueryString() {
-        return queryString;
-    }
-
-    public void setQueryString(String string) {
-        queryString = string;
-    }
-
-    public String getRemoteUser() {
-        return remoteUser;
-    }
-
-    public Principal getUserPrincipal() {
-        return principal;
-    }
-
-    public boolean isUserInRole(String role) {
-        return userRole.equals(role);
-    }
-
-    public String getRequestedSessionId() {
-        return reqSessionId;
-    }
-
-    public String getRequestURI() {
-        return requestURI;
-    }
-
-    public void setRequestURI(String uri) {
-        requestURI = uri;
-    }
-
-    public String getSitemapURI() {
-        return requestURI;
-    }
-
-    public String getServletPath() {
-        return servletPath;
-    }
-
-    public Session getSession(boolean create) {
-        if ((session == null) && (create))
-            this.session = new MockSession();
-        else if ((session != null) && (!(session).isValid()) && (create))
-            this.session = new MockSession();
-        if ((session != null) && ((session).isValid()))
-            return this.session;
-        else
-            return null;
-    }
-
-    public Session getSession() {
-        return getSession(true);
-    }
-
-    public boolean isRequestedSessionIdValid() {
-        if (session != null) {
-            try {
-                session.getId();
-                return true;
-            } catch (IllegalStateException e) {
-                return false;
-            }
-        } else
-            return false;
-    }
-
-    public boolean isRequestedSessionIdFromCookie() {
-        return true;
-    }
-
-    public boolean isRequestedSessionIdFromURL() {
-        return false;
-    }
-
-    public void reset() {
-        attributes.clear();
-        scheme = null;
-        protocol = "HTTP/1.1";
-        requestURI = null;
-        contextPath = null;
-        servletPath = null;
-        pathInfo = null;
-        queryString = null;
-        method = "GET";
-        contentType = null;
-        locale = null;
-        principal = null;
-        remoteAddr = null;
-        remoteHost = null;
-        remoteUser = null;
-        userRole = null;
-        reqSessionId = null;
-        authType = null;
-        charEncoding = null;
-        serverName = null;
-        port = 80;
-
-        parameters.clear();
-        headers.clear();
-    }
-    
-    public void setHeader( String key, String value ) {
-        this.headers.put(key, value );
-    }
-    
-    public void setMethod( String method ) {
-        this.method = method;
-    }
-    
-    public void clearSession() {
-        this.session = null;
-    }
-
-}
diff --git a/src/test/org/apache/cocoon/environment/mock/MockResponse.java b/src/test/org/apache/cocoon/environment/mock/MockResponse.java
deleted file mode 100644
index 958e94e..0000000
--- a/src/test/org/apache/cocoon/environment/mock/MockResponse.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation.
- * 
- * Licensed 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.
- */
-package org.apache.cocoon.environment.mock;
-
-import java.util.Locale;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import junit.framework.AssertionFailedError;
-
-import org.apache.cocoon.environment.Cookie;
-import org.apache.cocoon.environment.Response;
-
-public class MockResponse implements Response {
-
-    private String encoding;
-    private Locale locale;
-    private HashSet cookies = new HashSet();
-    private HashMap header = new HashMap();
-
-    public void setCharacterEncoding(String encoding) {
-        this.encoding = encoding;
-    }
-
-    public String getCharacterEncoding() {
-        return encoding;
-    }
-
-    public void setLocale(Locale locale) {
-        this.locale = locale;
-    }
-
-    public Locale getLocale() {
-        return locale;
-    }
-
-    public Cookie createCookie(String name, String value) {
-        MockCookie cookie = new MockCookie();
-        cookie.setName(name);
-        cookie.setValue(value);
-        return cookie;
-    }
-
-    public void addCookie(Cookie cookie) {
-        cookies.add(cookie);
-    }
-
-    public Set getCookies() {
-        return cookies;
-    }
-
-    public boolean containsHeader(String name) {
-        return header.containsKey(name);
-    }
-
-    public String encodeURL(String url) {
-        throw new AssertionFailedError("Not implemented");
-    }
-
-    public void setDateHeader(String name, long date) {
-        header.put(name, new Long(date));
-    }
-
-    public void addDateHeader(String name, long date) {
-        header.put(name, new Long(date));
-    }
-
-    public void setHeader(String name, String value) {
-        header.put(name, value);
-    }
-
-    public void addHeader(String name, String value) {
-        header.put(name, value);
-    }
-
-    public void setIntHeader(String name, int value) {
-        header.put(name, new Integer(value));
-    }
-
-    public void addIntHeader(String name, int value) {
-        header.put(name, new Integer(value));
-    }
-
-    public Map getHeader() {
-        return header;
-    }
-
-    public void reset() {
-        encoding = null;
-        locale = null;
-        cookies.clear();
-        header.clear();
-    }
-}
diff --git a/src/test/org/apache/cocoon/environment/mock/MockSession.java b/src/test/org/apache/cocoon/environment/mock/MockSession.java
deleted file mode 100644
index 403a20f..0000000
--- a/src/test/org/apache/cocoon/environment/mock/MockSession.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation.
- * 
- * Licensed 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.
- */
-package org.apache.cocoon.environment.mock;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-
-import junit.framework.AssertionFailedError;
-
-import org.apache.cocoon.environment.Session;
-
-public class MockSession implements Session {
-
-    private long creationtime = System.currentTimeMillis();
-    private String id = "MockSession";
-    private long lastaccessedtime = System.currentTimeMillis();
-    private int maxinactiveinterval = -1;
-    private Hashtable attributes = new Hashtable();
-    private boolean valid = true;
-
-    public long getCreationTime() {
-        checkValid();
-        return creationtime;
-    }
-  
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    public String getId() {
-        checkValid();
-        return id;
-    }
-
-    public long getLastAccessedTime() {
-        checkValid();
-        return lastaccessedtime;
-    }
-
-    public void setMaxInactiveInterval(int interval) {
-        checkValid();
-        this.maxinactiveinterval = interval;
-    }
-
-    public int getMaxInactiveInterval() {
-        checkValid();
-        return maxinactiveinterval;
-    }
-
-    public Object getAttribute(String name) {
-        checkValid();
-        return attributes.get(name);
-    }
-
-    public Enumeration getAttributeNames() {
-        checkValid();
-        return attributes.keys();
-    }
-
-    public void setAttribute(String name, Object value) {
-        checkValid();
-        attributes.put(name, value);
-    }
-
-    public void removeAttribute(String name) {
-        checkValid();
-        attributes.remove(name);
-    }
-
-    public void invalidate() {
-        checkValid();
-        this.valid = false;
-    }
-
-    public boolean isNew() {
-        checkValid();
-        return false;
-    }
-
-    private void checkValid() throws IllegalStateException {
-        if (!valid)
-            throw new AssertionFailedError("session has been invalidated!");
-    }
-
-    public boolean isValid() {
-        return valid;
-    }
-}
-
diff --git a/src/test/org/apache/cocoon/xml/AbstractXMLTestCase.java b/src/test/org/apache/cocoon/xml/AbstractXMLTestCase.java
deleted file mode 100644
index d755aef..0000000
--- a/src/test/org/apache/cocoon/xml/AbstractXMLTestCase.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation.
- * 
- * Licensed 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.
- */
-package org.apache.cocoon.xml;
-
-import org.custommonkey.xmlunit.XMLTestCase;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.AttributesImpl;
-import org.apache.cocoon.xml.dom.DOMBuilder;
-
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.Source;
-import javax.xml.transform.Result;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.dom.DOMSource;
-import java.io.ByteArrayOutputStream;
-
-
-/**
- * general functions for XML related Testcases
- *
- * @author <a href="mailto:tcurdt@apache.org">Torsten Curdt</a>
- * @version
- */
-
-public abstract class AbstractXMLTestCase extends XMLTestCase {
-
-    public AbstractXMLTestCase(String s) {
-        super(s);
-    }
-
-    protected void generateLargeSAX( ContentHandler consumer ) throws SAXException {
-        AttributesImpl atts = new AttributesImpl();
-
-        final int size = 65000;
-        char[] large = new char[size];
-        for(int i=0;i<size;i++) {
-            large[i] = 'x';
-        }
-
-        consumer.startDocument();
-        consumer.startElement("", "root", "root", atts);
-        consumer.characters(large,0,size);
-        consumer.endElement("", "root", "root");
-        consumer.endDocument();
-    }
-
-    protected void generateSmallSAX( ContentHandler consumer ) throws SAXException {
-        AttributesImpl atts = new AttributesImpl();
-
-        consumer.startDocument();
-        consumer.startElement("", "root", "root", atts);
-        consumer.characters("test".toCharArray(),0,4);
-        consumer.endElement("", "root", "root");
-        consumer.endDocument();
-    }
-
-    protected byte[] generateByteArray() throws Exception {
-        DOMBuilder in = new DOMBuilder();
-        generateSmallSAX(in);
-        ByteArrayOutputStream bos = new ByteArrayOutputStream();
-        TransformerFactory tFactory = TransformerFactory.newInstance();
-        Transformer t = tFactory.newTransformer();
-        Source input = new DOMSource(in.getDocument());
-        Result output = new StreamResult(bos);
-        t.transform(input, output);
-        bos.close();
-
-        return bos.toByteArray();
-    }
-}
-
diff --git a/src/test/org/apache/cocoon/xml/DefaultHandlerWrapper.java b/src/test/org/apache/cocoon/xml/DefaultHandlerWrapper.java
deleted file mode 100644
index f397784..0000000
--- a/src/test/org/apache/cocoon/xml/DefaultHandlerWrapper.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation.
- * 
- * Licensed 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.
- */
-package org.apache.cocoon.xml;
-
-import org.xml.sax.ContentHandler;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.Attributes;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * Wrap a ContentHandler in a DefaultHandler
- *
- * @author <a href="mailto:tcurdt@apache.org">Torsten Curdt</a>
- */
-
-
-public final class DefaultHandlerWrapper extends DefaultHandler {
-    private final ContentHandler handler;
-
-    public DefaultHandlerWrapper( ContentHandler handler ) {
-        this.handler = handler;
-    }
-
-    public void setDocumentLocator(Locator locator) {
-        handler.setDocumentLocator(locator);
-    }
-
-    public void startDocument() throws SAXException {
-        handler.startDocument();
-    }
-
-    public void endDocument() throws SAXException {
-        handler.endDocument();
-    }
-
-    public void startPrefixMapping(String prefix, String uri) throws SAXException {
-        handler.startPrefixMapping(prefix,uri);
-    }
-
-    public void endPrefixMapping(String prefix) throws SAXException {
-        handler.endPrefixMapping(prefix);
-    }
-
-    public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
-        handler.startElement(namespaceURI,localName,qName,atts);
-    }
-
-    public void endElement(String namespaceURI, String localName, String qName) throws SAXException {
-        handler.endElement(namespaceURI,localName,qName);
-    }
-
-    public void characters(char ch[], int start, int length) throws SAXException {
-        handler.characters(ch,start,length);
-    }
-
-    public void ignorableWhitespace(char ch[], int start, int length) throws SAXException {
-        handler.ignorableWhitespace(ch,start, length);
-    }
-
-    public void processingInstruction(String target, String data) throws SAXException {
-        handler.processingInstruction(target,data);
-    }
-
-    public void skippedEntity(String name) throws SAXException {
-        handler.skippedEntity(name);
-    }
-
-
-}
diff --git a/src/test/org/apache/cocoon/xml/SaxBufferTestCase.java b/src/test/org/apache/cocoon/xml/SaxBufferTestCase.java
deleted file mode 100644
index 3470de5..0000000
--- a/src/test/org/apache/cocoon/xml/SaxBufferTestCase.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation.
- * 
- * Licensed 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.
- */
-package org.apache.cocoon.xml;
-
-import java.io.ByteArrayInputStream;
-
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-
-import org.apache.cocoon.xml.dom.DOMBuilder;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * Testcase for SaxBuffer
- *
- * @author <a href="mailto:tcurdt@apache.org">Torsten Curdt</a>
- * @version
- */
-
-public final class SaxBufferTestCase extends AbstractXMLTestCase {
-    public SaxBufferTestCase(String s) {
-        super(s);
-    }
-
-    public void testCompareDOM() throws Exception {
-        DOMBuilder in = new DOMBuilder();
-        generateLargeSAX(in);
-
-        SaxBuffer sb = new SaxBuffer();
-        generateLargeSAX(sb);
-
-        DOMBuilder out = new DOMBuilder();
-        sb.toSAX(out);
-
-        assertXMLEqual(in.getDocument(), out.getDocument());
-    }
-
-    public void testStressLoop() throws Exception {
-        SaxBuffer sb = new SaxBuffer();
-
-        long loop = 10000;
-
-        // simply consume documents
-        long start = System.currentTimeMillis();
-        for(int i=0;i<loop;i++) {
-            generateSmallSAX(sb);
-            sb.recycle();
-        }
-        long stop = System.currentTimeMillis();
-
-        double r = 1000*loop/(stop-start);
-        System.out.println("consuming: "+ r + " documents per second");
-    }
-
-    public void testCompareToParsing() throws Exception {
-        DOMBuilder in = new DOMBuilder();
-        generateSmallSAX(in);
-
-        SAXParserFactory pfactory = SAXParserFactory.newInstance();
-        SAXParser p = pfactory.newSAXParser();
-
-
-        SaxBuffer b = new SaxBuffer();
-        DefaultHandlerWrapper wrapper = new DefaultHandlerWrapper(b);
-        ByteArrayInputStream bis = new ByteArrayInputStream(generateByteArray());
-
-        long loop = 10000;
-
-        long start = System.currentTimeMillis();
-        for(int i=0;i<loop;i++) {
-            b.recycle();
-            bis.reset();
-            p.parse(bis,wrapper);
-        }
-        long stop = System.currentTimeMillis();
-
-        double r = 1000*loop/(stop-start);
-        System.out.println("parsed:" + r + " documents per second");
-
-
-        ContentHandler ch = new DefaultHandler();
-
-        start = System.currentTimeMillis();
-        for(int i=0;i<loop;i++) {
-            b.toSAX(ch);
-        }
-        stop = System.currentTimeMillis();
-
-        r = 1000*loop/(stop-start);
-        System.out.println("recalling: " + r + " documents per second");
-    }
-
-
-}
diff --git a/src/test/org/apache/cocoon/xml/WhitespaceFilter.java b/src/test/org/apache/cocoon/xml/WhitespaceFilter.java
deleted file mode 100644
index 6ee002b..0000000
--- a/src/test/org/apache/cocoon/xml/WhitespaceFilter.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation.
- * 
- * Licensed 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.
- */
-package org.apache.cocoon.xml;
-
-import org.apache.cocoon.xml.AbstractXMLPipe;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-
-/**
- * A SAX filter to remove whitespace character, which disturb the
- * XML matching process.
- *
- * @author <a href="mailto:stephan@apache.org">Stephan Michels</a>
- * @version CVS $Id$
- */
-public class WhitespaceFilter extends AbstractXMLPipe {
-    private StringBuffer buffer = null;
-
-    /**
-     * Create a new WhitespaceFilter.
-     *
-     * @param handler Content handler.
-     */
-    public WhitespaceFilter(ContentHandler handler) {
-        setContentHandler(handler);
-    }
-
-    /**
-     * Receive notification of character data.
-     */
-    public void characters(char c[], int start, int len) throws SAXException {
-        if (contentHandler==null) {
-            return;
-        }
-
-        if (buffer==null) {
-            buffer = new StringBuffer();
-        }
-
-        buffer.append(c, start, len);
-    }
-
-    /**
-     * Receive notification of ignorable whitespace in element content.
-     */
-    public void ignorableWhitespace(char c[], int start,
-                                    int len) throws SAXException {
-        // ignore
-    }
-
-    /**
-     * Receive notification of the beginning of an element.
-     */
-    public void startElement(String namespaceURI, String localName,
-                             String qName,
-                             Attributes atts) throws SAXException {
-
-        pushText();      
-        contentHandler.startElement(namespaceURI, localName, qName, atts);
-    }
-
-    /**
-     * Receive notification of the end of an element.
-     */
-    public void endElement(String uri, String loc, String raw)
-        throws SAXException {
-
-        pushText();
-        contentHandler.endElement(uri, loc, raw);        
-    }
-
-    /**
-     * Receive notification of a processing instruction.
-     */
-    public void processingInstruction(String target, String data)
-        throws SAXException {
-
-        pushText();
-        contentHandler.processingInstruction(target, data);
-    }
-
-    /**
-     * Report an XML comment anywhere in the document.
-     *
-     * @param ch An array holding the characters in the comment.
-     * @param start The starting position in the array.
-     * @param len The number of characters to use from the array.
-     */
-    public void comment(char ch[], int start, int len)
-        throws SAXException {
-  
-        pushText();
-        super.comment(ch, start, len);
-    }
-
-
-    public void pushText() throws SAXException {
-
-        if (buffer!=null) {
-            String text = buffer.toString();
-
-            StringBuffer normalized = new StringBuffer();
-
-            for(int i=0; i<text.length(); i++) {
-                if (Character.isWhitespace(text.charAt(i))) {
-                    normalized.append(' ');
-                    while (((i+1)<text.length()) && (Character.isWhitespace(text.charAt(i+1))))
-                        i++;
-                } else {
-                    normalized.append(text.charAt(i));
-                }
-            }
-
-            text = normalized.toString().trim();
-
-            if (text.length()>0) {
-                contentHandler.characters(text.toCharArray(), 0,
-                                          text.length());
-            }
-
-            buffer = null;
-        }
-    }
-}
diff --git a/src/test/org/apache/cocoon/xml/dom/DOMBuilderStreamerTestCase.java b/src/test/org/apache/cocoon/xml/dom/DOMBuilderStreamerTestCase.java
deleted file mode 100644
index 9c96ae8..0000000
--- a/src/test/org/apache/cocoon/xml/dom/DOMBuilderStreamerTestCase.java
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation.
- * 
- * Licensed 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.
- */
-package org.apache.cocoon.xml.dom;
-
-import org.custommonkey.xmlunit.XMLTestCase;
-import org.custommonkey.xmlunit.XMLUnit;
-
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-import org.xml.sax.helpers.AttributesImpl;
-
-/**
- * Testcase for DOMStreamer and DOMBuilder.
- *
- * @author <a href="mailto:stephan@apache.org">Stephan Michels</a>
- * @version CVS $Id$
- */
-public class DOMBuilderStreamerTestCase extends XMLTestCase {
-
-    public DOMBuilderStreamerTestCase(String name) {
-        super(name);
-    }
-
-    public void testBuilderWithOneElement() throws Exception {
-        AttributesImpl atts = new AttributesImpl();
-
-        DOMBuilder builder = new DOMBuilder();
-        builder.startDocument();
-        builder.startElement("", "root", "root", atts);
-        builder.endElement("", "root", "root");
-        builder.endDocument();
-
-        Document document = XMLUnit.buildControlDocument("<root/>");
-        assertXMLEqual(document, builder.getDocument());
-    }
-
-    public void testBuilderWithMoreElements() throws Exception {
-        AttributesImpl atts = new AttributesImpl();
-
-        DOMBuilder builder = new DOMBuilder();
-        builder.startDocument();
-        builder.startElement("", "root", "root", atts);
-        builder.startElement("", "node", "node", atts);
-        builder.endElement("", "node", "node");
-        builder.startElement("", "node", "node", atts);
-        builder.endElement("", "node", "node");
-        builder.endElement("", "root", "root");
-        builder.endDocument();
-
-        Document document = XMLUnit.buildControlDocument("<root><node/><node/></root>");
-        assertXMLEqual(document, builder.getDocument());
-    }
-
-    public void testBuilderWithText() throws Exception {
-        AttributesImpl atts = new AttributesImpl();
-
-        DOMBuilder builder = new DOMBuilder();
-        builder.startDocument();
-        builder.startElement("", "root", "root", atts);
-        builder.characters("abcd".toCharArray(), 0, 4);
-        builder.endElement("", "root", "node");
-        builder.endDocument();
-
-        Document document = XMLUnit.buildControlDocument("<root>abcd</root>");
-        assertXMLEqual(document, builder.getDocument());
-    }
-
-    /*public void testBuilderWithNS()  throws Exception {
-        AttributesImpl atts = new AttributesImpl();
-
-        DOMBuilder builder = new DOMBuilder();
-        builder.startDocument();
-        builder.startPrefixMapping("", "http://xml.apache.org");
-        builder.startElement("", "root", "root", atts);
-        builder.endElement("", "node", "node");
-        builder.endPrefixMapping("");
-        builder.endDocument();
-
-        Document document = XMLUnit.buildControlDocument("<root xmlns=\"http://xml.apache.org\"/>");
-        assertXMLEqual(document, builder.getDocument());
-    }*/
-
-    /*public void testBuilderWithPrefix()  throws Exception {
-        AttributesImpl atts = new AttributesImpl();
-
-        DOMBuilder builder = new DOMBuilder();
-        builder.startDocument();
-        builder.startPrefixMapping("bla", "http://xml.apache.org");
-        builder.startElement("http://xml.apache.org", "root", "bla:root", atts);
-        builder.endElement("http://xml.apache.org", "root", "bla:root");
-        builder.endPrefixMapping("bla");
-        builder.endDocument();
-
-        Document document = XMLUnit.buildControlDocument("<bla:root xmlns:bla=\"http://xml.apache.org\"/>");
-        assertXMLEqual(document, builder.getDocument());
-    }*/
-
-    /*public void testBuilderWithNSError()  throws Exception {
-        AttributesImpl atts = new AttributesImpl();
-
-        DOMBuilder builder = new DOMBuilder();
-
-        try {
-            builder.startDocument();
-            builder.startPrefixMapping("bla", "http://xml.apache.org");
-            atts.addAttribute( "", "bla", "xmlns:bla", "CDATA", "http://xml.apache.org");
-            builder.startElement("http://xml.apache.org", "root", "bla:root", atts);
-            builder.endElement("http://xml.apache.org", "root", "bla:root");
-            builder.endPrefixMapping("bla");
-            builder.endDocument();
-
-            fail("DOMBuilder should throw exception because of permitted attribute");
-        } catch (Exception e) {
-            // nothing
-        }
-    }*/
-
-    public void testBuilderWithComments() throws Exception {
-        AttributesImpl atts = new AttributesImpl();
-
-        DOMBuilder builder = new DOMBuilder();
-        builder.startDocument();
-        builder.startElement("", "root", "root", atts);
-        builder.comment("abcd".toCharArray(), 0, 4);
-        builder.endElement("", "root", "node");
-        builder.endDocument();
-
-        Document document = XMLUnit.buildControlDocument("<root><!--abcd--></root>");
-
-        assertXMLEqual(document, builder.getDocument());
-    }
-
-    public void testBuilderWithCommentWithinDocType() throws Exception {
-        AttributesImpl atts = new AttributesImpl();
-
-        DOMBuilder builder = new DOMBuilder();
-        builder.startDocument();
-        builder.startDTD("skinconfig", null, null);
-        builder.comment("abcd".toCharArray(), 0, 4);
-        builder.endDTD();
-        builder.startElement("", "root", "root", atts);
-        builder.endElement("", "root", "node");
-        builder.endDocument();
-
-        Document document = XMLUnit.buildControlDocument("<!DOCTYPE skinconfig [<!--abcd-->]><root></root>");
-
-        print(document);
-        print(builder.getDocument());
-
-        assertXMLEqual(document, builder.getDocument());
-    }
-
-    public final void print(Document document) {
-        TransformerFactory factory = TransformerFactory.newInstance();
-        try
-        {
-          javax.xml.transform.Transformer serializer = factory.newTransformer();
-          serializer.transform(new DOMSource(document), new StreamResult(System.out));
-          System.out.println();
-        }
-        catch (TransformerException te)
-        {
-          te.printStackTrace();
-        }
-    }
-
-
-    public void testTestFacility() throws Exception {
-        Document document = XMLUnit.getControlParser().newDocument();
-        Element elemA = document.createElement("root");
-        document.appendChild(elemA);
-
-        Document oneElementDocument = XMLUnit.buildControlDocument("<root/>");
-        assertXMLEqual(oneElementDocument, document);
-
-        document = XMLUnit.getControlParser().newDocument();
-        elemA = document.createElement("node");
-        document.appendChild(elemA);
-
-        oneElementDocument = XMLUnit.buildControlDocument("<root/>");
-        assertXMLNotEqual(oneElementDocument, document);
-    }
-
-    public void testStreamer() throws Exception {
-
-        Document document = XMLUnit.getControlParser().newDocument();
-        Element elemA = document.createElement("root");
-        document.appendChild(elemA);
-
-        Element elemB = document.createElement("node");
-        elemA.appendChild(elemB);
-        
-        elemB = document.createElement("node");
-        elemA.appendChild(elemB);
-
-        DOMBuilder builder = new DOMBuilder();
-        DOMStreamer streamer = new DOMStreamer(builder);
-
-        streamer.stream(document);
-
-        document = builder.getDocument();
-
-        Document moreElementDocument = XMLUnit.buildControlDocument("<root><node/><node/></root>");
-        assertXMLEqual(moreElementDocument, document);
-    }
-
-    /*public void testStreamerWithNS() throws Exception {
-
-        Document document = XMLUnit.getControlParser().newDocument();
-        Element elemA = document.createElementNS("http://xml.apache.org", "root");
-        document.appendChild(elemA);
-
-        Element elemB = document.createElementNS("http://xml.apache.org", "node");
-        elemA.appendChild(elemB);
-
-        elemB = document.createElementNS("http://xml.apache.org", "node");
-        elemA.appendChild(elemB);
-
-        DOMBuilder builder = new DOMBuilder();
-        DOMStreamer streamer = new DOMStreamer(builder);
-
-        streamer.stream(document);
-    
-        document = builder.getDocument();
-    
-        Document moreElementDocument = XMLUnit.buildControlDocument("<root xmlns=\"http://xml.apache.org\"><node/><node/></root>");
-        assertXMLEqual(moreElementDocument, document);
-    }*/
-}
diff --git a/src/test/org/apache/cocoon/xml/dom/DOMBuilderTestCase.java b/src/test/org/apache/cocoon/xml/dom/DOMBuilderTestCase.java
deleted file mode 100644
index 0d81797..0000000
--- a/src/test/org/apache/cocoon/xml/dom/DOMBuilderTestCase.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation.
- * 
- * Licensed 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.
- */
-package org.apache.cocoon.xml.dom;
-
-import junit.framework.TestCase;
-
-import org.w3c.dom.Document;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.AttributesImpl;
-
-
-/**
- * JUnit Testcase for {@link DOMBuilder}.
- * 
- * @version CVS $Id$
- */
-public class DOMBuilderTestCase extends TestCase {
-
-    /**
-     * Constructor.
-     * @param name
-     */
-    public DOMBuilderTestCase(String name) {
-        super(name);
-    }
-
-    /**
-     * Test if two consecutive "characters" events result in two text nodes
-     * whose concatenation is equal to the concatenation
-     * of the two strings (cfr. bug #26219).
-     * 
-     * @throws SAXException
-     */
-    public void testMultipleCharactersEvents() throws SAXException {
-        DOMBuilder builder = new DOMBuilder();
-        Attributes attrs = new AttributesImpl();
-        char c1[] = "ABC".toCharArray();
-        char c2[] = "DEF".toCharArray();
-        builder.startDocument();
-        builder.startElement("", "test", "test", attrs);
-        builder.characters(c1, 0, 3);
-        builder.characters(c2, 0, 3);
-        builder.endElement("", "test", "test");
-        builder.endDocument();
-        Document dom = builder.getDocument();
-        StringBuffer value = new StringBuffer();
-        for (int i = 0 ; i < dom.getDocumentElement().getChildNodes().getLength() ; ++i) {
-            value.append(dom.getDocumentElement().getChildNodes().item(i).getNodeValue());
-        }
-        assertEquals("Content of root element not what expected",
-                "ABCDEF", value.toString()); 
-    }
-}
diff --git a/src/test/org/apache/lenya/ac/file/FileGroupTest.java b/src/test/org/apache/lenya/ac/file/FileGroupTest.java
deleted file mode 100644
index 89a0f87..0000000
--- a/src/test/org/apache/lenya/ac/file/FileGroupTest.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac.file;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.Group;
-import org.apache.lenya.ac.Groupable;
-import org.apache.lenya.ac.impl.AccessControlTest;
-import org.apache.lenya.cms.PublicationHelper;
-import org.xml.sax.SAXException;
-
-/**
- * Test for file-based groups
- */
-public class FileGroupTest extends AccessControlTest {
-
-    /**
-     * <code>GROUP_ID</code> The group id
-     */
-    public static final String GROUP_ID = "testGroup";
-
-    /**
-     * Constructor for FileGroupTest.
-     * @param arg0 command line args
-     */
-    public FileGroupTest(String arg0) {
-        super(arg0);
-    }
-
-    /**
-     * The command line interface
-     *
-     * @param args The command line args
-     */
-    public static void main(String[] args) {
-        PublicationHelper.extractPublicationArguments(args);
-        junit.textui.TestRunner.run(FileGroupTest.class);
-    }
-
-    /**
-     * Runs the test
-     *
-     * @throws AccessControlException if an AC error occurs
-     * @throws ConfigurationException if an error with the configuration occurs
-     * @throws SAXException if a parsing error occurs
-     * @throws IOException if an IO error occurs
-     */
-    final public void testFileGroup()
-        throws AccessControlException, ConfigurationException, SAXException, IOException {
-
-        FileGroup group = getGroup();
-        group.save();
-
-        File groupFile = new File(getAccreditablesDirectory(), GROUP_ID + FileGroupManager.SUFFIX);
-        assertNotNull(groupFile);
-        assertTrue(groupFile.exists());
-
-        Configuration config = null;
-        config = new DefaultConfigurationBuilder().buildFromFile(groupFile);
-        assertNotNull(config);
-
-        FileGroup newGroup = null;
-        newGroup = new FileGroup();
-        newGroup.setConfigurationDirectory(getAccreditablesDirectory());
-        newGroup.configure(config);
-        assertNotNull(newGroup);
-
-        assertTrue(newGroup.getId().equals(GROUP_ID));
-
-    }
-
-    /**
-     * Test getGroup
-     * 
-     * @return a <code>FileGroup</code>
-     */
-    protected FileGroup getGroup() {
-        File configurationDirectory = getAccreditablesDirectory();
-        System.out.println("Configuration directory: " + configurationDirectory);
-        FileGroup group = new FileGroup(configurationDirectory, GROUP_ID);
-        return group;
-    }
-
-    /**
-     * Tests the removeAllMembers() method.
-     */
-    public void testRemoveAllMembers() {
-        Group group = getGroup();
-        Groupable members[] = group.getMembers();
-        group.removeAllMembers();
-        for (int i = 0; i < members.length; i++) {
-            assertFalse(group.contains(members[i]));
-        }
-    }
-
-}
diff --git a/src/test/org/apache/lenya/ac/file/FileRoleTest.java b/src/test/org/apache/lenya/ac/file/FileRoleTest.java
deleted file mode 100644
index eaddc89..0000000
--- a/src/test/org/apache/lenya/ac/file/FileRoleTest.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation
- * 
- * Licensed 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.
- *  
- */
-
-package org.apache.lenya.ac.file;
-
-import java.io.File;
-
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.impl.AccessControlTest;
-import org.apache.lenya.cms.PublicationHelper;
-
-/**
- * File role test.
- *
- * @version $Id$
- */
-public class FileRoleTest extends AccessControlTest {
-    /**
-     * Constructor for FileRoleTest.
-     * @param arg0 The test to execute.
-     */
-    public FileRoleTest(String arg0) {
-        super(arg0);
-    }
-
-    /**
-     * DOCUMENT ME!
-     * 
-     * @param args DOCUMENT ME!
-     */
-    public static void main(String[] args) {
-        PublicationHelper.extractPublicationArguments(args);
-        junit.textui.TestRunner.run(FileRoleTest.class);
-    }
-
-    /**
-     * DOCUMENT ME!
-     * 
-     * @throws AccessControlException DOCUMENT ME!
-     */
-    final public void testFileRole() throws AccessControlException {
-        String name = "test";
-        File configDir = getAccreditablesDirectory();
-        FileRole role = new FileRole(configDir, name);
-        role.save();
-
-        File path = null;
-        path = FileRoleManager.instance(configDir, getLogger())
-                .getConfigurationDirectory();
-
-        File roleFile = new File(path, name + FileRoleManager.SUFFIX);
-        assertNotNull(roleFile);
-        assertTrue(roleFile.exists());
-    }
-
-    /**
-     * DOCUMENT ME!
-     * 
-     * @throws AccessControlException DOCUMENT ME!
-     */
-    final public void testSave() throws AccessControlException {
-        File configDir = getAccreditablesDirectory();
-        String name = "test";
-        FileRole role = new FileRole(configDir, name);
-        role.save();
-
-        File path = null;
-        path = FileRoleManager.instance(configDir, getLogger())
-                .getConfigurationDirectory();
-
-        File roleFile = new File(path, name + FileRoleManager.SUFFIX);
-        assertNotNull(roleFile);
-        assertTrue(roleFile.exists());
-    }
-
-    /**
-     * DOCUMENT ME!
-     */
-    final public void testGetId() {
-        String id = "test";
-        File configDir = getAccreditablesDirectory();
-        FileRole role = new FileRole(configDir, id);
-        assertTrue(role.getId().equals(id));
-    }
-
-    /**
-     * Test for boolean equals(Object)
-     */
-    final public void testEqualsObject() {
-        String name = "test";
-        File configDir = getAccreditablesDirectory();
-        FileRole role1 = new FileRole(configDir, name);
-        FileRole role2 = new FileRole(configDir, name);
-        assertEquals(role1, role2);
-    }
-}
\ No newline at end of file
diff --git a/src/test/org/apache/lenya/ac/file/FileUserTest.java b/src/test/org/apache/lenya/ac/file/FileUserTest.java
deleted file mode 100644
index 24fb2ad..0000000
--- a/src/test/org/apache/lenya/ac/file/FileUserTest.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac.file;
-
-import java.io.File;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.Group;
-import org.apache.lenya.ac.User;
-import org.apache.lenya.ac.UserType;
-import org.apache.lenya.ac.impl.AccessControlTest;
-import org.apache.lenya.cms.PublicationHelper;
-
-/**
- * File user test.
- * 
- * @version $Id$
- */
-public class FileUserTest extends AccessControlTest {
-    private HashMap groups = new HashMap();
-
-    /**
-     * Constructor for FileUserTest.
-     * @param arg0 command line args
-     */
-    public FileUserTest(String arg0) {
-        super(arg0);
-    }
-
-    /**
-     * The main method
-     * 
-     * @param args command line args
-     */
-    public static void main(String[] args) {
-        PublicationHelper.extractPublicationArguments(args);
-        junit.textui.TestRunner.run(FileUserTest.class);
-    }
-
-    /**
-     * (non-Javadoc)
-     * @see junit.framework.TestCase#setUp()
-     */
-    public void setUp() throws Exception {
-        super.setUp();
-    }
-
-    /**
-     * Get all Groups
-     * 
-     * @return A map of the groups
-     */
-    final public Map getGroups() {
-        return this.groups;
-    }
-
-    /**
-     * Create and save a user
-     * 
-     * @param userName The user name
-     * @param fullName The full name
-     * @param email The email
-     * @param password The password
-     * 
-     * @return a <code>FileUser</code>
-     * 
-     * @throws AccessControlException if an error occurs
-     */
-    final public FileUser createAndSaveUser(String userName, String fullName, String email,
-            String password) throws AccessControlException {
-        File configDir = getAccreditablesDirectory();
-
-        String editorGroupName = "editorGroup";
-        String adminGroupName = "adminGroup";
-
-        FileGroup editorGroup = new FileGroup(configDir, editorGroupName);
-        FileGroup adminGroup = new FileGroup(configDir, adminGroupName);
-        this.groups.put(editorGroupName, editorGroup);
-        this.groups.put(adminGroupName, adminGroup);
-
-        FileUser user = new FileUser(configDir, userName, fullName, email, password);
-
-        editorGroup.add(user);
-        adminGroup.add(user);
-
-        editorGroup.save();
-        adminGroup.save();
-        user.save();
-
-        FileUserManager _manager = getUserManager();
-        _manager.add(user);
-
-        return user;
-    }
-
-    /**
-     * Returns the file user manager.
-     * @return A file user manager.
-     * @throws AccessControlException if an error occurs. 
-     */
-    protected FileUserManager getUserManager() throws AccessControlException {
-        UserType[] userTypes = { FileAccreditableManager.getDefaultUserType() };
-        FileUserManager _manager = FileUserManager.instance(getAccreditablesDirectory(), userTypes,
-                getLogger());
-        return _manager;
-    }
-
-    /**
-     * Load a user.
-     * 
-     * @param userName the name of the user
-     * 
-     * @return a <code>FileUser</code>
-     * 
-     * @throws AccessControlException if an error occurs
-     */
-    final public FileUser loadUser(String userName) throws AccessControlException {
-        FileUserManager _manager = getUserManager();
-        return (FileUser) _manager.getUser(userName);
-    }
-
-    /**
-     * Test save
-     * 
-     * @throws AccessControlException if an error occurs
-     */
-    final public void testSave() throws AccessControlException {
-        String userName = "alice";
-        createAndSaveUser(userName, "Alice Wonderland", "alice@wonderland.org", "secret");
-
-        File configDir = getAccreditablesDirectory();
-        File xmlFile = new File(configDir, userName + ".iml");
-        assertTrue(xmlFile.exists());
-    }
-
-    /**
-     * Test getEmail
-     * 
-     * @throws AccessControlException if an error occurs
-     */
-    final public void testGetEmail() throws AccessControlException {
-        String userID = "alice";
-        String email = "alice@wonderland.org";
-        User user = createAndSaveUser(userID, "Alice Wonderland", email, "secret");
-        assertTrue(user.getEmail().equals(email));
-        user = loadUser(userID);
-        assertTrue(user.getEmail().equals(email));
-    }
-
-    /**
-     * Test getName
-     * 
-     * @throws AccessControlException if an error occurs
-     */
-    final public void testGetName() throws AccessControlException {
-        String userID = "alice";
-        String userName = "Alice Wonderland";
-        FileUser user = createAndSaveUser(userID, userName, "alice@wonderland.org", "secret");
-        assertTrue(user.getName().equals(userName));
-        user = loadUser(userID);
-        assertTrue(user.getName().equals(userName));
-    }
-
-    /**
-     * Test getGroups
-     * 
-     * @throws AccessControlException if an error occurs
-     */
-    final public void testGetGroups() throws AccessControlException {
-        FileUser user = createAndSaveUser("alice", "Alice Wonderland", "alice@wonderland.org",
-                "secret");
-
-        for (Iterator i = getGroups().values().iterator(); i.hasNext();) {
-            Group group = (Group) i.next();
-            assertTrue(group.contains(user));
-        }
-    }
-
-    /**
-     * Test getId
-     * 
-     * @throws AccessControlException if an error occurs
-     */
-    final public void testGetId() throws AccessControlException {
-        String id = "alice";
-        FileUser user = createAndSaveUser(id, "Alice Wonderland", "alice@wonderland.org", "secret");
-        assertTrue(user.getId().equals(id));
-    }
-
-    /**
-     * Test delete
-     * 
-     * @throws AccessControlException if an error occurs
-     */
-    final public void testDelete() throws AccessControlException {
-        String id = "albert";
-        FileUser user = createAndSaveUser(id, "Albert Einstein", "albert@physics.org", "secret");
-        FileUserManager _manager = getUserManager();
-        assertNotNull(_manager);
-
-        assertNotNull(_manager.getUser(id));
-        user.delete();
-        _manager.remove(user);
-        assertNull(_manager.getUser(id));
-    }
-
-    /**
-     * Test authenticate
-     * 
-     * @throws AccessControlException if an error occurs
-     */
-    final public void testAuthenticate() throws AccessControlException {
-        String password = "daisy";
-        FileUser user = createAndSaveUser("mickey", "Mickey Mouse", "mickey@mouse.com", password);
-        assertTrue(user.authenticate(password));
-
-        FileUserManager _manager = getUserManager();
-        assertNotNull(_manager);
-
-        User lenya = _manager.getUser("lenya");
-        assertNotNull(lenya);
-        assertTrue(lenya.authenticate("levi"));
-    }
-}
\ No newline at end of file
diff --git a/src/test/org/apache/lenya/ac/impl/AccessControlTest.java b/src/test/org/apache/lenya/ac/impl/AccessControlTest.java
deleted file mode 100644
index 952b893..0000000
--- a/src/test/org/apache/lenya/ac/impl/AccessControlTest.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac.impl;
-
-import java.io.File;
-
-import org.apache.avalon.framework.component.ComponentSelector;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.AccessControllerResolver;
-import org.apache.lenya.ac.AccreditableManager;
-import org.apache.lenya.ac.Identity;
-import org.apache.lenya.ac.User;
-import org.apache.lenya.ac.file.FileAccreditableManager;
-import org.apache.lenya.ac.file.FilePolicyManager;
-import org.apache.cocoon.SitemapComponentTestCase;
-import org.apache.lenya.cms.PublicationHelper;
-import org.apache.lenya.cms.ac.PublicationAccessControllerResolver;
-
-/**
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class AccessControlTest extends SitemapComponentTestCase {
-
-    private ComponentSelector accessControllerResolverSelector;
-    private AccessControllerResolver accessControllerResolver;
-    private DefaultAccessController accessController;
-
-    private File accreditablesDirectory;
-
-    /**
-     * @param test The test.
-     */
-    public AccessControlTest(String test) {
-    }
-
-    /**
-     * Returns the access controller.
-     * @return An access controller.
-     */
-    public DefaultAccessController getAccessController() {
-        return this.accessController;
-    }
-
-    protected static final String URL = "/test/authoring/index.html";
-
-    /** @see junit.framework.TestCase#setUp() */
-    public void setUp() throws Exception {
-
-        if (PublicationHelper.getPublication() == null) {
-            String[] args = { "D:\\Development\\build\\tomcat-4.1.24\\webapps\\lenya", "test" };
-            PublicationHelper.extractPublicationArguments(args);
-        }
-
-        super.setUp();
-
-        this.accessControllerResolverSelector = (ComponentSelector) getManager()
-                .lookup(AccessControllerResolver.ROLE + "Selector");
-        assertNotNull(this.accessControllerResolverSelector);
-
-        this.accessControllerResolver = (AccessControllerResolver) this.accessControllerResolverSelector
-                .select(AccessControllerResolver.DEFAULT_RESOLVER);
-
-        assertNotNull(this.accessControllerResolver);
-        getLogger().info(
-                "Using access controller resolver: [" + this.accessControllerResolver.getClass() + "]");
-
-        this.accessController = (DefaultAccessController) ((PublicationAccessControllerResolver) this.accessControllerResolver)
-                .resolveAccessController(URL);
-
-        assertNotNull(this.accessController);
-        getLogger().info("Resolved access controller: [" + this.accessController.getClass() + "]");
-
-        File servletContext = PublicationHelper.getPublication().getServletContext();
-        ((FilePolicyManager) this.accessController.getPolicyManager())
-                .setPoliciesDirectory(servletContext);
-
-        this.accreditablesDirectory = new File(PublicationHelper.getPublication().getDirectory(),
-                "config/ac/passwd".replace('/', File.separatorChar));
-        ((FileAccreditableManager) this.accessController.getAccreditableManager())
-                .setConfigurationDirectory(this.accreditablesDirectory);
-
-    }
-
-    /**
-     * The teardown method for JUnit
-     * @exception Exception if an error occurs
-     */
-    public void tearDown() throws Exception {
-        super.tearDown();
-
-        if (this.accessControllerResolverSelector != null) {
-            if (this.accessControllerResolver != null) {
-                if (this.accessController != null) {
-                    this.accessControllerResolver.release(this.accessController);
-                }
-                this.accessControllerResolverSelector.release(this.accessControllerResolver);
-            }
-            getManager().release(this.accessControllerResolver);
-        }
-    }
-
-    protected static final String USERNAME = "lenya";
-
-    /**
-     * Returns the identity.
-     * @return The identity.
-     * @throws AccessControlException when something went wrong.
-     */
-    protected Identity getIdentity() throws AccessControlException {
-        DefaultAccessController controller = getAccessController();
-        User user = controller.getAccreditableManager().getUserManager().getUser(USERNAME);
-        assertNotNull(user);
-
-        Identity identity = new Identity();
-        identity.enableLogging(getLogger());
-        identity.addIdentifiable(user);
-
-        return identity;
-    }
-
-    /**
-     * Returns the policy manager.
-     * @return A policy manager.
-     */
-    protected FilePolicyManager getPolicyManager() {
-        return (FilePolicyManager) getAccessController().getPolicyManager();
-    }
-
-    /**
-     * Returns the accreditable manager.
-     * @return An accreditable manager.
-     */
-    protected AccreditableManager getAccreditableManager() {
-        return getAccessController().getAccreditableManager();
-    }
-
-    /**
-     * Returns the directories where accreditables are stored.
-     * @return A file.
-     */
-    protected File getAccreditablesDirectory() {
-        return this.accreditablesDirectory;
-    }
-
-}
\ No newline at end of file
diff --git a/src/test/org/apache/lenya/ac/impl/AccessController.xtest b/src/test/org/apache/lenya/ac/impl/AccessController.xtest
deleted file mode 100644
index 466920d..0000000
--- a/src/test/org/apache/lenya/ac/impl/AccessController.xtest
+++ /dev/null
@@ -1,140 +0,0 @@
-<?xml version="1.0" ?>

-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-

-

-

-<testcase>

-  <annotation>

-    Test Cases: Accreditable Manager Test 

-  </annotation>

-  

-<!--  <context>

-    <entry name="container.rootDir" value="file:///c:/src/lenya-trunk/build/lenya/webapp/"/>

-    <entry name="context-root" value="file:///c:/src/lenya-trunk/build/lenya/webapp/"/>

-  </context>

--->

-  <roles>

-  

-    <role name="org.apache.excalibur.source.SourceFactorySelector"

-          shorthand="source-factories"

-          default-class="org.apache.avalon.excalibur.component.ExcaliburComponentSelector">

-    </role>

-    

-    <role name="org.apache.excalibur.source.SourceResolver"

-          shorthand="source-resolver"

-          default-class="org.apache.excalibur.source.impl.SourceResolverImpl"/>

-  

-    <role name="org.apache.lenya.ac.AccreditableManagerSelector"

-          shorthand="accreditable-managers"

-          default-class="org.apache.avalon.excalibur.component.ExcaliburComponentSelector">

-      <hint shorthand="file" class="org.apache.lenya.ac.file.FileAccreditableManager"/>

-    </role>

-    

-    <role name="org.apache.lenya.ac.AuthorizerSelector"

-          shorthand="authorizers"

-          default-class="org.apache.avalon.excalibur.component.ExcaliburComponentSelector">

-      <hint shorthand="policy" class="org.apache.lenya.ac.impl.PolicyAuthorizer"/>

-      <hint shorthand="workflow" class="org.apache.lenya.cms.ac.workflow.WorkflowAuthorizer"/>

-    </role>

-    

-    <role name="org.apache.lenya.ac.PolicyManagerSelector"

-          shorthand="policy-managers"

-          default-class="org.apache.avalon.excalibur.component.ExcaliburComponentSelector">

-      <hint shorthand="file" class="org.apache.ac.file.FilePolicyManager"/>

-      <hint shorthand="sitemap" class="org.apache.cms.ac.SitemapPolicyManager"/>

-    </role>

-    

-    <role name="org.apache.lenya.ac.AccessControllerResolverSelector"

-          shorthand="access-controller-resolvers"

-          default-class="org.apache.avalon.excalibur.component.ExcaliburComponentSelector">

-      <hint shorthand="composable" class="org.apache.lenya.ac.impl.ComposableAccessControllerResolver"/>

-      <hint shorthand="publication" class="org.apache.lenya.cms.ac.PublicationAccessControllerResolver"/>

-    </role>

-    

-    <role name="org.apache.lenya.ac.Authenticator"

-          shorthand="authenticator"

-          default-class="org.apache.lenya.ac.impl.UserAuthenticator"/>

-  

-  <!--

-    <role name="org.apache.lenya.ac.cache.PolicyCache"

-          shorthand="sourcecache"

-          default-class="org.apache.lenya.ac.cache.PolicyCacheImpl"/>

-  -->

-  </roles>

-

-  <components>

-  

-  <source-factories>

-    <component-instance class="org.apache.excalibur.source.impl.ResourceSourceFactory" name="resource"/>

-    <component-instance class="org.apache.lenya.cms.cocoon.source.FallbackSourceFactory" logger="lenya.source.fallback" name="fallback"/>

-    <component-instance class="org.apache.lenya.cms.cocoon.source.LenyaSourceFactory" logger="lenya.source.lenya" name="lenya" scheme="context:"/>

-    <component-instance class="org.apache.excalibur.source.impl.URLSourceFactory" name="*"/>

-  </source-factories>

-

-  <source-resolver class="org.apache.excalibur.source.impl.SourceResolverImpl"/>

-  

-    <accreditable-managers>

-      <component-instance logger="lenya.ac.accreditablemanager"

-          class="org.apache.lenya.ac.file.FileAccreditableManager" name="file">

-        <parameter name="directory" value="file:///c:/src/lenya-trunk/build/webapp/lenya/pubs/test/config/ac/passwd"/>

-      </component-instance>

-    </accreditable-managers>

-    

-  <authorizers>

-    <component-instance class="org.apache.lenya.ac.impl.PolicyAuthorizer" logger="lenya.ac.authorizer" name="policy"/>

-    <component-instance class="org.apache.lenya.cms.ac.workflow.WorkflowAuthorizer" logger="lenya.ac.authorizer" name="workflow"/>

-  </authorizers>

-  

-  <policy-managers>

-    <component-instance class="org.apache.lenya.ac.file.FilePolicyManager" logger="lenya.ac.policymanager.file" name="file"/>

-    <component-instance class="org.apache.lenya.cms.ac.SitemapPolicyManager" logger="lenya.ac.policymanager.sitemap" name="sitemap"/>

-    <component-instance class="org.apache.lenya.cms.ac.DocumentPolicyManagerWrapper" logger="lenya.ac.policymanager.document" name="document"/>

-  </policy-managers>

-  

-  <component logger="lenya.ac.accesscontroller"

-      class="org.apache.lenya.ac.impl.BypassableAccessController"

-      role="org.apache.lenya.ac.AccessController/bypassable"/>

-  

-  <component logger="lenya.ac.accesscontroller"

-      class="org.apache.lenya.ac.impl.DefaultAccessController"

-      role="org.apache.lenya.ac.AccessController/default"/>

-  

-  <access-controller-resolvers>

-    <component-instance logger="lenya.ac.accesscontrollerresolver"

-        class="org.apache.lenya.cms.ac.PublicationAccessControllerResolver"

-        name="publication">

-    </component-instance>

-    <component-instance logger="lenya.ac.accesscontrollerresolver"

-        class="org.apache.lenya.ac.impl.ComposableAccessControllerResolver"

-        name="composable">

-      <resolver type="publication"/>

-    </component-instance>

-  </access-controller-resolvers>

-  

-  <component logger="lenya.ac.authenticator"

-      class="org.apache.lenya.ac.impl.UserAuthenticator"

-      role="org.apache.lenya.cms.ac.Authenticator"/>

-    

-    <!--

-  <component logger="lenya.ac.cache"

-  	  class="org.apache.lenya.ac.cache.PolicyCacheImpl"

-  	  role="org.apache.lenya.ac.cache.PolicyCache"/>

-  	  -->

-

-  </components>

-  

-</testcase>

diff --git a/src/test/org/apache/lenya/ac/impl/AccessControllerTest.java b/src/test/org/apache/lenya/ac/impl/AccessControllerTest.java
deleted file mode 100644
index f61e28c..0000000
--- a/src/test/org/apache/lenya/ac/impl/AccessControllerTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac.impl;
-
-import junit.textui.TestRunner;
-
-import org.apache.lenya.cms.PublicationHelper;
-
-/**
- * Access controller test
- */
-public class AccessControllerTest extends AccessControlTest {
-
-    /**
-     * @param test A test.
-     */
-    public AccessControllerTest(String test) {
-        super(test);
-    }
-
-    /**
-     * The main method.
-     * @param args The command-line arguments.
-     */
-    public static void main(String[] args) {
-        PublicationHelper.extractPublicationArguments(args);
-        TestRunner.run(AccessControllerTest.class);
-    }
-
-    /**
-     * The test.
-     */
-    public void testAccessController() {
-        assertNotNull(getAccessController());
-    }
-
-}
diff --git a/src/test/org/apache/lenya/ac/impl/AccreditableManagerTest.java b/src/test/org/apache/lenya/ac/impl/AccreditableManagerTest.java
deleted file mode 100644
index 0399282..0000000
--- a/src/test/org/apache/lenya/ac/impl/AccreditableManagerTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
-* Copyright 1999-2004 The Apache Software Foundation
-*
-* Licensed 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.
-*/
-package org.apache.lenya.ac.impl;
-
-import junit.textui.TestRunner;
-
-import org.apache.avalon.framework.component.ComponentSelector;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.AccreditableManager;
-import org.apache.lenya.cms.ExcaliburTest;
-import org.apache.lenya.cms.PublicationHelper;
-
-/**
- * Test class for the Accreditable Manager
- */
-public class AccreditableManagerTest extends ExcaliburTest {
-
-    /**
-     * @param test The test to execute.
-     */
-    public AccreditableManagerTest(String test) {
-        super(test);
-    }
-
-    /**
-     * The main program.
-     * The parameters are set from the command line arguments.
-     *
-     * @param args The command line arguments.
-     */
-    public static void main(String[] args) {
-        args = PublicationHelper.extractPublicationArguments(args);
-        TestRunner.run(AccreditableManagerTest.class);
-    }
-    
-    private AccreditableManager accreditableManager;
-    private ComponentSelector selector;
-    
-    protected static final String HINT = "file";
-
-    /**
-     * The JUnit setup method. Lookup the resolver role.
-     *
-     * @exception  Exception  Description of Exception
-     * @since
-     */
-    public void setUp() throws Exception {
-        super.setUp();
-
-        String role = AccreditableManager.ROLE + "Selector";
-        this.selector = (ComponentSelector) this.manager.lookup(role);
-        
-        this.accreditableManager = (AccreditableManager) this.selector.select(HINT);
-        assertNotNull("AccreditableManager is null", this.accreditableManager);
-    }
-
-    /**
-     * The test.
-     * @throws AccessControlException when something went wrong.
-     */
-    public void testAccreditableManager() throws AccessControlException {
-        assertNotNull(this.accreditableManager.getUserManager());
-        assertNotNull(this.accreditableManager.getGroupManager());
-        assertNotNull(this.accreditableManager.getRoleManager());
-    }
-
-}
diff --git a/src/test/org/apache/lenya/ac/impl/GroupManagerTest.java b/src/test/org/apache/lenya/ac/impl/GroupManagerTest.java
deleted file mode 100644
index f20d51c..0000000
--- a/src/test/org/apache/lenya/ac/impl/GroupManagerTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac.impl;
-
-import java.io.File;
-
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.file.FileGroupManager;
-import org.apache.lenya.cms.PublicationHelper;
-
-/**
- * Group manager test.
- *
- * @version $Id$
- */
-public class GroupManagerTest extends AccessControlTest {
-
-    /**
-     * Constructor for GroupManagerTest.
-     * @param arg0 command line args
-     */
-    public GroupManagerTest(String arg0) {
-        super(arg0);
-    }
-
-    /**
-     * Command line interface
-     *
-     * @param args command line args
-     */
-    public static void main(String[] args) {
-        PublicationHelper.extractPublicationArguments(args);
-        junit.textui.TestRunner.run(GroupManagerTest.class);
-    }
-
-    /**
-     * The test
-     * @throws AccessControlException if an error occurs
-     */
-    public final void testInstance() throws AccessControlException {
-        FileGroupManager _manager = null;
-        File configDir = getAccreditablesDirectory();
-        _manager = FileGroupManager.instance(configDir, getLogger());
-        assertNotNull(_manager);
-
-        FileGroupManager anotherManager = null;
-        anotherManager = FileGroupManager.instance(configDir, getLogger());
-        assertNotNull(anotherManager);
-        assertEquals(_manager, anotherManager);
-    }
-}
diff --git a/src/test/org/apache/lenya/ac/impl/IdentityTest.java b/src/test/org/apache/lenya/ac/impl/IdentityTest.java
deleted file mode 100644
index 597469a..0000000
--- a/src/test/org/apache/lenya/ac/impl/IdentityTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-* Copyright 1999-2004 The Apache Software Foundation
-*
-* Licensed 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.
-*/
-package org.apache.lenya.ac.impl;
-
-import junit.textui.TestRunner;
-
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.Identity;
-import org.apache.lenya.ac.User;
-import org.apache.lenya.cms.PublicationHelper;
-
-/**
- * Tests the identity
- */
-public class IdentityTest extends AccessControlTest {
-
-    /**
-     * <code>USER_ID</code> The user id to test
-     */
-    public static final String USER_ID = "lenya";
-
-    /**
-     * Ctor.
-     * @param test The test.
-     */
-    public IdentityTest(String test) {
-        super(test);
-    }
-
-    /**
-     * The main method.
-     * @param args The command-line arguments.
-     */
-    public static void main(String[] args) {
-        PublicationHelper.extractPublicationArguments(args);
-        TestRunner.run(IdentityTest.class);
-    }
-    
-    /**
-     * Tests the identity.
-     * 
-     * @throws AccessControlException if an error occurs
-     */
-    public void testIdentity() throws AccessControlException {
-        Identity identity = new Identity();
-        User user = getAccessController().getAccreditableManager().getUserManager().getUser(USER_ID);
-        System.out.println("Adding user to identity: [" + user + "]");
-        identity.addIdentifiable(user);
-        
-        assertSame(user, identity.getUser());
-    }
-
-}
diff --git a/src/test/org/apache/lenya/ac/impl/IdentityTest.xtest b/src/test/org/apache/lenya/ac/impl/IdentityTest.xtest
deleted file mode 100644
index 11ba2f6..0000000
--- a/src/test/org/apache/lenya/ac/impl/IdentityTest.xtest
+++ /dev/null
@@ -1,138 +0,0 @@
-<?xml version="1.0" ?>

-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-

-<testcase>

-  <annotation>

-    Test Cases: Identity 

-  </annotation>

-  <context>

-    <entry name="environment-context" value="/c:/src/lenya-trunk/build/lenya/webapp/"/>

-    <entry name="container.rootDir" value="/c:/src/lenya-trunk/build/lenya/webapp/"/>

-    <entry name="context-root" value="/c:/src/lenya-trunk/build/lenya/webapp/"/>

-  </context>

-

-   <roles>

-  

-    <role name="org.apache.excalibur.source.SourceFactorySelector"

-          shorthand="source-factories"

-          default-class="org.apache.avalon.excalibur.component.ExcaliburComponentSelector">

-    </role>

-    

-    <role name="org.apache.excalibur.source.SourceResolver"

-          shorthand="source-resolver"

-          default-class="org.apache.excalibur.source.impl.SourceResolverImpl"/>

-  

-    <role name="org.apache.lenya.ac.AccreditableManagerSelector"

-          shorthand="accreditable-managers"

-          default-class="org.apache.avalon.excalibur.component.ExcaliburComponentSelector">

-      <hint shorthand="file" class="org.apache.lenya.ac.file.FileAccreditableManager"/>

-    </role>

-    

-    <role name="org.apache.lenya.ac.AuthorizerSelector"

-          shorthand="authorizers"

-          default-class="org.apache.avalon.excalibur.component.ExcaliburComponentSelector">

-      <hint shorthand="policy" class="org.apache.lenya.ac.impl.PolicyAuthorizer"/>

-      <hint shorthand="workflow" class="org.apache.lenya.cms.ac.workflow.WorkflowAuthorizer"/>

-    </role>

-    

-    <role name="org.apache.lenya.ac.PolicyManagerSelector"

-          shorthand="policy-managers"

-          default-class="org.apache.avalon.excalibur.component.ExcaliburComponentSelector">

-      <hint shorthand="file" class="org.apache.ac.file.FilePolicyManager"/>

-      <hint shorthand="sitemap" class="org.apache.cms.ac.SitemapPolicyManager"/>

-    </role>

-    

-    <role name="org.apache.lenya.ac.AccessControllerResolverSelector"

-          shorthand="access-controller-resolvers"

-          default-class="org.apache.avalon.excalibur.component.ExcaliburComponentSelector">

-      <hint shorthand="composable" class="org.apache.lenya.ac.impl.ComposableAccessControllerResolver"/>

-      <hint shorthand="publication" class="org.apache.lenya.cms.ac.PublicationAccessControllerResolver"/>

-    </role>

-    

-    <role name="org.apache.lenya.ac.Authenticator"

-          shorthand="authenticator"

-          default-class="org.apache.lenya.ac.impl.UserAuthenticator"/>

-  

-  <!--

-    <role name="org.apache.lenya.ac.cache.PolicyCache"

-          shorthand="sourcecache"

-          default-class="org.apache.lenya.ac.cache.PolicyCacheImpl"/>

-  -->

-  </roles>

-

-  <components>

-  

-  <source-factories>

-    <component-instance class="org.apache.excalibur.source.impl.ResourceSourceFactory" name="resource"/>

-    <component-instance class="org.apache.cocoon.components.source.impl.ContextSourceFactory" name="context"/>

-    <component-instance class="org.apache.excalibur.source.impl.URLSourceFactory" name="*"/>

-  </source-factories>

-

-  <source-resolver class="org.apache.excalibur.source.impl.SourceResolverImpl"/>

-  

-    <accreditable-managers>

-      <component-instance logger="lenya.ac.accreditablemanager"

-          class="org.apache.lenya.ac.file.FileAccreditableManager" name="file">

-        <parameter name="directory" value="file:///c:/src/lenya-trunk/build/webapp/lenya/pubs/test/config/ac/passwd"/>

-      </component-instance>

-    </accreditable-managers>

-    

-  <authorizers>

-    <component-instance class="org.apache.lenya.ac.impl.PolicyAuthorizer" logger="lenya.ac.authorizer" name="policy"/>

-    <component-instance class="org.apache.lenya.cms.ac.workflow.WorkflowAuthorizer" logger="lenya.ac.authorizer" name="workflow"/>

-  </authorizers>

-  

-  <policy-managers>

-    <component-instance class="org.apache.lenya.ac.file.FilePolicyManager" logger="lenya.ac.policymanager.file" name="file"/>

-    <component-instance class="org.apache.lenya.cms.ac.SitemapPolicyManager" logger="lenya.ac.policymanager.sitemap" name="sitemap"/>

-    <component-instance class="org.apache.lenya.cms.ac.DocumentPolicyManagerWrapper" logger="lenya.ac.policymanager.document" name="document"/>

-  </policy-managers>

-  

-  <component logger="lenya.ac.accesscontroller"

-      class="org.apache.lenya.ac.impl.BypassableAccessController"

-      role="org.apache.lenya.ac.AccessController/bypassable"/>

-  

-  <component logger="lenya.ac.accesscontroller"

-      class="org.apache.lenya.ac.impl.DefaultAccessController"

-      role="org.apache.lenya.ac.AccessController/default"/>

-  

-  <access-controller-resolvers>

-    <component-instance logger="lenya.ac.accesscontrollerresolver"

-        class="org.apache.lenya.cms.ac.PublicationAccessControllerResolver"

-        name="publication">

-    </component-instance>

-    <component-instance logger="lenya.ac.accesscontrollerresolver"

-        class="org.apache.lenya.ac.impl.ComposableAccessControllerResolver"

-        name="composable">

-      <resolver type="publication"/>

-    </component-instance>

-  </access-controller-resolvers>

-  

-  <component logger="lenya.ac.authenticator"

-      class="org.apache.lenya.ac.impl.UserAuthenticator"

-      role="org.apache.lenya.cms.ac.Authenticator"/>

-    

-    <!--

-  <component logger="lenya.ac.cache"

-  	  class="org.apache.lenya.ac.cache.PolicyCacheImpl"

-  	  role="org.apache.lenya.ac.cache.PolicyCache"/>

-  	  -->

-

-  </components>

- 

-</testcase>

-

diff --git a/src/test/org/apache/lenya/ac/impl/LDAPUserTest.java b/src/test/org/apache/lenya/ac/impl/LDAPUserTest.java
deleted file mode 100644
index 5e7ed65..0000000
--- a/src/test/org/apache/lenya/ac/impl/LDAPUserTest.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac.impl;
-
-import java.io.File;
-
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.User;
-import org.apache.lenya.ac.UserType;
-import org.apache.lenya.ac.file.FileAccreditableManager;
-import org.apache.lenya.ac.file.FileGroup;
-import org.apache.lenya.ac.file.FileRole;
-import org.apache.lenya.ac.file.FileUserManager;
-import org.apache.lenya.ac.ldap.LDAPUser;
-import org.apache.lenya.cms.PublicationHelper;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationException;
-import org.apache.lenya.cms.publication.PublicationFactory;
-
-/**
- * LDAP user test.
- * 
- * @version $Id$
- */
-public class LDAPUserTest extends AccessControlTest {
-    /**
-     * Constructor for LDAPUserTest.
-     * @param arg0 a <code>String</code>
-     */
-    public LDAPUserTest(String arg0) {
-        super(arg0);
-    }
-
-    /**
-     * 
-     * @param args an array of <code>String</code>
-     */
-    public static void main(String[] args) {
-        PublicationHelper.extractPublicationArguments(args);
-        junit.textui.TestRunner.run(LDAPUserTest.class);
-    }
-
-    /**
-     * @see junit.framework.TestCase#setUp()
-     */
-    public void setUp() throws Exception {
-        super.setUp();
-    }
-
-    /**
-     * @see junit.framework.TestCase#tearDown()
-     */
-    public void tearDown() throws Exception {
-        super.tearDown();
-    }
-
-    /**
-     * get a publication
-     * 
-     * @return a <code>Publication</code>
-     * 
-     * @throws PublicationException if an error occurs
-     */
-    final public Publication getPublication() throws PublicationException {
-        String publicationId = "default";
-        String servletContextPath = "/home/egli/build/jakarta-tomcat-4.1.21-LE-jdk14/webapps/lenya/";
-
-        PublicationFactory factory = PublicationFactory.getInstance(getLogger());
-        return factory.getPublication(publicationId, servletContextPath);
-    }
-
-    /**
-     * Create and save an ldap user
-     * 
-     * @param userName name of the user
-     * @param email of the user
-     * @param ldapId ldap id of the user
-     * @throws AccessControlException if the creating or the saving fails
-     * @throws ConfigurationException if the creating or the saving fails
-     */
-    final public void createAndSaveUser(String userName, String email, String ldapId)
-            throws AccessControlException, ConfigurationException {
-        String editorGroupName = "editorGroup";
-        String adminGroupName = "adminGroup";
-        String editorRoleName = "editorRole";
-        String adminRoleName = "adminRole";
-
-        File configDir = getAccreditablesDirectory();
-        FileRole editorRole = new FileRole();
-        editorRole.setName(editorRoleName);
-        editorRole.setConfigurationDirectory(configDir);
-
-        FileRole adminRole = new FileRole();
-        adminRole.setName(adminRoleName);
-        adminRole.setConfigurationDirectory(configDir);
-
-        FileGroup editorGroup = new FileGroup(configDir, editorGroupName);
-        FileGroup adminGroup = new FileGroup(configDir, adminGroupName);
-
-        LDAPUser user = new LDAPUser(configDir, userName, email, ldapId, getLogger());
-
-        editorRole.save();
-        adminRole.save();
-
-        /*
-         * editorGroup.addRole(editorRole); user.addGroup(editorGroup);
-         * adminGroup.addRole(editorRole); adminGroup.addRole(adminRole);
-         */
-        editorGroup.save();
-        adminGroup.save();
-
-        adminGroup.add(user);
-        user.save();
-    }
-
-    /**
-     * Test loading an LDAPUser
-     * 
-     * @param userName the name of the user
-     * @return an <code>LDAPUser</code>
-     * @throws AccessControlException of the loading fails
-     */
-    final public LDAPUser loadUser(String userName) throws AccessControlException {
-        UserType[] userTypes = { FileAccreditableManager.getDefaultUserType() };
-        FileUserManager _manager = FileUserManager.instance(getAccreditablesDirectory(), userTypes,
-                getLogger());
-
-        return (LDAPUser) _manager.getUser(userName);
-    }
-
-
-    /**
-     * Test the ldap id getter
-     * 
-     * @throws AccessControlException if the test fails
-     * @throws ConfigurationException if the creating or the saving fails
-     */
-    final public void testGetLdapId() throws ConfigurationException, AccessControlException {
-        String userName = "felix";
-        String ldapId = "m400032";
-        createAndSaveUser(userName, "felix@wyona.com", ldapId);
-
-        LDAPUser user = null;
-        user = loadUser(userName);
-        assertNotNull(user);
-        assertEquals(ldapId, user.getLdapId());
-    }
-
-    /**
-     * Test settinf the ldap id
-     * 
-     * @throws AccessControlException if the test fails
-     * @throws ConfigurationException if the creating or the saving fails
-     */
-    final public void testSetLdapId() throws ConfigurationException, AccessControlException {
-        String userName = "felix";
-        String newLdapId = "foo";
-        createAndSaveUser(userName, "felix@wyona.com", "bar");
-
-        LDAPUser user = null;
-        user = loadUser(userName);
-        assertNotNull(user);
-        user.setLdapId(newLdapId);
-        user.save();
-        user = null;
-        user = loadUser(userName);
-        assertNotNull(user);
-        assertEquals(newLdapId, user.getLdapId());
-    }
-
-    /**
-     * Test save
-     * 
-     * @throws AccessControlException if the test fails
-     * @throws ConfigurationException if the creating or the saving fails
-     */
-    final public void testSave() throws ConfigurationException, AccessControlException {
-        String userName = "felix";
-        createAndSaveUser(userName, "felix@wyona.com", "m400032");
-
-        User user = null;
-        user = loadUser(userName);
-        assertNotNull(user);
-    }
-
-    /**
-     * Test the deletion of a ldap user
-     *  
-     */
-    final public void testDelete() {
-        //TODO Implement delete().
-    }
-}
diff --git a/src/test/org/apache/lenya/ac/impl/PolicyManagerTest.java b/src/test/org/apache/lenya/ac/impl/PolicyManagerTest.java
deleted file mode 100644
index aab70e2..0000000
--- a/src/test/org/apache/lenya/ac/impl/PolicyManagerTest.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac.impl;
-
-import junit.textui.TestRunner;
-
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.Policy;
-import org.apache.lenya.ac.PolicyManager;
-import org.apache.lenya.cms.PublicationHelper;
-
-/**
- * Test for the Policy Manager
- */
-public class PolicyManagerTest extends AccessControlTest {
-
-    /**
-     * Create an instance of PolicyManagerTest
-     * @param test a test
-     */
-    public PolicyManagerTest(String test) {
-        super(test);
-    }
-
-    /**
-     * The main method.
-     * @param args The command-line arguments.
-     */
-    public static void main(String[] args) {
-        PublicationHelper.extractPublicationArguments(args);
-        TestRunner.run(AccessControllerTest.class);
-    }
-
-    private static String[] URLS = { "/test/authoring/index.html" };
-
-    /**
-     * The test.
-     * @throws AccessControlException when something went wrong.
-     */
-    public void testAccessController() throws AccessControlException {
-        
-        DefaultAccessController controller = getAccessController(); 
-        PolicyManager policyManager = controller.getPolicyManager();
-        assertNotNull(policyManager);
-        
-        for (int i = 0; i < URLS.length; i++) {
-            Policy policy = policyManager.getPolicy(controller.getAccreditableManager(), URLS[i]);
-            assertNotNull(policy);
-            assertTrue(policy.getRoles(getIdentity()).length > 0);
-        }
-    }
-
-}
diff --git a/src/test/org/apache/lenya/ac/impl/PolicyTest.java b/src/test/org/apache/lenya/ac/impl/PolicyTest.java
deleted file mode 100644
index c33f65a..0000000
--- a/src/test/org/apache/lenya/ac/impl/PolicyTest.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.ac.impl;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-import junit.textui.TestRunner;
-
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.Policy;
-import org.apache.lenya.ac.Role;
-import org.apache.lenya.cms.PublicationHelper;
-
-/**
- * Policy Test
- *  
- * */
-public class PolicyTest extends AccessControlTest {
-    /**
-     * Executes this test.
-     * @param test The test.
-     */
-    public PolicyTest(String test) {
-        super(test);
-    }
-
-    /**
-     * The main method.
-     * @param args The command-line arguments.
-     */
-    public static void main(String[] args) {
-        PublicationHelper.extractPublicationArguments(args);
-        TestRunner.run(PolicyTest.class);
-    }
-
-    protected static final String URL = "/test/authoring/index.html";
-    protected static final String SAVE_URL = "/test/authoring/tutorial.html";
-
-    /**
-     * A test.
-     * @throws AccessControlException when something went wrong.
-     */
-    public void testLoadPolicy() throws AccessControlException {
-        String url = "/" + PublicationHelper.getPublication().getId() + URL;
-        Policy policy = getPolicy(url);
-        Role[] roles = policy.getRoles(getIdentity());
-        System.out.print("Roles: ");
-
-        for (int i = 0; i < roles.length; i++) {
-            System.out.print(roles[i]);
-        }
-
-        System.out.println();
-    }
-
-    /**
-     * Returns the policy for a URL.
-     * @param url The URL.
-     * @return The policy.
-     * @throws AccessControlException when something went wrong.
-     */
-    protected Policy getPolicy(String url) throws AccessControlException {
-        Policy policy =
-            getPolicyManager().getPolicy(getAccessController().getAccreditableManager(), url);
-
-        return policy;
-    }
-
-    /**
-     * A test.
-     * @throws AccessControlException when something went wrong.
-     */
-    public void testSavePolicy() throws AccessControlException {
-        DefaultPolicy urlPolicy =
-            getPolicyManager().buildURLPolicy(getAccessController().getAccreditableManager(), URL);
-        DefaultPolicy newPolicy = new DefaultPolicy();
-
-        Credential[] credentials = urlPolicy.getCredentials();
-
-        for (int i = 0; i < credentials.length; i++) {
-            Credential credential = new Credential(credentials[i].getAccreditable());
-            Role[] roles = credentials[i].getRoles();
-
-            for (int j = 0; j < roles.length; j++) {
-                credential.addRole(roles[j]);
-            }
-
-            newPolicy.addCredential(credential);
-        }
-
-        assertEquals(urlPolicy.getCredentials().length, newPolicy.getCredentials().length);
-
-        getPolicyManager().saveURLPolicy(SAVE_URL, newPolicy);
-
-        newPolicy =
-            getPolicyManager().buildURLPolicy(
-                getAccessController().getAccreditableManager(),
-                SAVE_URL);
-        assertEquals(urlPolicy.getCredentials().length, newPolicy.getCredentials().length);
-
-        Credential[] newCredentials = newPolicy.getCredentials();
-
-        for (int i = 0; i < credentials.length; i++) {
-            Credential credential = new Credential(credentials[i].getAccreditable());
-
-            Credential newCredential = null;
-
-            for (int k = 0; k < newCredentials.length; k++) {
-                if (newCredentials[k].getAccreditable().equals(credential.getAccreditable())) {
-                    newCredential = newCredentials[k];
-                }
-            }
-
-            System.out.println("Accreditable: [" + credential.getAccreditable() + "]");
-            assertNotNull(newCredential);
-
-            Set oldRoles = new HashSet(Arrays.asList(credential.getRoles()));
-            Set newRoles = new HashSet(Arrays.asList(newCredential.getRoles()));
-            assertEquals(oldRoles, newRoles);
-
-            /*
-            for (int j = 0; j < roles.length; j++) {
-                assertEquals(roles[j], newRoles[j]);
-                System.out.println("  Role: [" + roles[j] + "]");
-            }
-            */
-        }
-    }
-}
diff --git a/src/test/org/apache/lenya/ac/impl/RoleManagerTest.java b/src/test/org/apache/lenya/ac/impl/RoleManagerTest.java
deleted file mode 100644
index 59415d8..0000000
--- a/src/test/org/apache/lenya/ac/impl/RoleManagerTest.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation
- * 
- * Licensed 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.
- *  
- */
-
-package org.apache.lenya.ac.impl;
-
-import java.io.File;
-
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.Role;
-import org.apache.lenya.ac.file.FileRole;
-import org.apache.lenya.ac.file.FileRoleManager;
-import org.apache.lenya.cms.PublicationHelper;
-
-/**
- * Role manager test.
- *
- * @version $Id$
- */
-public class RoleManagerTest extends AccessControlTest {
-    /**
-     * Constructor for RoleManagerTest.
-     * @param arg0 command line args
-     */
-    public RoleManagerTest(String arg0) {
-        super(arg0);
-    }
-
-    /**
-     * Command line interface
-     * @param args Command line args
-     */
-    public static void main(String[] args) {
-        PublicationHelper.extractPublicationArguments(args);
-        junit.textui.TestRunner.run(RoleManagerTest.class);
-    }
-
-    /**
-     * Run the test
-     * @throws AccessControlException if an error occurs
-     */
-    final public void testInstance() throws AccessControlException {
-        File configDir = getAccreditablesDirectory();
-        FileRoleManager _manager = FileRoleManager.instance(configDir, getLogger());
-        assertNotNull(_manager);
-
-        FileRoleManager anotherManager = FileRoleManager.instance(configDir, getLogger());
-        assertNotNull(anotherManager);
-        assertEquals(_manager, anotherManager);
-    }
-
-    /**
-     * Test getRoles()
-     */
-    final public void testGetRoles() {
-        // do nothing
-    }
-
-    /**
-     * Test add(Role)
-     * @throws AccessControlException if an error occurs
-     */
-    final public void testAddRole() throws AccessControlException {
-        File configDir = getAccreditablesDirectory();
-        String name = "test";
-        FileRoleManager _manager = null;
-        _manager = FileRoleManager.instance(configDir, getLogger());
-        assertNotNull(_manager);
-        Role role = new FileRole(_manager.getConfigurationDirectory(), name);
-        _manager.add(role);
-
-        assertTrue(_manager.getRoles().length > 0);
-    }
-
-    /**
-     * Test for void remove(Role)
-     * @throws AccessControlException if an error occurs.
-     */
-    final public void testRemoveRole() throws AccessControlException {
-        File configDir = getAccreditablesDirectory();
-        String name = "test2";
-        Role role = new FileRole(configDir, name);
-        FileRoleManager _manager = null;
-
-        try {
-            _manager = FileRoleManager.instance(configDir, getLogger());
-        } catch (AccessControlException e) {
-            e.printStackTrace();
-        }
-
-        assertNotNull(_manager);
-
-        Role[] roles = _manager.getRoles();
-        int roleCountBefore = roles.length;
-
-        _manager.add(role);
-        _manager.remove(role);
-
-        roles = _manager.getRoles();
-        int roleCountAfter = roles.length;
-
-        assertEquals(roleCountBefore, roleCountAfter);
-    }
-}
\ No newline at end of file
diff --git a/src/test/org/apache/lenya/ac/impl/UserManagerTest.java b/src/test/org/apache/lenya/ac/impl/UserManagerTest.java
deleted file mode 100644
index d3cf4dd..0000000
--- a/src/test/org/apache/lenya/ac/impl/UserManagerTest.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.ac.impl;
-
-import java.io.File;
-
-import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.Group;
-import org.apache.lenya.ac.User;
-import org.apache.lenya.ac.UserType;
-import org.apache.lenya.ac.file.FileAccreditableManager;
-import org.apache.lenya.ac.file.FileGroup;
-import org.apache.lenya.ac.file.FileGroupManager;
-import org.apache.lenya.ac.file.FileRole;
-import org.apache.lenya.ac.file.FileUser;
-import org.apache.lenya.ac.file.FileUserManager;
-import org.apache.lenya.cms.PublicationHelper;
-
-/**
- * User manager test.
- * 
- * @version $Id$
- */
-public class UserManagerTest extends AccessControlTest {
-
-    /**
-     * Constructor for UserManagerTest.
-     * @param arg0 command line args
-     */
-    public UserManagerTest(String arg0) {
-        super(arg0);
-    }
-
-    /**
-     * Command line interface
-     * @param args Command line args
-     */
-    public static void main(String[] args) {
-        PublicationHelper.extractPublicationArguments(args);
-        junit.textui.TestRunner.run(UserManagerTest.class);
-    }
-
-    /**
-     * @see junit.framework.TestCase#setUp()
-     */
-    public void setUp() throws Exception {
-        super.setUp();
-    }
-
-    /**
-     * Run the test
-     * @throws AccessControlException if an error occurs
-     */
-    final public void testInstance() throws AccessControlException {
-        File configDir = getAccreditablesDirectory();
-        UserType[] userTypes = { FileAccreditableManager.getDefaultUserType() };
-        FileUserManager _manager = FileUserManager.instance(configDir, userTypes,
-                getLogger());
-        assertNotNull(_manager);
-    }
-
-    /**
-     * Load the configuration for the test
-     * @throws AccessControlException if an error occurs
-     */
-    final public void testLoadConfig() throws AccessControlException {
-        File configDir = getAccreditablesDirectory();
-
-        String userName = "alice";
-        String editorGroupId = "editorGroup";
-        String adminGroupId = "adminGroup";
-        String editorRoleId = "editorRole";
-        String adminRoleId = "adminRole";
-
-        FileRole editorRole = new FileRole(configDir, editorRoleId);
-        FileRole adminRole = new FileRole(configDir, adminRoleId);
-
-        User user = new FileUser(configDir, userName, "Alice in Wonderland", "alice@test.com",
-                "secret");
-
-        editorRole.save();
-        adminRole.save();
-
-        Group editorGroup = new FileGroup(configDir, editorGroupId);
-
-        //		editorGroup.addRole(editorRole);
-        editorGroup.add(user);
-
-        FileGroup adminGroup = new FileGroup(configDir, adminGroupId);
-
-        //		adminGroup.addRole(editorRole);
-        //		adminGroup.addRole(adminRole);
-        editorGroup.save();
-        adminGroup.save();
-        adminGroup.add(user);
-        user.save();
-
-        FileGroupManager groupManager = null;
-        UserType[] userTypes = { FileAccreditableManager.getDefaultUserType() };
-        FileUserManager userManager = FileUserManager.instance(configDir, userTypes,
-                getLogger());
-        assertNotNull(userManager);
-
-        groupManager = FileGroupManager.instance(configDir, getLogger());
-        assertNotNull(groupManager);
-
-        Group fetchedGroup = groupManager.getGroup(editorGroupId);
-        assertTrue(editorGroup.equals(fetchedGroup));
-
-        fetchedGroup = groupManager.getGroup(adminGroupId);
-        assertTrue(adminGroup.equals(fetchedGroup));
-    }
-
-    /**
-     * Test getUser()
-     * @throws AccessControlException if an error occurs
-     */
-    final public void testGetUser() throws AccessControlException {
-        File configDir = getAccreditablesDirectory();
-        String userName = "testuser";
-        FileUser user = new FileUser(configDir, userName, "Alice in Wonderland",
-                "alice@wonderland.com", "secret");
-        UserType[] userTypes = { FileAccreditableManager.getDefaultUserType() };
-        FileUserManager _manager = FileUserManager.instance(configDir, userTypes,
-                getLogger());
-        assertNotNull(_manager);
-        _manager.add(user);
-
-        User otherUser = _manager.getUser(userName);
-        assertEquals(user, otherUser);
-        assertEquals(user.getDescription(), otherUser.getDescription());
-        assertEquals(user.getEmail(), otherUser.getEmail());
-        assertEquals(user.getEncryptedPassword(), ((AbstractUser) otherUser).getEncryptedPassword());
-    }
-}
\ No newline at end of file
diff --git a/src/test/org/apache/lenya/cms/ExcaliburTest.java b/src/test/org/apache/lenya/cms/ExcaliburTest.java
deleted file mode 100644
index 819000e..0000000
--- a/src/test/org/apache/lenya/cms/ExcaliburTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms;
-
-import java.io.InputStream;
-
-import org.apache.avalon.excalibur.testcase.ExcaliburTestCase;
-
-/**
- * Abstract base class for excalibur tests
- */
-public abstract class ExcaliburTest extends ExcaliburTestCase {
-
-    /**
-     * <code>CONFIGURATION</code> The path to the configuration
-     */
-    public static final String CONFIGURATION = "/" +
-    ExcaliburTest.class.getPackage().getName().replace('.', '/') + "/lenya.xtest";
-
-    /**
-     * @param test The test.
-     */
-    public ExcaliburTest(String test) {
-        super(test);
-    }
-
-    /**
-     * @see org.apache.avalon.excalibur.testcase.ExcaliburTestCase#prepare()
-     */
-    protected void prepare() throws Exception {
-        System.out.println(CONFIGURATION);
-        InputStream stream = ExcaliburTest.class.getResourceAsStream(CONFIGURATION);
-        prepare(stream);
-    }
-
-}
diff --git a/src/test/org/apache/lenya/cms/PublicationHelper.java b/src/test/org/apache/lenya/cms/PublicationHelper.java
deleted file mode 100644
index 79d60e5..0000000
--- a/src/test/org/apache/lenya/cms/PublicationHelper.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation
- * 
- * Licensed 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.
- *  
- */
-
-/* $Id$ */
-
-package org.apache.lenya.cms;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationException;
-import org.apache.lenya.cms.publication.PublicationFactory;
-
-import org.apache.avalon.framework.logger.ConsoleLogger;
-import org.apache.avalon.framework.logger.Logger;
-
-
-/**
- * A publication helper
- */
-public class PublicationHelper {
-
-    /**
-     * Constructor for PublicationHelper.
-     */
-    protected PublicationHelper() {
-        // do nothing
-    }
-
-    /**
-     * Initializes the object with the first parameters from the command line
-     * arguments <code>args</code>. The remainder of the array is returned.
-     * @param args The command line arguments of the test.
-     * @return The remainder of the arguments after the publication parameters
-     *         are extracted.
-     */
-    public static String[] extractPublicationArguments(String[] args) {
-        String servletContextPath = args[0];
-        String publicationId = args[1];
-        try {
-            PublicationFactory factory = PublicationFactory.getInstance(new ConsoleLogger());
-            publication = factory.getPublication(publicationId, servletContextPath);
-        } catch (PublicationException e) {
-            e.printStackTrace();
-        }
-
-        List subList = Arrays.asList(args).subList(2, args.length);
-        String[] remainder = (String[]) subList.toArray(new String[subList.size()]);
-
-        return remainder;
-    }
-
-    private static Publication publication;
-
-    /**
-     * Returns the publication.
-     * @return A publication object.
-     */
-    public static Publication getPublication() {
-        return publication;
-    }
-}
\ No newline at end of file
diff --git a/src/test/org/apache/lenya/cms/cocoon/generation/TestProxyGeneratorServlet.java b/src/test/org/apache/lenya/cms/cocoon/generation/TestProxyGeneratorServlet.java
deleted file mode 100644
index 52e554c..0000000
--- a/src/test/org/apache/lenya/cms/cocoon/generation/TestProxyGeneratorServlet.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.cocoon.generation;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Enumeration;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
-
-
-/**
- * Proxy Generator Servlet Test
- */
-public class TestProxyGeneratorServlet extends HttpServlet {
-    /**
-     * Initialize, given a servlet configuration
-     * @param config The configuration
-     * @throws ServletException if an error occurs
-     */
-    public void init(ServletConfig config) throws ServletException {
-        super.init(config);
-    }
-
-    /**
-     * Get a request
-     * @param request The request to get
-     * @param response The response to put it in
-     * @throws IOException if an IO error occurs
-     * @throws ServletException if an error occurs
-     */
-    public void doGet(HttpServletRequest request, HttpServletResponse response)
-        throws IOException, ServletException {
-        response.setContentType("text/xml");
-
-        PrintWriter writer = response.getWriter();
-        writer.print("<?xml version=\"1.0\"?>");
-        writer.print("<servlet class=\"" + this.getClass().getName() + "\">");
-        writer.print("<request method=\"GET\">");
-        writer.print(getRequestInfo(request));
-        writer.print(getParameters(request));
-        writer.print(getSession(request));
-        writer.print(getCookies(request));
-        writer.print("</request>");
-        writer.print("</servlet>");
-    }
-
-    /**
-     * Do a POST using the request and store the response in the response object
-     * @param request The request
-     * @param response The response
-     * @throws ServletException if an error occurs
-     * @throws IOException if an IO error occurs
-     */
-    public void doPost(HttpServletRequest request, HttpServletResponse response)
-        throws ServletException, IOException {
-        response.setContentType("text/xml");
-
-        PrintWriter writer = response.getWriter();
-        writer.print("<?xml version=\"1.0\"?>");
-        writer.print("<servlet class=\"" + this.getClass().getName() + "\">");
-        writer.print("<request method=\"POST\">");
-        writer.print(getRequestInfo(request));
-        writer.print(getParameters(request));
-        writer.print(getSession(request));
-        writer.print(getCookies(request));
-        writer.print("</request>");
-        writer.print("</servlet>");
-    }
-
-    /**
-     * Return the information about a request: URI, Server name and port
-     * @param request The request
-     * @return The information (as XML)
-     */
-    public String getRequestInfo(HttpServletRequest request) {
-        StringBuffer sb = new StringBuffer("");
-        sb.append("<URI>" + request.getRequestURI() + "</URI>");
-        sb.append("<servername>" + request.getServerName() + "</servername>");
-        sb.append("<serverport>" + request.getServerPort() + "</serverport>");
-
-        return sb.toString();
-    }
-
-    /**
-     * Get all parameters from a request
-     * @param request The request
-     * @return The parameters (as XML)
-     */
-    public String getParameters(HttpServletRequest request) {
-        StringBuffer sb = new StringBuffer("");
-        Enumeration parameters = request.getParameterNames();
-        boolean hasParameters = parameters.hasMoreElements();
-
-        if (hasParameters) {
-            sb.append("<parameters>");
-        }
-
-        while (parameters.hasMoreElements()) {
-            String name = (String) parameters.nextElement();
-            String[] values = request.getParameterValues(name);
-            sb.append("<parameter name=\"" + name + "\">");
-
-            for (int i = 0; i < values.length; i++) {
-                sb.append("<value>" + values[i] + "</value>");
-            }
-
-            sb.append("</parameter>");
-        }
-
-        if (hasParameters) {
-            sb.append("</parameters>");
-        }
-
-        return sb.toString();
-    }
-
-    /**
-     * Get all session attributes of a request
-     * @param request The request
-     * @return The session attributes (in XML)
-     */
-    public String getSession(HttpServletRequest request) {
-        StringBuffer sb = new StringBuffer("");
-
-        //HttpSession session=request.getSession(true);
-        HttpSession session = request.getSession(false);
-
-        if (session != null) {
-            sb.append("<session>");
-
-            Enumeration attributes = session.getAttributeNames();
-
-            if (!attributes.hasMoreElements()) {
-                sb.append("<noattributes/>");
-            }
-
-            while (attributes.hasMoreElements()) {
-                String attributeName = (String) attributes.nextElement();
-                sb.append("<attribute name=\"" + attributeName + "\">");
-                sb.append("" + session.getAttribute(attributeName));
-                sb.append("</attribute>");
-            }
-
-            sb.append("</session>");
-        } else {
-            sb.append("<nosession/>");
-        }
-
-        return sb.toString();
-    }
-
-    /**
-     * Return all cookies of a request
-     * @param request The request
-     * @return The cookies (as XML)
-     */
-    public String getCookies(HttpServletRequest request) {
-        StringBuffer sb = new StringBuffer("");
-
-        Cookie[] cookies = request.getCookies();
-
-        if (cookies != null) {
-            if (cookies.length > 0) {
-                sb.append("<cookies>");
-
-                for (int i = 0; i < cookies.length; i++) {
-                    sb.append("<cookie>");
-                    sb.append("<comment>" + cookies[i].getComment() + "</comment>");
-                    sb.append("<domain>" + cookies[i].getDomain() + "</domain>");
-                    sb.append("<maxage>" + cookies[i].getMaxAge() + "</maxage>");
-                    sb.append("<name>" + cookies[i].getName() + "</name>");
-                    sb.append("<path>" + cookies[i].getPath() + "</path>");
-                    sb.append("<secure>" + cookies[i].getSecure() + "</secure>");
-                    sb.append("<value>" + cookies[i].getValue() + "</value>");
-                    sb.append("<version>" + cookies[i].getVersion() + "</version>");
-                    sb.append("</cookie>");
-                }
-
-                sb.append("</cookies>");
-            } else {
-                sb.append("<nocookies/>");
-            }
-        } else {
-            sb.append("<nocookies/>");
-        }
-
-        return sb.toString();
-    }
-}
diff --git a/src/test/org/apache/lenya/cms/lenya.xtest b/src/test/org/apache/lenya/cms/lenya.xtest
deleted file mode 100644
index bc3caf9..0000000
--- a/src/test/org/apache/lenya/cms/lenya.xtest
+++ /dev/null
@@ -1,232 +0,0 @@
-<?xml version="1.0" ?>

-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-

-<!DOCTYPE testcase [

-

-<!ELEMENT testcase (annotation?,logkit,context?,roles,components)>

-

-<!-- annotation describes the testcase -->

-<!ELEMENT annotation (#PCDATA)>

-

-<!-- logkit define the logkit in use -->

-<!ELEMENT logkit (factories, targets, categories)>

-<!ELEMENT factories (factory+)>

-

-<!ELEMENT factory EMPTY>

-<!ATTLIST factory 

-  type CDATA #REQUIRED

-  class CDATA #REQUIRED

->

-<!ELEMENT targets ANY>

-<!ELEMENT file ANY>

-<!ATTLIST file

-  id ID #REQUIRED>

-<!ELEMENT filename (#PCDATA)>

-<!ELEMENT format (#PCDATA)>

-<!ATTLIST format

-  type (extended|raw)  "extended"

->

-<!ELEMENT categories (category+)>

-<!ELEMENT category ANY>

-<!ATTLIST category

-  name CDATA #REQUIRED

-  log-level (DEBUG|INFO|WARN|ERROR) "INFO"

->

-<!ELEMENT log-target EMPTY>

-<!ATTLIST log-target

-  id-ref CDATA #REQUIRED

->

-

-<!-- the context used by the components -->

-<!ELEMENT context (entry*)>

-<!ELEMENT entry EMPTY>

-<!ATTLIST entry

-  name CDATA #REQUIRED

-  value CDATA #REQUIRED

->

-

-<!-- the roles of the components -->

-<!ELEMENT roles (role+)>

-<!ELEMENT role (hint*)>

-<!ATTLIST role

-  name CDATA #IMPLIED

-  class CDATA #IMPLIED

-  shorthand CDATA #REQUIRED

-  default-class CDATA #REQUIRED

->

-<!ELEMENT hint EMPTY>

-<!ATTLIST hint

-  shorthand CDATA #REQUIRED

-  class CDATA #REQUIRED

->

-

-<!-- define components element, attributes, and its children -->

-<!ELEMENT components (resolver)>

-<!ATTLIST components 

-  logger CDATA #IMPLIED

->

-  

-<!ELEMENT resolver (parameter*)>

-<!ATTLIST resolver 

-  logger CDATA #IMPLIED

->

-

-<!ELEMENT parameter EMPTY>

-<!ATTLIST parameter

-  name CDATA #REQUIRED

-  value CDATA #REQUIRED

->

-]>

-

-

-<testcase>

-  <annotation>

-    Test Cases: Accreditable Manager Test 

-  </annotation>

-  <logkit>

-    <factories>

-      <factory type="stream" class="org.apache.avalon.excalibur.logger.factory.StreamTargetFactory"/>

-    </factories>

-    <targets>

-       <stream id="root">

-        <stream>System.out</stream>

-        <format type="extended">

-          %7.7{priority} %5.5{time}   [%9.9{category}] (%{context}): %{message}\n%{throwable}

-        </format>

-       </stream>

-     </targets>

-     <categories>

-       <category name="lenya" log-level="DEBUG">

-         <log-target id-ref="root"/>

-       </category>

-     </categories>

-  </logkit>

-  

-<!--  <context>

-    <entry name="container.rootDir" value="file:///c:/src/lenya-trunk/build/lenya/webapp/"/>

-    <entry name="context-root" value="file:///c:/src/lenya-trunk/build/lenya/webapp/"/>

-  </context>

--->

-  <roles>

-  

-    <role name="org.apache.excalibur.source.SourceFactorySelector"

-          shorthand="source-factories"

-          default-class="org.apache.avalon.excalibur.component.ExcaliburComponentSelector">

-    </role>

-    

-    <role name="org.apache.excalibur.source.SourceResolver"

-          shorthand="source-resolver"

-          default-class="org.apache.excalibur.source.impl.SourceResolverImpl"/>

-  

-    <role name="org.apache.lenya.ac.AccreditableManagerSelector"

-          shorthand="accreditable-managers"

-          default-class="org.apache.avalon.excalibur.component.ExcaliburComponentSelector">

-      <hint shorthand="file" class="org.apache.lenya.ac.file.FileAccreditableManager"/>

-    </role>

-    

-    <role name="org.apache.lenya.ac.AuthorizerSelector"

-          shorthand="authorizers"

-          default-class="org.apache.avalon.excalibur.component.ExcaliburComponentSelector">

-      <hint shorthand="policy" class="org.apache.lenya.ac.impl.PolicyAuthorizer"/>

-      <hint shorthand="workflow" class="org.apache.lenya.cms.ac.workflow.WorkflowAuthorizer"/>

-    </role>

-    

-    <role name="org.apache.lenya.ac.PolicyManagerSelector"

-          shorthand="policy-managers"

-          default-class="org.apache.avalon.excalibur.component.ExcaliburComponentSelector">

-      <hint shorthand="file" class="org.apache.ac.file.FilePolicyManager"/>

-      <hint shorthand="sitemap" class="org.apache.cms.ac.SitemapPolicyManager"/>

-    </role>

-    

-    <role name="org.apache.lenya.ac.AccessControllerResolverSelector"

-          shorthand="access-controller-resolvers"

-          default-class="org.apache.avalon.excalibur.component.ExcaliburComponentSelector">

-      <hint shorthand="composable" class="org.apache.lenya.ac.impl.ComposableAccessControllerResolver"/>

-      <hint shorthand="publication" class="org.apache.lenya.cms.ac.PublicationAccessControllerResolver"/>

-    </role>

-    

-    <role name="org.apache.lenya.ac.Authenticator"

-          shorthand="authenticator"

-          default-class="org.apache.lenya.ac.impl.UserAuthenticator"/>

-  

-  <!--

-    <role name="org.apache.lenya.ac.cache.PolicyCache"

-          shorthand="sourcecache"

-          default-class="org.apache.lenya.ac.cache.PolicyCacheImpl"/>

-  -->

-  </roles>

-

-  <components>

-  

-  <source-factories>

-    <component-instance class="org.apache.excalibur.source.impl.ResourceSourceFactory" name="resource"/>

-    <component-instance class="org.apache.excalibur.source.impl.URLSourceFactory" name="*"/>

-  </source-factories>

-

-  <source-resolver class="org.apache.excalibur.source.impl.SourceResolverImpl"/>

-  

-    <accreditable-managers>

-      <component-instance logger="lenya.ac.accreditablemanager"

-          class="org.apache.lenya.ac.file.FileAccreditableManager" name="file">

-        <parameter name="directory" value="file:///c:/src/lenya-trunk/build/webapp/lenya/pubs/test/config/ac/passwd"/>

-      </component-instance>

-    </accreditable-managers>

-    

-  <authorizers>

-    <component-instance class="org.apache.lenya.ac.impl.PolicyAuthorizer" logger="lenya.ac.authorizer" name="policy"/>

-    <component-instance class="org.apache.lenya.cms.ac.workflow.WorkflowAuthorizer" logger="lenya.ac.authorizer" name="workflow"/>

-  </authorizers>

-  

-  <policy-managers>

-    <component-instance class="org.apache.lenya.ac.file.FilePolicyManager" logger="lenya.ac.policymanager.file" name="file"/>

-    <component-instance class="org.apache.lenya.cms.ac.SitemapPolicyManager" logger="lenya.ac.policymanager.sitemap" name="sitemap"/>

-    <component-instance class="org.apache.lenya.cms.ac.DocumentPolicyManagerWrapper" logger="lenya.ac.policymanager.document" name="document"/>

-  </policy-managers>

-  

-  <component logger="lenya.ac.accesscontroller"

-      class="org.apache.lenya.ac.impl.BypassableAccessController"

-      role="org.apache.lenya.ac.AccessController/bypassable"/>

-  

-  <component logger="lenya.ac.accesscontroller"

-      class="org.apache.lenya.ac.impl.DefaultAccessController"

-      role="org.apache.lenya.ac.AccessController/default"/>

-  

-  <access-controller-resolvers>

-    <component-instance logger="lenya.ac.accesscontrollerresolver"

-        class="org.apache.lenya.cms.ac.PublicationAccessControllerResolver"

-        name="publication">

-    </component-instance>

-    <component-instance logger="lenya.ac.accesscontrollerresolver"

-        class="org.apache.lenya.ac.impl.ComposableAccessControllerResolver"

-        name="composable">

-      <resolver type="publication"/>

-    </component-instance>

-  </access-controller-resolvers>

-  

-  <component logger="lenya.ac.authenticator"

-      class="org.apache.lenya.ac.impl.UserAuthenticator"

-      role="org.apache.lenya.cms.ac.Authenticator"/>

-    

-    <!--

-  <component logger="lenya.ac.cache"

-  	  class="org.apache.lenya.ac.cache.PolicyCacheImpl"

-  	  role="org.apache.lenya.ac.cache.PolicyCache"/>

-  	  -->

-

-  </components>

-  

-</testcase>

diff --git a/src/test/org/apache/lenya/cms/publication/DefaultDocumentBuilderTest.java b/src/test/org/apache/lenya/cms/publication/DefaultDocumentBuilderTest.java
deleted file mode 100644
index d71139d..0000000
--- a/src/test/org/apache/lenya/cms/publication/DefaultDocumentBuilderTest.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.publication;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
-import org.apache.lenya.cms.PublicationHelper;
-
-/**
- * 
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class DefaultDocumentBuilderTest extends DefaultDocumentTest {
-    /**
-     * Constructor.
-     * 
-     * @param test The test.
-     */
-    public DefaultDocumentBuilderTest(String test) {
-        super(test);
-    }
-
-    /**
-     * The main program. The parameters are set from the command line arguments.
-     * 
-     * @param args The command line arguments.
-     */
-    public static void main(String[] args) {
-        PublicationHelper.extractPublicationArguments(args);
-        TestRunner.run(getSuite());
-    }
-
-    /**
-     * Returns the test suite.
-     * 
-     * @return A test suite.
-     */
-    public static Test getSuite() {
-        return new TestSuite(DefaultDocumentBuilderTest.class);
-    }
-
-    /**
-     * @see org.apache.lenya.cms.publication.DefaultDocumentTest#getDocument(DocumentTestSet)
-     */
-    protected Document getDocument(DocumentTestSet set) throws DocumentBuildException {
-        Publication pub = PublicationHelper.getPublication();
-
-        return getIdentityMap().getFactory().getFromURL(pub,
-                pub.getId() + "/" + set.getArea() + set.getUrl());
-    }
-}
\ No newline at end of file
diff --git a/src/test/org/apache/lenya/cms/publication/DefaultDocumentTest.java b/src/test/org/apache/lenya/cms/publication/DefaultDocumentTest.java
deleted file mode 100644
index 2a5ddd1..0000000
--- a/src/test/org/apache/lenya/cms/publication/DefaultDocumentTest.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.publication;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
-import org.apache.lenya.cms.PublicationHelper;
-
-/**
- * 
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class DefaultDocumentTest extends TestCase {
-    /**
-     * Constructor.
-     * @param test The test.
-     */
-    public DefaultDocumentTest(String test) {
-        super(test);
-    }
-
-    /**
-     * The main program. The parameters are set from the command line arguments.
-     * @param args The command line arguments.
-     */
-    public static void main(String[] args) {
-        PublicationHelper.extractPublicationArguments(args);
-        TestRunner.run(getSuite());
-    }
-
-    /**
-     * Returns the test suite.
-     * @return A test suite.
-     */
-    public static Test getSuite() {
-        return new TestSuite(DefaultDocumentTest.class);
-    }
-
-    protected static final DocumentTestSet[] testSets = {
-            new DocumentTestSet("/index.html", "/index", Publication.AUTHORING_AREA, "en", "html"),
-            new DocumentTestSet("/index_en.htm", "/index", Publication.AUTHORING_AREA, "en", "htm"),
-            new DocumentTestSet("/index_de.html", "/index", Publication.AUTHORING_AREA, "de",
-                    "html") };
-
-    /**
-     * Tests a document test set.
-     * @param testSet The test set.
-     * @throws DocumentBuildException if an error occurs
-     */
-    protected void doDocumentTest(DocumentTestSet testSet) throws DocumentBuildException {
-        Document document = getDocument(testSet);
-        System.out.println("ID:           " + document.getId());
-        System.out.println("Area:         " + document.getArea());
-        System.out.println("Language:     " + document.getLanguage());
-        System.out.println("Document URL: " + document.getCanonicalDocumentURL());
-        System.out.println("Complete URL: " + document.getCanonicalWebappURL());
-        System.out.println("Extension:    " + document.getExtension());
-
-        Publication publication = PublicationHelper.getPublication();
-        assertEquals(document.getPublication(), publication);
-        assertEquals(document.getId(), testSet.getId());
-        assertEquals(document.getArea(), testSet.getArea());
-        assertEquals(document.getLanguage(), testSet.getLanguage());
-        assertEquals(document.getCanonicalDocumentURL(), testSet.getUrl());
-        assertEquals(document.getCanonicalWebappURL(), "/" + publication.getId() + "/"
-                + document.getArea() + testSet.getUrl());
-        assertEquals(document.getExtension(), testSet.getExtension());
-
-        System.out.println("-----------------------------------------------");
-    }
-
-    /**
-     * Tests the default document.
-     * @throws DocumentBuildException if an error occurs
-     */
-    public void testDefaultDocument() throws DocumentBuildException {
-        for (int i = 0; i < testSets.length; i++) {
-            doDocumentTest(testSets[i]);
-        }
-    }
-
-    private DocumentIdentityMap identityMap;
-
-    protected DocumentIdentityMap getIdentityMap() {
-        if (this.identityMap == null) {
-            this.identityMap = new DocumentIdentityMap();
-        }
-        return this.identityMap;
-    }
-
-    /**
-     * Returns the test document for a given test set.
-     * @param testSet A document test set.
-     * @return A document.
-     * @throws DocumentBuildException if an error occurs
-     */
-    protected Document getDocument(DocumentTestSet testSet) throws DocumentBuildException {
-
-        Publication pub = PublicationHelper.getPublication();
-        DefaultDocument document = new DefaultDocument(getIdentityMap(), pub, testSet.getId(),
-                testSet.getArea());
-        document.setDocumentURL(testSet.getUrl());
-        document.setLanguage(testSet.getLanguage());
-        document.setExtension(testSet.getExtension());
-
-        return document;
-    }
-
-    /**
-     * Utility class to store test data for a document.
-     */
-    protected static class DocumentTestSet {
-        private String url;
-        private String id;
-        private String extension;
-        private String area;
-        private String language;
-
-        /**
-         * Ctor.
-         * @param _url The url.
-         * @param _id The ID.
-         * @param _area The area.
-         * @param _language The language.
-         * @param _extension The extension.
-         */
-        public DocumentTestSet(String _url, String _id, String _area, String _language,
-                String _extension) {
-            this.url = _url;
-            this.id = _id;
-            this.area = _area;
-            this.language = _language;
-            this.extension = _extension;
-        }
-
-        /**
-         * @return The area.
-         */
-        public String getArea() {
-            return this.area;
-        }
-
-        /**
-         * @return The extension.
-         */
-        public String getExtension() {
-            return this.extension;
-        }
-
-        /**
-         * @return The ID.
-         */
-        public String getId() {
-            return this.id;
-        }
-
-        /**
-         * @return The language.
-         */
-        public String getLanguage() {
-            return this.language;
-        }
-
-        /**
-         * @return The URL.
-         */
-        public String getUrl() {
-            return this.url;
-        }
-    }
-
-    /**
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        if (PublicationHelper.getPublication() == null) {
-            String[] args = { "D:\\Development\\build\\tomcat-4.1.24\\webapps\\lenya", "test" };
-            PublicationHelper.extractPublicationArguments(args);
-        }
-    }
-}
\ No newline at end of file
diff --git a/src/test/org/apache/lenya/cms/publication/DublinCoreTest.java b/src/test/org/apache/lenya/cms/publication/DublinCoreTest.java
deleted file mode 100644
index 0c7c1e2..0000000
--- a/src/test/org/apache/lenya/cms/publication/DublinCoreTest.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.publication;
-
-import junit.framework.TestCase;
-import junit.textui.TestRunner;
-
-import org.apache.lenya.cms.PublicationHelper;
-import org.apache.lenya.cms.metadata.MetaData;
-import org.apache.lenya.cms.metadata.dublincore.DublinCore;
-
-/**
- * Dublin Core test.
- * 
- * @version $Id$
- */
-public class DublinCoreTest extends TestCase {
-
-    private static final String AREA = "authoring";
-    private static final String DOCUMENT_ID = "/tutorial";
-    private static final String LANGUAGE = "de";
-    private static final String CREATOR = "test";
-
-    /**
-     * Constructor for DublinCoreTest.
-     * @param arg0 a test
-     */
-    public DublinCoreTest(String arg0) {
-        super(arg0);
-    }
-
-    /**
-     * The main program. The parameters are set from the command line arguments.
-     * 
-     * @param args The command line arguments.
-     */
-    public static void main(String[] args) {
-        args = PublicationHelper.extractPublicationArguments(args);
-        TestRunner.run(DublinCoreTest.class);
-    }
-
-    /**
-     * Test the fetching, modification and refetching of a dc core object.
-     * 
-     * @throws DocumentBuildException if an error occurs
-     * @throws DocumentException if an error occurs
-     */
-    final public void testModifySaveAndReload() throws DocumentBuildException, DocumentException {
-        Publication publication = PublicationHelper.getPublication();
-        DocumentIdentityMap map = new DocumentIdentityMap();
-        Document doc = map.get(publication, AREA, DOCUMENT_ID, LANGUAGE);
-        MetaData dcCore = doc.getMetaDataManager().getDublinCoreMetaData();
-        String title = dcCore.getFirstValue(DublinCore.ELEMENT_TITLE);
-        String subject = dcCore.getFirstValue(DublinCore.ELEMENT_SUBJECT);
-        String creator = dcCore.getFirstValue(DublinCore.ELEMENT_CREATOR);
-        String dateIssued = dcCore.getFirstValue(DublinCore.TERM_ISSUED);
-
-        dcCore.setValue(DublinCore.ELEMENT_CREATOR, CREATOR);
-        dcCore.save();
-
-        Document doc2 = map.get(publication, AREA, DOCUMENT_ID, LANGUAGE);
-
-        MetaData dcCore2 = doc2.getMetaDataManager().getDublinCoreMetaData();
-        assertEquals(title, dcCore2.getFirstValue(DublinCore.ELEMENT_TITLE));
-        assertEquals(subject, dcCore2.getFirstValue(DublinCore.ELEMENT_SUBJECT));
-        assertEquals(dateIssued, dcCore2.getFirstValue(DublinCore.TERM_ISSUED));
-        assertFalse(creator.equals(dcCore2.getFirstValue(DublinCore.ELEMENT_CREATOR)));
-        assertEquals(CREATOR, dcCore2.getFirstValue(DublinCore.ELEMENT_CREATOR));
-    }
-
-    /** @see junit.framework.TestCase#setUp() */
-    protected void setUp() throws Exception {
-        if (PublicationHelper.getPublication() == null) {
-            String[] args = { "/home/egli/build/jakarta-tomcat-4.1.21-LE-jdk14/webapps/lenya",
-                    "test" };
-            PublicationHelper.extractPublicationArguments(args);
-        }
-    }
-}
diff --git a/src/test/org/apache/lenya/cms/publication/PublicationTest.java b/src/test/org/apache/lenya/cms/publication/PublicationTest.java
deleted file mode 100644
index aa3e0e2..0000000
--- a/src/test/org/apache/lenya/cms/publication/PublicationTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.publication;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
-import org.apache.lenya.cms.PublicationHelper;
-import org.apache.lenya.cms.publication.file.FilePublicationTest;
-
-/**
- * To change the template for this generated type comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class PublicationTest extends TestCase {
-    /**
-     * Constructor.
-     * @param test The test to execute.
-     */
-    public PublicationTest(String test) {
-        super(test);
-    }
-
-    /**
-     * The main method.
-     * @param args The command-line arguments.
-     */
-    public static void main(String[] args) {
-        PublicationHelper.extractPublicationArguments(args);
-        TestRunner.run(getSuite());
-    }
-
-    protected static final Class[] classes =
-        { FilePublicationTest.class, DefaultDocumentTest.class, DefaultDocumentBuilderTest.class };
-
-    /**
-     * Creates a test suite.
-     * @return a test suite.
-     */
-    public static Test getSuite() {
-        TestSuite suite = new TestSuite();
-
-        for (int i = 0; i < classes.length; i++) {
-            suite.addTestSuite(classes[i]);
-        }
-
-        return suite;
-    }
-
-    /** @see junit.framework.TestCase#setUp() */
-    protected void setUp() throws Exception {
-        if (PublicationHelper.getPublication() == null) {
-            String[] args = { "D:\\Development\\build\\tomcat-4.1.24\\webapps\\lenya", "test" };
-            PublicationHelper.extractPublicationArguments(args);
-        }
-    }
-
-}
diff --git a/src/test/org/apache/lenya/cms/publication/TestPageEnvelope.java b/src/test/org/apache/lenya/cms/publication/TestPageEnvelope.java
deleted file mode 100644
index 6928abf..0000000
--- a/src/test/org/apache/lenya/cms/publication/TestPageEnvelope.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.publication;
-
-/**
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class TestPageEnvelope extends PageEnvelope {
-    /**
-     * Constructs a test page envelope.
-     * @param publication The publication.
-     * @param url The document url (starting with a slash).
-     * @throws PageEnvelopeException when something goes wrong.
-     */
-    public TestPageEnvelope(Publication publication, String url) throws PageEnvelopeException {
-        setContext("");
-
-        try {
-            DocumentIdentityMap map = new DocumentIdentityMap();
-            setDocument(map.getFactory().getFromURL(publication, url));
-        } catch (DocumentBuildException e) {
-            throw new PageEnvelopeException(e);
-        }
-    }
-}
\ No newline at end of file
diff --git a/src/test/org/apache/lenya/cms/publication/file/FilePublicationTest.java b/src/test/org/apache/lenya/cms/publication/file/FilePublicationTest.java
deleted file mode 100644
index cfdc91f..0000000
--- a/src/test/org/apache/lenya/cms/publication/file/FilePublicationTest.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.publication.file;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
-import org.apache.lenya.cms.PublicationHelper;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentException;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationException;
-import org.apache.lenya.cms.site.Label;
-import org.apache.lenya.cms.site.SiteException;
-import org.apache.lenya.cms.site.tree.SiteTree;
-import org.apache.lenya.cms.site.tree.SiteTreeNode;
-import org.apache.lenya.cms.site.tree.TreeSiteManager;
-
-/**
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public class FilePublicationTest extends TestCase {
-
-    /**
-     * Constructor.
-     * @param test The test.
-     */
-    public FilePublicationTest(String test) {
-        super(test);
-    }
-
-    /**
-     * The main program. The parameters are set from the command line arguments.
-     * 
-     * @param args The command line arguments.
-     */
-    public static void main(String[] args) {
-        PublicationHelper.extractPublicationArguments(args);
-        TestRunner.run(getSuite());
-    }
-
-    /**
-     * Returns the test suite.
-     * @return A test suite.
-     */
-    public static Test getSuite() {
-        return new TestSuite(FilePublicationTest.class);
-    }
-
-    /**
-     * <code>sourceDocumentId</code> The source document id
-     */
-    public static final String sourceDocumentId = "/tutorial";
-    /**
-     * <code>destinationDocumentId</code> The destination document id
-     */
-    public static final String destinationDocumentId = "/doctypes/simple-document";
-    /**
-     * <code>sourceLanguage</code> The source language
-     */
-    public static final String sourceLanguage = "en";
-    /**
-     * <code>destinationLanguage</code> The destination language
-     */
-    public static final String destinationLanguage = "en";
-
-    /**
-     * Tests copying a document.
-     * @throws PublicationException when something went wrong.
-     * @throws DocumentException
-     * @throws SiteException
-     */
-    public void testCopyDocument() throws PublicationException, DocumentException, SiteException {
-        testCopyDocument(Publication.AUTHORING_AREA,
-                sourceDocumentId,
-                sourceLanguage,
-                Publication.AUTHORING_AREA,
-                destinationDocumentId,
-                destinationLanguage);
-        testCopyDocument(Publication.AUTHORING_AREA,
-                sourceDocumentId,
-                sourceLanguage,
-                Publication.LIVE_AREA,
-                sourceDocumentId,
-                sourceLanguage);
-    }
-
-    /**
-     * Tests copying a document.
-     * @param sourceArea The source area.
-     * @param _sourceDocumentId The source document ID.
-     * @param _sourceLanguage The source language.
-     * @param destinationArea The destination area.
-     * @param _destinationDocumentId The destination document ID.
-     * @param _destinationLanguage The destination language.
-     * @throws PublicationException when something went wrong.
-     * @throws DocumentException
-     * @throws SiteException
-     */
-    public void testCopyDocument(String sourceArea, String _sourceDocumentId,
-            String _sourceLanguage, String destinationArea, String _destinationDocumentId,
-            String _destinationLanguage) throws PublicationException, DocumentException,
-            SiteException {
-
-        System.out.println("Copy document");
-        System.out.println("    Source area:             [" + sourceArea + "]");
-        System.out.println("    Source document ID:      [" + _sourceDocumentId + "]");
-        System.out.println("    Source language:         [" + _sourceLanguage + "]");
-        System.out.println("    Destination area:        [" + destinationArea + "]");
-        System.out.println("    Destination document ID: [" + _destinationDocumentId + "]");
-        System.out.println("    Destination language:    [" + _destinationLanguage + "]");
-
-        Publication publication = PublicationHelper.getPublication();
-        DocumentIdentityMap map = new DocumentIdentityMap();
-
-        Document sourceDocument = map.getFactory().get(publication,
-                sourceArea,
-                _sourceDocumentId,
-                _sourceLanguage);
-        Document destinationDocument = map.getFactory().get(publication,
-                destinationArea,
-                _destinationDocumentId,
-                _destinationLanguage);
-
-        publication.copyDocument(sourceDocument, destinationDocument);
-
-        assertTrue(destinationDocument.exists());
-
-        TreeSiteManager manager = (TreeSiteManager) publication.getSiteManager(map);
-        SiteTree destinationTree = manager.getTree(destinationArea);
-        SiteTreeNode destinationNode = destinationTree.getNode(_destinationDocumentId);
-        assertNotNull(destinationNode);
-        Label destinationLabel = destinationNode.getLabel(_destinationLanguage);
-        assertNotNull(destinationLabel);
-
-        SiteTreeNode sourceNode = destinationTree.getNode(_sourceDocumentId);
-        Label sourceLabel = sourceNode.getLabel(_sourceLanguage);
-
-        assertTrue(destinationLabel.getLabel().equals(sourceLabel.getLabel()));
-
-    }
-}
\ No newline at end of file
diff --git a/src/test/org/apache/lenya/cms/rc/RCMLTest.java b/src/test/org/apache/lenya/cms/rc/RCMLTest.java
deleted file mode 100644
index 1c13dec..0000000
--- a/src/test/org/apache/lenya/cms/rc/RCMLTest.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.rc;
-
-import java.io.PrintWriter;
-import java.util.Date;
-
-import junit.framework.TestCase;
-
-import org.w3c.dom.Document;
-import org.apache.lenya.xml.DocumentHelper;
-
-/**
- * RCML Test
- */
-public class RCMLTest extends TestCase {
-
-	/**
-	 * <code>co</code> Checkout
-	 */
-	public static final short co = 0;
-	/**
-	 * <code>ci</code> Checkin
-	 */
-	public static final short ci = 1;
-    
-	private Document document = null;
-
-    /**
-     * Constructor.
-     * @param test The test to execute.
-     */
-    public RCMLTest(String test) {
-        super(test);
-    }
-
-    /**
-     * The main method.
-     * @param args The command-line arguments.
-     */
-    public void main(String[] args) {
-//        TestRunner.run(getSuite());
-
-
-		if (args.length != 1) {
-			System.out.println("Usage: java RCML rcmlDirectory datafilename rootDirectory");
-
-			return;
-		}
-
-		try {
-			RCML rcml = new RCML(args[0], args[1], args[2]);
-			rcml.checkOutIn(RCML.co, "michi", new Date().getTime(), false);
-
-			(new PrintWriter(System.out)).print(this.document);
-
-			CheckOutEntry coe = rcml.getLatestCheckOutEntry();
-			System.out.println("\n");
-
-			if (coe == null) {
-				System.out.println("Not checked out");
-			} else {
-				System.out.println("Checked out: " + coe.getIdentity() + " " + coe.getTime());
-			}
-		} catch (Exception e) {
-			System.out.println(e);
-		}
-	    }
-
-/*    protected static final Class[] classes = {
-    };
-
-    /**
-     * Creates a test suite.
-     * @return a test suite.
-     */
-/*    public static Test getSuite() {
-        TestSuite suite = new TestSuite();
-
-        for (int i = 0; i < classes.length; i++) {
-            suite.addTestSuite(classes[i]);
-        }
-
-        return suite;
-    }
-*/
-    /** @see junit.framework.TestCase#setUp() */
-    protected void setUp() throws Exception {
-		/**
-		 * initialise the RCML-document. Delete all entries
-		 */
-        this.document = DocumentHelper.createDocument(null, "XPSRevisionControl", null);
-    }
-}
diff --git a/src/test/org/apache/lenya/cms/rc/RevisionControllerTest.java b/src/test/org/apache/lenya/cms/rc/RevisionControllerTest.java
deleted file mode 100644
index 5fc4d52..0000000
--- a/src/test/org/apache/lenya/cms/rc/RevisionControllerTest.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.rc;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-
-import junit.framework.TestCase;
-
-/**
- * Revision Controller test
- */
-public class RevisionControllerTest extends TestCase {
-    /**
-     * Constructor.
-     * @param test The test to execute.
-     */
-    public RevisionControllerTest(String test) {
-        super(test);
-    }
-
-    /**
-     * The main method.
-     * @param args The command-line arguments.
-     */
-    public static void main(String[] args) {
-        //       TestRunner.run(getSuite());
-
-        if (args.length != 4) {
-            System.out.println(
-                "Usage: "
-                    + RevisionController.class.getName()
-                    + " username(user who checkout) source(filename without the rootDirectory of the document to checkout) username(user who checkin) destination(filename without the rootDirectory of document to checkin)");
-
-            return;
-        }
-
-        String identityS = args[0];
-        String source = args[1];
-        String identityD = args[2];
-        String destination = args[3];
-        RevisionController rc = new RevisionController(null, null, null);
-        try {
-            rc.reservedCheckOut(source, identityS);
-        } catch (FileNotFoundException e) // No such source file
-            {
-            System.out.println(e.toString());
-        } catch (FileReservedCheckOutException e) // Source has been checked out already
-            {
-            System.out.println(e.toString());
-            //	System.out.println(error(e.source + "is already check out by " + e.checkOutUsername + " since " +						e.checkOutDate));
-            return;
-
-        } catch (IOException e) { // Cannot create rcml file
-            System.out.println(e.toString());
-            return;
-
-        } catch (Exception e) {
-            System.out.println(e.toString());
-            return;
-        }
-
-        try {
-            rc.reservedCheckIn(destination, identityD, true);
-        } catch (FileReservedCheckInException e) {
-            System.out.println(e.toString());
-        } catch (Exception e) {
-            System.out.println(e.toString());
-        }
-    }
-
-    /*   protected static final Class[] classes = {
-       };
-    
-       /**
-        * Creates a test suite.
-        * @return a test suite.
-        */
-    /*    public static Test getSuite() {
-            TestSuite suite = new TestSuite();
-    
-            for (int i = 0; i < classes.length; i++) {
-                suite.addTestSuite(classes[i]);
-            }
-    
-            return suite;
-        }
-    */
-    /** @see junit.framework.TestCase#setUp() */
-    protected void setUp() throws Exception {
-        // do nothing
-    }
-}
diff --git a/src/test/org/apache/lenya/cms/site/tree/DefaultSiteTreeTest.java b/src/test/org/apache/lenya/cms/site/tree/DefaultSiteTreeTest.java
deleted file mode 100644
index fab21bf..0000000
--- a/src/test/org/apache/lenya/cms/site/tree/DefaultSiteTreeTest.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.site.tree;
-
-import junit.framework.TestCase;
-
-import org.apache.lenya.cms.site.Label;
-import org.apache.lenya.cms.site.SiteException;
-import org.apache.lenya.cms.site.tree.DefaultSiteTree;
-import org.apache.lenya.cms.site.tree.SiteTreeNode;
-
-/**
- * Test class for the default site tree
- */
-public class DefaultSiteTreeTest extends TestCase {
-	
-	private DefaultSiteTree siteTree = null;
-
-	/**
-	 * Constructor.
-	 * @param test The test.
-	 */
-	public DefaultSiteTreeTest(String test) {
-        super(test);
-    }
-
-	/**
-	 * The main program.
-	 * The parameters are set from the command line arguments.
-	 *
-	 * @param args The command line arguments.
-	 */
-	public static void main(String[] args) {
-        junit.textui.TestRunner.run(DefaultSiteTreeTest.class);
-    }
-
-    /**
-     * @see TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        super.setUp();
-		this.siteTree = new DefaultSiteTree("testTree.xml");
-		Label label = new Label("Foo", "en");
-		Label[] fooLabels = { label };
-		this.siteTree.addNode("/foo", fooLabels, null, null, false);
-		label = new Label("Home", "en");
-		Label[] homeLabels = { label };
-		this.siteTree.addNode("/index", homeLabels, null, null, false);
-		label = new Label("Bar", "en");
-		Label label_de = new Label("Stab", "de");
-		Label[] barLabels = { label, label_de };
-		this.siteTree.addNode("/foo/bar", barLabels, "http://exact.biz", "suffix", true);
-		label = new Label("Lala", "en");
-		Label[] lalaLabels = { label };
-		this.siteTree.addNode("/foo/lala", lalaLabels, null, null, false);
-	}
-
-    /**
-     * @see TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
-    /**
-     * Test for void DefaultSiteTree(String)
-     */
-    final public void testDefaultSiteTreeString() {
-        //TODO Implement DefaultSiteTree().
-    }
-
-    /**
-     * Test for void DefaultSiteTree(File)
-     */
-    final public void testDefaultSiteTreeFile() {
-        //TODO Implement DefaultSiteTree().
-    }
-
-    /**
-     * Test for void addNode(String, String, Label[])
-     * 
-     * @throws SiteException if an error occurs
-     */
-    final public void testAddNodeStringStringLabelArray() throws SiteException {
-		Label label = new Label("Tutorial", null);
-		Label[] labels = { label };
-
-		this.siteTree.addNode("/foo", "tutorial", labels);
-		SiteTreeNode node =  this.siteTree.getNode("/foo/tutorial");
-		assertNotNull(node);
-		assertEquals(node.getId(), "tutorial");
-    }
-
-    /**
-     * Test for void addNode(SiteTreeNode)
-     */
-    final public void testAddNodeSiteTreeNode() {
-        //TODO Implement addNode().
-    }
-
-    /**
-     * Test for void addNode(String, Label[], String, String, boolean)
-     * 
-     * @throws SiteException if an error occurs
-     */
-    final public void testAddNodeStringLabelArrayStringStringboolean() throws SiteException {
-		Label label1 = new Label("Doh", "en");
-		Label label2 = new Label("Ding", "en");
-		Label[] labels = { label1, label2};
-
-		this.siteTree.addNode("/foo/ding", labels, null, null, false);
-		
-		assertNotNull(this.siteTree.getNode("/foo/ding"));
-		assertEquals(this.siteTree.getNode("/foo/ding").getId(), "ding");
-    }
-
-    /**
-     * Test for void addNode(String, String, Label[], String, String, boolean)
-     * @throws SiteException if an error occurs
-     */
-    final public void testAddNodeStringStringLabelArrayStringStringboolean() throws SiteException {
-		Label label1 = new Label("Doh", "en");
-		Label label2 = new Label("Ding", "en");
-		Label[] labels = { label1, label2};
-
-		this.siteTree.addNode("/foo", "baz", labels, null, null, false);
-		
-		assertNotNull(this.siteTree.getNode("/foo/baz"));
-		assertEquals(this.siteTree.getNode("/foo/baz").getId(), "baz");		
-    }
-
-	/**
-	 * Test addLabel
-	 */
-    final public void testAddLabel() {
-		Label label = new Label("Tutorial", null);
-		Label[] labels = null;
-
-		this.siteTree.addLabel("/foo/bar", label);
-		labels = this.siteTree.getNode("/foo/bar").getLabels();
-		assertEquals(labels.length, 3);
-		label = this.siteTree.getNode("/foo/bar").getLabel("");
-		assertNotNull(label);
-		assertEquals(label.getLabel(), "Tutorial");
-    }
-
-	/**
-	 * Test removeLabel
-	 */
-    final public void testRemoveLabel() {
-		assertEquals(this.siteTree.getNode("/foo/bar").getLabels().length, 2);
-		
-		Label label = new Label("Stab", "de");
-		this.siteTree.removeLabel("/foo/bar", label);
-		assertEquals(this.siteTree.getNode("/foo/bar").getLabels().length, 1);
-		
-		assertEquals(this.siteTree.getNode("/foo/bar").getLabels()[0], new Label("Bar", "en"));
-		
-		this.siteTree.addLabel("/foo/bar", label);
-		assertEquals(this.siteTree.getNode("/foo/bar").getLabels().length, 2);
-    }
-
-	/**
-	 * Test removeNode
-	 * 
-	 * @throws SiteException if an error occurs
-	 */
-    final public void testRemoveNode() throws SiteException {
-    	Label label1 = new Label("Hi", "en");
-    	Label label2 = new Label("Ho", "en");
-    	Label[] labels1 = { label1, label2};
-    	
-    	this.siteTree.addNode("/hi", labels1, null, null, false);
-
-		Label[] labels2 = { label1, label2};
-
-		this.siteTree.addNode("/hi/ho", labels2, null, null, false);
-		
-		assertNotNull(this.siteTree.getNode("/hi/ho"));
-		
-		this.siteTree.removeNode("/hi");
-		
-		assertNull(this.siteTree.getNode("/hi/ho"));
-		assertNull(this.siteTree.getNode("/hi"));
-    }
-
-	/**
-	 * Test getNode
-	 *
-	 */
-    final public void testGetNode() {
-		assertNotNull(this.siteTree.getNode("/foo/bar"));
-		
-		assertNull(this.siteTree.getNode("/foo/baz"));
-    }
-
-	/**
-	 * Test save
-	 *
-	 */
-    final public void testSave() {
-        //TODO Implement save().
-    }
-    
-	/**
-	 * Test moving a node up
-	 * @throws SiteException if an error occurs
-	 */
-	final public void testMoveUp() throws SiteException {
-		this.siteTree.moveUp("/foo/lala");
-		this.siteTree.save();
-		assertNotNull(this.siteTree.getNode("/foo/lala"));
-	}
-	
-	/**
-	 * Test moving a node down
-	 * @throws SiteException if an error occurs
-	 */
-	final public void testMoveDown() throws SiteException {
-		this.siteTree.moveDown("/foo");
-		this.siteTree.save();
-		assertNotNull(this.siteTree.getNode("/foo"));
-	}
-    
-    /**
-     * Test the import of a subtree
-     * @throws SiteException if an error occurs.
-     */
-	final public void testImportSubtree() throws SiteException {
-		DefaultSiteTree newSiteTree = new DefaultSiteTree("importedTree.xml");
-		Label label = new Label("root", "en");
-		Label[] rootLabels = { label };
-		newSiteTree.addNode("/root", rootLabels, null, null, false);
-		label = new Label("foo", "en");
-		Label[] fooLabels = { label };
-		newSiteTree.addNode("/root/foo", fooLabels, null, null, false);
-		label = new Label("subtree", "en");
-		Label[] subtreeLabels = { label };
-		newSiteTree.addNode("/root/subtree", subtreeLabels, "http://exact.biz", "suffix", true);
-		label = new Label("child", "en");
-		Label[] childLabels = { label };
-		newSiteTree.addNode("/root/subtree/child", childLabels, null, null, false);
-		SiteTreeNode node=newSiteTree.getNode("/root/subtree");
-		assertNotNull(node);
-		SiteTreeNode parentNode=this.siteTree.getNode("/foo/lala");
-		assertNotNull(parentNode);
-        this.siteTree.importSubtree(parentNode,node, "subtree", null);
-		this.siteTree.save();
-		assertNotNull(this.siteTree.getNode("/foo/lala/subtree"));
-		assertNotNull(this.siteTree.getNode("/foo/lala/subtree/child"));
-	}
-}
diff --git a/src/test/org/apache/lenya/cms/site/tree/SiteTreeNodeImplTest.java b/src/test/org/apache/lenya/cms/site/tree/SiteTreeNodeImplTest.java
deleted file mode 100644
index 337c2da..0000000
--- a/src/test/org/apache/lenya/cms/site/tree/SiteTreeNodeImplTest.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.site.tree;
-
-import org.apache.lenya.cms.site.Label;
-import org.apache.lenya.cms.site.tree.DefaultSiteTree;
-import org.apache.lenya.cms.site.tree.SiteTreeNode;
-
-import junit.framework.TestCase;
-
-/**
- * Tests the site tree
- */
-public class SiteTreeNodeImplTest extends TestCase {
-
-    private SiteTreeNode node = null;
-
-    /**
-     * Constructor.
-     * @param test The test.
-     */
-    public SiteTreeNodeImplTest(String test) {
-        super(test);
-    }
-
-    /**
-     * The main program.
-     * The parameters are set from the command line arguments.
-     *
-     * @param args The command line arguments.
-     */
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(SiteTreeNodeImplTest.class);
-    }
-
-    /**
-     * @see TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        super.setUp();
-        DefaultSiteTree siteTree = new DefaultSiteTree("testTree");
-        Label label = new Label("Foo", "en");
-        Label[] fooLabels = { label };
-        siteTree.addNode("/foo", fooLabels, null, null, false);
-        label = new Label("Bar", "en");
-        Label label_de = new Label("Stab", "de");
-        Label[] barLabels = { label, label_de };
-        siteTree.addNode(
-            "/foo/bar",
-            barLabels,
-            "http://exact.biz",
-            "suffix",
-            true);
-
-        this.node = siteTree.getNode("/foo/bar");
-    }
-
-    /**
-     * @see TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
-    /**
-     * Test getAbsoluteId
-     * 
-     */
-    final public void testGetAbsoluteId() {
-        assertEquals(this.node.getAbsoluteId(), "/foo/bar");
-    }
-
-    /**
-     * Test getId
-     *
-     */
-    final public void testGetId() {
-        assertEquals(this.node.getId(), "bar");
-    }
-
-    /**
-     * Test getLabels
-     *
-     */
-    final public void testGetLabels() {
-        assertEquals(this.node.getLabels().length, 2);
-        for (int i = 0; i < this.node.getLabels().length; i++) {
-            Label label = this.node.getLabels()[i];
-            Label label1 = new Label("Bar", "en");
-            Label label2 = new Label("Stab", "de");
-            assertTrue(label.equals(label1) || label.equals(label2));
-        }
-    }
-
-    /**
-     * Test getLabel
-     *
-     */
-    final public void testGetLabel() {
-        Label label = this.node.getLabel("en");
-        assertNotNull(label);
-        assertEquals(label.getLabel(), "Bar");
-    }
-
-    /**
-     * Test addLabel 
-     *
-     */
-    final public void testAddLabel() {
-        Label label = new Label("Barolo", "it");
-        this.node.addLabel(label);
-        label = this.node.getLabel("it");
-        assertNotNull(label);
-        assertEquals(label.getLabel(), "Barolo");
-        label = this.node.getLabel("ch");
-        assertNull(label);
-    }
-
-    /**
-     * Test removeLabel
-     *
-     */
-    final public void testRemoveLabel() {
-        Label label = new Label("Bar", "en");
-        assertNotNull(this.node.getLabel("en"));
-        this.node.removeLabel(label);
-        assertNull(this.node.getLabel("en"));
-    }
-
-    /**
-     * Test getHref
-     *
-     */
-    final public void testGetHref() {
-        assertEquals(this.node.getHref(), "http://exact.biz");
-    }
-
-    /**
-     * Test getSuffix
-     * 
-     *
-     */
-    final public void testGetSuffix() {
-        assertEquals(this.node.getSuffix(), "suffix");
-    }
-
-    /**
-     * Test hasLink
-     *
-     */
-    final public void testHasLink() {
-        assertTrue(this.node.hasLink());
-    }
-
-}
diff --git a/src/test/org/apache/lenya/cms/task/AntTaskTest.java b/src/test/org/apache/lenya/cms/task/AntTaskTest.java
deleted file mode 100644
index 2981ac6..0000000
--- a/src/test/org/apache/lenya/cms/task/AntTaskTest.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.task;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.IOException;
-import java.util.GregorianCalendar;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.parameters.ParameterException;
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.lenya.cms.PublicationHelper;
-import org.apache.lenya.cms.publication.Publication;
-import org.xml.sax.SAXException;
-
-
-/**
- * Class for testing AntTasks.
- * Extend this class to test your own AntTask.
- * The target can be passed as a command-line argument.
- * If the argument is omitted, the target is "test".
- * Override {@link #getTarget()} to provide a hard-coded target.
- * Override {@link #evaluateTest()} to add your evaluation code.
- */
-public class AntTaskTest extends TestCase {
-    
-    private static final class LastModifiedFilter implements FileFilter {
-        private final GregorianCalendar beforeExecution;
-
-        private LastModifiedFilter(GregorianCalendar _beforeExecution) {
-            super();
-            this.beforeExecution = _beforeExecution;
-        }
-
-        /**
-         * @see java.io.FileFilter#accept(java.io.File)
-         */
-        public boolean accept(File file) {
-            return file.lastModified() > this.beforeExecution.getTimeInMillis();
-        }
-    }
-
-    private static String target = "test";
-
-    /**
-     * Creates a new AntTaskTest object.
-     * @param test the test
-     */
-    public AntTaskTest(String test) {
-        super(test);
-    }
-
-    /**
-     * The main program for the AntTaskTest class
-     *
-     * @param args The command line arguments
-     */
-    public static void main(String[] args) {
-        initialize(args);
-        TestRunner.run(getSuite());
-    }
-
-    /**
-     * Initializes the parameters. Call this method from your subclass
-     * {@link #main(String[])} method.
-     * @param args The command-line arguments.
-     */
-    public static void initialize(String[] args) {
-        args = PublicationHelper.extractPublicationArguments(args);
-
-        if (args.length > 0) {
-            target = args[0];
-        }
-    }
-
-    /**
-     * Creates a test suite.
-     * @return the test suite
-     */
-    public static Test getSuite() {
-        return new TestSuite(AntTaskTest.class);
-    }
-
-    /**
-     * Tests the AntTask class.
-     * Template method, please override {@link #evaluateTest()} and {@link #getTarget()} and {@link #prepareTest()}.
-     * @throws Exception if an error occurs
-     */
-    public final void testAntTask() throws Exception {
-        prepareTest();
-        doTest(getTarget());
-        evaluateTest();
-    }
-
-    /**
-     * Returns the target to test.
-     * @return The target.
-     */
-    protected String getTarget() {
-        return target;
-    }
-
-    /**
-     * Tests an AntTask.
-     * @param _target the target of the task to test.
-     * @throws ExecutionException if an error occurs
-     * @throws IOException if an error occurs
-     * @throws ParameterException if an error occurs
-     * @throws SAXException if an error occurs
-     * @throws ConfigurationException if an error occurs
-     */
-    protected void doTest(String _target) throws ExecutionException, ParameterException, ConfigurationException, SAXException, IOException {
-        System.out.println("Testing target [" + _target + "]:");
-
-        Publication publication = PublicationHelper.getPublication();
-
-        TaskManager manager = new TaskManager(publication.getDirectory().getCanonicalPath());
-        AntTask task = (AntTask) manager.getTask(TaskManager.ANT_TASK);
-
-        Parameters parameters = getTaskParameters();
-        parameters.setParameter(Task.PARAMETER_PUBLICATION_ID, publication.getId());
-        parameters.setParameter(Task.PARAMETER_CONTEXT_PREFIX, "/");
-        parameters.setParameter(Task.PARAMETER_SERVLET_CONTEXT,
-            publication.getServletContext().getCanonicalPath());
-        parameters.setParameter(AntTask.TARGET, getTarget());
-        task.parameterize(parameters);
-
-        final GregorianCalendar beforeExecution = new GregorianCalendar();
-
-        task.execute(publication.getServletContext().getCanonicalPath());
-
-        File logDirectory = new File(publication.getDirectory(), AntTask.LOG_PATH);
-        File[] logFiles = logDirectory.listFiles(new LastModifiedFilter(beforeExecution));
-
-        assertTrue(logFiles.length == 1);
-
-        File logFile = logFiles[0];
-    }
-
-    /**
-     * Returns the task parameters.
-     * You don't need to specify the publication-id.
-     * @return The task parameters.
-     */
-    protected Parameters getTaskParameters() {
-        return new Parameters();
-    }
-
-    /**
-     * Override this method to prepare your test.
-    * @throws Exception if an error occurs
-     */
-    protected void prepareTest() throws Exception {
-        System.out.println("prepare");
-    }
-
-    /**
-     * Override this method to add your test evaluation code.
-     * @throws Exception if an error occurs
-     */
-    protected void evaluateTest() throws Exception {
-        System.out.println("evaluate");
-    }
-
-    /** (non-Javadoc)
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception {
-        if (PublicationHelper.getPublication() == null) {
-            String[] args = {
-                "/home/egli/build/jakarta-tomcat-4.1.21-LE-jdk14/webapps/lenya", "test"
-            };
-            PublicationHelper.extractPublicationArguments(args);
-        }
-    }
-}
diff --git a/src/test/org/apache/lenya/cms/task/DocumentCopyTaskTest.java b/src/test/org/apache/lenya/cms/task/DocumentCopyTaskTest.java
deleted file mode 100644
index 54e0acd..0000000
--- a/src/test/org/apache/lenya/cms/task/DocumentCopyTaskTest.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.task;
-
-import java.io.File;
-import java.util.StringTokenizer;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.lenya.cms.PublicationHelper;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.site.tree.SiteTree;
-import org.apache.lenya.cms.site.tree.SiteTreeNode;
-import org.apache.lenya.cms.site.tree.TreeSiteManager;
-
-/**
- * Class for testing the task to copy a document.
- */
-public class DocumentCopyTaskTest extends AntTaskTest {
-
-    /**
-     * Creates a new DocumentCopyTaskTest object.
-     * @param test the test
-     */
-    public DocumentCopyTaskTest(String test) {
-        super(test);
-    }
-
-    /**
-     * Creates a test suite.
-     * @return Test
-     */
-    public static Test getSuite() {
-        return new TestSuite(DocumentCopyTaskTest.class);
-    }
-
-    /**
-     * The main program for the DocumentCopyTaskTest class
-     * 
-     * @param args The command line arguments
-     */
-    public static void main(String[] args) {
-        AntTaskTest.initialize(args);
-        TestRunner.run(getSuite());
-    }
-
-    private static final String FIRST_DOCUMENT_ID = "/tutorial";
-    private static final String SEC_DOCUMENT_ID = "/features";
-    private static final String AUTHORING_PATH = "content/authoring"
-            .replace('/', File.separatorChar);
-
-    /**
-     * @see org.apache.lenya.cms.task.AntTaskTest#getTaskParameters()
-     */
-    protected Parameters getTaskParameters() {
-        Parameters parameters = super.getTaskParameters();
-        parameters.setParameter("properties.node.firstdocumentid", FIRST_DOCUMENT_ID);
-        parameters.setParameter("properties.node.secdocumentid", SEC_DOCUMENT_ID);
-        return parameters;
-    }
-
-    /**
-     * Returns the target test.
-     * @return target.
-     */
-    protected String getTarget() {
-        return "copyDocument";
-    }
-
-    /**
-     * prepare the test
-     * 
-     * @throws Exception if an error occurs
-     */
-    protected void prepareTest() throws Exception {
-
-        // TODO generate the resources
-    }
-
-    /**
-     * evaluate the test
-     * 
-     * @throws Exception if an error occurs
-     */
-    protected void evaluateTest() throws Exception {
-        File publicationDirectory = PublicationHelper.getPublication().getDirectory();
-        String publicationPath = publicationDirectory.getAbsolutePath();
-        File authoringDirectory = new File(publicationPath, AUTHORING_PATH);
-
-        StringTokenizer st = new StringTokenizer(FIRST_DOCUMENT_ID, "/", true);
-        int l = st.countTokens();
-        for (int i = 1; i < l; i++) {
-            st.nextToken();
-        }
-        String secdocumentid = SEC_DOCUMENT_ID + "/" + st.nextToken();
-
-        String filepath = secdocumentid + File.separator + "index.xml";
-
-        File documentFile = new File(authoringDirectory, filepath);
-        assertTrue(documentFile.exists());
-        System.out.println("Document was copied: " + documentFile.getAbsolutePath());
-
-        Publication pub = PublicationHelper.getPublication();
-        DocumentIdentityMap map = new DocumentIdentityMap(pub);
-        TreeSiteManager manager = (TreeSiteManager) pub.getSiteManager(map);
-
-        SiteTree sitetree = manager.getTree(Publication.AUTHORING_AREA);
-        SiteTreeNode node = sitetree.getNode(secdocumentid);
-        assertNotNull(node);
-        System.out.println("Sitetree node with id " + node.getId()
-                + " was created as child of node with id: " + node.getParent().getAbsoluteId());
-    }
-}
\ No newline at end of file
diff --git a/src/test/org/apache/lenya/cms/task/DocumentDeactivateTaskTest.java b/src/test/org/apache/lenya/cms/task/DocumentDeactivateTaskTest.java
deleted file mode 100644
index a8e180a..0000000
--- a/src/test/org/apache/lenya/cms/task/DocumentDeactivateTaskTest.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.task;
-
-import java.io.File;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.lenya.cms.PublicationHelper;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.site.tree.SiteTree;
-import org.apache.lenya.cms.site.tree.SiteTreeNode;
-import org.apache.lenya.cms.site.tree.TreeSiteManager;
-
-/**
- * Class for testing the task to deactivate a document. Extend the AntTask class.
- */
-public class DocumentDeactivateTaskTest extends AntTaskTest {
-
-    /**
-     * Creates a new DocumentDeactivateTaskTest object.
-     * @param test The test.
-     */
-    public DocumentDeactivateTaskTest(String test) {
-        super(test);
-    }
-
-    /**
-     * Creates a test suite.
-     * @return Test
-     */
-    public static Test getSuite() {
-        return new TestSuite(DocumentDeactivateTaskTest.class);
-    }
-
-    /**
-     * The main program for the DocumentDeactivateTaskTest class
-     * @param args The command line arguments
-     */
-    public static void main(String[] args) {
-        AntTaskTest.initialize(args);
-        TestRunner.run(getSuite());
-    }
-
-    /**
-     * <code>DOCUMENT_ID</code> The document id
-     */
-    public static final String DOCUMENT_ID = "/tutorial";
-    /**
-     * <code>LANGUAGE</code> The language
-     */
-    public static final String LANGUAGE = "en";
-    /**
-     * <code>AUTHORING_PATH</code> The authoring path
-     */
-    public static final String AUTHORING_PATH = "content/authoring"
-            .replace('/', File.separatorChar);
-    /**
-     * <code>LIVE_PATH</code> The live path
-     */
-    public static final String LIVE_PATH = "content/live".replace('/', File.separatorChar);
-
-    /**
-     * @see org.apache.lenya.cms.task.AntTaskTest#getTaskParameters()
-     */
-    protected Parameters getTaskParameters() {
-        Parameters parameters = super.getTaskParameters();
-        parameters.setParameter("properties.node.firstdocumentid", DOCUMENT_ID);
-        parameters.setParameter("properties.node.language", LANGUAGE);
-        return parameters;
-    }
-
-    /**
-     * Returns the target test.
-     * @return target.
-     */
-    protected String getTarget() {
-        return "deactivateDocument";
-    }
-
-    /**
-     * @see org.apache.lenya.cms.task.AntTaskTest#prepareTest()
-     */
-    protected void prepareTest() throws Exception {
-        // TODO generate the resources
-    }
-
-    /**
-     * @see org.apache.lenya.cms.task.AntTaskTest#evaluateTest()
-     */
-    protected void evaluateTest() throws Exception {
-        File publicationDirectory = PublicationHelper.getPublication().getDirectory();
-        String publicationPath = publicationDirectory.getAbsolutePath();
-        File authoringDirectory = new File(publicationPath, AUTHORING_PATH);
-        File liveDirectory = new File(publicationPath, LIVE_PATH);
-
-        String filepath = DOCUMENT_ID.substring(1) + File.separator + "index_en.xml";
-
-        File authoringDocumentFile = new File(authoringDirectory, filepath);
-        System.out.println("Authoring document: " + authoringDocumentFile.getAbsolutePath());
-        assertTrue(authoringDocumentFile.exists());
-        File liveDocumentFile = new File(liveDirectory, filepath);
-        System.out.println("Live document: " + liveDocumentFile.getAbsolutePath());
-        assertFalse(liveDocumentFile.exists());
-
-        //TODO evaluation of resources, meta, workflow
-
-        Publication pub = PublicationHelper.getPublication();
-        DocumentIdentityMap map = new DocumentIdentityMap(pub);
-        TreeSiteManager manager = (TreeSiteManager) pub.getSiteManager(map);
-        SiteTree authoringSitetree = manager.getTree(Publication.AUTHORING_AREA);
-        SiteTreeNode node = authoringSitetree.getNode(DOCUMENT_ID);
-        assertNotNull(node);
-        System.out.println("Sitetree node with id [" + node.getId() + "] is always in authoring");
-        SiteTree liveSitetree = manager.getTree(Publication.LIVE_AREA);
-        SiteTreeNode livenode = liveSitetree.getNode(DOCUMENT_ID);
-        assertNull(livenode);
-        System.out.println("Sitetree node for document id [" + DOCUMENT_ID
-                + "] was deleted from the live tree");
-    }
-}
\ No newline at end of file
diff --git a/src/test/org/apache/lenya/cms/task/DocumentMoveTaskTest.java b/src/test/org/apache/lenya/cms/task/DocumentMoveTaskTest.java
deleted file mode 100644
index 9194758..0000000
--- a/src/test/org/apache/lenya/cms/task/DocumentMoveTaskTest.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.task;
-
-import java.io.File;
-import java.util.StringTokenizer;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.lenya.cms.PublicationHelper;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.rc.RevisionController;
-import org.apache.lenya.cms.site.tree.SiteTree;
-import org.apache.lenya.cms.site.tree.SiteTreeNode;
-import org.apache.lenya.cms.site.tree.TreeSiteManager;
-
-/**
- * Class for testing the task to copy a document. Extend the AntTask class.
- */
-public class DocumentMoveTaskTest extends AntTaskTest {
-
-    /**
-     * <code>FIRST_DOCUMENT_ID</code> The first document id
-     */
-    public static final String FIRST_DOCUMENT_ID = "/concepts";
-    /**
-     * <code>SEC_DOCUMENT_ID</code> The second document id
-     */
-    public static final String SEC_DOCUMENT_ID = "/features";
-    /**
-     * <code>AUTHORING_PATH</code> The authoring path
-     */
-    public static final String AUTHORING_PATH = "content/authoring"
-            .replace('/', File.separatorChar);
-    /**
-     * <code>AUTHORING_RESOURCE</code> The authoring resource path
-     */
-    public static final String AUTHORING_RESOURCE = "resources/authoring";
-    /**
-     * <code>RCML_DIR</code> The RCML path
-     */
-    public static final String RCML_DIR = "content/rcml";
-    /**
-     * <code>RCBAK_DIR</code> The RCBAK path
-     */
-    public static final String RCBAK_DIR = "content/rcbak";
-
-    private long time = 0;
-
-    /**
-     * Creates a new DocumentMoveTaskTest object.
-     * @param test the test
-     */
-    public DocumentMoveTaskTest(String test) {
-        super(test);
-    }
-
-    /**
-     * Creates a test suite.
-     * @return Test
-     */
-    public static Test getSuite() {
-        return new TestSuite(DocumentMoveTaskTest.class);
-    }
-
-    /**
-     * The main program for the DocumentMoveTaskTest class
-     * 
-     * @param args The command line arguments
-     */
-    public static void main(String[] args) {
-        AntTaskTest.initialize(args);
-        TestRunner.run(getSuite());
-    }
-
-    /**
-     * @see org.apache.lenya.cms.task.AntTaskTest#getTaskParameters()
-     */
-    protected Parameters getTaskParameters() {
-        Parameters parameters = super.getTaskParameters();
-        parameters.setParameter("properties.node.firstdocumentid", FIRST_DOCUMENT_ID);
-        parameters.setParameter("properties.node.secdocumentid", SEC_DOCUMENT_ID);
-        return parameters;
-    }
-
-    /**
-     * Returns the target test.
-     * @return target.
-     */
-    protected String getTarget() {
-        return "moveDocument";
-    }
-
-    /**
-     * prepare the test
-     * 
-     * @throws Exception if an error occurs
-     */
-    protected void prepareTest() throws Exception {
-        File publicationDirectory = PublicationHelper.getPublication().getDirectory();
-        String publicationPath = publicationDirectory.getAbsolutePath() + File.separator;
-        // generate the rcml and rcbak files
-        File rcmlDirectory = new File(publicationPath, RCML_DIR);
-        File rcbakDirectory = new File(publicationPath, RCBAK_DIR);
-        RevisionController rc = new RevisionController(rcmlDirectory.getAbsolutePath(),
-                rcbakDirectory.getAbsolutePath(), publicationPath);
-        String filename = AUTHORING_PATH + FIRST_DOCUMENT_ID + File.separator + "index.xml";
-        rc.reservedCheckOut(filename, "lenya");
-        this.time = rc.reservedCheckIn(filename, "lenya", true);
-    }
-
-    /**
-     * evaluate the test
-     * 
-     * @throws Exception if an error occurs
-     */
-    protected void evaluateTest() throws Exception {
-        File publicationDirectory = PublicationHelper.getPublication().getDirectory();
-        String publicationPath = publicationDirectory.getAbsolutePath();
-        File authoringDirectory = new File(publicationPath, AUTHORING_PATH);
-
-        StringTokenizer st = new StringTokenizer(FIRST_DOCUMENT_ID, "/", true);
-        int l = st.countTokens();
-        for (int i = 1; i < l; i++) {
-            st.nextToken();
-        }
-        String secdocumentid = SEC_DOCUMENT_ID + "/" + st.nextToken();
-        String filepath = secdocumentid + File.separator + "index.xml";
-
-        File documentFile = new File(authoringDirectory, filepath);
-        assertTrue(documentFile.exists());
-        System.out.println("Document was copied: " + documentFile.getAbsolutePath());
-        String firstfilepath = FIRST_DOCUMENT_ID + File.separator + "index.xml";
-        File firstdocumentFile = new File(authoringDirectory, firstfilepath);
-        assertFalse(firstdocumentFile.exists());
-        System.out.println("Document was deleted: " + firstdocumentFile.getAbsolutePath());
-
-        File rcmlDirectory = new File(publicationPath, RCML_DIR);
-        String rcmlFilePath = filepath + ".rcml";
-        File rcmlFile = new File(rcmlDirectory, AUTHORING_PATH + rcmlFilePath);
-        assertTrue(rcmlFile.exists());
-        System.out.println("rcml file was copied: " + rcmlFile.getAbsolutePath());
-
-        String firstRcmlFilePath = firstfilepath + ".rcml";
-        File firstRcmlFile = new File(rcmlDirectory, AUTHORING_PATH + firstRcmlFilePath);
-        assertFalse(firstRcmlFile.exists());
-        System.out.println("rcml file was deleted: " + firstRcmlFile.getAbsolutePath());
-
-        File rcbakDirectory = new File(publicationPath, RCBAK_DIR);
-        String rcbakFilePath = filepath + ".bak." + this.time;
-        File rcbakFile = new File(rcbakDirectory, AUTHORING_PATH + rcbakFilePath);
-        assertTrue(rcbakFile.exists());
-        System.out.println("Backup was copied: " + rcbakFile.getAbsolutePath());
-
-        String firstRcbakFilePath = firstfilepath + ".bak." + this.time;
-        File firstRcbakFile = new File(rcbakDirectory, AUTHORING_PATH + firstRcbakFilePath);
-        assertFalse(firstRcbakFile.exists());
-        System.out.println("Backup was deleted: " + firstRcbakFile.getAbsolutePath());
-
-        //TODO evaluation of meta, workflow
-
-        Publication pub = PublicationHelper.getPublication();
-        DocumentIdentityMap map = new DocumentIdentityMap(pub);
-        TreeSiteManager manager = (TreeSiteManager) pub.getSiteManager(map);
-        SiteTree sitetree = manager.getTree(Publication.AUTHORING_AREA);
-        SiteTreeNode node = sitetree.getNode(secdocumentid);
-        assertNotNull(node);
-        System.out.println("Sitetree node with id " + node.getId()
-                + " was created as child of node with id: " + node.getParent().getAbsoluteId());
-        SiteTreeNode firstnode = sitetree.getNode(FIRST_DOCUMENT_ID);
-        assertNull(firstnode);
-        System.out.println("Sitetree node for document id " + FIRST_DOCUMENT_ID + " was deleted");
-    }
-}
\ No newline at end of file
diff --git a/src/test/org/apache/lenya/cms/task/DocumentRenameTaskTest.java b/src/test/org/apache/lenya/cms/task/DocumentRenameTaskTest.java
deleted file mode 100644
index b13573d..0000000
--- a/src/test/org/apache/lenya/cms/task/DocumentRenameTaskTest.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.task;
-
-import java.io.File;
-import java.util.StringTokenizer;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.lenya.cms.PublicationHelper;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.rc.RevisionController;
-import org.apache.lenya.cms.site.tree.SiteTree;
-import org.apache.lenya.cms.site.tree.SiteTreeNode;
-import org.apache.lenya.cms.site.tree.TreeSiteManager;
-
-
-/**
- * Class for testing the task to rename a document.
- */
-public class DocumentRenameTaskTest extends AntTaskTest {
-	private long time = 0;
-
-	/**
-     * Creates a new DocumentRenameTaskTest object.
-	 * @param test the test
-	 */
-	public DocumentRenameTaskTest(String test) {
-		super(test);
-	}
-
-	/** 
-	 * Creates a test suite.
-	 * @return Test 
-	 **/
-	public static Test getSuite() {
-		return new TestSuite(DocumentRenameTaskTest.class);
-	}
-
-	/**
-	 * The main program for the DocumentRenameTaskTest class
-	 *
-	 * @param args The command line arguments
-	 */
-	public static void main(String[] args) {
-		AntTaskTest.initialize(args);
-		TestRunner.run(getSuite());
-	}
-
-	/**
-	 * <code>FIRST_DOCUMENT_ID</code> The first document id
-	 */
-	public static final String FIRST_DOCUMENT_ID = "/doctypes/simple-document";
-	/**
-	 * <code>SEC_DOCUMENT_ID</code> The second document id
-	 */
-	public static final String SEC_DOCUMENT_ID = "newname";
-	/**
-	 * <code>FIRST_AREA</code> The first area
-	 */
-	public static final String FIRST_AREA = "authoring";
-	/**
-	 * <code>SEC_AREA</code> The second area
-	 */
-	public static final String SEC_AREA = "authoring";
-	/**
-	 * <code>AUTHORING_PATH</code> The authoring path
-	 */
-	public static final String AUTHORING_PATH = "content/authoring".replace('/', File.separatorChar);
-	/**
-	 * <code>AUTHORING_RESOURCE</code> The authoring resources path
-	 */
-	public static final String AUTHORING_RESOURCE = "resources/authoring";
-	/**
-	 * <code>RCML_DIR</code> The RCML path
-	 */
-	public static final String RCML_DIR = "content/rcml";
-	/**
-	 * <code>RCBAK_DIR</code> The RCBAK path
-	 */
-	public static final String RCBAK_DIR = "content/rcbak";
-	
-	/**
-	 * @see org.apache.lenya.cms.task.AntTaskTest#getTaskParameters()
-	 **/
-	protected Parameters getTaskParameters() {
-		Parameters parameters = super.getTaskParameters();
-		parameters.setParameter("properties.node.firstdocumentid", FIRST_DOCUMENT_ID);
-		parameters.setParameter("properties.node.secdocumentid", SEC_DOCUMENT_ID);
-		parameters.setParameter("properties.firstarea", FIRST_AREA);
-		parameters.setParameter("properties.secarea", SEC_AREA);
-		return parameters;
-	}
-    
-	/**
-	 * Returns the target test.
-	 * @return target.
-	 */
-	protected String getTarget() {
-		return "renameDocument";
-	}
-
-	/**
-	 * prepare the test
-     * 
-     * @throws Exception if an error occurs
-	 */
-	protected void prepareTest() throws Exception {
-		File publicationDirectory = PublicationHelper.getPublication().getDirectory();
-        String publicationPath = publicationDirectory.getAbsolutePath()+ File.separator; 
-		String filename = AUTHORING_PATH +FIRST_DOCUMENT_ID + File.separator + "index_de.xml";
-		
-		// generate the rcml and rcbak files
-		File rcmlDirectory = new File(publicationPath , RCML_DIR);
-		File rcbakDirectory = new File(publicationPath , RCBAK_DIR);
-		RevisionController rc = new RevisionController(rcmlDirectory.getAbsolutePath(), rcbakDirectory.getAbsolutePath(), publicationPath);
-		rc.reservedCheckOut(filename, "lenya");   
-		this.time = rc.reservedCheckIn(filename, "lenya", true);   
-
-		// TODO generate the workflow, meta  
-	}
-
-	/**
-	 * evaluate the test
-     * 
-     * @throws Exception if an error occurs
-	 */
-	protected void evaluateTest() throws Exception {
-		File publicationDirectory = PublicationHelper.getPublication().getDirectory();
-		String publicationPath = publicationDirectory.getAbsolutePath(); 
-        File authoringDirectory = new File(publicationPath, AUTHORING_PATH);
-        
-		StringTokenizer st = new StringTokenizer(FIRST_DOCUMENT_ID , "/");
-		int l = st.countTokens();
-        String secdocumentid = "";
-		for (int i=1; i<l; i++) {
-		  secdocumentid= secdocumentid + "/" + st.nextToken();
-		}
-		secdocumentid = secdocumentid + "/" + SEC_DOCUMENT_ID;      
-		System.out.println("the second document id" + secdocumentid);
-
-		String filepath = secdocumentid + File.separator + "index_de.xml";  
-		String en_filepath = secdocumentid + File.separator + "index_en.xml";  
-		String firstfilepath = FIRST_DOCUMENT_ID + File.separator + "index_de.xml";  
-		String firsten_filepath = FIRST_DOCUMENT_ID + File.separator + "index_en.xml";  
-
-        //evaluate the file
-		File documentFile = new File(authoringDirectory, filepath);
-		assertTrue(documentFile.exists());
-		System.out.println("Document was copied: " + documentFile.getAbsolutePath());
-		File en_documentFile = new File(authoringDirectory, en_filepath);
-		assertTrue(en_documentFile.exists());
-		System.out.println("Document was copied: " + en_documentFile.getAbsolutePath());
-		File firstdocumentFile = new File(authoringDirectory, firstfilepath);
-		assertFalse(firstdocumentFile.exists());
-		System.out.println("Document was deleted: " + firstdocumentFile.getAbsolutePath());
-		File firsten_documentFile = new File(authoringDirectory, firsten_filepath);
-		assertFalse(firsten_documentFile.exists());
-		System.out.println("Document was deleted: " + firsten_documentFile.getAbsolutePath());
-
-        //evaluate the rcml 
-		File rcmlDirectory = new File(publicationPath , RCML_DIR);
-		String rcmlFilePath = filepath+".rcml";
-		File rcmlFile = new File(rcmlDirectory , AUTHORING_PATH + rcmlFilePath);
-		assertTrue(rcmlFile.exists());
-		System.out.println("rcml file was copied: " + rcmlFile.getAbsolutePath());
-
-		String firstRcmlFilePath = firstfilepath+".rcml";
-		File firstRcmlFile = new File(rcmlDirectory , AUTHORING_PATH + firstRcmlFilePath);
-		assertFalse(firstRcmlFile.exists());
-		System.out.println("rcml file was deleted: " + firstRcmlFile.getAbsolutePath());
-
-        //evaluate the backup
-		File rcbakDirectory = new File(publicationPath , RCBAK_DIR);
-		String rcbakFilePath= filepath +".bak." +this.time ;
-		File rcbakFile = new File(rcbakDirectory, AUTHORING_PATH + rcbakFilePath);
-		assertTrue(rcbakFile.exists());
-		System.out.println("Backup was copied: " + rcbakFile.getAbsolutePath());
-
-		String firstRcbakFilePath= firstfilepath +".bak." +this.time ;
-		File firstRcbakFile = new File(rcbakDirectory, AUTHORING_PATH + firstRcbakFilePath);
-		assertFalse(firstRcbakFile.exists());
-		System.out.println("Backup was deleted: " + firstRcbakFile.getAbsolutePath());
-
-		//TODO evaluation of meta, workflow
-        
-        //evaluate the node
-        Publication pub = PublicationHelper.getPublication();
-        DocumentIdentityMap map = new DocumentIdentityMap(pub);
-        TreeSiteManager manager = (TreeSiteManager) pub.getSiteManager(map);
-		SiteTree sitetree = manager.getTree(Publication.AUTHORING_AREA);
-		SiteTreeNode node = sitetree.getNode(secdocumentid);
-		assertNotNull(node);
-        System.out.println(
-            "Sitetree node with id "
-                + node.getId()
-                + " was created as child of node with id: "
-                + node.getParent().getAbsoluteId());
-		SiteTreeNode firstnode = sitetree.getNode(FIRST_DOCUMENT_ID);
-		assertNull(firstnode);
-		System.out.println("Sitetree node for document id "+FIRST_DOCUMENT_ID+" was deleted");
-
-    }
-}
diff --git a/src/test/org/apache/lenya/cms/task/PublisherTest.java b/src/test/org/apache/lenya/cms/task/PublisherTest.java
deleted file mode 100644
index f9abfee..0000000
--- a/src/test/org/apache/lenya/cms/task/PublisherTest.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.task;
-
-import java.io.File;
-import java.io.IOException;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
-import org.apache.avalon.framework.parameters.Parameters;
-import org.apache.lenya.cms.PublicationHelper;
-import org.apache.lenya.cms.publication.DocumentIdToPathMapper;
-import org.apache.lenya.cms.publication.Publication;
-
-
-/**
- * Publisher test
- */
-public class PublisherTest extends AntTaskTest {
-
-    /**
-     * Create a test.
-     * @param test the test
-     */
-    public PublisherTest(String test) {
-        super(test);
-    }
-
-    /**
-     * Creates a test suite.
-     * @return a test
-     */
-    public static Test getSuite() {
-        return new TestSuite(PublisherTest.class);
-    }
-
-    /**
-     * The main program for the PublisherTest class
-     * @param args The command line arguments
-     */
-    public static void main(String[] args) {
-        AntTaskTest.initialize(args);
-        TestRunner.run(getSuite());
-    }
-
-    /**
-     * <code>DOCUMENT_ID</code> The document id
-     */
-    public static final String DOCUMENT_ID = "/tutorial";
-    /**
-     * <code>DOCUMENT_LANGUAGE</code> The document language
-     */
-    public static final String DOCUMENT_LANGUAGE = "en";
-
-	/**
-	 * @see org.apache.lenya.cms.task.AntTaskTest#evaluateTest()
-	 */
-    protected void evaluateTest() throws IOException {
-        Publication pub = PublicationHelper.getPublication();
-        DocumentIdToPathMapper mapper = pub.getPathMapper();
-        File publishedFile = mapper.getFile(pub, Publication.LIVE_AREA, DOCUMENT_ID, DOCUMENT_LANGUAGE);
-        System.out.println("Path of file to publish: " + publishedFile);
-        assertTrue(publishedFile.exists());
-        System.out.println("Published file exists: " + publishedFile.getCanonicalPath());
-    }
-
-	/**
-	 * @see org.apache.lenya.cms.task.AntTaskTest#getTaskParameters()
-	 */
-    protected Parameters getTaskParameters() {
-        Parameters parameters = super.getTaskParameters();
-        parameters.setParameter("properties.publish.documentid", DOCUMENT_ID);
-        parameters.setParameter("properties.publish.language", DOCUMENT_LANGUAGE);
-        Publication pub = PublicationHelper.getPublication();
-        DocumentIdToPathMapper mapper = pub.getPathMapper();
-        parameters.setParameter("properties.publish.sources", mapper.getPath(DOCUMENT_ID, DOCUMENT_LANGUAGE));
-
-        return parameters;
-    }
-
-	/**
-	 * @see org.apache.lenya.cms.task.AntTaskTest#getTarget()
-	 */
-    protected String getTarget() {
-        return "publish";
-    }
-}
diff --git a/src/test/org/apache/lenya/cms/task/tasks.xml b/src/test/org/apache/lenya/cms/task/tasks.xml
deleted file mode 100644
index 1a066a1..0000000
--- a/src/test/org/apache/lenya/cms/task/tasks.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!--
-    Document   : tasks.xml
-    Created on : 3. April 2003, 18:29
-    Author     : andreas
-    Description:
-        Purpose of the document follows.
--->
-
-<project name="Ant Test Project" default="test" basedir=".">
-
-<property name="text" value="Hello World!"/>
-
-<property name="pub.dir" value=""/>
-
-<!-- publishing properties -->
-<property name="authoring.dir" value="content/authoring"/>
-<property name="authoring.tree" value="tree.xml"/>
-<property name="live.dir" value="content/live"/>
-<property name="replication.dir" value="content/replication/pending"/>
-<property name="export.dir" value="resources/export/pending"/>
-<property name="export.regexp" value="s/\/lenya\/default//g"/>
-<property name="publish.sources" value=""/>
-
-<target name="test">
-  <echo>This is a test of the AntTask: ${text}</echo>
-</target>
-
-<target name="publish">
-  <echo>Publish: Copying files from ${authoring.dir} to ${live.dir}</echo>
-  <copy todir="${pub.dir}/${live.dir}">
-    <fileset dir="${pub.dir}/${authoring.dir}">
-      <include name="${publish.sources}"/>
-      <include name="${authoring.tree}"/>
-    </fileset>
-  </copy>
-</target>
-
-</project>
\ No newline at end of file
diff --git a/src/test/org/apache/lenya/cms/task/test-tasks.xconf b/src/test/org/apache/lenya/cms/task/test-tasks.xconf
deleted file mode 100644
index 72c5566..0000000
--- a/src/test/org/apache/lenya/cms/task/test-tasks.xconf
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<tasks>
-
-  <task id="ant-test" class="org.apache.lenya.cms.task.AntTask">
-    <parameter name="publication-id" value=""/>
-    <parameter name="servlet-context" value="."/>
-    <parameter name="logfile" value="ant-test-log.xml"/>
-    <parameter name="properties.text" value="The AntTask works!"/>
-  </task>
-  
-</tasks>
diff --git a/src/test/org/apache/lenya/cms/workflow/WorkflowTest.java b/src/test/org/apache/lenya/cms/workflow/WorkflowTest.java
deleted file mode 100644
index 1098297..0000000
--- a/src/test/org/apache/lenya/cms/workflow/WorkflowTest.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.workflow;
-
-import java.io.File;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
-import org.apache.lenya.ac.Identity;
-import org.apache.lenya.ac.Policy;
-import org.apache.lenya.ac.Role;
-import org.apache.lenya.ac.User;
-import org.apache.lenya.ac.impl.AccessControlTest;
-import org.apache.lenya.cms.PublicationHelper;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.workflow.Situation;
-import org.apache.lenya.workflow.WorkflowInstance;
-
-/**
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class WorkflowTest extends AccessControlTest {
-    /**
-     * Constructor.
-     * @param test The test to execute.
-     */
-    public WorkflowTest(String test) {
-        super(test);
-    }
-
-    /**
-     * The main program for the WorkflowTest class
-     * 
-     * @param args The command line arguments
-     */
-    public static void main(String[] args) {
-        args = PublicationHelper.extractPublicationArguments(args);
-        TestRunner.run(getSuite());
-    }
-
-    /**
-     * Returns the test suite.
-     * @return A test suite.
-     */
-    public static Test getSuite() {
-        return new TestSuite(WorkflowTest.class);
-    }
-
-    private static final String variableName = "is-live";
-    protected static final String URL = "/authoring/index.html";
-
-    /**
-     * Tests the workflow.
-     * @throws Exception when something went wrong.
-     */
-    public void testWorkflow() throws Exception {
-        Publication publication = PublicationHelper.getPublication();
-        String url = "/" + publication.getId() + URL;
-        DocumentIdentityMap map = new DocumentIdentityMap(publication);
-        Document document = map.getFactory().getFromURL(url);
-
-        File configDir = new File(publication.getDirectory(), "config" + File.separator + "ac"
-                + File.separator + "passwd");
-        assertTrue(configDir.exists());
-
-        Policy policy = getPolicyManager().getPolicy(getAccreditableManager(), url);
-        
-        WorkflowResolver resolver = null;
-        try {
-            resolver = (WorkflowResolver) getManager().lookup(WorkflowResolver.ROLE);
-
-
-            String[] emptyRoles = {};
-            Situation situation = new CMSSituation(emptyRoles, "test", "127.0.0.1");
-
-            WorkflowInstance instance = resolver.getWorkflowInstance(document);
-            instance.getHistory().initialize(situation);
-
-            for (int situationIndex = 0; situationIndex < situations.length; situationIndex++) {
-                assertNotNull(instance);
-
-                System.out.println("Current state: " + instance.getCurrentState());
-
-                Identity identity = new Identity();
-                User user = getAccreditableManager().getUserManager().getUser(
-                        situations[situationIndex].getUser());
-                identity.addIdentifiable(user);
-
-                Role[] roles = policy.getRoles(identity);
-                System.out.print("Roles:");
-
-                for (int roleIndex = 0; roleIndex < roles.length; roleIndex++) {
-                    System.out.print(" " + roles[roleIndex]);
-                }
-
-                System.out.println();
-                
-                String[] roleIds = new String[roles.length];
-                for (int i = 0; i < roles.length; i++) {
-                    roleIds[i] = roles[i].getId();
-                }
-
-                situation = new CMSSituation(roleIds, identity.getUser().getId(), "");
-
-                String[] events = instance.getExecutableEvents(situation);
-
-                String event = null;
-                System.out.print("Events:");
-
-                for (int eventIndex = 0; eventIndex < events.length; eventIndex++) {
-                    System.out.print(" " + events[eventIndex]);
-
-                    if (events[eventIndex].equals(situations[situationIndex].getEvent())) {
-                        event = events[eventIndex];
-                    }
-                }
-
-                assertNotNull(event);
-                System.out.println();
-
-                System.out.println("Executing event: " + event);
-                instance.invoke(situation, event);
-
-                assertTrue(instance.getValue(variableName) == situations[situationIndex].getValue());
-
-                System.out.println("Variable: " + variableName + " = "
-                        + instance.getValue(variableName));
-                System.out.println("------------------------------------------------------");
-            }
-        }
-        finally {
-//            this.manager.release(resolver);
-        }
-
-
-        System.out.println("Test completed.");
-    }
-
-    private static final TestSituation[] situations = {
-            new TestSituation("lenya", "submit", false),
-            new TestSituation("roger", "reject", false),
-            new TestSituation("lenya", "submit", false),
-            new TestSituation("roger", "publish", true),
-            new TestSituation("roger", "deactivate", false) };
-
-    /**
-     * A test situation.
-     */
-    public static class TestSituation {
-        private String user;
-        private String event;
-        private boolean value;
-
-        /**
-         * Creates a new test situation.
-         * @param _user The user.
-         * @param _event The event.
-         * @param _value The variable value.
-         */
-        public TestSituation(String _user, String _event, boolean _value) {
-            this.user = _user;
-            this.event = _event;
-            this.value = _value;
-        }
-
-        /**
-         * Returns the event.
-         * @return An event.
-         */
-        public String getEvent() {
-            return this.event;
-        }
-
-        /**
-         * Returns the user.
-         * @return A string.
-         */
-        public String getUser() {
-            return this.user;
-        }
-
-        /**
-         * Returns the value.
-         * @return A value.
-         */
-        public boolean getValue() {
-            return this.value;
-        }
-    }
-
-}
\ No newline at end of file
diff --git a/src/test/org/apache/lenya/cms/workflow/WorkflowTest.xtest b/src/test/org/apache/lenya/cms/workflow/WorkflowTest.xtest
deleted file mode 100644
index d837922..0000000
--- a/src/test/org/apache/lenya/cms/workflow/WorkflowTest.xtest
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version="1.0" ?>

-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-<testcase>

-  <annotation>

-    Test Cases: Workflow 

-  </annotation>

-

-  <roles>

-  <role name="org.apache.lenya.ac.AccreditableManagerSelector"

-        shorthand="accreditable-managers"

-        default-class="org.apache.cocoon.components.ExtendedComponentSelector">

-    <hint shorthand="file" class="org.apache.lenya.ac.file.FileAccreditableManager"/>

-  </role>

-    

-  <role name="org.apache.lenya.ac.AuthorizerSelector"

-        shorthand="authorizers"

-        default-class="org.apache.cocoon.components.ExtendedComponentSelector">

-    <hint shorthand="policy" class="org.apache.lenya.ac.impl.PolicyAuthorizer"/>

-    <hint shorthand="workflow" class="org.apache.lenya.cms.ac.workflow.WorkflowAuthorizer"/>

-    <hint shorthand="usecase" class="org.apache.lenya.cms.ac.usecase.UsecaseAuthorizer"/>

-  </role>

-  

-  <role name="org.apache.lenya.ac.PolicyManagerSelector"

-        shorthand="policy-managers"

-        default-class="org.apache.cocoon.components.ExtendedComponentSelector">

-    <hint shorthand="file" class="org.apache.lenya.ac.file.FilePolicyManager"/>

-    <hint shorthand="sitemap" class="org.apache.lenya.cms.ac.sitemap.SitemapPolicyManager"/>

-  </role>

-  

-  <role name="org.apache.lenya.ac.AccessController"

-        shorthand="access-controller"

-        default-class="org.apache.lenya.ac.impl.BypassableAccessController"/>

-        

-  <role name="org.apache.lenya.ac.AccessControllerResolverSelector"

-        shorthand="access-controller-resolvers"

-        default-class="org.apache.cocoon.components.ExtendedComponentSelector">

-    <hint shorthand="composable" class="org.apache.lenya.ac.ComposableAccessControllerResolver"/>

-    <hint shorthand="configurable" class="org.apache.lenya.ac.ConfigurableAccessControllerResolver"/>

-    <hint shorthand="publication" class="org.apache.lenya.cms.ac.PublicationAccessControllerResolver"/>

-  </role>

-  

-  <role name="org.apache.lenya.cms.usecase.UnitOfWork"

-  	    shorthand="unit-of-work"

-  	    default-class="org.apache.lenya.cms.usecase.UnitOfWorkImpl"/>

-        

-  <role name="org.apache.lenya.cms.usecase.Operation"

-  	    shorthand="operation"

-  	    default-class="org.apache.lenya.cms.usecase.AbstractOperation"/>

-        

-  <role name="org.apache.lenya.cms.usecase.UsecaseSelector"

-        shorthand="usecases"

-        default-class="org.apache.cocoon.components.ExtendedComponentSelector"/>

-

-  <role name="org.apache.lenya.cms.usecase.UsecaseResolver"

-  	    shorthand="usecase-resolver"

-  	    default-class="org.apache.lenya.cms.usecase.UsecaseResolverImpl"/>

-        

-  <role name="org.apache.lenya.cms.publication.DocumentTypeResolver"

-  	    shorthand="usecase-resolver"

-  	    default-class="org.apache.lenya.cms.publication.DocumentTypeResolverImpl"/>

-        

-  <role name="org.apache.lenya.cms.cocoon.flow.FlowHelper"

-  	    shorthand="flowhelper"

-  	    default-class="org.apache.lenya.cms.cocoon.flow.FlowHelperImpl"/>

-        

-  <role name="org.apache.lenya.cms.workflow.WorkflowResolver"

-  	    shorthand="workflow-resolver"

-  	    default-class="org.apache.lenya.cms.workflow.WorkflowResolverImpl"/>

-  </roles>

-

-  <!--

-  -->

-  <components>

-    <entity-resolver>

-      <parameter name="verbosity" value="10"/>

-      <parameter name="catalog" value="/catalog"/>

-    </entity-resolver>

-  </components>

-</testcase>

-

diff --git a/src/test/org/apache/lenya/net/InetAddressUtilTest.java b/src/test/org/apache/lenya/net/InetAddressUtilTest.java
deleted file mode 100644
index 0966449..0000000
--- a/src/test/org/apache/lenya/net/InetAddressUtilTest.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
-* Copyright 1999-2004 The Apache Software Foundation
-*
-* Licensed 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.
-*/
-package org.apache.lenya.net;
-
-import java.net.InetAddress;
-
-/**
- * Inet address util test
- */
-public class InetAddressUtilTest {
-    /**
-     * @param args
-     *
-     */
-    public static void main(String[] args) {
-        if (args.length != 3) {
-            System.out.println("Usage: InetAddressUtilTest network subnet ip");
-            return;
-        }
-
-        try {
-            InetAddress network = InetAddress.getByName(args[0]); // "195.226.6.64");
-            InetAddress subnet = InetAddress.getByName(args[1]); // "255.255.255.0");
-            InetAddress ip = InetAddress.getByName(args[2]); // "195.226.6.70");
-            System.out.println(InetAddressUtil.contains(network, subnet, ip));
-        } catch(Exception e) {
-            System.err.println(e);
-        }
-    }
-}
diff --git a/src/test/webtest/config.xml b/src/test/webtest/config.xml
deleted file mode 100644
index b3e1115..0000000
--- a/src/test/webtest/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: config.xml,v 1.2 2004/03/13 12:44:37 gregor Exp $ -->
-
-<config
-        host="localhost"
-        port="8888"
-        protocol="http"
-        saveresponse="true"
-        resultpath="src/test/webtest/results/"
-        verbose="true"
-        basepath="" />
\ No newline at end of file
diff --git a/src/test/webtest/tests.xml b/src/test/webtest/tests.xml
deleted file mode 100644
index 26414c9..0000000
--- a/src/test/webtest/tests.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: tests.xml,v 1.2 2004/03/13 12:44:37 gregor Exp $ -->
-
-<!DOCTYPE project [
-  <!ENTITY default SYSTEM "../../webapp/lenya/pubs/default/test/webtest/tests.xml">
-  <!ENTITY config SYSTEM "config.xml"> 
-]>
-
-<project name="Lenya webtest tests" default="tests">
-
-  <taskdef file="${webtest.home}/webtestTaskdefs.properties">
-    <classpath>
-      <fileset dir="${webtest.home}" includes="**/lib/*.jar"/>
-    </classpath>
-  </taskdef>
-
-  <target name="tests" depends="pubs.default"/>
-  
-  &default;
-  
-</project>
\ No newline at end of file
diff --git a/src/webapp/WEB-INF/cocoon-xconf.xsl b/src/webapp/WEB-INF/cocoon-xconf.xsl
deleted file mode 100644
index b93a955..0000000
--- a/src/webapp/WEB-INF/cocoon-xconf.xsl
+++ /dev/null
@@ -1,594 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-<xsl:param name="xopus-context"/>
-
-<xsl:template match="markup-languages/xsp-language/target-language[@name = 'java']">
-  <xsl:copy>
-    <xsl:copy-of select="@*"/>
-    <xsl:apply-templates/>
-    
-    <xsl:comment>Lenya Logicsheets</xsl:comment>
-        
-    <builtin-logicsheet>
-      <parameter name="prefix" value="xsp-scheduler"/>
-      <parameter name="uri" value="http://apache.org/cocoon/lenya/xsp/scheduler/1.0"/>
-      <parameter name="href" value="resource://org/apache/lenya/cms/cocoon/logicsheets/scheduler.xsl"/>
-    </builtin-logicsheet>
-    
-    <xsl:comment>/ Lenya Logicsheets</xsl:comment>
-    
-  </xsl:copy>
-</xsl:template>
-
-
-<xsl:template match="source-factories">
-  <xsl:copy>
-    <xsl:copy-of select="@*"/>
-    <xsl:apply-templates/>
-    
-    <component-instance class="org.apache.lenya.cms.cocoon.source.FallbackSourceFactory" logger="lenya.source.fallback" name="fallback"/>
-    <component-instance class="org.apache.lenya.cms.cocoon.source.LenyaSourceFactory" logger="lenya.source.lenya" name="lenya" scheme="context:"/>
-  </xsl:copy>
-</xsl:template>
-
-
-<xsl:template match="input-modules">
-     
-  <xsl:copy>
-    <xsl:copy-of select="@*"/>
-    <xsl:apply-templates/>
-    
-    <component-instance name="defaults" class="org.apache.cocoon.components.modules.input.DefaultsModule">
-      <values>
-        <skin>lenya-site</skin>
-      </values>
-    </component-instance>
-
-    <component-instance name="xopus" class="org.apache.cocoon.components.modules.input.DefaultsModule">
-      <values>
-        <context><xsl:value-of select="$xopus-context"/></context>
-      </values>
-    </component-instance>
-
-    <component-instance logger="core.modules.input" name="forrest"
-      class="org.apache.cocoon.components.modules.input.ChainMetaModule">
-      <input-module name="request-param"/>
-      <input-module name="request-attr"/>
-      <input-module name="session-attr"/>
-      <input-module name="defaults"/>
-      <input-module name="page-envelope"/>
-      <input-module name="access-control"/>
-    </component-instance>
-      
-    <component-instance
-      class="org.apache.cocoon.components.modules.input.RealPathModule"
-      logger="core.modules.input" name="realpath"/>
-      
-    <component-instance logger="sitemap.modules.input.page-envelope" name="page-envelope"
-        class="org.apache.lenya.cms.cocoon.components.modules.input.PageEnvelopeModule"/>
-
-    <component-instance logger="sitemap.modules.input.dublincore" name="dublincore"
-        class="org.apache.lenya.cms.cocoon.components.modules.input.DublinCoreModule"/>
-
-    <component-instance logger="core.modules.input.access-control" name="access-control"
-        class="org.apache.lenya.cms.cocoon.components.modules.input.AccessControlModule"/>
-    
-    <component-instance logger="core.modules.input.workflow" name="workflow"
-        class="org.apache.lenya.cms.cocoon.components.modules.input.WorkflowModule"/>
-        
-    <component-instance logger="core.modules.input.sitetree" name="sitetree"
-        class="org.apache.lenya.cms.cocoon.components.modules.input.SitetreeModule"/>
-        
-    <component-instance logger="core.modules.input.fallback" name="fallback"
-        class="org.apache.lenya.cms.cocoon.components.modules.input.PublicationTemplateFallbackModule">
-      <directory src="context:///lenya"/>
-    </component-instance>
-
-    <component-instance logger="core.modules.input.usecase-fallback" name="usecase-fallback"
-        class="org.apache.lenya.cms.cocoon.components.modules.input.UsecaseFallbackModule"/>
-
-	<component-instance logger="core.modules.input.document-url" name="document-url"
-        class="org.apache.lenya.cms.cocoon.components.modules.input.DocumentURLModule"/>
-                       
-    <component-instance logger="core.modules.input.resourceexists" name="resource-exists"
-        class="org.apache.lenya.cms.cocoon.components.modules.input.ResourceExistsModule"/>
-                
-    <component-instance name="date-i18n" logger="core.modules.input" class="org.apache.cocoon.components.modules.input.DateInputModule">
-      <format>yyyy-M-dd HH:mm:ss Z</format>
-    </component-instance>
-    
-  <component-instance name="proxy-url" logger="sitemap.modules.input.proxy-url"
-      class="org.apache.lenya.cms.cocoon.components.modules.input.ProxyUrlModule"/>
-
-  </xsl:copy>
-</xsl:template>
-
-<xsl:template match="cocoon">
-  <xsl:copy>
-  <xsl:copy-of select="@*"/>
-  <xsl:attribute name="user-roles">/WEB-INF/classes/org/apache/lenya/lenya.roles</xsl:attribute>
-  
-    <!--+
-      | Entity resolution catalogs
-      |
-      | The default catalog is distributed at /WEB-INF/entities/catalog
-      | This is the contextual pathname for Cocoon resources.
-      | You can override this path, if necessary, using the "catalog" parameter:
-      |
-      |    <parameter name="catalog" value="/WEB-INF/entities/catalog"/>
-      |
-      | However, it is probably desirable to leave this default catalog config
-      | and declare your own local catalogs, which are loaded in addition to
-      | the system catalog.
-      |
-      | There are various ways to do local configuration (see "Entity Catalogs"
-      | documentation). One way is via the CatalogManager.properties file.
-      | As an additional method, you can specify the "local-catalog" parameter here.
-      |
-      | local-catalog:
-      |   The full filesystem pathname to a single local catalog file.
-      |
-      |  <parameter name="local-catalog" value="/usr/local/sgml/mycatalog"/>
-      |
-      | verbosity:
-      | The level of messages for status/debug (messages go to standard output)
-      | The following messages are provided ...
-      |  0 = none
-      |  1 = ? (... not sure yet)
-      |  2 = 1+, Loading catalog, Resolved public, Resolved system
-      |  3 = 2+, Catalog does not exist, resolvePublic, resolveSystem
-      |  10 = 3+, List all catalog entries when loading a catalog
-      |    (Cocoon also logs the "Resolved public" messages.)
-      |
-      |     <parameter name="verbosity" value="2"/>
-      +-->
-
-  <xsl:apply-templates select="*"/>
-
-  <accreditable-managers>
-    <component-instance logger="lenya.ac.accreditablemanager"
-        class="org.apache.lenya.ac.file.FileAccreditableManager" name="file"/>
-  </accreditable-managers>
-
-  <authorizers>
-    <component-instance name="policy"
-        class="org.apache.lenya.ac.impl.PolicyAuthorizer"
-        logger="lenya.ac.authorizer.policy"/>
-    <component-instance name="workflow"
-        class="org.apache.lenya.cms.ac.workflow.WorkflowAuthorizer"
-        logger="lenya.ac.authorizer.workflow"/>
-    <component-instance name="usecase"
-        class="org.apache.lenya.cms.ac.usecase.UsecaseAuthorizer"
-        logger="lenya.ac.authorizer.usecase"/>
-  </authorizers>
-  
-  <policy-managers>
-    <component-instance name="document"
-        class="org.apache.lenya.cms.ac.DocumentPolicyManagerWrapper"
-        logger="lenya.ac.policymanager.document"/>
-    <component-instance name="file"
-        class="org.apache.lenya.ac.file.FilePolicyManager"
-        logger="lenya.ac.policymanager.file"/>
-    <component-instance name="sitemap"
-        class="org.apache.lenya.cms.ac.SitemapPolicyManager"
-        logger="lenya.ac.policymanager.sitemap"/>
-  </policy-managers>
-  
-  <component logger="lenya.ac.accesscontroller.bypassable"
-      class="org.apache.lenya.ac.impl.BypassableAccessController"
-      role="org.apache.lenya.ac.AccessController/bypassable">
-    <public>.*[.]css|.*[.]jpg|.*[.]gif|.*[.]png|.*[.]rng|.*[.]xsl</public>
-  </component>
-  
-  <access-controller-resolvers>
-    <component-instance name="publication"
-        class="org.apache.lenya.cms.ac.PublicationAccessControllerResolver"
-        logger="lenya.ac.accesscontrollerresolver.publication">
-    </component-instance>
-    <component-instance name="global"
-        class="org.apache.lenya.ac.impl.ConfigurableAccessControllerResolver"
-        logger="lenya.ac.accesscontrollerresolver.global">
-      <access-controller type="global"/>
-    </component-instance>
-    <component-instance name="composable"
-        class="org.apache.lenya.ac.impl.ComposableAccessControllerResolver"
-        logger="lenya.ac.accesscontrollerresolver.composable">
-      <resolver type="publication"/>
-<!--      <resolver type="global"/>-->
-    </component-instance>
-  </access-controller-resolvers>
-  
-  <component logger="lenya.ac.authenticator"
-      class="org.apache.lenya.ac.impl.UserAuthenticator"
-      role="org.apache.lenya.ac.Authenticator"/>
-      
-<xsl:comment>
-Enable this authenticator and disable the UserAuthenticator for anonymous authentication (useful for client certs, for instance)
-
-&lt;component logger="lenya.ac.authenticator"
-      class="org.apache.lenya.ac.impl.AnonymousAuthenticator"
-      role="org.apache.lenya.ac.Authenticator"/&gt;      
-</xsl:comment>
- 
-  <component logger="lenya.ac.cache"
-     	class="org.apache.lenya.ac.cache.SourceCacheImpl"
-     	role="org.apache.lenya.ac.cache.SourceCache"/>
-     	
-  <component logger="lenya.publication.templatemanager"
-      class="org.apache.lenya.cms.publication.templating.PublicationTemplateManagerImpl"
-      role="org.apache.lenya.cms.publication.templating.PublicationTemplateManager"/>
-
-  <usecases>
-
-     <!--+
-         | AC Usecases
-	 +-->
-
-    <component-instance name="ac.login" logger="lenya.ac" class="org.apache.lenya.cms.ac.usecases.Login">
-      <view template="ac/login"/>
-    </component-instance>
-
-    <component-instance name="ac.logout" logger="lenya.ac" class="org.apache.lenya.cms.ac.usecases.Logout">
-      <view template="ac/logout"/>
-    </component-instance>
-    
-    <!--+
-        | Admin area usecases
-        +-->
-
-    <component-instance name="admin.users" logger="lenya.admin" class="org.apache.lenya.cms.ac.usecases.Users">
-      <view template="admin/users" menu="true">
-        <parameter name="tab" value="users"/>
-      </view>
-      <exit usecase="admin.users"/>
-    </component-instance>
-    <component-instance name="admin.user" logger="lenya.admin" class="org.apache.lenya.cms.ac.usecases.User">
-      <view template="admin/user" menu="true">
-        <parameter name="tab" value="users"/>
-      </view>
-      <exit usecase="admin.users"/>
-    </component-instance>
-    <component-instance name="admin.addUser" logger="lenya.admin" class="org.apache.lenya.cms.ac.usecases.AddUser">
-      <view template="admin/addUser" menu="true">
-        <parameter name="tab" value="users"/>
-      </view>
-      <exit usecase="admin.user"/>
-    </component-instance>
-    <component-instance name="admin.userProfile" logger="lenya.admin" class="org.apache.lenya.cms.ac.usecases.UserProfile">
-      <view template="admin/userProfile" menu="true">
-        <parameter name="tab" value="users"/>
-      </view>
-      <exit usecase="admin.user"/>
-    </component-instance>
-    <component-instance name="admin.changePassword" logger="lenya.admin" class="org.apache.lenya.cms.ac.usecases.UserPassword">
-      <view template="admin/changePassword" menu="true">
-        <parameter name="tab" value="users"/>
-      </view>
-      <exit usecase="admin.user"/>
-    </component-instance>
-    <component-instance name="admin.userGroups" logger="lenya.admin" class="org.apache.lenya.cms.ac.usecases.UserGroups">
-      <view template="admin/userGroups" menu="true">
-        <parameter name="tab" value="users"/>
-      </view>
-      <exit usecase="admin.user"/>
-    </component-instance>
-    <component-instance name="admin.deleteUser" logger="lenya.admin" class="org.apache.lenya.cms.ac.usecases.DeleteUser">
-      <view template="admin/deleteUser" menu="true">
-        <parameter name="tab" value="users"/>
-      </view>
-      <exit usecase="admin.users"/>
-    </component-instance>
-    <component-instance name="admin.groups" logger="lenya.admin" class="org.apache.lenya.cms.ac.usecases.Groups">
-      <view template="admin/groups" menu="true">
-        <parameter name="tab" value="groups"/>
-      </view>
-      <exit usecase="admin.groups"/>
-    </component-instance>
-    <component-instance name="admin.addGroup" logger="lenya.admin" class="org.apache.lenya.cms.ac.usecases.AddGroup">
-      <view template="admin/addGroup" menu="true">
-        <parameter name="tab" value="groups"/>
-      </view>
-      <exit usecase="admin.group"/>
-    </component-instance>
-    <component-instance name="admin.group" logger="lenya.admin" class="org.apache.lenya.cms.ac.usecases.Group">
-      <view template="admin/group" menu="true">
-        <parameter name="tab" value="groups"/>
-      </view>
-      <exit usecase="admin.groups"/>
-    </component-instance>
-    <component-instance name="admin.groupProfile" logger="lenya.admin" class="org.apache.lenya.cms.ac.usecases.GroupProfile">
-      <view template="admin/groupProfile" menu="true">
-        <parameter name="tab" value="groups"/>
-      </view>
-      <exit usecase="admin.group"/>
-    </component-instance>
-    <component-instance name="admin.groupMembers" logger="lenya.admin" class="org.apache.lenya.cms.ac.usecases.GroupMembers">
-      <view template="admin/groupMembers" menu="true">
-        <parameter name="tab" value="groups"/>
-      </view>
-      <exit usecase="admin.group"/>
-    </component-instance>
-    <component-instance name="admin.deleteGroup" logger="lenya.admin" class="org.apache.lenya.cms.ac.usecases.DeleteGroup">
-      <view template="admin/deleteGroup" menu="true">
-        <parameter name="tab" value="groups"/>
-      </view>
-      <exit usecase="admin.groups"/>
-    </component-instance>
-    <component-instance name="admin.ipRanges" logger="lenya.admin" class="org.apache.lenya.cms.ac.usecases.IPRanges">
-      <view template="admin/ipRanges" menu="true">
-        <parameter name="tab" value="ipRanges"/>
-      </view>
-      <exit usecase="admin.ipRanges"/>
-    </component-instance>
-    <component-instance name="admin.addIPRange" logger="lenya.admin" class="org.apache.lenya.cms.ac.usecases.AddIPRange">
-      <view template="admin/addIPRange" menu="true">
-        <parameter name="tab" value="ipRanges"/>
-      </view>
-      <exit usecase="admin.ipRanges"/>
-    </component-instance>
-    <component-instance name="admin.ipRange" logger="lenya.admin" class="org.apache.lenya.cms.ac.usecases.IPRange">
-      <view template="admin/ipRange" menu="true">
-        <parameter name="tab" value="ipRanges"/>
-      </view>
-      <exit usecase="admin.ipRanges"/>
-    </component-instance>
-    <component-instance name="admin.ipRangeProfile" logger="lenya.admin" class="org.apache.lenya.cms.ac.usecases.IPRangeProfile">
-      <view template="admin/ipRangeProfile" menu="true">
-        <parameter name="tab" value="ipRanges"/>
-      </view>
-      <exit usecase="admin.ipRange"/>
-    </component-instance>
-    <component-instance name="admin.ipRangeGroups" logger="lenya.admin" class="org.apache.lenya.cms.ac.usecases.IPRangeGroups">
-      <view template="admin/ipRangeGroups" menu="true">
-        <parameter name="tab" value="ipRanges"/>
-      </view>
-      <exit usecase="admin.ipRange"/>
-    </component-instance>
-    <component-instance name="admin.deleteIPRange" logger="lenya.admin" class="org.apache.lenya.cms.ac.usecases.DeleteIPRange">
-      <view template="admin/deleteIPRange" menu="true">
-        <parameter name="tab" value="ipRanges"/>
-      </view>
-      <exit usecase="admin.ipRanges"/>
-    </component-instance>
-    <component-instance name="admin.emptyTrash" logger="lenya.admin" class="org.apache.lenya.cms.site.usecases.EmptyTrash">
-      <view template="admin/emptyTrash" menu="true">
-        <parameter name="tab" value="trash"/>
-      </view>
-      <exit usecase="admin.emptyTrash"/>
-    </component-instance>
-    <component-instance name="admin.serverStatus" logger="lenya.admin" class="org.apache.lenya.cms.usecase.DummyUsecase">
-      <view template="admin/serverStatus" menu="true">
-        <parameter name="tab" value="serverStatus"/>
-      </view>
-      <exit usecase="admin.serverStatus"/>
-    </component-instance>
-
-    <!--+
-        | Search usecases
-        +-->
-
-    <component-instance name="search.search" logger="lenya.search" class="org.apache.lenya.cms.search.usecases.Search">
-      <view template="search/search"/>
-    </component-instance>
-    
-    <!--+
-        | Site area usecases
-        +-->
-
-    <component-instance name="site.create" logger="lenya.site" class="org.apache.lenya.cms.site.usecases.CreateDocument">
-      <view template="site/create"/>
-    </component-instance>
-    <component-instance name="site.createLanguage" logger="lenya.site" class="org.apache.lenya.cms.site.usecases.CreateLanguage">
-      <view template="site/createLanguage"/>
-    </component-instance>
-    <component-instance name="site.delete" logger="lenya.site" class="org.apache.lenya.cms.site.usecases.Delete">
-      <view template="site/delete"/>
-    </component-instance>
-    <component-instance name="site.deleteLanguage" logger="lenya.site" class="org.apache.lenya.cms.site.usecases.DeleteLanguage">
-      <view template="site/deleteLanguage"/>
-    </component-instance>
-    <component-instance name="site.changeLabel" logger="lenya.site" class="org.apache.lenya.cms.site.usecases.ChangeLabel">
-      <view template="site/changeLabel"/>
-    </component-instance>
-    <component-instance name="site.changeNodeID" logger="lenya.site" class="org.apache.lenya.cms.site.usecases.ChangeNodeID">
-      <view template="site/changeNodeID"/>
-    </component-instance>
-    <component-instance name="site.cut" logger="lenya.site" class="org.apache.lenya.cms.site.usecases.Cut">
-      <view template="site/cut"/>
-    </component-instance>
-    <component-instance name="site.copy" logger="lenya.site" class="org.apache.lenya.cms.site.usecases.Copy">
-      <view template="site/copy"/>
-    </component-instance>
-    <component-instance name="site.paste" logger="lenya.site" class="org.apache.lenya.cms.site.usecases.Paste">
-      <view template="site/paste"/>
-    </component-instance>
-    <component-instance name="site.nudge" logger="lenya.site" class="org.apache.lenya.cms.site.usecases.Nudge"/>
-    <component-instance name="site.archive" logger="lenya.site" class="org.apache.lenya.cms.site.usecases.Archive">
-      <view template="site/archive"/>
-    </component-instance>
-    <component-instance name="site.restore" logger="lenya.site" class="org.apache.lenya.cms.site.usecases.Restore">
-      <view template="workflow/restore"/>
-    </component-instance>
-    
-    <component-instance name="tab.acArchive" logger="lenya.site" class="org.apache.lenya.cms.ac.usecases.AccessControl">
-      <view template="tab/acArchive" menu="true"/>
-      <exit usecase="tab.acArchive"/>
-    </component-instance>
-    <component-instance name="tab.acAuthoring" logger="lenya.site" class="org.apache.lenya.cms.ac.usecases.AccessControl">
-      <view template="tab/acAuthoring" menu="true"/>
-      <parameter name="acArea" value="authoring"/>
-      <exit usecase="tab.acAuthoring"/>
-    </component-instance>
-    <component-instance name="tab.acLive" logger="lenya.site" class="org.apache.lenya.cms.ac.usecases.AccessControl">
-      <view template="tab/acLive" menu="true"/>
-      <parameter name="acArea" value="live"/>
-      <exit usecase="tab.acLive"/>
-    </component-instance>
-    <component-instance name="tab.acTrash" logger="lenya.site" class="org.apache.lenya.cms.ac.usecases.AccessControl">
-      <view template="tab/acTrash" menu="true"/>
-      <exit usecase="tab.acTrash"/>
-    </component-instance>
-    <component-instance name="tab.assets" logger="lenya.site" class="org.apache.lenya.cms.site.usecases.Assets">
-      <view template="tab/assets" menu="true"/>
-      <exit usecase="tab.assets"/>
-    </component-instance>
-    <component-instance name="tab.meta" logger="lenya.site" class="org.apache.lenya.cms.metadata.usecases.Metadata">
-      <view template="tab/meta" menu="true"/>
-      <exit usecase="tab.meta"/>
-    </component-instance>
-    <component-instance name="tab.overview" logger="lenya.site" class="org.apache.lenya.cms.site.usecases.Overview">
-      <view template="tab/overview" menu="true"/>
-      <exit usecase="tab.overview"/>
-    </component-instance>
-    <component-instance name="tab.revisions" logger="lenya.site" class="org.apache.lenya.cms.site.usecases.Revisions">
-      <view template="tab/revisions" menu="true"/>
-      <exit usecase="tab.revisions"/>
-    </component-instance>
-    <component-instance name="tab.workflow" logger="lenya.site" class="org.apache.lenya.cms.workflow.usecases.History">
-      <view template="tab/workflow" menu="true"/>
-      <exit usecase="tab.workflow"/>
-    </component-instance>
-    <component-instance name="tab.scheduler" logger="lenya.site" class="org.apache.lenya.cms.usecase.scheduling.ManageJobs">
-      <view template="tab/scheduler" menu="true"/>
-      <exit usecase="tab.scheduler"/>
-    </component-instance>
-    
-    <component-instance name="publication.createPublicationFromTemplate" logger="lenya.publication"
-                        class="org.apache.lenya.cms.publication.usecases.CreatePublicationFromTemplate">
-      <view template="publication/createPublicationFromTemplate"/>
-    </component-instance>
-
-    <component-instance name="publication.edit" logger="lenya.publication"
-                        class="org.apache.lenya.cms.editors.EditDocument">
-      <parameter name="sourceUri" value="cocoon:/request2document"/>
-    </component-instance>
-    <component-instance name="edit.insertImage" logger="lenya.publication"
-                        class="org.apache.lenya.cms.editors.InsertAsset">
-      <view template="edit/insertAsset" menu="false">
-        <parameter name="callbackFunction" value="insertImage"/>
-      </view>
-      <parameter name="mimeTypePrefix" value="image/"/>
-      <parameter name="asset-usecase" value="tab.assets"/>
-    </component-instance>
-    <component-instance name="edit.insertAsset" logger="lenya.publication"
-                        class="org.apache.lenya.cms.editors.InsertAsset">
-      <view template="edit/insertAsset" menu="false">
-        <parameter name="callbackFunction" value="insertAsset"/>
-      </view>
-      <parameter name="asset-usecase" value="tab.assets"/>
-    </component-instance>
-    <component-instance name="edit.forms" logger="lenya.publication"
-                        class="org.apache.lenya.cms.editors.forms.FormsEditor">
-      <transaction policy="pessimistic"/>
-      <view template="edit/forms/forms" menu="false"/>
-    </component-instance>
-    <component-instance name="edit.oneform" logger="lenya.publication"
-                        class="org.apache.lenya.cms.editors.forms.OneFormEditor">
-      <transaction policy="pessimistic"/>
-      <view template="edit/forms/oneform" menu="false"/>
-    </component-instance>
-
-    <component-instance name="edit.bxe" logger="lenya.publication"
-                        class="org.apache.lenya.cms.editors.bxe.BXE">
-      <transaction policy="pessimistic"/>
-      <view template="edit/bxe/bxe" menu="false"/>
-    </component-instance>
-
-    <component-instance name="edit.kupu" logger="lenya.publication"
-                        class="org.apache.lenya.cms.editors.kupu.Kupu">
-      <transaction policy="pessimistic"/>
-      <view template="edit/kupu/kupu" menu="false"/>
-    </component-instance>
-  </usecases>
-
-  <component role="org.apache.cocoon.components.cron.CronJob/usecase"
-             class="org.apache.lenya.cms.usecase.scheduling.UsecaseCronJob"
-             logger="cron.usecase"/>
-             
-  <site-managers>
-    <component-instance name="tree" logger="lenya.site"
-                        class="org.apache.lenya.cms.site.tree.TreeSiteManager"/>
-    <component-instance name="simple" logger="lenya.site"
-                        class="org.apache.lenya.cms.site.simple.SimpleSiteManager"/>
-  </site-managers>
-  
-  <document-builders>
-    <component-instance name="default" logger="lenya.publication"
-                        class="org.apache.lenya.cms.publication.DefaultDocumentBuilder"/>
-  </document-builders>
-  
-  <template-instantiators/>
-  
-  <!-- move scheduler to the end, datasources have to be available -->
-  <xsl:apply-templates select="component[@role = 'org.apache.cocoon.components.cron.JobScheduler']" mode="scheduler"/>
-             
-  </xsl:copy>
-
-</xsl:template>
-
-<!-- increase the free memory to prevent out of memory errors -->
-<xsl:template match="store-janitor/parameter[@name = 'freememory']">
-  <parameter name="freememory" value="10000000"/>
-</xsl:template>
-
-
-<xsl:template match="component[@role = 'org.apache.cocoon.components.cron.JobScheduler']"/>
-
-
-<xsl:template match="component[@role = 'org.apache.cocoon.components.cron.JobScheduler']" mode="scheduler">
-  <xsl:copy>
-    <xsl:apply-templates select="@*|node()"/>
-  </xsl:copy>
-</xsl:template>
-
-
-<!-- JDBC store for scheduler -->
-<xsl:template match="component[@role = 'org.apache.cocoon.components.cron.JobScheduler']/store">
-  <store type="tx" delegate="org.quartz.impl.jdbcjobstore.StdJDBCDelegate">
-    <datasource provider="excalibur">LenyaScheduler</datasource>
-  </store>
-</xsl:template>
-
-
-<xsl:template match="datasources">
-  <xsl:copy>
-    <jdbc logger="core.datasources.lenya.scheduler" name="LenyaScheduler">
-      <pool-controller max="10" min="5">
-        <!-- use custom keep-alive query because HSQL does not accept 'SELECT 1' -->
-        <keep-alive>SELECT 1 FROM QRTZ_LOCKS</keep-alive>
-      </pool-controller>
-      <dburl>jdbc:hsqldb:hsql://localhost:9002</dburl>
-      <user>sa</user>
-      <password/>
-    </jdbc>
-  </xsl:copy>
-</xsl:template>
-
-
-<xsl:template match="@*|node()">
-  <xsl:copy>
-    <xsl:apply-templates select="@*|node()"/>
-  </xsl:copy>
-</xsl:template>
-   
-</xsl:stylesheet> 
diff --git a/src/webapp/WEB-INF/db/cocoondb.properties b/src/webapp/WEB-INF/db/cocoondb.properties
deleted file mode 100644
index 3c9b073..0000000
--- a/src/webapp/WEB-INF/db/cocoondb.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-#HSQL database
-#Mon Mar 14 23:21:54 CET 2005
-hsqldb.cache_file_scale=1
-runtime.gc_interval=0
-hsqldb.first_identity=0
-version=1.7.3
-modified=yes
-hsqldb.script_format=0
-sql.enforce_size=false
-hsqldb.cache_size_scale=10
-hsqldb.cache_scale=14
-hsqldb.version=1.7.3
-hsqldb.log_size=200
-sql.enforce_strict_size=false
-readonly=false
-hsqldb.compatible_version=1.7.2
-hsqldb.original_version=1.7.1
-sql.compare_in_locale=false
-hsqldb.nio_data_file=true
-hsqldb.cache_version=1.7.0
diff --git a/src/webapp/WEB-INF/db/cocoondb.script b/src/webapp/WEB-INF/db/cocoondb.script
deleted file mode 100644
index 1bd426c..0000000
--- a/src/webapp/WEB-INF/db/cocoondb.script
+++ /dev/null
@@ -1,48 +0,0 @@
--- Copyright 1999-2004 The Apache Software Foundation
---
--- Licensed 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.
-
-CREATE USER SA PASSWORD "" ADMIN
-
-DROP TABLE qrtz_locks IF EXISTS
-DROP TABLE qrtz_scheduler_state IF EXISTS
-DROP TABLE qrtz_fired_triggers IF EXISTS
-DROP TABLE qrtz_paused_trigger_grps IF EXISTS
-DROP TABLE qrtz_calendars IF EXISTS
-DROP TABLE qrtz_trigger_listeners IF EXISTS
-DROP TABLE qrtz_blob_triggers IF EXISTS
-DROP TABLE qrtz_cron_triggers IF EXISTS
-DROP TABLE qrtz_simple_triggers IF EXISTS
-DROP TABLE qrtz_triggers IF EXISTS
-DROP TABLE qrtz_job_listeners IF EXISTS
-DROP TABLE qrtz_job_details IF EXISTS
-
-CREATE TABLE qrtz_job_details (JOB_NAME VARCHAR(80) NOT NULL, JOB_GROUP VARCHAR(80) NOT NULL, DESCRIPTION VARCHAR(120) NULL, JOB_CLASS_NAME VARCHAR(128) NOT NULL, IS_DURABLE VARCHAR(1) NOT NULL, IS_VOLATILE VARCHAR(1) NOT NULL, IS_STATEFUL VARCHAR(1) NOT NULL, REQUESTS_RECOVERY VARCHAR(1) NOT NULL, JOB_DATA BINARY NULL, PRIMARY KEY (JOB_NAME,JOB_GROUP))
-CREATE TABLE qrtz_job_listeners (JOB_NAME VARCHAR(80) NOT NULL, JOB_GROUP VARCHAR(80) NOT NULL, JOB_LISTENER VARCHAR(80) NOT NULL, PRIMARY KEY (JOB_NAME,JOB_GROUP,JOB_LISTENER), FOREIGN KEY (JOB_NAME,JOB_GROUP) REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP))
-CREATE TABLE qrtz_triggers (TRIGGER_NAME VARCHAR(80) NOT NULL, TRIGGER_GROUP VARCHAR(80) NOT NULL, JOB_NAME VARCHAR(80) NOT NULL, JOB_GROUP VARCHAR(80) NOT NULL, IS_VOLATILE VARCHAR(1) NOT NULL, DESCRIPTION VARCHAR(120) NULL, NEXT_FIRE_TIME NUMERIC(13) NULL, PREV_FIRE_TIME NUMERIC(13) NULL, TRIGGER_STATE VARCHAR(16) NOT NULL, TRIGGER_TYPE VARCHAR(8) NOT NULL, START_TIME NUMERIC(13) NOT NULL, END_TIME NUMERIC(13) NULL, CALENDAR_NAME VARCHAR(80) NULL, MISFIRE_INSTR NUMERIC(2) NULL, PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP), FOREIGN KEY (JOB_NAME,JOB_GROUP) REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP))
-CREATE TABLE qrtz_simple_triggers (TRIGGER_NAME VARCHAR(80) NOT NULL, TRIGGER_GROUP VARCHAR(80) NOT NULL, REPEAT_COUNT NUMERIC(7) NOT NULL, REPEAT_INTERVAL NUMERIC(12) NOT NULL, TIMES_TRIGGERED NUMERIC(7) NOT NULL, PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP), FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP) REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP))
-CREATE TABLE qrtz_cron_triggers (TRIGGER_NAME VARCHAR(80) NOT NULL, TRIGGER_GROUP VARCHAR(80) NOT NULL, CRON_EXPRESSION VARCHAR(80) NOT NULL, TIME_ZONE_ID VARCHAR(80), PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP), FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP) REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP))
-CREATE TABLE qrtz_blob_triggers (TRIGGER_NAME VARCHAR(80) NOT NULL, TRIGGER_GROUP VARCHAR(80) NOT NULL, BLOB_DATA BINARY NULL, PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP), FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP) REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP))
-CREATE TABLE qrtz_trigger_listeners (TRIGGER_NAME VARCHAR(80) NOT NULL, TRIGGER_GROUP VARCHAR(80) NOT NULL, TRIGGER_LISTENER VARCHAR(80) NOT NULL, PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_LISTENER), FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP) REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP))
-CREATE TABLE qrtz_calendars (CALENDAR_NAME VARCHAR(80) NOT NULL, CALENDAR BINARY NOT NULL, PRIMARY KEY (CALENDAR_NAME))
-CREATE TABLE qrtz_paused_trigger_grps (TRIGGER_GROUP VARCHAR(80) NOT NULL, PRIMARY KEY (TRIGGER_GROUP))
-CREATE TABLE qrtz_fired_triggers (ENTRY_ID VARCHAR(95) NOT NULL, TRIGGER_NAME VARCHAR(80) NOT NULL, TRIGGER_GROUP VARCHAR(80) NOT NULL, IS_VOLATILE VARCHAR(1) NOT NULL, INSTANCE_NAME VARCHAR(80) NOT NULL, FIRED_TIME NUMERIC(13) NOT NULL, STATE VARCHAR(16) NOT NULL, JOB_NAME VARCHAR(80) NULL, JOB_GROUP VARCHAR(80) NULL, IS_STATEFUL VARCHAR(1) NULL, REQUESTS_RECOVERY VARCHAR(1) NULL, PRIMARY KEY (ENTRY_ID))
-CREATE TABLE qrtz_scheduler_state (INSTANCE_NAME VARCHAR(80) NOT NULL, LAST_CHECKIN_TIME NUMERIC(13) NOT NULL, CHECKIN_INTERVAL NUMERIC(13) NOT NULL, RECOVERER VARCHAR(80) NULL, PRIMARY KEY (INSTANCE_NAME))
-CREATE TABLE qrtz_locks (LOCK_NAME VARCHAR(40) NOT NULL, PRIMARY KEY (LOCK_NAME))
-
-INSERT INTO qrtz_locks values('TRIGGER_ACCESS')
-INSERT INTO qrtz_locks values('JOB_ACCESS')
-INSERT INTO qrtz_locks values('CALENDAR_ACCESS')
-INSERT INTO qrtz_locks values('STATE_ACCESS')
-INSERT INTO qrtz_locks values('MISFIRE_ACCESS')
-
diff --git a/src/webapp/WEB-INF/entities/catalog.xsl b/src/webapp/WEB-INF/entities/catalog.xsl
deleted file mode 100644
index d3b9040..0000000
--- a/src/webapp/WEB-INF/entities/catalog.xsl
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: catalog.xsl,v 1.2 2004/03/13 12:42:21 gregor Exp $ -->
-
-<xsl:stylesheet version="1.0"
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-<xsl:output omit-xml-declaration="yes"/>    
-
-<xsl:template match="@*|node()">
-  <xsl:copy>
-    <xsl:apply-templates select="@*|node()"/>
-  </xsl:copy>
-<!-- Insert new catalogs -->
-</xsl:template>
-   
-</xsl:stylesheet> 
diff --git a/src/webapp/WEB-INF/entities/web-app_2_3.dtd b/src/webapp/WEB-INF/entities/web-app_2_3.dtd
deleted file mode 100644
index b733607..0000000
--- a/src/webapp/WEB-INF/entities/web-app_2_3.dtd
+++ /dev/null
@@ -1,1063 +0,0 @@
-<!--

-Copyright (c) 2000 Sun Microsystems, Inc.,

-901 San Antonio Road,

-Palo Alto, California 94303, U.S.A.

-All rights reserved.

-

-Sun Microsystems, Inc. has intellectual property rights relating to

-technology embodied in the product that is described in this document.

-In particular, and without limitation, these intellectual property

-rights may include one or more of the U.S. patents listed at

-http://www.sun.com/patents and one or more additional patents or

-pending patent applications in the U.S. and in other countries.

-

-This document and the product to which it pertains are distributed

-under licenses restricting their use, copying, distribution, and

-decompilation.  This document may be reproduced and distributed but may

-not be changed without prior written authorization of Sun and its

-licensors, if any.

-

-Third-party software, including font technology, is copyrighted and

-licensed from Sun suppliers.

-

-Sun,  Sun Microsystems,  the Sun logo,  Java,  JavaServer Pages,  Java

-Naming and Directory Interface,  JDBC,  JDK,  JavaMail and  and

-Enterprise JavaBeans are trademarks or registered trademarks of Sun

-Microsystems, Inc. in the U.S. and other countries.

-

-Federal Acquisitions: Commercial Software - Government Users Subject to

-Standard License Terms and Conditions.

-

-DOCUMENTATION IS PROVIDED "AS IS" AND ALL EXPRESS OR IMPLIED

-CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED

-WARRANTY OF MERCHANTABILITY, FITNESS FOR FOR A PARTICULAR PURPOSE OR

-NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH

-DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.

-

-

-_________________________________________________________________________

-

-Copyright (c) 2000 Sun Microsystems, Inc.,

-901 San Antonio Road,

-Palo Alto, California 94303, E'tats-Unis.

-Tous droits re'serve's.

-

-Sun Microsystems, Inc. a les droits de proprie'te' intellectuels

-relatants a` la technologie incorpore'e dans le produit qui est de'crit

-dans ce document. En particulier, et sans la limitation, ces droits de

-proprie'te' intellectuels peuvent inclure un ou plus des brevets

-ame'ricains e'nume're's a` http://www.sun.com/patents et un ou les

-brevets plus supple'mentaires ou les applications de brevet en attente

-dans les E'tats-Unis et dans les autres pays.

-

-Ce produit ou document est prote'ge' par un copyright et distribue'

-avec des licences qui en restreignent l'utilisation, la copie, la

-distribution, et la de'compilation.  Ce documention associe n peut

-e^tre reproduite et distribuer, par quelque moyen que ce soit, sans

-l'autorisation pre'alable et e'crite de Sun et de ses bailleurs de

-licence, le cas e'che'ant.

-

-Le logiciel de'tenu par des tiers, et qui comprend la technologie

-relative aux polices de caracte`res, est prote'ge' par un copyright et

-licencie' par des fournisseurs de Sun.

-

-Sun,  Sun Microsystems,  le logo Sun,  Java,  JavaServer Pages,  Java

-Naming and Directory Interface,  JDBC,  JDK,  JavaMail et  and

-Enterprise JavaBeans sont des marques de fabrique ou des marques

-de'pose'es de Sun Microsystems, Inc. aux E'tats-Unis et dans d'autres

-pays.

-

-LA DOCUMENTATION EST FOURNIE "EN L'E'TAT" ET TOUTES AUTRES CONDITIONS,

-DECLARATIONS ET GARANTIES EXPRESSES OU TACITES SONT FORMELLEMENT

-EXCLUES, DANS LA MESURE AUTORISEE PAR LA LOI APPLICABLE, Y COMPRIS

-NOTAMMENT TOUTE GARANTIE IMPLICITE RELATIVE A LA QUALITE MARCHANDE, A

-L'APTITUDE A UNE UTILISATION PARTICULIERE OU A L'ABSENCE DE

-CONTREFAC,ON.

--->

-

-<!--

-This is the XML DTD for the Servlet 2.3 deployment descriptor.

-All Servlet 2.3 deployment descriptors must include a DOCTYPE

-of the following form:

-

-  <!DOCTYPE web-app PUBLIC

-	"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"

-	"http://java.sun.com/dtd/web-app_2_3.dtd">

-

--->

-

-<!--

-The following conventions apply to all J2EE deployment descriptor

-elements unless indicated otherwise.

-

-- In elements that contain PCDATA, leading and trailing whitespace

-  in the data may be ignored.

-

-- In elements whose value is an "enumerated type", the value is

-  case sensitive.

-

-- In elements that specify a pathname to a file within the same

-  JAR file, relative filenames (i.e., those not starting with "/")

-  are considered relative to the root of the JAR file's namespace.

-  Absolute filenames (i.e., those starting with "/") also specify

-  names in the root of the JAR file's namespace.  In general, relative

-  names are preferred.  The exception is .war files where absolute

-  names are preferred for consistency with the servlet API.

--->

-

-

-<!--

-The web-app element is the root of the deployment descriptor for

-a web application.

--->

-<!ELEMENT web-app (icon?, display-name?, description?, distributable?,

-context-param*, filter*, filter-mapping*, listener*, servlet*,

-servlet-mapping*, session-config?, mime-mapping*, welcome-file-list?,

-error-page*, taglib*, resource-env-ref*, resource-ref*, security-constraint*,

-login-config?, security-role*, env-entry*, ejb-ref*,  ejb-local-ref*)>

-

-<!--

-The auth-constraint element indicates the user roles that should

-be permitted access to this resource collection. The role-name

-used here must either correspond to the role-name of one of the

-security-role elements defined for this web application, or be

-the specially reserved role-name "*" that is a compact syntax for

-indicating all roles in the web application. If both "*" and

-rolenames appear, the container interprets this as all roles.

-If no roles are defined, no user is allowed access to the portion of

-the web application described by the containing security-constraint.

-The container matches role names case sensitively when determining

-access.

-

-

-Used in: security-constraint

--->

-<!ELEMENT auth-constraint (description?, role-name*)>

-

-<!--

-The auth-method element is used to configure the authentication

-mechanism for the web application. As a prerequisite to gaining access to any web resources which are protected by an authorization

-constraint, a user must have authenticated using the configured

-mechanism. Legal values for this element are "BASIC", "DIGEST",

-"FORM", or "CLIENT-CERT".

-

-Used in: login-config

--->

-<!ELEMENT auth-method (#PCDATA)>

-

-<!--

-The context-param element contains the declaration of a web

-application's servlet context initialization parameters.

-

-Used in: web-app

--->

-<!ELEMENT context-param (param-name, param-value, description?)>

-

-<!--

-The description element is used to provide text describing the parent

-element.  The description element should include any information that

-the web application war file producer wants to provide to the consumer of

-the web application war file (i.e., to the Deployer). Typically, the tools

-used by the web application war file consumer will display the description

-when processing the parent element that contains the description.

-

-Used in: auth-constraint, context-param, ejb-local-ref, ejb-ref,

-env-entry, filter, init-param, resource-env-ref, resource-ref, run-as,

-security-role, security-role-ref, servlet, user-data-constraint,

-web-app, web-resource-collection

--->

-<!ELEMENT description (#PCDATA)>

-

-<!--

-The display-name element contains a short name that is intended to be

-displayed by tools.  The display name need not be unique.

-

-Used in: filter, security-constraint, servlet, web-app

-

-Example:

-

-<display-name>Employee Self Service</display-name>

--->

-<!ELEMENT display-name (#PCDATA)>

-

-<!--

-The distributable element, by its presence in a web application

-deployment descriptor, indicates that this web application is

-programmed appropriately to be deployed into a distributed servlet

-container

-

-Used in: web-app

--->

-<!ELEMENT distributable EMPTY>

-

-<!--

-The ejb-link element is used in the ejb-ref or ejb-local-ref

-elements to specify that an EJB reference is linked to an

-enterprise bean.

-

-The name in the ejb-link element is composed of a

-path name specifying the ejb-jar containing the referenced enterprise

-bean with the ejb-name of the target bean appended and separated from

-the path name by "#".  The path name is relative to the war file

-containing the web application that is referencing the enterprise bean.

-This allows multiple enterprise beans with the same ejb-name to be

-uniquely identified.

-

-Used in: ejb-local-ref, ejb-ref

-

-Examples:

-

-	<ejb-link>EmployeeRecord</ejb-link>

-

-	<ejb-link>../products/product.jar#ProductEJB</ejb-link>

-

--->

-<!ELEMENT ejb-link (#PCDATA)>

-

-<!--

-The ejb-local-ref element is used for the declaration of a reference to

-an enterprise bean's local home. The declaration consists of:

-

-	- an optional description

-	- the EJB reference name used in the code of the web application

-	  that's referencing the enterprise bean

-	- the expected type of the referenced enterprise bean

-	- the expected local home and local interfaces of the referenced

-	  enterprise bean

-	- optional ejb-link information, used to specify the referenced

-	  enterprise bean

-

-Used in: web-app

--->

-<!ELEMENT ejb-local-ref (description?, ejb-ref-name, ejb-ref-type,

-		local-home, local, ejb-link?)>

-

-<!--

-The ejb-ref element is used for the declaration of a reference to

-an enterprise bean's home. The declaration consists of:

-

-	- an optional description

-	- the EJB reference name used in the code of

-	  the web application that's referencing the enterprise bean

-	- the expected type of the referenced enterprise bean

-	- the expected home and remote interfaces of the referenced

-	  enterprise bean

-	- optional ejb-link information, used to specify the referenced

-	  enterprise bean

-

-Used in: web-app

--->

-<!ELEMENT ejb-ref (description?, ejb-ref-name, ejb-ref-type,

-		home, remote, ejb-link?)>

-

-<!--

-The ejb-ref-name element contains the name of an EJB reference. The

-EJB reference is an entry in the web application's environment and is

-relative to the java:comp/env context.  The name must be unique

-within the web application.

-

-It is recommended that name is prefixed with "ejb/".

-

-Used in: ejb-local-ref, ejb-ref

-

-Example:

-

-<ejb-ref-name>ejb/Payroll</ejb-ref-name>

--->

-<!ELEMENT ejb-ref-name (#PCDATA)>

-

-<!--

-The ejb-ref-type element contains the expected type of the

-referenced enterprise bean.

-

-The ejb-ref-type element must be one of the following:

-

-	<ejb-ref-type>Entity</ejb-ref-type>

-	<ejb-ref-type>Session</ejb-ref-type>

-

-Used in: ejb-local-ref, ejb-ref

--->

-<!ELEMENT ejb-ref-type (#PCDATA)>

-

-<!--

-The env-entry element contains the declaration of a web application's

-environment entry. The declaration consists of an optional

-description, the name of the environment entry, and an optional

-value.  If a value is not specified, one must be supplied

-during deployment.

--->

-<!ELEMENT env-entry (description?, env-entry-name, env-entry-value?,

-env-entry-type)>

-

-<!--

-The env-entry-name element contains the name of a web applications's

-environment entry.  The name is a JNDI name relative to the

-java:comp/env context.  The name must be unique within a web application.

-

-Example:

-

-<env-entry-name>minAmount</env-entry-name>

-

-Used in: env-entry

--->

-<!ELEMENT env-entry-name (#PCDATA)>

-

-<!--

-The env-entry-type element contains the fully-qualified Java type of

-the environment entry value that is expected by the web application's

-code.

-

-The following are the legal values of env-entry-type:

-

-	java.lang.Boolean

-	java.lang.Byte

-	java.lang.Character

-	java.lang.String

-	java.lang.Short

-	java.lang.Integer

-	java.lang.Long

-	java.lang.Float

-	java.lang.Double

-

-Used in: env-entry

--->

-<!ELEMENT env-entry-type (#PCDATA)>

-

-<!--

-The env-entry-value element contains the value of a web application's

-environment entry. The value must be a String that is valid for the

-constructor of the specified type that takes a single String

-parameter, or for java.lang.Character, a single character.

-

-Example:

-

-<env-entry-value>100.00</env-entry-value>

-

-Used in: env-entry

--->

-<!ELEMENT env-entry-value (#PCDATA)>

-

-<!--

-The error-code contains an HTTP error code, ex: 404

-

-Used in: error-page

--->

-<!ELEMENT error-code (#PCDATA)>

-

-<!--

-The error-page element contains a mapping between an error code

-or exception type to the path of a resource in the web application

-

-Used in: web-app

--->

-<!ELEMENT error-page ((error-code | exception-type), location)>

-

-<!--

-The exception type contains a fully qualified class name of a

-Java exception type.

-

-Used in: error-page

--->

-<!ELEMENT exception-type (#PCDATA)>

-

-<!--

-The extension element contains a string describing an

-extension. example: "txt"

-

-Used in: mime-mapping

--->

-<!ELEMENT extension (#PCDATA)>

-

-<!--

-Declares a filter in the web application. The filter is mapped to

-either a servlet or a URL pattern in the filter-mapping element, using

-the filter-name value to reference. Filters can access the

-initialization parameters declared in the deployment descriptor at

-runtime via the FilterConfig interface.

-

-Used in: web-app

--->

-<!ELEMENT filter (icon?, filter-name, display-name?, description?,

-filter-class, init-param*)>

-

-<!--

-The fully qualified classname of the filter.

-

-Used in: filter

--->

-<!ELEMENT filter-class (#PCDATA)>

-

-<!--

-Declaration of the filter mappings in this web application. The

-container uses the filter-mapping declarations to decide which filters

-to apply to a request, and in what order. The container matches the

-request URI to a Servlet in the normal way. To determine which filters

-to apply it matches filter-mapping declarations either on servlet-name,

-or on url-pattern for each filter-mapping element, depending on which

-style is used. The order in which filters are invoked is the order in

-which filter-mapping declarations that match a request URI for a

-servlet appear in the list of filter-mapping elements.The filter-name

-value must be the value of the <filter-name> sub-elements of one of the

-<filter> declarations in the deployment descriptor.

-

-Used in: web-app

--->

-<!ELEMENT filter-mapping (filter-name, (url-pattern | servlet-name))>

-

-<!--

-The logical name of the filter. This name is used to map the filter.

-Each filter name is unique within the web application.

-

-Used in: filter, filter-mapping

--->

-<!ELEMENT filter-name (#PCDATA)>

-

-<!--

-The form-error-page element defines the location in the web app

-where the error page that is displayed when login is not successful

-can be found. The path begins with a leading / and is interpreted

-relative to the root of the WAR.

-

-Used in: form-login-config

--->

-<!ELEMENT form-error-page (#PCDATA)>

-

-<!--

-The form-login-config element specifies the login and error pages

-that should be used in form based login. If form based authentication

-is not used, these elements are ignored.

-

-Used in: login-config

--->

-<!ELEMENT form-login-config (form-login-page, form-error-page)>

-

-<!--

-The form-login-page element defines the location in the web app

-where the page that can be used for login can be found. The path

-begins with a leading / and is interpreted relative to the root of the WAR.

-

-Used in: form-login-config

--->

-<!ELEMENT form-login-page (#PCDATA)>

-

-<!--

-The home element contains the fully-qualified name of the enterprise

-bean's home interface.

-

-Used in: ejb-ref

-

-Example:

-

-<home>com.aardvark.payroll.PayrollHome</home>

--->

-<!ELEMENT home (#PCDATA)>

-

-<!--

-The http-method contains an HTTP method (GET | POST |...).

-

-Used in: web-resource-collection

--->

-<!ELEMENT http-method (#PCDATA)>

-

-<!--

-The icon element contains small-icon and large-icon elements that

-specify the file names for small and a large GIF or JPEG icon images

-used to represent the parent element in a GUI tool.

-

-Used in: filter, servlet, web-app

--->

-<!ELEMENT icon (small-icon?, large-icon?)>

-

-<!--

-The init-param element contains a name/value pair as an

-initialization param of the servlet

-

-Used in: filter, servlet

--->

-<!ELEMENT init-param (param-name, param-value, description?)>

-

-<!--

-The jsp-file element contains the full path to a JSP file within

-the web application beginning with a `/'.

-

-Used in: servlet

--->

-<!ELEMENT jsp-file (#PCDATA)>

-

-<!--

-The large-icon element contains the name of a file

-containing a large (32 x 32) icon image. The file

-name is a relative path within the web application's

-war file.

-

-The image may be either in the JPEG or GIF format.

-The icon can be used by tools.

-

-Used in: icon

-

-Example:

-

-<large-icon>employee-service-icon32x32.jpg</large-icon>

--->

-<!ELEMENT large-icon (#PCDATA)>

-

-<!--

-The listener element indicates the deployment properties for a web

-application listener bean.

-

-Used in: web-app

--->

-<!ELEMENT listener (listener-class)>

-

-<!--

-The listener-class element declares a class in the application must be

-registered as a web application listener bean. The value is the fully qualified classname of the listener class.

-

-

-Used in: listener

--->

-<!ELEMENT listener-class (#PCDATA)>

-

-<!--

-The load-on-startup element indicates that this servlet should be

-loaded (instantiated and have its init() called) on the startup

-of the web application. The optional contents of

-these element must be an integer indicating the order in which

-the servlet should be loaded. If the value is a negative integer,

-or the element is not present, the container is free to load the

-servlet whenever it chooses. If the value is a positive integer

-or 0, the container must load and initialize the servlet as the

-application is deployed. The container must guarantee that

-servlets marked with lower integers are loaded before servlets

-marked with higher integers. The container may choose the order

-of loading of servlets with the same load-on-start-up value.

-

-Used in: servlet

--->

-<!ELEMENT load-on-startup (#PCDATA)>

-

-<!--

-

-The local element contains the fully-qualified name of the

-enterprise bean's local interface.

-

-Used in: ejb-local-ref

-

--->

-<!ELEMENT local (#PCDATA)>

-

-<!--

-

-The local-home element contains the fully-qualified name of the

-enterprise bean's local home interface.

-

-Used in: ejb-local-ref

--->

-<!ELEMENT local-home (#PCDATA)>

-

-<!--

-The location element contains the location of the resource in the web

-application relative to the root of the web application. The value of

-the location must have a leading `/'.

-

-Used in: error-page

--->

-<!ELEMENT location (#PCDATA)>

-

-<!--

-The login-config element is used to configure the authentication

-method that should be used, the realm name that should be used for

-this application, and the attributes that are needed by the form login

-mechanism.

-

-Used in: web-app

--->

-<!ELEMENT login-config (auth-method?, realm-name?, form-login-config?)>

-

-<!--

-The mime-mapping element defines a mapping between an extension

-and a mime type.

-

-Used in: web-app

--->

-<!ELEMENT mime-mapping (extension, mime-type)>

-

-<!--

-The mime-type element contains a defined mime type. example:

-"text/plain"

-

-Used in: mime-mapping

--->

-<!ELEMENT mime-type (#PCDATA)>

-

-<!--

-The param-name element contains the name of a parameter. Each parameter

-name must be unique in the web application.

-

-

-Used in: context-param, init-param

--->

-<!ELEMENT param-name (#PCDATA)>

-

-<!--

-The param-value element contains the value of a parameter.

-

-Used in: context-param, init-param

--->

-<!ELEMENT param-value (#PCDATA)>

-

-<!--

-The realm name element specifies the realm name to use in HTTP

-Basic authorization.

-

-Used in: login-config

--->

-<!ELEMENT realm-name (#PCDATA)>

-

-<!--

-The remote element contains the fully-qualified name of the enterprise

-bean's remote interface.

-

-Used in: ejb-ref

-

-Example:

-

-<remote>com.wombat.empl.EmployeeService</remote>

--->

-<!ELEMENT remote (#PCDATA)>

-

-<!--

-The res-auth element specifies whether the web application code signs

-on programmatically to the resource manager, or whether the Container

-will sign on to the resource manager on behalf of the web application. In the

-latter case, the Container uses information that is supplied by the

-Deployer.

-

-The value of this element must be one of the two following:

-

-	<res-auth>Application</res-auth>

-	<res-auth>Container</res-auth>

-

-Used in: resource-ref

--->

-<!ELEMENT res-auth (#PCDATA)>

-

-<!--

-The res-ref-name element specifies the name of a resource manager

-connection factory reference.  The name is a JNDI name relative to the

-java:comp/env context.  The name must be unique within a web application.

-

-Used in: resource-ref

--->

-<!ELEMENT res-ref-name (#PCDATA)>

-

-<!--

-The res-sharing-scope element specifies whether connections obtained

-through the given resource manager connection factory reference can be

-shared. The value of this element, if specified, must be one of the

-two following:

-

-	<res-sharing-scope>Shareable</res-sharing-scope>

-	<res-sharing-scope>Unshareable</res-sharing-scope>

-

-The default value is Shareable.

-

-Used in: resource-ref

--->

-<!ELEMENT res-sharing-scope (#PCDATA)>

-

-<!--

-The res-type element specifies the type of the data source. The type

-is specified by the fully qualified Java language class or interface

-expected to be implemented by the data source.

-

-Used in: resource-ref

--->

-<!ELEMENT res-type (#PCDATA)>

-

-<!--

-The resource-env-ref element contains a declaration of a web application's

-reference to an administered object associated with a resource

-in the web application's environment.  It consists of an optional

-description, the resource environment reference name, and an

-indication of the resource environment reference type expected by

-the web application code.

-

-Used in: web-app

-

-Example:

-

-<resource-env-ref>

-    <resource-env-ref-name>jms/StockQueue</resource-env-ref-name>

-    <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>

-</resource-env-ref>

--->

-<!ELEMENT resource-env-ref (description?, resource-env-ref-name,

-		resource-env-ref-type)>

-

-<!--

-The resource-env-ref-name element specifies the name of a resource

-environment reference; its value is the environment entry name used in

-the web application code.  The name is a JNDI name relative to the

-java:comp/env context and must be unique within a web application.

-

-Used in: resource-env-ref

--->

-<!ELEMENT resource-env-ref-name (#PCDATA)>

-

-<!--

-The resource-env-ref-type element specifies the type of a resource

-environment reference.  It is the fully qualified name of a Java

-language class or interface.

-

-Used in: resource-env-ref

--->

-<!ELEMENT resource-env-ref-type (#PCDATA)>

-

-<!--

-The resource-ref element contains a declaration of a web application's

-reference to an external resource. It consists of an optional

-description, the resource manager connection factory reference name,

-the indication of the resource manager connection factory type

-expected by the web application code, the type of authentication

-(Application or Container), and an optional specification of the

-shareability of connections obtained from the resource (Shareable or

-Unshareable).

-

-Used in: web-app

-

-Example:

-

-    <resource-ref>

-	<res-ref-name>jdbc/EmployeeAppDB</res-ref-name>

-	<res-type>javax.sql.DataSource</res-type>

-	<res-auth>Container</res-auth>

-	<res-sharing-scope>Shareable</res-sharing-scope>

-    </resource-ref>

--->

-<!ELEMENT resource-ref (description?, res-ref-name, res-type, res-auth,

-		res-sharing-scope?)>

-

-<!--

-The role-link element is a reference to a defined security role. The

-role-link element must contain the name of one of the security roles

-defined in the security-role elements.

-

-Used in: security-role-ref

--->

-<!ELEMENT role-link (#PCDATA)>

-

-<!--

-The role-name element contains the name of a security role.

-

-The name must conform to the lexical rules for an NMTOKEN.

-

-Used in: auth-constraint, run-as, security-role, security-role-ref

--->

-<!ELEMENT role-name (#PCDATA)>

-

-<!--

-The run-as element specifies the run-as identity to be used for the

-execution of the web application. It contains an optional description, and

-the name of a security role.

-

-Used in: servlet

--->

-<!ELEMENT run-as (description?, role-name)>

-

-<!--

-The security-constraint element is used to associate security

-constraints with one or more web resource collections

-

-Used in: web-app

--->

-<!ELEMENT security-constraint (display-name?, web-resource-collection+,

-auth-constraint?, user-data-constraint?)>

-

-<!--

-The security-role element contains the definition of a security

-role. The definition consists of an optional description of the

-security role, and the security role name.

-

-Used in: web-app

-

-Example:

-

-    <security-role>

-	<description>

-	    This role includes all employees who are authorized

-	    to access the employee service application.

-	</description>

-	<role-name>employee</role-name>

-    </security-role>

--->

-<!ELEMENT security-role (description?, role-name)>

-

-<!--

-The security-role-ref element contains the declaration of a security

-role reference in the web application's code. The declaration consists

-of an optional description, the security role name used in the code,

-and an optional link to a security role. If the security role is not

-specified, the Deployer must choose an appropriate security role.

-

-The value of the role-name element must be the String used as the

-parameter to the EJBContext.isCallerInRole(String roleName) method

-or the HttpServletRequest.isUserInRole(String role) method.

-

-Used in: servlet

-

--->

-<!ELEMENT security-role-ref (description?, role-name, role-link?)>

-

-<!--

-The servlet element contains the declarative data of a

-servlet. If a jsp-file is specified and the load-on-startup element is

-present, then the JSP should be precompiled and loaded.

-

-Used in: web-app

--->

-<!ELEMENT servlet (icon?, servlet-name, display-name?, description?,

-(servlet-class|jsp-file), init-param*, load-on-startup?, run-as?, security-role-ref*)>

-

-<!--

-The servlet-class element contains the fully qualified class name

-of the servlet.

-

-Used in: servlet

--->

-<!ELEMENT servlet-class (#PCDATA)>

-

-<!--

-The servlet-mapping element defines a mapping between a servlet

-and a url pattern

-

-Used in: web-app

--->

-<!ELEMENT servlet-mapping (servlet-name, url-pattern)>

-

-<!--

-The servlet-name element contains the canonical name of the

-servlet. Each servlet name is unique within the web application.

-

-Used in: filter-mapping, servlet, servlet-mapping

--->

-<!ELEMENT servlet-name (#PCDATA)>

-

-<!--

-The session-config element defines the session parameters for

-this web application.

-

-Used in: web-app

--->

-<!ELEMENT session-config (session-timeout?)>

-

-<!--

-The session-timeout element defines the default session timeout

-interval for all sessions created in this web application. The

-specified timeout must be expressed in a whole number of minutes.

-If the timeout is 0 or less, the container ensures the default

-behaviour of sessions is never to time out.

-

-Used in: session-config

--->

-<!ELEMENT session-timeout (#PCDATA)>

-

-<!--

-The small-icon element contains the name of a file

-containing a small (16 x 16) icon image. The file

-name is a relative path within the web application's

-war file.

-

-The image may be either in the JPEG or GIF format.

-The icon can be used by tools.

-

-Used in: icon

-

-Example:

-

-<small-icon>employee-service-icon16x16.jpg</small-icon>

--->

-<!ELEMENT small-icon (#PCDATA)>

-

-<!--

-The taglib element is used to describe a JSP tag library.

-

-Used in: web-app

--->

-<!ELEMENT taglib (taglib-uri, taglib-location)>

-

-<!--

-the taglib-location element contains the location (as a resource

-relative to the root of the web application) where to find the Tag

-Libary Description file for the tag library.

-

-Used in: taglib

--->

-<!ELEMENT taglib-location (#PCDATA)>

-

-<!--

-The taglib-uri element describes a URI, relative to the location

-of the web.xml document, identifying a Tag Library used in the Web

-Application.

-

-Used in: taglib

--->

-<!ELEMENT taglib-uri (#PCDATA)>

-

-<!--

-The transport-guarantee element specifies that the communication

-between client and server should be NONE, INTEGRAL, or

-CONFIDENTIAL. NONE means that the application does not require any

-transport guarantees. A value of INTEGRAL means that the application

-requires that the data sent between the client and server be sent in

-such a way that it can't be changed in transit. CONFIDENTIAL means

-that the application requires that the data be transmitted in a

-fashion that prevents other entities from observing the contents of

-the transmission. In most cases, the presence of the INTEGRAL or

-CONFIDENTIAL flag will indicate that the use of SSL is required.

-

-Used in: user-data-constraint

--->

-<!ELEMENT transport-guarantee (#PCDATA)>

-

-<!--

-The url-pattern element contains the url pattern of the mapping. Must

-follow the rules specified in Section 11.2 of the Servlet API

-Specification.

-

-Used in: filter-mapping, servlet-mapping, web-resource-collection

--->

-<!ELEMENT url-pattern (#PCDATA)>

-

-<!--

-The user-data-constraint element is used to indicate how data

-communicated between the client and container should be protected.

-

-Used in: security-constraint

--->

-<!ELEMENT user-data-constraint (description?, transport-guarantee)>

-

-<!--

-The web-resource-collection element is used to identify a subset

-of the resources and HTTP methods on those resources within a web

-application to which a security constraint applies. If no HTTP methods

-are specified, then the security constraint applies to all HTTP

-methods.

-

-Used in: security-constraint

--->

-<!ELEMENT web-resource-collection (web-resource-name, description?,

-url-pattern*, http-method*)>

-

-<!--

-The web-resource-name contains the name of this web resource

-collection.

-

-Used in: web-resource-collection

--->

-<!ELEMENT web-resource-name (#PCDATA)>

-

-<!--

-The welcome-file element contains file name to use as a default

-welcome file, such as index.html

-

-Used in: welcome-file-list

--->

-<!ELEMENT welcome-file (#PCDATA)>

-

-<!--

-The welcome-file-list contains an ordered list of welcome files

-elements.

-

-Used in: web-app

--->

-<!ELEMENT welcome-file-list (welcome-file+)>

-

-<!--

-The ID mechanism is to allow tools that produce additional deployment

-information (i.e., information beyond the standard deployment

-descriptor information) to store the non-standard information in a

-separate file, and easily refer from these tool-specific files to the

-information in the standard deployment descriptor.

-

-Tools are not allowed to add the non-standard information into the

-standard deployment descriptor.

--->

-

-<!ATTLIST auth-constraint id ID #IMPLIED>

-<!ATTLIST auth-method id ID #IMPLIED>

-<!ATTLIST context-param id ID #IMPLIED>

-<!ATTLIST description id ID #IMPLIED>

-<!ATTLIST display-name id ID #IMPLIED>

-<!ATTLIST distributable id ID #IMPLIED>

-<!ATTLIST ejb-link id ID #IMPLIED>

-<!ATTLIST ejb-local-ref id ID #IMPLIED>

-<!ATTLIST ejb-ref id ID #IMPLIED>

-<!ATTLIST ejb-ref-name id ID #IMPLIED>

-<!ATTLIST ejb-ref-type id ID #IMPLIED>

-<!ATTLIST env-entry id ID #IMPLIED>

-<!ATTLIST env-entry-name id ID #IMPLIED>

-<!ATTLIST env-entry-type id ID #IMPLIED>

-<!ATTLIST env-entry-value id ID #IMPLIED>

-<!ATTLIST error-code id ID #IMPLIED>

-<!ATTLIST error-page id ID #IMPLIED>

-<!ATTLIST exception-type id ID #IMPLIED>

-<!ATTLIST extension id ID #IMPLIED>

-<!ATTLIST filter id ID #IMPLIED>

-<!ATTLIST filter-class id ID #IMPLIED>

-<!ATTLIST filter-mapping id ID #IMPLIED>

-<!ATTLIST filter-name id ID #IMPLIED>

-<!ATTLIST form-error-page id ID #IMPLIED>

-<!ATTLIST form-login-config id ID #IMPLIED>

-<!ATTLIST form-login-page id ID #IMPLIED>

-<!ATTLIST home id ID #IMPLIED>

-<!ATTLIST http-method id ID #IMPLIED>

-<!ATTLIST icon id ID #IMPLIED>

-<!ATTLIST init-param id ID #IMPLIED>

-<!ATTLIST jsp-file id ID #IMPLIED>

-<!ATTLIST large-icon id ID #IMPLIED>

-<!ATTLIST listener id ID #IMPLIED>

-<!ATTLIST listener-class id ID #IMPLIED>

-<!ATTLIST load-on-startup id ID #IMPLIED>

-<!ATTLIST local id ID #IMPLIED>

-<!ATTLIST local-home id ID #IMPLIED>

-<!ATTLIST location id ID #IMPLIED>

-<!ATTLIST login-config id ID #IMPLIED>

-<!ATTLIST mime-mapping id ID #IMPLIED>

-<!ATTLIST mime-type id ID #IMPLIED>

-<!ATTLIST param-name id ID #IMPLIED>

-<!ATTLIST param-value id ID #IMPLIED>

-<!ATTLIST realm-name id ID #IMPLIED>

-<!ATTLIST remote id ID #IMPLIED>

-<!ATTLIST res-auth id ID #IMPLIED>

-<!ATTLIST res-ref-name id ID #IMPLIED>

-<!ATTLIST res-sharing-scope id ID #IMPLIED>

-<!ATTLIST res-type id ID #IMPLIED>

-<!ATTLIST resource-env-ref id ID #IMPLIED>

-<!ATTLIST resource-env-ref-name id ID #IMPLIED>

-<!ATTLIST resource-env-ref-type id ID #IMPLIED>

-<!ATTLIST resource-ref id ID #IMPLIED>

-<!ATTLIST role-link id ID #IMPLIED>

-<!ATTLIST role-name id ID #IMPLIED>

-<!ATTLIST run-as id ID #IMPLIED>

-<!ATTLIST security-constraint id ID #IMPLIED>

-<!ATTLIST security-role id ID #IMPLIED>

-<!ATTLIST security-role-ref id ID #IMPLIED>

-<!ATTLIST servlet id ID #IMPLIED>

-<!ATTLIST servlet-class id ID #IMPLIED>

-<!ATTLIST servlet-mapping id ID #IMPLIED>

-<!ATTLIST servlet-name id ID #IMPLIED>

-<!ATTLIST session-config id ID #IMPLIED>

-<!ATTLIST session-timeout id ID #IMPLIED>

-<!ATTLIST small-icon id ID #IMPLIED>

-<!ATTLIST taglib id ID #IMPLIED>

-<!ATTLIST taglib-location id ID #IMPLIED>

-<!ATTLIST taglib-uri id ID #IMPLIED>

-<!ATTLIST transport-guarantee id ID #IMPLIED>

-<!ATTLIST url-pattern id ID #IMPLIED>

-<!ATTLIST user-data-constraint id ID #IMPLIED>

-<!ATTLIST web-app id ID #IMPLIED>

-<!ATTLIST web-resource-collection id ID #IMPLIED>

-<!ATTLIST web-resource-name id ID #IMPLIED>

-<!ATTLIST welcome-file id ID #IMPLIED>

-<!ATTLIST welcome-file-list id ID #IMPLIED>

diff --git a/src/webapp/global-sitemap.xmap b/src/webapp/global-sitemap.xmap
deleted file mode 100644
index d90745f..0000000
--- a/src/webapp/global-sitemap.xmap
+++ /dev/null
@@ -1,389 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-    
-<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
-
-<!-- =========================== Resources ================================= -->
-
-  <!--+
-      | Resources are pipeline fragments that may be used from different
-      | pipeline fragments. For our needs, they behave exactly like
-      | pipelines, only that they are not accessible from outside.
-      | Hence I will explain what's inside below for pipelines.
-      +-->
-  <map:resources>
-
-    <map:resource name="navigation">
-      <map:generate src="lenya/pubs/{pub_id}/content/live/sitetree.xml" />
-      <map:transform src="lenya/xslt/util/sitetree2navigation.xsl">
-        <map:parameter name="nav_id" value="{nav_id}"/>
-      </map:transform>
-    </map:resource>
-   
-    <map:resource name="style-cms-page">
-    <!-- FIXME: due to resolver issues, i18n can currently not be used outside
-        of a publication IF you do not make a hit into a publication context first.     
-         <map:transform type="i18n">      
-        <map:parameter name="locale" value="{request:locale}"/>
-      </map:transform>    
--->      <map:transform src="lenya/xslt/util/page2xhtml.xsl">
-        <map:parameter name="contextprefix" value="{request:contextPath}"/>
-      </map:transform>
-      <map:transform src="lenya/xslt/util/strip_namespaces.xsl"/>
-      <map:serialize type="xhtml"/>
-    </map:resource>
-   
-    <map:resource name="i18n">
-      <map:transform type="i18n">
-        <map:parameter name="locale" value="{request:locale}"/>
-      </map:transform>
-    </map:resource>
- </map:resources>
-
-<!-- =========================== Pipelines ================================= -->
-
- <!--+
-     | Pipelines. The beef. Pipelines specify how the processing of your
-     | content is done. Usually, a pipeline consists of several fragments
-     | that specify the generation, transformation, and serialization of
-     | SAX events.
-     |
-     | Processing is done in two steps:
-     |
-     | 1) The top level elements are executed in order of appearance until
-     |    one signals success. These top level elements are usually
-     |    matchers.
-     |
-     |    Other components are called depth-first to determine what
-     |    fragments make up the processing pipeline. When a component
-     |    fails, no nested components are called but the next component on
-     |    the same level.
-     |
-     | 2) Once it is determined which generator, which transformers and
-     |    wich serializer is used, these components are executed. During
-     |    this, the pipeline may not be changed.
-     |
-     | You may have as many pipelines in your sitemap as you like.
-     +-->
- <map:pipelines>
-
-  <map:component-configurations>
-    <global-variables>
-       <!--+
-           | Define global parameters here:
-           |   <skin>my_skin</skin>
-           |   ...
-           | You can access them by {global:*name*}, e.g. {global:skin}.
-           | These values are inherited into sub-sitemaps and can
-           | be extended there.
-           +-->
-    </global-variables>
-  </map:component-configurations>
-
-<!-- =========================== Pipelines ================================= -->
-
-    <map:pipeline>
-      <map:match pattern="publications.xml">
-        <map:generate type="directory" src="lenya/pubs"/>
-        <map:transform src="lenya/xslt/util/xinclude.xsl"/>
-        <map:transform type="xinclude"/>
-        <map:serialize type="xml"/>
-      </map:match>
-    </map:pipeline>
-
-
-    <!-- Search with Lucene -->
-    <map:pipeline>
-      <map:match pattern="*/search-*/lucene*">
-        <map:mount uri-prefix="" src="{fallback:lenya/lucene.xmap}" check-reload="true" reload-method="synchron"/>
-      </map:match>
-    </map:pipeline>
-    <!-- /Search with Lucene -->
-
-    <!-- Editor Xopus -->
-    <map:pipeline>
-      <map:match pattern="xopus/**">
-        <map:mount uri-prefix="xopus" src="lenya/xopus.xmap" check-reload="true" reload-method="synchron"/>
-      </map:match>
-    </map:pipeline>
-
-    <!-- Editor BXE -->
-    <map:pipeline>
-      <map:match pattern="bxe/**">
-        <map:read src="lenya/resources/bxe/{1}"/>
-      </map:match>
-    </map:pipeline>
-
-    <!-- Editor Kupu -->
-    <map:pipeline>
-      <map:match pattern="kupu/**">
-        <map:read src="lenya/resources/kupu/{1}"/>
-      </map:match>
-    </map:pipeline>
-
-    <map:pipeline>
-      <!-- Lenya GUI -->
-      <map:match pattern="lenya/**">
-        <map:mount uri-prefix="lenya" src="lenya/lenya.xmap" check-reload="true" reload-method="synchron"/>
-      </map:match>
-            
-      <!-- Lenya page transformation -->
-      <!-- lenya-page/{publication-id}/{complete-area}/... -->
-      <map:match pattern="lenya-page/*/*/**">
-        <map:generate src="cocoon:/menu-xml/{1}/{2}/{3}"/>
-        
-        <map:call resource="i18n"/>
-        
-        <map:act type="resource-exists" src="lenya/pubs/{1}/config/workflow/">
-          <map:transform type="workflowmenu"/>
-        </map:act>
-        
-        <map:act type="resource-exists" src="lenya/pubs/{1}/config/ac/usecase-policies.xml">
-          <map:transform type="usecasemenu"/>
-        </map:act>
-        
-        <map:select type="request-parameter">
-          <map:parameter name="parameter-name" value="uiml"/>
-          <map:when test="xul">
-            <map:transform src="fallback://lenya/xslt/menu/menu2xul.xsl">
-              <map:parameter name="contextprefix" value="{request:contextPath}"/>
-              <map:parameter name="publicationid" value="{1}"/>
-              <map:parameter name="area" value="{2}"/>
-              <map:parameter name="documenturl" value="{page-envelope:document-url}"/>
-              <map:parameter name="documentid" value="{page-envelope:document-id}"/>
-              <map:parameter name="userid" value="{access-control:user-id}"/>
-              <map:parameter name="servertime" value="{date-i18n:currentDate}"/>
-              <map:parameter name="workflowstate" value="{workflow:state}"/>
-              <map:parameter name="islive" value="{workflow:variable.is_live}"/>
-              <map:parameter name="usecase" value="{request-param:lenya.usecase}"/>
-            </map:transform>
-          </map:when>
-          <map:otherwise>
-            <map:transform src="fallback://lenya/xslt/menu/menu2xhtml.xsl">
-              <map:parameter name="contextprefix" value="{request:contextPath}"/>
-              <map:parameter name="publicationid" value="{1}"/>
-              <map:parameter name="area" value="{2}"/>
-              <map:parameter name="documenturl" value="{page-envelope:document-url}"/>
-              <map:parameter name="documentid" value="{page-envelope:document-id}"/>
-              <map:parameter name="userid" value="{access-control:user-id}"/>
-              <map:parameter name="servertime" value="{date-i18n:currentDate}"/>
-              <map:parameter name="workflowstate" value="{workflow:state}"/>
-              <map:parameter name="islive" value="{workflow:variable.is_live}"/>
-              <map:parameter name="usecase" value="{request-param:lenya.usecase}"/>
-            </map:transform>
-          </map:otherwise>
-        </map:select>
-        
-        <map:call resource="i18n"/>
-        
-        <!-- Generate the meta-stylesheet -->
-        <map:select type="request-parameter">
-          <map:parameter name="parameter-name" value="uiml"/>
-          <map:when test="xul">
-            <map:transform src="fallback://lenya/xslt/menu/menu2xsltwithxul.xsl">
-              <map:parameter name="contextprefix" value="{request:contextPath}"/>
-              <map:parameter name="publicationid" value="{1}"/>
-              <map:parameter name="area" value="{2}"/>
-              <map:parameter name="documenturl" value="{page-envelope:document-url}"/>
-            </map:transform>
-          </map:when>
-          <map:otherwise>
-            <map:transform src="fallback://lenya/xslt/menu/menu2xslt.xsl">
-              <map:parameter name="contextprefix" value="{request:contextPath}"/>
-              <map:parameter name="publicationid" value="{1}"/>
-              <map:parameter name="area" value="{2}"/>
-              <map:parameter name="documenturl" value="{page-envelope:document-url}"/>
-            </map:transform>
-          </map:otherwise>
-        </map:select>
-        <map:serialize type="xml"/>
-      </map:match>
-      
-      <!-- menus -->
-      
-      <!-- menu-xml/{publication-id}/admin/... -->
-      <map:match pattern="menu-xml/*/admin/**" internal-only="true">
-        <map:generate type="serverpages" src="lenya/content/menus/admin.xsp"/>
-        <map:serialize type="xml"/>
-      </map:match>
-      
-      <!-- menu-xml/{publication-id}/... -->
-      <map:match pattern="menu-xml/*/**" internal-only="true">
-        <map:mount uri-prefix="menu-xml/{1}/" src="{fallback:menus.xmap}" check-reload="true" reload-method="synchron"/>
-      </map:match>
-      
-      <!-- navigation -->
-      <map:match pattern="navigation/**">
-        <map:mount uri-prefix="navigation" src="lenya/navigation.xmap" check-reload="true" reload-method="synchron"/>
-      </map:match>
-
-      <!-- Access Control Policies -->
-      <map:match pattern="*/policies/**">
-        <map:mount uri-prefix="{1}/policies" src="lenya/pubs/{1}/policies-sitemap.xmap" check-reload="true" reload-method="synchron"/>
-      </map:match>
-      
-      <!-- Admin area entry point: redirect to admin.users usecase -->
-      <map:match pattern="*/admin/**">
-        <map:select type="parameter">
-          <map:parameter name="parameter-selector-test" value="{request-param:lenya.usecase}"/>
-          <map:when test="">
-            <map:redirect-to session="true" uri="{request:requestURI}?lenya.usecase=admin.users"/>
-          </map:when>
-        </map:select>
-      </map:match>
-      
-    </map:pipeline>
-    
-    <!-- Internal usecases -->
-    <map:pipeline internal-only="true">
-      <map:match type="usecase" pattern="*">
-        <map:match pattern="core/*/**">
-          <map:mount uri-prefix="core/{1}" src="lenya/usecases/{1}/usecase.xmap"></map:mount>
-        </map:match>
-        <map:match pattern="*/**">
-          <map:mount uri-prefix="{1}" src="lenya/pubs/{1}/sitemap.xmap" check-reload="true" reload-method="synchron"/>
-        </map:match>
-      </map:match>
-    </map:pipeline>
-
-    <map:pipeline>
-      
-      <!-- Usecases -->
-      <map:match type="usecase" pattern="*">
-        <map:mount uri-prefix="" src="lenya/usecase.xmap" check-reload="true" reload-method="synchron"/>
-      </map:match>
-
-      <!-- Info area -->
-      <map:match pattern="*/*/info-sitetree/**">
-        <map:mount uri-prefix="" src="lenya/info.xmap" check-reload="true" reload-method="synchron"/>
-      </map:match>
-      <map:match pattern="*/info-*/**">
-        <map:mount uri-prefix="" src="lenya/info.xmap" check-reload="true" reload-method="synchron"/>
-      </map:match>
-    </map:pipeline>
-
-    <map:pipeline>
-      <map:match pattern="">
-        <map:select type="request-method">
-          <map:when test="PROPFIND">
-            <map:generate src="lenya/content/util/empty.xml" />
-            <map:transform src="lenya/xslt/exception/document-does-not-exist.xsl"/>
-            <map:transform src="lenya/xslt/util/page2xhtml.xsl" />
-            <map:serialize type="xhtml" status-code="404"/>            
-          </map:when>
-          <map:when test="OPTIONS">
-            <map:generate src="lenya/content/util/empty.xml" />
-            <map:transform src="lenya/xslt/exception/document-does-not-exist.xsl"/>
-            <map:transform src="lenya/xslt/util/page2xhtml.xsl" />
-            <map:serialize type="xhtml" status-code="404"/> 
-          </map:when>
-          <map:otherwise>
-            <map:redirect-to uri="index.html"/>
-          </map:otherwise>
-        </map:select>
-      </map:match>
-
-      <map:match pattern="index.html">
-        <map:aggregate element="lenya" ns="http://apache.org/cocoon/lenya/publication/1.0" prefix="lenya" label="aggregate">
-          <map:part src="cocoon:/publications.xml"/>
-          <map:part src="lenya/content/introduction.xml"/>
-        </map:aggregate>
-        <map:transform src="lenya/xslt/util/welcome.xsl"/>
-        <map:call resource="style-cms-page"/>
-      </map:match>
-      <map:match pattern="about.html">
-        <map:generate src="lenya/content/about.xml"/>
-        <map:call resource="style-cms-page"/>
-      </map:match>
-
-      <!-- Publications -->
-      <map:match pattern="*">
-        <map:select type="request-method">
-          <map:when test="PROPFIND">
-            <map:generate type="file" src="fallback://lenya/usecases/webdav/init.xml"/>
-            <map:serialize type="xml" status-code="207"/>
-          </map:when>
-          <map:when test="OPTIONS">
-            <map:mount uri-prefix="" src="{fallback://lenya/usecases/webdav/sitemap.xmap}" check-reload="true" reload-method="synchron"/>
-          </map:when>
-        </map:select>
-      </map:match> 
-
-      <map:match pattern="*/">
-        <map:select type="request-method">
-          <map:when test="PROPFIND">
-            <map:generate type="file" src="fallback://lenya/usecases/webdav/init.xml"/>
-            <map:serialize type="xml" status-code="207"/>
-          </map:when>
-          <map:when test="OPTIONS">
-            <map:mount uri-prefix="" src="{fallback://lenya/usecases/webdav/sitemap.xmap}" check-reload="true" reload-method="synchron"/>
-          </map:when>
-        </map:select>
-      </map:match>
-
-      <map:match pattern="*/">
-        <map:redirect-to uri="introduction.html"/>
-      </map:match>
-      <map:match pattern="*/index.html">
-        <map:redirect-to uri="introduction.html"/>
-      </map:match>
-
-      <!-- About Publication -->
-      <map:match pattern="*/introduction.html">
-        <map:generate src="lenya/pubs/{1}/publication.xml" />
-        <map:transform src="lenya/xslt/util/publication.xsl"/>
-        <map:call resource="style-cms-page"/>
-      </map:match>
-      <!-- Publication Tests-->
-      <map:match pattern="*/tests.html">
-        <map:generate src="lenya/pubs/{1}/publication-tests.xml" />
-        <map:transform src="lenya/xslt/util/publication.xsl"/>
-        <map:call resource="style-cms-page"/>
-      </map:match>
-      
-      <!-- Enter the actual publication (url = "") -->
-      <map:match pattern="*/">
-        <map:mount uri-prefix="{1}" src="lenya/pubs/{1}/sitemap.xmap" check-reload="true" reload-method="synchron"/>
-      </map:match>
-      
-      <!-- Resources -->
-      
-      <!-- {publication-id}/{area}/{file} -->
-      <map:match pattern="*/*/**">
-        <map:act type="resource-exists-enhanced">
-          <map:parameter name="url" value="fallback://resources/{2}/{3}"/>
-          <map:parameter name="type" value="file"/>
-          <map:mount uri-prefix="" src="lenya/resources.xmap" check-reload="true" reload-method="synchron"/>
-        </map:act>
-        <map:act type="resource-exists-enhanced">
-          <map:parameter name="url" value="fallback://resources/shared/{3}"/>
-          <map:parameter name="type" value="file"/>
-          <map:mount uri-prefix="" src="lenya/resources-shared.xmap" check-reload="true" reload-method="synchron"/>
-        </map:act>
-      </map:match>
-      
-      <!-- Enter the actual publication -->
-      <map:match pattern="*/**">
-        <map:mount uri-prefix="{1}" src="{fallback:sitemap.xmap}" check-reload="true" reload-method="synchron"/>
-      </map:match>
-   </map:pipeline>
-
- </map:pipelines>
-
-</map:sitemap>
diff --git a/src/webapp/lenya/bin/copy-recursive.sh b/src/webapp/lenya/bin/copy-recursive.sh
deleted file mode 100644
index e5f3eea..0000000
--- a/src/webapp/lenya/bin/copy-recursive.sh
+++ /dev/null
@@ -1,179 +0,0 @@
-#!/bin/sh
-
-# Copyright 1999-2004 The Apache Software Foundation
-#
-# Licensed 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.
-
-
-
-#########################################################
-# DEFAULT CONFIGURATION
-#########################################################
-
-SOURCE_DIRECTORY=$HOME/tmp
-
-DESTINATION_DIRECTORY=$HOME/backup
-
-BATCH_FILE_DIR=`pwd`
-PUT_BATCH_FILE=$BATCH_FILE_DIR/sftp-put-batch.txt
-MKDIR_BATCH_FILE=$BATCH_FILE_DIR/sftp-mkdir-batch.txt
-
-USERNAME=$USER
-
-HOSTNAME=127.0.0.1
-
-#########################################################
-# FUNCTIONS
-#########################################################
-
-
-toString(){
-  echo ""
-  echo "INFO: .toString(): SourceDirectory: $SOURCE_DIRECTORY"
-  echo "INFO: .toString(): DestinationDirectory: $DESTINATION_DIRECTORY"
-  echo "INFO: .toString(): BatchFileDirectory: $BATCH_FILE_DIR"
-  echo "INFO: .toString(): BatchFileMkdir: $MKDIR_BATCH_FILE"
-  echo "INFO: .toString(): BatchFilePut: $PUT_BATCH_FILE"
-  echo "INFO: .toString(): RemoteUsername: $USERNAME"
-  echo "INFO: .toString(): RemoteHostname: $HOSTNAME"
-  echo ""
-  echo ""
-  echo ""
-  echo ""
-  }
-
-browseDirectory(){
-  CURRENT_DIRECTORY=$1
-  SOURCE_DIR=$2
-  DEST_DIR=$3
-  ##echo "DEBUG: Browsing Directory: $CURRENT_DIRECTORY"
-
-  FILES_AND_DIRS=`ls $CURRENT_DIRECTORY`
-  NUMBER_OF_FILES_AND_DIRS=`ls $CURRENT_DIRECTORY | wc -l`
-
-  ##echo "DEBUG: Number of files and dirs: $NUMBER_OF_FILES_AND_DIRS"
-  if [ $NUMBER_OF_FILES_AND_DIRS = 0 ];then
-    ##echo "DEBUG: No Files or Dirs within directory"
-    return
-  fi
-
-  for FILE_OR_DIR in $FILES_AND_DIRS; do
-    ##echo "DEBUG: File or Dir: $FILE_OR_DIR"
-    if [ -d $CURRENT_DIRECTORY/$FILE_OR_DIR ]; then
-      echo "INFO: .browseDirectory(): Directory: $CURRENT_DIRECTORY/$FILE_OR_DIR"
-
-      createDirectory $SOURCE_DIR $DEST_DIR $CURRENT_DIRECTORY/$FILE_OR_DIR
-
-      browseDirectory $CURRENT_DIRECTORY/$FILE_OR_DIR $SOURCE_DIR $DEST_DIR
-      CURRENT_DIRECTORY=`dirname $CURRENT_DIRECTORY`
-    else
-      if [ -f $CURRENT_DIRECTORY/$FILE_OR_DIR ]; then
-        echo "INFO: .browseDirectory(): File: $CURRENT_DIRECTORY/$FILE_OR_DIR"
-
-        copyFile $SOURCE_DIR $DEST_DIR $CURRENT_DIRECTORY/$FILE_OR_DIR
-      else
-       echo "Exception: Neither File nor Directory: $CURRENT_DIRECTORY/$FILE_OR_DIR"
-      fi
-    fi
-  done
-  }
-
-createDirectory(){
-  SOURCE_DIR=$1
-  DEST_DIR=$2
-  LDIRECTORY=$3
-
-  echo "INFO: .createDirectory(): $LDIRECTORY"
-  #echo "INFO: .createDirectory(): $SOURCE_DIR"
-  #echo "INFO: .createDirectory(): $DEST_DIR"
-
-  LPARENT=`dirname $LDIRECTORY`
-  NAME=`basename $LDIRECTORY`
-  RELATIVE_DIR=`echo $LDIRECTORY | sed -e "s%$SOURCE_DIR%%g"`
-  echo "DEBUG: .copyFile(): Relative Directory: $RELATIVE_DIR"
-  DPARENT=`dirname $DEST_DIR$RELATIVE_DIR`
-
-
-  #echo "INFO: .createDirectory(): lcd $LPARENT"
-  #echo "INFO: .createDirectory(): cd $DPARENT"
-  #echo "INFO: .createDirectory(): mkdir $NAME"
-  echo ""
-
-  echo "pwd" > $MKDIR_BATCH_FILE
-  echo "lcd $LPARENT" >> $MKDIR_BATCH_FILE
-  echo "cd $DPARENT" >> $MKDIR_BATCH_FILE
-  echo "mkdir $NAME" >> $MKDIR_BATCH_FILE
-  echo "quit" >> $MKDIR_BATCH_FILE
-
-  sftp -b $MKDIR_BATCH_FILE $USERNAME@$HOSTNAME
-  ##rm $MKDIR_BATCH_FILE
-  }
-
-copyFile(){
-  SOURCE_DIR=$1
-  DEST_DIR=$2
-  LFILE=$3
-
-  echo "INFO: .copyFile(): $LFILE"
-  #echo "INFO: .copyFile(): $SOURCE_DIR"
-  #echo "INFO: .copyFile(): $DEST_DIR"
-
-  RELATIVE_FILE=`echo $LFILE | sed -e "s%$SOURCE_DIR%%g"`
-  echo "DEBUG: .copyFile(): Relative File: $RELATIVE_FILE"
-  DFILE=$DEST_DIR$RELATIVE_FILE
-  LPARENT=`dirname $LFILE`
-  DPARENT=`dirname $DFILE`
-  NAME=`basename $LFILE`
-
-  #echo "INFO: .copyFile(): lcd $LPARENT"
-  #echo "INFO: .copyFile(): cd $DPARENT"
-  #echo "INFO: .copyFile(): put $NAME"
-  echo ""
-
-  echo "lcd $LPARENT" >> $PUT_BATCH_FILE
-  echo "cd $DPARENT" >> $PUT_BATCH_FILE
-  echo "put $NAME" >> $PUT_BATCH_FILE
-  }
-
-
-#########################################################
-# MAIN
-#########################################################
-
-toString
-
-SOURCE_DIRECTORY=$1
-DESTINATION_DIRECTORY=$2
-BATCH_FILE_DIR=$3
-USERNAME=$4
-HOSTNAME=$5
-if ! ([ $SOURCE_DIRECTORY ] && [ $DESTINATION_DIRECTORY ] && [ $BATCH_FILE_DIR ] && [ $USERNAME ] && [ $HOSTNAME ]);then
-  echo "Usage: copy-recursive.sh \"SourceDirectory DestinationDirectory BatchFileDirectory RemoteUsername RemoteHostname\""
-  exit 0
-fi
-
-PUT_BATCH_FILE=$BATCH_FILE_DIR/sftp-batch-put.txt
-MKDIR_BATCH_FILE=$BATCH_FILE_DIR/sftp-mkdir-batch.txt
-PUT_BATCH_FILE=$BATCH_FILE_DIR/sftp-put-batch.txt
-
-toString
-
-#exit 0
-
-echo "pwd" > $PUT_BATCH_FILE
-CURRENT_DIRECTORY=$SOURCE_DIRECTORY
-browseDirectory $CURRENT_DIRECTORY $SOURCE_DIRECTORY $DESTINATION_DIRECTORY
-echo "quit" >> $PUT_BATCH_FILE
-
-sftp -b $PUT_BATCH_FILE $USERNAME@$HOSTNAME
-##rm $PUT_BATCH_FILE
diff --git a/src/webapp/lenya/bin/crawl_and_index.xml b/src/webapp/lenya/bin/crawl_and_index.xml
deleted file mode 100644
index 4d58bc0..0000000
--- a/src/webapp/lenya/bin/crawl_and_index.xml
+++ /dev/null
@@ -1,199 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<project default="main" basedir=".">
-
-
-
-<target name="main" description="main" depends="init">
-  <echo>INFO: webapp.dir=${webapp.dir}</echo>
-</target>
-
-
-
-
-<target name="init">
-  <echo message="INFO: Init"/>
-
-  <property file="search.properties"/>
-
-  <!-- Dummy arguments -->
-  <property name="crawler.xconf" value="src/webapp/lenya/pubs/default/config/search/crawler.xconf"/>
-  <property name="lucene.xconf" value="src/webapp/lenya/pubs/default/config/search/lucene-cmfsMatrix.xconf"/>
-  <property name="htdocs.dump.dir" value="src/webapp/lenya/pubs/default/content/live"/>
-  <property name="file" value="src/webapp/lenya/pubs/default/content/live/index.xml"/>
-  <property name="index.dir" value="src/webapp/lenya/pubs/default/work/search/lucene/index/index"/>
-  <property name="search.term" value="Lenya"/>
-  <!-- /Dummy arguments -->
-
-  <property name="web-inf.dir" value="${webapp.dir}/WEB-INF"/>
-
-  <path id="class.path">
-    <pathelement path="${web-inf.dir}/classes"/>
-    <pathelement path="${web-inf.dir}/lib/xercesImpl-2.6.2.jar"/>
-    <pathelement path="${web-inf.dir}/lib/xml-apis.jar"/>
-    <pathelement path="${web-inf.dir}/lib/xalan-2.6.0.jar"/>
-    <pathelement path="${web-inf.dir}/lib/log4j-1.2.8.jar"/>
-    <pathelement path="${web-inf.dir}/lib/excalibur-io-1.1.jar"/>
-    <pathelement path="${web-inf.dir}/lib/lucene-1.4.1.jar"/>
-    <pathelement path="${web-inf.dir}/lib/websphinx-0.5.jar"/>
-    <pathelement path="${web-inf.dir}/lib/xml-commons-resolver-1.1.jar"/>
-  </path>
-
-<!--
-  <property environment="env"/>
-  <property name="javaexe" value="${env.JAVA_HOME}/bin/java"/>
--->
-
-  <chmod file="${webapp.dir}/lenya/bin/crawl_and_index.sh" perm="755"/>
-</target>
-
-<target name="crawl" description="Crawl and dump hypertext documents. Usage: -Dcrawler.xconf=/foo/bar/crawler.xconf" depends="init">
-  <echo>INFO: Crawl and dump hypertext documents (${crawler.xconf})</echo>
-
-<!--
-  <exec executable="${webapp.dir}/lenya/bin/crawl_and_index.sh">
-    <arg value="crawl"/>
-    <arg value="${crawler.xconf}"/>
-  </exec>
--->
-
-<!-- TODO: Linkage problem -->
-  <echo>INFO: Show configuration</echo>
-  <java classname="org.apache.lenya.search.crawler.CrawlerConfiguration">
-    <arg value="${crawler.xconf}"/>
-    <classpath refid="class.path"/>
-  </java>
-
-  <echo>INFO: Start crawling ...</echo>
-  <java classname="org.apache.lenya.search.crawler.IterativeHTMLCrawler">
-    <arg value="${crawler.xconf}"/>
-    <classpath refid="class.path"/>
-  </java>
-  <echo>INFO: Crawling finished</echo>
-</target>
-
-
-<target name="index" description="Index hypertext documents. Usage: -Dlucene.xconf=/foo/bar/lucene.xconf" depends="init">
-  <echo>INFO: Index hypertext documents</echo>
-
-  <echo>INFO: Show configuration</echo>
-  <java classname="org.apache.lenya.lucene.IndexConfiguration">
-    <arg value="${lucene.xconf}"/>
-    <classpath refid="class.path"/>
-  </java>
-
-  <echo>INFO: Create index ...</echo>
-  <java classname="org.apache.lenya.lucene.index.Index">
-    <arg value="${lucene.xconf}"/>
-    <classpath refid="class.path"/>
-  </java>
-  <echo>INFO: Index has been created</echo>
-</target>
-
-<target name="indexOneDocument" description="Index one document. Usage: -Dlucene.xconf=/foo/bar/lucene.xconf -Dfile=/foo/bar/document" depends="init">
-  <echo>INFO: Index one document</echo>
-
-  <echo>INFO: Show configuration</echo>
-  <java classname="org.apache.lenya.lucene.IndexConfiguration">
-    <arg value="${lucene.xconf}"/>
-    <classpath refid="class.path"/>
-  </java>
-
-  <echo>INFO: Update index for ${file}</echo>
-  <java classname="org.apache.lenya.lucene.index.Index">
-    <arg value="${lucene.xconf}"/>
-    <arg value="${file}"/>
-    <classpath refid="class.path"/>
-  </java>
-  <echo>INFO: Document has been indexed</echo>
-</target>
-
-
-
-<target name="test-index" description="Regression Test of Index" depends="init">
-  <echo>INFO: Regression Test of Index</echo>
-</target>
-
-<target name="search" description="Search within Index. Usage: -Dindex.dir=... -Dsearch.term=Lenya" depends="init">
-  <echo>INFO: Search within Index</echo>
-
-  <exec executable="${webapp.dir}/lenya/bin/crawl_and_index.sh">
-    <arg value="search"/>
-    <arg value="${index.dir}"/>
-    <arg value="${search.term}"/>
-  </exec>
-
-<!-- NOTE: problem with modifiers "public static" -->
-<!--
-  <java classname="org.apache.lenya.lucene.SearchFiles">
-    <arg value="${index.dir}"/>
-    <arg value="${search.term}"/>
-    <classpath refid="class.path"/>
-  </java>
--->
-</target>
-
-<target name="publish-index" description="Publish Index" depends="init">
-  <echo>INFO: Publish Index</echo>
-</target>
-
-<target name="xpdf" description="Extract text from PDF with Xpdf. Usage: -Dhtdocs.dump.dir=/usr/local/apache/htdocs" depends="init">
-  <echo>INFO: Extract text from PDF with Xpdf (${htdocs.dump.dir})</echo>
-
-  <exec executable="${webapp.dir}/lenya/bin/crawl_and_index.sh">
-    <arg value="xpdf"/>
-    <arg value="${htdocs.dump.dir}"/>
-  </exec>
-</target>
-
-<target name="pdfbox" description="Extract text from PDF with PDFBox" depends="init">
-  <echo>INFO: Extract text from PDF with PDFBox</echo>
-
-  <echo>FIXME: Not implemented yet</echo>
-<!--
-PDFBOX=$HOME/src/PDFBox-0.5.5
-CLASSPATH=$CLASSPATH:$PDFBOX/classes
-##$JAVA -cp $CLASSPATH org.pdfbox.Main $FILE_PDF $FILE_PDF.txt
--->
-</target>
-
-<target name="pdfadobe" description="Extract text from PDF via Adobe PDF Conversion webpage" depends="init">
-  <echo>INFO: Extract text from PDF via Adobe PDF Conversion webpage</echo>
-
-  <echo>INFO: http://www.adobe.com/products/acrobat/access_simple_form.html</echo>
-</target>
-
-<target name="show-config" description="Show configuration" depends="init">
-  <echo>INFO: Show configuration</echo>
-
-  <echo>INFO: crawler.xconf</echo>
-  <java classname="org.apache.lenya.search.crawler.CrawlerConfiguration">
-    <arg value="${crawler.xconf}"/>
-    <classpath refid="class.path"/>
-  </java>
-
-  <echo>INFO: lucene.xconf</echo>
-  <java classname="org.apache.lenya.lucene.IndexConfiguration">
-    <arg value="${lucene.xconf}"/>
-    <classpath refid="class.path"/>
-  </java>
-</target>
-
-</project>
diff --git a/src/webapp/lenya/bin/replicate.sh b/src/webapp/lenya/bin/replicate.sh
deleted file mode 100644
index d810c75..0000000
--- a/src/webapp/lenya/bin/replicate.sh
+++ /dev/null
@@ -1,113 +0,0 @@
-#!/bin/sh
-
-# Copyright 1999-2004 The Apache Software Foundation
-#
-# Licensed 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.
-
-#
-##############################################################
-#        GENERAL CONFIGURATION                               #
-##############################################################
-#
-
-if [ "$TOMCAT_HOME" = "" ] ; then
-  echo You must set TOMCAT_HOME to point at your Tomcat installation
-  exit 1
-fi
-
-CONTEXT=$TOMCAT_HOME/webapps/lenya
-PUBLICATION_DIR=$CONTEXT/lenya/pubs
-
-SFTP_BATCH=$CONTEXT/lenya/bin/copy-recursive.sh
-
-
-#
-##############################################################
-#        PUBLICATION CONFIGURATION                           #
-##############################################################
-#
-
-
-PUBLICATION_ID_2=default
-EXPORT_DIR_2=$PUBLICATION_DIR/default/resources/export
-PENDING_DIR_2=$EXPORT_DIR_2/pending/lenya/default
-REPLICATION_DIR_2=$EXPORT_DIR_2/replication
-RU_2_1=username
-RH_2_1=127.0.0.1
-RDOCS_2_1=/usr/local/jakarta-tomcat-4.0.4-b3/webapps/ROOT
-RU_2_2=username
-RH_2_2=127.0.0.1
-RDOCS_2_2=/usr/local/apache/htdocs_default
-
-
-
-###########################################
-#                MAIN                     #
-###########################################
-
-echo "START"
-date
-
-# Loop over all publications (BEGIN)
-
-
-
-#### PUBLICATION 2
-
-echo ""
-echo "=================================================="
-echo "= PUBLICATION: $PUBLICATION_ID_2"
-echo "=================================================="
-echo ""
-
-mkdir $REPLICATION_DIR_2
-
-if [ -d $REPLICATION_DIR_2 ];then
-  echo "DEBUG: Replication Directory: $REPLICATION_DIR_2"
-
-  PROCESS_ID=$$
-  DATUM=`date +%Y.%m.%d_%H.%M.%S`
-  TEMP_ID=$DATUM\_$PROCESS_ID
-
-  TEMP_DIR=$REPLICATION_DIR_2/temp\_$TEMP_ID
-  mkdir -p $TEMP_DIR
-  echo "DEBUG: Temporary Directory: $TEMP_DIR"
-
-  if [ -d $PENDING_DIR_2 ];then
-    echo "DEBUG: Pending Directory: $PENDING_DIR_2"
-
-    if [ -d $PENDING_DIR_2 ];then
-      mv $PENDING_DIR_2/* $TEMP_DIR/.
-    fi
-
-    if [ -d $TEMP_DIR ];then
-      scp -r $TEMP_DIR/* $RU_2_1@$RH_2_1:$RDOCS_2_1/.
-    fi
-    if [ -d $TEMP_DIR ];then
-      scp -r $TEMP_DIR/* $RU_2_2@$RH_2_2:$RDOCS_2_2/.
-    fi
-
-
-  else
-    echo "WARN: No such directory: $PENDING_DIR_2"
-  fi
-  rm -r $TEMP_DIR
-else
-  echo "FATAL: No such directory: $REPLICATION_DIR_2"
-  #exit 0
-fi
-
-# Loop over all publications (END)
-
-date
-echo "STOP"
diff --git a/src/webapp/lenya/bin/search.properties b/src/webapp/lenya/bin/search.properties
deleted file mode 100644
index c7f9b6c..0000000
--- a/src/webapp/lenya/bin/search.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-# Copyright 1999-2004 The Apache Software Foundation
-#
-# Licensed 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.
-
-webapp.dir=../../
-
-#java.run=/usr/lib/j2sdk1.4/bin/java
-
-#xpdf.bin=/usr/local/xpdf-2.03-linux/pdftotext
diff --git a/src/webapp/lenya/bin/sftp-copy-children.txt b/src/webapp/lenya/bin/sftp-copy-children.txt
deleted file mode 100644
index 6975c3c..0000000
--- a/src/webapp/lenya/bin/sftp-copy-children.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-cd public_html/children
-lcd ~/htdocs/children
-lls -R
-mput *
-quit
diff --git a/src/webapp/lenya/bin/sftp-copy-index.txt b/src/webapp/lenya/bin/sftp-copy-index.txt
deleted file mode 100644
index 48fc5fb..0000000
--- a/src/webapp/lenya/bin/sftp-copy-index.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-cd public_html
-ls
-lcd ~/htdocs
-lls -R
-put index.html
-quit
diff --git a/src/webapp/lenya/bin/sftp-mkdir-children.txt b/src/webapp/lenya/bin/sftp-mkdir-children.txt
deleted file mode 100644
index b542e90..0000000
--- a/src/webapp/lenya/bin/sftp-mkdir-children.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-cd public_html
-ls
-mkdir children
-cd children
-ls
-quit
diff --git a/src/webapp/lenya/bin/sftp.sh b/src/webapp/lenya/bin/sftp.sh
deleted file mode 100644
index afb91a0..0000000
--- a/src/webapp/lenya/bin/sftp.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/ksh -p
-
-# Copyright 1999-2004 The Apache Software Foundation
-#
-# Licensed 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.
-
-
-BATCH_FILE=$1
-if ! [ $BATCH_FILE ];then
-  echo "Usage: sftp.sh \"batch-file.txt\""
-  exit 0
-fi
-
-echo "INFO: Batch File: $BATCH_FILE"
-
-sftp -b $1 user@host.com
diff --git a/src/webapp/lenya/bin/tomcatctrl b/src/webapp/lenya/bin/tomcatctrl
deleted file mode 100755
index 8ab849b..0000000
--- a/src/webapp/lenya/bin/tomcatctrl
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/bin/sh
-#
-# Start/stop script for tomcat located at /etc/init.d
-#
-# Author: Christian Egli <christian.egli@wyona.com>.
-# Author: Michael Wechner <michael.wechner@wyona.com>.
-#
-# |||||||||||||||||||| START CONFIGURATION SECTION  ||||||||||||||||||||
-# --------------------                              --------------------
-
-# Has to be defined for tomcat
-USER="username"
-
-# Has to be defined for tomcat
-JAVA_HOME="/usr/local/j2sdk1.4.1_02"
-
-# The bin directories of all the servers
-DAEMONS="/usr/local/jakarta-tomcat-4.1.21-LE-jdk14/bin"
-
-# where you can also set more than one server, e.g.
-#DAEMONS="/usr/local/jakarta-tomcat-4.1.21-LE-jdk14/bin /home/username/build/jakarta-tomcat-4.1.21-LE-jdk14/bin"
-#
-# --------------------                              --------------------
-# ||||||||||||||||||||   END CONFIGURATION SECTION  ||||||||||||||||||||
-
-NAME=$0
-DESC="Tomcat in virtual hosts"
-
-
-
-case "$1" in
-  start)
-	echo "Starting $DESC: $NAME"
-	for daemon in $DAEMONS; do 
-	    echo "Starting $daemon/startup.sh"
-	    su - $USER -c "export JAVA_HOME=$JAVA_HOME; sh $daemon/startup.sh"
-	done;
-	;;
-  stop)
-	echo "Stopping $DESC: $NAME "
-	for daemon in $DAEMONS; do 
-	    echo "Stopping $daemon/shutdown.sh"
-	    su - $USER -c "export JAVA_HOME=$JAVA_HOME; sh $daemon/shutdown.sh"
-	done;
-	;;
-  restart|force-reload)
-        # FIXME: Tomcat does not shutdown properly
-	#
-	#	If the "reload" option is implemented, move the "force-reload"
-	#	option to the "reload" entry above. If not, "force-reload" is
-	#	just the same as "restart".
-	#
-	echo "FIXME"
-	#echo "Restarting $DESC: $NAME"
-	#for daemon in $DAEMONS; do 
-	#    echo "Stopping $daemon/shutdown.sh"
-	#    eval $daemon/shutdown.sh
-	#done;
-        #
-	#sleep 10
-	#for daemon in $DAEMONS; do 
-	#    echo "Starting $daemon/startup.sh"
-	#    eval $daemon/startup.sh
-	#done;
-	#
-	;;
-  *)
-	#echo "Usage: $NAME {start|stop|restart|force-reload}" >&2
-	echo "Usage: $NAME {start|stop}" >&2
-	exit 1
-	;;
-esac
-
-exit 0
diff --git a/src/webapp/lenya/bin/util.xml b/src/webapp/lenya/bin/util.xml
deleted file mode 100644
index bc63e25..0000000
--- a/src/webapp/lenya/bin/util.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<project default="init" basedir=".">
-
-
-<target name="init">
-  <echo message="INFO: Init"/>
-
-  <property name="lenya.dir" value="../../../.."/>
-
-
-  <!-- Dummy arguments -->
-  <property name="password" value="levi"/>
-  <property name="jtidy-in.html" value="file:///home/lenya/html/index.html"/>
-  <!-- /Dummy arguments -->
-
-  <property name="lenya.dir.web-inf" value="${lenya.dir}/build/lenya/webapp/WEB-INF"/>
-
-  <path id="class.path">
-    <pathelement path="${lenya.dir.web-inf}/classes"/>
-    <pathelement path="${lenya.dir.web-inf}/lib/xercesImpl-2.1.0.jar"/>
-    <pathelement path="${lenya.dir.web-inf}/lib/xml-apis.jar"/>
-    <pathelement path="${lenya.dir.web-inf}/lib/xalan-2.4.1.jar"/>
-    <pathelement path="${lenya.dir.web-inf}/lib/log4j-1.2.8.jar"/>
-    <pathelement path="${lenya.dir.web-inf}/lib/excalibur-io-1.1.jar"/>
-    <pathelement path="${lenya.dir.web-inf}/lib/jtidy-04aug2000r7-dev.jar"/>
-  </path>
-</target>
-
-<target name="passwd" description="Generate a password. Usage: -Dpassword=levi" depends="init">
-  <echo>INFO: Generate a password (${password})</echo>
-
-  <java classname="org.apache.lenya.ac.Password">
-    <arg value="${password}"/>
-    <classpath refid="class.path"/>
-  </java>
-</target>
-
-
-<target name="jtidy" description="JTidy: -Djtidy-in.html=file:///home/lenya/html/index.html" depends="init">
-  <echo>INFO: JTidy</echo>
-
-  <java classname="org.apache.lenya.util.TidyCommandLine">
-    <arg value="${jtidy-in.html}"/>
-    <arg value="jtidy-out.xhtml"/>
-    <arg value="error.log"/>
-    <classpath refid="class.path"/>
-  </java>
-</target>
-
-<!-- e.g. tidying legacy "HTML" stylesheets -->
-<target name="u2l" description="Transforms upper to lower case"> 
-    <echo>INFO: Upper 2 lower case</echo>
-    <xslt
-        basedir="/home/username/upper_case"
-        destdir="/home/username/lower_case"
-        style="${lenya.dir}/src/webapp/lenya/xslt/util/upper2lower_case.xsl"
-        includes="**/*.xsl"
-        extension=".xsl"
-        />
-</target>
-
-
-</project>
diff --git a/src/webapp/lenya/config/notification/notification.xconf b/src/webapp/lenya/config/notification/notification.xconf
deleted file mode 100644
index e793fda..0000000
--- a/src/webapp/lenya/config/notification/notification.xconf
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: notification.xconf,v 1.3 2004/03/13 12:31:34 gregor Exp $ -->
-
-<notification
-    xmlns="http://apache.org/cocoon/lenya/notification/1.0"
-    enabled="false">
-
-</notification> 
\ No newline at end of file
diff --git a/src/webapp/lenya/config/parameters/default.xsp b/src/webapp/lenya/config/parameters/default.xsp
deleted file mode 100644
index 700967d..0000000
--- a/src/webapp/lenya/config/parameters/default.xsp
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: default.xsp,v 1.3 2004/03/13 12:31:30 gregor Exp $ -->
-
-<!-- Returns the value of the parameter "value" as URI parameter. -->
-
-<xsp:page
-  language="java"
-  xmlns:xsp="http://apache.org/xsp"  
->
-       
-<parameter xmlns="http://apache.org/cocoon/lenya/uri-parameters/1.0"><xsp:expr>parameters.getParameter("value", "")</xsp:expr></parameter>
-       
-</xsp:page>
diff --git a/src/webapp/lenya/config/rc/revision-controller.xconf b/src/webapp/lenya/config/rc/revision-controller.xconf
deleted file mode 100644
index d1ba2d7..0000000
--- a/src/webapp/lenya/config/rc/revision-controller.xconf
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: revision-controller.xconf,v 1.3 2004/03/13 12:31:34 gregor Exp $ -->
-
-<rcml>
-  <rcmlDirectory href="content/rcml"/>
-  <backupDirectory href="content/rcbak"/>
-</rcml>
diff --git a/src/webapp/lenya/config/scheduler/scheduler.xconf b/src/webapp/lenya/config/scheduler/scheduler.xconf
deleted file mode 100644
index 29d98c4..0000000
--- a/src/webapp/lenya/config/scheduler/scheduler.xconf
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: scheduler.xconf,v 1.4 2004/03/13 12:31:34 gregor Exp $ -->
-
-<scheduler>
-
-  <jobs>
-    <job type="publish" class="org.apache.lenya.cms.scheduler.PublishingJob">
-      <title>Publish</title>
-      <parameters>
-        <publisher class="org.apache.lenya.cms.publishing.DefaultFilePublisher"/>
-      </parameters>
-    </job>
-  </jobs>
-  
-  <triggers>
-    <trigger type="cron" class="org.quartz.CronTrigger">
-      <title>Regular</title>
-    </trigger>
-    <trigger type="date" class="org.quartz.SimpleTrigger">
-      <title>Once</title>
-    </trigger>
-    <trigger type="andreas" class="org.quartz.AndreasTrigger">
-      <title>Andreas</title>
-    </trigger>
-  </triggers>
-  
-</scheduler>
\ No newline at end of file
diff --git a/src/webapp/lenya/content/about.xml b/src/webapp/lenya/content/about.xml
deleted file mode 100644
index 5045d30..0000000
--- a/src/webapp/lenya/content/about.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<page:page  
-   xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0">
-
-<page:title>Apache Lenya @lenya.version@</page:title>
-<page:body>
-<div class="lenya-box">
-<p>
-This software consists of voluntary contributions made by many individuals
-on behalf of the <br /><a href="http://www.apache.org/">Apache Software Foundation</a> 
-and was originally created by <a href="mailto:michi@apache.org">Michael Wechner</a>.
-<br /><br />
-Apache Lenya includes software developed by the <a href="http://www.apache.org/">Apache Software Foundation</a>, 
-<a href="http://w3c.org">W3C</a>, <br /> and <a href="http://sf.net/projects/websphinx">WebSHPINX</a>.
-<br /><br /> 
-Copyright (C) 1999-2004 The Apache Software Foundation. All rights reserved.
-</p>
-<form>
-<input type="button" value="Back" onClick="history.go(-1)"/>
-</form>		
-</div>
-      </page:body>
-    </page:page>
diff --git a/src/webapp/lenya/content/exception/missing-language.xsp b/src/webapp/lenya/content/exception/missing-language.xsp
deleted file mode 100644
index 719a42e..0000000
--- a/src/webapp/lenya/content/exception/missing-language.xsp
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsp:page 
-  language="java" 
-  xmlns:xsp="http://apache.org/xsp"
-  xmlns:input="http://apache.org/cocoon/xsp/input/1.0"
-  >
-  
-  <xsp:structure>
-    <xsp:include>org.apache.lenya.cms.publication.Document</xsp:include>
-    <xsp:include>org.apache.lenya.cms.publication.DocumentException</xsp:include>
-    <xsp:include>org.apache.lenya.cms.publication.util.DocumentLanguagesHelper</xsp:include>
-  </xsp:structure>
-  
-  <missing-language>    
-    
-    <current-language><input:get-attribute module="page-envelope" as="string" name="document-language"/></current-language>
-    <available-languages>
-      <xsp:logic>
-	Document doc = (Document) <input:get-attribute module="page-envelope" as="object" name="document"/>;
-	DocumentLanguagesHelper helper = new DocumentLanguagesHelper(doc.getIdentityMap(), objectModel);
-	try {
-	  String[] availableLanguages = doc.getLanguages();
-	  String language = null;
-	  for (int i = 0; i &lt; availableLanguages.length; i++) {
-	    language = availableLanguages[i];
-	    <xsp:content>
-	      <available-language>
-	        <language><xsp:expr>language</xsp:expr></language>
-	        <url><xsp:expr>helper.getUrl(language)</xsp:expr></url>
-	      </available-language>
-	    </xsp:content>
-	  }
-	} catch (DocumentException e) {}
-      </xsp:logic>
-    </available-languages>
-    
-  </missing-language>
-</xsp:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/content/introduction.xml b/src/webapp/lenya/content/introduction.xml
deleted file mode 100644
index 3d3270c..0000000
--- a/src/webapp/lenya/content/introduction.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<div xmlns="http://www.w3.org/1999/xhtml" class="lenya-frontpage">
-<h2>Welcome to Apache Lenya</h2>
-<p>
-You have successfully installed Apache Lenya <strong>@lenya.version@</strong>. To start, click on any of the publications on the left.</p>
-
-<h3>About Apache Lenya</h3>
-<p>
-<a href="http://lenya.apache.org">Apache Lenya</a> is a Java-based <a href="http://www.opensource.org">Open-Source</a>
-Content Management System. It
-is based on open standards such as <a href="http://www.w3c.org/XML/">XML</a> and <a href="http://www.w3c.org/TR/xslt">XSLT</a>. One of its core
-components is <a href="http://cocoon.apache.org">Cocoon</a> from the
-<a href="http://www.apache.org">Apache Software Foundation</a>.
-</p>
-		
-<p>
-Lenya supports inline WYSIWYG editors such as <a href="http://kupu.oscom.org">Kupu</a> or <a href="http://bxe.oscom.org">BXE</a>. Your site editors do
-not have to learn XML. This is possible thanks to the support
-of XML, XSLT and XML Schema on the client side.
-An administration interface allows advanced users to
-monitor the CMS, and perform configuration tasks.
-</p>
-		
-</div>
diff --git a/src/webapp/lenya/content/menus/admin.xsp b/src/webapp/lenya/content/menus/admin.xsp
deleted file mode 100644
index b568732..0000000
--- a/src/webapp/lenya/content/menus/admin.xsp
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsp:page 
-    language="java" 
-    xmlns:xsp="http://apache.org/xsp"
-    xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-    xmlns="http://apache.org/cocoon/lenya/menubar/1.0"
-    xmlns:uc="http://apache.org/cocoon/lenya/usecase/1.0"
->
-
-<menu>
-
-  <menus>
-    <menu i18n:attr="name" name="File">
-      <block>
-        <item uc:usecase="ac.logout" href="?"><i18n:text>Logout</i18n:text></item>
-      </block>
-    </menu>
-
-    <menu i18n:attr="name" name="Edit">
-    </menu>
-
-    <menu i18n:attr="name" name="Workflow">
-    </menu>
-
-    <menu i18n:attr="name" name="Debug">
-    </menu>
-  </menus>
-
-</menu>
-
-</xsp:page>
diff --git a/src/webapp/lenya/content/menus/live.xsp b/src/webapp/lenya/content/menus/live.xsp
deleted file mode 100644
index 3acf118..0000000
--- a/src/webapp/lenya/content/menus/live.xsp
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsp:page 
-  language="java" 
-  xmlns:xsp="http://apache.org/xsp"
->
-
-<menu>
-
-</menu>
-
-</xsp:page>
diff --git a/src/webapp/lenya/content/rc/fileReservedCheckInException.xsp b/src/webapp/lenya/content/rc/fileReservedCheckInException.xsp
deleted file mode 100644
index 0aa62a9..0000000
--- a/src/webapp/lenya/content/rc/fileReservedCheckInException.xsp
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: fileReservedCheckInException.xsp,v 1.4 2004/03/13 12:31:31 gregor Exp $ -->
-
-<xsp:page language="java" xmlns:xsp="http://apache.org/xsp">
-
-<rc:exception xmlns:rc="http://apache.org/cocoon/lenya/rc/1.0">
-  <xsp:logic>
-    String filename=parameters.getParameter("filename","null");
-    String checkType=parameters.getParameter("checkType","null");
-    String user=parameters.getParameter("user","null");
-    String date=parameters.getParameter("date","null");
-  </xsp:logic>
-  <rc:file-reserved-checkin-exception>
-    <rc:filename><xsp:expr>filename</xsp:expr></rc:filename>
-    <rc:checkType><xsp:expr>checkType</xsp:expr></rc:checkType>
-    <rc:user><xsp:expr>user</xsp:expr></rc:user>
-    <rc:date><xsp:expr>date</xsp:expr></rc:date>
-  </rc:file-reserved-checkin-exception>
-</rc:exception>
-
-</xsp:page>
diff --git a/src/webapp/lenya/content/rc/fileReservedCheckOutException.xsp b/src/webapp/lenya/content/rc/fileReservedCheckOutException.xsp
deleted file mode 100644
index c6a623b..0000000
--- a/src/webapp/lenya/content/rc/fileReservedCheckOutException.xsp
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: fileReservedCheckOutException.xsp,v 1.6 2004/03/13 12:31:31 gregor Exp $ -->
-
-<xsp:page language="java" xmlns:xsp="http://apache.org/xsp">
-
-<rc:exception xmlns:rc="http://apache.org/cocoon/lenya/rc/1.0">
-  <xsp:logic>
-    String user=parameters.getParameter("user","null");
-    String filename=parameters.getParameter("filename","null");
-    String date=parameters.getParameter("date","null");
-  </xsp:logic>
-  <rc:file-reserved-checkout-exception>
-    <rc:filename><xsp:expr>filename</xsp:expr></rc:filename>
-    <rc:user><xsp:expr>user</xsp:expr></rc:user>
-    <rc:date><xsp:expr>date</xsp:expr></rc:date>
-  </rc:file-reserved-checkout-exception>
-</rc:exception>
-
-</xsp:page>
diff --git a/src/webapp/lenya/content/rc/genericException.xsp b/src/webapp/lenya/content/rc/genericException.xsp
deleted file mode 100644
index 421be75..0000000
--- a/src/webapp/lenya/content/rc/genericException.xsp
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: genericException.xsp,v 1.5 2004/03/13 12:31:31 gregor Exp $ -->
-
-<xsp:page language="java" xmlns:xsp="http://apache.org/xsp">
-
-<rc:exception xmlns:rc="http://apache.org/cocoon/lenya/rc/1.0">
-  <xsp:logic>
-    String filename=parameters.getParameter("filename","null");
-  </xsp:logic>
-  <rc:generic-exception>
-    <rc:filename><xsp:expr>filename</xsp:expr></rc:filename>
-    <rc:message><xsp:expr>parameters.getParameter("message","null")</xsp:expr></rc:message>
-  </rc:generic-exception>
-</rc:exception>
-
-</xsp:page>
diff --git a/src/webapp/lenya/content/rc/view.xsp b/src/webapp/lenya/content/rc/view.xsp
deleted file mode 100644
index 9f9284c..0000000
--- a/src/webapp/lenya/content/rc/view.xsp
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
- <xsp:page
-       language="java"
-       xmlns:xsp="http://apache.org/xsp"
-       xmlns:input="http://apache.org/cocoon/xsp/input/1.0"
-       >
-
-  <xsp:structure>
-    <xsp:include>org.apache.lenya.cms.rc.RevisionController</xsp:include>
-    <xsp:include>org.apache.lenya.cms.rc.RCEnvironment</xsp:include>
-    <xsp:include>org.apache.lenya.cms.publication.Publication</xsp:include>
-    <xsp:include>org.apache.lenya.xml.DOMParserFactory</xsp:include>
-  </xsp:structure>                                                                                                                          
-
-  <rc:backup xmlns:rc="http://apache.org/cocoon/lenya/rc/1.0">
-
-    <xsp:logic>
-
-      String rollbackTime=request.getParameter("rollbackTime");
-
-      Publication publication = (Publication)<input:get-attribute module="page-envelope" as="object" name="publication"/>;
-      String rootDir=publication.getEnvironment().getPublicationPath();
-      String servletContextPath = publication.getServletContext().getCanonicalPath();
-
-      String contextPath = "content";
-      String area = <input:get-attribute module="page-envelope" as="string" name="area"/>;
-      String documentPath = <input:get-attribute module="page-envelope" as="string" name="document-path"/>;
-      String filename = "/" + contextPath + "/" + area + "/" + documentPath;    
-      RCEnvironment rcEnvironment = RCEnvironment.getInstance(publication.getServletContext().getAbsolutePath());
-      String rcmlDirectory = rcEnvironment.getRCMLDirectory();
-      rcmlDirectory=rootDir+rcmlDirectory;
-      String backupDirectory = rcEnvironment.getBackupDirectory();
-      backupDirectory=rootDir+backupDirectory;
-
-      RevisionController rc = new RevisionController(rcmlDirectory, backupDirectory, rootDir);
-      String backupFilename = rc.getBackupFilename(new Long(rollbackTime).longValue(), filename);
-
-      DOMParserFactory dpf=new DOMParserFactory();
-      org.w3c.dom.Document doc=null;
-      try {
-        doc = dpf.getDocument(backupFilename);
-      } catch (Exception e) {
-        <rc:exception>rollback: Unable to get view file, caught exception: <xsp:expr>e.toString()</xsp:expr></rc:exception>
-      }                                                                                                                                       
-      org.w3c.dom.Element rootE= (org.w3c.dom.Element)doc.getDocumentElement();
-    </xsp:logic>
-
-    <xsp:expr>rootE</xsp:expr>
-  </rc:backup>
-</xsp:page>
diff --git a/src/webapp/lenya/content/search/create-index.xsp b/src/webapp/lenya/content/search/create-index.xsp
deleted file mode 100644
index c4a5d61..0000000
--- a/src/webapp/lenya/content/search/create-index.xsp
+++ /dev/null
@@ -1,151 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: create-index.xsp,v 1.4 2004/03/13 12:31:34 gregor Exp $ -->
-
-<xsp:page language="java"
-          xmlns:xsp="http://apache.org/xsp"
-          xmlns:xsp-request="http://apache.org/xsp/request/2.0"
-          xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-          xmlns:input="http://apache.org/cocoon/xsp/input/1.0"
-          >
-
-  <xsp:structure>
-   <xsp:include>org.apache.avalon.framework.context.ContextException</xsp:include>
-   <xsp:include>org.apache.avalon.framework.component.ComponentException</xsp:include>
-   <xsp:include>org.apache.cocoon.ProcessingException</xsp:include>
-   <xsp:include>java.net.URL</xsp:include>
-   <xsp:include>java.net.MalformedURLException</xsp:include>
-   <xsp:include>org.apache.cocoon.components.language.markup.xsp.XSPUtil</xsp:include>
-   <xsp:include>org.apache.avalon.framework.context.ContextException</xsp:include>
-   <xsp:include>org.apache.cocoon.components.search.*</xsp:include>
-   <xsp:include>org.apache.lucene.store.Directory</xsp:include>
-   <xsp:include>org.apache.lucene.analysis.Analyzer</xsp:include>
-  </xsp:structure>
-
-  <xsp:logic>
-  File workDir = null;
-  /** Contextualize this class */
-  public void contextualize(Context context) throws ContextException {
-    super.contextualize( context );
-    workDir = (File) context.get(Constants.CONTEXT_WORK_DIR);
-  }
-  
-  LuceneCocoonIndexer lcii;
-  Analyzer analyzer = LuceneCocoonHelper.getAnalyzer( "org.apache.lucene.analysis.standard.StandardAnalyzer" );
-  
-  void createIndex(String baseURL, boolean create,String publication_id) throws ProcessingException {
-    try {
-      
-      lcii = (LuceneCocoonIndexer)this.manager.lookup( LuceneCocoonIndexer.ROLE );
-      //Directory directory = LuceneCocoonHelper.getDirectory( new File( workDir, "index" ), create );
-      Directory directory = LuceneCocoonHelper.getDirectory( new File( workDir, "lucene-search-index-"+publication_id ), create );
-      lcii.setAnalyzer( analyzer );
-      // "http://localhost:8080/cocoon/documents/index.html"
-      URL base_url = new URL( baseURL );
-      lcii.index( directory, create, base_url );
-    } catch (MalformedURLException mue) {
-      throw new ProcessingException( "MalformedURLException in createIndex()!", mue );
-    } catch (IOException ioe) {
-      // ignore ??
-      throw new ProcessingException( "IOException in createIndex()!", ioe );
-    } catch (ComponentException ce) {
-      // ignore ??
-      throw new ProcessingException( "ComponentException in createIndex()!", ce );
-    } finally {
-      if (lcii != null) {
-        this.manager.release( lcii );
-      }
-      lcii = null;
-    }
-  }
-
-  </xsp:logic>
-
-  <page>
-    <xsp:logic>
-      boolean indexHasBeenCreated=false;
-      boolean create;
-      String createParam = <xsp-request:get-parameter name="create" />;
-      if (createParam == null) {
-        create = false;
-      } else {
-        create = true;
-      }
-      
-      String baseURL = <xsp-request:get-parameter name="baseURL" />;
-      String publication_id = <input:get-attribute module="page-envelope" name="publication-id" as="string"/>;
-      if (baseURL != null &amp;&amp; baseURL.length() > 0 &amp;&amp; publication_id != null &amp;&amp; publication_id.length() > 0) {
-        createIndex(baseURL, create, publication_id);
-        indexHasBeenCreated=true;
-      }
-      if (baseURL == null || baseURL.length() &lt; 1) {
-        baseURL = 
-          "http://" + 
-          <xsp-request:get-server-name/> +
-          ":" + <xsp-request:get-server-port/> +
-          <xsp-request:get-context-path/> + "/" + <input:get-attribute module="page-envelope" name="publication-id" as="string"/> + "/index.html";
-      }
-    </xsp:logic>
-    <content>
-    <page:page>
-      <page:title>Search</page:title>
-      <page:body>
-    <div class="lenya-box">
-      <div class="lenya-box-title">Create a search index</div>
-      <div class="lenya-box-body">
-      <xsp:logic>
-        if(indexHasBeenCreated){
-          <xsp:content><index_has_been_created/><h3>Index has been created for Publication <xsp:expr>publication_id</xsp:expr></h3></xsp:content>
-          }  
-      </xsp:logic>
-        This process might take some time (follow the tail of your logfiles
-        to see the indexer in progress).
-        <form action="">
-        <table class="lenya-table-noborder">
-          <tr>
-            <td>BaseURL</td>
-            <td>
-              <input type="text" name="baseURL" size="60" class="lenya-form-element">
-                <xsp:attribute name="value"><xsp:expr>baseURL</xsp:expr></xsp:attribute>
-              </input>
-            </td>
-          </tr>
-          <tr>
-            <td colspan="2">
-              <input type="radio" name="create" value="true" checked="checked"/>
-              Create/Overwrite the Index, or
-              <input type="radio" name="create" value="false"/>
-              Update the existing Index
-            </td>
-          </tr>
-          <tr>
-            <td colspan="2">
-              <input type="submit" name="find" value="Create"/>
-            </td>
-          </tr>
-        </table>
-        </form>
-      </div>
-    </div>
-      </page:body>
-    </page:page>
-    </content>
-  </page>
-
-</xsp:page>
-
diff --git a/src/webapp/lenya/content/search/search-and-results.xsp b/src/webapp/lenya/content/search/search-and-results.xsp
deleted file mode 100644
index b9134b9..0000000
--- a/src/webapp/lenya/content/search/search-and-results.xsp
+++ /dev/null
@@ -1,545 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsp:page language="java"
-          xmlns:xsp="http://apache.org/xsp"
-  xmlns:util="http://apache.org/xsp/util/2.0"
-          xmlns:xsp-request="http://apache.org/xsp/request/2.0">
-
-  <xsp:structure>
-    <xsp:include>org.apache.avalon.framework.context.ContextException</xsp:include>
-    <xsp:include>org.apache.avalon.framework.component.ComponentException</xsp:include>
-    
-    <xsp:include>org.apache.lucene.analysis.Analyzer</xsp:include>
-    <xsp:include>org.apache.lucene.analysis.standard.StandardAnalyzer</xsp:include>
-    <xsp:include>org.apache.lucene.document.Document</xsp:include>
-    <xsp:include>org.apache.lucene.document.Field</xsp:include>
-    <xsp:include>org.apache.lucene.queryParser.QueryParser</xsp:include>
-    <xsp:include>org.apache.lucene.queryParser.MultiFieldQueryParser</xsp:include>
-    <xsp:include>org.apache.lucene.search.Hits</xsp:include>
-    <xsp:include>org.apache.lucene.search.IndexSearcher</xsp:include>
-    <xsp:include>org.apache.lucene.search.Query</xsp:include>
-    <xsp:include>org.apache.lucene.search.Searcher</xsp:include>
-    <xsp:include>org.apache.lucene.search.Sort</xsp:include>
-    
-    <xsp:include>java.io.FileNotFoundException</xsp:include>
-    <xsp:include>java.util.Enumeration</xsp:include>
-    <xsp:include>java.util.StringTokenizer</xsp:include>
-    <xsp:include>java.util.Vector</xsp:include>
-
-    <xsp:include>org.apache.lenya.lucene.ReTokenizeFile</xsp:include>
-    <xsp:include>org.apache.lenya.lucene.Publication</xsp:include>
-    
-  </xsp:structure>
-
-  <xsp:logic>
-   File workDir = null;
-   
-   File indexDir=null;
-   File excerptDir=null;
-
-   String[] fields={"contents","title"};
-   String field = "contents";
-
-  /** 
-   * Contextualize this class 
-   */
-  public void contextualize(Context context) throws ContextException {
-    super.contextualize( context );
-    workDir = (File) context.get(Constants.CONTEXT_WORK_DIR);
-    }
-
-  /**
-   * Search index
-   */
-  Hits search(String query_string, String publication_id, String sortField, boolean sortReverse) throws ProcessingException, IOException{
-      hits=null;
-
-      try{
-        Searcher searcher=new IndexSearcher(indexDir.getAbsolutePath());
-        Analyzer l_analyzer=new StandardAnalyzer();
-
-        QueryParser l_queryParser = new QueryParser(field,l_analyzer); // Single field
-        //MultiFieldQueryParser l_queryParser = new MultiFieldQueryParser(fields[0], l_analyzer); // Multiple fields
-
-        l_queryParser.setOperator(QueryParser.DEFAULT_OPERATOR_AND);
-
-        getLogger().debug(query_string);
-        Query l_query = l_queryParser.parse(query_string); // Single field
-        //Query l_query = l_queryParser.parse(query_string,fields,l_analyzer); // Multiple fields
-
-        if (sortField != null) {
-            Sort sort = new Sort(sortField, sortReverse);
-            hits = searcher.search(l_query, sort);
-        } else {
-            hits = searcher.search(l_query);
-        }
-        if(hits != null){
-          return hits;
-          }
-        }
-      catch(IOException e){
-        System.err.println(".search(): EXCEPTION: "+e);
-        throw e;
-        }
-      catch(Exception e){
-        System.err.println(".search(): EXCEPTION: "+e);
-        }
-
-      return null;
-      }
-
-  /**
-   *
-   */
-  String getPercent(float score){
-    return ""+java.lang.Math.round(score*100.0);
-    }
-
-
-
-
-    Hits hits;
-    int hits_length=-1;
-
-    String[] words=new String[0];
-
-    int hitsPerPage;
-    int maxPages;
-    int excerptOffset;
-    int start;
-    int end; 
-  </xsp:logic>
-
-  <search-and-results>
-    <xsp:logic>
-      // Get sitemap path
-      org.apache.excalibur.source.Source input_source=this.resolver.resolveURI("");
-      String sitemapPath=input_source.getURI();
-      sitemapPath=sitemapPath.substring(5); // Remove "file:" protocol
-
-
-
-      // Read parameters from sitemap
-      String numberOfPubs = parameters.getParameter("number-of-pubs", "1");
-      Publication[] pubs = new Publication[Integer.parseInt(numberOfPubs)];
-      for(int i = 0;i &lt; pubs.length;i++) {
-          pubs[i] = new Publication();
-          pubs[i].id = parameters.getParameter("pub"+i+"-id","@ID@");
-          pubs[i].name = parameters.getParameter("pub"+i+"-name","@NAME@");
-          pubs[i].indexDir = parameters.getParameter("pub"+i+"-index-dir","@INDEX-DIR@");
-          pubs[i].searchFields = parameters.getParameter("pub"+i+"-search-fields","title,contents");
-          pubs[i].excerptDir = parameters.getParameter("pub"+i+"-excerpt-dir","@EXCERPT-DIR@");
-          pubs[i].prefix = parameters.getParameter("pub"+i+"-prefix","@PREFIX@");
-      }
-      String param_hits_per_page = parameters.getParameter("max-hits-per-page","13");
-      hitsPerPage = Integer.parseInt(param_hits_per_page);
-      String param_max_pages = parameters.getParameter("max-pages","5");
-      maxPages = Integer.parseInt(param_max_pages);
-      String param_excerpt_offset = parameters.getParameter("excerpt-offset","100");
-      excerptOffset = Integer.parseInt(param_excerpt_offset);
-
-
-
-
-
-
-      // Read parameters from query string
-      String queryString = <xsp-request:get-parameter name="queryString" default=""/>;
-      String publication_id = <xsp-request:get-parameter name="publication-id" default="levivanya"/>;
-      String sortBy = <xsp-request:get-parameter name="sortBy" default="score"/>;
-      String sortReverse = <xsp-request:get-parameter name="sortReverse" default="false"/>;
-
-      String startString = <xsp-request:get-parameter name="start" default="1"/>;
-      String endString = <xsp-request:get-parameter name="end"/>;
-      start=new Integer(startString).intValue();
-      if(endString == null){
-        end=hitsPerPage;
-        }
-      else{
-        end=new Integer(endString).intValue();
-        }
-
-      // Find the number of the selected publication
-      int whichPublication=0;
-      for (int i = 0;i &lt; pubs.length;i++) {
-          if (pubs[i].id.equals(publication_id)) {
-              whichPublication = i;
-          }
-      }
-
-
-
-
-
-      // Get all search fields
-      Vector myFields = new Vector();
-      Enumeration parameterNames = request.getParameterNames();
-      while(parameterNames.hasMoreElements()){
-          String parameterName=(String)parameterNames.nextElement();
-          String value=request.getParameter(parameterName);
-
-          if (parameterName.indexOf(".fields") > 0) { // looking for field parameters
-              StringTokenizer st = new StringTokenizer(parameterName, ".");
-              int length = st.countTokens();
-              String fieldPublicationId = st.nextToken();
-	      if (fieldPublicationId.equals(publication_id) || fieldPublicationId.equals("dummy-index-id")) {
-	          st.nextToken(); // Ignore "fields" token
-                  if (length == 2) { // radio or select
-                      myFields.addElement(value);
-                  } else if (length == 3) { // checkbox
-                      myFields.addElement(st.nextToken());
-                  } else {
-                      // something is wrong
-                  }
-              }
-          }
-      }
-
-      if (myFields.size() > 0) {
-          field = (String)myFields.elementAt(0);
-          fields = new String[myFields.size()];
-          for (int i = 0; i &lt; myFields.size(); i++) {
-              fields[i] = (String)myFields.elementAt(i);
-          }
-      }
-
-
-
-
-
-      // Set index and excerpt dir
-      String param_index_dir=pubs[whichPublication].indexDir;
-      if(param_index_dir.charAt(0) == '/'){
-        indexDir=new File(param_index_dir);
-        }
-      else{
-        indexDir=new File(sitemapPath+File.separator+param_index_dir);
-        }
-      String param_excerpt_dir=pubs[whichPublication].excerptDir;
-      if(param_excerpt_dir.charAt(0) == '/'){
-        excerptDir=new File(param_excerpt_dir);
-        }
-      else{
-        excerptDir=new File(sitemapPath+File.separator+param_excerpt_dir);
-        }
-    </xsp:logic>
-    
-
-    <configuration><xsp:attribute name="checked-pid"><xsp:expr>publication_id</xsp:expr></xsp:attribute>
-      <number-of-publications><xsp:expr>numberOfPubs</xsp:expr></number-of-publications>
-
-      <xsp:logic>
-      for(int i = 0;i &lt; pubs.length;i++) {
-         <publication><xsp:attribute name="pid"><xsp:expr>pubs[i].id</xsp:expr></xsp:attribute>
-           <name><xsp:expr>pubs[i].name</xsp:expr></name>
-           <index-dir><xsp:expr>pubs[i].indexDir</xsp:expr></index-dir>
-           <search-fields>
-               <xsp:logic>
-               String[] searchFields = pubs[i].getFields();
-               if (searchFields != null) {
-                   for (int k = 0; k &lt; searchFields.length; k++) {
-                       <field><xsp:expr>searchFields[k]</xsp:expr></field>
-                   }
-               } else {
-                   <xsp:content><xsp:expr>pubs[i].searchFields</xsp:expr></xsp:content><exception>.getFields() returned null</exception>
-               }
-               </xsp:logic>
-           </search-fields>
-           <excerpt-dir><xsp:expr>pubs[i].excerptDir</xsp:expr></excerpt-dir>
-           <prefix><xsp:expr>pubs[i].prefix</xsp:expr></prefix>
-         </publication>
-      }
-      </xsp:logic>
-
-      <hits-per-page><xsp:expr>hitsPerPage</xsp:expr></hits-per-page>
-      <max-pages><xsp:expr>maxPages</xsp:expr></max-pages>
-      <excerpt-offset><xsp:expr>excerptOffset</xsp:expr></excerpt-offset>
-    </configuration>
-
-<!-- Search Results -->
-      <search>
-        <xsp:logic>
-          Enumeration para_names = request.getParameterNames();
-          if(para_names.hasMoreElements()){
-            <request-parameters>
-              <xsp:logic>
-              while(para_names.hasMoreElements()){
-                String para_name=(String)para_names.nextElement();
-                String para_value=request.getParameter(para_name);
-                <parameter><xsp:attribute name="name"><xsp:expr>para_name</xsp:expr></xsp:attribute><xsp:attribute name="value"><xsp:expr>para_value</xsp:expr></xsp:attribute></parameter>
-                <xsp:element><xsp:param name="name"><xsp:expr>para_name</xsp:expr></xsp:param><xsp:expr>para_value</xsp:expr></xsp:element>
-                }
-              </xsp:logic>
-            </request-parameters>
-            }
-
-          if(queryString != null &amp;&amp; queryString.length() != 0 &amp;&amp; publication_id != null &amp;&amp; publication_id.length() > 0){
-
-            try {
-                if (sortBy.equals("score")) {
-                   hits = search(queryString, publication_id, null, false);
-                } else {
-                   if (sortReverse.equals("true")) {
-                       hits = search(queryString, publication_id, sortBy, true);
-                   } else {
-                       hits = search(queryString, publication_id, sortBy, false);
-                   }
-                }
-            } catch(Exception e) {
-                <exception><xsp:expr>e.toString()</xsp:expr></exception>
-            }
-
-            if(hits != null){
-              hits_length=hits.length();
-              }
-            else{
-              hits_length=-1;
-              hits=null;
-              }
-            <publication-id><xsp:expr>publication_id</xsp:expr></publication-id>
-            <publication-name><xsp:expr>pubs[whichPublication].name</xsp:expr></publication-name>
-            <publication-prefix><xsp:expr>pubs[whichPublication].prefix</xsp:expr></publication-prefix>
-            <sort-by><xsp:expr>sortBy</xsp:expr></sort-by>
-            <query-string><xsp:expr>queryString</xsp:expr></query-string>
-            if(queryString != null){
-              Vector twords=new Vector();
-              <words>
-              <xsp:logic>
-              StringTokenizer st=new StringTokenizer(queryString," ");
-              while(st.hasMoreTokens()){
-                String word=(String)st.nextElement();
-                if(!(word.equals("OR") || word.equals("AND"))){
-                  <word><xsp:expr>word</xsp:expr></word>
-                  twords.addElement(word);
-                  }
-                }
-              words=new String[twords.size()];
-              for(int i=0;i&lt;twords.size();i++){
-                words[i]=(String)twords.elementAt(i);
-<!--
-                <word><xsp:expr>words[i]</xsp:expr></word>
--->
-                }
-              </xsp:logic>
-              </words>
-              }
-            <start><xsp:expr>start</xsp:expr></start>
-            <end><xsp:expr>end</xsp:expr></end>
-            <fields>
-              <xsp:logic>
-              for (int i = 0; i &lt; fields.length; i++) {
-                <field><xsp:expr>fields[i]</xsp:expr></field>
-              }
-              </xsp:logic>
-            </fields>
-
-      try{
-        Analyzer ll_analyzer=new StandardAnalyzer();
-        QueryParser queryParser = new QueryParser(field,ll_analyzer);
-        //MultiFieldQueryParser queryParser = new MultiFieldQueryParser("contents",ll_analyzer);
-        queryParser.setOperator(QueryParser.DEFAULT_OPERATOR_AND);
-        Query ll_query = queryParser.parse(queryString);
-        //Query ll_query = queryParser.parse(queryString,fields,ll_analyzer);
-        <query><xsp:expr>ll_query.toString("contents")</xsp:expr></query>
-        }
-      catch(Exception e){
-        <exception><xsp:expr>e.toString()</xsp:expr></exception>
-        }
-
-            }
-          else{
-            hits_length=-1;
-            hits=null;
-            }
-        </xsp:logic>
-      </search>
-
-          <xsp:logic>
-            if(hits != null){
-        <results><xsp:attribute name="total-hits"><xsp:expr>hits_length</xsp:expr></xsp:attribute>
-        <xsp:logic>
-       if(hits_length &gt; 0){
-     <hits>
-          <xsp:logic>
-              for (int i=start-1;i &lt;= end-1;i++) {
-                if((i &lt; 0) || (i &gt;= hits.length())){
-                  continue;
-                  }
-                Document ldoc=hits.doc(i);
-                Enumeration lfields = ldoc.fields();
-                String lpath=ldoc.get("path");
-
-                String lurl=ldoc.get("url");
-                String ltitle=ldoc.get("title");
-                String mime_type=ldoc.get("mime-type");
-                
-                if(lpath != null){
-                  <hit>
-                    <score><xsp:attribute name="percent"><xsp:expr>getPercent(hits.score(i))</xsp:expr></xsp:attribute><xsp:expr>hits.score(i)</xsp:expr></score> 
-                    <path><xsp:expr>lpath</xsp:expr></path>
-                  </hit>
-                }
-                else if(lurl != null){
-                  <hit><xsp:attribute name="pos"><xsp:expr>i+1</xsp:expr></xsp:attribute>
-                    <fields>
-		    <xsp:logic>
-                    while (lfields.hasMoreElements()) {
-                        Field lfield = (Field)lfields.nextElement();
-                        String slfield = lfield.toString();
-                        <field><xsp:expr>slfield</xsp:expr></field>
-                        <xsp:element><xsp:param name="name"><xsp:expr>lfield.name()</xsp:expr></xsp:param><xsp:attribute name="type"><xsp:expr>slfield.substring(0, slfield.indexOf("&lt;"))</xsp:expr></xsp:attribute><xsp:expr>lfield.stringValue()</xsp:expr></xsp:element>
-                    }
-		    </xsp:logic>
-                    </fields>
-                    <score><xsp:attribute name="percent"><xsp:expr>getPercent(hits.score(i))</xsp:expr></xsp:attribute><xsp:expr>hits.score(i)</xsp:expr></score> 
-                    <xsp:logic>
-                      String parent = "";
-                      String filename = "";
-                      String querystring = "";
-                      if(lurl.lastIndexOf("/") &gt; -1) {
-                          parent = lurl.substring(0,lurl.lastIndexOf("/"));
-                          filename = lurl.substring(lurl.lastIndexOf("/")+1);
-                      }
-                      if(lurl.indexOf("?") &gt; -1) {
-                          querystring = lurl.substring(lurl.indexOf("?"));
-                      }
-                    <uri>
-                      <xsp:attribute name="parent"><xsp:expr>parent</xsp:expr></xsp:attribute>
-                      <xsp:attribute name="filename"><xsp:expr>filename</xsp:expr></xsp:attribute>
-                      <xsp:attribute name="querystring"><xsp:expr>querystring</xsp:expr></xsp:attribute>
-                      <xsp:expr>lurl</xsp:expr></uri>
-                    </xsp:logic>
-                    <xsp:logic>
-                    File excerptFile=new File(excerptDir+File.separator+lurl);
-                    if((ltitle != null) &amp;&amp; (ltitle.length() &gt; 0)){
-                      <title><xsp:expr>ltitle</xsp:expr></title>
-                      }
-                    else{
-                      <title><xsp:expr>excerptFile.getName()</xsp:expr></title>
-                      <no-title/>
-                      }
-                    if((mime_type != null) &amp;&amp; (mime_type.length() &gt; 0)){
-                      <mime-type><xsp:expr>mime_type</xsp:expr></mime-type>
-                      }
-                    else{
-                      <no-mime-type/>
-                      }
-
-                    //String[] words={"funds","bonds"};
-                    try{
-                      ReTokenizeFile rtf=new ReTokenizeFile();
-                      rtf.setOffset(excerptOffset);
-                      String excerpt=rtf.getExcerpt(excerptFile,words);
-                      if(excerpt != null){
-                        excerpt=rtf.emphasizeAsXML(rtf.tidy(excerpt),words);
-
-                        <util:include-expr><util:expr><xsp:expr>excerpt</xsp:expr></util:expr></util:include-expr>
-
-                        // FIXME: Update Cocoon!!!
-                        //org.apache.cocoon.components.language.markup.xsp.XSPUtil.includeString(excerpt,this.manager,this.contentHandler);
-
-
-<!--
-                        <excerpt><word>Vanya</word><xsp:expr>excerpt</xsp:expr></excerpt>
--->
-/*
-                        this.contentHandler.startElement("","excerpt","excerpt",xspAttr);
-                        this.lexicalHandler.startCDATA();
-                        this.characters(excerpt);
-                        this.lexicalHandler.endCDATA();
-                        this.contentHandler.endElement("","excerpt","excerpt");
-*/
-                        }
-                      else{
-                        throw new Exception("excerpt == null. Maybe file does not contain the words!");
-                        }
-                      }
-                    catch(FileNotFoundException e){
-                      <no-excerpt>
-                        <file><xsp:attribute name="src"><xsp:expr>excerptFile.getAbsolutePath()+" "+words[0]+" "+e</xsp:expr></xsp:attribute></file>
-                      </no-excerpt>
-                      }
-                    catch(Exception e){
-                      <excerpt-exception><xsp:expr>""+e</xsp:expr></excerpt-exception>
-                      }
-
-                    </xsp:logic>
-                  </hit>
-                 }
-              }
-          </xsp:logic>
-     </hits>
-        }
-      else{
-       <no-hits/>
-        }
-     </xsp:logic>
-
-
-           <xsp:logic>
-             int number_of_pages=(hits.length()/hitsPerPage);
-             if(number_of_pages*hitsPerPage != hits.length()){
-               number_of_pages=number_of_pages+1;
-               }
-             if(number_of_pages &gt; maxPages){
-               number_of_pages=maxPages;
-               }
-             if(hits.length() == 0){
-               number_of_pages=0;
-               <no-pages/>
-               }
-             else{
-             <pages>
-           <xsp:logic>
-             for(int i=0;i&lt;number_of_pages;i++){
-               int pstart=i*hitsPerPage+1;
-               int pend=(i+1)*hitsPerPage;
-               if(hits_length &lt; pend){
-                 pend=hits_length;
-                 }
-               String type="other";
-               if(pstart == start){
-                 type="current";
-                 }
-               else if(pstart == start-hitsPerPage){
-                 type="previous";
-                 }
-               else if(pstart == start+hitsPerPage){
-                 type="next";
-                 }
-               <page>
-                 <xsp:attribute name="start"><xsp:expr>pstart</xsp:expr></xsp:attribute>
-                 <xsp:attribute name="end"><xsp:expr>pend</xsp:expr></xsp:attribute>
-                 <xsp:attribute name="type"><xsp:expr>type</xsp:expr></xsp:attribute>
-               </page>
-              }
-           </xsp:logic>
-             </pages>
-             }
-           </xsp:logic>
-        </results>
-            }
-          </xsp:logic>
-<!-- /Search Results -->
-
-  </search-and-results>
-
-</xsp:page>
-
diff --git a/src/webapp/lenya/content/util/empty.xml b/src/webapp/lenya/content/util/empty.xml
deleted file mode 100644
index d4c860c..0000000
--- a/src/webapp/lenya/content/util/empty.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: empty.xml,v 1.2 2004/03/13 12:31:31 gregor Exp $ -->
-
-<!-- This is a simple xml file that can bes used in pipelines where all the -->
-<!-- work is done in the xsl and they just need a dummy xml to start the -->
-<!-- pipeline. -->
-
-  <empty></empty>
diff --git a/src/webapp/lenya/content/xopus/error.xml b/src/webapp/lenya/content/xopus/error.xml
deleted file mode 100644
index 36846e0..0000000
--- a/src/webapp/lenya/content/xopus/error.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: error.xml,v 1.3 2004/03/13 12:31:34 gregor Exp $ -->
-
-<page>
-  <error>
-    <code>XXX</code>
-    <stat>true</stat>
-    <desc>generic: lenya/content/xopus/error.xml</desc>
-  </error>
-</page>
diff --git a/src/webapp/lenya/doctypes/links/doctype.xconf b/src/webapp/lenya/doctypes/links/doctype.xconf
deleted file mode 100644
index b848b1c..0000000
--- a/src/webapp/lenya/doctypes/links/doctype.xconf
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: doctypes.xconf 164635 2005-04-25 20:01:43Z tschlabach $ -->
-
-<!--+
-    | This configuration file is read by the
-    | org.apache.lenya.cms.publication.DocumentTypeBuilder
-    | to digest the resource types known to the publication
-    +-->
-
-<resource-type name="links">
-  <creator src="org.apache.lenya.cms.authoring.DefaultBranchCreator">
-    <sample-name>links.xml</sample-name>
-  </creator>
-</resource-type>
diff --git a/src/webapp/lenya/doctypes/links/samples/links.xml b/src/webapp/lenya/doctypes/links/samples/links.xml
deleted file mode 100644
index 70908e5..0000000
--- a/src/webapp/lenya/doctypes/links/samples/links.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0"?>
-
-<links xmlns="http://apache.org/lenya/pubs/default/1.0">
-  <title>Links</title>
-  <link href="http://lenya.apache.org">Apache Lenya Website</link>
-  <link href="http://wiki.apache.org/lenya/">Apache Lenya Wiki</link>
-</links>
diff --git a/src/webapp/lenya/doctypes/links/schema/links.rng b/src/webapp/lenya/doctypes/links/schema/links.rng
deleted file mode 100644
index 2d03eb9..0000000
--- a/src/webapp/lenya/doctypes/links/schema/links.rng
+++ /dev/null
@@ -1,16 +0,0 @@
-<element name="links" ns="http://apache.org/lenya/pubs/default/1.0" xmlns="http://relaxng.org/ns/structure/1.0">
-
-  <optional>
-    <element name="title">
-      <text/>
-    </element>
-  </optional>
-
-  <zeroOrMore>
-    <element name="link">
-      <attribute name="href"/>
-      <text/>
-    </element>
-  </zeroOrMore>
-
-</element>
diff --git a/src/webapp/lenya/doctypes/xhtml/doctype.xconf b/src/webapp/lenya/doctypes/xhtml/doctype.xconf
deleted file mode 100644
index a5fbbc5..0000000
--- a/src/webapp/lenya/doctypes/xhtml/doctype.xconf
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: doctypes.xconf 164635 2005-04-25 20:01:43Z tschlabach $ -->
-
-<!--+
-    | This configuration file is read by the
-    | org.apache.lenya.cms.publication.DocumentTypeBuilder
-    | to digest the resource types known to the publication
-    +-->
-
-<resource-type name="xhtml">
-  <schema src="xhtml.rng"/>
-  <creator src="org.apache.lenya.cms.authoring.DefaultBranchCreator">
-    <sample-name>xhtml.xml</sample-name>
-  </creator>
-  <link-attribute xpath="//*[namespace-uri() = 'http://www.w3.org/1999/xhtml']/@href"/>
-</resource-type>
diff --git a/src/webapp/lenya/doctypes/xhtml/samples/xhtml.xml b/src/webapp/lenya/doctypes/xhtml/samples/xhtml.xml
deleted file mode 100644
index 588c40c..0000000
--- a/src/webapp/lenya/doctypes/xhtml/samples/xhtml.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<html xmlns="http://www.w3.org/1999/xhtml" 
-      xmlns:xhtml="http://www.w3.org/1999/xhtml" 
-      xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0"
->
-  <head>
-    <title>Default Publication</title>
-  </head>
-  <body>
-    <h1>Default Publication</h1>
-    <p>Welcome to the default Lenya publication!</p>
-    <p>The purpose of this publication is</p>
-    <ul>
-      <li>to show beginners the basic functionality of the Lenya CMS,</li>
-      <li>to provide an "out of the box" publication that can be easily adapted and used, and</li>
-      <li>to provide a basis for reference implementations of new concepts and best practices.</li>
-    </ul>
-    <p>
-    You won't find any fancy and confusing bells and whistles here, but the
-    publication contains everything you need to get started.
-    </p>
-  </body>
-</html>
diff --git a/src/webapp/lenya/i18n.xmap b/src/webapp/lenya/i18n.xmap
deleted file mode 100644
index 98ffb68..0000000
--- a/src/webapp/lenya/i18n.xmap
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<!--
-  This sitemaps provides fallback message catalogues and catalogue merging.
-  The reason for the existence of this sitemap is mainly to avoid endless loops caused by mounts
-  in sitemap.xmap and global-sitemap.xmap.
--->
-
-<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
-
-  <map:pipelines>
-  
-    <map:pipeline type="noncaching">
-      <map:match pattern="i18n-catalogue/**">
-        <map:select type="resource-exists">
-          <map:when test="pubs/{page-envelope:publication-id}/lenya/resources/i18n/{1}">
-            <map:generate type="serverpages" src="resources/i18n/catalogue.xsp">
-              <map:parameter name="pub-catalogue-location" value="context:/lenya/pubs/{page-envelope:publication-id}/lenya/resources/i18n/"/>
-        	  <map:parameter name="catalogue-file" value="{1}"/>
-            </map:generate>
-            <map:transform type="xinclude"/>
-            <map:serialize/>
-          </map:when>
-          <map:when test="resources/i18n/{1}">
-            <map:generate src="resources/i18n/{1}"/>
-            <map:serialize/>
-          </map:when>
-        </map:select>
-      </map:match>
-    </map:pipeline>  
-  </map:pipelines>
-
-</map:sitemap>
diff --git a/src/webapp/lenya/import.xmap b/src/webapp/lenya/import.xmap
deleted file mode 100644
index f3ccfd9..0000000
--- a/src/webapp/lenya/import.xmap
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<!-- README: -->
-<!-- ======= -->
-
-<!-- The parent sitemap needs to mount this sitemap. One possible way to do -->
-<!-- this is as follows:  -->
-
-<!--        Import -->
-<!--       <map:match pattern="import/**"> -->
-<!--         <map:mount uri-prefix="import" src="lenya/import.xmap" check-reload="true" reload-method="synchron"/> -->
-<!--       </map:match> -->
-      
-<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
-
-  <map:pipelines>
-    
-    <!-- Open Office import -->  
-    <map:pipeline>
-
-        <!-- Read the zip/jar file -->
-        <map:match pattern="**.sxw">
-            <map:read src="content/{1}.sxw"/>
-        </map:match>
-
-        <!-- Unpack zip file and transform the OO xml to xhtml -->
-        <map:match pattern="**.oo">
-            <!-- FIXME: make sure the URI points to your location of sxw files -->
-            <map:generate src="jar:http://localhost:8080/{1}.sxw!/content.xml"/>
-            <map:transform src="xslt/import/oo2html.xsl"/>
-            <map:serialize/>
-        </map:match>
-    </map:pipeline>
-    
-    <!-- Microsoft Word 11 import -->
-    <!-- for copyright reasons, we cannot ship the microsoft XSLT. you can get it from MSDN --> 
-    <map:pipeline>
-        <map:match pattern="**.xml">
-            <map:generate src="content/{1}.xml"/>
-            <map:transform type="xalan" src="xslt/import/wordml2html.xsl"/>
-            <map:serialize/>
-        </map:match>
-    </map:pipeline>
-  </map:pipelines>
-</map:sitemap>
diff --git a/src/webapp/lenya/info.xmap b/src/webapp/lenya/info.xmap
deleted file mode 100644
index 476e393..0000000
--- a/src/webapp/lenya/info.xmap
+++ /dev/null
@@ -1,157 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
-
-  <map:components>
-    <map:generators default="file">
-      <map:generator name="sitetree-fragment" label="content,data" logger="sitemap.generator.sitetree-fragment" pool-grow="2" pool-max="16" pool-min="2" src="org.apache.lenya.cms.cocoon.generation.SitetreeFragmentGenerator"/>
-    </map:generators>
-    <map:matchers default="wildcard">
-      <map:matcher name="language" logger="sitemap.matcher.wildcardrequestparameter" src="org.apache.cocoon.matching.WildcardRequestParameterMatcher">
-        <parameter-name>lenya.language</parameter-name>
-      </map:matcher>
-      <map:matcher name="tab" logger="sitemap.matcher.wildcardrequestparameter" src="org.apache.cocoon.matching.WildcardRequestParameterMatcher">
-        <parameter-name>lenya.info-tab</parameter-name>
-      </map:matcher>
-    </map:matchers>
-  </map:components>
-  
-  <map:resources>
-    <map:resource name="i18n">
-      <map:transform type="i18n">      
-        <map:parameter name="locale" value="{request:locale}"/>
-      </map:transform>
-    </map:resource>
-  </map:resources>
-
-  <map:pipelines>
-    
-    <!-- usecases -->
-    <!-- Sitetree Javascript array -->
-    <map:pipeline type="noncaching">
-      
-      <!-- {publication-id}/{area}/sitetree.xml -->
-      <map:match pattern="*/*/sitetree.xml">
-        <map:generate src="pubs/{1}/content/{2}/sitetree.xml"/>
-        <map:call resource="i18n"/>
-        <map:transform type="access-control-sitetree">
-          <map:parameter name="publication-id" value="{1}"/>
-          <map:parameter name="area" value="{2}"/>
-        </map:transform>
-        <map:transform src="fallback://lenya/xslt/info/sitetree2areatree.xsl">
-          <map:parameter name="area" value="{2}"/>
-        </map:transform>
-        <map:serialize type="xml"/>
-      </map:match>
-      
-      <!-- {publication-id}/{area}/info-sitetree -->
-      <map:match pattern="*/*/info-sitetree/sitetree.js">
-        <map:select type="parameter">
-          <map:parameter name="parameter-selector-test" value="{request-param:incremental}"/>
-          <map:when test="true">
-            <map:generate src="content/util/empty.xml" />
-            <map:act type="set-header">
-              <map:parameter name="Cache-Control" value="pre-check=0" />
-              <map:parameter name="Expires" value="-1" />
-            </map:act>
-          </map:when>
-          <map:otherwise>
-            <map:aggregate element="lenya" label="aggregate">
-              <map:part src="cocoon:/{1}/authoring/sitetree.xml"/>
-              <map:part src="cocoon:/{1}/archive/sitetree.xml"/>
-              <map:part src="cocoon:/{1}/trash/sitetree.xml"/>
-            </map:aggregate>
-            <map:act type="set-header">
-              <map:parameter name="Cache-Control" value="pre-check=0" />
-              <map:parameter name="Expires" value="-1" />
-            </map:act>
-            <map:transform src="xslt/navigation/sitetree2nav.xsl" label="navtree">
-              <map:parameter name="chosenlanguage" value="{request-param:language}"/>
-              <map:parameter name="defaultlanguage" value="{page-envelope:default-language}"/>
-            </map:transform>
-          </map:otherwise>
-        </map:select>
-      
-        <map:transform src="xslt/info/sitetree2tree.xsl" label="content">
-          <map:parameter name="contextprefix" value="{request:contextPath}"/>
-          <map:parameter name="publicationid" value="{1}"/>
-          <map:parameter name="chosenlanguage" value="{request-param:language}"/>
-          <map:parameter name="defaultlanguage" value="{page-envelope:default-language}"/>
-          <map:parameter name="cutdocumentid" value="{session-attr:org.apache.lenya.cms.info.cutdocumentid}"/>
-          <map:parameter name="incremental" value="{request-param:incremental}"/>
-          <map:parameter name="areas" value="authoring,archive,trash"/>
-        </map:transform>
-      
-        <map:serialize type="text"/>
-      </map:match>
- 
-      <!-- {publication-id}/{area}/info-sitetree -->
-      <map:match pattern="*/*/info-sitetree/sitetree-fragment.xml">
-        <map:generate type="sitetree-fragment">
-          <map:parameter name="areas" value="{request-param:areas}"/>
-          <map:parameter name="area" value="{request-param:area}"/>
-          <map:parameter name="documentid" value="{request-param:documentid}"/>
-          <map:parameter name="initial" value="{request-param:initial}"/>
-        </map:generate>
-        <!-- <map:call resource="i18n"/> -->
-        <map:transform type="access-control-sitetree">
-          <map:parameter name="publication-id" value="{1}"/>
-          <map:parameter name="area" value="{2}"/>
-        </map:transform>
-        <map:act type="set-header">
-          <map:parameter name="Cache-Control" value="pre-check=0" />
-          <map:parameter name="Expires" value="-1" />
-        </map:act>
-        <map:transform src="xslt/navigation/sitetree2nav.xsl" label="navtree">
-          <map:parameter name="chosenlanguage" value="{request-param:language}"/>
-          <map:parameter name="defaultlanguage" value="{page-envelope:default-language}"/>
-        </map:transform>
-        <map:serialize type="xml"/>
-      </map:match>
-    </map:pipeline>
-    
-    <!-- Sitetree Javascript array      -->
-    <map:pipeline>
-      <map:match pattern="*/*/info-sitetree/tree.js">
-        <map:read src="resources/javascript/tree.js"/>
-        <map:serialize type="text"/>
-      </map:match>
-    </map:pipeline>
-
-    <!-- Sitetree Javascript array      -->
-    <map:pipeline>
-      <map:match pattern="*/*/info-sitetree/ua.js">
-        <map:read src="resources/javascript/ua.js"/>
-        <map:serialize type="text"/>
-      </map:match>
-    </map:pipeline>
-
-    <!-- Redirect non-usecase pages to tab.overview usecase -->    
-    <map:pipeline>
-      <map:select type="parameter">
-        <map:parameter name="parameter-selector-test" value="{request-param:lenya.usecase}"/>
-        <map:when test="">
-          <map:redirect-to session="true" uri="{request:requestURI}?lenya.usecase=tab.overview"/>
-        </map:when>
-      </map:select>
-    </map:pipeline>
-
-  </map:pipelines>
-</map:sitemap>
diff --git a/src/webapp/lenya/lenya.xmap b/src/webapp/lenya/lenya.xmap
deleted file mode 100644
index 5398b97..0000000
--- a/src/webapp/lenya/lenya.xmap
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
-
-  <map:pipelines>
-
-    <map:pipeline>
-      <!-- Lenya Core -->
-
-      <!-- matches lenya/**.js -->
-      <map:match pattern="**.js">
-        <map:select type="resource-exists">
-          <map:when test="resources/{1}.xml">
-            <map:generate src="resources/{1}.xml"/>
-            <map:transform type="i18n">      
-              <map:parameter name="locale" value="{request:locale}"/>
-            </map:transform>    
-            <map:transform src="resources/javascript/javascript.xsl"/>
-            <map:serialize type="text" mime-type="application/x-javascript"/>
-          </map:when>
-          <map:otherwise>
-        <map:read src="resources/{1}.js" mime-type="application/x-javascript" />
-          </map:otherwise>
-        </map:select>
-      </map:match>
-
-      <!-- matches lenya/**.jpg -->
-      <map:match pattern="**.jpg">
-        <map:read src="resources/{1}.jpg" mime-type="image/jpeg" />
-      </map:match>
-
-      <!-- matches lenya/**.gif -->
-      <map:match pattern="**.gif">
-        <map:read src="resources/{1}.gif" mime-type="image/gif" />
-      </map:match>
-
-      <!-- matches lenya/**.png -->
-      <map:match pattern="**.png">
-        <map:read src="resources/{1}.png" mime-type="image/png" />
-      </map:match>
-
-      <!-- matches lenya/**.ext -->
-      <map:match pattern="images/**.*">
-        <map:read src="resources/images/{1}.{2}" mime-type="image/{4}" />
-      </map:match>
-
-      <map:match pattern="css/**.css">
-        <map:select type="resource-exists">
-          <map:when test="resources/css/{1}.xml">
-            <map:generate src="resources/css/{1}.xml"/>
-            <map:transform src="resources/css/css.xsl">
-              <map:parameter name="contextprefix" value="{request:contextPath}"/>
-            </map:transform>
-            <map:serialize type="text" mime-type="text/css"/>
-          </map:when>
-          <map:otherwise>
-            <map:read src="resources/css/{1}.css" mime-type="text/css"/> 
-          </map:otherwise>
-        </map:select>
-      </map:match>
-    </map:pipeline>
-  </map:pipelines>
-</map:sitemap>
diff --git a/src/webapp/lenya/lucene.xmap b/src/webapp/lenya/lucene.xmap
deleted file mode 100644
index 48c09da..0000000
--- a/src/webapp/lenya/lucene.xmap
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
-
-  <map:views>
-    <map:view name="xml" from-label="xml">
-      <map:serialize type="xml"/>
-    </map:view>
-  </map:views>
-  
-    <map:resources>
-      <map:resource name="style-cms-page">
-      <map:transform type="i18n">      
-        <map:parameter name="locale" value="{request:locale}"/>
-      </map:transform>    
-      <map:transform src="fallback://lenya/xslt/util/page2xhtml.xsl">
-        <map:parameter name="contextprefix" value="{request:contextPath}"/>
-      </map:transform>
-      <map:transform src="xslt/util/strip_namespaces.xsl"/>
-      <map:serialize type="xhtml"/>
-    </map:resource>
-</map:resources>  
-
-  <map:pipelines>
-
-    <map:pipeline>
-      <map:match pattern="*/search-*/lucene.xml">
-        <map:generate type="serverpages" src="content/search/search-and-results.xsp" label="xml">
-          <map:parameter name="max-hits-per-page" value="3"/>
-          <map:parameter name="max-pages" value="7"/>
-          <map:parameter name="excerpt-offset" value="150"/>
-          <map:parameter name="number-of-pubs" value="1"/>
-          <map:parameter name="pub0-id" value="{1}"/>
-          <map:parameter name="pub0-name" value="{1}"/>
-          <map:parameter name="pub0-index-dir" value="pubs/{1}/work/search/lucene/index/{2}/index"/>
-          <map:parameter name="pub0-search-fields" value="contents,title"/>
-          <map:parameter name="pub0-excerpt-dir" value="pubs/{1}/work/search/lucene/htdocs_dump/{2}"/>
-          <map:parameter name="pub0-prefix" value=""/>
-        </map:generate>
-        <map:transform src="xslt/search/sort.xsl"/>
-        
-<!--        <map:transform src="fallback://lenya/xslt/search/search-and-results-body.xsl">
-          <map:parameter name="contextprefix" value="{request:contextPath}"/>
-          <map:parameter name="publicationid" value="{1}"/>
-          <map:parameter name="area" value="{2}"/>
-        </map:transform>
--->
-        <map:serialize type="xml"/>
-      </map:match>
-
-      <map:match pattern="*/search-*/lucene*">
-        <map:generate src="cocoon:/{1}/search-{2}/lucene.xml{3}"/>
-        <map:transform src="fallback://lenya/xslt/search/search-and-results.xsl">
-          <map:parameter name="contextprefix" value="{request:contextPath}"/>
-          <map:parameter name="publicationid" value="{1}"/>
-          <map:parameter name="area" value="{2}"/>
-        </map:transform>
-      <map:call resource="style-cms-page"/>
-      </map:match>
-    </map:pipeline>
-   </map:pipelines>
-
-</map:sitemap>
diff --git a/src/webapp/lenya/navigation.xmap b/src/webapp/lenya/navigation.xmap
deleted file mode 100644
index 9d02d27..0000000
--- a/src/webapp/lenya/navigation.xmap
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<!--
-This sitemap creates default navigation components.
--->
-
-<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
-
-  <!-- =========================== Pipelines ================================ -->
-  
-  <map:resources>
-    
-    <map:resource name="fallback-transformation">
-    
-      <!-- use publication-specific navigation schema if available -->
-      <map:act type="resource-exists">
-        <map:parameter name="url" value="pubs/{publication-id}/lenya/xslt/navigation/{stylesheet}.xsl"/>
-        <map:transform src="pubs/{../publication-id}/lenya/xslt/navigation/{../stylesheet}.xsl">
-          <map:parameter name="url" value="{../url}"/>
-          <map:parameter name="root" value="{page-envelope:context-prefix}/{../publication-id}/{page-envelope:area}/"/>
-          <map:parameter name="area" value="{page-envelope:area}"/>
-          <map:parameter name="chosenlanguage" value="{page-envelope:document-language}"/>
-          <map:parameter name="defaultlanguage" value="{page-envelope:default-language}"/>
-          <map:parameter name="breadcrumbprefix" value="{page-envelope:breadcrumb-prefix}"/>
-        </map:transform>       
-        <map:serialize type="xml"/>
-      </map:act>
-      
-      <!-- use default navigation schema -->
-      <map:transform src="xslt/navigation/{stylesheet}.xsl">
-        <map:parameter name="url" value="{url}"/>
-        <map:parameter name="root" value="{page-envelope:context-prefix}/{publication-id}/{page-envelope:area}/"/>
-        <map:parameter name="area" value="{page-envelope:area}"/>
-        <map:parameter name="chosenlanguage" value="{page-envelope:document-language}"/>
-        <map:parameter name="defaultlanguage" value="{page-envelope:default-language}"/>
-        <map:parameter name="breadcrumbprefix" value="{page-envelope:breadcrumb-prefix}"/>
-      </map:transform>             
-      <map:serialize type="xml"/>      
-      
-    </map:resource>
-  
-  </map:resources>
-  
-  <map:pipelines>
-  
-    <map:pipeline>
-    
-    <!-- sitetree -->
-    <!-- pattern: {pub-id}/{area}/sitetree/{url}.xml -->
-    <map:match pattern="*/*/sitetree/**.xml">
-      <map:select type="resource-exists">
-        <map:when test="pubs/{1}/content/{2}/sitetree.xml">
-          <map:generate src="pubs/{1}/content/{2}/sitetree.xml"/>
-        </map:when>
-        <map:otherwise>
-          <map:generate src="content/{2}/sitetree.xml"/>
-        </map:otherwise>
-      </map:select>
-      <map:transform type="i18n">      
-        <map:parameter name="locale" value="{request:locale}"/>
-      </map:transform>
-      <map:call resource="fallback-transformation">
-        <map:parameter name="publication-id" value="{1}"/>
-        <map:parameter name="url" value="{3}"/>
-        <map:parameter name="stylesheet" value="sitetree2nav"/>
-      </map:call>    
-            
-    </map:match>
-
-    
-    <!-- navigation element -->  
-    <!-- pattern: {pub-id}/admin/{nav-element}/{url}.xml -->
-    <map:match pattern="*/admin/*/**.xml">
-      <map:generate src="cocoon:/{1}/admin/sitetree/{3}.xml"/>
-      <map:call resource="fallback-transformation">
-        <map:parameter name="publication-id" value="{1}"/>
-        <map:parameter name="url" value="{3}"/>
-        <map:parameter name="stylesheet" value="admin-{2}"/>
-      </map:call>
-    </map:match>
-    
-    <!-- navigation element -->  
-    <!-- pattern: {pub-id}/{area}/{nav-element}/{url}.xml -->
-    <map:match pattern="*/*/*/**.xml">
-      <map:generate src="cocoon:/{1}/{2}/sitetree/{4}.xml"/>
-      <map:call resource="fallback-transformation">
-        <map:parameter name="publication-id" value="{1}"/>
-        <map:parameter name="url" value="{4}"/>
-        <map:parameter name="stylesheet" value="{3}"/>
-      </map:call>
-    </map:match>
-    
-    </map:pipeline>
-  
-  </map:pipelines>
-
-</map:sitemap>
diff --git a/src/webapp/lenya/pubs/blog/README.txt b/src/webapp/lenya/pubs/blog/README.txt
deleted file mode 100644
index 0c5f000..0000000
--- a/src/webapp/lenya/pubs/blog/README.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-Publication Prefix
-==================
-
-config/ac/ac.xconf
-xslt/global.xsl (CSS)
diff --git a/src/webapp/lenya/pubs/blog/atomapi.xmap b/src/webapp/lenya/pubs/blog/atomapi.xmap
deleted file mode 100644
index d4d8db4..0000000
--- a/src/webapp/lenya/pubs/blog/atomapi.xmap
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
-
-  <map:pipelines>
-
-    <!-- Introspection -->
-    <map:pipeline type="noncaching">
-      <map:match pattern="">
-        <map:generate src="content/introspection.xml"/>
-        <map:serialize type="xml"/>
-      </map:match>
-    </map:pipeline>
-
-    <!-- search-entries -->
-    <map:pipeline type="noncaching">
-      <map:match pattern="search">
-        <map:select type="request-parameter">
-          <map:parameter name="parameter-name" value="atom-all"/>
-          <map:when test="">
-            <map:generate type="directory" src="content/authoring/entries">
-              <map:parameter name="depth" value="4"/>
-              <map:parameter name="reverse" value="true"/>
-            </map:generate>
-            <map:transform src="xslt/feed/xinclude.xsl">
-              <map:parameter name="feedid" value="all"/>
-              <map:parameter name="area" value="authoring"/>
-            </map:transform>
-            <map:transform type="xinclude"/>
-<!-- FIXME: Actually one could replace the above by the internal call, but it doesn't work -->
-<!--
-            <map:generate src="cocoon://live/feeds/all/index.xml"/>
--->
-            <map:transform src="xslt/atomapi/search.xsl">
-              <map:parameter name="serverName" value="{request:serverName}"/>
-              <map:parameter name="serverPort" value="{request:serverPort}"/>
-              <map:parameter name="contextPath" value="{request:contextPath}"/>
-              <map:parameter name="publicationId" value="{page-envelope:publication-id}"/>
-            </map:transform>
-            <map:serialize type="xml"/>
-          </map:when>
-          <map:otherwise>
-            <map:generate src="content/atom-all-not-implemented-yet.xml"/>
-            <map:serialize type="xml"/>
-          </map:otherwise>
-        </map:select>
-      </map:match>
-    </map:pipeline>
-
-    <!-- Get entry -->
-    <map:pipeline>
-      <map:match pattern="entries/**/index.xml">
-        <map:select type="request-method">
-          <map:when test="PUT">
-            <map:generate type="stream"/>
-            <map:transform src="../../xslt/authoring/edit/addSourceTags.xsl">
-              <map:parameter name="source" value="content/authoring/entries/{1}/index.xml"/>
-            </map:transform>
-            <map:transform type="write-source"/>
-            <map:serialize type="xml" status-code="204"/> <!-- HTTP status code: 204 No Content -->
-          </map:when>
-          <map:otherwise>
-            <map:generate src="content/authoring/entries/{1}/index.xml"/>
-            <map:serialize type="xml"/>
-          </map:otherwise>
-        </map:select>
-      </map:match>
-    </map:pipeline>
-
-  </map:pipelines>
-</map:sitemap>
diff --git a/src/webapp/lenya/pubs/blog/config/ac/ac.xconf b/src/webapp/lenya/pubs/blog/config/ac/ac.xconf
deleted file mode 100644
index f8f25cf..0000000
--- a/src/webapp/lenya/pubs/blog/config/ac/ac.xconf
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: ac.xconf,v 1.3 2004/03/13 12:31:32 gregor Exp $ -->
-
-<access-controller type="bypassable">
-  <accreditable-manager type="file">
-    <parameter name="directory" value="context:///lenya/pubs/blog/config/ac/passwd"/>
-  </accreditable-manager>
-
-  <policy-manager type="document">
-    <policy-manager type="file">
-      <parameter name="directory" value="context:///lenya/pubs/blog/config/ac/policies"/>
-    </policy-manager>
-  </policy-manager>
-
-  <authorizer type="policy"/>
-
-  <authorizer type="usecase">
-        <parameter name="configuration" value="context:///lenya/pubs/blog/config/ac/usecase-policies.xml"/>
-  </authorizer>
-
-  <authorizer type="workflow"/>
-</access-controller>
diff --git a/src/webapp/lenya/pubs/blog/config/ac/passwd/admin.gml b/src/webapp/lenya/pubs/blog/config/ac/passwd/admin.gml
deleted file mode 100644
index ff466a4..0000000
--- a/src/webapp/lenya/pubs/blog/config/ac/passwd/admin.gml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: admin.gml,v 1.3 2004/03/13 12:31:31 gregor Exp $ -->
-
-<group class="org.apache.lenya.ac.file.FileGroup" id="admin"/>
diff --git a/src/webapp/lenya/pubs/blog/config/ac/passwd/edit.rml b/src/webapp/lenya/pubs/blog/config/ac/passwd/edit.rml
deleted file mode 100644
index 900a3c7..0000000
--- a/src/webapp/lenya/pubs/blog/config/ac/passwd/edit.rml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0"?>

-<!--

-  Copyright 1999-2004 The Apache Software Foundation

-

-  Licensed 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.

--->

-

-<!-- $Id$ -->

-

-<role class="org.apache.lenya.ac.file.FileRole" id="edit"/>

diff --git a/src/webapp/lenya/pubs/blog/config/ac/passwd/lenya.iml b/src/webapp/lenya/pubs/blog/config/ac/passwd/lenya.iml
deleted file mode 100644
index c523539..0000000
--- a/src/webapp/lenya/pubs/blog/config/ac/passwd/lenya.iml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: lenya.iml,v 1.3 2004/03/13 12:31:31 gregor Exp $ -->
-
-<identity id="lenya" class="org.apache.lenya.ac.file.FileUser">
-  <name>Levi Vanya</name>
-  <description></description>
-  <email>levi.vanya@wyona.org</email>
-  <password type="md5">8e07dafd13495561db9063ebe4db4b27</password>
-  <groups>
-    <group>admin</group>
-  </groups>
-</identity>
diff --git a/src/webapp/lenya/pubs/blog/config/ac/passwd/visit.rml b/src/webapp/lenya/pubs/blog/config/ac/passwd/visit.rml
deleted file mode 100644
index d88108b..0000000
--- a/src/webapp/lenya/pubs/blog/config/ac/passwd/visit.rml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0"?>

-<!--

-  Copyright 1999-2004 The Apache Software Foundation

-

-  Licensed 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.

--->

-

-<!-- $Id$ -->

-

-<role class="org.apache.lenya.ac.file.FileRole" id="visit"/>

diff --git a/src/webapp/lenya/pubs/blog/config/ac/policies/admin/subtree-policy.acml b/src/webapp/lenya/pubs/blog/config/ac/policies/admin/subtree-policy.acml
deleted file mode 100644
index 83ac3cd..0000000
--- a/src/webapp/lenya/pubs/blog/config/ac/policies/admin/subtree-policy.acml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: subtree-policy.acml,v 1.3 2004/03/13 12:31:34 gregor Exp $ -->
-
-<policy xmlns="http://apache.org/cocoon/lenya/ac/1.0">
-
-  <group id="admin">
-    <role id="visit"/>
-  </group>
-
-</policy> 
diff --git a/src/webapp/lenya/pubs/blog/config/ac/policies/atomapi/subtree-policy.acml b/src/webapp/lenya/pubs/blog/config/ac/policies/atomapi/subtree-policy.acml
deleted file mode 100644
index 8a973f9..0000000
--- a/src/webapp/lenya/pubs/blog/config/ac/policies/atomapi/subtree-policy.acml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: subtree-policy.acml,v 1.3 2004/03/13 12:31:35 gregor Exp $ -->
-
-<policy xmlns="http://apache.org/cocoon/lenya/ac/1.0">
-
-  <world>
-    <role id="visit"/>
-  </world>
-
-  <user id="lenya">
-    <role id="edit"/>
-  </user>
-
-</policy> 
diff --git a/src/webapp/lenya/pubs/blog/config/ac/policies/authoring/subtree-policy.acml b/src/webapp/lenya/pubs/blog/config/ac/policies/authoring/subtree-policy.acml
deleted file mode 100644
index d69a141..0000000
--- a/src/webapp/lenya/pubs/blog/config/ac/policies/authoring/subtree-policy.acml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: subtree-policy.acml,v 1.4 2004/03/13 12:31:32 gregor Exp $ -->
-
-<policy xmlns="http://apache.org/cocoon/lenya/ac/1.0">
-
-  <group id="admin">
-    <role id="edit"/>
-  </group>
-
-</policy> 
diff --git a/src/webapp/lenya/pubs/blog/config/ac/policies/index.html/url-policy.acml b/src/webapp/lenya/pubs/blog/config/ac/policies/index.html/url-policy.acml
deleted file mode 100644
index 85859e4..0000000
--- a/src/webapp/lenya/pubs/blog/config/ac/policies/index.html/url-policy.acml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: url-policy.acml,v 1.3 2004/03/13 12:31:31 gregor Exp $ -->
-<policy xmlns="http://apache.org/cocoon/lenya/ac/1.0">
-
-  <world>
-    <role id="visit"/>
-  </world>
-
-</policy> 
diff --git a/src/webapp/lenya/pubs/blog/config/ac/policies/info/subtree-policy.acml b/src/webapp/lenya/pubs/blog/config/ac/policies/info/subtree-policy.acml
deleted file mode 100644
index fa61426..0000000
--- a/src/webapp/lenya/pubs/blog/config/ac/policies/info/subtree-policy.acml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: subtree-policy.acml,v 1.3 2004/03/13 12:31:32 gregor Exp $ -->
-
-<policy xmlns="http://apache.org/cocoon/lenya/ac/1.0">
-
-  <group id="admin">
-    <role id="visit"/>
-  </group>
-
-</policy> 
diff --git a/src/webapp/lenya/pubs/blog/config/ac/policies/introduction.html/url-policy.acml b/src/webapp/lenya/pubs/blog/config/ac/policies/introduction.html/url-policy.acml
deleted file mode 100644
index 03b04c7..0000000
--- a/src/webapp/lenya/pubs/blog/config/ac/policies/introduction.html/url-policy.acml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: url-policy.acml,v 1.3 2004/03/13 12:31:33 gregor Exp $ -->
-
-<policy xmlns="http://apache.org/cocoon/lenya/ac/1.0">
-
-  <world>
-    <role id="visit"/>
-  </world>
-
-</policy> 
diff --git a/src/webapp/lenya/pubs/blog/config/ac/policies/live/subtree-policy.acml b/src/webapp/lenya/pubs/blog/config/ac/policies/live/subtree-policy.acml
deleted file mode 100644
index bb1b987..0000000
--- a/src/webapp/lenya/pubs/blog/config/ac/policies/live/subtree-policy.acml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: subtree-policy.acml,v 1.3 2004/03/13 12:31:33 gregor Exp $ -->
-
-<policy xmlns="http://apache.org/cocoon/lenya/ac/1.0">
-
-  <world>
-    <role id="visit"/>
-  </world>
-
-</policy> 
diff --git a/src/webapp/lenya/pubs/blog/config/ac/policies/url-policy.acml b/src/webapp/lenya/pubs/blog/config/ac/policies/url-policy.acml
deleted file mode 100644
index c3a9dde..0000000
--- a/src/webapp/lenya/pubs/blog/config/ac/policies/url-policy.acml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: url-policy.acml,v 1.3 2004/03/13 12:31:32 gregor Exp $ -->
-
-<policy xmlns="http://apache.org/cocoon/lenya/ac/1.0">
-
-  <world>
-    <role id="visit"/>
-  </world>
-
-</policy> 
diff --git a/src/webapp/lenya/pubs/blog/config/ac/policies/webdav/subtree-policy.acml b/src/webapp/lenya/pubs/blog/config/ac/policies/webdav/subtree-policy.acml
deleted file mode 100644
index 6b0c9fe..0000000
--- a/src/webapp/lenya/pubs/blog/config/ac/policies/webdav/subtree-policy.acml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: subtree-policy.acml,v 1.3 2004/03/13 12:31:30 gregor Exp $ -->
-
-<policy xmlns="http://apache.org/cocoon/lenya/ac/1.0">
-
-  <world>
-    <role id="visit"/>
-  </world>
-
-  <user id="lenya">
-    <role id="edit"/>
-  </user>
-
-</policy> 
diff --git a/src/webapp/lenya/pubs/blog/config/ac/usecase-policies.xml b/src/webapp/lenya/pubs/blog/config/ac/usecase-policies.xml
deleted file mode 100644
index 5a6d611..0000000
--- a/src/webapp/lenya/pubs/blog/config/ac/usecase-policies.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<usecases xmlns="http://apache.org/cocoon/lenya/ac/1.0">
-	<usecase id="create">
-		<role id="edit"/>
-	</usecase>
-	<usecase id="publish">
-		<role id="edit"/>
-	</usecase>
-    <usecase id="archive">
-        <role id="edit"/>
-    </usecase>
-    <usecase id="delete">
-        <role id="edit"/>
-    </usecase>
-    <usecase id="restore">
-        <role id="edit"/>
-    </usecase>
-
-	<usecase id="userChangeProfile"><role id="edit"/><role id="admin"/></usecase>
-	<usecase id="userChangePasswordUser"><role id="edit"/></usecase>
-	<usecase id="userChangePasswordAdmin"><role id="admin"/></usecase>
-	<usecase id="userChangeGroups"><role id="admin"/></usecase>
-
-</usecases>
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/blog/config/menus/archive.xsp b/src/webapp/lenya/pubs/blog/config/menus/archive.xsp
deleted file mode 100644
index 3bf2f72..0000000
--- a/src/webapp/lenya/pubs/blog/config/menus/archive.xsp
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsp:page 
-  language="java" 
-  xmlns="http://apache.org/cocoon/lenya/menubar/1.0"
-  xmlns:xsp="http://apache.org/xsp"
-  xmlns:xsp-request="http://apache.org/xsp/request/2.0"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-  xmlns:input="http://apache.org/cocoon/xsp/input/1.0"
-  xmlns:uc="http://apache.org/cocoon/lenya/usecase/1.0"
->
-
-<menu>
-
-  <tabs>
-    <tab label="info" show="false"/>
-  </tabs>
-
-  <menus>
-    <menu i18n:attr="name" name="File">
-      <block>
-        <item uc:usecase="ac.logout" href="?"><i18n:text>Logout</i18n:text></item>
-      </block>
-    </menu>
-
-    <menu i18n:attr="name" name="Help">
-      <block>
-        <item href="http://lenya.apache.org/docs/index.html"><i18n:text>Documentation</i18n:text></item>
-        <item href="http://wiki.apache.org/lenya/"><i18n:text>Wiki</i18n:text></item>
-      </block>
-      <block>
-        <item><xsp:attribute name="href"><xsp-request:get-context-path/>/index.html</xsp:attribute>Apache&#160;Lenya&#160;Start&#160;Page</item>
-        <item><xsp:attribute name="href"><xsp-request:get-context-path/>/about.html</xsp:attribute>About&#160;Apache&#160;Lenya</item>
-      </block>
-    </menu>
-
-    <menu i18n:attr="name" name="Debug">
-      <block>
-        <item href="index.xml"><i18n:text>Feed</i18n:text></item>
-        <item href="lenya-page-body.xml"><i18n:text>Body</i18n:text></item>
-      </block>
-    </menu>
-  </menus>
-
-</menu>
-
-</xsp:page>
diff --git a/src/webapp/lenya/pubs/blog/config/menus/entry.xsp b/src/webapp/lenya/pubs/blog/config/menus/entry.xsp
deleted file mode 100644
index ce195bd..0000000
--- a/src/webapp/lenya/pubs/blog/config/menus/entry.xsp
+++ /dev/null
@@ -1,95 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsp:page 
-  language="java" 
-  xmlns="http://apache.org/cocoon/lenya/menubar/1.0"
-  xmlns:xsp="http://apache.org/xsp"
-  xmlns:xsp-request="http://apache.org/xsp/request/2.0"
-  xmlns:input="http://apache.org/cocoon/xsp/input/1.0"
-  xmlns:uc="http://apache.org/cocoon/lenya/usecase/1.0"
-  xmlns:wf="http://apache.org/cocoon/lenya/workflow/1.0"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
->
-
-<menu>
-
-  <xsp:logic>
-    String source = <input:get-attribute module="page-envelope" as="string" name="document-id"/>;
-    source = source.substring(1); // Remove leading slash
-    String uri = source + ".html";
-    source = source + ".xml";
-  </xsp:logic>
-
-  <tabs>
-    <tab label="info" show="false"/>
-  </tabs>
-
-  <menus>
-    <menu i18n:attr="name" name="File">
-      <block>
-        <item wf:event="edit" uc:usecase="edit.forms" href="?&amp;form=entry">Edit&#160;with&#160;Forms</item>
-        <item wf:event="edit" href="index-bxe.html">Edit&#160;with&#160;BXE</item>
-        <item wf:event="edit" uc:usecase="1formedit" uc:step="open">Edit&#160;with&#160;one&#160;Form</item>
-      </block>
-      <block>
-          <item uc:usecase="workflow.publish" href="?"><i18n:text>Publish</i18n:text></item>
-      </block>
-      <!--
-      <block>
-        <item uc:usecase="rollback" uc:step="showscreen" href="?">Revisions</item>
-      </block>
-      -->
-      <block>
-        <item uc:usecase="ac.logout" href="?"><i18n:text>Logout</i18n:text></item>
-      </block>
-    </menu>
-
-    <menu i18n:attr="name" name="Help">
-      <block>
-        <item href="http://lenya.apache.org/docs/index.html"><i18n:text>Documentation</i18n:text></item>
-        <item href="http://wiki.apache.org/lenya/"><i18n:text>Wiki</i18n:text></item>
-      </block>
-      <block>
-        <item><xsp:attribute name="href"><xsp-request:get-context-path/>/index.html</xsp:attribute>Apache&#160;Lenya&#160;Start&#160;Page</item>
-        <item><xsp:attribute name="href"><xsp-request:get-context-path/>/about.html</xsp:attribute>About&#160;Apache&#160;Lenya</item>
-      </block>
-    </menu>
-
-    <menu i18n:attr="name" name="Debug">
-      <block>
-        <item href="index.xml"><i18n:text>Feed</i18n:text></item>
-        <item href="lenya-page-body.xml"><i18n:text>Body</i18n:text></item>
-      </block>
-      <block>
-        <item href="http://www.feedvalidator.org">Feed Validator</item>
-      </block>
-      <block>
-        <item href="index-bxe.html">HTML&#160;for&#160;BXE</item>
-        <item href="config-bxe.xml">Config&#160;for&#160;BXE</item>
-        <item href="entry-bxe.xsl">XSLT&#160;for&#160;BXE</item>
-        <item href="entry-bxe.css">CSS&#160;for&#160;BXE</item>
-        <item href="entry-relaxng-bxe.xml">RelaxNG&#160;for&#160;BXE</item>
-      </block>
-    </menu>
-  </menus>
-
-</menu>
-
-</xsp:page>
diff --git a/src/webapp/lenya/pubs/blog/config/menus/feed.xsp b/src/webapp/lenya/pubs/blog/config/menus/feed.xsp
deleted file mode 100644
index f45595b..0000000
--- a/src/webapp/lenya/pubs/blog/config/menus/feed.xsp
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
- 
-<xsp:page
-  language="java"
-  xmlns="http://apache.org/cocoon/lenya/menubar/1.0"
-  xmlns:xsp="http://apache.org/xsp"
-  xmlns:xsp-request="http://apache.org/xsp/request/2.0"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-  xmlns:input="http://apache.org/cocoon/xsp/input/1.0"
-  xmlns:uc="http://apache.org/cocoon/lenya/usecase/1.0"
-  xmlns:wf="http://apache.org/cocoon/lenya/workflow/1.0"
->
- 
-<menu>
-
-  <tabs>
-    <tab label="info" show="false"/>
-  </tabs>
- 
-  <menus>
-    <menu i18n:attr="name" name="File">
-      <block>
-        <item uc:usecase="site.create" href="?">Add&#160;new&#160;Entry</item>
-      </block>
-      <block>
-        <item wf:event="edit" uc:usecase="edit.forms" href="../../sidebar.html?form=sidebar">Edit&#160;Sidebar&#160;with&#160;Forms</item>
-        <item wf:event="publish" uc:usecase="publish" uc:step="showscreen" href="../../sidebar.html?sources=sidebar.xml&amp;uris=feeds/all/index.html"><i18n:text>Publish Sidebar</i18n:text></item>
-      </block>
-      <block>
-          <item uc:usecase="ac.logout" href="?"><i18n:text>Logout</i18n:text></item>
-      </block>
-    </menu>
- 
-    <menu i18n:attr="name" name="Help">
-      <block>
-        <item href="http://lenya.apache.org/docs/index.html"><i18n:text>Documentation</i18n:text></item>
-        <item href="http://wiki.apache.org/lenya/"><i18n:text>Wiki</i18n:text></item>
-      </block>
-      <block>
-          <item><xsp:attribute name="href"><xsp-request:get-context-path/>/about.html</xsp:attribute>About&#160;Apache&#160;Lenya</item>
-      </block>
-    </menu>
- 
-    <menu i18n:attr="name" name="Debug">
-      <block>
-        <item href="index.xml"><i18n:text>Feed</i18n:text></item>
-        <item href="lenya-page-body.xml"><i18n:text>Body</i18n:text></item>
-      </block>
-      <block>
-        <item href="/lenya/blog/atomapi/">introspection</item>
-        <item href="/lenya/blog/atomapi/search?atom-all">atom-all</item>
-      </block>
-    </menu>
-  </menus>
- 
-</menu>
- 
-</xsp:page>
-
diff --git a/src/webapp/lenya/pubs/blog/config/notification/notification.xconf b/src/webapp/lenya/pubs/blog/config/notification/notification.xconf
deleted file mode 100644
index 1b63516..0000000
--- a/src/webapp/lenya/pubs/blog/config/notification/notification.xconf
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: notification.xconf,v 1.3 2004/03/13 12:31:35 gregor Exp $ -->
-
-<notification xmlns="http://apache.org/cocoon/lenya/notification/1.0" enabled="false">
-
-</notification> 
diff --git a/src/webapp/lenya/pubs/blog/config/publication.xconf b/src/webapp/lenya/pubs/blog/config/publication.xconf
deleted file mode 100644
index f7b64c5..0000000
--- a/src/webapp/lenya/pubs/blog/config/publication.xconf
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<publication>
-  <languages>
-    <language default="true">en</language>
-    <language>de</language>
-  </languages>
-  <path-mapper>org.apache.lenya.cms.publication.SingleLanguageIdentityMapper</path-mapper>
-  <document-builder name="default"/>
-  <breadcrumb-prefix/>
-  <ssl-prefix/>
-  <site-manager name="simple"/>
-  <resource-type name="entry" workflow="workflow.xml"/>
-</publication>
diff --git a/src/webapp/lenya/pubs/blog/config/usecases.xconf b/src/webapp/lenya/pubs/blog/config/usecases.xconf
deleted file mode 100644
index 1d7ae50..0000000
--- a/src/webapp/lenya/pubs/blog/config/usecases.xconf
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xconf xpath="/cocoon/usecases" unless="/cocoon/usecases/component-instance[@name = 'blog/site.create']">
-    <component-instance name="blog/site.create"
-                        logger="lenya.site"
-                        class="org.apache.lenya.cms.site.usecases.CreateBlogEntry">
-      <view template="site/create"/>
-    </component-instance>
-</xconf>
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/blog/config/workflow/workflow.xml b/src/webapp/lenya/pubs/blog/config/workflow/workflow.xml
deleted file mode 100644
index 2d1b9ca..0000000
--- a/src/webapp/lenya/pubs/blog/config/workflow/workflow.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<workflow xmlns="http://apache.org/cocoon/lenya/workflow/1.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://apache.org/cocoon/lenya/workflow/1.0
-        ../../../../resources/entities/workflow.xsd">
-
-  <state id="authoring" initial="true"/>
-  <state id="live"/>
-  <state id="trash"/>
-  <state id="archive"/>
-  
-  <variable name="is_live" value="false"/>
-  
-  <!-- AUTHORING -->
-
-  <!-- edit: authoring -> authoring -->  
-  <transition source="authoring" destination="authoring">
-    <event id="edit"/>
-    <condition class="org.apache.lenya.cms.workflow.RoleCondition">edit, review, organize</condition>
-  </transition>
-  
-  <!-- publish: authoring -> live -->  
-  <transition source="authoring" destination="live">
-    <event id="publish"/>
-    <condition class="org.apache.lenya.cms.workflow.RoleCondition">review, organize</condition>
-    <assign variable="is_live" value="true"/>
-  </transition>
-  
-  <!-- deactivate: authoring -> authoring -->  
-  <transition source="authoring" destination="authoring">
-    <event id="deactivate"/>
-    <condition class="org.apache.lenya.workflow.impl.BooleanVariableCondition">is_live = true</condition>
-    <condition class="org.apache.lenya.cms.workflow.RoleCondition">review, organize</condition>
-    <assign variable="is_live" value="false"/>
-  </transition>
-        
-  <!-- delete: authoring -> trash -->  
-  <transition source="authoring" destination="trash" synchronized="true">
-    <event id="delete"/>
-    <condition class="org.apache.lenya.workflow.impl.BooleanVariableCondition">is_live = false</condition>
-    <condition class="org.apache.lenya.cms.workflow.RoleCondition">edit, review, organize</condition>
-  </transition>
-        
-  <!-- archive: authoring -> archive -->  
-  <transition source="authoring" destination="archive" synchronized="true">
-    <event id="archive"/>
-    <condition class="org.apache.lenya.workflow.impl.BooleanVariableCondition">is_live = false</condition>
-    <condition class="org.apache.lenya.cms.workflow.RoleCondition">edit, review, organize</condition>
-  </transition>
-        
-  <!-- LIVE -->
-        
-  <!-- edit: live -> authoring -->
-  <transition source="live" destination="authoring">
-    <event id="edit"/>
-    <condition class="org.apache.lenya.cms.workflow.RoleCondition">edit, review, organize</condition>
-  </transition>
-        
-  <!-- deactivate: live -> authoring -->  
-  <transition source="live" destination="authoring">
-    <event id="deactivate"/>
-    <condition class="org.apache.lenya.workflow.impl.BooleanVariableCondition">is_live = true</condition>
-    <condition class="org.apache.lenya.cms.workflow.RoleCondition">review, organize</condition>
-    <assign variable="is_live" value="false"/>
-  </transition>
-        
-  <!-- TRASH -->
-        
-  <!-- restore: trash -> authoring -->
-  <transition source="trash" destination="authoring" synchronized="true">
-    <event id="restore"/>
-    <condition class="org.apache.lenya.cms.workflow.RoleCondition">edit, review, organize</condition>
-  </transition>
-  
-  <!-- ARCHIVE -->
-        
-  <!-- restore: archive -> authoring -->
-  <transition source="archive" destination="authoring" synchronized="true">
-    <event id="restore"/>
-    <condition class="org.apache.lenya.cms.workflow.RoleCondition">edit, review, organize</condition>
-  </transition>
-  
-</workflow>
diff --git a/src/webapp/lenya/pubs/blog/content/atom-all-not-implemented-yet.xml b/src/webapp/lenya/pubs/blog/content/atom-all-not-implemented-yet.xml
deleted file mode 100644
index 36a045a..0000000
--- a/src/webapp/lenya/pubs/blog/content/atom-all-not-implemented-yet.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: atom-all-not-implemented-yet.xml,v 1.2 2004/03/13 12:31:31 gregor Exp $ -->
-
-<atom-all>
-Not implemented yet!
-</atom-all>
diff --git a/src/webapp/lenya/pubs/blog/content/authoring/feeds/all/index.xml b/src/webapp/lenya/pubs/blog/content/authoring/feeds/all/index.xml
deleted file mode 100644
index c00a537..0000000
--- a/src/webapp/lenya/pubs/blog/content/authoring/feeds/all/index.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: index.xml,v 1.7 2004/05/12 13:20:39 gregor Exp $ -->
-
-<feed xmlns="http://purl.org/atom/ns#" version="0.3">
-  <title>Lenya's Weblog</title>
-  <link href="http://bob.blog/" rel="alternate" type="text/xml"/>  
-
-  <modified>2004-05-11T19:45:00-04:00</modified>
-</feed>
diff --git a/src/webapp/lenya/pubs/blog/content/authoring/feeds/all/index.xml.meta b/src/webapp/lenya/pubs/blog/content/authoring/feeds/all/index.xml.meta
deleted file mode 100644
index c165ac1..0000000
--- a/src/webapp/lenya/pubs/blog/content/authoring/feeds/all/index.xml.meta
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id: index_de.xml.meta 169299 2005-05-09 12:00:43Z jwkaltz $ -->
-<lenya:document xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0">
-<lenya:meta>
-<lenya:internal>
-<lenya:resourceType>entry</lenya:resourceType>
-<lenya:contentType>xml</lenya:contentType>
-</lenya:internal>
-<lenya:dc>
-        <dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Konzepte kurz erklärt</dc:title>
-        <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Development Team</dc:creator>
-        <dc:subject xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Konzepte</dc:subject>
-        <dc:description xmlns:dc="http://purl.org/dc/elements/1.1/">Erklärt Lenya Konzepte.</dc:description>
-        <dc:publisher xmlns:dc="http://purl.org/dc/elements/1.1/">Apache Software Foundation</dc:publisher>
-        <dc:contributor xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:date xmlns:dc="http://purl.org/dc/elements/1.1/">2005-01-31</dc:date>
-        <dc:type xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:format xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:identifier xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:source xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">de</dc:language>
-        <dc:relation xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:coverage xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:rights xmlns:dc="http://purl.org/dc/elements/1.1/">Alle Rechte vorbehalten</dc:rights>
-</lenya:dc>
-</lenya:meta>
-</lenya:document>
diff --git a/src/webapp/lenya/pubs/blog/content/authoring/sidebar.xml b/src/webapp/lenya/pubs/blog/content/authoring/sidebar.xml
deleted file mode 100644
index 0a563da..0000000
--- a/src/webapp/lenya/pubs/blog/content/authoring/sidebar.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<sidebar>
-<block>
-<title>Feeds</title>
-<content>
-<a href="index.xml">Echo/Atom Feed</a>
-<br />RSS Feed
-</content>
-</block>
-
-<block>
-<title>Links</title>
-<content>
-<a href="http://lenya.apache.org/">Lenya</a>
-<br /><a href="http://cocoon.apache.org">Cocoon</a>
-<br /><a href="http://www.apache.org">Apache</a>
-</content>
-</block>
-</sidebar>
diff --git a/src/webapp/lenya/pubs/blog/content/introspection.xml b/src/webapp/lenya/pubs/blog/content/introspection.xml
deleted file mode 100644
index 942e23e..0000000
--- a/src/webapp/lenya/pubs/blog/content/introspection.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: introspection.xml,v 1.6 2004/03/13 12:31:31 gregor Exp $ -->
-
-<introspection xmlns="http://purl.org/atom/ns#">
-  <create-entry>http://127.0.0.1:8080/lenya/blog/authoring/feeds/all/index.html?doctype=entry&amp;lenya.usecase=create&amp;lenya.step=showscreen</create-entry>
-  <search-entries>http://127.0.0.1:8080/lenya/blog/atomapi/search?atom-all</search-entries>
-</introspection>
diff --git a/src/webapp/lenya/pubs/blog/content/live/feeds/all/index.xml b/src/webapp/lenya/pubs/blog/content/live/feeds/all/index.xml
deleted file mode 100644
index 872fb5a..0000000
--- a/src/webapp/lenya/pubs/blog/content/live/feeds/all/index.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: index.xml,v 1.6 2004/05/12 13:20:39 gregor Exp $ -->
-
-<feed xmlns="http://purl.org/atom/ns#" version="0.3">
-  <title>Lenya's Weblog</title>
-  <link href="http://bob.blog/" rel="alternate" type="text/xml"/>  
-
-  <modified>2004-05-11T19:45:00-04:00</modified>
-</feed>
diff --git a/src/webapp/lenya/pubs/blog/content/live/feeds/all/index.xml.meta b/src/webapp/lenya/pubs/blog/content/live/feeds/all/index.xml.meta
deleted file mode 100644
index c165ac1..0000000
--- a/src/webapp/lenya/pubs/blog/content/live/feeds/all/index.xml.meta
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id: index_de.xml.meta 169299 2005-05-09 12:00:43Z jwkaltz $ -->
-<lenya:document xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0">
-<lenya:meta>
-<lenya:internal>
-<lenya:resourceType>entry</lenya:resourceType>
-<lenya:contentType>xml</lenya:contentType>
-</lenya:internal>
-<lenya:dc>
-        <dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Konzepte kurz erklärt</dc:title>
-        <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Development Team</dc:creator>
-        <dc:subject xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Konzepte</dc:subject>
-        <dc:description xmlns:dc="http://purl.org/dc/elements/1.1/">Erklärt Lenya Konzepte.</dc:description>
-        <dc:publisher xmlns:dc="http://purl.org/dc/elements/1.1/">Apache Software Foundation</dc:publisher>
-        <dc:contributor xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:date xmlns:dc="http://purl.org/dc/elements/1.1/">2005-01-31</dc:date>
-        <dc:type xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:format xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:identifier xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:source xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">de</dc:language>
-        <dc:relation xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:coverage xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:rights xmlns:dc="http://purl.org/dc/elements/1.1/">Alle Rechte vorbehalten</dc:rights>
-</lenya:dc>
-</lenya:meta>
-</lenya:document>
diff --git a/src/webapp/lenya/pubs/blog/content/live/sidebar.xml b/src/webapp/lenya/pubs/blog/content/live/sidebar.xml
deleted file mode 100644
index 0a563da..0000000
--- a/src/webapp/lenya/pubs/blog/content/live/sidebar.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<sidebar>
-<block>
-<title>Feeds</title>
-<content>
-<a href="index.xml">Echo/Atom Feed</a>
-<br />RSS Feed
-</content>
-</block>
-
-<block>
-<title>Links</title>
-<content>
-<a href="http://lenya.apache.org/">Lenya</a>
-<br /><a href="http://cocoon.apache.org">Cocoon</a>
-<br /><a href="http://www.apache.org">Apache</a>
-</content>
-</block>
-</sidebar>
diff --git a/src/webapp/lenya/pubs/blog/java/src/org/apache/lenya/cms/authoring/NewBlogEntryCreator.java b/src/webapp/lenya/pubs/blog/java/src/org/apache/lenya/cms/authoring/NewBlogEntryCreator.java
deleted file mode 100644
index 473c2f2..0000000
--- a/src/webapp/lenya/pubs/blog/java/src/org/apache/lenya/cms/authoring/NewBlogEntryCreator.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-package org.apache.lenya.cms.authoring;
-
-import org.apache.xpath.XPathAPI;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-import org.apache.lenya.ac.Identity;
-import org.apache.lenya.xml.DocumentHelper;
-
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Map;
-import java.util.Date;
-
-/**
- * Creator a blog entry
- * @version $Id$
- */
-public class NewBlogEntryCreator extends DefaultBranchCreator {
-
-    /**
-     * @see org.apache.lenya.cms.authoring.DefaultCreator#transformXML(org.w3c.dom.Document,
-     *      org.apache.lenya.cms.publication.Document, java.util.Map)
-     */
-    public void transformXML(Document doc,
-            org.apache.lenya.cms.publication.Document document,
-            Map parameters) throws Exception {
-
-        // sanity check: blog entry creation depends on certain parameters
-        if (parameters == null)
-            throw new IllegalArgumentException("parameters may not be null for blog entry creation");
-
-        Element parent = doc.getDocumentElement();
-
-        if (getLogger().isDebugEnabled())
-            getLogger().debug("NewBlogEntryCreator.transformXML(): " + document);
-
-        String[] steps = document.getId().split("/");
-        String nodeId = steps[5];
-
-        // Replace id
-        Element element = (Element) XPathAPI.selectSingleNode(parent,
-                "/*[local-name() = 'entry']/*[local-name() = 'id']");
-
-        String year = steps[2];
-        String month = steps[3];
-        String day = steps[4];
-
-        DocumentHelper.setSimpleElementText(element, "tag:bob.blog," + year + ":" + month + ":"
-                + day + ":" + nodeId);
-
-        // Replace title
-        element = (Element) XPathAPI.selectSingleNode(parent,
-                "/*[local-name() = 'entry']/*[local-name() = 'title']");
-        DocumentHelper.setSimpleElementText(element, (String) parameters.get("title"));
-
-        element = (Element) XPathAPI.selectSingleNode(parent,
-                "/*[local-name() = 'entry']/*[local-name() = 'link']");
-        element.setAttribute("rel", "alternate");
-        element.setAttribute("href", "http://bob.blog");
-        element.setAttribute("type", "text/xml");
-
-        // Replace Summary
-        element = (Element) XPathAPI.selectSingleNode(parent,
-                "/*[local-name() = 'entry']/*[local-name() = 'summary']");
-        DocumentHelper.setSimpleElementText(element, "Summary");
-
-        // Replace author
-        Identity identity = (Identity) parameters.get(Identity.class.getName());
-
-        element = (Element) XPathAPI.selectSingleNode(parent,
-                "/*[local-name() = 'entry']/*[local-name() = 'author']/*[local-name() = 'name']");
-
-        if (element == null) {
-            throw new RuntimeException("Element entry/author/name not found.");
-        }
-
-        DocumentHelper.setSimpleElementText(element, identity.getUser().getId());
-
-        // Replace date created (and issued and modified, FIXME: issued should be set during first
-        // time publishing, modified should be set during re-publishing)
-        DateFormat datefmt = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
-        DateFormat ofsfmt = new SimpleDateFormat("Z");
-        Date date = new Date();
-
-        String dateofs = ofsfmt.format(date);
-        String datestr = datefmt.format(date) + dateofs.substring(0, 3) + ":"
-                + dateofs.substring(3, 5);
-
-        element = (Element) XPathAPI.selectSingleNode(parent,
-                "/*[local-name() = 'entry']/*[local-name() = 'created']");
-        DocumentHelper.setSimpleElementText(element, datestr);
-        element = (Element) XPathAPI.selectSingleNode(parent,
-                "/*[local-name() = 'entry']/*[local-name() = 'issued']");
-        DocumentHelper.setSimpleElementText(element, datestr);
-        element = (Element) XPathAPI.selectSingleNode(parent,
-                "/*[local-name() = 'entry']/*[local-name() = 'modified']");
-        DocumentHelper.setSimpleElementText(element, datestr);
-    }
-}
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/blog/java/src/org/apache/lenya/cms/site/usecases/CreateBlogEntry.java b/src/webapp/lenya/pubs/blog/java/src/org/apache/lenya/cms/site/usecases/CreateBlogEntry.java
deleted file mode 100644
index 6a70a57..0000000
--- a/src/webapp/lenya/pubs/blog/java/src/org/apache/lenya/cms/site/usecases/CreateBlogEntry.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.cms.site.usecases;
-
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Map;
-import java.util.HashMap;
-
-import org.apache.cocoon.components.ContextHelper;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.environment.Session;
-
-import org.apache.lenya.ac.Identity;
-
-import org.apache.lenya.cms.metadata.dublincore.DublinCore;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.DocumentManager;
-import org.apache.lenya.cms.publication.DocumentType;
-import org.apache.lenya.cms.publication.DocumentTypeBuilder;
-import org.apache.lenya.cms.usecase.DocumentUsecase;
-
-/**
- * Usecase to create a Blog entry.
- * 
- * @version $Id$
- */
-public class CreateBlogEntry extends DocumentUsecase {
-
-    protected static final String PARENT_ID = "parentId";
-    protected static final String DOCUMENT_TYPE = "doctype";
-    protected static final String DOCUMENT_ID = "documentId";
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#initParameters()
-     */
-    protected void initParameters() {
-        super.initParameters();
-
-        Document parent = getSourceDocument();
-        setParameter(PARENT_ID, parent.getId());
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckExecutionConditions()
-     */
-    protected void doCheckExecutionConditions() throws Exception {
-
-        String documentId = getParameterAsString(DOCUMENT_ID);
-
-        if (documentId.equals("")) {
-            addErrorMessage("The document ID is required.");
-        }
-
-        if (documentId.matches("[^a-zA-Z0-9\\-]+")) {
-            addErrorMessage("The document ID is not valid.");
-        }
-
-        super.doCheckExecutionConditions();
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-
-        // prepare values necessary for blog entry creation
-        Document parent = getSourceDocument();
-        String language = parent.getPublication().getDefaultLanguage();
-        Map objectModel = ContextHelper.getObjectModel(getContext());
-        Request request = ObjectModelHelper.getRequest(objectModel);
-        Session session = request.getSession(false);
-        HashMap allParameters = new HashMap();
-        allParameters.put(Identity.class.getName(), session.getAttribute(Identity.class.getName()));
-        allParameters.put("title", getParameterAsString(DublinCore.ELEMENT_TITLE));
-
-        // create new document
-        // implementation note: since blog does not have a hierarchy,
-        // document id (full path) and document id-name (this leaf's id)
-        // are the same
-        DocumentManager documentManager = null;
-        DocumentTypeBuilder documentTypeBuilder = null;
-        try {
-            documentTypeBuilder = (DocumentTypeBuilder) this.manager
-                    .lookup(DocumentTypeBuilder.ROLE);
-
-            DocumentType documentType = documentTypeBuilder
-                    .buildDocumentType(getDocumentTypeName(), getSourceDocument().getPublication());
-
-            documentManager = (DocumentManager) this.manager.lookup(DocumentManager.ROLE);
-
-            DocumentIdentityMap map = (DocumentIdentityMap) getUnitOfWork().getIdentityMap();
-
-            String documentId = getDocumentID();
-            Document document = map.get(getSourceDocument().getPublication(), getSourceDocument()
-                    .getArea(), documentId, language);
-
-            documentManager.add(document,
-                    documentType,
-                    getParameterAsString(DublinCore.ELEMENT_TITLE),
-                    allParameters);
-        } finally {
-            if (documentManager != null) {
-                this.manager.release(documentManager);
-            }
-            if (documentTypeBuilder != null) {
-                this.manager.release(documentTypeBuilder);
-            }
-        }
-    }
-
-    /**
-     * The blog publication has a specific site structuring: it groups nodes by date.
-     * 
-     * <p>
-     * Example structuring of blog entries:
-     * </p>
-     * <ul>
-     * <li>2004</li>
-     * <li>2005</li>
-     * <ul>
-     * <li>01</li>
-     * <li>02</li>
-     * <ul>
-     * <li>23</li>
-     * <li>24</li>
-     * <ul>
-     * <li>article-one</li>
-     * <li>article-two</li>
-     * </ul>
-     * </ul>
-     * </ul>
-     * </ul>
-     * 
-     * @return The document ID.
-     */
-    protected String getDocumentID() {
-        DateFormat fmtyyyy = new SimpleDateFormat("yyyy");
-        DateFormat fmtMM = new SimpleDateFormat("MM");
-        DateFormat fmtdd = new SimpleDateFormat("dd");
-        Date date = new Date();
-
-        String year = fmtyyyy.format(date);
-        String month = fmtMM.format(date);
-        String day = fmtdd.format(date);
-
-        String documentId = "/entries/" + year + "/" + month + "/" + day + "/"
-                + getNewDocumentName() + "/index";
-        return documentId;
-    }
-
-    /**
-     * @return The document name.
-     * @see org.apache.lenya.cms.site.usecases.Create#getNewDocumentName()
-     */
-    protected String getNewDocumentName() {
-        return getParameterAsString(DOCUMENT_ID);
-    }
-
-    /**
-     * @return The name of the document type.
-     * @see org.apache.lenya.cms.site.usecases.Create#getDocumentTypeName()
-     */
-    protected String getDocumentTypeName() {
-        return getParameterAsString(DOCUMENT_TYPE);
-    }
-}
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/blog/lenya/doctypes/entry/doctype.xconf b/src/webapp/lenya/pubs/blog/lenya/doctypes/entry/doctype.xconf
deleted file mode 100644
index 2b42c46..0000000
--- a/src/webapp/lenya/pubs/blog/lenya/doctypes/entry/doctype.xconf
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: doctypes.xconf 153533 2005-02-12 20:13:54Z gregor $ -->
-
-<resource-type name="entry">
-  <schema src="entry.rng"/>
-  <creator src="org.apache.lenya.cms.authoring.NewBlogEntryCreator">
-    <sample-name>entry.xml</sample-name>
-  </creator>
-</resource-type>
diff --git a/src/webapp/lenya/pubs/blog/lenya/doctypes/entry/samples/entry.xml b/src/webapp/lenya/pubs/blog/lenya/doctypes/entry/samples/entry.xml
deleted file mode 100644
index d478503..0000000
--- a/src/webapp/lenya/pubs/blog/lenya/doctypes/entry/samples/entry.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<echo:entry
-    xmlns:echo="http://purl.org/atom/ns#"
-    xmlns:ent="http://www.purl.org/NET/ENT/1.0/"
-    >
-    
-    <echo:title>My Sample Entry</echo:title>
-
-    <echo:summary>Summary</echo:summary>
-
-    <echo:author>
-      <echo:name>Bob B. Bobbington</echo:name>
-    </echo:author>
-
-    <echo:link rel="alternate" href="http://bob.blog/" type="text/xml"/>
-    <echo:id>tag:bob.blog.net,2004:04:15:taxes</echo:id>
-
-    <echo:created>2003-02-05T12:29:29-04:00</echo:created>
-    <echo:issued>2003-02-05T08:29:29-04:00</echo:issued>
-    <echo:modified>2003-02-05T12:29:29-04:00</echo:modified>
-
-    <echo:content type="application/xhtml+xml">
-      <p><em>Hello</em>, <strong>weblog</strong> <a href="http://www.apache.org">world</a>!</p>    </echo:content>
-</echo:entry>
diff --git a/src/webapp/lenya/pubs/blog/lenya/resources/schemas/entry.rng b/src/webapp/lenya/pubs/blog/lenya/resources/schemas/entry.rng
deleted file mode 100644
index bfa2d5b..0000000
--- a/src/webapp/lenya/pubs/blog/lenya/resources/schemas/entry.rng
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: entry.rng 124404 2005-01-06 16:17:36Z andreas $ -->
-
-<grammar xmlns:echo="http://purl.org/atom/ns#" ns="" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
-  <start>
-    <element name="echo:entry">
-      <element name="echo:title">
-        <text/>
-      </element>
-      <element name="echo:summary">
-        <text/>
-      </element>
-      <element name="echo:author">
-        <element name="echo:name">
-          <data type="string"/>
-        </element>
-      </element>
-      <element name="echo:link">
-        <attribute name="href">
-          <data type="anyURI"/>
-        </attribute>
-        <attribute name="rel">
-          <data type="NCName"/>
-        </attribute>
-        <attribute name="type"/>
-      </element>
-      <element name="echo:id">
-        <data type="anyURI"/>
-      </element>
-      <element name="echo:created">
-        <data type="dateTime"/>
-      </element>
-      <element name="echo:issued">
-        <data type="dateTime"/>
-      </element>
-      <element name="echo:modified">
-        <data type="dateTime"/>
-      </element>
-      <element name="echo:content">
-        <attribute name="type"/>
-        <oneOrMore>
-          <element name="p">
-            <oneOrMore>
-              <choice>
-                <text/>
-                <element name="a">
-                  <attribute name="href">
-                    <data type="anyURI"/>
-                  </attribute>
-                  <text/>
-                </element>
-                <element name="strong">
-                  <text/>
-                </element>
-                <element name="em">
-                  <text/>
-                </element>
-              </choice>
-            </oneOrMore>
-          </element>
-        </oneOrMore>
-      </element>
-    </element>
-  </start>
-</grammar>
diff --git a/src/webapp/lenya/pubs/blog/lenya/resources/schemas/sidebar.rng b/src/webapp/lenya/pubs/blog/lenya/resources/schemas/sidebar.rng
deleted file mode 100644
index ceab263..0000000
--- a/src/webapp/lenya/pubs/blog/lenya/resources/schemas/sidebar.rng
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: sidebar.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-
-<grammar ns="" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
-  <start>
-    <element name="sidebar">
-      <oneOrMore>
-        <element name="block">
-          <element name="title">
-            <text/>
-          </element>
-          <element name="content">
-            <oneOrMore>
-              <choice>
-                <text/>
-                <element name="a">
-                  <attribute name="href">
-                    <data type="anyURI"/>
-                  </attribute>
-                  <text/>
-                </element>
-                <element name="br">
-                  <empty/>
-                </element>
-              </choice>
-            </oneOrMore>
-          </element>
-        </element>
-      </oneOrMore>
-    </element>
-  </start>
-</grammar>
diff --git a/src/webapp/lenya/pubs/blog/lenya/usecases/edit/forms/entry.xsl b/src/webapp/lenya/pubs/blog/lenya/usecases/edit/forms/entry.xsl
deleted file mode 100644
index 290cace..0000000
--- a/src/webapp/lenya/pubs/blog/lenya/usecases/edit/forms/entry.xsl
+++ /dev/null
@@ -1,112 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: entry.xsl 42702 2004-03-13 12:34:18Z gregor $ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:echo="http://purl.org/atom/ns#"
-  xmlns:ent="http://www.purl.org/NET/ENT/1.0/"
->
-
-<xsl:import href="../../../../../../usecases/edit/forms/form.xsl"/>
-
-<xsl:template match="echo:entry">
-<node name="Title" select="/echo:entry/echo:title[@tagID='{echo:title/@tagID}']">
-<!-- FIXME: In the case of text input field, < and > need to be replaced by &lt; and &gt;
-  <content><input type="text" name="&lt;xupdate:update select=&quot;/echo:entry/echo:title[@tagID='{echo:title/@tagID}']&quot;&gt;" size="40"><xsl:attribute name="value"><xsl:apply-templates select="echo:title/node()" mode="mixed"/></xsl:attribute></input></content>
--->
-  <content>
-    <textarea name="&lt;xupdate:update select=&quot;/echo:entry/echo:title[@tagID='{echo:title/@tagID}']&quot;&gt;" cols="40" rows="1">
-      <xsl:copy-of select="echo:title/node()"/>
-<!--
-      <xsl:apply-templates select="echo:title/node()" mode="mixedcontent"/>
--->
-    </textarea>
-  </content>
-</node>
-
-<xsl:if test="not(echo:summary)">
-<node name="Summary">
-  <action><insert name="&lt;xupdate:insert-after select=&quot;/echo:entry/echo:title[@tagID='{echo:title/@tagID}']&quot;&gt;&lt;xupdate:element name=&quot;echo:summary&quot; namespace=&quot;http://purl.org/atom/ns#&quot;&gt;New summary&lt;/xupdate:element&gt;&lt;/xupdate:insert-after&gt;"/></action>
-</node>
-</xsl:if>
-
-<xsl:apply-templates select="echo:summary"/>
-<xsl:apply-templates select="echo:content"/>
-
-<node name="Content Block (application/xhtml+xml)">
-  <action><insert name="&lt;xupdate:append select=&quot;/echo:entry&quot;&gt;&lt;xupdate:element name=&quot;echo:content&quot; namespace=&quot;http://purl.org/atom/ns#&quot;&gt;&lt;xupdate:attribute name=&quot;type&quot;&gt;application/xhtml+xml&lt;/xupdate:attribute&gt;&lt;p&gt;Append new content&lt;/p&gt;&lt;/xupdate:element&gt;&lt;/xupdate:append&gt;"/></action>
-</node>
-<!--
-<node name="Content (text/plain as CDATA)">
-  <action><insert name="&lt;xupdate:append select=&quot;/echo:entry&quot;&gt;&lt;xupdate:element name=&quot;echo:content&quot; namespace=&quot;http://purl.org/atom/ns#&quot;&gt;&lt;xupdate:attribute name=&quot;type&quot;&gt;text/plain&lt;/xupdate:attribute&gt;New CDATA content&lt;/xupdate:element&gt;&lt;/xupdate:append&gt;"/></action>
-</node>
--->
-</xsl:template>
-
-<xsl:template match="echo:summary">
-<node name="Summary" select="/echo:entry/echo:summary[@tagID='{@tagID}']">
-  <action><delete name="&lt;xupdate:remove select=&quot;/echo:entry/echo:summary[@tagID='{@tagID}']&quot;/&gt;"/></action>
-  <content>
-    <textarea name="&lt;xupdate:update select=&quot;/echo:entry/echo:summary[@tagID='{@tagID}']&quot;&gt;" cols="40" rows="5">
-      <xsl:copy-of select="node()"/>
-<!--
-      <xsl:apply-templates mode="mixedcontent"/>
--->
-    </textarea>
-  </content>
-</node>
-</xsl:template>
-
-
-<xsl:template match="echo:content[@type='text/plain']">
-<node name="Content (text/plain as CDATA)">
-  <action><insert name="&lt;xupdate:insert-before select=&quot;/echo:entry/echo:content[@tagID='{@tagID}']&quot;&gt;&lt;xupdate:element name=&quot;echo:content&quot; namespace=&quot;http://purl.org/atom/ns#&quot;&gt;&lt;xupdate:attribute name=&quot;type&quot;&gt;text/plain&lt;/xupdate:attribute&gt;New content&lt;/xupdate:element&gt;&lt;/xupdate:insert-before&gt;"/></action>
-</node>
-<node name="Content (text/plain as CDATA)">
-  <action><delete name="&lt;xupdate:remove select=&quot;/echo:entry/echo:content[@tagID='{@tagID}']&quot;/&gt;"/></action>
-  <content><textarea name="&lt;xupdate:update select=&quot;/echo:entry/echo:content[@tagID='{@tagID}']&quot;&gt;&lt;![CDATA[" cols="40" rows="5"><xsl:value-of select="."/></textarea></content>
-</node>
-</xsl:template>
-
-
-<xsl:template match="echo:content[@type='application/xhtml+xml']">
-<node name="Content Block (application/xhtml+xml)">
-  <action><insert name="&lt;xupdate:insert-before select=&quot;/echo:entry/echo:content[@tagID='{@tagID}']&quot;&gt;&lt;xupdate:element name=&quot;echo:content&quot; namespace=&quot;http://purl.org/atom/ns#&quot;&gt;&lt;xupdate:attribute name=&quot;type&quot;&gt;application/xhtml+xml&lt;/xupdate:attribute&gt;&lt;p&gt;Insert before new content&lt;/p&gt;&lt;/xupdate:element&gt;&lt;/xupdate:insert-before&gt;"/></action>
-</node>
-<node name="Content Block (application/xhtml+xml)" select="/echo:entry/echo:content[@tagID='{@tagID}']">
-  <action><delete name="&lt;xupdate:remove select=&quot;/echo:entry/echo:content[@tagID='{@tagID}']&quot;/&gt;"/></action>
-  <content>
-    <textarea name="&lt;xupdate:update select=&quot;/echo:entry/echo:content[@tagID='{@tagID}']&quot;&gt;" cols="40" rows="5">
-      <xsl:copy-of select="node()"/>
-<!--
-      <xsl:apply-templates mode="mixedcontent"/>
--->
-    </textarea>
-  </content>
-</node>
-</xsl:template>
-
-
-<xsl:template match="echo:content">
-<node name="Content (Either no @type attribute or no xsl:template with such a @type attribute!)">
-<content><xsl:apply-templates/></content>
-</node>
-</xsl:template>
- 
-</xsl:stylesheet>  
diff --git a/src/webapp/lenya/pubs/blog/lenya/usecases/edit/forms/sidebar.xsl b/src/webapp/lenya/pubs/blog/lenya/usecases/edit/forms/sidebar.xsl
deleted file mode 100644
index 68a0bd5..0000000
--- a/src/webapp/lenya/pubs/blog/lenya/usecases/edit/forms/sidebar.xsl
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: sidebar.xsl 42702 2004-03-13 12:34:18Z gregor $ -->
-                                                                
-<xsl:stylesheet version="1.0"  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-<xsl:import href="../../../../../../usecases/edit/forms/form.xsl"/>
-
-<xsl:template match="sidebar">
- <xsl:apply-templates select="block"/>
-
-  <node name="Add Block">
-    <action><insert name="&lt;xupdate:append select=&quot;/sidebar&quot;&gt;&lt;xupdate:element name=&quot;block&quot;&gt;&lt;title&gt;New title&lt;/title&gt;&lt;content&gt;New content&lt;/content&gt;&lt;/xupdate:element&gt;&lt;/xupdate:append&gt;"/></action>
-  </node>
-</xsl:template>
-
-<xsl:template match="block">
-  <node name="Add Block">
-    <action><insert name="&lt;xupdate:insert-before select=&quot;/sidebar/block[@tagID='{@tagID}']&quot;&gt;&lt;xupdate:element name=&quot;block&quot;&gt;&lt;title&gt;New title&lt;/title&gt;&lt;content&gt;New content&lt;/content&gt;&lt;/xupdate:element&gt;&lt;/xupdate:insert-before&gt;"/></action>
-  </node>
-  <node name="Delete Block">
-    <action><delete name="&lt;xupdate:remove select=&quot;/sidebar/block[@tagID='{@tagID}']&quot;/&gt;"/></action>
-  </node>
-  <node name="Title" select="/sidebar/block/title[@tagID='{title/@tagID}']">
-    <content type="plain"><input type="text" name="&lt;xupdate:update select=&quot;/sidebar/block/title[@tagID='{title/@tagID}']&quot;&gt;" size="40"><xsl:attribute name="value"><xsl:value-of select="title"/></xsl:attribute></input></content>
-  </node>
-  <node name="Content" select="/sidebar/block/content[@tagID='{content/@tagID}']">
-    <content type="mixed">
-      <textarea name="&lt;xupdate:update select=&quot;/sidebar/block/content[@tagID='{content/@tagID}']&quot;&gt;" cols="40" rows="3">
-        <xsl:copy-of select="content/node()"/>
-      </textarea>
-    </content>
- </node> 
-</xsl:template>
- 
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/pubs/blog/lenya/usecases/site/create.jx b/src/webapp/lenya/pubs/blog/lenya/usecases/site/create.jx
deleted file mode 100644
index 419d9cd..0000000
--- a/src/webapp/lenya/pubs/blog/lenya/usecases/site/create.jx
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<page:page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" 
-           xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" 
-           xmlns="http://www.w3.org/1999/xhtml" 
-           xmlns:i18n="http://apache.org/cocoon/i18n/2.1" >
-
-  <page:title><i18n:text>New Entry</i18n:text></page:title>
-  <page:body>
-    <div class="lenya-box">
-      <div class="lenya-box-title">
-        <i18n:text>New Entry</i18n:text>
-      </div>
-
-      <jx:import uri="templates/messages.jx"/>
-
-      <div class="lenya-box-body">
-        <form>
-          <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-          <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-      	  <input type="hidden" name="doctype" value="entry"/>
-          <table class="lenya-table-noborder">
-              <tr>
-                <td class="lenya-entry-caption">
-                  <label for="documentId"><i18n:text>Entry ID</i18n:text>*:</label></td>
-                <td>
-                  <input class="lenya-form-element" type="text" name="documentId" value="${usecase.getParameter('documentId')}"/>
-                  <br/> (<i18n:text>No whitespace, no special characters</i18n:text>)</td>
-              </tr>
-              <tr>
-                <td class="lenya-entry-caption">
-                  <label for="title"><i18n:text>Title</i18n:text>*: </label></td>
-                <td>
-                  <input class="lenya-form-element" type="text" name="title" value="${usecase.getParameter('title')}"/>
-                </td>
-              </tr>
-              <tr>
-                <td class="lenya-entry-caption">* <i18n:text>required fields</i18n:text>
-                </td>
-              </tr>
-              <tr>
-                <td/>
-                <td>
-                  <input i18n:attr="value" type="submit" name="submit" value="Create"/>
-                  &#160;
-                  <input i18n:attr="value" type="submit" name="cancel" value="Cancel"/>
-                </td>
-              </tr>
-          </table>
-        </form>
-      </div>
-    </div>
-  </page:body>
-</page:page>
diff --git a/src/webapp/lenya/pubs/blog/lenya/xslt/publishing/publish-screen.xsl b/src/webapp/lenya/pubs/blog/lenya/xslt/publishing/publish-screen.xsl
deleted file mode 100644
index 880df42..0000000
--- a/src/webapp/lenya/pubs/blog/lenya/xslt/publishing/publish-screen.xsl
+++ /dev/null
@@ -1,188 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: publish-screen.xsl,v 1.3 2004/03/13 12:31:33 gregor Exp $ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns:usecase="http://apache.org/cocoon/lenya/usecase/1.0"
-  xmlns:not="http://apache.org/cocoon/lenya/notification/1.0"
-  xmlns="http://www.w3.org/1999/xhtml"
-  >
-  
-  <xsl:import href="../../../../../xslt/util/page-util.xsl"/>
-
-  <xsl:output version="1.0" indent="yes" encoding="ISO-8859-1"/>
-
-  <xsl:param name="action" select="'publish'"/>
-  <xsl:param name="lenya.event"/>
-
-  <xsl:variable name="separator" select="','"/>
-
-  <xsl:variable name="uris"><xsl:value-of select="/usecase:publish/usecase:uris"/></xsl:variable>
-  <xsl:variable name="sources"><xsl:value-of select="/usecase:publish/usecase:sources"/></xsl:variable>
-  <xsl:variable name="document-id"><xsl:value-of select="/usecase:publish/usecase:document-id"/></xsl:variable>
-  <xsl:variable name="document-language"><xsl:value-of select="/usecase:publish/usecase:language"/></xsl:variable>
-  <xsl:variable name="task-id"><xsl:value-of select="/usecase:publish/usecase:task-id"/></xsl:variable>
-  <xsl:variable name="referer"><xsl:value-of select="/usecase:publish/usecase:referer"/></xsl:variable>
-
-
-  <xsl:template match="/usecase:publish[usecase:message]">
-    <page:page>
-      <page:title>Publish</page:title>
-      <page:body>
-          <div class="lenya-box">
-            <div class="lenya-box-title">Publish</div>
-            <div class="lenya-box-body">
-              <table class="lenya-table-noborder">
-                <tr>
-                  <td class="lenya-entry-caption" valign="top">Source&#160;File(s):</td>
-                  <td valign="top">
-                    <xsl:call-template name="print-list-simple">
-                      <xsl:with-param name="list-string" select="$sources"/>
-                    </xsl:call-template>
-                  </td>
-                </tr>
-                <tr>
-                  <td class="lenya-entry-caption" valign="top">URI(s):</td>
-                  <td valign="top">
-                    <xsl:call-template name="print-list-simple">
-                      <xsl:with-param name="list-string" select="$uris"/>
-                    </xsl:call-template>
-                  </td>
-                </tr>
-                <tr>
-                  <td valign="top" class="lenya-entry-caption">Problem:</td>
-                  <td>
-                    <span class="lenya-form-error">This page cannot be published unless its parent is
-                      published:</span>
-                    <ul>
-                      <li><xsl:apply-templates select="usecase:parent"/></li>
-                    </ul>
-                  </td>
-                </tr>
-                <tr>
-                  <td/>
-                  <td>
-                    <input type="button" onClick="location.href='{$referer}';" value="Cancel"/>
-                  </td>
-                </tr>
-              </table>
-              
-            </div>
-          </div>
-      </page:body>
-    </page:page>
-  </xsl:template>
-  
-  
-  <xsl:template match="usecase:parent">
-    <a href="{@href}"><xsl:value-of select="@id"/> [<xsl:value-of select="@language"/>]</a>
-  </xsl:template>
-        
-        
-  <xsl:template match="/usecase:publish[not(usecase:message)]">
-
-    <page:page>
-      <page:title>Publish</page:title>
-      <page:body>
-        
-        <table class="lenya-table-noborder">
-        <tr>
-        <td>
-        
-        <form name="form_publish">
-          
-          <input type="hidden" name="lenya.event" value="{$lenya.event}"/>
-          <input type="hidden" name="lenya.step" value="publish"/>
-          <input type="hidden" name="task-id" value="{$task-id}"/>
-          
-          <input type="hidden" name="properties.publish.sources" value="{$sources}"/>
-          <input type="hidden" name="properties.publish.documentid" value="{$document-id}"/>
-          <input type="hidden" name="properties.export.uris" value="{$uris}"/>
-          <input type="hidden" name="properties.publish.language" value="{$document-language}"/>
-          
-          <div class="lenya-box">
-            <div class="lenya-box-title">Publish</div>
-            <div class="lenya-box-body">
-              <table class="lenya-table-noborder">
-                <tr>
-                  <td class="lenya-entry-caption" valign="top">Source&#160;File(s):</td>
-                  <td valign="top">
-                    <xsl:call-template name="print-list-simple">
-                      <xsl:with-param name="list-string" select="$sources"/>
-                    </xsl:call-template>
-                  </td>
-                </tr>
-                <tr>
-                  <td class="lenya-entry-caption" valign="top">URI(s):</td>
-                  <td valign="top">
-                    <xsl:call-template name="print-list-simple">
-                      <xsl:with-param name="list-string" select="$uris"/>
-                    </xsl:call-template>
-                  </td>
-                </tr>
-                <tr>
-	          <xsl:apply-templates select="referenced-documents"/>
-                </tr>
-                <tr>
-                  <td/>
-                  <td>
-                    <input type="submit" name="lenya.usecase" value="publish"/>
-                    &#160;&#160;&#160;
-                    <input type="button" onClick="location.href='{$referer}';" value="Cancel"/>
-                  </td>
-                </tr>
-              </table>
-              
-            </div>
-          </div>
-
-          <not:notification>
-            <not:preset>
-              <xsl:apply-templates select="not:users/not:user"/>
-            </not:preset>
-            <not:textarea/>
-          </not:notification>
-          
-        </form>
-        
-        <div style="text-align: right">
-        <form action="{$referer}"><input type="submit" value="Back to Page"/></form>
-        </div>
-        </td>
-        </tr>
-        </table>
-          
-      </page:body>
-    </page:page>
-  </xsl:template>
-
-  <xsl:template match="referenced-documents">
-    <td class="lenya-entry-caption" valign="top">
-      <span class="lenya-form-message-error">This document has links to the <br/>following unpublished documents:</span>
-    </td>
-    <td valign="top">
-      <xsl:for-each select="referenced-document">
-	<a target="_blank" href="{@href}"><xsl:value-of select="@id"/><xsl:value-of select="."/></a><br/>
-      </xsl:for-each>
-    </td>
-  </xsl:template>
-  
-
-</xsl:stylesheet>  
diff --git a/src/webapp/lenya/pubs/blog/lenya/xslt/xopus/entry.xsl b/src/webapp/lenya/pubs/blog/lenya/xslt/xopus/entry.xsl
deleted file mode 100644
index 9c3eb85..0000000
--- a/src/webapp/lenya/pubs/blog/lenya/xslt/xopus/entry.xsl
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: entry.xsl,v 1.2 2004/03/13 12:31:33 gregor Exp $ -->
-    
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-<xsl:template match="@*|node()"><xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy></xsl:template> 
-  
-<xsl:template match="/">
-  <html>
-    <head>
-      <title>Atom Entry Title</title>
-    </head>
-    <body bgcolor="white">
-      Atom Entry
-      <xsl:apply-templates select="entry" />
-    </body>
-  </html>
-</xsl:template>
-  
-<xsl:template match="entry">
-  <xsl:apply-templates />
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/pubs/blog/menus.xmap b/src/webapp/lenya/pubs/blog/menus.xmap
deleted file mode 100644
index 4b117b2..0000000
--- a/src/webapp/lenya/pubs/blog/menus.xmap
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
-
-  <map:pipelines>
-
-    <map:pipeline>
-      <map:match pattern="authoring/entry.xml">
-        <map:generate type="serverpages" src="config/menus/entry.xsp"/>
-        <map:serialize type="xml"/>
-      </map:match>
-      <map:match pattern="authoring/feed.xml">
-        <map:generate type="serverpages" src="config/menus/feed.xsp"/>
-        <map:serialize type="xml"/>
-      </map:match>
-      <map:match pattern="authoring/archive.xml">
-        <map:generate type="serverpages" src="config/menus/archive.xsp"/>
-        <map:serialize type="xml"/>
-      </map:match>
-      <map:match pattern="live/**.xml">
-        <map:generate type="serverpages" src="../../content/menus/live.xsp"/>
-        <map:serialize type="xml"/>
-      </map:match>
-    </map:pipeline>
-
-
-  </map:pipelines>
-</map:sitemap>
diff --git a/src/webapp/lenya/pubs/blog/publication-tests.xml b/src/webapp/lenya/pubs/blog/publication-tests.xml
deleted file mode 100755
index 3e48465..0000000
--- a/src/webapp/lenya/pubs/blog/publication-tests.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: publication-tests.xml,v 1.3 2004/03/13 12:31:32 gregor Exp $ -->
-
-<lenya:publication xmlns:lenya="http://apache.org/cocoon/lenya/publication/1.0">
-<lenya:tests>
-  <lenya:test>Feed example: <a href="live/feeds/all/index.xml">XML</a>, <a href="live/feeds/all/index.html">HTML</a></lenya:test>
-  <lenya:test>WebDAV: <a href="webdav://127.0.0.1:8080/lenya/blog/webdav/entries/2003/">Collection</a></lenya:test>
-  <lenya:test>Atom: <a href="atomapi/">Introspection</a>, <a href="atomapi/search?atom-all">atom-all</a></lenya:test>
-</lenya:tests>
-</lenya:publication>
diff --git a/src/webapp/lenya/pubs/blog/publication.xml b/src/webapp/lenya/pubs/blog/publication.xml
deleted file mode 100755
index 1c25708..0000000
--- a/src/webapp/lenya/pubs/blog/publication.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<lenya:publication xmlns:lenya="http://apache.org/cocoon/lenya/publication/1.0">
-<lenya:pub-version>@lenya.version@</lenya:pub-version>
-<lenya:lenya-version>@lenya.version@</lenya:lenya-version>
-<lenya:cocoon-version>2.1.7</lenya:cocoon-version>
-<lenya:name>Lenya's Weblog</lenya:name>
-<lenya:description>
-This publication is an initiative to implement the <a href="http://www.intertwingly.net/wiki/pie/FrontPage">"Echo/Atom"</a> specification for syndicating, archiving and
-editing episodic web sites (e.g. weblogs).
-
-<h3>Customizing the layout</h3>
-The fonts and colors can be customized by editing the file <code>resources/css/styles.css</code>.
-The positioning can be customized by editing the file <code>xslt/global.xsl</code>. The following CSS resources
-might be helpful
-<br /><a href="http://www.w3schools.com/css/css_reference.asp">CSS2 Reference</a>
-<br /><a href="http://www.csszengarden.com">The Beauty of CSS Design</a>
-<br /><a href="http://www.lightsphere.com/colors/">216 Color Square</a>
-
-<h3>Weblog Resources</h3>
-<a href="http://www.intertwingly.net/wiki/pie/Syntax">Doctypes</a> (entry, feed, etc.)
-<br />
-<a href="http://www.imc.org/atom-syntax/mail-archive/maillist.html">Mailing List</a>
-<br />
-<a href="http://intertwingly.net/stories/2003/07/01/example.necho">XML proposal of doctype entry</a>
-<br />
-<a href="http://www.dynamicobjects.com/d2r/archives/001921.html">A Review of Blogging APIs</a>
-<br />
-<a href="http://btrott.typepad.com/typepad/atom.xml">Sample Feed by TypePad</a>
-
-<h3>Other Atom API Implementations</h3>
-<a href="http://bitworking.org/rfc/">Specification</a>
-<br />
-<a href="http://diveintomark.org/archives/2003/08/18/atom_api_implementation">Overview</a>
-<br />
-<a href="http://bitworking.org/rfc/implementation/wxAtomClient_25Aug2003.zip">Python Client</a>
-<br />
-<code>export HTTP_PROXY=http://127.0.0.1:4444</code>
-<br />
-<code>python wxAtomClientApp.py</code>
-<br />
-<a href="http://www.diveintomark.org/atom/">Testing the client</a>
-<br />
-<code>java -classpath lib/axis.jar org.apache.axis.utils.tcpmon</code>
-(Listen Port # 4444, Act as a ... Proxy, Options: HTTP Proxy Support)
-<br />
-<a href="http://diveintomark.org/public/2003/08/atom-api-20030825.py">Python Server</a>
-<br />
-<a href="http://www.intertwingly.net/code/mombo/">Python Server</a>
-
-<h3>Atom Misc</h3>
-<a href="http://www.feedvalidator.org">http://www.feedvalidator.org</a>
-<br />
-<a href="http://feedvalidator.org/download/rssvalidator-latest.zip">Download Feed Validator</a>
-
-</lenya:description>
-</lenya:publication>
diff --git a/src/webapp/lenya/pubs/blog/resources/misc/bxe/entry-namespaces.xml b/src/webapp/lenya/pubs/blog/resources/misc/bxe/entry-namespaces.xml
deleted file mode 100755
index e1c5385..0000000
--- a/src/webapp/lenya/pubs/blog/resources/misc/bxe/entry-namespaces.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<namespaces>
-
-<xmlns>echo=http://purl.org/atom/ns#</xmlns>
-<xmlns>ent=http://www.purl.org/NET/ENT/1.0/</xmlns>
-
-</namespaces>
diff --git a/src/webapp/lenya/pubs/blog/resources/misc/bxe/entry.css b/src/webapp/lenya/pubs/blog/resources/misc/bxe/entry.css
deleted file mode 100644
index 132539b..0000000
--- a/src/webapp/lenya/pubs/blog/resources/misc/bxe/entry.css
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
-* Copyright 1999-2004 The Apache Software Foundation
-*
-* Licensed 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.
-*/
-.title {
-  font-size: x-large;
-  font-weight: bold;
-  display: block;
-/*  border: 1pt solid red;*/
-}
-
-.subtitle {
-  font-size: large;
-  font-weight: bold;
-  display: block;
-/*  border: 1pt solid red; */
-}
-
-
-.summary:before {
-  background-color:   lightgray; 
-  color: black;
-  content: "Summary:  "
-}
-.summary {
-  font-size: large;
-  font-style: italic;
-  display: block;
-/* border: 1pt solid blue; */
-}
-
-
-.content:before {
-  background-color:   lightgray; 
-  color: black;
-  content: "Content:  "
-}
-.content {
-  padding: 5pt;
-  display: block;
-/*  border: 1pt solid yellow; */
-}
-
-.author:before {
-  background-color:   lightgray; 
-  color: black;
-  content: "Author:  "
-
-}
-.author {
-  padding: 5pt;
-  display: block;
-  /*border: 1pt solid green;*/
-}
-
-.contributor:before {
-  background-color:   lightgray; 
-  color: black;
-  content: "Contributor:  ";
-
-}
-.contributor {
-  padding: 5pt;
-  display: block;
-  /*border: 1pt solid blue;*/
-}
-
-
-.created:before {
-  background-color:   lightgray;
-  color: black;
-  content: "Created:  "
-
-}
-.created {
-  padding: 5pt;
-  display: block;
-  /*border: 1pt solid blue;*/
-}
-
-
-.issued:before {
-  background-color:   lightgray;
-  color: black;
-  content: "Issued:  "
-
-}
-.issued {
-  padding: 5pt;
-  display: block;
-  /*border: 1pt solid blue;*/
-}
-
-
-.modified:before {
-  background-color:   lightgray;
-  color: black;
-  content: "Last Modified:  "
-
-}
-.modified {
-  padding: 5pt;
-  display: block;
-  /*border: 1pt solid blue;*/
-}
-
-
-.link:before {
-  background-color:   lightgray; 
-  color: black;
-  content: "Link:  ";
-}
-.link {
-  padding: 5pt;
-  display: block;
-  /*border: 1pt solid blue;*/
-}
-
-.id:before {
-  background-color:   lightgray; 
-  color: black;
-  content: "Entry ID:  ";
-}
-.id {
-  padding: 5pt;
-  display: block;
-  /*border: 1pt solid blue;*/
-}
-
-.p {
-  padding: 5pt;
-  display: block;
-}
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/blog/resources/misc/bxe/entry.xhtml b/src/webapp/lenya/pubs/blog/resources/misc/bxe/entry.xhtml
deleted file mode 100755
index 2dd8852..0000000
--- a/src/webapp/lenya/pubs/blog/resources/misc/bxe/entry.xhtml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"  >
-<head>
-
-<meta name="bxeNS" content="echo=http://purl.org/atom/ns#" />
-<meta name="bxeNS" content="ent=http://www.purl.org/NET/ENT/1.0/" />
-
-<link rel="stylesheet" href="/bxe/css/editor.css" type="text/css" />
-
-<script src="/bxe/bxeLoader.js" type="text/javascript"></script>
-
-
-<title>Bitflux Editor</title>
-
-</head>
-
-<body onload="bxe_start('./config-bxe.xml')">
-<!-- everything in the following div element will be replaced -->
-<div id="bxe_area">
-<noscript>
-<span style='font-family: Arial; padding: 5px; background-color: #ffffff'>
-You need JavaScript enabled. Otherwise nothing at all works here
-:)</span></noscript>
-</div>
-
-<!-- another way to do it without having to use xslt
-  <div id="foobar" bxe_xpath="/xhtml:html/xhtml:body"></div>
--->
-</body>
-</html>
diff --git a/src/webapp/lenya/pubs/blog/resources/shared/css/styles.css b/src/webapp/lenya/pubs/blog/resources/shared/css/styles.css
deleted file mode 100644
index 0cc3aab..0000000
--- a/src/webapp/lenya/pubs/blog/resources/shared/css/styles.css
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
-* Copyright 1999-2004 The Apache Software Foundation
-*
-* Licensed 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.
-*/
-/* Lenya's Blog */

-

-body {

-  margin: 0;

-  padding: 0;

-}

-

-td#title {

-  padding-top: 30pt;

-  padding-left: 10pt;

-  padding-bottom: 10pt;

-  background-color: #ffffff;

-  color: #000000;

-  font: bold xx-large verdana, sans-serif;

-  /*border: 1pt solid blue;*/

-}

-

-td#title a {

-  text-decoration: none;

-  color: #006699;

-}

-

-td#title a:hover {

-  color: #ff6600;

-}

-

-td#title a:visited {

-  color: #006699;

-}

-

-td#title a:visited:hover {

-  color: #ff6600;

-}

-

-td#subtitle {

-  padding-left: 10pt;

-  padding-top: 5pt;

-  padding-bottom: 5pt;

-  background-color: #e5f5f8;

-  font: bold small verdana, sans-serif;

-  border-top: solid 1pt #b1b1b1;

-  border-bottom: solid 1pt #b1b1b1;

-  /*border: 1pt solid blue;*/

-}

-

-td#content {

-  background-color: #ffffff;

-  font-family: verdana, sans-serif;

-  font-size: small;

-  /*background-color: #dddccf;*/

-  padding: 10pt;

-  /*border: 1pt solid yellow;*/

-}

-

-td#sidebar {

-  font-family: verdana, sans-serif;

-  text-decoration: none;

-  background-color: #f5f4e9;

-  border-left: solid 1pt #b1b1b1;

-  /*border: 1pt solid green;*/

-}

-

-td#sidebar a {

-  text-decoration: none;

-  color: #3366cc;

-}

-

-td#sidebar a:hover {

-  color: #ff6600;

-}

-

-td#sidebar a:visited {

-  color: #909090;

-}

-

-td#sidebar a:visited:hover {

-  color: #ff6600;

-  background-color: transparent;

-}

-

-td#footer {

-  border-top: solid 1pt #b1b1b1;

-  padding: 10pt;

-  background-color: #ffffff;

-  color: #000000;

-  font-family: verdana, sans-serif;

-  font-size: small;

-  /*border: 1pt solid blue;*/

-}

-

-div.sidebar-title {

-  font-style: verdana, sans-serif;

-  font-weight: bold;

-  font-size: 150%;

-  color: #ffffff;

-  background-color: #dddccf;

-  padding: 5pt;

-  /*border: 1pt solid red;*/

-}

-

-div.sidebar-content {

-  font-style: verdana, sans-serif;

-  color: #000000;

-  padding: 5pt;

-  /*border: 1pt solid red;*/

-}

-

-p.issued {

-  text-align: right;

-  color: #999999;

-  font-size: x-small;

-  /*border: 1pt solid red;*/

-}

-

-div.dateline {

-  margin-top: 15pt;

-  color: #999999;

-  /*border: 1pt solid red;*/

-}

-

-div.title {

-  font-size: x-large;

-  font-weight: bold;

-  /*border: 1pt solid red;*/

-}

-

-div.title a {

-  text-decoration: none;

-  color: #3366cc;

-}

-

-div.title a:hover {

-  color: #ff6600;

-}

-

-div.title a:visited {

-  color: #909090;

-}

-

-div.title a:visited:hover {

-  color: #ff6600;

-  background-color: transparent;

-}

-

-div.subtitle {

-  font-size: large;

-  font-weight: bold;

-  /*border: 1pt solid red;*/

-}

diff --git a/src/webapp/lenya/pubs/blog/sitemap.xmap b/src/webapp/lenya/pubs/blog/sitemap.xmap
deleted file mode 100644
index f7d9249..0000000
--- a/src/webapp/lenya/pubs/blog/sitemap.xmap
+++ /dev/null
@@ -1,262 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
-
-  <map:resources>
-          <map:resource name="style-cms-page">
-      <map:transform type="i18n">      
-        <map:parameter name="locale" value="{request:locale}"/>
-      </map:transform>    
-      <map:transform src="fallback://lenya/xslt/util/page2xhtml.xsl">
-        <map:parameter name="contextprefix" value="{request:contextPath}"/>
-      </map:transform>
-      <map:transform src="../../xslt/util/strip_namespaces.xsl"/>
-      <map:serialize/>
-    </map:resource>
- </map:resources>
-
-  <map:pipelines>
-    <!-- WebDAV -->
-    <map:pipeline>
-      <map:match pattern="webdav/**">
-        <map:mount src="webdav.xmap" uri-prefix="webdav" check-reload="yes"/>
-      </map:match>
-    </map:pipeline>
-
-    <!-- AtomAPI -->
-    <map:pipeline>
-      <map:match pattern="atomapi/**">
-        <map:mount src="atomapi.xmap" uri-prefix="atomapi" check-reload="yes"/>
-      </map:match>
-    </map:pipeline>
-  
-    <!-- Redirects -->
-    <map:pipeline>
-      <map:match pattern="*/">
-        <map:redirect-to uri="feeds/all/index.html"/>
-      </map:match>
-      <map:match pattern="*/index.html">
-        <map:redirect-to uri="feeds/all/index.html"/>
-      </map:match>
-      <!-- The HTML Form Editor does send a redirect -->
-      <map:match pattern="*/sidebar.html">
-        <map:redirect-to uri="feeds/all/index.html"/>
-      </map:match>
-    </map:pipeline>
-
-    <!-- Entries -->
-    <map:pipeline>
-      <map:match pattern="*/entries/*/*/*/*/introspection.xml">
-        <map:generate src="content/introspection.xml"/>
-        <map:transform src="xslt/entry/introspection.xsl">
-          <map:parameter name="editURL" value="http://127.0.0.1:8080/lenya/blog/authoring/entries/{2}/{3}/{4}/{5}/index.html"/>
-        </map:transform>
-        <map:serialize type="xml"/>
-      </map:match>
-    </map:pipeline>
-    <map:pipeline>
-      <map:match pattern="*/entries/*/*/*/*/index.xml">
-        <map:select type="request-parameter">
-          <map:parameter name="parameter-name" value="lenya.step"/>  
-          <map:when test="view-revision"> <!-- view of an older version -->
-            <map:generate type="serverpages" src="../../content/rc/view.xsp"/>
-            <map:transform src="../../xslt/rc/toDoc.xsl"/>
-          </map:when>
-          <map:otherwise>
-            <map:generate src="content/{1}/entries/{2}/{3}/{4}/{5}/index.xml"/>
-          </map:otherwise>
-        </map:select>
-        <map:serialize type="xml"/>
-      </map:match>
-      <map:match pattern="*/entries/*/*/*/*/lenya-body.xml">
-        <map:aggregate element="feed">
-          <map:part src="content/{1}/feeds/all/index.xml"/>
-          <map:part src="cocoon:/{1}/entries/{2}/{3}/{4}/{5}/index.xml"/>
-          <map:part src="content/{1}/sidebar.xml"/>
-        </map:aggregate>
-        <map:transform src="xslt/entry/aggregate.xsl"/>
-        <map:serialize type="xml"/>
-      </map:match>
-      <map:match pattern="*/entries/*/*/*/*/lenya-page-body.xml">
-        <map:aggregate element="cmsbody">
-          <map:part src="cocoon:/{1}/entries/{2}/{3}/{4}/{5}/lenya-body.xml"/>
-          <map:part src="content/{1}/sidebar.xml"/>
-        </map:aggregate>
-        <map:serialize type="xml"/>
-      </map:match>
-
-      <map:match pattern="*/entries/*/*/*/*/index.html">
-        <map:generate src="cocoon:/{1}/entries/{2}/{3}/{4}/{5}/lenya-page-body.xml"/>
-        <map:transform src="xslt/entry/main-{1}.xsl">
-          <map:parameter name="contextprefix" value="{request:contextPath}"/>
-          <map:parameter name="relative2root" value="../../../../.."/>
-        </map:transform>
-        <map:select type="browser">
-          <map:when test="mozilla5DISABLED">
-            <map:transform src="cocoon://lenya-page/{page-envelope:publication-id}/{1}/entry.xml?uiml=xul"/>
-            <map:serialize type="xml" mime-type="application/vnd.mozilla.xul+xml"/>
-          </map:when>
-          <map:otherwise>
-            <map:transform src="cocoon://lenya-page/{page-envelope:publication-id}/{1}/entry.xml"/>
-            <map:transform src="../../xslt/util/strip_namespaces.xsl"/>
-            <map:serialize type="xhtml"/>
-          </map:otherwise>
-        </map:select>
-      </map:match>
-    </map:pipeline>
-
-    <!-- BX Editor: Entries -->
-    <map:pipeline>
-      <map:match pattern="*/entries/*/*/*/*/index-bxe.html">
-        <!-- Check for BXE -->
-        <map:act type="resource-exists" src="../../resources/bxe/bxeLoader.js">
-          <map:aggregate element="bxe">
-            <map:part src="../../resources/misc/bxe/index.xhtml"/>
-            <map:part src="resources/misc/bxe/entry-namespaces.xml"/>
-          </map:aggregate>
-          <map:transform src="../../xslt/bxe/aggregate.xsl"/>
-          <map:transform src="../../xslt/bxe/index-xhtml.xsl">
-            <map:parameter name="configfile" value="./config-bxe.xml"/>
-            <map:parameter name="context" value="{request:contextPath}"/>
-          </map:transform>
-          <map:serialize type="xhtml"/>
-        </map:act>
-        <map:generate src="../../resources/misc/bxe/download.xhtml"/>
-        <map:serialize type="xhtml"/>
-      </map:match>
-    </map:pipeline>
-    <map:pipeline>
-      <map:match pattern="*/entries/*/*/*/*/config-bxe.xml">
-        <map:generate src="../../resources/misc/bxe/inc/config.xml"/>
-        <map:transform src="../../xslt/bxe/config-xml.xsl">
-          <map:parameter name="BX_xmlfile" value="../../../../../../webdav/entries/{2}/{3}/{4}/{5}/index.xml"/>
-          <map:parameter name="BX_xslfile" value="entry-bxe.xsl"/>
-          <map:parameter name="css" value="entry-bxe.css"/>
-          <map:parameter name="BX_exitdestination" value="index.html"/>
-          <map:parameter name="BX_validationfile" value="entry-relaxng-bxe.xml"/>
-        </map:transform>
-        <map:serialize type="xml"/>
-      </map:match>
-    </map:pipeline>
-    <map:pipeline>
-      <map:match pattern="*/entries/*/*/*/*/entry-bxe.xsl">
-        <map:generate src="xslt/entry/bxe.xsl"/>
-        <map:serialize type="xml"/>
-      </map:match>
-      <map:match pattern="*/entries/*/*/*/*/entry-bxe.css">
-        <map:read src="resources/misc/bxe/entry.css" mime-type="text/css"/>
-      </map:match>
-      <map:match pattern="*/entries/*/*/*/*/entry-relaxng-bxe.xml">
-        <map:generate src="config/doctypes/schemas/entry.rng"/>
-        <map:serialize type="xml"/>
-      </map:match>
-    </map:pipeline>
-    <!-- /BX Editor: Entries -->
-
-    <!-- Feeds -->
-    <map:pipeline>
-      <map:match pattern="*/feeds/*/introspection.xml">
-        <map:generate src="content/introspection.xml"/>
-        <map:serialize type="xml"/>
-      </map:match>
-    </map:pipeline>
-    <map:pipeline>
-      <map:match pattern="*/feeds/*/index.xml">
-        <map:act type="resource-exists">
-          <map:parameter name="url" value="content/{1}/entries"/>
-	
-          <map:generate type="directory" src="content/{../1}/entries">
-            <map:parameter name="depth" value="4"/>
-            <map:parameter name="reverse" value="true"/>
-          </map:generate>
-          <map:transform src="xslt/feed/xinclude.xsl">
-            <map:parameter name="feedid" value="{../2}"/>
-            <map:parameter name="area" value="{../1}"/>
-          </map:transform>
-          <map:transform type="xinclude"/>
-          <map:serialize type="xml"/>
-        </map:act>
-
-        <map:generate src="content/{1}/feeds/all/index.xml"/>
-        <map:serialize type="xml"/>
-      </map:match>
-      <map:match pattern="*/feeds/*/lenya-page-body.xml">
-        <map:aggregate element="cmsbody">
-          <map:part src="cocoon:/{1}/feeds/{2}/index.xml"/>
-          <map:part src="content/{1}/sidebar.xml"/>
-        </map:aggregate>
-        <map:serialize type="xml"/>
-      </map:match>
-      <map:match pattern="*/feeds/*/index.html">
-        <map:generate src="cocoon:/{1}/feeds/{2}/lenya-page-body.xml"/>
-        <map:transform type="xalan" src="xslt/feed/main-{1}.xsl">
-          <map:parameter name="relative2root" value="../.."/>
-          <map:parameter name="contextprefix" value="{request:contextPath}"/>
-        </map:transform>
-
-        <map:select type="browser">
-          <map:when test="mozilla5DISABLED">
-            <map:transform src="cocoon://lenya-page/{page-envelope:publication-id}/{1}/feed.xml?uiml=xul"/>
-            <map:serialize type="xml" mime-type="application/vnd.mozilla.xul+xml"/>
-          </map:when>
-          <map:otherwise>
-            <map:transform src="cocoon://lenya-page/{page-envelope:publication-id}/{1}/feed.xml"/>
-            <map:transform src="../../xslt/util/strip_namespaces.xsl"/>
-            <map:serialize type="xhtml"/>
-          </map:otherwise>
-        </map:select>
-      </map:match>
-    </map:pipeline>
-
-    <!-- Archives -->
-    <map:pipeline>
-      <map:match pattern="*/*/*/index.xml">
-        <map:generate type="directory" src="content/{1}/entries/{2}/{3}/">
-          <map:parameter name="depth" value="2"/>
-          <map:parameter name="reverse" value="true"/>
-        </map:generate>
-        <map:transform src="xslt/archive/xinclude.xsl">
-          <map:parameter name="year" value="{2}"/>
-          <map:parameter name="area" value="{1}"/>
-        </map:transform>
-        <map:transform type="xinclude"/>
-        <map:serialize type="xml"/>
-      </map:match>
-      <map:match pattern="*/*/*/lenya-page-body.xml">
-        <map:aggregate element="cmsbody">
-          <map:part src="cocoon:/{1}/{2}/{3}/index.xml"/>
-          <map:part src="content/{1}/sidebar.xml"/>
-        </map:aggregate>
-        <map:serialize type="xml"/>
-      </map:match>
-      <map:match pattern="*/*/*/">
-        <map:generate src="cocoon:/{1}/{2}/{3}/lenya-page-body.xml"/>
-        <map:transform type="xalan" src="xslt/feed/main-{1}.xsl">
-          <map:parameter name="relative2root" value="../.."/>
-          <map:parameter name="contextprefix" value="{request:contextPath}"/>
-        </map:transform>
-        <map:transform src="cocoon://lenya-page/{page-envelope:publication-id}/{1}/archive.xml"/>
-        <map:transform src="xslt/util/strip_namespaces.xsl"/>
-        <map:serialize type="xhtml"/>
-      </map:match>
-    </map:pipeline>
-
-  </map:pipelines>
-</map:sitemap>
diff --git a/src/webapp/lenya/pubs/blog/webdav.xmap b/src/webapp/lenya/pubs/blog/webdav.xmap
deleted file mode 100644
index 2615ce9..0000000
--- a/src/webapp/lenya/pubs/blog/webdav.xmap
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
-
-  <map:pipelines>
-
-    <map:pipeline type="noncaching">
-      <map:match pattern="entries/**/propfind-depth-*.xml">
-        <map:generate type="directory" src="content/authoring/entries/{1}/"/>
-        <map:transform src="../../xslt/util/propfind.xsl">
-          <map:parameter name="depth" value="{2}"/>
-          <map:parameter name="href" value="{request:contextPath}/blog/webdav/entries/{1}/"/>
-        </map:transform>
-        <map:serialize type="xml" status-code="207"/>
-      </map:match>
-      <map:match pattern="entries/**/">
-        <map:select type="request-method">
-          <map:when test="PROPFIND">
-            <map:generate type="directory" src="content/authoring/entries/{1}/"/>
-            <map:transform src="../../xslt/util/propfind.xsl">
-              <map:parameter name="depth" value="{request-header:Depth}"/>
-              <map:parameter name="href" value="{request:contextPath}/blog/webdav/entries/{1}/"/>
-            </map:transform>
-            <map:serialize type="xml" status-code="207"/>
-          </map:when>
-          <map:otherwise> <!-- GET -->
-            <map:generate type="directory" src="content/authoring/entries/{1}/"/>
-            <map:serialize type="xml"/>
-          </map:otherwise>
-        </map:select>
-      </map:match>
-    </map:pipeline>
-
-    <map:pipeline type="noncaching">
-      <map:match pattern="entries/**.xml">
-       <map:select type="request-method">
-          <map:when test="PUT">
-            <map:generate type="stream"/>
-            <map:transform src="../../xslt/authoring/edit/addSourceTags.xsl">
-              <map:parameter name="source" value="content/authoring/entries/{1}.xml"/>
-            </map:transform>
-            <map:transform type="write-source"/>
-            <map:serialize type="xml" status-code="204"/> <!-- HTTP status code: 204 No Content -->
-          </map:when>
-          <map:otherwise> <!-- GET -->
-            <map:generate src="content/authoring/entries/{1}.xml"/>
-            <map:serialize type="xml"/>
-          </map:otherwise>
-        </map:select>
-      </map:match>
-    </map:pipeline>
-
-  </map:pipelines>
-</map:sitemap>
diff --git a/src/webapp/lenya/pubs/blog/xslt/archive/xinclude.xsl b/src/webapp/lenya/pubs/blog/xslt/archive/xinclude.xsl
deleted file mode 100644
index bdc6299..0000000
--- a/src/webapp/lenya/pubs/blog/xslt/archive/xinclude.xsl
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0" 
-                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:xi="http://www.w3.org/2001/XInclude"
-  >
-
-<xsl:param name="year"/>
-<xsl:param name="area"/>
-
-<xsl:template match="/">
-  <xsl:apply-templates select="dir:directory" xmlns:dir="http://apache.org/cocoon/directory/2.0"/>
-</xsl:template>                                                                                                                             
-
-<xsl:template match="dir:directory" xmlns:dir="http://apache.org/cocoon/directory/2.0">
-<atom:feed xmlns:atom="http://purl.org/atom/ns#">
-  <xi:include href="feeds/all/index.xml#xmlns(atom=http://purl.org/atom/ns#)xpointer(/atom:feed/atom:title)"/>
-  <xi:include href="feeds/all/index.xml#xmlns(atom=http://purl.org/atom/ns#)xpointer(/atom:feed/atom:link)"/>
-  <xi:include href="feeds/all/index.xml#xmlns(atom=http://purl.org/atom/ns#)xpointer(/atom:feed/atom:modified)"/>
-
-  <xsl:variable name="month"><xsl:value-of select="@name"/></xsl:variable>
-  <xsl:for-each select="dir:directory">
-    <xsl:variable name="day"><xsl:value-of select="@name"/></xsl:variable>
-    <xsl:for-each select="dir:directory">
-      <xsl:variable name="entryid"><xsl:value-of select="@name"/></xsl:variable>
-      <entry>
-        <xi:include href="content/{$area}/entries/{$year}/{$month}/{$day}/{$entryid}/index.xml"/>
-      </entry>  
-    </xsl:for-each>
-  </xsl:for-each>
-</atom:feed>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/pubs/blog/xslt/atomapi/search.xsl b/src/webapp/lenya/pubs/blog/xslt/atomapi/search.xsl
deleted file mode 100644
index 209eb3e..0000000
--- a/src/webapp/lenya/pubs/blog/xslt/atomapi/search.xsl
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: search.xsl,v 1.4 2004/03/13 12:31:34 gregor Exp $ -->
-
-<xsl:stylesheet version="1.0" 
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:atom="http://purl.org/atom/ns#"
->
-
-<xsl:param name="serverName"/>
-<xsl:param name="serverPort"/>
-<xsl:param name="contextPath"/>
-<xsl:param name="publicationId"/>
-
-<xsl:template match="/">
-<search-results xmlns="http://purl.org/atom/ns#">
-  <xsl:apply-templates select="atom:feed" />
-</search-results>
-</xsl:template>
-
-<xsl:template match="atom:feed">
-<xsl:for-each select="atom:entry">
-  <entry>
-    <title><xsl:value-of select="atom:title"/></title>
-    <id>http://<xsl:value-of select="$serverName"/>:<xsl:value-of select="$serverPort"/><xsl:value-of select="$contextPath"/>/<xsl:value-of select="$publicationId"/>/atomapi/entries/<xsl:value-of select="atom:id"/>/index.xml</id>
-  </entry>
-</xsl:for-each>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/pubs/blog/xslt/entry/aggregate.xsl b/src/webapp/lenya/pubs/blog/xslt/entry/aggregate.xsl
deleted file mode 100644
index 543c0c0..0000000
--- a/src/webapp/lenya/pubs/blog/xslt/entry/aggregate.xsl
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: aggregate.xsl,v 1.5 2004/03/13 12:31:30 gregor Exp $ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
->
-
-<xsl:template match="/">
-<xsl:apply-templates select="feed"/>
-</xsl:template>
-
-<xsl:template match="feed">
-<feed xmlns:echo="http://purl.org/atom/ns#" xmlns="http://purl.org/atom/ns#" version="{echo:feed/@version}">
-<xsl:copy-of select="echo:feed/echo:title"/>
-<xsl:copy-of select="echo:feed/echo:subtitle"/>
-<xsl:copy-of select="echo:feed/echo:link"/>
-<xsl:copy-of select="echo:feed/echo:modified"/>
-<xsl:copy-of select="echo:entry"/>
-</feed>
-</xsl:template>
- 
-</xsl:stylesheet>  
diff --git a/src/webapp/lenya/pubs/blog/xslt/entry/body.xsl b/src/webapp/lenya/pubs/blog/xslt/entry/body.xsl
deleted file mode 100644
index 4996034..0000000
--- a/src/webapp/lenya/pubs/blog/xslt/entry/body.xsl
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:echo="http://purl.org/atom/ns#"
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:ent="http://www.purl.org/NET/ENT/1.0/"
->
-
-<xsl:template match="echo:entry">
-  <div class="dateline"><xsl:value-of select="echo:issued"/></div>
-  <xsl:apply-templates select="echo:title"><xsl:with-param name="id" select="echo:id"/></xsl:apply-templates>
-  <xsl:apply-templates select="echo:summary"/>
-  <xsl:apply-templates select="echo:content"/>
-  <br />
-  <p class="issued">
-  <strong>Posted <xsl:apply-templates select="echo:author"/> at <xsl:value-of select="echo:issued"/>&#160;|&#160;<xsl:call-template name="permalink"><xsl:with-param name="id" select="echo:id"/></xsl:call-template></strong>
-  </p>
-</xsl:template>
-
-
-<xsl:template match="echo:title">
-  <div class="title"><xsl:value-of select="."/></div>
-</xsl:template>
-
-
-<xsl:template match="echo:summary">
-  <em><xsl:copy-of select="node()"/></em>
-</xsl:template>
-
-<xsl:template match="echo:content[@type='application/xhtml+xml']">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="echo:content">
-<p>
-  <xsl:apply-templates/>
-</p>
-</xsl:template>
-
-<xsl:template match="echo:author">
-by
-<xsl:choose>
-<xsl:when test="echo:homepage">
-<a href="{echo:homepage}"><xsl:value-of select="echo:name"/></a>
-</xsl:when>
-<xsl:otherwise>
-<xsl:value-of select="echo:name"/>
-</xsl:otherwise>
-</xsl:choose>
-</xsl:template>
-
-<xsl:template name="permalink">
-  <a href="index.html">Permalink</a>
-</xsl:template>
-
-<xsl:template match="*[namespace-uri() = '']">
-  <xsl:element name="{local-name()}" namespace="http://www.w3.org/1999/xhtml">
-    <xsl:apply-templates select="@*|node()"/>
-  </xsl:element>
-</xsl:template>
- 
-</xsl:stylesheet>  
diff --git a/src/webapp/lenya/pubs/blog/xslt/entry/bxe.xsl b/src/webapp/lenya/pubs/blog/xslt/entry/bxe.xsl
deleted file mode 100644
index d6a426d..0000000
--- a/src/webapp/lenya/pubs/blog/xslt/entry/bxe.xsl
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
- xmlns:echo="http://purl.org/atom/ns#"
->
-
-<xsl:template match="/">
-    <div>Echo/Atom</div>
-    <xsl:apply-templates select="/echo:entry"/>
-</xsl:template>
-
-<xsl:template match="*">
-    <xsl:copy-of select="."/>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/pubs/blog/xslt/entry/introspection.xsl b/src/webapp/lenya/pubs/blog/xslt/entry/introspection.xsl
deleted file mode 100644
index 0a8ef67..0000000
--- a/src/webapp/lenya/pubs/blog/xslt/entry/introspection.xsl
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
->
-
-<xsl:param name="editURL" select="'http://no-such-url'"/>
-
-<xsl:template match="atom:introspection" xmlns:atom="http://purl.org/atom/ns#">
-  <introspection xmlns="http://purl.org/atom/ns#">
-    <xsl:apply-templates/>
-    <edit-entry><xsl:value-of select="$editURL"/></edit-entry>
-  </introspection>
-</xsl:template>
-
-<xsl:template match="@*|node()">
-  <xsl:copy>
-    <xsl:apply-templates select="@*|node()"/>
-  </xsl:copy>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/pubs/blog/xslt/entry/main-authoring.xsl b/src/webapp/lenya/pubs/blog/xslt/entry/main-authoring.xsl
deleted file mode 100644
index c9489e9..0000000
--- a/src/webapp/lenya/pubs/blog/xslt/entry/main-authoring.xsl
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
->
-
-<xsl:import href="body.xsl"/>
- 
-<xsl:include href="../global.xsl"/>
-
-</xsl:stylesheet>  
diff --git a/src/webapp/lenya/pubs/blog/xslt/entry/main-live.xsl b/src/webapp/lenya/pubs/blog/xslt/entry/main-live.xsl
deleted file mode 100644
index c9489e9..0000000
--- a/src/webapp/lenya/pubs/blog/xslt/entry/main-live.xsl
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
->
-
-<xsl:import href="body.xsl"/>
- 
-<xsl:include href="../global.xsl"/>
-
-</xsl:stylesheet>  
diff --git a/src/webapp/lenya/pubs/blog/xslt/feed/body.xsl b/src/webapp/lenya/pubs/blog/xslt/feed/body.xsl
deleted file mode 100644
index 5a5cb92..0000000
--- a/src/webapp/lenya/pubs/blog/xslt/feed/body.xsl
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:echo="http://purl.org/atom/ns#"
-  xmlns:ent="http://www.purl.org/NET/ENT/1.0/"
-  xmlns="http://www.w3.org/1999/xhtml"
->
-
-<xsl:import href="../entry/body.xsl"/>
-
-<xsl:template match="echo:title">
-  <xsl:param name="id"/>
-
-  <xsl:variable name="lenyaEntryID">
-    <xsl:call-template name="get-lenya-id">
-      <xsl:with-param name="entry-id" select="$id"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <div class="title"><a href="{$lenyaEntryID}"><xsl:apply-templates/></a></div>
-</xsl:template>
-
-
-<xsl:template name="permalink">
-  <xsl:param name="id"/>
-
-  <xsl:variable name="lenyaEntryID">
-    <xsl:call-template name="get-lenya-id">
-      <xsl:with-param name="entry-id" select="$id"/>
-    </xsl:call-template>
-  </xsl:variable>
-
-  <a href="{$lenyaEntryID}">Permalink</a>
-</xsl:template>
-
-
-<xsl:template name="get-lenya-id">
-  <xsl:param name="entry-id"/>
-
-  <xsl:variable name="id" select="substring-after($entry-id,',')"/>
-
-  <xsl:variable name="bar">../../entries/<xsl:value-of select="translate($id,':','/')"/>/index.html</xsl:variable>
-  <xsl:value-of select="$bar"/>
- 
-</xsl:template>
-
-</xsl:stylesheet>  
diff --git a/src/webapp/lenya/pubs/blog/xslt/feed/main-authoring.xsl b/src/webapp/lenya/pubs/blog/xslt/feed/main-authoring.xsl
deleted file mode 100644
index 7d72b55..0000000
--- a/src/webapp/lenya/pubs/blog/xslt/feed/main-authoring.xsl
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: main-authoring.xsl,v 1.5 2004/03/13 12:31:33 gregor Exp $ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
->
-
-<xsl:include href="../global.xsl"/>
-
-<xsl:include href="body.xsl"/>
-
-</xsl:stylesheet>  
diff --git a/src/webapp/lenya/pubs/blog/xslt/feed/main-live.xsl b/src/webapp/lenya/pubs/blog/xslt/feed/main-live.xsl
deleted file mode 100644
index 6e5ac64..0000000
--- a/src/webapp/lenya/pubs/blog/xslt/feed/main-live.xsl
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: main-live.xsl,v 1.5 2004/03/13 12:31:33 gregor Exp $ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
->
-
-<xsl:include href="../global.xsl"/>
-
-<xsl:include href="body.xsl"/>
-
-</xsl:stylesheet>  
diff --git a/src/webapp/lenya/pubs/blog/xslt/feed/xinclude.xsl b/src/webapp/lenya/pubs/blog/xslt/feed/xinclude.xsl
deleted file mode 100644
index d6807ac..0000000
--- a/src/webapp/lenya/pubs/blog/xslt/feed/xinclude.xsl
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0" 
-                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:xi="http://www.w3.org/2001/XInclude"
-  >
-
-<xsl:param name="feedid"/>
-<xsl:param name="area"/>
-
-<xsl:template match="/">
-  <xsl:apply-templates select="dir:directory" xmlns:dir="http://apache.org/cocoon/directory/2.0"/>
-</xsl:template>                                                                                                                             
-<xsl:template match="dir:directory" xmlns:dir="http://apache.org/cocoon/directory/2.0">
-<echo:feed xmlns:echo="http://purl.org/atom/ns#" xmlns="http://www.w3.org/1999/xhtml" version="0.3" xml:lang="en">
-  <xi:include href="content/{$area}/feeds/{$feedid}/index.xml#xmlns(atom=http://purl.org/atom/ns#)xpointer(/atom:feed/atom:title)"/>
-  <xi:include href="content/{$area}/feeds/{$feedid}/index.xml#xmlns(atom=http://purl.org/atom/ns#)xpointer(/atom:feed/atom:link)"/>
-  <xi:include href="content/{$area}/feeds/{$feedid}/index.xml#xmlns(atom=http://purl.org/atom/ns#)xpointer(/atom:feed/atom:modified)"/>
-
-  <xsl:for-each select="dir:directory">
-    <xsl:variable name="year"><xsl:value-of select="@name"/></xsl:variable>
-    <xsl:for-each select="dir:directory">
-      <xsl:variable name="month"><xsl:value-of select="@name"/></xsl:variable>
-      <xsl:for-each select="dir:directory">
-        <xsl:variable name="day"><xsl:value-of select="@name"/></xsl:variable>
-        <xsl:for-each select="dir:directory">
-          <xsl:variable name="entryid"><xsl:value-of select="@name"/></xsl:variable>
-            <xi:include href="content/{$area}/entries/{$year}/{$month}/{$day}/{$entryid}/index.xml"/>
-        </xsl:for-each>
-      </xsl:for-each>
-    </xsl:for-each>
-  </xsl:for-each>
-</echo:feed>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/pubs/blog/xslt/global.xsl b/src/webapp/lenya/pubs/blog/xslt/global.xsl
deleted file mode 100644
index 0fec4bc..0000000
--- a/src/webapp/lenya/pubs/blog/xslt/global.xsl
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: global.xsl,v 1.18 2004/04/24 20:59:15 gregor Exp $ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:echo="http://purl.org/atom/ns#"
->
-
-<xsl:param name="relative2root"/>
-<xsl:param name="contextprefix"/>
-
-<xsl:template match="cmsbody">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<link rel="service.edit" type="application/x.atom+xml" href="introspection.xml" title="AtomAPI"/>
-<link rel="stylesheet" type="text/css" href="{$contextprefix}/blog/live/css/styles.css" title="default css"/>
-<title>
-  <xsl:value-of select="echo:feed/echo:title"/>
-</title>
-</head>
-
-<body>
-<table border="0" cellpadding="0" cellspacing="0" width="100%">
-<tr>
-<td colspan="2" id="title">
-  <a href="{$relative2root}/index.html">
-    <xsl:value-of select="echo:feed/echo:title"/>
-  </a>
-</td>
-</tr>
-<tr>
-<td colspan="2" id="subtitle">
-    XML and beyond <!-- subtitle has been removed from Atom specification -->
-</td>
-</tr>
-
-<tr>
-<td valign="top" id="content" width="70%">
-    <xsl:if test="not(echo:feed/echo:entry)">
-    <p>
-    No entries yet!
-    </p>
-    <h3>Add new entry</h3>
-    <p>
-    To create a new entry click on the <strong>File</strong> menu above and select the menu item <strong>Add new entry</strong>. Enter <strong>id</strong> and <strong>title</strong> and a new entry will be created.
-    </p>
-    <h3>Edit entry</h3>
-    <p>
-    To edit an entry click on the title of the entry. On the entry page click on the <strong>File</strong> menu and select the menu item <strong>Edit with ...</strong>.
-    </p>
-    <h3>Publish entry</h3>
-    <p>
-    To publish an entry click on the <strong>File</strong> menu and select the menu item <strong>Publish</strong>.
-    </p>
-    </xsl:if>
-
-    <xsl:apply-templates select="echo:feed/echo:entry"/>
-</td>
-
-<td valign="top" id="sidebar" width="30%">
-
-<xsl:apply-templates select="sidebar/block" mode="atom"/>
-</td>
-</tr>
-
-<tr>
-<td colspan="2" id="footer">
-Copyright &#169; 2003 The Apache Software Foundation. All rights reserved.
-</td>
-</tr>
-</table>
-</body>
-</html>
-</xsl:template>
-
-<xsl:template match="block" mode="atom">
-<div class="sidebar-title"><xsl:value-of select="title"/></div>
-<xsl:apply-templates select="content" mode="sidebar"/>
-</xsl:template>
-
-<xsl:template match="content" mode="sidebar">
-<div class="sidebar-content">
-<xsl:copy-of select="@*|node()"/>
-</div>
-</xsl:template>
- 
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/pubs/default/config/ac/ac.xconf b/src/webapp/lenya/pubs/default/config/ac/ac.xconf
deleted file mode 100644
index a9ee4b8..0000000
--- a/src/webapp/lenya/pubs/default/config/ac/ac.xconf
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<access-controller type="bypassable">
-  
-  <accreditable-manager type="file">
-    <parameter name="directory" value="context:///lenya/pubs/default/config/ac/passwd"/>
-
-    <user-manager>
-       <user-type class="org.apache.lenya.ac.file.FileUser" create-use-case="userAddUser">Local User</user-type>
-       <!-- uncomment the following line if you want LDAP support -->
-       <!-- <user-type class="org.apache.lenya.ac.ldap.LDAPUser" create-use-case="userAddUserLdap">LDAP User</user-type> -->
-    </user-manager>
-  </accreditable-manager>
-  
-  <policy-manager type="document">
-    <policy-manager type="file">
-      <parameter name="directory" value="context:///lenya/pubs/default/config/ac/policies"/>
-    </policy-manager>
-  </policy-manager>
-  
-  <authorizer type="policy"/>
-  
-  <authorizer type="usecase">
-  	<parameter name="configuration" value="context:///lenya/pubs/default/config/ac/usecase-policies.xml"/>
-  </authorizer>
-  
-  <authorizer type="workflow"/>
-  
-</access-controller>
diff --git a/src/webapp/lenya/pubs/default/config/ac/passwd/admin.gml b/src/webapp/lenya/pubs/default/config/ac/passwd/admin.gml
deleted file mode 100644
index fb49860..0000000
--- a/src/webapp/lenya/pubs/default/config/ac/passwd/admin.gml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: admin.gml,v 1.6 2004/03/13 12:34:15 gregor Exp $ -->
-
-<group class="org.apache.lenya.ac.file.FileGroup" id="admin"/>
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/default/config/ac/passwd/admin.rml b/src/webapp/lenya/pubs/default/config/ac/passwd/admin.rml
deleted file mode 100644
index 0097f6a..0000000
--- a/src/webapp/lenya/pubs/default/config/ac/passwd/admin.rml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: admin.rml,v 1.5 2004/03/13 12:34:15 gregor Exp $ -->
-
-<role class="org.apache.lenya.ac.file.FileRole" id="admin"/>
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/default/config/ac/passwd/alice.iml b/src/webapp/lenya/pubs/default/config/ac/passwd/alice.iml
deleted file mode 100644
index 52b922f..0000000
--- a/src/webapp/lenya/pubs/default/config/ac/passwd/alice.iml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: alice.iml,v 1.2 2004/03/13 12:34:15 gregor Exp $ -->
-
-<identity id="alice" class="org.apache.lenya.ac.file.FileUser">
-  <name>Alice</name>
-  <description></description>
-  <email>alice@lenya.org</email>
-  <password type="md5">8e07dafd13495561db9063ebe4db4b27</password>
-  <groups>
-    <group>editor</group>
-    <group>reviewer</group>
-  </groups>
-</identity>
diff --git a/src/webapp/lenya/pubs/default/config/ac/passwd/cifs.properties.sample b/src/webapp/lenya/pubs/default/config/ac/passwd/cifs.properties.sample
deleted file mode 100644
index e37ad78..0000000
--- a/src/webapp/lenya/pubs/default/config/ac/passwd/cifs.properties.sample
+++ /dev/null
@@ -1,5 +0,0 @@
-# the name of the domain controller (or samba sever) to authenticate against

-domain-controller=my-domain-controller

-

-# domain/workgroup name to use

-domain=WORKGROUP
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/default/config/ac/passwd/edit.rml b/src/webapp/lenya/pubs/default/config/ac/passwd/edit.rml
deleted file mode 100644
index 99b0c28..0000000
--- a/src/webapp/lenya/pubs/default/config/ac/passwd/edit.rml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-  Copyright 1999-2004 The Apache Software Foundation

-

-  Licensed 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.

--->

-

-<!-- $Id$ -->

-

-<role class="org.apache.lenya.ac.file.FileRole" id="edit"/>
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/default/config/ac/passwd/editor.gml b/src/webapp/lenya/pubs/default/config/ac/passwd/editor.gml
deleted file mode 100644
index 0f65221..0000000
--- a/src/webapp/lenya/pubs/default/config/ac/passwd/editor.gml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: editor.gml,v 1.6 2004/03/13 12:34:15 gregor Exp $ -->
-
-<group class="org.apache.lenya.ac.file.FileGroup" id="editor"/>
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/default/config/ac/passwd/ldap.properties.sample b/src/webapp/lenya/pubs/default/config/ac/passwd/ldap.properties.sample
deleted file mode 100644
index ca2654c..0000000
--- a/src/webapp/lenya/pubs/default/config/ac/passwd/ldap.properties.sample
+++ /dev/null
@@ -1,54 +0,0 @@
-#############################################################################
-# File: ldap.properties.sample
-# $Id$
-#############################################################################
-
-#############################################################################
-# General settings 
-#############################################################################
-provider-url=ldaps://ldap.example.com:636/dc=example,dc=com
-base-dn=dc=example,dc=com
-
-#############################################################################
-# User parameters for authentication:
-# usr-branch: 
-#      if users are to be taken from a specific branch, set this.
-#      If you set this to empty, users will be searched in the whole 
-#      subtree, i.e.:
-#         usr-branch=
-# usr-authentication:
-#      authentication method when the user authenticates
-# domain-name:
-#      AFAIK, this is only relevant for MS Active Directory
-#############################################################################
-#usr-branch=ou=People
-usr-branch=
-usr-attr=uid
-usr-name-attr=sn
-usr-authentication=simple
-domain-name=
-
-############################################################################
-# Security settings
-# -----------------
-# security-authentication:
-#       you can set this to none if there is no manager authentication, i.e.:
-#         security-authentication=none
-# mgr-dn and mgr-pw:
-#       Manager/user which is allowed to retrieve a list of "all" users
-#       (fullname) from LDAP server. Leave it empty for anonymous bindings.
-# key-store:
-#       - If you do not use ssl, you can comment out this property.
-#       - keystore is taken relatively to the publication config/ac/passwd
-#       directory. You should put the Directory-Server certificate in this 
-#       file, if using ssl. 
-#       The keystore file can be generated as follows:
-#          keytool -import -keystore .keystore -file <ca_cert_file> 
-#                    -alias <yourdomain.com>
-#       
-############################################################################
-security-authentication=simple
-mgr-dn=
-mgr-pw=
-key-store=.keystore
-security-protocol=ssl
diff --git a/src/webapp/lenya/pubs/default/config/ac/passwd/lenya.iml b/src/webapp/lenya/pubs/default/config/ac/passwd/lenya.iml
deleted file mode 100644
index 9f6203a..0000000
--- a/src/webapp/lenya/pubs/default/config/ac/passwd/lenya.iml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: lenya.iml,v 1.8 2004/03/13 12:34:15 gregor Exp $ -->
-
-<identity id="lenya" class="org.apache.lenya.ac.file.FileUser">
-  <name>Levi Vanya</name>
-  <description></description>
-  <email>levi.vanya@wyona.org</email>
-  <password type="md5">8e07dafd13495561db9063ebe4db4b27</password>
-  <groups>
-    <group>editor</group>
-    <group>admin</group>
-  </groups>
-</identity>
diff --git a/src/webapp/lenya/pubs/default/config/ac/passwd/localhost.ipml b/src/webapp/lenya/pubs/default/config/ac/passwd/localhost.ipml
deleted file mode 100644
index dfd01a4..0000000
--- a/src/webapp/lenya/pubs/default/config/ac/passwd/localhost.ipml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: localhost.ipml,v 1.5 2004/03/13 12:34:15 gregor Exp $ -->
-
-<ip-range class="org.apache.lenya.ac.file.FileIPRange" id="localhost">
-  <name>Localhost</name>
-  <network-address>127.0.0.1</network-address>
-  <subnet-mask>255.255.255.0</subnet-mask>
-</ip-range>
diff --git a/src/webapp/lenya/pubs/default/config/ac/passwd/review.rml b/src/webapp/lenya/pubs/default/config/ac/passwd/review.rml
deleted file mode 100644
index 27f3774..0000000
--- a/src/webapp/lenya/pubs/default/config/ac/passwd/review.rml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-  Copyright 1999-2004 The Apache Software Foundation

-

-  Licensed 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.

--->

-

-<!-- $Id$ -->

-

-<role class="org.apache.lenya.ac.file.FileRole" id="review"/>
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/default/config/ac/passwd/reviewer.gml b/src/webapp/lenya/pubs/default/config/ac/passwd/reviewer.gml
deleted file mode 100644
index b3bee7f..0000000
--- a/src/webapp/lenya/pubs/default/config/ac/passwd/reviewer.gml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: reviewer.gml,v 1.6 2004/03/13 12:34:15 gregor Exp $ -->
-
-<group class="org.apache.lenya.ac.file.FileGroup" id="reviewer"/>
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/default/config/ac/passwd/visit.rml b/src/webapp/lenya/pubs/default/config/ac/passwd/visit.rml
deleted file mode 100644
index 1bb7336..0000000
--- a/src/webapp/lenya/pubs/default/config/ac/passwd/visit.rml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-  Copyright 1999-2004 The Apache Software Foundation

-

-  Licensed 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.

--->

-

-<!-- $Id$ -->

-

-<role class="org.apache.lenya.ac.file.FileRole" id="visit"/>
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/default/config/ac/policies/admin/subtree-policy.acml b/src/webapp/lenya/pubs/default/config/ac/policies/admin/subtree-policy.acml
deleted file mode 100644
index cbe9cdb..0000000
--- a/src/webapp/lenya/pubs/default/config/ac/policies/admin/subtree-policy.acml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: subtree-policy.acml,v 1.3 2004/03/13 12:34:18 gregor Exp $ -->
-
-<policy xmlns="http://apache.org/cocoon/lenya/ac/1.0">
-
-  <group id="admin">
-    <role id="admin"/>
-  </group>
-
-</policy> 
diff --git a/src/webapp/lenya/pubs/default/config/ac/policies/admin/users/alice.html/subtree-policy.acml b/src/webapp/lenya/pubs/default/config/ac/policies/admin/users/alice.html/subtree-policy.acml
deleted file mode 100644
index a3bb7d6..0000000
--- a/src/webapp/lenya/pubs/default/config/ac/policies/admin/users/alice.html/subtree-policy.acml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<ac:policy xmlns:ac="http://apache.org/cocoon/lenya/ac/1.0" ssl="false">

-  <ac:user id="alice">

-    <ac:role id="edit"/>

-  </ac:user>

-</ac:policy>

diff --git a/src/webapp/lenya/pubs/default/config/ac/policies/admin/users/lenya.html/subtree-policy.acml b/src/webapp/lenya/pubs/default/config/ac/policies/admin/users/lenya.html/subtree-policy.acml
deleted file mode 100644
index 26953da..0000000
--- a/src/webapp/lenya/pubs/default/config/ac/policies/admin/users/lenya.html/subtree-policy.acml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0"?>

-<policy xmlns="http://apache.org/cocoon/lenya/ac/1.0">

-

-  <user id="lenya">

-    <role id="edit"/>

-  </user>

-

-</policy> 

diff --git a/src/webapp/lenya/pubs/default/config/ac/policies/authoring/subtree-policy.acml b/src/webapp/lenya/pubs/default/config/ac/policies/authoring/subtree-policy.acml
deleted file mode 100644
index 2bfe815..0000000
--- a/src/webapp/lenya/pubs/default/config/ac/policies/authoring/subtree-policy.acml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: subtree-policy.acml,v 1.3 2004/03/13 12:34:17 gregor Exp $ -->
-
-<policy xmlns="http://apache.org/cocoon/lenya/ac/1.0">
-
-  <group id="editor">
-    <role id="edit"/>
-  </group>
-
-  <group id="reviewer">
-    <role id="review"/>
-  </group>
-
-</policy> 
diff --git a/src/webapp/lenya/pubs/default/config/ac/policies/index.html/url-policy.acml b/src/webapp/lenya/pubs/default/config/ac/policies/index.html/url-policy.acml
deleted file mode 100644
index f306cef..0000000
--- a/src/webapp/lenya/pubs/default/config/ac/policies/index.html/url-policy.acml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: url-policy.acml,v 1.3 2004/03/13 12:34:15 gregor Exp $ -->
-
-<policy xmlns="http://apache.org/cocoon/lenya/ac/1.0">
-
-  <world>
-    <role id="visit"/>
-  </world>
-
-</policy> 
diff --git a/src/webapp/lenya/pubs/default/config/ac/policies/info/subtree-policy.acml b/src/webapp/lenya/pubs/default/config/ac/policies/info/subtree-policy.acml
deleted file mode 100644
index 2bfe815..0000000
--- a/src/webapp/lenya/pubs/default/config/ac/policies/info/subtree-policy.acml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: subtree-policy.acml,v 1.3 2004/03/13 12:34:17 gregor Exp $ -->
-
-<policy xmlns="http://apache.org/cocoon/lenya/ac/1.0">
-
-  <group id="editor">
-    <role id="edit"/>
-  </group>
-
-  <group id="reviewer">
-    <role id="review"/>
-  </group>
-
-</policy> 
diff --git a/src/webapp/lenya/pubs/default/config/ac/policies/introduction.html/subtree-policy.acml b/src/webapp/lenya/pubs/default/config/ac/policies/introduction.html/subtree-policy.acml
deleted file mode 100644
index e2b2fea..0000000
--- a/src/webapp/lenya/pubs/default/config/ac/policies/introduction.html/subtree-policy.acml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: subtree-policy.acml,v 1.3 2004/03/13 12:34:18 gregor Exp $ -->
-
-<policy xmlns="http://apache.org/cocoon/lenya/ac/1.0">
-
-  <world>
-    <role id="visit"/>
-  </world>
-
-</policy> 
diff --git a/src/webapp/lenya/pubs/default/config/ac/policies/live/subtree-policy.acml b/src/webapp/lenya/pubs/default/config/ac/policies/live/subtree-policy.acml
deleted file mode 100644
index e2b2fea..0000000
--- a/src/webapp/lenya/pubs/default/config/ac/policies/live/subtree-policy.acml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: subtree-policy.acml,v 1.3 2004/03/13 12:34:18 gregor Exp $ -->
-
-<policy xmlns="http://apache.org/cocoon/lenya/ac/1.0">
-
-  <world>
-    <role id="visit"/>
-  </world>
-
-</policy> 
diff --git a/src/webapp/lenya/pubs/default/config/ac/policies/url-policy.acml b/src/webapp/lenya/pubs/default/config/ac/policies/url-policy.acml
deleted file mode 100644
index 5fa7ea4..0000000
--- a/src/webapp/lenya/pubs/default/config/ac/policies/url-policy.acml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: url-policy.acml,v 1.3 2004/03/13 12:34:17 gregor Exp $ -->
-
-<policy xmlns="http://apache.org/cocoon/lenya/ac/1.0">
-
-  <world>
-    <role id="visit"/>
-  </world>
-
-</policy> 
diff --git a/src/webapp/lenya/pubs/default/config/ac/usecase-policies.xml b/src/webapp/lenya/pubs/default/config/ac/usecase-policies.xml
deleted file mode 100644
index 0b20053..0000000
--- a/src/webapp/lenya/pubs/default/config/ac/usecase-policies.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-    
-<usecases xmlns="http://apache.org/cocoon/lenya/ac/1.0">
-	<usecase id="create">
-		<role id="edit"/>
-	</usecase>
-    <usecase id="archive">
-        <role id="edit"/>
-    </usecase>
-    <usecase id="delete">
-        <role id="edit"/>
-    </usecase>
-    <usecase id="restore">
-        <role id="edit"/>
-    </usecase>
-
-	<usecase id="userChangeProfile"><role id="edit"/><role id="admin"/></usecase>
-	<usecase id="userChangePasswordUser"><role id="edit"/></usecase>
-	<usecase id="userChangePasswordAdmin"><role id="admin"/></usecase>
-	<usecase id="userChangeGroups"><role id="admin"/></usecase>
-
-</usecases>
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/default/config/instantiator.xconf b/src/webapp/lenya/pubs/default/config/instantiator.xconf
deleted file mode 100644
index 82357a3..0000000
--- a/src/webapp/lenya/pubs/default/config/instantiator.xconf
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: usecase.xmap 158794 2005-03-23 16:21:15Z andreas $ -->
-<!--
-    This file defines the publication specific template instantiator
--->
-
-  <xconf xpath="/cocoon/template-instantiators" unless="/cocoon/template-instantiators/component-instance[@name = 'default']">
-
-    <component-instance name="default"
-                        logger="lenya.publication.templating"
-                        class="org.apache.lenya.defaultpub.cms.publication.templating.Instantiator"/>
-
-  </xconf>
diff --git a/src/webapp/lenya/pubs/default/config/menus/generic.xsp b/src/webapp/lenya/pubs/default/config/menus/generic.xsp
deleted file mode 100644
index 54531b6..0000000
--- a/src/webapp/lenya/pubs/default/config/menus/generic.xsp
+++ /dev/null
@@ -1,155 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: generic.xsp 155806 2005-03-01 17:55:42Z andreas $ -->
-
-<xsp:page 
-    language="java" 
-    xmlns:xsp="http://apache.org/xsp"
-    xmlns:xsp-request="http://apache.org/xsp/request/2.0"
-    xmlns:input="http://apache.org/cocoon/xsp/input/1.0"
-    xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-    xmlns:wf="http://apache.org/cocoon/lenya/workflow/1.0"
-    xmlns:uc="http://apache.org/cocoon/lenya/usecase/1.0"
-    xmlns="http://apache.org/cocoon/lenya/menubar/1.0"
->
-
-  <xsp:structure>
-    <xsp:include>org.apache.lenya.cms.publication.Document</xsp:include>
-    <xsp:include>org.apache.lenya.cms.publication.Publication</xsp:include>
-  </xsp:structure>
-  
-  <menu>
-
-    <xsp:logic>
-      String documentId = <input:get-attribute module="page-envelope" as="string" name="context-prefix"/> + "/" + <input:get-attribute module="page-envelope" as="string" name="publication-id"/> + "/authoring" + <input:get-attribute module="page-envelope" as="string" name="document-id"/> + "_" + <input:get-attribute module="page-envelope" as="string" name="document-language"/>;
-      String area = <input:get-attribute module="page-envelope" as="string" name="area"/>;
-      
-      Object documentObject = <input:get-attribute as="object" module="page-envelope" name="document"/>;
-      Document document = null;
-      if (documentObject != null &amp;&amp; !"".equals(documentObject)) {
-          document = (Document) documentObject;
-      }
-
-      boolean isDocument = false;
-      String docType = "";
-      try {
-          if (document != null &amp;&amp; document.exists()) {
-              isDocument = true;
-              docType = <input:get-attribute as="string" module="page-envelope" name="document-type"/>;
-          }
-      }
-      catch (Exception e) {
-          throw new ProcessingException(e);
-      }
-    </xsp:logic>
-    
-    <menus>
-      <menu i18n:attr="name" name="File">
-        <block>
-          <item uc:usecase="site.create" href="?doctype=xhtml"><i18n:text>XHTML Document</i18n:text></item>
-          <item uc:usecase="site.create" href="?doctype=links"><i18n:text>Links Document</i18n:text></item>
-        </block>
-        <block>
-          <item uc:usecase="site.createLanguage" href="?"><i18n:text>New Language Version</i18n:text></item>
-          <item uc:usecase="site.deleteLanguage" href="?"><i18n:text>Remove Language Version</i18n:text></item>
-        </block>
-        <block>
-          <item uc:usecase="ac.logout" href="?"><i18n:text>Logout</i18n:text></item>
-        </block>
-      </menu>
-      
-      <menu i18n:attr="name" name="Edit">
-        
-        <block info="false">
-          <item wf:event="edit" uc:usecase="kupu" uc:step="open" href="?"><i18n:text>With Kupu</i18n:text></item>
-          <item wf:event="edit" uc:usecase="edit.bxe" href="?"><i18n:text>With BXE</i18n:text></item>
-          <item wf:event="edit" uc:usecase="edit.forms"><xsp:attribute name="href"><xsp:expr>"?form=" + docType</xsp:expr></xsp:attribute><i18n:text>With Forms</i18n:text></item>
-          <item wf:event="edit" uc:usecase="edit.oneform" href="?"><i18n:text>With one Form</i18n:text></item>
-        </block>
-        
-        <block info="false">
-          <item wf:event="edit" uc:usecase="tab.meta"><xsp:attribute name="href"><xsp-request:get-context-path/>/<input:get-attribute module="page-envelope" as="string" name="publication-id"/>/info-<input:get-attribute module="page-envelope" as="string" name="area"/><input:get-attribute module="page-envelope" as="string" name="document-url"/>?</xsp:attribute><i18n:text>Edit Metadata</i18n:text></item>
-          <item wf:event="edit" uc:usecase="site.changeLabel" href="?"><i18n:text>Edit Navigation Title</i18n:text></item>
-        </block>
-
-        <block authoring="false">
-          <item uc:usecase="site.cut" href="?"><i18n:text>Cut</i18n:text></item>
-          <item uc:usecase="site.copy" href="?"><i18n:text>Copy</i18n:text></item>
-          <item uc:usecase="site.paste" href="?"><i18n:text>Paste</i18n:text></item>
-        </block>
-        
-        
-      <block authoring="false">
-        <item uc:usecase="site.changeNodeID" href="?"><i18n:text>Rename URL</i18n:text></item>
-        <item uc:usecase="site.changeLabel" href="?"><i18n:text>Edit Navigation Title</i18n:text></item>
-      </block>
-      <block authoring="false">
-        <item uc:usecase="site.nudge" href="?direction=up"><i18n:text>Move Up</i18n:text></item>
-        <item uc:usecase="site.nudge" href="?direction=down"><i18n:text>Move Down</i18n:text></item>
-      </block>
-      <block authoring="false">
-        
-        <xsp:logic>
-               {
-               
-                 if (isDocument &amp;&amp;
-                   !"/index".equals(<input:get-attribute module="page-envelope" as="string" name="document-id"/>)) {
-            <item wf:event="delete" uc:usecase="site.delete" href="?"><i18n:text>Delete</i18n:text></item>
-            <item wf:event="archive" uc:usecase="site.archive" href="?"><i18n:text>Archive</i18n:text></item>
-                 }
-                 else {
-            <item><i18n:text>Delete</i18n:text></item>
-            <item><i18n:text>Archive</i18n:text></item>
-                 }
-               
-                if (isDocument &amp;&amp; (area.equals(Publication.TRASH_AREA) || area.equals(Publication.ARCHIVE_AREA))) {
-            <item wf:event="restore" uc:usecase="restore" uc:step="showscreen" href="?">Restore</item>
-                }
-                else {
-            <item><i18n:text>Restore</i18n:text></item>
-                }
-              }
-        </xsp:logic>
-        
-      </block>
-        
-      </menu>
-      
-      <menu i18n:attr="name" name="Workflow">
-        <block>
-          <item uc:usecase="workflow.submit" wf:event="submit" href="?"><i18n:text>Submit</i18n:text></item>
-          <item uc:usecase="workflow.reject" wf:event="reject" href="?"><i18n:text>Reject</i18n:text></item>
-          <item uc:usecase="workflow.publish" href="?"><i18n:text>Publish</i18n:text></item>
-          <item uc:usecase="workflow.deactivate" href="?"><i18n:text>Deactivate</i18n:text></item>
-       </block>
-      </menu>
-
-      <menu i18n:attr="name" name="Help">
-        <block>
-        <item href="http://lenya.apache.org/docs/index.html"><i18n:text>Documentation</i18n:text></item>
-        <item href="http://wiki.apache.org/lenya/"><i18n:text>Wiki</i18n:text></item>
-        </block>
-        <block>
-          <item><xsp:attribute name="href"><xsp-request:get-context-path/>/index.html</xsp:attribute><i18n:text>Apache Lenya Homepage</i18n:text></item>
-          <item><xsp:attribute name="href"><xsp-request:get-context-path/>/about.html</xsp:attribute><i18n:text>About Apache Lenya</i18n:text></item>
-        </block>
-      </menu>
-    </menus>
-    
-  </menu>
-</xsp:page>
diff --git a/src/webapp/lenya/pubs/default/config/menus/links.xsp b/src/webapp/lenya/pubs/default/config/menus/links.xsp
deleted file mode 100644
index 4b1ed40..0000000
--- a/src/webapp/lenya/pubs/default/config/menus/links.xsp
+++ /dev/null
@@ -1,102 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsp:page 
-    language="java" 
-    xmlns:xsp="http://apache.org/xsp"
-    xmlns:xsp-request="http://apache.org/xsp/request/2.0"
-    xmlns:input="http://apache.org/cocoon/xsp/input/1.0"
-    xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-    xmlns:wf="http://apache.org/cocoon/lenya/workflow/1.0"
-    xmlns:uc="http://apache.org/cocoon/lenya/usecase/1.0"
-    xmlns="http://apache.org/cocoon/lenya/menubar/1.0"
->
-
-  <xsp:structure>
-    <xsp:include>org.apache.lenya.cms.publication.Document</xsp:include>
-    <xsp:include>org.apache.lenya.cms.publication.Publication</xsp:include>
-  </xsp:structure>
-  
-  <menu>
-  	
-    <xsp:logic>
-      String xmlSource = <input:get-attribute module="page-envelope" as="string" name="document-path"/>;
-      String documentId = <input:get-attribute module="page-envelope" as="string" name="context-prefix"/> + "/" + <input:get-attribute module="page-envelope" as="string" name="publication-id"/> + "/authoring" + <input:get-attribute module="page-envelope" as="string" name="document-id"/> + "_" + <input:get-attribute module="page-envelope" as="string" name="document-language"/>;
-      String urisParameter = "uris=" + <input:get-attribute module="page-envelope" as="string" name="context-prefix"/> + "/" + <input:get-attribute module="page-envelope" as="string" name="publication-id"/> + "/live" + <input:get-attribute module="page-envelope" as="string" name="document-url"/>;
-      String area = <input:get-attribute module="page-envelope" as="string" name="area"/>;
-
-      String docType = "";
-      try {
-      Document document = (Document) <input:get-attribute as="object" module="page-envelope" name="document"/>;
-          if (document.exists()) {
-              docType = <input:get-attribute as="string" module="page-envelope" name="document-type"/>;
-          }
-      }
-      catch (Exception e) {
-          throw new ProcessingException(e);
-      }
-      
-      boolean isDocument = false;
-      {
-        Object document = <input:get-attribute module="page-envelope" as="object" name="document"/>;
-        try {
-          if (document != "" &amp;&amp; ((Document) document).exists()) {
-            isDocument = true;
-          }
-        }
-        catch (Exception e) {
-          throw new ProcessingException(e);
-        }
-      }
-    </xsp:logic>
-
-    <menus>
-      <menu i18n:attr="name" name="File">
-	<block>
-	  <item uc:usecase="ac.logout" href="?"><i18n:text>Logout</i18n:text></item>
-	</block>
-      </menu>
-      
-      <menu i18n:attr="name" name="Edit">
-        
-        <block info="false">
-          <item uc:usecase="1formedit" uc:step="open" href="?"><i18n:text>Edit with one Form</i18n:text></item>
-        </block>
-      </menu>
-      
-      <menu i18n:attr="name" name="Workflow">
-      </menu>
-
-      <menu i18n:attr="name" name="Help">
-        <block>
-          <item href="http://lenya.apache.org/docs/index.html"><i18n:text>Documentation</i18n:text></item>
-          <item href="http://wiki.apache.org/lenya/"><i18n:text>Wiki</i18n:text></item>
-        </block>
-        <block>
-          <item><xsp:attribute name="href"><xsp-request:get-context-path/>/index.html</xsp:attribute><i18n:text>Apache Lenya Homepage</i18n:text></item>
-          <item><xsp:attribute name="href"><xsp-request:get-context-path/>/about.html</xsp:attribute><i18n:text>About Apache Lenya</i18n:text></item>
-        </block>
-        <block>
-          <item uc:usecase="view-logs" uc:step="overview" href="?"><i18n:text>View Task Logs</i18n:text></item>
-        </block>
-      </menu>
-    </menus>
-    
-  </menu>
-</xsp:page>
diff --git a/src/webapp/lenya/pubs/default/config/publication.xconf b/src/webapp/lenya/pubs/default/config/publication.xconf
deleted file mode 100644
index d9ed250..0000000
--- a/src/webapp/lenya/pubs/default/config/publication.xconf
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<publication>
-  <languages>
-    <language default="true">en</language>
-    <language>de</language>
-  </languages>
-  <template-instantiator name="default"/>
-  <path-mapper>org.apache.lenya.cms.publication.DefaultDocumentIdToPathMapper</path-mapper>
-  <document-builder name="default"/>
-  <breadcrumb-prefix/>
-  <site-manager name="tree"/>
-  
-  <resource-type name="xhtml" workflow="workflow.xml"/>
-  <resource-type name="homepage" workflow="workflow.xml"/>
-  <resource-type name="links" workflow="workflow.xml"/>
-  
-  <!--
-       For information about these settings, read 
-       http://lenya.apache.org/docs/1_2_x/components/deployment/proxying.html
-
-  <proxy area="live" ssl="true" url="https://www.host.com/ssl/default"/>
-  <proxy area="live" ssl="false" url="http://www.host.com/default"/>
-  <proxy area="authoring" ssl="true" url="https://www.host.com/lenya/default/authoring"/>
-  <proxy area="authoring" ssl="false" url="http://www.host.com/lenya/default/authoring"/>
-  -->
-  
-</publication>
diff --git a/src/webapp/lenya/pubs/default/config/search/lucene-live.xconf b/src/webapp/lenya/pubs/default/config/search/lucene-live.xconf
deleted file mode 100644
index 41085ca..0000000
--- a/src/webapp/lenya/pubs/default/config/search/lucene-live.xconf
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: lucene-live.xconf,v 1.2 2004/03/13 12:34:18 gregor Exp $ -->
-
-<lucene>
-  <update-index type="new"/>
-<!--
-  <update-index type="incremental"/>
--->
-
-  <index-dir src="../../work/search/lucene/index/live/index"/>
-  <htdocs-dump-dir src="../../work/search/lucene/htdocs_dump/live"/>
-
-  <indexer class="org.apache.lenya.lucene.index.DefaultIndexer"/>
-</lucene>
diff --git a/src/webapp/lenya/pubs/default/config/usecases.xconf b/src/webapp/lenya/pubs/default/config/usecases.xconf
deleted file mode 100644
index 9bb8b4c..0000000
--- a/src/webapp/lenya/pubs/default/config/usecases.xconf
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0"?>

-<!--

-  Copyright 1999-2005 The Apache Software Foundation

-

-  Licensed 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.

--->

-

-<!-- $Id: usecase.xmap 158794 2005-03-23 16:21:15Z andreas $ -->

-<!--

-    This file defines the publication specific use-cases

--->

-

-  <xconf xpath="/cocoon/usecases" unless="/cocoon/usecases/component-instance[@name = 'default/workflow.submit']">

-

-    <component-instance name="default/workflow.submit"

-                        logger="lenya.usecases.workflow"

-                        class="org.apache.lenya.cms.workflow.usecases.InvokeWorkflow">

-      <event id="submit"/>

-      <view template="workflow/submit"/>

-    </component-instance>

-                        

-    <component-instance name="default/workflow.reject"

-                        logger="lenya.usecases.workflow"

-                        class="org.apache.lenya.cms.workflow.usecases.InvokeWorkflow">

-      <event id="reject"/>

-      <view template="workflow/reject"/>

-    </component-instance>

-                        

-    <component-instance name="default/workflow.publish"

-                        logger="lenya.usecases.workflow"

-                        class="org.apache.lenya.defaultpub.cms.usecases.Publish">

-      <view template="workflow/publish"/>

-    </component-instance>

-

-    <component-instance name="default/workflow.deactivate"

-                        logger="lenya.usecases.workflow"

-                        class="org.apache.lenya.defaultpub.cms.usecases.Deactivate">

-      <view template="workflow/deactivate"/>

-    </component-instance>

-

-    <component-instance name="default/site.delete"

-                        logger="lenya.usecases.delete"

-                        class="org.apache.lenya.defaultpub.cms.usecases.Delete">

-      <view template="site/delete"/>

-    </component-instance>

-

-    <component-instance name="default/webdav.put"

-                        logger="lenya.publication"

-                        class="org.apache.lenya.defaultpub.cms.usecases.webdav.Put">

-    </component-instance>

-    

-    <component-instance name="default/webdav.filePropfind"

-                        logger="lenya.publication"

-                        class="org.apache.lenya.defaultpub.cms.usecases.webdav.FilePropfind">

-      <view template="webdav/filePropfind"/>

-    </component-instance>

-    

-    <component-instance name="default/webdav.propfind"

-                        logger="lenya.publication"

-                        class="org.apache.lenya.defaultpub.cms.usecases.webdav.Propfind">

-      <view template="webdav/propfind"/>

-    </component-instance>

-    

-    <component-instance name="default/webdav.delete"

-                        logger="lenya.usecases.delete"

-                        class="org.apache.lenya.defaultpub.cms.usecases.Delete">

-    </component-instance>

-

-  </xconf>

diff --git a/src/webapp/lenya/pubs/default/config/workflow/workflow.xml b/src/webapp/lenya/pubs/default/config/workflow/workflow.xml
deleted file mode 100644
index bc0ca89..0000000
--- a/src/webapp/lenya/pubs/default/config/workflow/workflow.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<workflow xmlns="http://apache.org/cocoon/lenya/workflow/1.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://apache.org/cocoon/lenya/workflow/1.0 ../../../../resources/entities/workflow.xsd">
-
-  <state id="authoring" initial="true"/>
-  <state id="review"/>
-  <state id="live"/>
-  <state id="trash"/>
-  <state id="archive"/>
-  
-  <variable name="is_live" value="false"/>
-  
-  <transition source="authoring" destination="review">
-    <event id="submit"/>
-    <condition class="org.apache.lenya.cms.workflow.RoleCondition">edit</condition>
-  </transition>
-        
-  <transition source="review" destination="live">
-    <event id="publish"/>
-    <condition class="org.apache.lenya.cms.workflow.RoleCondition">review</condition>
-    <assign variable="is_live" value="true"/>
-  </transition>
-        
-  <transition source="review" destination="authoring">
-    <event id="reject"/>
-    <condition class="org.apache.lenya.cms.workflow.RoleCondition">review</condition>
-  </transition>
-        
-  <transition source="live" destination="authoring">
-    <event id="edit"/>
-    <condition class="org.apache.lenya.cms.workflow.RoleCondition">edit</condition>
-  </transition>
-        
-  <transition source="authoring" destination="authoring">
-    <event id="edit"/>
-    <condition class="org.apache.lenya.cms.workflow.RoleCondition">edit</condition>
-  </transition>
-        
-  <transition source="live" destination="authoring">
-    <event id="deactivate"/>
-    <condition class="org.apache.lenya.cms.workflow.RoleCondition">review</condition>
-    <assign variable="is_live" value="false"/>
-  </transition>
-
-  <transition source="authoring" destination="trash">
-    <event id="delete"/>
-    <condition class="org.apache.lenya.cms.workflow.RoleCondition">edit</condition>
-    <assign variable="is_live" value="false"/>
-  </transition>
-
-  <transition source="authoring" destination="archive">
-    <event id="archive"/>
-    <condition class="org.apache.lenya.cms.workflow.RoleCondition">edit</condition>
-    <assign variable="is_live" value="false"/>
-  </transition>
-  
-  <transition source="archive" destination="authoring">
-    <event id="restore"/>
-    <condition class="org.apache.lenya.cms.workflow.RoleCondition">edit</condition>
-  </transition>
-  
-  <transition source="trash" destination="authoring">
-    <event id="restore"/>
-    <condition class="org.apache.lenya.cms.workflow.RoleCondition">edit</condition>
-  </transition>  
-</workflow>
diff --git a/src/webapp/lenya/pubs/default/content/archive/sitetree.xml b/src/webapp/lenya/pubs/default/content/archive/sitetree.xml
deleted file mode 100644
index b3d7a81..0000000
--- a/src/webapp/lenya/pubs/default/content/archive/sitetree.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: sitetree.xml,v 1.3 2004/03/13 14:41:03 gregor Exp $ -->
-
-<site i18n:attr="label" label="Archive" 
-  xmlns="http://apache.org/cocoon/lenya/sitetree/1.0" 
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
->
-</site>
diff --git a/src/webapp/lenya/pubs/default/content/authoring/concepts/index_de.xml b/src/webapp/lenya/pubs/default/content/authoring/concepts/index_de.xml
deleted file mode 100644
index e3e049e..0000000
--- a/src/webapp/lenya/pubs/default/content/authoring/concepts/index_de.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<html xmlns="http://www.w3.org/1999/xhtml" 
-xmlns:xhtml="http://www.w3.org/1999/xhtml" 
-xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0">
-
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-  <head>
-    <title>Konzepte</title>
-  </head>
-  <body>
-    <h1>Konzepte</h1>
-    
-    <h2>Publications</h2>
-    
-    <p>In Apache Lenya, a website is called a
-    <strong>publication</strong>.</p>
-    
-    <h2>Areas: Authoring and Live</h2>
-
-    <p>Apache Lenya separates between different areas:</p>
-    <ul>
-      <li>The authoring area is for creating and editing of
-      content. All CMS functions are available here.</li>
-
-      <li>Once the content has been published it is moved to the live
-      area. The live area can be served by a web server directly or
-      you can add another intermediate step where the content is
-      replicated from the live area to the actual web server. In any
-      case the live area simply serves as a preview to the content
-      that will be served by the web server.</li>
-    </ul>
-    
-    <h2>Document types</h2>
-
-    <p>As Apache Lenya is based on Apache Cocoon, it has strong XML and
-    XSLT foundations. It is possible to ensure that a document
-    conforms to an XML schema. Typically you define different types of
-    documents, like an news article or an opinion piece, conforming to
-    different XML schemas. These different types are referred to as
-    document types. They are used to ensure the XML schema conformance
-    when editing and typically also when preparing a presentation of
-    the document, where an opinion piece has a different layout than a
-    news article.</p>
-
-  </body>
-</html>
diff --git a/src/webapp/lenya/pubs/default/content/authoring/concepts/index_de.xml.meta b/src/webapp/lenya/pubs/default/content/authoring/concepts/index_de.xml.meta
deleted file mode 100644
index eb466d1..0000000
--- a/src/webapp/lenya/pubs/default/content/authoring/concepts/index_de.xml.meta
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-<lenya:document xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0">
-<lenya:meta>
-<lenya:internal>
-<lenya:resourceType>xhtml</lenya:resourceType>
-<lenya:contentType>xml</lenya:contentType>
-</lenya:internal>
-<lenya:dc>
-        <dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Konzepte kurz erklärt</dc:title>
-        <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Development Team</dc:creator>
-        <dc:subject xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Konzepte</dc:subject>
-        <dc:description xmlns:dc="http://purl.org/dc/elements/1.1/">Erklärt Lenya Konzepte.</dc:description>
-        <dc:publisher xmlns:dc="http://purl.org/dc/elements/1.1/">Apache Software Foundation</dc:publisher>
-        <dc:contributor xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:date xmlns:dc="http://purl.org/dc/elements/1.1/">2005-01-31</dc:date>
-        <dc:type xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:format xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:identifier xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:source xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">de</dc:language>
-        <dc:relation xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:coverage xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:rights xmlns:dc="http://purl.org/dc/elements/1.1/">Alle Rechte vorbehalten</dc:rights>
-</lenya:dc>
-</lenya:meta>
-</lenya:document>
diff --git a/src/webapp/lenya/pubs/default/content/authoring/concepts/index_en.xml b/src/webapp/lenya/pubs/default/content/authoring/concepts/index_en.xml
deleted file mode 100644
index 0793adc..0000000
--- a/src/webapp/lenya/pubs/default/content/authoring/concepts/index_en.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<html xmlns="http://www.w3.org/1999/xhtml" 
-xmlns:xhtml="http://www.w3.org/1999/xhtml" 
-xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0">
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-  <head>
-    <title>Concepts</title>
-  </head>
-  <body>
-    <h1>Concepts</h1>
-    
-    <h2>Publications</h2>
-    
-    <p>In Apache Lenya, a website is called a
-    <strong>publication</strong>.</p>
-    
-    <h2>Areas: Authoring and Live</h2>
-
-    <p>Apache Lenya separates between different areas:</p>
-    <ul>
-      <li>The authoring area is for creating and editing of
-      content. All CMS functions are available here.</li>
-
-      <li>Once the content has been published it is moved to the live
-      area. The live area can be served by a web server directly or
-      you can add another intermediate step where the content is
-      replicated from the live area to the actual web server. In any
-      case the live area simply serves as a preview to the content
-      that will be served by the web server.</li>
-    </ul>
-    
-    <h2>Document types</h2>
-
-    <p>As Apache Lenya is based on Apache Cocoon, it has strong XML and
-    XSLT foundations. It is possible to ensure that a document
-    conforms to an XML schema. Typically you define different types of
-    documents, like an news article or an opinion piece, conforming to
-    different XML schemas. These different types are referred to as
-    document types. They are used to ensure the XML schema conformance
-    when editing and typically also when preparing a presentation of
-    the document, where an opinion piece has a different layout than a
-    news article.</p>
-
-  </body>
-</html>
diff --git a/src/webapp/lenya/pubs/default/content/authoring/concepts/index_en.xml.meta b/src/webapp/lenya/pubs/default/content/authoring/concepts/index_en.xml.meta
deleted file mode 100644
index 30e26fc..0000000
--- a/src/webapp/lenya/pubs/default/content/authoring/concepts/index_en.xml.meta
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-<lenya:document xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0">
-<lenya:meta>
-<lenya:internal>
-<lenya:resourceType>xhtml</lenya:resourceType>
-<lenya:contentType>xml</lenya:contentType>
-</lenya:internal>
-<lenya:dc>
-        <dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Concepts quickly explained</dc:title>
-        <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Development Team</dc:creator>
-        <dc:subject xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Concepts</dc:subject>
-        <dc:description xmlns:dc="http://purl.org/dc/elements/1.1/">Explains Lenya concepts</dc:description>
-        <dc:publisher xmlns:dc="http://purl.org/dc/elements/1.1/">Apache Software Foundation</dc:publisher>
-        <dc:contributor xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:date xmlns:dc="http://purl.org/dc/elements/1.1/">2005-01-31</dc:date>
-        <dc:type xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:format xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:identifier xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:source xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">en</dc:language>
-        <dc:relation xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:coverage xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:rights xmlns:dc="http://purl.org/dc/elements/1.1/">All rights reserved</dc:rights>
-</lenya:dc>
-</lenya:meta>
-</lenya:document>
diff --git a/src/webapp/lenya/pubs/default/content/authoring/doctypes/index_de.xml b/src/webapp/lenya/pubs/default/content/authoring/doctypes/index_de.xml
deleted file mode 100644
index a6b0cc6..0000000
--- a/src/webapp/lenya/pubs/default/content/authoring/doctypes/index_de.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<html xmlns="http://www.w3.org/1999/xhtml" 
-xmlns:xhtml="http://www.w3.org/1999/xhtml" 
-xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0">
-
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-  <head>
-    <title>Dokumenttyp Beispiele</title>
-  </head>
-  <body>
-    <h1>Dokumenttyp Beispiele</h1>
-
-    <p>The default publication comes with the <a href="doctypes/xhtml-document.html">XHTML Doctype.</a></p>
-    
-    <p>The XHTML Doctype is for situations where
-    users ask for complete freedom on what information can be inserted
-    into a document. While this approach doesn't restrict you, it also
-    looses some of the major benefits of well defined document types.</p>
-
-  </body>
-</html>
diff --git a/src/webapp/lenya/pubs/default/content/authoring/doctypes/index_de.xml.meta b/src/webapp/lenya/pubs/default/content/authoring/doctypes/index_de.xml.meta
deleted file mode 100644
index 88832c6..0000000
--- a/src/webapp/lenya/pubs/default/content/authoring/doctypes/index_de.xml.meta
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-<lenya:document xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0">
-<lenya:meta>
-<lenya:internal>
-<lenya:resourceType>xhtml</lenya:resourceType>
-<lenya:contentType>xml</lenya:contentType>
-</lenya:internal>
-<lenya:dc>
-        <dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">Einige Dokumenttyp Beispiele</dc:title>
-        <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Development Team</dc:creator>
-        <dc:subject xmlns:dc="http://purl.org/dc/elements/1.1/">Dokumenttyp Beispiele</dc:subject>
-        <dc:description xmlns:dc="http://purl.org/dc/elements/1.1/">Enthält einige Beispiele von Dokumenttypen</dc:description>
-        <dc:publisher xmlns:dc="http://purl.org/dc/elements/1.1/">Apache Software Foundation</dc:publisher>
-        <dc:contributor xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:date xmlns:dc="http://purl.org/dc/elements/1.1/">2005-01-31</dc:date>
-        <dc:type xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:format xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:identifier xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:source xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">de</dc:language>
-        <dc:relation xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:coverage xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:rights xmlns:dc="http://purl.org/dc/elements/1.1/">Alle Rechte vorbehalten</dc:rights>
-</lenya:dc>
-</lenya:meta>
-</lenya:document>
diff --git a/src/webapp/lenya/pubs/default/content/authoring/doctypes/index_en.xml b/src/webapp/lenya/pubs/default/content/authoring/doctypes/index_en.xml
deleted file mode 100644
index 9208408..0000000
--- a/src/webapp/lenya/pubs/default/content/authoring/doctypes/index_en.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<html xmlns="http://www.w3.org/1999/xhtml" 
-xmlns:xhtml="http://www.w3.org/1999/xhtml" 
-xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0">
-
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-  <head>
-    <title>Document Type Examples</title>
-  </head>
-  <body>
-    <h1>Document Type Examples</h1>
-
-    <p>The default publication comes with the <a href="doctypes/xhtml-document.html">XHTML Doctype</a>.</p>
-    
-    <p>The XHTML Doctype is for situations where
-    users ask for complete freedom on what information can be inserted
-    into a document. While this approach doesn't restrict you, it also
-    looses some of the major benefits of well defined document types.</p>
-
-  </body>
-</html>
diff --git a/src/webapp/lenya/pubs/default/content/authoring/doctypes/index_en.xml.meta b/src/webapp/lenya/pubs/default/content/authoring/doctypes/index_en.xml.meta
deleted file mode 100644
index 24cb916..0000000
--- a/src/webapp/lenya/pubs/default/content/authoring/doctypes/index_en.xml.meta
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-<lenya:document xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0">
-<lenya:meta>
-<lenya:internal>
-<lenya:resourceType>xhtml</lenya:resourceType>
-<lenya:contentType>xml</lenya:contentType>
-</lenya:internal>
-<lenya:dc>
-        <dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">Some Doctype Samples</dc:title>
-        <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Development Team</dc:creator>
-        <dc:subject xmlns:dc="http://purl.org/dc/elements/1.1/">Doctype Samples</dc:subject>
-        <dc:description xmlns:dc="http://purl.org/dc/elements/1.1/">Contains some samples of Lenya doctypes</dc:description>
-        <dc:publisher xmlns:dc="http://purl.org/dc/elements/1.1/">Apache Software Foundation</dc:publisher>
-        <dc:contributor xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:date xmlns:dc="http://purl.org/dc/elements/1.1/">2005-01-31</dc:date>
-        <dc:type xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:format xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:identifier xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:source xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">en</dc:language>
-        <dc:relation xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:coverage xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:rights xmlns:dc="http://purl.org/dc/elements/1.1/">All rights reserved</dc:rights>
-</lenya:dc>
-</lenya:meta>
-</lenya:document>
diff --git a/src/webapp/lenya/pubs/default/content/authoring/doctypes/xhtml-document/index_de.xml b/src/webapp/lenya/pubs/default/content/authoring/doctypes/xhtml-document/index_de.xml
deleted file mode 100644
index dc9c384..0000000
--- a/src/webapp/lenya/pubs/default/content/authoring/doctypes/xhtml-document/index_de.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<html xmlns="http://www.w3.org/1999/xhtml" 
-xmlns:xhtml="http://www.w3.org/1999/xhtml" 
-xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0">
-
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-  <head>
-    <title>Der XHTML Dokumenttyp</title>
-  </head>
-  <body>
-    <h1>Der XHTML Dokumenttyp</h1>
-
-    <p>The XHTML Document Doctype is simply a XHTML document that
-    conforms to the <a href="http://www.w3.org/TR/xhtml1/">XHTML 1.0
-    definition</a> of the <a href="http://www.w3.org/">World Wide Web
-    Consortium (W3C)</a>.</p>  
-
-  </body>
-</html>
diff --git a/src/webapp/lenya/pubs/default/content/authoring/doctypes/xhtml-document/index_de.xml.meta b/src/webapp/lenya/pubs/default/content/authoring/doctypes/xhtml-document/index_de.xml.meta
deleted file mode 100644
index f19026a..0000000
--- a/src/webapp/lenya/pubs/default/content/authoring/doctypes/xhtml-document/index_de.xml.meta
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-<lenya:document xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0">
-<lenya:meta>
-<lenya:internal>
-<lenya:resourceType>xhtml</lenya:resourceType>
-<lenya:contentType>xml</lenya:contentType>
-</lenya:internal>
-<lenya:dc>
-        <dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">Der XHTML Dokumenttyp</dc:title>
-        <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Development Team</dc:creator>
-        <dc:subject xmlns:dc="http://purl.org/dc/elements/1.1/">XHTML Dokumenttyp</dc:subject>
-        <dc:description xmlns:dc="http://purl.org/dc/elements/1.1/">Erläutert den XHTML Dokumenttyp</dc:description>
-        <dc:publisher xmlns:dc="http://purl.org/dc/elements/1.1/">Apache Software Foundation</dc:publisher>
-        <dc:contributor xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:date xmlns:dc="http://purl.org/dc/elements/1.1/">2005-01-31</dc:date>
-        <dc:type xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:format xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:identifier xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:source xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">de</dc:language>
-        <dc:relation xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:coverage xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:rights xmlns:dc="http://purl.org/dc/elements/1.1/">Alle Rechte vorbehalten</dc:rights>
-</lenya:dc>
-</lenya:meta>
-</lenya:document>
diff --git a/src/webapp/lenya/pubs/default/content/authoring/doctypes/xhtml-document/index_en.xml b/src/webapp/lenya/pubs/default/content/authoring/doctypes/xhtml-document/index_en.xml
deleted file mode 100644
index 765baf8..0000000
--- a/src/webapp/lenya/pubs/default/content/authoring/doctypes/xhtml-document/index_en.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<html xmlns="http://www.w3.org/1999/xhtml" 
-xmlns:xhtml="http://www.w3.org/1999/xhtml" 
-xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0">
-
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-  <head>
-    <title>The XHTML Document Doctype</title>
-  </head>
-  <body>
-    <h1>The XHTML Document Doctype</h1>
-
-    <p>The XHTML Document Doctype is simply a XHTML document that
-    conforms to the <a href="http://www.w3.org/TR/xhtml1/">XHTML 1.0
-    definition</a> of the <a href="http://www.w3.org/">World Wide Web
-    Consortium (W3C)</a>.</p>  
-
-  </body>
-</html>
diff --git a/src/webapp/lenya/pubs/default/content/authoring/doctypes/xhtml-document/index_en.xml.meta b/src/webapp/lenya/pubs/default/content/authoring/doctypes/xhtml-document/index_en.xml.meta
deleted file mode 100644
index 64ac83c..0000000
--- a/src/webapp/lenya/pubs/default/content/authoring/doctypes/xhtml-document/index_en.xml.meta
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-<lenya:document xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0">
-<lenya:meta>
-<lenya:internal>
-<lenya:resourceType>xhtml</lenya:resourceType>
-<lenya:contentType>xml</lenya:contentType>
-</lenya:internal>
-<lenya:dc>
-        <dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">The XHTML Doctype</dc:title>
-        <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Development Team</dc:creator>
-        <dc:subject xmlns:dc="http://purl.org/dc/elements/1.1/">XHTML Doctype</dc:subject>
-        <dc:description xmlns:dc="http://purl.org/dc/elements/1.1/">Explains the XHTML Doctype</dc:description>
-        <dc:publisher xmlns:dc="http://purl.org/dc/elements/1.1/">Apache Software Foundation</dc:publisher>
-        <dc:contributor xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:date xmlns:dc="http://purl.org/dc/elements/1.1/">2005-01-31</dc:date>
-        <dc:type xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:format xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:identifier xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:source xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">en</dc:language>
-        <dc:relation xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:coverage xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:rights xmlns:dc="http://purl.org/dc/elements/1.1/">All rights reserved</dc:rights>
-</lenya:dc>
-</lenya:meta>
-</lenya:document>
diff --git a/src/webapp/lenya/pubs/default/content/authoring/features/index_de.xml b/src/webapp/lenya/pubs/default/content/authoring/features/index_de.xml
deleted file mode 100644
index 2bc3497..0000000
--- a/src/webapp/lenya/pubs/default/content/authoring/features/index_de.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<html xmlns="http://www.w3.org/1999/xhtml" 
-xmlns:xhtml="http://www.w3.org/1999/xhtml" 
-xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0">
-
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-  <head>
-    <title>Funktionen</title>
-  </head>
-  <body>
-    <h1>Funktionen</h1>
-
-    <p>Apache Lenya comes with the features you would expect of a
-    modern Content Management System, such as Revision Control,
-    Scheduling, a built-in Search Engine, separate Staging Areas and
-    Workflow. Because Apache Lenya uses XML throughout, it can offer
-    much more than other CMS that use XML only marginally. Some
-    notable features include:</p>
-
-    <h2>Browser-based WYSIWYG Editing</h2>
-    
-    <p>Apache Lenya comes with Browser-based WYSIWYG Editors that
-    validate input against a W3C XML Schema. This prevents the invalid
-    markup that other editors produce. Schema-based editors also allow
-    to enforce web site style guidelines.</p> 
-
-    <h2>XML Publishing</h2>
-
-    <p>As Apache Lenya is based on Apache Cocoon it leverages all the
-    benefits from a powerful XML Publishing framework such as
-    multi-channel publishing, content aggregation even from external
-    sources such as RSS.</p>
-
-    <h2>The Publication Concept</h2>
-    
-    <p>The publication concept allows for reuse of the information
-    architecture of a site and brings modularity to the content
-    level.</p> 
-
-    <h2>Future-proof Solution</h2>
-    
-    <p>The Apache Software Stack is quickly becoming the preeminent
-    platform for building Internet applications. By leveraging the
-    Apache Software Stack, Apache Lenya offers a robust, future-proof
-    solution that preserves technology investments.</p>
-
-  </body>
-</html>
diff --git a/src/webapp/lenya/pubs/default/content/authoring/features/index_de.xml.meta b/src/webapp/lenya/pubs/default/content/authoring/features/index_de.xml.meta
deleted file mode 100644
index 0291dcc..0000000
--- a/src/webapp/lenya/pubs/default/content/authoring/features/index_de.xml.meta
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-<lenya:document xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0">
-<lenya:meta>
-<lenya:internal>
-<lenya:resourceType>xhtml</lenya:resourceType>
-<lenya:contentType>xml</lenya:contentType>
-</lenya:internal>
-<lenya:dc>
-        <dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">Einige Lenya Funktionen kurz erklärt</dc:title>
-        <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Development Team</dc:creator>
-        <dc:subject xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Funktionen</dc:subject>
-        <dc:description xmlns:dc="http://purl.org/dc/elements/1.1/">Erklärt einige Lenya Funktionen.</dc:description>
-        <dc:publisher xmlns:dc="http://purl.org/dc/elements/1.1/">Apache Software Foundation</dc:publisher>
-        <dc:contributor xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:date xmlns:dc="http://purl.org/dc/elements/1.1/">2005-01-31</dc:date>
-        <dc:type xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:format xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:identifier xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:source xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">de</dc:language>
-        <dc:relation xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:coverage xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:rights xmlns:dc="http://purl.org/dc/elements/1.1/">Alle Rechte vorbehalten</dc:rights>
-</lenya:dc>
-</lenya:meta>
-</lenya:document>
diff --git a/src/webapp/lenya/pubs/default/content/authoring/features/index_en.xml b/src/webapp/lenya/pubs/default/content/authoring/features/index_en.xml
deleted file mode 100644
index 44e0cd2..0000000
--- a/src/webapp/lenya/pubs/default/content/authoring/features/index_en.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<html xmlns="http://www.w3.org/1999/xhtml" 
-xmlns:xhtml="http://www.w3.org/1999/xhtml" 
-xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0" >
-
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-  <head>
-    <title>Features</title>
-  </head>
-  <body>
-    <h1>Features</h1>
-
-    <p>Apache Lenya comes with the features you would expect of a
-    modern Content Management System, such as Revision Control,
-    Scheduling, a built-in Search Engine, separate Staging Areas and
-    Workflow. Because Apache Lenya uses XML throughout, it can offer
-    much more than other CMS that use XML only marginally. Some
-    notable features include:</p>
-
-    <h2>Browser-based WYSIWYG Editing</h2>
-    
-    <p>Apache Lenya comes with Browser-based WYSIWYG Editors that
-    validate input against a W3C XML Schema. This prevents the invalid
-    markup that other editors produce. Schema-based editors also allow
-    to enforce web site style guidelines.</p> 
-
-    <h2>XML Publishing</h2>
-
-    <p>As Apache Lenya is based on Apache Cocoon it leverages all the
-    benefits from a powerful XML Publishing framework such as
-    multi-channel publishing, content aggregation even from external
-    sources such as RSS.</p>
-
-    <h2>The Publication Concept</h2>
-    
-    <p>The publication concept allows for reuse of the information
-    architecture of a site and brings modularity to the content
-    level.</p> 
-
-    <h2>Future-proof Solution</h2>
-    
-    <p>The Apache Software Stack is quickly becoming the preeminent
-    platform for building Internet applications. By leveraging the
-    Apache Software Stack, Apache Lenya offers a robust, future-proof
-    solution that preserves technology investments.</p>
-
-  </body>
-</html>
diff --git a/src/webapp/lenya/pubs/default/content/authoring/features/index_en.xml.meta b/src/webapp/lenya/pubs/default/content/authoring/features/index_en.xml.meta
deleted file mode 100644
index ae0bec3..0000000
--- a/src/webapp/lenya/pubs/default/content/authoring/features/index_en.xml.meta
+++ /dev/null
@@ -1,41 +0,0 @@
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-<lenya:document xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0">
-<lenya:meta>
-<lenya:internal>
-<lenya:resourceType>xhtml</lenya:resourceType>
-<lenya:contentType>xml</lenya:contentType>
-</lenya:internal>
-<lenya:dc>
-        <dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">Some Lenya Features quickly explained</dc:title>
-        <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Development Team</dc:creator>
-        <dc:subject xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Features</dc:subject>
-        <dc:description xmlns:dc="http://purl.org/dc/elements/1.1/">Explains some Lenya features</dc:description>
-        <dc:publisher xmlns:dc="http://purl.org/dc/elements/1.1/">Apache Software Foundation</dc:publisher>
-        <dc:contributor xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:date xmlns:dc="http://purl.org/dc/elements/1.1/">2005-01-31</dc:date>
-        <dc:type xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:format xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:identifier xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:source xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">en</dc:language>
-        <dc:relation xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:coverage xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:rights xmlns:dc="http://purl.org/dc/elements/1.1/">All rights reserved</dc:rights>
-</lenya:dc>
-</lenya:meta>
-</lenya:document>
diff --git a/src/webapp/lenya/pubs/default/content/authoring/index/index_de.xml b/src/webapp/lenya/pubs/default/content/authoring/index/index_de.xml
deleted file mode 100644
index b13471e..0000000
--- a/src/webapp/lenya/pubs/default/content/authoring/index/index_de.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<html xmlns="http://www.w3.org/1999/xhtml" 
-xmlns:xhtml="http://www.w3.org/1999/xhtml" 
-xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0">
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-  <head>
-    <title>Welcome to the Default publication</title>
-  </head>
-  <body>
-    <p>Hallo und herzlich willkommen bei der Lenya Default Publikation!</p>
-
-    <p>Apache Lenya is a Java Open-Source Content Management System
-    based on open standards such as XML and XSLT and the Apache
-    Software Stack, in particular the XML publishing framework Apache
-    Cocoon.</p>
-
-    <p>For an overview of the concepts and the terminology used in
-    Apache Lenya please see the <a href="/default/authoring/concepts.html">Concepts
-    section</a>. To see what you can do with Apache Lenya please
-    refer to the <a href="/default/authoring/features.html">Features
-    section</a>.</p>
-
-    <p>If you'd like to get a quick introduction on how to use Apache
-    Lenya CMS please go through the <a
-    href="/default/authoring/tutorial.html">tutorial</a>.</p>
-
-    <p>The purpose of this publication is</p>
-
-    <ul>
-      <li>to show beginners the basic functionality of the Apache
-      Lenya CMS,</li>
-
-      <li>to provide an "out of the box" publication that can be
-      easily adapted and used,</li>
-
-      <li>and to provide a basis for reference implementations of new
-      concepts and best practices.</li>
-    </ul>
-
-    <p>This publication does not go to the limit of what's possible
-    with Apache Lenya CMS, there are no fancy bells and whistles to
-    confuse you, this publication simply contains everything you need
-    to get started.</p>
-    </body>
-</html>
diff --git a/src/webapp/lenya/pubs/default/content/authoring/index/index_de.xml.meta b/src/webapp/lenya/pubs/default/content/authoring/index/index_de.xml.meta
deleted file mode 100644
index f0541ff..0000000
--- a/src/webapp/lenya/pubs/default/content/authoring/index/index_de.xml.meta
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-<lenya:document xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0">
-<lenya:meta>
-<lenya:internal>
-<lenya:resourceType>homepage</lenya:resourceType>
-<lenya:contentType>xml</lenya:contentType>
-</lenya:internal>
-<lenya:dc>
-        <dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">Willkommen zur Lenya Standardpublikation</dc:title>
-        <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Development Team</dc:creator>
-        <dc:subject xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Standardpublikation</dc:subject>
-        <dc:description xmlns:dc="http://purl.org/dc/elements/1.1/">Startseite der Lenya Standardpublikation</dc:description>
-        <dc:publisher xmlns:dc="http://purl.org/dc/elements/1.1/">Apache Software Foundation</dc:publisher>
-        <dc:contributor xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:date xmlns:dc="http://purl.org/dc/elements/1.1/">2005-01-31</dc:date>
-        <dc:type xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:format xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:identifier xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:source xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">de</dc:language>
-        <dc:relation xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:coverage xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:rights xmlns:dc="http://purl.org/dc/elements/1.1/">Alle Rechte vorbehalten</dc:rights>
-</lenya:dc>
-</lenya:meta>
-</lenya:document>
diff --git a/src/webapp/lenya/pubs/default/content/authoring/index/index_en.xml b/src/webapp/lenya/pubs/default/content/authoring/index/index_en.xml
deleted file mode 100644
index 2a029e8..0000000
--- a/src/webapp/lenya/pubs/default/content/authoring/index/index_en.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<html xmlns="http://www.w3.org/1999/xhtml" 
-xmlns:xhtml="http://www.w3.org/1999/xhtml" 
-xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0">
-
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-  <head>
-    <title>Welcome to the Default publication</title>
-  </head>
-  <body>
-    <h1>Hello and welcome to the Lenya default publication!</h1>
-
-    <p>Apache Lenya is a Java Open-Source Content Management System
-    based on open standards such as XML and XSLT and the Apache
-    Software Stack, in particular the XML publishing framework Apache
-    Cocoon.</p>
-
-    <p>For an overview of the concepts and the terminology used in
-    Apache Lenya please see the <a href="/default/authoring/concepts.html">Concepts
-    section</a>. To see what you can do with Apache Lenya please
-    refer to the <a href="/default/authoring/features.html">Features
-    section</a>.</p>
-
-    <p>If you'd like to get a quick introduction on how to use Apache
-    Lenya CMS please go through the <a
-    href="/default/authoring/tutorial.html">tutorial</a>.</p>
-
-    <p>The purpose of this publication is</p>
-
-    <ul>
-      <li>to show beginners the basic functionality of the Apache
-      Lenya CMS,</li>
-
-      <li>to provide an "out of the box" publication that can be
-      easily adapted and used,</li>
-
-      <li>and to provide a basis for reference implementations of new
-      concepts and best practices.</li>
-
-    </ul>
-
-    <p>This publication does not go to the limit of what's possible
-    with Apache Lenya CMS, there are no fancy bells and whistles to
-    confuse you, this publication simply contains everything you need
-    to get started.</p>
-    </body>
-</html>
diff --git a/src/webapp/lenya/pubs/default/content/authoring/index/index_en.xml.meta b/src/webapp/lenya/pubs/default/content/authoring/index/index_en.xml.meta
deleted file mode 100644
index 90ef2b2..0000000
--- a/src/webapp/lenya/pubs/default/content/authoring/index/index_en.xml.meta
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-<lenya:document xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0">
-<lenya:meta>
-<lenya:internal>
-<lenya:resourceType>homepage</lenya:resourceType>
-<lenya:contentType>xml</lenya:contentType>
-</lenya:internal>
-<lenya:dc>
-        <dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">Welcome to the Lenya default publication</dc:title>
-        <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Development Team</dc:creator>
-        <dc:subject xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya default publication</dc:subject>
-        <dc:description xmlns:dc="http://purl.org/dc/elements/1.1/">The start page of the Lenya default publication</dc:description>
-        <dc:publisher xmlns:dc="http://purl.org/dc/elements/1.1/">Apache Software Foundation</dc:publisher>
-        <dc:contributor xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:date xmlns:dc="http://purl.org/dc/elements/1.1/">2005-01-31</dc:date>
-        <dc:type xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:format xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:identifier xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:source xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">en</dc:language>
-        <dc:relation xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:coverage xmlns:dc="http://purl.org/dc/elements/1.1/" />
-        <dc:rights xmlns:dc="http://purl.org/dc/elements/1.1/">All rights reserved</dc:rights>
-</lenya:dc>
-</lenya:meta>
-</lenya:document>
diff --git a/src/webapp/lenya/pubs/default/content/authoring/links/index_en.xml b/src/webapp/lenya/pubs/default/content/authoring/links/index_en.xml
deleted file mode 100644
index db725b7..0000000
--- a/src/webapp/lenya/pubs/default/content/authoring/links/index_en.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0"?>
-
-<links xmlns="http://apache.org/lenya/pubs/default/1.0">
-  <title>Apache Lenya Links</title>
-  <link href="http://lenya.apache.org/">Apache Lenya Website</link>
-  <link href="http://wiki.apache.org/lenya/">Apache Lenya Wiki</link>
-</links>
diff --git a/src/webapp/lenya/pubs/default/content/authoring/links/index_en.xml.meta b/src/webapp/lenya/pubs/default/content/authoring/links/index_en.xml.meta
deleted file mode 100644
index 8994f25..0000000
--- a/src/webapp/lenya/pubs/default/content/authoring/links/index_en.xml.meta
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-<lenya:document xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0">
-<lenya:meta>
-<lenya:internal>
-<lenya:resourceType>links</lenya:resourceType>
-<lenya:contentType>xml</lenya:contentType>
-</lenya:internal>
-<lenya:dc>
-        <dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya links</dc:title>
-        <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Development Team</dc:creator>
-</lenya:dc>
-</lenya:meta>
-</lenya:document>
diff --git a/src/webapp/lenya/pubs/default/content/authoring/sitetree.xml b/src/webapp/lenya/pubs/default/content/authoring/sitetree.xml
deleted file mode 100644
index 98531d2..0000000
--- a/src/webapp/lenya/pubs/default/content/authoring/sitetree.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site i18n:attr="label" label="Authoring"
-    xmlns="http://apache.org/cocoon/lenya/sitetree/1.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation=
-        "http://apache.org/cocoon/lenya/sitetree/1.0
-        ../../../../resources/entities/sitetree.xsd"
-    xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
->
-    
-  <node id="index">
-    <label xml:lang="en">Home</label>
-    <label xml:lang="de">Home</label>
-  </node>
-  
-  <node id="tutorial">
-    <label xml:lang="en">Tutorial</label>
-    <label xml:lang="de">Tutorial</label>
-
-    <node id="new_doctype">
-      <label xml:lang="en">Create new doctype</label>
-    </node>
-  </node>
-
-  <node id="concepts">
-    <label xml:lang="en">Concepts (english only)</label>
-  </node>
-
-  <node id="links">
-    <label xml:lang="en">Apache Lenya Links</label>
-  </node>
-  
-  <node id="features">
-    <label xml:lang="en">Features</label>
-    <label xml:lang="de">Funktionen</label>
-  </node>
-
-  <node id="doctypes">
-    <label xml:lang="en">Document Type Examples</label>
-    <label xml:lang="de">Dokumenttyp Beispiele</label>
-     <node id="xhtml-document">
-      <label xml:lang="en">XHTML Doctype</label>
-      <label xml:lang="de">XHTML Dokumenttyp</label>
-    </node>
- </node>
-  
-</site>
diff --git a/src/webapp/lenya/pubs/default/content/authoring/tutorial/index_de.xml b/src/webapp/lenya/pubs/default/content/authoring/tutorial/index_de.xml
deleted file mode 100644
index 3a220e8..0000000
--- a/src/webapp/lenya/pubs/default/content/authoring/tutorial/index_de.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<html xmlns="http://www.w3.org/1999/xhtml" 
-xmlns:xhtml="http://www.w3.org/1999/xhtml" 
-xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0">
-
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-  <head>
-    <title>Lenya Tutorial</title>
-  </head>
-  <body>
-    <h1>Tutorial</h1>
-
-    <p>This tutorial gives you a short introduction into the Apache
-    Lenya content management system. We'll look at a typical use case
-    where we create a new document, edit and publish it.</p>
-
-    <h2>Creating a new document</h2>
-
-    <p>To create a new document goto the <code>File->New
-    Document</code> menu entry. You'll get a new screen that asks you
-    for an id and a name for this new document. The id will be used
-    internally as an identifier for the document and the name will be
-    used in the navigation. Let's use "foo" as id and "Foo" as the
-    name of the new document. Now press <code>Create</code>. You will
-    be redirected back to the page where you originally invoked the
-    creation and you'll notice that the new document "Foo" now shows
-    up as a sub-document of the Tutorial document in the
-    navigation.</p>
-
-    <p>This illustrates the fact that a new document is always created
-    as a sub-document of the document you're currently looking at. You
-    also notice how the navigation is built automatically.</p>
-
-    <h2>Editing a document</h2>
-
-    <p>To look at the newly created document click on the "Foo" entry
-    in the navigation. You'll notice that the "Foo" document already
-    contains some content. It was created from a sample XML
-    document. To change this sample content you will have to edit the
-    document. You can pick on of the following web-based WYSIWYG
-    editors:</p>
-
-    <ul>
-      <li>HTML Forms: This is a good choice for users of Mosaic ;-)</li>
-      <li>Bitflux: This is a good choice for users of Mozilla.</li>
-      <li>One Form: For the power user who needs all the control</li>
-    </ul>
-
-    <p>Pick your choice of editor (based on your platform) and start
-    editing the newly created document by selecting the
-    <code>Edit->Edit with BXE</code> menu button. The Lenya menu will
-    disappear and the Bitflux toolbar will appear instead. You can use
-    the left mouse button to get a context sensitive menu from where
-    you can copy, cut and paste. You're also able to insert new
-    elements into the document from the context sensitive menu. Once
-    you're done with all your changes, press
-    <code>Save&amp;Exit</code> to get back. You'll see your changes in
-    the document.</p>
-
-    <h2>Publishing a document</h2>
-
-    <p>Once you are satisfied with the content of the document you
-    want to publish it to make it visible in the live area.</p> 
-
-    <h3>Workflow</h3>
-
-    <p>The default publication has a simple workflow configured which
-    involves an author and a reviewer. The author creates and edits a
-    new document and submits it for approval. The reviewer (obviously
-    :-)) reviews the document and publishes it so that it will appear
-    on the live site.
-
-    The user lenya (which you are probably currently logged in as) has
-    the role edit, i.e. he can create new documents and submit them
-    for approval (with <code>Workflow->Submit for review</code>). The
-    user alice has the role review which allows her to approve,
-    i.e. publish documents.</p>
-
-    <p>In order to publish your newly created document simply press
-    <code>Workflow->Sumbit</code> (as user lenya) to submit the
-    current document for approval. Now log out
-    (<code>File->Logout</code>), log back in as alice (use the same
-    password as for user lenya) and publish the current document by
-    selecting <code>Workflow->Publish</code>. You will get a
-    confirmation screen where you confirm your intention to publish
-    the document "Foo" by pressing <code>Publish Now</code>. You might
-    have to publish the parent document ("Tutorial") first, as the
-    "Foo" document will not be published if the parent document is not
-    in the live area yet.</p> <p>To check how the "Foo" document looks
-    like in the live site click on the <code>live</code> tab in the
-    Lenya menu. This will open a new browser window showing you the
-    live site.</p>
-    
-    <h2>Scheduling</h2>
-    
-    <p>Apache Lenya allows you to publish a document at a specific
-    date. To do this select the <code>Workflow->Publish</code> menu
-    entry. Now instead of pressing <code>Publish</code>, specify the
-    date and the time at which you wish to publish the document and
-    press <code>Schedule</code>. Your document will be published at
-    the specified date. Use the <code>Scheduler</code> tab in the site
-    area to see the pending tasks and their status.</p>
-
-    <h2>Revision Control</h2>
-
-    <p>Every time you edit a document and exit the editor a new
-    revision of the document is stored. Old versions of the document
-    are kept and you can go back to an older version if you want to
-    undo some of the changes you applied to it. To see all available
-    versions of the current document press
-    <code>Tools->Rollback</code>. This will give you a list of all
-    previous versions. You can view a specific old version or rollback
-    to a specific old version by clicking on the appropriate links.</p>
-
-  </body>
-</html>
diff --git a/src/webapp/lenya/pubs/default/content/authoring/tutorial/index_de.xml.meta b/src/webapp/lenya/pubs/default/content/authoring/tutorial/index_de.xml.meta
deleted file mode 100644
index eaf35f2..0000000
--- a/src/webapp/lenya/pubs/default/content/authoring/tutorial/index_de.xml.meta
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-<lenya:document xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0">
-<lenya:meta>
-<lenya:internal>
-<lenya:resourceType>xhtml</lenya:resourceType>
-<lenya:contentType>xml</lenya:contentType>
-</lenya:internal>
-<lenya:dc>
-        <dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">Ein kurzes Lenya Tutorial</dc:title>
-        <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Development Team</dc:creator>
-        <dc:subject xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Tutorial</dc:subject>
-        <dc:description xmlns:dc="http://purl.org/dc/elements/1.1/">Ein kurzes Tutorial zur Benutzung von Lenya</dc:description>
-        <dc:publisher xmlns:dc="http://purl.org/dc/elements/1.1/">Apache Software Foundation</dc:publisher>
-        <dc:contributor xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:date xmlns:dc="http://purl.org/dc/elements/1.1/">2005-01-31</dc:date>
-        <dc:type xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:format xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:identifier xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:source xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">de</dc:language>
-        <dc:relation xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:coverage xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:rights xmlns:dc="http://purl.org/dc/elements/1.1/">Alle Rechte vorbehalten</dc:rights>
-</lenya:dc>
-</lenya:meta>
-</lenya:document>
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/default/content/authoring/tutorial/index_en.xml b/src/webapp/lenya/pubs/default/content/authoring/tutorial/index_en.xml
deleted file mode 100644
index 3a220e8..0000000
--- a/src/webapp/lenya/pubs/default/content/authoring/tutorial/index_en.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<html xmlns="http://www.w3.org/1999/xhtml" 
-xmlns:xhtml="http://www.w3.org/1999/xhtml" 
-xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0">
-
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-  <head>
-    <title>Lenya Tutorial</title>
-  </head>
-  <body>
-    <h1>Tutorial</h1>
-
-    <p>This tutorial gives you a short introduction into the Apache
-    Lenya content management system. We'll look at a typical use case
-    where we create a new document, edit and publish it.</p>
-
-    <h2>Creating a new document</h2>
-
-    <p>To create a new document goto the <code>File->New
-    Document</code> menu entry. You'll get a new screen that asks you
-    for an id and a name for this new document. The id will be used
-    internally as an identifier for the document and the name will be
-    used in the navigation. Let's use "foo" as id and "Foo" as the
-    name of the new document. Now press <code>Create</code>. You will
-    be redirected back to the page where you originally invoked the
-    creation and you'll notice that the new document "Foo" now shows
-    up as a sub-document of the Tutorial document in the
-    navigation.</p>
-
-    <p>This illustrates the fact that a new document is always created
-    as a sub-document of the document you're currently looking at. You
-    also notice how the navigation is built automatically.</p>
-
-    <h2>Editing a document</h2>
-
-    <p>To look at the newly created document click on the "Foo" entry
-    in the navigation. You'll notice that the "Foo" document already
-    contains some content. It was created from a sample XML
-    document. To change this sample content you will have to edit the
-    document. You can pick on of the following web-based WYSIWYG
-    editors:</p>
-
-    <ul>
-      <li>HTML Forms: This is a good choice for users of Mosaic ;-)</li>
-      <li>Bitflux: This is a good choice for users of Mozilla.</li>
-      <li>One Form: For the power user who needs all the control</li>
-    </ul>
-
-    <p>Pick your choice of editor (based on your platform) and start
-    editing the newly created document by selecting the
-    <code>Edit->Edit with BXE</code> menu button. The Lenya menu will
-    disappear and the Bitflux toolbar will appear instead. You can use
-    the left mouse button to get a context sensitive menu from where
-    you can copy, cut and paste. You're also able to insert new
-    elements into the document from the context sensitive menu. Once
-    you're done with all your changes, press
-    <code>Save&amp;Exit</code> to get back. You'll see your changes in
-    the document.</p>
-
-    <h2>Publishing a document</h2>
-
-    <p>Once you are satisfied with the content of the document you
-    want to publish it to make it visible in the live area.</p> 
-
-    <h3>Workflow</h3>
-
-    <p>The default publication has a simple workflow configured which
-    involves an author and a reviewer. The author creates and edits a
-    new document and submits it for approval. The reviewer (obviously
-    :-)) reviews the document and publishes it so that it will appear
-    on the live site.
-
-    The user lenya (which you are probably currently logged in as) has
-    the role edit, i.e. he can create new documents and submit them
-    for approval (with <code>Workflow->Submit for review</code>). The
-    user alice has the role review which allows her to approve,
-    i.e. publish documents.</p>
-
-    <p>In order to publish your newly created document simply press
-    <code>Workflow->Sumbit</code> (as user lenya) to submit the
-    current document for approval. Now log out
-    (<code>File->Logout</code>), log back in as alice (use the same
-    password as for user lenya) and publish the current document by
-    selecting <code>Workflow->Publish</code>. You will get a
-    confirmation screen where you confirm your intention to publish
-    the document "Foo" by pressing <code>Publish Now</code>. You might
-    have to publish the parent document ("Tutorial") first, as the
-    "Foo" document will not be published if the parent document is not
-    in the live area yet.</p> <p>To check how the "Foo" document looks
-    like in the live site click on the <code>live</code> tab in the
-    Lenya menu. This will open a new browser window showing you the
-    live site.</p>
-    
-    <h2>Scheduling</h2>
-    
-    <p>Apache Lenya allows you to publish a document at a specific
-    date. To do this select the <code>Workflow->Publish</code> menu
-    entry. Now instead of pressing <code>Publish</code>, specify the
-    date and the time at which you wish to publish the document and
-    press <code>Schedule</code>. Your document will be published at
-    the specified date. Use the <code>Scheduler</code> tab in the site
-    area to see the pending tasks and their status.</p>
-
-    <h2>Revision Control</h2>
-
-    <p>Every time you edit a document and exit the editor a new
-    revision of the document is stored. Old versions of the document
-    are kept and you can go back to an older version if you want to
-    undo some of the changes you applied to it. To see all available
-    versions of the current document press
-    <code>Tools->Rollback</code>. This will give you a list of all
-    previous versions. You can view a specific old version or rollback
-    to a specific old version by clicking on the appropriate links.</p>
-
-  </body>
-</html>
diff --git a/src/webapp/lenya/pubs/default/content/authoring/tutorial/index_en.xml.meta b/src/webapp/lenya/pubs/default/content/authoring/tutorial/index_en.xml.meta
deleted file mode 100644
index 656d0c0..0000000
--- a/src/webapp/lenya/pubs/default/content/authoring/tutorial/index_en.xml.meta
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-<lenya:document xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0">
-<lenya:meta>
-<lenya:internal>
-<lenya:resourceType>xhtml</lenya:resourceType>
-<lenya:contentType>xml</lenya:contentType>
-</lenya:internal>
-<lenya:dc>
-        <dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">A short Lenya Tutorial</dc:title>
-        <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Development Team</dc:creator>
-        <dc:subject xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Tutorial</dc:subject>
-        <dc:description xmlns:dc="http://purl.org/dc/elements/1.1/">A short tutorial on using Apache Lenya</dc:description>
-        <dc:publisher xmlns:dc="http://purl.org/dc/elements/1.1/">Apache Software Foundation</dc:publisher>
-        <dc:contributor xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:date xmlns:dc="http://purl.org/dc/elements/1.1/">2005-01-31</dc:date>
-        <dc:type xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:format xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:identifier xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:source xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">en</dc:language>
-        <dc:relation xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:coverage xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:rights xmlns:dc="http://purl.org/dc/elements/1.1/">All rights reserved</dc:rights>
-</lenya:dc>
-</lenya:meta>
-</lenya:document>
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/default/content/authoring/tutorial/new_doctype/index_en.xml b/src/webapp/lenya/pubs/default/content/authoring/tutorial/new_doctype/index_en.xml
deleted file mode 100644
index 6a3aa69..0000000
--- a/src/webapp/lenya/pubs/default/content/authoring/tutorial/new_doctype/index_en.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<html xmlns="http://www.w3.org/1999/xhtml" 
-xmlns:xhtml="http://www.w3.org/1999/xhtml" 
-xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0">
-
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-  <head>
-    <title>Lenya Tutorial - How to create a new doctype</title>
-  </head>
-  <body>
-    <h1>Lenya Tutorial - How to create a new doctype</h1>
-
-    <p>NOTE: Also see the <a href="http://wiki.apache.org/lenya/AddingCustomDocType">Wiki</a></p>
-
-    <h2>The standard way</h2>
-
-    <p>
-    Add a link where people can click on: <em>config/menus/menu.xsp</em>
-    </p>
-
-    <p>
-    Create a usecase sitemap where the "flow" is defined: <em>usecase-create-my_doctype.xmap</em>
-    </p>
-
-    <p>
-    Define what class shall be used for the actual creation: <em>config/doctypes/doctypes.xconf</em>
-    </p>
-    
-    <p>
-    In many cases a new document is created based on a sample: <em>config/doctypes/samples/my_doctype.xml</em>
-    The name of the sample needs to be configured within <em>config/doctypes/doctypes.xconf</em>
-    </p>
-    
-    <p>
-    Add doctype such that XSLT can be found: <em>parameter-doctype.xmap</em>
-    </p>
-    
-    <p>
-    Create XSLT: <em>xslt/my_doctype2xhtml.xsl</em>
-    </p>
-    
-    <p>
-    OPTIONAL: Create new menu: <em>menus.xmap</em>, <em>config/menus/my_doctype.xsp</em>
-    </p>
-    
-    <p>
-    Create workflow: <em>config/workflow/my_doctype.xml</em>, <em>config/doctypes/doctypes.xconf</em>
-    </p>
-
-  </body>
-</html>
diff --git a/src/webapp/lenya/pubs/default/content/authoring/tutorial/new_doctype/index_en.xml.meta b/src/webapp/lenya/pubs/default/content/authoring/tutorial/new_doctype/index_en.xml.meta
deleted file mode 100644
index 35935d4..0000000
--- a/src/webapp/lenya/pubs/default/content/authoring/tutorial/new_doctype/index_en.xml.meta
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-<lenya:document xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0">
-<lenya:meta>
-<lenya:internal>
-<lenya:resourceType>xhtml</lenya:resourceType>
-<lenya:contentType>xml</lenya:contentType>
-</lenya:internal>
-<lenya:dc>
-        <dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">How to create a new doctype</dc:title>
-        <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Development Team</dc:creator>
-        <dc:subject xmlns:dc="http://purl.org/dc/elements/1.1/">New doctype</dc:subject>
-        <dc:description xmlns:dc="http://purl.org/dc/elements/1.1/">Tutorial for new doctype creation</dc:description>
-        <dc:publisher xmlns:dc="http://purl.org/dc/elements/1.1/">Apache Software Foundation</dc:publisher>
-        <dc:contributor xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:date xmlns:dc="http://purl.org/dc/elements/1.1/">2005-01-31</dc:date>
-        <dc:type xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:format xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:identifier xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:source xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">en</dc:language>
-        <dc:relation xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:coverage xmlns:dc="http://purl.org/dc/elements/1.1/"/>
-        <dc:rights xmlns:dc="http://purl.org/dc/elements/1.1/">All rights reserved</dc:rights>
-</lenya:dc>
-</lenya:meta>
-</lenya:document>
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/default/content/live/index/index_en.xml b/src/webapp/lenya/pubs/default/content/live/index/index_en.xml
deleted file mode 100644
index 13c8625..0000000
--- a/src/webapp/lenya/pubs/default/content/live/index/index_en.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<html xmlns="http://www.w3.org/1999/xhtml" 
-xmlns:xhtml="http://www.w3.org/1999/xhtml" 
-xmlns:dc="http://purl.org/dc/elements/1.1/" 
-xmlns:dcterms="http://purl.org/dc/terms/"
-xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0" 
-xhtml:dummy="FIXME:keepNamespace" dc:dummy="FIXME:keepNamespace" 
-lenya:dummy="FIXME:keepNamespace" dcterms:dummy="FIXME:keepNamespace">
-
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-    <lenya:meta>
-        <dc:title>Welcome to the Lenya default publication</dc:title>
-        <dc:creator>Lenya Development Team</dc:creator>
-        <dc:subject>Lenya default publication</dc:subject>
-        <dc:description>The start page for the Lenya default publication</dc:description>
-        <dc:publisher>Apache Software Foundation</dc:publisher>
-        <dc:contributor/>
-        <dc:date>2005-01-31</dc:date>
-        <dc:type/>
-        <dc:format/>
-        <dc:identifier/>
-        <dc:source/>
-        <dc:language>en</dc:language>
-        <dc:relation/>
-        <dc:coverage/>
-        <dc:rights>All rights reserved</dc:rights>
-    </lenya:meta>
-  <head>
-    <title>Welcome to the Default publication</title>
-  </head>
-  <body>
-    <p>Hello and welcome to the Lenya default publication!</p>
-
-    <p>Apache Lenya is a Java Open-Source Content Management System
-    based on open standards such as XML and XSLT and the Apache
-    Software Stack, in particular the XML publishing framework Apache
-    Cocoon.</p>
-
-    <p>For an overview of the concepts and the terminology used in
-    Apache Lenya please see the <a href="/default/authoring/concepts.html">Concepts
-    section</a>. To see what you can do with Apache Lenya please
-    refer to the <a href="/default/authoring/features.html">Features
-    section</a>.</p>
-
-    <p>If you'd like to get a quick introduction on how to use Apache
-    Lenya CMS please go through the <a
-    href="/default/authoring/tutorial.html">tutorial</a>.</p>
-
-    <p>The purpose of this publication is</p>
-
-    <ul>
-      <li>to show beginners the basic functionality of the Apache
-      Lenya CMS,</li>
-      <li>to provide an "out of the box" publication that can be
-      easily adapted and used,</li>
-      <li>and to provide a basis for reference implementations of new
-      concepts and best practices.</li>
-    </ul>
-
-    <p>This publication does not go to the limit of what's possible
-    with Apache Lenya CMS, there are no fancy bells and whistles to
-    confuse you, this publication simply contains everything you need
-    to get started.</p>
-    </body>
-</html>
diff --git a/src/webapp/lenya/pubs/default/content/live/sitetree.xml b/src/webapp/lenya/pubs/default/content/live/sitetree.xml
deleted file mode 100644
index 2dbf594..0000000
--- a/src/webapp/lenya/pubs/default/content/live/sitetree.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site i18n:attr="label" label="Live" 
-  xmlns="http://apache.org/cocoon/lenya/sitetree/1.0" 
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
-  xsi:schemaLocation=
-     "http://apache.org/cocoon/lenya/sitetree/1.0
-     ../../../../resources/entities/sitetree.xsd"
->
-    
-  <node id="index">
-    <label xml:lang="en">Home</label>
-  </node>
-  
-</site>
diff --git a/src/webapp/lenya/pubs/default/content/trash/sitetree.xml b/src/webapp/lenya/pubs/default/content/trash/sitetree.xml
deleted file mode 100644
index ac9e6e3..0000000
--- a/src/webapp/lenya/pubs/default/content/trash/sitetree.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: sitetree.xml,v 1.3 2004/03/13 14:41:03 gregor Exp $ -->
-    
-<site i18n:attr="label" label="Trash" 
-  xmlns="http://apache.org/cocoon/lenya/sitetree/1.0" 
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
->
-</site>
diff --git a/src/webapp/lenya/pubs/default/doctypes.xmap b/src/webapp/lenya/pubs/default/doctypes.xmap
deleted file mode 100644
index 1676169..0000000
--- a/src/webapp/lenya/pubs/default/doctypes.xmap
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
-
-  <map:pipelines>
-
-    <map:pipeline>
-      <!-- View Revision? -->
-      <map:match pattern="*/*/*/**.xml">
-        <map:match type="step" pattern="view-revision">
-          <map:generate type="serverpages" src="../../content/rc/view.xsp">
-          </map:generate>
-          <map:transform src="../../xslt/rc/toDoc.xsl"/>
-        <map:transform src="fallback://xslt/{../3}2xhtml.xsl">
-          <map:parameter name="rendertype" value="{1}"/>
-          <map:parameter name="nodeid" value="{page-envelope:document-name}"/>
-          <map:parameter name="language" value="{page-envelope:document-language}"/>
-        </map:transform>
-          <map:serialize type="xml"/>
-        </map:match>
-      </map:match>
-
-      <!-- parametrized doctype matcher -->
-      <!-- pattern="{rendertype}/{area}/{doctype}/{document-path}" -->
-      <map:match pattern="*/*/*/**.xml">
-        <map:generate src="fallback://content/{2}/{4}.xml"/>
-        <map:transform src="fallback://xslt/{3}2xhtml.xsl">
-          <map:parameter name="rendertype" value="{1}"/>
-          <map:parameter name="nodeid" value="{page-envelope:document-name}"/>
-          <map:parameter name="language" value="{page-envelope:document-language}"/>
-        </map:transform>
-        <map:serialize type="xml"/>
-      </map:match>
-
-    </map:pipeline>
-    
-  </map:pipelines>
-</map:sitemap>
diff --git a/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/publication/templating/Instantiator.java b/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/publication/templating/Instantiator.java
deleted file mode 100644
index 64747c3..0000000
--- a/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/publication/templating/Instantiator.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.defaultpub.cms.publication.templating;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.net.MalformedURLException;
-import java.util.Collection;
-import java.util.Iterator;
-
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-
-import org.apache.avalon.framework.configuration.DefaultConfiguration;
-import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
-import org.apache.avalon.framework.configuration.DefaultConfigurationSerializer;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.excalibur.source.ModifiableSource;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.excalibur.source.impl.FileSource;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationImpl;
-import org.apache.lenya.xml.DocumentHelper;
-import org.apache.lenya.xml.NamespaceHelper;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-/**
- * Instantiate the publication.
- * 
- * @version $Id:$
- */
-public class Instantiator extends AbstractLogEnabled implements
-        org.apache.lenya.cms.publication.templating.Instantiator, Serviceable {
-
-    protected static final String[] sourcesToCopy = { "publication.xml",
-        "config/publication.xconf", "config/ac/passwd/",
-        "config/ac/ac.xconf","config/ac/policies/", 
-        "config/ac/usecase-policies.xml", "config/doctypes/doctypes.xconf",
-        "config/workflow/workflow.xml", "content/" };
-
-    /**
-     * @see org.apache.lenya.cms.publication.templating.Instantiator#instantiate(org.apache.lenya.cms.publication.Publication,
-     *      java.lang.String, java.lang.String)
-     */
-    public void instantiate(Publication template, String newPublicationId, String name)
-            throws Exception {
-
-        SourceResolver resolver = null;
-        Source publicationsSource = null;
-        ModifiableSource metaSource = null;
-        ModifiableSource configSource = null;
-        try {
-            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-            publicationsSource = resolver.resolveURI("context://"
-                    + PublicationImpl.PUBLICATION_PREFIX_URI);
-            String publicationsUri = publicationsSource.getURI();
-
-            for (int i = 0; i < sourcesToCopy.length; i++) {
-
-                String source = sourcesToCopy[i];
-                if (source.endsWith("/")) {
-                    copyDirSource(template, newPublicationId, resolver, publicationsUri, source);
-                } else {
-                    copySource(template, newPublicationId, resolver, publicationsUri, source);
-                }
-            }
-
-            metaSource = (ModifiableSource) resolver.resolveURI(publicationsUri + "/"
-                    + newPublicationId + "/publication.xml");
-            Document metaDoc = DocumentHelper.readDocument(metaSource.getInputStream());
-            NamespaceHelper helper = new NamespaceHelper(
-                    "http://apache.org/cocoon/lenya/publication/1.0", "lenya", metaDoc);
-            Element nameElement = helper.getFirstChild(metaDoc.getDocumentElement(), "name");
-            DocumentHelper.setSimpleElementText(nameElement, name);
-
-            save(metaDoc, metaSource);
-
-            configSource = (ModifiableSource) resolver.resolveURI(publicationsUri + "/"
-                    + newPublicationId + "/config/publication.xconf");
-            DefaultConfiguration config = (DefaultConfiguration) new DefaultConfigurationBuilder()
-                    .build(configSource.getInputStream());
-            DefaultConfiguration templatesConfig = new DefaultConfiguration("templates");
-            DefaultConfiguration templateConfig = new DefaultConfiguration("template");
-            templateConfig.setAttribute("id", template.getId());
-            templatesConfig.addChild(templateConfig);
-            config.addChild(templatesConfig);
-            OutputStream oStream = configSource.getOutputStream();
-            new DefaultConfigurationSerializer().serialize(oStream, config);
-            if (oStream != null) {
-                oStream.flush();
-                try {
-                    oStream.close();
-                } catch (Throwable t) {
-                    if (getLogger().isDebugEnabled()) {
-                        getLogger().debug("Exception closing output stream: ", t);
-                    }
-                    throw new RuntimeException("Could not write document: ", t);
-                }
-            }
-
-        } finally {
-            if (resolver != null) {
-                this.manager.release(resolver);
-                if (publicationsSource != null) {
-                    resolver.release(publicationsSource);
-                }
-                if (metaSource != null) {
-                    resolver.release(metaSource);
-                }
-                if (configSource != null) {
-                    resolver.release(configSource);
-                }
-            }
-        }
-    }
-
-    protected void copySource(Publication template,
-            String publicationId,
-            SourceResolver resolver,
-            String publicationsUri,
-            String source) throws MalformedURLException, IOException {
-        Source templateSource = null;
-        ModifiableSource targetSource = null;
-        try {
-            templateSource = resolver.resolveURI(publicationsUri + "/" + template.getId() + "/"
-                    + source);
-            targetSource = (ModifiableSource) resolver.resolveURI(publicationsUri + "/"
-                    + publicationId + "/" + source);
-
-            org.apache.lenya.cms.cocoon.source.SourceUtil.copy(templateSource, targetSource, false);
-        } finally {
-            if (templateSource != null) {
-                resolver.release(templateSource);
-            }
-            if (targetSource != null) {
-                resolver.release(targetSource);
-            }
-        }
-    }
-
-    protected void copyDirSource(Publication template,
-            String publicationId,
-            SourceResolver resolver,
-            String publicationsUri,
-            String source) throws MalformedURLException, IOException {
-        FileSource directory = new FileSource(publicationsUri + "/" + template.getId() + "/"
-                + source);
-        Collection files = directory.getChildren();
-        for (Iterator iter = files.iterator(); iter.hasNext();) {
-            FileSource filesource = (FileSource) iter.next();
-            if (filesource.isCollection()) {
-                copyDirSource(template, publicationId, resolver, publicationsUri, source + "/"
-                        + filesource.getName());
-            } else {
-                copySource(template, publicationId, resolver, publicationsUri, source + "/"
-                        + filesource.getName());
-            }
-        }
-    }
-
-    protected void save(Document metaDoc, ModifiableSource metaSource) throws IOException,
-            TransformerConfigurationException, TransformerException {
-        OutputStream oStream = metaSource.getOutputStream();
-        DocumentHelper.writeDocument(metaDoc, new OutputStreamWriter(oStream));
-        if (oStream != null) {
-            oStream.flush();
-            try {
-                oStream.close();
-            } catch (Throwable t) {
-                if (getLogger().isDebugEnabled()) {
-                    getLogger().debug("Exception closing output stream: ", t);
-                }
-                throw new RuntimeException("Could not write document: ", t);
-            }
-        }
-    }
-
-    private ServiceManager manager;
-
-    /**
-     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
-     */
-    public void service(ServiceManager manager) throws ServiceException {
-        this.manager = manager;
-    }
-
-}
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/Deactivate.java b/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/Deactivate.java
deleted file mode 100644
index f8848f4..0000000
--- a/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/Deactivate.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.defaultpub.cms.usecases;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentBuildException;
-import org.apache.lenya.cms.publication.DocumentManager;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationException;
-import org.apache.lenya.cms.publication.util.DocumentSet;
-import org.apache.lenya.cms.publication.util.DocumentVisitor;
-import org.apache.lenya.cms.site.SiteManager;
-import org.apache.lenya.cms.site.SiteUtil;
-import org.apache.lenya.cms.usecase.DocumentUsecase;
-import org.apache.lenya.cms.usecase.UsecaseException;
-import org.apache.lenya.cms.workflow.WorkflowUtil;
-import org.apache.lenya.transaction.Transactionable;
-import org.apache.lenya.workflow.WorkflowException;
-
-/**
- * Deactivate usecase handler.
- * 
- * @version $Id$
- */
-public class Deactivate extends DocumentUsecase implements DocumentVisitor {
-
-    /**
-     * Checks if the workflow event is supported and the parent of the document exists in the live
-     * area.
-     * 
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckPreconditions()
-     */
-    protected void doCheckPreconditions() throws Exception {
-        super.doCheckPreconditions();
-
-        if (!hasErrors()) {
-
-            if (!getSourceDocument().getArea().equals(Publication.AUTHORING_AREA)) {
-                addErrorMessage("This usecase can only be invoked from the authoring area.");
-                return;
-            }
-
-            String event = getEvent();
-
-            if (!WorkflowUtil.canInvoke(this.manager, getLogger(), getSourceDocument(), event)) {
-                setParameter(Publish.ALLOW_SINGLE_DOCUMENT, Boolean.toString(false));
-                addInfoMessage("The single document cannot be deactivated because the workflow event cannot be invoked.");
-            } else {
-                setParameter(Publish.ALLOW_SINGLE_DOCUMENT, Boolean.toString(true));
-            }
-
-            // get involved objects to lock them
-            Document doc = getSourceDocument();
-            try {
-                Document liveVersion = doc.getIdentityMap().getAreaVersion(doc,
-                        Publication.LIVE_AREA);
-                getInvolvedDocuments(liveVersion);
-            } catch (DocumentBuildException e) {
-                throw new RuntimeException(e);
-            }
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#getObjectsToLock()
-     */
-    protected Transactionable[] getObjectsToLock() throws UsecaseException {
-        try {
-            List nodes = new ArrayList();
-            Document doc = getSourceDocument();
-            Document liveVersion = doc.getIdentityMap().getAreaVersion(doc, Publication.LIVE_AREA);
-            DocumentSet set = getInvolvedDocuments(liveVersion);
-            Document[] documents = set.getDocuments();
-            for (int i = 0; i < documents.length; i++) {
-                nodes.addAll(Arrays.asList(documents[i].getRepositoryNodes()));
-            }
-
-            nodes.add(SiteUtil.getSiteStructure(this.manager,
-                    doc.getIdentityMap(),
-                    doc.getPublication(),
-                    Publication.LIVE_AREA).getRepositoryNode());
-            return (Transactionable[]) nodes.toArray(new Transactionable[nodes.size()]);
-
-        } catch (Exception e) {
-            throw new UsecaseException(e);
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-        if (isSubtreeEnabled()) {
-            deactivateAll(getSourceDocument());
-        } else {
-            deactivate(getSourceDocument());
-        }
-    }
-
-    /**
-     * Deactivates a document.
-     * @param authoringDocument The authoring document.
-     */
-    protected void deactivate(Document authoringDocument) {
-
-        boolean success = false;
-
-        DocumentManager documentManager = null;
-        try {
-            Document liveDocument = authoringDocument.getIdentityMap()
-                    .getAreaVersion(authoringDocument, Publication.LIVE_AREA);
-
-            documentManager = (DocumentManager) this.manager.lookup(DocumentManager.ROLE);
-            documentManager.delete(liveDocument);
-
-            WorkflowUtil.invoke(this.manager, getLogger(), authoringDocument, getEvent());
-            success = true;
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (getLogger().isDebugEnabled()) {
-                getLogger().debug("Deactivate document [" + authoringDocument + "]. Success: ["
-                        + success + "]");
-            }
-            if (documentManager != null) {
-                this.manager.release(documentManager);
-            }
-        }
-
-    }
-
-    /**
-     * @return The event to invoke.
-     */
-    private String getEvent() {
-        return "deactivate";
-    }
-
-    /**
-     * Deactivates a document or the subtree below a document, based on the parameter SUBTREE.
-     * @param document The document.
-     */
-    protected void deactivateAll(Document document) {
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Deactivating document [" + document + "]");
-            getLogger().debug("Subtree deactivation: [" + isSubtreeEnabled() + "]");
-        }
-
-        DocumentSet set = getInvolvedDocuments(document);
-        try {
-            set.visit(this);
-        } catch (PublicationException e) {
-            throw new RuntimeException(e);
-        }
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Publishing completed.");
-        }
-    }
-
-    protected DocumentSet getInvolvedDocuments(Document document) {
-        DocumentSet set;
-        ServiceSelector selector = null;
-        SiteManager siteManager = null;
-        try {
-            selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
-            siteManager = (SiteManager) selector.select(document.getPublication()
-                    .getSiteManagerHint());
-
-            Document[] descendants = siteManager.getRequiringResources(document);
-            set = new DocumentSet(descendants);
-            set.add(document);
-            siteManager.sortAscending(set);
-            set.reverse();
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (selector != null) {
-                if (siteManager != null) {
-                    selector.release(siteManager);
-                }
-                this.manager.release(selector);
-            }
-        }
-        return set;
-    }
-
-    /**
-     * Returns whether subtree publishing is enabled.
-     * @return A boolean value.
-     */
-    protected boolean isSubtreeEnabled() {
-        String value = getParameterAsString(Publish.SUBTREE);
-        return value != null;
-    }
-
-    /**
-     * @throws PublicationException
-     * @see org.apache.lenya.cms.publication.util.DocumentVisitor#visitDocument(org.apache.lenya.cms.publication.Document)
-     */
-    public void visitDocument(Document document) throws PublicationException {
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Visiting resource [" + document + "]");
-        }
-
-        try {
-            deactivateAllLanguageVersions(document);
-        } catch (WorkflowException e) {
-            throw new PublicationException(e);
-        }
-    }
-
-    /**
-     * Publishes all existing language versions of a document.
-     * @param document The document.
-     * @throws PublicationException if an error occurs.
-     * @throws WorkflowException
-     */
-    protected void deactivateAllLanguageVersions(Document document) throws PublicationException,
-            WorkflowException {
-        String[] languages = document.getPublication().getLanguages();
-        for (int i = 0; i < languages.length; i++) {
-            Document version = document.getIdentityMap().getLanguageVersion(document, languages[i]);
-            if (version.exists()
-                    && WorkflowUtil.canInvoke(this.manager, getLogger(), version, getEvent())) {
-                deactivate(version);
-            }
-        }
-    }
-
-}
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/Delete.java b/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/Delete.java
deleted file mode 100644
index baf716d..0000000
--- a/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/Delete.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.defaultpub.cms.usecases;
-
-import org.apache.lenya.cms.publication.util.DocumentSet;
-import org.apache.lenya.cms.site.SiteUtil;
-import org.apache.lenya.cms.workflow.WorkflowUtil;
-
-/**
- * Delete usecase handler.
- * 
- * @version $Id$
- */
-public class Delete extends org.apache.lenya.cms.site.usecases.Delete {
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckPreconditions()
-     */
-    protected void doCheckPreconditions() throws Exception {
-        super.doCheckPreconditions();
-        DocumentSet set = SiteUtil.getSubSite(this.manager, getSourceDocument());
-        if (!WorkflowUtil.canInvoke(this.manager, getLogger(), set, getEvent())) {
-            addErrorMessage("The workflow event cannot be invoked on all documents.");
-        }
-    }
-
-    /**
-     * @return The workflow event.
-     */
-    protected String getEvent() {
-        return "delete";
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        DocumentSet set = SiteUtil.getSubSite(this.manager, getSourceDocument());
-        WorkflowUtil.invoke(this.manager, getLogger(), set, getEvent(), true);
-        super.doExecute();
-    }
-
-}
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/Publish.java b/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/Publish.java
deleted file mode 100644
index d028f4e..0000000
--- a/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/Publish.java
+++ /dev/null
@@ -1,340 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.defaultpub.cms.usecases;
-
-import java.text.DateFormat;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.List;
-
-import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.DocumentManager;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationException;
-import org.apache.lenya.cms.publication.util.DocumentVisitor;
-import org.apache.lenya.cms.publication.util.DocumentSet;
-import org.apache.lenya.cms.site.SiteManager;
-import org.apache.lenya.cms.site.SiteUtil;
-import org.apache.lenya.cms.usecase.DocumentUsecase;
-import org.apache.lenya.cms.usecase.UsecaseException;
-import org.apache.lenya.cms.usecase.scheduling.UsecaseScheduler;
-import org.apache.lenya.cms.workflow.WorkflowUtil;
-import org.apache.lenya.transaction.Transactionable;
-import org.apache.lenya.workflow.WorkflowException;
-
-/**
- * Publish usecase handler.
- * 
- * @version $Id$
- */
-public class Publish extends DocumentUsecase implements DocumentVisitor {
-
-    protected static final String MISSING_DOCUMENTS = "missingDocuments";
-    protected static final String SUBTREE = "subtree";
-    protected static final String ALLOW_SINGLE_DOCUMENT = "allowSingleDocument";
-    protected static final String SCHEDULE = "schedule";
-    protected static final String SCHEDULE_TIME = "schedule.time";
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#initParameters()
-     */
-    protected void initParameters() {
-        super.initParameters();
-
-        Date now = new GregorianCalendar().getTime();
-        DateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
-        setParameter(SCHEDULE_TIME, format.format(now));
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#getObjectsToLock()
-     */
-    protected Transactionable[] getObjectsToLock() throws UsecaseException {
-
-        try {
-            List nodes = new ArrayList();
-            Document doc = getSourceDocument();
-            DocumentSet set = getInvolvedDocuments(doc);
-            Document[] documents = set.getDocuments();
-            for (int i = 0; i < documents.length; i++) {
-                nodes.addAll(Arrays.asList(documents[i].getRepositoryNodes()));
-                Document liveVersion = documents[i].getIdentityMap().getAreaVersion(documents[i],
-                        Publication.LIVE_AREA);
-                nodes.addAll(Arrays.asList(liveVersion.getRepositoryNodes()));
-            }
-
-            nodes.add(SiteUtil.getSiteStructure(this.manager,
-                    doc.getIdentityMap(),
-                    doc.getPublication(),
-                    Publication.LIVE_AREA).getRepositoryNode());
-            return (Transactionable[]) nodes.toArray(new Transactionable[nodes.size()]);
-        } catch (Exception e) {
-            throw new UsecaseException(e);
-        }
-    }
-
-    /**
-     * Checks if the workflow event is supported and the parent of the document exists in the live
-     * area.
-     * 
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckPreconditions()
-     */
-    protected void doCheckPreconditions() throws Exception {
-        super.doCheckPreconditions();
-        if (!hasErrors()) {
-
-            String event = getEvent();
-            Document document = getSourceDocument();
-
-            if (!document.getArea().equals(Publication.AUTHORING_AREA)) {
-                addErrorMessage("This usecase can only be invoked from the authoring area.");
-                return;
-            }
-
-            if (!WorkflowUtil.canInvoke(this.manager, getLogger(), getSourceDocument(), event)) {
-                setParameter(ALLOW_SINGLE_DOCUMENT, Boolean.toString(false));
-                addInfoMessage("The single document cannot be published because the workflow event cannot be invoked.");
-            } else {
-                setParameter(ALLOW_SINGLE_DOCUMENT, Boolean.toString(true));
-            }
-
-            Publication publication = document.getPublication();
-            DocumentIdentityMap map = document.getIdentityMap();
-
-            Document liveDocument = map.getAreaVersion(document, Publication.LIVE_AREA);
-
-            List missingDocuments = new ArrayList();
-
-            ServiceSelector selector = null;
-            SiteManager siteManager = null;
-            try {
-                selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
-                siteManager = (SiteManager) selector.select(publication.getSiteManagerHint());
-                Document[] requiredDocuments = siteManager.getRequiredResources(liveDocument);
-                for (int i = 0; i < requiredDocuments.length; i++) {
-                    if (!siteManager.containsInAnyLanguage(requiredDocuments[i])) {
-                        Document authoringVersion = map.getAreaVersion(requiredDocuments[i],
-                                Publication.AUTHORING_AREA);
-                        missingDocuments.add(authoringVersion);
-                    }
-                }
-            } catch (Exception e) {
-                throw new RuntimeException(e);
-            } finally {
-                if (selector != null) {
-                    if (siteManager != null) {
-                        selector.release(siteManager);
-                    }
-                    this.manager.release(selector);
-                }
-            }
-
-            if (!missingDocuments.isEmpty()) {
-                addErrorMessage("Cannot publish document unless the following documents are published:");
-                setParameter(MISSING_DOCUMENTS, missingDocuments);
-            }
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-
-        boolean schedule = Boolean.valueOf(getBooleanCheckboxParameter(SCHEDULE)).booleanValue();
-        if (schedule) {
-            deleteParameter(SCHEDULE);
-            String dateString = getParameterAsString(SCHEDULE_TIME);
-            DateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
-            UsecaseScheduler scheduler = null;
-            try {
-                Date date = null;
-                try {
-                    date = format.parse(dateString);
-                } catch (ParseException e) {
-                    addErrorMessage("The scheduler date must be of the form 'yyyy-MM-dd hh:mm:ss'.");
-                }
-                if (date != null) {
-                    scheduler = (UsecaseScheduler) this.manager.lookup(UsecaseScheduler.ROLE);
-                    scheduler.schedule(this, date);
-                }
-            } finally {
-                if (scheduler != null) {
-                    this.manager.release(scheduler);
-                }
-            }
-        } else {
-            super.doExecute();
-            if (isSubtreeEnabled()) {
-                publishAll(getSourceDocument());
-            } else {
-                publish(getSourceDocument());
-            }
-        }
-    }
-
-    /**
-     * Publishes a document.
-     * @param authoringDocument The authoring document.
-     */
-    protected void publish(Document authoringDocument) {
-
-        DocumentManager documentManager = null;
-        try {
-            documentManager = (DocumentManager) this.manager.lookup(DocumentManager.ROLE);
-            documentManager.copyToArea(authoringDocument, Publication.LIVE_AREA);
-            WorkflowUtil.invoke(this.manager, getLogger(), authoringDocument, getEvent());
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (documentManager != null) {
-                this.manager.release(documentManager);
-            }
-        }
-    }
-
-    /**
-     * @return The event to invoke.
-     */
-    private String getEvent() {
-        return "publish";
-    }
-
-    /**
-     * Publishes a document or the subtree below a document, based on the parameter SUBTREE.
-     * @param document The document.
-     */
-    protected void publishAll(Document document) {
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Publishing document [" + document + "]");
-            getLogger().debug("Subtree publishing: [" + isSubtreeEnabled() + "]");
-        }
-
-        DocumentSet set = getInvolvedDocuments(document);
-        try {
-            set.visit(this);
-        } catch (PublicationException e) {
-            throw new RuntimeException(e);
-        }
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Publishing completed.");
-        }
-    }
-
-    /**
-     * @param document The document.
-     * @return All documents that are involved in this transaction.
-     */
-    protected DocumentSet getInvolvedDocuments(Document document) {
-        DocumentSet set;
-
-        ServiceSelector selector = null;
-        SiteManager siteManager = null;
-        try {
-            selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
-            siteManager = (SiteManager) selector.select(document.getPublication()
-                    .getSiteManagerHint());
-
-            Document[] descendants = siteManager.getRequiringResources(document);
-            set = new DocumentSet(descendants);
-            set.add(document);
-            siteManager.sortAscending(set);
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        } finally {
-            if (selector != null) {
-                if (siteManager != null) {
-                    selector.release(siteManager);
-                }
-                this.manager.release(selector);
-            }
-        }
-        return set;
-    }
-
-    /**
-     * Returns whether subtree publishing is enabled.
-     * @return A boolean value.
-     */
-    protected boolean isSubtreeEnabled() {
-        String value = getParameterAsString(SUBTREE);
-        return value != null;
-    }
-
-    /**
-     * @throws PublicationException
-     * @see org.apache.lenya.cms.publication.util.DocumentVisitor#visitDocument(org.apache.lenya.cms.publication.Document)
-     */
-    public void visitDocument(Document document) throws PublicationException {
-
-        if (getLogger().isDebugEnabled()) {
-            getLogger().debug("Visiting resource [" + document + "]");
-        }
-
-        try {
-            Document parent = document.getIdentityMap().getParent(document);
-            boolean publish = true;
-            if (parent != null) {
-                Document liveParent = parent.getIdentityMap().getAreaVersion(parent,
-                        Publication.LIVE_AREA);
-                if (!liveParent.exists()) {
-                    publish = false;
-                }
-            }
-            if (publish) {
-                publishAllLanguageVersions(document);
-            }
-        } catch (WorkflowException e) {
-            throw new PublicationException(e);
-        }
-    }
-
-    /**
-     * Publishes all existing language versions of a document.
-     * @param document The document.
-     * @throws PublicationException if an error occurs.
-     * @throws WorkflowException
-     */
-    protected void publishAllLanguageVersions(Document document) throws PublicationException,
-            WorkflowException {
-        String[] languages = document.getPublication().getLanguages();
-
-        try {
-            for (int i = 0; i < languages.length; i++) {
-                Document version = document.getIdentityMap().getLanguageVersion(document,
-                        languages[i]);
-                if (version.exists()) {
-                    if (WorkflowUtil.canInvoke(this.manager, getLogger(), version, getEvent())) {
-                        publish(version);
-                    }
-                }
-            }
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-
-    }
-
-}
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/webdav/FilePropfind.java b/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/webdav/FilePropfind.java
deleted file mode 100644
index 8922954..0000000
--- a/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/webdav/FilePropfind.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*

- * Copyright  1999-2005 The Apache Software Foundation

- *

- *  Licensed 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.

- *

- */

-package org.apache.lenya.defaultpub.cms.usecases.webdav;

-

-import java.io.File;

-import java.util.Vector;

-

-import org.apache.avalon.framework.service.ServiceSelector;

-import org.apache.lenya.cms.rc.RCEnvironment;

-import org.apache.lenya.cms.rc.RCML;

-import org.apache.lenya.cms.rc.RCMLEntry;

-import org.apache.lenya.cms.rc.RevisionController;

-import org.apache.lenya.cms.site.SiteManager;

-import org.apache.lenya.cms.site.usecases.SiteUsecase;

-import org.apache.lenya.cms.publication.Document;

-import org.apache.lenya.cms.publication.Publication;

-import org.apache.lenya.cms.publication.PublicationFactory;

-import org.apache.lenya.cms.publication.PublicationException;

-import org.apache.lenya.cms.publication.URLInformation;

-import org.apache.lenya.cms.publication.DocumentBuilder;

-

-/**

- * Usecase to display the overview tab in the site area for a document.

- * 

- * @version $Id: Overview.java 179790 2005-06-03 13:45:13Z andreas $

- */

-public class FilePropfind extends SiteUsecase {

-

-	protected static final String DOCUMENT = "document";

-	protected static final String DOCUMENTS = "documents";

-    protected static final String SOURCEURL = "sourceURL";

-    protected static final String RC = "rc";

-

-    /**

-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#initParameters()

-     */

-    protected void initParameters() {

-        super.initParameters();

-

-        Publication _publication = this.getPublication();

-

-        ServiceSelector selector = null;

-        SiteManager siteManager = null;

-        DocumentBuilder docBuilder = null;

-        Vector docs = new Vector();

-        Vector checkedOut = new Vector();

-         

-        String request = getSourceURL();

-

-        try {

-            //get Parameters for RC

-            String publicationPath = _publication.getDirectory().getCanonicalPath();

-            RCEnvironment rcEnvironment = RCEnvironment.getInstance(_publication.getServletContext()

-                    .getCanonicalPath());

-            String rcmlDirectory = rcEnvironment.getRCMLDirectory();

-            rcmlDirectory = publicationPath + File.separator + rcmlDirectory;

-            String backupDirectory = rcEnvironment.getBackupDirectory();

-            backupDirectory = publicationPath + File.separator + backupDirectory;

-

-            // Initialize Revision Controller

-            RevisionController rc = new RevisionController(rcmlDirectory, backupDirectory, publicationPath);        	

-        	

-            Document doc = getTargetDocument(false); 

-            docs.add(doc);

-            

-            String filename = doc.getFile().getCanonicalPath();

-            filename = filename.substring(publicationPath.length());

-            RCMLEntry entry = rc.getRCML(filename).getLatestEntry();                    

-            if ((entry != null) && (entry.getType() == RCML.co) )

-              	checkedOut.add(entry);

-            else 

-               	checkedOut.add(null);

-

-            setParameter(DOCUMENTS, docs);

-            setParameter(RC, checkedOut);

-            setParameter(SOURCEURL,request);

-

-        } catch (Exception e) {

-            throw new RuntimeException(e);

-        } finally {

-            if (selector != null) {

-                if (siteManager != null) {

-                    selector.release(siteManager);

-                    selector.release(docBuilder);

-                }

-                this.manager.release(selector);

-            }

-        }

-    }

-

-    /**

-     * @return The area without the "info-" prefix.

-     */

-    public String getArea() {

-        URLInformation info = new URLInformation(getSourceURL());

-        return info.getArea();

-    }

-

-    /**

-     * Returns the document to be redirected to after the usecase has been completed. If the

-     * parameter <code>success</code> is false, the source document is returned (override this

-     * method to change this behaviour).

-     * @param success If the usecase was successfully completed.

-     * @return A document.

-     */

-    protected Document getTargetDocument(boolean success) {

-        Document document = (Document) getParameter(TARGET_DOCUMENT);

-        if (document == null) {

-            document = getSourceDocument();

-        }

-        return document;

-    }

-    

-    private Publication publication;

-

-    /**

-     * Access to the current publication. Use this when the publication is not yet known in the

-     * usecase: e.g. when creating a global asset. When adding a resource or a child to a document,

-     * access the publication via that document's interface instead.

-     * 

-     * @return the publication in which the use-case is being executed

-     */

-    protected Publication getPublication() {

-        if (this.publication == null) {

-            PublicationFactory factory = PublicationFactory.getInstance(getLogger());

-            try {

-                this.publication = factory.getPublication(this.manager, getSourceURL());

-            } catch (PublicationException e) {

-                throw new RuntimeException(e);

-            }

-        }

-        return this.publication;

-    }

-	

-}

diff --git a/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/webdav/Propfind.java b/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/webdav/Propfind.java
deleted file mode 100644
index ccbada3..0000000
--- a/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/webdav/Propfind.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*

- * Copyright  1999-2005 The Apache Software Foundation

- *

- *  Licensed 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.

- *

- */

-package org.apache.lenya.defaultpub.cms.usecases.webdav;

-

-import java.io.File;

-import java.util.Date;

-import java.util.Vector;

-import java.text.SimpleDateFormat;

-

-import org.apache.avalon.framework.service.ServiceSelector;

-import org.apache.lenya.cms.rc.RCEnvironment;

-import org.apache.lenya.cms.rc.RCML;

-import org.apache.lenya.cms.rc.RCMLEntry;

-import org.apache.lenya.cms.rc.RevisionController;

-import org.apache.lenya.cms.site.SiteManager;

-import org.apache.lenya.cms.site.usecases.SiteUsecase;

-import org.apache.lenya.cms.publication.Document;

-import org.apache.lenya.cms.publication.Publication;

-import org.apache.lenya.cms.publication.PublicationFactory;

-import org.apache.lenya.cms.publication.PublicationException;

-import org.apache.lenya.cms.publication.URLInformation;

-import org.apache.lenya.cms.publication.DocumentBuilder;

-

-/**

- * Usecase to provide WebDAV propfind support for a document.

- * 

- * @version $Id: Overview.java 179790 2005-06-03 13:45:13Z andreas $

- */

-public class Propfind extends SiteUsecase {

-

-	protected static final String DOCUMENT = "document";

-	protected static final String DOCUMENTS = "documents";

-    protected static final String SOURCEURL = "sourceURL";

-    protected static final String DATEFORMAT = "dateFormat";

-    protected static final String RC = "rc";

-

-    /**

-     * Ctor.

-     */

-    public Propfind() {

-        super();

-    }

-

-    /**

-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#initParameters()

-     */

-    protected void initParameters() {

-        super.initParameters();

- 

-        Publication _publication = this.getPublication();

-

-        ServiceSelector selector = null;

-        SiteManager siteManager = null;

-        DocumentBuilder docBuilder = null;

-        Vector docs = new Vector();

-        Vector checkedOut = new Vector();

-         

-        String request = getSourceURL();

-        if(request.endsWith(".html"))

-        	request = request.substring(0,request.indexOf(".html"));

-        if(!request.endsWith("/"))

-        	request = request+"/";

-        try {

-            //get Parameters for RC

-            String publicationPath = _publication.getDirectory().getCanonicalPath();

-            RCEnvironment rcEnvironment = RCEnvironment.getInstance(_publication.getServletContext()

-                    .getCanonicalPath());

-            String rcmlDirectory = rcEnvironment.getRCMLDirectory();

-            rcmlDirectory = publicationPath + File.separator + rcmlDirectory;

-            String backupDirectory = rcEnvironment.getBackupDirectory();

-            backupDirectory = publicationPath + File.separator + backupDirectory;

-

-            // Initialize Revision Controller

-            RevisionController rc = new RevisionController(rcmlDirectory, backupDirectory, publicationPath);        	

-        	

-        	selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");

-            siteManager = (SiteManager) selector.select(_publication.getSiteManagerHint());

-            Document[] documents = siteManager.getDocuments(getDocumentIdentityMap(),_publication,this.getArea());

-

-            selector = (ServiceSelector) this.manager.lookup(DocumentBuilder.ROLE + "Selector");

-            docBuilder = (DocumentBuilder) selector.select(_publication.getDocumentBuilderHint());

-            

-            for(int i=0; i< documents.length; i++) {

-            	String test = documents[i].getCanonicalWebappURL().replaceFirst("/[^/]*.html","");

-                if(!test.endsWith("/"))

-                	test = test+"/";

-            	if(test.equals(request)){

-                    docs.add(documents[i]);

-

-            		String filename = documents[i].getFile().getCanonicalPath();

-            		filename = filename.substring(publicationPath.length());

-                    RCMLEntry entry = rc.getRCML(filename).getLatestEntry();                    

-                    if ((entry != null) && (entry.getType() == RCML.co) )

-                    	checkedOut.add(entry);

-                    else 

-                    	checkedOut.add(null);

-                    //get additional language documents

-                    String[] langs = documents[i].getLanguages();

-                    for(int j=0; j< langs.length; j++) {

-                    	if(!(langs[j].equals(documents[i].getLanguage()))) {

-                    		String url = documents[i].getCanonicalWebappURL().replaceFirst(".html$","_"+langs[j]+".html");

-                    		Document langDoc = docBuilder.buildDocument(documents[i].getIdentityMap(),_publication,url);

-                    		docs.add(langDoc);

-

-                    		filename = langDoc.getFile().getCanonicalPath();

-                    		filename = filename.substring(publicationPath.length());

-                            entry = rc.getRCML(filename).getLatestEntry();                    

-                            if ((entry != null) && (entry.getType() == RCML.co) )

-                            	checkedOut.add(entry);

-                            else 

-                            	checkedOut.add(null);

-                    	}

-                    }

-            	}

-            }

-            setParameter(DOCUMENTS, docs);

-            setParameter(RC, checkedOut);

-            setParameter(SOURCEURL,request);

-            SimpleDateFormat format = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss");

-            setParameter(DATEFORMAT, format);

-            Date rootModDate = new Date();

-            setParameter("rootModDate",rootModDate);

-            String defaultLang = _publication.getDefaultLanguage();

-            setParameter("defaultLang",defaultLang);

-            

-

-        } catch (Exception e) {

-            throw new RuntimeException(e);

-        } finally {

-            if (selector != null) {

-                if (siteManager != null) {

-                    selector.release(siteManager);

-                    selector.release(docBuilder);

-                }

-                this.manager.release(selector);

-            }

-        }

-    }

-

-    /**

-     * @return The area without the "info-" prefix.

-     */

-    public String getArea() {

-        URLInformation info = new URLInformation(getSourceURL());

-        return info.getArea();

-    }

-

-    private Publication publication;

-

-    /**

-     * Access to the current publication. Use this when the publication is not yet known in the

-     * usecase: e.g. when creating a global asset. When adding a resource or a child to a document,

-     * access the publication via that document's interface instead.

-     * 

-     * @return the publication in which the use-case is being executed

-     */

-    protected Publication getPublication() {

-        if (this.publication == null) {

-            PublicationFactory factory = PublicationFactory.getInstance(getLogger());

-            try {

-                this.publication = factory.getPublication(this.manager, getSourceURL());

-            } catch (PublicationException e) {

-                throw new RuntimeException(e);

-            }

-        }

-        return this.publication;

-    }

-	

-}

diff --git a/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/webdav/Put.java b/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/webdav/Put.java
deleted file mode 100644
index 3382b8b..0000000
--- a/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/webdav/Put.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-package org.apache.lenya.defaultpub.cms.usecases.webdav;
-
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.lenya.cms.cocoon.source.SourceUtil;
-import org.apache.lenya.cms.publication.Document;
-import org.apache.lenya.cms.publication.DocumentIdToPathMapper;
-import org.apache.lenya.cms.usecase.DocumentUsecase;
-import org.apache.lenya.cms.usecase.UsecaseException;
-import org.apache.lenya.transaction.Transactionable;
-import org.apache.lenya.workflow.WorkflowManager;
-
-/**
- * Supports WebDAV PUT.
- * 
- * @version $Id$
- */
-public class Put extends DocumentUsecase {
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute()
-     */
-    protected void doExecute() throws Exception {
-        super.doExecute();
-        SourceResolver resolver = null;
-        WorkflowManager wfManager = null;
- 
-        try {
-            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-
-            Document doc = getSourceDocument();
-            DocumentIdToPathMapper mapper = doc.getPublication().getPathMapper();
-            String path = mapper.getPath(doc.getId(), getSourceDocument().getLanguage());
-            String sourceUri = doc.getSourceURI();
-            String pubId = doc.getPublication().getId();
-            String tempSourceUri = "cocoon:/request/PUT"; 
-
-            SourceUtil.copy(resolver, tempSourceUri, sourceUri, true);
-
-
-        } finally {
-            if (resolver != null) {
-                this.manager.release(resolver);
-            }
-            if (wfManager != null) {
-                this.manager.release(wfManager);
-            }
-        }
-    }
-
-    /**
-     * @see org.apache.lenya.cms.usecase.AbstractUsecase#getObjectsToLock()
-     */
-    protected Transactionable[] getObjectsToLock() throws UsecaseException {
-        return getSourceDocument().getRepositoryNodes();
-    }
-
-}
diff --git a/src/webapp/lenya/pubs/default/lenya/content/publishing/publish-screen.xsp b/src/webapp/lenya/pubs/default/lenya/content/publishing/publish-screen.xsp
deleted file mode 100644
index b203a4c..0000000
--- a/src/webapp/lenya/pubs/default/lenya/content/publishing/publish-screen.xsp
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: publish-screen.xsp,v 1.4 2004/03/13 12:42:20 gregor Exp $ -->
-
-<xsp:page
-       language="java"
-       xmlns:xsp="http://apache.org/xsp"
-       xmlns:input="http://apache.org/cocoon/xsp/input/1.0"
-       xmlns:usecase="http://apache.org/cocoon/lenya/usecase/1.0"
-       xmlns:sch="http://apache.org/cocoon/lenya/scheduler/1.0"
-       xmlns:xsp-request="http://apache.org/xsp/request/2.0"
-       >
-
-<usecase:publish>
-
-  <usecase:document-id><input:get-attribute module="page-envelope" name="document-id" as="string"/></usecase:document-id>
-  <usecase:uris><xsp-request:get-uri/></usecase:uris>
-  <usecase:sources><input:get-attribute module="page-envelope" as="string" name="document-path"/></usecase:sources>
-  <usecase:publication-id><input:get-attribute module="page-envelope" name="publication-id" as="string"/></usecase:publication-id>
-  <usecase:context-prefix><input:get-attribute module="page-envelope" name="context-prefix" as="string"/></usecase:context-prefix>
-  <usecase:area><input:get-attribute module="page-envelope" name="area" as="string"/></usecase:area>
-  <usecase:language><input:get-attribute module="page-envelope" name="document-language" as="string"/></usecase:language>
-  
-  <!-- FIXME: this should be defined in the workflow schema -->
-  <usecase:task-id>publish</usecase:task-id>
-
-  <!-- add date for scheduler -->
-  <xsp:logic>
-    java.util.GregorianCalendar calendar = new java.util.GregorianCalendar();
-  </xsp:logic>
-  
-  <sch:current-date>
-    <sch:year><xsp:expr>calendar.get(java.util.Calendar.YEAR)</xsp:expr></sch:year>
-    <sch:month><xsp:expr>calendar.get(java.util.Calendar.MONTH) + 1</xsp:expr></sch:month>
-    <sch:day><xsp:expr>calendar.get(java.util.Calendar.DAY_OF_MONTH)</xsp:expr></sch:day>
-    <sch:hour><xsp:expr>calendar.get(java.util.Calendar.HOUR_OF_DAY)</xsp:expr></sch:hour>
-    <sch:minute><xsp:expr>calendar.get(java.util.Calendar.MINUTE)</xsp:expr></sch:minute>
-    <sch:second><xsp:expr>calendar.get(java.util.Calendar.SECOND)</xsp:expr></sch:second>
-  </sch:current-date>
-  
-</usecase:publish>
-
-</xsp:page>
diff --git a/src/webapp/lenya/pubs/default/lenya/doctypes/homepage/doctype.xconf b/src/webapp/lenya/pubs/default/lenya/doctypes/homepage/doctype.xconf
deleted file mode 100644
index d4e0f71..0000000
--- a/src/webapp/lenya/pubs/default/lenya/doctypes/homepage/doctype.xconf
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: doctypes.xconf 164635 2005-04-25 20:01:43Z tschlabach $ -->
-
-<!--+
-    | This configuration file is read by the
-    | org.apache.lenya.cms.publication.DocumentTypeBuilder
-    | to digest the resource types known to the publication
-    +-->
-
-<resource-type name="homepage">
-  <schema src="xhtml.rng"/>
-  <creator src="org.apache.lenya.cms.authoring.DefaultBranchCreator">
-    <sample-name>homepage.xml</sample-name>
-  </creator>
-  <link-attribute xpath="//*[namespace-uri() = 'http://www.w3.org/1999/xhtml']/@href"/>
-</resource-type>
diff --git a/src/webapp/lenya/pubs/default/lenya/doctypes/homepage/samples/homepage.xml b/src/webapp/lenya/pubs/default/lenya/doctypes/homepage/samples/homepage.xml
deleted file mode 100644
index 588c40c..0000000
--- a/src/webapp/lenya/pubs/default/lenya/doctypes/homepage/samples/homepage.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<html xmlns="http://www.w3.org/1999/xhtml" 
-      xmlns:xhtml="http://www.w3.org/1999/xhtml" 
-      xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0"
->
-  <head>
-    <title>Default Publication</title>
-  </head>
-  <body>
-    <h1>Default Publication</h1>
-    <p>Welcome to the default Lenya publication!</p>
-    <p>The purpose of this publication is</p>
-    <ul>
-      <li>to show beginners the basic functionality of the Lenya CMS,</li>
-      <li>to provide an "out of the box" publication that can be easily adapted and used, and</li>
-      <li>to provide a basis for reference implementations of new concepts and best practices.</li>
-    </ul>
-    <p>
-    You won't find any fancy and confusing bells and whistles here, but the
-    publication contains everything you need to get started.
-    </p>
-  </body>
-</html>
diff --git a/src/webapp/lenya/pubs/default/lenya/resources/i18n/cmsui.xml b/src/webapp/lenya/pubs/default/lenya/resources/i18n/cmsui.xml
deleted file mode 100644
index 26ce8a3..0000000
--- a/src/webapp/lenya/pubs/default/lenya/resources/i18n/cmsui.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-   
-   Copyright 2004 The Apache Software Foundation
-
-   Licensed 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.
-
-   
-   $Id: cmsui.xml,v 1.2 2004/03/13 12:24:30 roku Exp $
-   
--->
-
-<catalogue xml:lang="en">
- 
-  <message key="default.createdoc.idtaken">The ID you've entered is already taken. Please choose another one.</message>
- 
-  <message key="Create new language version">Create new language version</message>
-  <message key="New language for existing Document">New language for existing Document</message>
-  <message key="default.createdoc.info.all-language-versions-exists">There are already versions of this document for all languages.</message>
-
-</catalogue>
diff --git a/src/webapp/lenya/pubs/default/lenya/resources/i18n/cmsui_de.xml b/src/webapp/lenya/pubs/default/lenya/resources/i18n/cmsui_de.xml
deleted file mode 100644
index 91a30bf..0000000
--- a/src/webapp/lenya/pubs/default/lenya/resources/i18n/cmsui_de.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-   
-   Copyright 2004 The Apache Software Foundation
-
-   Licensed 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.
-  
- 
-   $Id: cmsui_de.xml,v 1.3 2004/04/17 07:22:45 roku Exp $ 
-   
--->
-
-<catalogue xml:lang="de">
-
-  <message key="default.doc.create.idtaken">Die eingebene ID ist schon vergeben. Bitte wä;hlen Sie eine andere ID.</message>
-
-  <message key="Create new language version">Neue Sprachversion anlegen</message>
-  <message key="New language for existing Document">Neue Sprachversion für existierendes Dokument anlegen</message>
-  <message key="default.createdoc.info.all-language-versions-exists">Das Dokument existiert bereits in allen notwendigen Sprachen.</message>
-  
-</catalogue>
-
diff --git a/src/webapp/lenya/pubs/default/lenya/resources/i18n/cmsui_es.xml b/src/webapp/lenya/pubs/default/lenya/resources/i18n/cmsui_es.xml
deleted file mode 100644
index f396029..0000000
--- a/src/webapp/lenya/pubs/default/lenya/resources/i18n/cmsui_es.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-   
-   Copyright 2004 The Apache Software Foundation
-
-   Licensed 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.
-
-   
-   $Id: cmsui_es.xml,v 1.3 2004/04/16 11:34:01 roku Exp $
-
-   @translators Salvador Cobrero <salvador_cobrero_jimenez at dmr-consulting dot com>
-   
--->
-
-<catalogue xml:lang="es">
-
-  <message key="default.createdoc.idtaken">El ID introducido ya existe. Por favor, escoja otro.</message>
- 
-  <message key="Create new language version">Crear nueva version de idioma</message>
-  <message key="New language for existing Document">Nuevo idioma para el Documento existente</message>
-  <message key="default.createdoc.info.all-language-versions-exists">Ya existen versiones de este documento para todos los idiomas.</message>
-
-</catalogue>
-
diff --git a/src/webapp/lenya/pubs/default/lenya/resources/i18n/cmsui_fr.xml b/src/webapp/lenya/pubs/default/lenya/resources/i18n/cmsui_fr.xml
deleted file mode 100644
index f6abc1b..0000000
--- a/src/webapp/lenya/pubs/default/lenya/resources/i18n/cmsui_fr.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-   
-   Copyright 2004 The Apache Software Foundation
-
-   Licensed 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.
-
-   
-   $Id: cmsui_fr.xml,v 1.5 2004/04/17 07:22:46 roku Exp $
-   
-   @translators Olivier Lange <wire at petit-atelier dot ch>
-   
--->
-
-<catalogue xml:lang="fr">
-
-  <message key="default.createdoc.idtaken">L'identifiant (ID) que vous avez choisi est déjà utilisé. Veuillez en choisir un autre.</message>
-  <message key="Create new language version">Créer une nouvelle traduction</message>
-  <message key="New language for existing Document">Nouvelle traduction d'un document existant</message>
-  <message key="default.createdoc.info.all-language-versions-exists">Les traductions de ce document existent déjà dans toutes les langues.</message>
-  
-</catalogue>
diff --git a/src/webapp/lenya/pubs/default/lenya/resources/i18n/cmsui_it.xml b/src/webapp/lenya/pubs/default/lenya/resources/i18n/cmsui_it.xml
deleted file mode 100644
index 43cb299..0000000
--- a/src/webapp/lenya/pubs/default/lenya/resources/i18n/cmsui_it.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-   
-   Copyright 2004 The Apache Software Foundation
-
-   Licensed 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.
-
-   
-   $Id: cmsui_it.xml,v 1.2 2004/05/01 19:40:00 roku Exp $
-   @translators Giampaolo Trapasso  <trapo at trapo dot it>
--->
-<catalogue xml:lang="it">
-	<message key="default.createdoc.idtaken">L'ID scelto è già utilizzato. Scegliere un altro ID.</message>
-	<message key="Create new language version">Crea nuova lingua</message>
-	<message key="New language for existing Document">Nuova lingua per un Documento esistente</message>
-	<message key="default.createdoc.info.all-language-versions-exists">Esistono già versioni di questo documento per tutte le lingue.</message>
-</catalogue>
diff --git a/src/webapp/lenya/pubs/default/lenya/resources/i18n/cmsui_ru.xml b/src/webapp/lenya/pubs/default/lenya/resources/i18n/cmsui_ru.xml
deleted file mode 100644
index b854c89..0000000
--- a/src/webapp/lenya/pubs/default/lenya/resources/i18n/cmsui_ru.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-

-<!--

-   

-   Copyright 2004 The Apache Software Foundation

-

-   Licensed 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.

-

-   

-   $Id: cmsui.xml 153091 2005-02-09 17:27:19Z edith $

-   

--->

-

-<catalogue xml:lang="ru">

- 

-  <message key="default.createdoc.idtaken">Введённый идентификатор занят. Выберете дьругой, пожалуйста.</message>

-  <message key="Create new language version">Создать версию на другом языке</message>

-  <message key="New language for existing Document">Перевести существующий документ</message>

-  <message key="default.createdoc.info.all-language-versions-exists">Версии этого документа уже есть на всех языках.</message>

-

-  <message key="last_published">Последняя публикация</message>

-</catalogue>
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/default/lenya/resources/schemas/homepage.rng b/src/webapp/lenya/pubs/default/lenya/resources/schemas/homepage.rng
deleted file mode 100644
index 2b87b61..0000000
--- a/src/webapp/lenya/pubs/default/lenya/resources/schemas/homepage.rng
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: xhtml.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-
-<!--+
-    | XHTML doctype
-    +-->
-
-<!--+
-    | Namespaces:
-    | lenya namespace is required for embedding assets.
-    +-->
-
-<grammar ns="http://www.w3.org/1999/xhtml"
-         xmlns="http://relaxng.org/ns/structure/1.0"
-         xmlns:xhtml="http://www.w3.org/1999/xhtml"
-         xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0"
-         >
-
-<include href="xhtml.rng"/>
-
-</grammar>
diff --git a/src/webapp/lenya/pubs/default/lenya/usecases/edit/forms/homepage.xsl b/src/webapp/lenya/pubs/default/lenya/usecases/edit/forms/homepage.xsl
deleted file mode 100644
index c5e6896..0000000
--- a/src/webapp/lenya/pubs/default/lenya/usecases/edit/forms/homepage.xsl
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: xhtml.xsl 42703 2004-03-13 12:57:53Z gregor $ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:xhtml="http://www.w3.org/1999/xhtml"
-  xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0"
-  xmlns:dc="http://purl.org/dc/elements/1.1/"
->
-
-<xsl:import href="xhtml.xsl"/>
-
-</xsl:stylesheet>  
diff --git a/src/webapp/lenya/pubs/default/lenya/usecases/edit/forms/links.xsl b/src/webapp/lenya/pubs/default/lenya/usecases/edit/forms/links.xsl
deleted file mode 100644
index b6f2a43..0000000
--- a/src/webapp/lenya/pubs/default/lenya/usecases/edit/forms/links.xsl
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns="http://apache.org/lenya/pubs/default/1.0"
-  xmlns:links="http://apache.org/lenya/pubs/default/1.0"
->
-
-<xsl:import href="../../../../../../usecases/edit/forms/form.xsl"/>
-
-<xsl:template match="links:links">
-  
-<namespace prefix="" uri="http://apache.org/lenya/pubs/default/1.0"/>
-  
-<node name="Title" select="links/title[@tagID='{title/@tagID}']">
-  <content><input type="text" name="&lt;xupdate:update select=&quot;/links/title[@tagID='{title/@tagID}']&quot;&gt;" size="40"><xsl:attribute name="value"><xsl:value-of select="title"/></xsl:attribute></input></content>
-</node>
-
-<xsl:apply-templates select="link"/>
-
-</xsl:template>
-
-</xsl:stylesheet>  
diff --git a/src/webapp/lenya/pubs/default/lenya/usecases/edit/forms/xhtml-common.xsl b/src/webapp/lenya/pubs/default/lenya/usecases/edit/forms/xhtml-common.xsl
deleted file mode 100644
index d367425..0000000
--- a/src/webapp/lenya/pubs/default/lenya/usecases/edit/forms/xhtml-common.xsl
+++ /dev/null
@@ -1,208 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: xhtml-common.xsl 153165 2005-02-10 06:01:01Z gregor $ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:xhtml="http://www.w3.org/1999/xhtml"
-  xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0"
-  xmlns:dc="http://purl.org/dc/elements/1.1/"
->
-
-<xsl:template match="xhtml:body">
-<node name="Body" />
-<xsl:apply-templates mode="body"/>
-</xsl:template>
-
-<xsl:template name="insertmenu">
-<xsl:param name="path"/>
-<xsl:variable name="ns">namespace=&quot;http://www.w3.org/1999/xhtml&quot;</xsl:variable>
-<insert-after select="{$path}[@tagID='{@tagID}']">
-  <element name="Paragraph" xupdate="&lt;xupdate:insert-after select=&quot;{$path}[@tagID='{@tagID}']&quot;&gt;&lt;xupdate:element name=&quot;xhtml:p&quot; {$ns}&gt;New Paragraph&lt;/xupdate:element&gt;&lt;/xupdate:insert-after&gt;"/>
-  <element name="Table" xupdate="&lt;xupdate:insert-after select=&quot;{$path}[@tagID='{@tagID}']&quot;&gt;&lt;xupdate:element name=&quot;xhtml:table&quot; {$ns}&gt;&lt;tr&gt;&lt;td&gt;New Table&lt;/td&gt;&lt;/tr&gt;&lt;/xupdate:element&gt;&lt;/xupdate:insert-after&gt;"/>
-  <element name="Unordered List" xupdate="&lt;xupdate:insert-after select=&quot;{$path}[@tagID='{@tagID}']&quot;&gt;&lt;xupdate:element name=&quot;xhtml:ul&quot; {$ns}&gt;&lt;li&gt;New Unordered List&lt;/li&gt;;&lt;/xupdate:element&gt;&lt;/xupdate:insert-after&gt;"/>
-  <element name="Ordered List" xupdate="&lt;xupdate:insert-after select=&quot;{$path}[@tagID='{@tagID}']&quot;&gt;&lt;xupdate:element name=&quot;xhtml:ol&quot; {$ns}&gt;&lt;li&gt;New Ordered List&lt;/li&gt;&lt;/xupdate:element&gt;&lt;/xupdate:insert-after&gt;"/>
-  <element name="Headline 1" xupdate="&lt;xupdate:insert-after select=&quot;{$path}[@tagID='{@tagID}']&quot;&gt;&lt;xupdate:element name=&quot;xhtml:h1&quot; {$ns}&gt;New Headline 1&lt;/xupdate:element&gt;&lt;/xupdate:insert-after&gt;"/>
-  <element name="Headline 2" xupdate="&lt;xupdate:insert-after select=&quot;{$path}[@tagID='{@tagID}']&quot;&gt;&lt;xupdate:element name=&quot;xhtml:h2&quot; {$ns}&gt;New Headline 2&lt;/xupdate:element&gt;&lt;/xupdate:insert-after&gt;"/>
-  <element name="Headline 3" xupdate="&lt;xupdate:insert-after select=&quot;{$path}[@tagID='{@tagID}']&quot;&gt;&lt;xupdate:element name=&quot;xhtml:h3&quot; {$ns}&gt;New Headline 3&lt;/xupdate:element&gt;&lt;/xupdate:insert-after&gt;"/>
-  <element name="Headline 4" xupdate="&lt;xupdate:insert-after select=&quot;{$path}[@tagID='{@tagID}']&quot;&gt;&lt;xupdate:element name=&quot;xhtml:h4&quot; {$ns}&gt;New Headline 4&lt;/xupdate:element&gt;&lt;/xupdate:insert-after&gt;"/>
-</insert-after>
-</xsl:template>
-
-  <xsl:template match="xhtml:p" mode="body">
-    <xsl:choose >
-      <xsl:when test="xhtml:object">
-	<xsl:apply-templates select="xhtml:object" mode="body"/>
-      </xsl:when>
-      <xsl:otherwise>
-	<node name="Paragraph" select="/*/xhtml:body/xhtml:p[@tagID='{@tagID}']">
-	  <action><delete name="&lt;xupdate:remove select=&quot;/*/xhtml:body/xhtml:p[@tagID='{@tagID}']&quot;/&gt;"/></action>
-	  <content>
-	    <textarea name="&lt;xupdate:update select=&quot;/*/xhtml:body/xhtml:p[@tagID='{@tagID}']&quot;&gt;" cols="40" rows="30">
-	      <xsl:copy-of select="node()"/>
-	    </textarea>
-	  </content>
-	</node>
-	
-	<xsl:call-template name="insertmenu"><xsl:with-param name="path">/*/xhtml:body/xhtml:p</xsl:with-param></xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-<xsl:template match="xhtml:table" mode="body">
-<node name="Table" select="/*/xhtml:body/xhtml:table[@tagID='{@tagID}']">
-  <action><delete name="&lt;xupdate:remove select=&quot;/*/xhtml:body/xhtml:table[@tagID='{@tagID}']&quot;/&gt;"/></action>
-  <content>
-    <textarea name="&lt;xupdate:update select=&quot;/*/xhtml:body/xhtml:table[@tagID='{@tagID}']&quot;&gt;" cols="40" rows="30">
-      <xsl:copy-of select="."/>
-    </textarea>
-  </content>
-</node>
-
-<xsl:call-template name="insertmenu"><xsl:with-param name="path">/*/xhtml:body/xhtml:table</xsl:with-param></xsl:call-template>
-
-</xsl:template>
-
-<xsl:template match="xhtml:ul" mode="body">
-<node name="Unordered List" select="/*/xhtml:body/xhtml:ul[@tagID='{@tagID}']">
-  <action><delete name="&lt;xupdate:remove select=&quot;/*/xhtml:body/xhtml:ul[@tagID='{@tagID}']&quot;/&gt;"/></action>
-  <content>
-    <textarea name="&lt;xupdate:update select=&quot;/*/xhtml:body/xhtml:ul[@tagID='{@tagID}']&quot;&gt;" cols="40" rows="30">
-      <xsl:copy-of select="node()"/>
-    </textarea>
-  </content>
-</node>
-
-<xsl:call-template name="insertmenu"><xsl:with-param name="path">/*/xhtml:body/xhtml:ul</xsl:with-param></xsl:call-template>
-
-</xsl:template>
-
-<xsl:template match="xhtml:ol" mode="body">
-<node name="Ordered List" select="/*/xhtml:body/xhtml:ol[@tagID='{@tagID}']">
-  <action><delete name="&lt;xupdate:remove select=&quot;/*/xhtml:body/xhtml:ol[@tagID='{@tagID}']&quot;/&gt;"/></action>
-  <content>
-    <textarea name="&lt;xupdate:update select=&quot;/*/xhtml:body/xhtml:ol[@tagID='{@tagID}']&quot;&gt;" cols="40" rows="30">
-      <xsl:copy-of select="node()"/>
-    </textarea>
-  </content>
-</node>
-
-<xsl:call-template name="insertmenu"><xsl:with-param name="path">/*/xhtml:body/xhtml:ol</xsl:with-param></xsl:call-template>
-
-</xsl:template>
-
-<xsl:template match="xhtml:h1" mode="body">
-<node name="Headline 1" select="/*/xhtml:body/xhtml:h1[@tagID='{@tagID}']">
-  <action><delete name="&lt;xupdate:remove select=&quot;/*/xhtml:body/xhtml:h1[@tagID='{@tagID}']&quot;/&gt;"/></action>
-  <content>
-    <textarea name="&lt;xupdate:update select=&quot;/*/xhtml:body/xhtml:h1[@tagID='{@tagID}']&quot;&gt;" cols="40" rows="3">
-      <xsl:copy-of select="node()"/>
-    </textarea>
-  </content>
-</node>
-
-<xsl:call-template name="insertmenu"><xsl:with-param name="path">/*/xhtml:body/xhtml:h1</xsl:with-param></xsl:call-template>
-
-</xsl:template>
-    
-<xsl:template match="xhtml:h2" mode="body">
-<node name="Headline 2" select="/*/xhtml:body/xhtml:h2[@tagID='{@tagID}']">
-  <action><delete name="&lt;xupdate:remove select=&quot;/*/xhtml:body/xhtml:h2[@tagID='{@tagID}']&quot;/&gt;"/></action>
-  <content>
-    <textarea name="&lt;xupdate:update select=&quot;/*/xhtml:body/xhtml:h2[@tagID='{@tagID}']&quot;&gt;" cols="40" rows="3">
-      <xsl:copy-of select="node()"/>
-    </textarea>
-  </content>
-</node>
-
-<xsl:call-template name="insertmenu"><xsl:with-param name="path">/*/xhtml:body/xhtml:h2</xsl:with-param></xsl:call-template>
-
-</xsl:template>
-
-<xsl:template match="xhtml:h3" mode="body">
-<node name="Headline 3" select="/*/xhtml:body/xhtml:h3[@tagID='{@tagID}']">
-  <action><delete name="&lt;xupdate:remove select=&quot;/*/xhtml:body/xhtml:h3[@tagID='{@tagID}']&quot;/&gt;"/></action>
-  <content>
-    <textarea name="&lt;xupdate:update select=&quot;/*/xhtml:body/xhtml:h3[@tagID='{@tagID}']&quot;&gt;" cols="40" rows="3">
-      <xsl:copy-of select="node()"/>
-    </textarea>
-  </content>
-</node>
-
-<xsl:call-template name="insertmenu"><xsl:with-param name="path">/*/xhtml:body/xhtml:h3</xsl:with-param></xsl:call-template>
-
-</xsl:template>
-
-<xsl:template match="xhtml:h4" mode="body">
-<node name="Headline 4" select="/*/xhtml:body/xhtml:h4[@tagID='{@tagID}']">
-  <action><delete name="&lt;xupdate:remove select=&quot;/*/xhtml:body/xhtml:h4[@tagID='{@tagID}']&quot;/&gt;"/></action>
-  <content>
-    <textarea name="&lt;xupdate:update select=&quot;/*/xhtml:body/xhtml:h4[@tagID='{@tagID}']&quot;&gt;" cols="40" rows="3">
-      <xsl:copy-of select="node()"/>
-    </textarea>
-  </content>
-</node>
-
-<xsl:call-template name="insertmenu"><xsl:with-param name="path">/*/xhtml:body/xhtml:h4</xsl:with-param></xsl:call-template>
-
-</xsl:template>
-
-<xsl:template match="xhtml:hr" mode="body">
-<node name="Horizontal Rule" select="/*/xhtml:body/xhtml:hr[@tagID='{@tagID}']">
-  <action><delete name="&lt;xupdate:remove select=&quot;/*/xhtml:body/xhtml:hr[@tagID='{@tagID}']&quot;/&gt;"/></action>
-</node>
-
-<xsl:call-template name="insertmenu"><xsl:with-param name="path">/*/xhtml:body/xhtml:hr</xsl:with-param></xsl:call-template>
-
-</xsl:template>
-
-  <xsl:template match="xhtml:object" mode="body">
-    <node name="Object">
-      <action><delete name="&lt;xupdate:remove select=&quot;/*/xhtml:body/xhtml:p/xhtml:object[@tagID='{@tagID}']&quot;/&gt;"/></action>
-      <content>
-	<input type="text" name="&lt;xupdate:update select=&quot;/*/xhtml:body/xhtml:p/xhtml:object[@tagID='{@tagID}']&quot;&gt;" size="40">
-	  <xsl:attribute name="value">
-      <xsl:value-of select="@data"/>
-	  </xsl:attribute>
-	</input>
-      </content>
-    </node>
-    
-    <xsl:call-template name="insertmenu"><xsl:with-param name="path">/*/xhtml:body</xsl:with-param></xsl:call-template>
-    
-  </xsl:template>
-
-  <xsl:template match="lenya:asset" mode="body">
-    <node name="Asset">
-      <action>
-	<delete name="&lt;xupdate:remove select=&quot;/*/xhtml:body/lenya:asset[@tagID='{@tagID}']&quot;/&gt;"/>
-      </action>
-      <content>
-	<input type="text" name="&lt;xupdate:update select=&quot;/*/xhtml:body/lenya:asset[@tagID='{@tagID}']&quot;&gt;" size="40">
-	  <xsl:attribute name="value">
-	    <xsl:value-of select="@src"/>
-	  </xsl:attribute>
-	</input>
-      </content>
-    </node>
-
-    <xsl:call-template name="insertmenu"><xsl:with-param name="path">/*/xhtml:body</xsl:with-param></xsl:call-template>
-    
-  </xsl:template>
-
-</xsl:stylesheet>  
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/default/lenya/usecases/edit/forms/xhtml.xsl b/src/webapp/lenya/pubs/default/lenya/usecases/edit/forms/xhtml.xsl
deleted file mode 100644
index af3935e..0000000
--- a/src/webapp/lenya/pubs/default/lenya/usecases/edit/forms/xhtml.xsl
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: xhtml.xsl 42703 2004-03-13 12:57:53Z gregor $ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:xhtml="http://www.w3.org/1999/xhtml"
-  xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0"
-  xmlns:dc="http://purl.org/dc/elements/1.1/"
->
-
-<xsl:import href="../../../../../../usecases/edit/forms/form.xsl"/>
-<xsl:import href="xhtml-common.xsl"/>
-
-<xsl:template match="xhtml:html">
-  
-<namespace prefix="xhtml" uri="http://www.w3.org/1999/xhtml"/>
-<namespace prefix="lenya" uri="http://apache.org/cocoon/lenya/page-envelope/1.0"/>
-<namespace prefix="dc" uri="http://purl.org/dc/elements/1.1/"/>
-  
-<node name="Title" select="/xhtml:html/lenya:meta/dc:title[@tagID='{lenya:meta/dc:title/@tagID}']">
-  <content><input type="text" name="&lt;xupdate:update select=&quot;/xhtml:html/lenya:meta/dc:title[@tagID='{lenya:meta/dc:title/@tagID}']&quot;&gt;" size="40"><xsl:attribute name="value"><xsl:value-of select="lenya:meta/dc:title"/></xsl:attribute></input></content>
-</node>
-
-<xsl:apply-templates select="xhtml:body"/>
-
-</xsl:template>
-
-</xsl:stylesheet>  
diff --git a/src/webapp/lenya/pubs/default/lenya/usecases/site/create.jx b/src/webapp/lenya/pubs/default/lenya/usecases/site/create.jx
deleted file mode 100644
index 590fef9..0000000
--- a/src/webapp/lenya/pubs/default/lenya/usecases/site/create.jx
+++ /dev/null
@@ -1,140 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<page:page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" 
-           xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" 
-           xmlns="http://www.w3.org/1999/xhtml" 
-           xmlns:i18n="http://apache.org/cocoon/i18n/2.1" >
-
-  <page:title><i18n:text>New Document</i18n:text></page:title>
-  <page:body>
-    <div class="lenya-box">
-      <div class="lenya-box-title">
-        <i18n:text>New Document</i18n:text>
-      </div>
-
-      <jx:import uri="templates/messages.jx"/>
-
-      <div class="lenya-box-body">
-        <form>
-          <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-          <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-          <table class="lenya-table-noborder">
-              <tr>
-                <td class="lenya-entry-caption">
-                  <i18n:text>Parent ID</i18n:text>:</td>
-                <td>
-                  <jx:out value="${usecase.getParameter('parentId')}"/>
-                </td>
-              </tr>
-              <tr>
-                <td class="lenya-entry-caption">
-                  <label for="documentId"><i18n:text>Document ID</i18n:text>*: </label></td>
-                <td>
-                  <input class="lenya-form-element" type="text" name="documentId" value="${usecase.getParameter('documentId')}"/>
-                  <br/> (<i18n:text>No whitespace, no special characters</i18n:text>)</td>
-              </tr>
-              <tr>
-                <td class="lenya-entry-caption">
-                  <label for="title"><i18n:text>Navigation Title</i18n:text>*: </label></td>
-                <td>
-                  <input class="lenya-form-element" type="text" name="title" value="${usecase.getParameter('title')}"/>
-                </td>
-              </tr>
-              <tr>
-                <td class="lenya-entry-caption">
-                  <label for="relation"><i18n:text>Relation</i18n:text>*: </label>
-                </td>
-                <td>
-                    <jx:forEach var="relation" items="${usecase.getParameter('relations')}">
-                      <jx:choose>
-                        <jx:when test="${relation.equals(usecase.getParameter('relation'))}">
-                          <input type="radio" name="relation" value="${relation}" checked="checked"/><i18n:text>${relation}</i18n:text>
-                        </jx:when>
-                        <jx:otherwise>
-                          <input type="radio" name="relation" value="${relation}"/><i18n:text>${relation}</i18n:text>
-                        </jx:otherwise>
-                      </jx:choose>
-                    </jx:forEach>
-                </td>
-              </tr> 
-              <tr>
-                <td class="lenya-entry-caption">
-                  <label for="language"><i18n:text>Language</i18n:text>*: </label></td>
-                <td>
-                  <select class="lenya-form-element" name="language">
-                    <jx:forEach var="language" items="${usecase.getParameter('languages')}">
-                      <option value="${language}">${language}</option>
-                    </jx:forEach>
-                  </select>
-                </td>
-              </tr>
-              <tr>
-                <td class="lenya-entry-caption">
-                  <label for="creator"><i18n:text>Creator</i18n:text>:</label></td>
-                <td>
-                  <input class="lenya-form-element" type="text" name="creator" value="${usecase.getParameter('creator')}"/>
-                </td>
-              </tr>
-              <tr>
-                <td class="lenya-entry-caption">
-                  <label for="subject"><i18n:text>Subject</i18n:text>:</label></td>
-                <td>
-                  <input class="lenya-form-element" type="text" name="subject" value="${usecase.getParameter('subject')}"/>
-                </td>
-              </tr>
-              <tr>
-                <td class="lenya-entry-caption">
-                  <label for="publisher"><i18n:text>Publisher</i18n:text>:</label></td>
-                <td>
-                  <input class="lenya-form-element" type="text" name="publisher" value="${usecase.getParameter('publisher')}"/>
-                </td>
-              </tr>
-              <tr>
-                <td class="lenya-entry-caption">
-                  <i18n:text>Date</i18n:text>:</td>
-                <td>
-                  <jx:out value="${usecase.getParameter('date')}"/>
-                </td>
-              </tr>
-              <tr>
-                <td class="lenya-entry-caption">
-                  <label for="rights"><i18n:text>Rights</i18n:text>:</label></td>
-                <td>
-                  <input class="lenya-form-element" type="text" name="rights" value="${usecase.getParameter('rights')}"/>
-                </td>
-              </tr>
-              <tr>
-                <td class="lenya-entry-caption">* <i18n:text>required fields</i18n:text>
-                </td>
-              </tr>
-              <tr>
-                <td/>
-                <td>
-                  <input i18n:attr="value" type="submit" name="submit" value="Create"/>
-                  &#160;
-                  <input i18n:attr="value" type="submit" name="cancel" value="Cancel"/>
-                </td>
-              </tr>
-          </table>
-        </form>
-      </div>
-    </div>
-  </page:body>
-</page:page>
diff --git a/src/webapp/lenya/pubs/default/lenya/usecases/site/createLanguage.jx b/src/webapp/lenya/pubs/default/lenya/usecases/site/createLanguage.jx
deleted file mode 100644
index cb7ff8b..0000000
--- a/src/webapp/lenya/pubs/default/lenya/usecases/site/createLanguage.jx
+++ /dev/null
@@ -1,116 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<page:page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" 
-           xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" 
-           xmlns="http://www.w3.org/1999/xhtml" 
-           xmlns:i18n="http://apache.org/cocoon/i18n/2.1" >
-
-  <page:title><i18n:text>New Document</i18n:text></page:title>
-  <page:body>
-    <div class="lenya-box">
-      <div class="lenya-box-title">
-        <i18n:text>New Document</i18n:text>
-      </div>
-
-      <jx:import uri="templates/messages.jx"/>
-
-      <div class="lenya-box-body">
-        <form>
-          <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-          <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-          <table class="lenya-table-noborder">
-              <tr>
-                <td class="lenya-entry-caption">
-                  <i18n:text>Document ID</i18n:text>: </td>
-                <td>
-                  <jx:out value="${usecase.getParameter('documentId')}"/>
-                  <br/> (<i18n:text>No whitespace, no special characters</i18n:text>)</td>
-              </tr>
-              <tr>
-                <td class="lenya-entry-caption">
-                  <label for="title"><i18n:text>Navigation Title</i18n:text>*: </label></td>
-                <td>
-                  <input class="lenya-form-element" type="text" name="title" value="${usecase.getParameter('title')}"/>
-                </td>
-              </tr>
-              <tr>
-                <td class="lenya-entry-caption">
-                  <label for="language"><i18n:text>Language</i18n:text>*: </label></td>
-                <td>
-                  <select class="lenya-form-element" name="language">
-                    <jx:forEach var="language" items="${usecase.getParameter('languages')}">
-                      <option value="${language}">${language}</option>
-                    </jx:forEach>
-                  </select>
-                </td>
-              </tr>
-              <tr>
-                <td class="lenya-entry-caption">
-                  <label for="creator"><i18n:text>Creator</i18n:text>:</label></td>
-                <td>
-                  <input class="lenya-form-element" type="text" name="creator" value="${usecase.getParameter('creator')}"/>
-                </td>
-              </tr>
-              <tr>
-                <td class="lenya-entry-caption">
-                  <label for="subject"><i18n:text>Subject</i18n:text>:</label></td>
-                <td>
-                  <input class="lenya-form-element" type="text" name="subject" value="${usecase.getParameter('subject')}"/>
-                </td>
-              </tr>
-              <tr>
-                <td class="lenya-entry-caption">
-                  <label for="publisher"><i18n:text>Publisher</i18n:text>:</label></td>
-                <td>
-                  <input class="lenya-form-element" type="text" name="publisher" value="${usecase.getParameter('publisher')}"/>
-                </td>
-              </tr>
-              <tr>
-                <td class="lenya-entry-caption">
-                  <i18n:text>Date</i18n:text>:</td>
-                <td>
-                  <jx:out value="${usecase.getParameter('date')}"/>
-                </td>
-              </tr>
-              <tr>
-                <td class="lenya-entry-caption">
-                  <label for="rights"><i18n:text>Rights</i18n:text>:</label></td>
-                <td>
-                  <input class="lenya-form-element" type="text" name="rights" value="${usecase.getParameter('rights')}"/>
-                </td>
-              </tr>
-              <tr>
-                <td class="lenya-entry-caption">* <i18n:text>required fields</i18n:text>
-                </td>
-              </tr>
-              <tr>
-                <td/>
-                <td>
-                  <input i18n:attr="value" type="submit" name="submit" value="Create"/>
-                  &#160;
-                  <input i18n:attr="value" type="submit" name="cancel" value="Cancel"/>
-                </td>
-              </tr>
-          </table>
-        </form>
-      </div>
-    </div>
-  </page:body>
-</page:page>
diff --git a/src/webapp/lenya/pubs/default/lenya/usecases/webdav/401error.html b/src/webapp/lenya/pubs/default/lenya/usecases/webdav/401error.html
deleted file mode 100644
index f3c0b58..0000000
--- a/src/webapp/lenya/pubs/default/lenya/usecases/webdav/401error.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<html>

-<head><title>401 forbidden</title></head>

-<body>

-401 forbidden

-</body>

-</html>

diff --git a/src/webapp/lenya/pubs/default/lenya/usecases/webdav/NSclean.xsl b/src/webapp/lenya/pubs/default/lenya/usecases/webdav/NSclean.xsl
deleted file mode 100644
index b6cb3a6..0000000
--- a/src/webapp/lenya/pubs/default/lenya/usecases/webdav/NSclean.xsl
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0"?>

-<xsl:stylesheet version="1.0" 

-       xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 

-       xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"

-       xmlns:collection="http://apache.org/cocoon/collection/1.0"

-       xmlns:D="DAV:"

-       exclude-result-prefixes="jx">

-

-<!-- Identity transformation template -->			

-<xsl:template match="/ | @* | * | comment() | processing-instruction() | text()"> 

-	<xsl:copy> 

-		<xsl:apply-templates select="@* | * | comment() | processing-instruction() | text()"/> 

-	</xsl:copy> 

-</xsl:template> 

-

-<xsl:template match="D:multistatus">

-  <multistatus xmlns="DAV:" xmlns:collection="http://apache.org/cocoon/collection/1.0">

-    <xsl:apply-templates select="@* | * | processing-instruction() | text()"/>

-  </multistatus>

-</xsl:template>

-

-<xsl:template match="D:*">

-  <xsl:element name="{local-name()}" namespace="DAV:">

-    <xsl:apply-templates select="@* | * | processing-instruction() | text()"/>

-  </xsl:element>

-</xsl:template>

-

-</xsl:stylesheet>

diff --git a/src/webapp/lenya/pubs/default/lenya/usecases/webdav/dummy.xml b/src/webapp/lenya/pubs/default/lenya/usecases/webdav/dummy.xml
deleted file mode 100644
index 1376771..0000000
--- a/src/webapp/lenya/pubs/default/lenya/usecases/webdav/dummy.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0"?>

-<!--

-  Copyright 1999-2004 The Apache Software Foundation

-

-  Licensed 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.

--->

-

-<page/>

diff --git a/src/webapp/lenya/pubs/default/lenya/usecases/webdav/filePropfind.jx b/src/webapp/lenya/pubs/default/lenya/usecases/webdav/filePropfind.jx
deleted file mode 100644
index 2616263..0000000
--- a/src/webapp/lenya/pubs/default/lenya/usecases/webdav/filePropfind.jx
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0"?>

-<D:multistatus xmlns:D="DAV:"

-               xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" 

-               xmlns:collection="http://apache.org/cocoon/collection/1.0"> --&gt;

-      <jx:set var="sourceURL" value="${usecase.getParameter('sourceURL')}" />

-   

-      <jx:set var="checkedOut" value="${usecase.getParameter('rc')}" />   

-      <jx:forEach var="doc" items="${usecase.getParameter('documents')}" varStatus="status">

-       <jx:if test="${doc.getId()}">

-          <D:response>

-              <D:href>/${doc.getPublication().getId()}/${doc.getArea()}${doc.getId()}_${doc.getLanguage()}.html</D:href>

-              <D:propstat>

-                <D:prop>

-                  <D:displayname>${doc.getName()}_${doc.getLanguage()}.html</D:displayname>

-                  <D:getlastmodified>${doc.getLastModified()}</D:getlastmodified>

-                  <D:creationdate />

-                  <D:getcontenttype>text/html</D:getcontenttype>

-                  <D:getcontentlength>${doc.getFile().length()}</D:getcontentlength>

-                  <D:resourcetype />

-                  <D:lockdiscovery>

-                    <jx:if test="${checkedOut[status.index] != null}">

-                         <D:activelock>

-                              <D:locktype><D:write/></D:locktype>

-                              <D:lockscope><D:exclusive/></D:lockscope>

-                              <D:depth>0</D:depth>

-                              <D:owner><D:href>${checkedOut[status.index].getIdentity()}</D:href></D:owner>

-                              <D:timeout>Infinite</D:timeout>

-                              <D:locktoken>

-                                <D:href>${usecase.getParameter('sourceURL')}</D:href>

-                              </D:locktoken>

-                         </D:activelock>

-                    </jx:if>

-                  </D:lockdiscovery>

-                </D:prop>

-                <D:status>HTTP/1.1 200 OK</D:status>

-              </D:propstat>

-          </D:response>

-       </jx:if>

-      </jx:forEach>

-      

-</D:multistatus>

diff --git a/src/webapp/lenya/pubs/default/lenya/usecases/webdav/init.xsl b/src/webapp/lenya/pubs/default/lenya/usecases/webdav/init.xsl
deleted file mode 100644
index 8d9af88..0000000
--- a/src/webapp/lenya/pubs/default/lenya/usecases/webdav/init.xsl
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0"?>

-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

-

-    <xsl:param name="pubid" />

-

-	<xsl:template match="/">

-        <D:multistatus xmlns:D="DAV:" xmlns:collection="http://apache.org/cocoon/collection/1.0">

-           <D:response>

-              <D:href>/<xsl:value-of select="$pubid" />/</D:href>

-

-              <D:propstat>

-                 <D:prop>

-                    <D:displayname><xsl:value-of select="$pubid" /></D:displayname>

-

-                    <D:getlastmodified></D:getlastmodified>

-

-                    <D:creationdate />

-

-                    <D:resourcetype>

-                       <D:collection />

-                    </D:resourcetype>

-

-                    <D:getcontenttype>httpd/unix-directory</D:getcontenttype>

-

-                    <D:contentlength>0</D:contentlength>

-                 </D:prop>

-

-                 <D:status>HTTP/1.1 200 OK</D:status>

-              </D:propstat>

-           </D:response>

-

-           <D:response>

-              <D:href>/<xsl:value-of select="$pubid" />/authoring</D:href>

-

-              <D:propstat>

-                 <D:prop>

-                    <D:displayname>authoring</D:displayname>

-

-                    <D:getlastmodified></D:getlastmodified>

-

-                    <D:creationdate />

-

-                    <D:resourcetype>

-                       <D:collection />

-                    </D:resourcetype>

-

-                    <D:getcontenttype>httpd/unix-directory</D:getcontenttype>

-

-                    <D:contentlength>0</D:contentlength>

-                 </D:prop>

-

-                 <D:status>HTTP/1.1 200 OK</D:status>

-              </D:propstat>

-           </D:response>

-

-

-        </D:multistatus>	

-	</xsl:template>

-

-</xsl:stylesheet>

diff --git a/src/webapp/lenya/pubs/default/lenya/usecases/webdav/lock.xml b/src/webapp/lenya/pubs/default/lenya/usecases/webdav/lock.xml
deleted file mode 100644
index a74b958..0000000
--- a/src/webapp/lenya/pubs/default/lenya/usecases/webdav/lock.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-   <D:prop xmlns:D="DAV:">

-     <D:lockdiscovery>

-          <D:activelock>

-               <D:locktype><D:write/></D:locktype>

-               <D:lockscope><D:exclusive/></D:lockscope>

-               <D:depth>Infinity</D:depth>

-               <D:owner>

-                    <D:href>

-                         http://www.ics.uci.edu/~ejw/contact.html

-                    </D:href>

-               </D:owner>

-               <D:timeout>Second-604800</D:timeout>

-               <D:locktoken>

-                    <D:href>

-               opaquelocktoken:e71d4fae-5dec-22d6-fea5-00a0c91e6be4

-                    </D:href>

-               </D:locktoken>

-          </D:activelock>

-     </D:lockdiscovery>

-   </D:prop>

diff --git a/src/webapp/lenya/pubs/default/lenya/usecases/webdav/propfind.jx b/src/webapp/lenya/pubs/default/lenya/usecases/webdav/propfind.jx
deleted file mode 100644
index 7298501..0000000
--- a/src/webapp/lenya/pubs/default/lenya/usecases/webdav/propfind.jx
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0"?>

-<D:multistatus xmlns:D="DAV:"

-               xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" 

-               xmlns:collection="http://apache.org/cocoon/collection/1.0"> 

-      <jx:set var="sourceURL" value="${usecase.getParameter('sourceURL')}" />

-      <jx:set var="dateFormat" value="${usecase.getParameter('dateFormat')}"/>

-      <jx:set var="moddate" value="${usecase.getParameter('rootModDate')}"/>

-      <jx:set var="defaultLang" value="${usecase.getParameter('defaultLang')}"/>

-      <D:response>

-          <D:href>${sourceURL}</D:href>

-          <D:propstat>

-            <D:prop>

-              <D:displayname>authoring</D:displayname>

-              <D:getlastmodified>${dateFormat.format(moddate)}</D:getlastmodified>

-              <D:creationdate></D:creationdate>

-              <D:resourcetype>

-                <D:collection />

-              </D:resourcetype>

-              <D:getcontenttype>httpd/unix-directory</D:getcontenttype>

-              <D:contentlength>0</D:contentlength>

-              <D:lockdiscovery />

-            </D:prop>

-            <D:status>HTTP/1.1 200 OK</D:status>

-          </D:propstat>

-      </D:response>

-      <jx:forEach var="doc" items="${usecase.getParameter('documents')}">

-        <jx:if test="${doc.getId()}">

-          <jx:if test="${doc.getLanguage().equals(defaultLang)}">

-            <D:response>

-              <D:href>/${doc.getPublication().getId()}/${doc.getArea()}${doc.getId()}</D:href>

-              <D:propstat>

-                <D:prop>

-                  <D:displayname>${doc.getName()}</D:displayname>

-                  <D:getlastmodified>${dateFormat.format(doc.getLastModified())}</D:getlastmodified>

-                  <D:creationdate></D:creationdate>

-                  <D:resourcetype>

-                    <D:collection />

-                  </D:resourcetype>

-                  <D:getcontenttype>httpd/unix-directory</D:getcontenttype>

-                  <D:contentlength>0</D:contentlength>

-                  <D:lockdiscovery />

-                </D:prop>

-                <D:status>HTTP/1.1 200 OK</D:status>

-              </D:propstat>

-          </D:response>

-          </jx:if>

-        </jx:if>

-      </jx:forEach>

-      <jx:set var="checkedOut" value="${usecase.getParameter('rc')}" />

-      <jx:forEach var="doc" items="${usecase.getParameter('documents')}" varStatus="status">

-        <jx:if test="${doc.getId()}">

-          <D:response>

-              <D:href>/${doc.getPublication().getId()}/${doc.getArea()}${doc.getId()}_${doc.getLanguage()}.html</D:href>

-              <D:propstat>

-                <D:prop>

-                  <D:displayname>${doc.getName()}_${doc.getLanguage()}.html</D:displayname>

-                  <D:getlastmodified>${dateFormat.format(doc.getLastModified())}</D:getlastmodified>

-                  <D:creationdate />

-                  <D:getcontenttype>application/xml</D:getcontenttype>

-                  <D:getcontentlength>${doc.getFile().length()}</D:getcontentlength>

-                  <D:resourcetype />

-                  <D:lockdiscovery><jx:if test="${checkedOut[status.index] != null}">

-                         <D:activelock>

-                              <D:locktype><D:write/></D:locktype>

-                              <D:lockscope><D:exclusive/></D:lockscope>

-                              <D:depth>0</D:depth>

-                              <D:owner><D:href>${checkedOut[status.index].getIdentity()}</D:href></D:owner>

-                              <D:timeout>Infinite</D:timeout>

-                              <D:locktoken>

-                                <D:href>${usecase.getParameter('sourceURL')}</D:href>

-                              </D:locktoken>

-                         </D:activelock>

-                    </jx:if></D:lockdiscovery>

-                </D:prop>

-                <D:status>HTTP/1.1 200 OK</D:status>

-              </D:propstat>

-          </D:response>

-       </jx:if>

-      </jx:forEach>

-      

-</D:multistatus>

diff --git a/src/webapp/lenya/pubs/default/lenya/usecases/webdav/sitemap.xmap b/src/webapp/lenya/pubs/default/lenya/usecases/webdav/sitemap.xmap
deleted file mode 100644
index 49f71b7..0000000
--- a/src/webapp/lenya/pubs/default/lenya/usecases/webdav/sitemap.xmap
+++ /dev/null
@@ -1,212 +0,0 @@
-<?xml version="1.0"?>

-<!--

-  Copyright 1999-2004 The Apache Software Foundation

-

-  Licensed 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.

--->

-<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">

-

-<!-- =========================== Components ================================ -->

-

-  <map:components>

-    <map:matchers default="wildcard">

-      <map:matcher    name="destination" src="org.apache.cocoon.matching.WildcardHeaderMatcher">

-        <header-name>Destination</header-name>

-      </map:matcher>

-    </map:matchers>

-  

-<map:serializers default="xhtml"> 

-  <map:serializer name="xml-get" src="org.apache.cocoon.serialization.XMLSerializer" mime-type="text/xml">

-    <encoding>utf-8</encoding>

-    <omit-xml-declaration>yes</omit-xml-declaration>

-  </map:serializer>

-</map:serializers>

- 

-  </map:components>

-

-<!-- ========================== Flowscript ================================= -->

-

-  <map:flow language="javascript">

-    <map:script src="webdav.js"/>

-  </map:flow>

-

-<!-- =========================== Views ===================================== -->

-

-  <map:views>    

-    <map:view name="content" from-label="content">

-      <map:serialize type="xml" />

-    </map:view>

-  </map:views>

-

-  <map:pipelines>

-    

-    <map:pipeline type="noncaching">

-      

-      <!-- 

-        This internal sitemap fragment renders the usecase, once the

-        executeUsecase() flowscript has completed and issued a redirect,

-        which is matched here.

-        -->

-      <map:match pattern="view/*/**" internal-only="true">

-        

-        <map:generate type="jx" src="fallback://lenya/usecases/{2}.jx"/>

-        <!--<map:transform type="cinclude"/>-->

-        <map:transform type="i18n">

-          <map:parameter name="locale" value="{request:locale}"/>

-        </map:transform>

-        <map:transform type="xslt" src="NSclean.xsl"/>

-        <map:select type="request-method">

-          <map:when test="PROPFIND">

-            <map:serialize type="xml" status-code="207"/>

-          </map:when>

-          <map:otherwise>

-            <map:serialize type="xml" status-code="200"/>

-          </map:otherwise>

-        </map:select>

-      </map:match>

-      

-    </map:pipeline>

-    

-<!-- ========================= Private Resources =========================== -->

-

-    <map:pipeline type="noncaching" internal-only="true">

-      

-      <!-- Read the request for binaries PUT -->

-      <!--

-      <map:match pattern="request/read">

-        <map:read type="request" />

-      </map:match>

-      -->

-      

-      <map:match pattern="request/generate">

-        <map:generate type="stream" />

-        <map:serialize type="xml" />

-      </map:match>

-      

-      <!--+ 

-          | If you need to check or change the XML that is being PUT

-          | you can do that here. This is the pipeline that will

-          | generate the input for the PUT method.

-          + -->

-      <map:match pattern="request/PUT">

-        <map:generate type="stream">

-          <map:parameter name="defaultContentType" value="text/xml" />

-        </map:generate>

-        <map:serialize type="xml" />

-      </map:match>

-      

-    </map:pipeline>

-    

-<!-- ========================= Public Resources =========================== -->

-    

-    <map:pipeline type="caching">

- 

-      <map:match pattern="authoring">

-        <map:call function="selectMethod">

-          <map:parameter name="page" value=""/>

-          <map:parameter name="requestURI" value="{request:requestURI}" />

-        </map:call>

-      </map:match>

-      <map:match pattern="authoring/**">

-        <map:call function="selectMethod">

-          <map:parameter name="page" value="{1}"/>

-          <map:parameter name="requestURI" value="{request:requestURI}" />

-        </map:call>

-      </map:match>

-

-      <map:match pattern="{page-envelope:publication-id}">

-        <map:call function="selectMethod">

-          <map:parameter name="page" value=""/>

-          <map:parameter name="requestURI" value="{request:requestURI}" />

-        </map:call>

-      </map:match> 

-      <map:match pattern="{page-envelope:publication-id}/">

-        <map:call function="selectMethod">

-          <map:parameter name="page" value=""/>

-          <map:parameter name="requestURI" value="{request:requestURI}" />

-        </map:call>

-      </map:match>        

-      

-      <map:match pattern="GET/**">

-        <map:act type="set-header">

-          <map:parameter name="Last-Modified" value="{page-envelope:document-lastmodified}" />

-          <map:match pattern="GET/*_*.html">

-            <map:generate src="fallback://content/authoring/{1}/index_{2}.xml"/>

-            <map:serialize type="xml-get"/>

-          </map:match>

-          <map:match pattern="GET/**/*_*.html">

-            <map:generate src="fallback://content/authoring/{1}/{2}/index_{3}.xml"/>

-            <map:serialize type="xml-get"/>

-          </map:match>

-        </map:act>

-      </map:match>

-

-      <map:match pattern="PROPFIND/**_*.html">

-        <map:call function="filePropfind" >

-          <map:parameter name="last-modified" value="{page-envelope:document-lastmodified}"/>

-        </map:call>

-      </map:match>

- 

-      <map:match pattern="PROPFIND/**">        

-        <map:call function="propfind" /> 

-      </map:match>

-      

-      <map:match pattern="OPTIONS/**">

-        <map:call function="options">

-          <map:parameter name="uri" value="{request:requestURI}" />

-        </map:call>

-      </map:match>

-

-      <map:match pattern="HEAD/**_*.html">

-        <map:call function="filePropfind" />

-      </map:match>

-      

-      <map:match pattern="HEAD/**">

-        <map:call function="propfind" />

-      </map:match>

-      

-    </map:pipeline>

-    

-    <map:pipeline type="noncaching">

-

-      <map:match pattern="checkin">

-        <map:act type="reserved-checkin">

-          <map:generate src="dummy.xml"/>

-          <map:serialize type="xml"/>

-        </map:act>

-        <map:generate src="dummy.xml"/>

-        <map:serialize type="xml" status-code="201" />

-      </map:match>

-

-      <map:match pattern="PUT/**_*.html">

-          <map:call function="put" />

-      </map:match>

-            

-      <map:match pattern="DELETE/**">

-        <map:call function="remove" />

-      </map:match> 

-                        

-      <map:match pattern="LOCK/**">

-        <map:act type="reserved-checkout">

-          <map:generate src="dummy.xml"/>

-          <map:serialize type="xml"  status-code="423"/>

-        </map:act>

-        <map:generate src="lock.xml"/>

-        <map:serialize type="xml"/>

-      </map:match>

-      

-    </map:pipeline>

-

-  </map:pipelines>

-

-</map:sitemap>

diff --git a/src/webapp/lenya/pubs/default/lenya/usecases/webdav/status.jx b/src/webapp/lenya/pubs/default/lenya/usecases/webdav/status.jx
deleted file mode 100644
index cd721d5..0000000
--- a/src/webapp/lenya/pubs/default/lenya/usecases/webdav/status.jx
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0"?>

-<!--

-  Copyright 1999-2004 The Apache Software Foundation

-

-  Licensed 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.

--->

-<response>

-  <status>${parameters.getParameter("status")}</status>

-  <message>${message}</message>

-</response>

diff --git a/src/webapp/lenya/pubs/default/lenya/usecases/webdav/webdav.js b/src/webapp/lenya/pubs/default/lenya/usecases/webdav/webdav.js
deleted file mode 100644
index d6b5135..0000000
--- a/src/webapp/lenya/pubs/default/lenya/usecases/webdav/webdav.js
+++ /dev/null
@@ -1,286 +0,0 @@
-/*

-* Copyright 1999-2004 The Apache Software Foundation

-*

-* Licensed 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.

-*/

-

-importClass(Packages.org.apache.lenya.cms.cocoon.flow.FlowHelper);

-importClass(Packages.org.apache.lenya.cms.publication.DocumentIdentityMap);

-

-/* Helper method to add all request parameters to a usecase */

-/* Swiped from usecases.js :) */

-function passRequestParameters(flowHelper, usecase) {

-    var names = cocoon.request.getParameterNames();

-    while (names.hasMoreElements()) {

-        var name = names.nextElement();

-        if (!name.equals("lenya.usecase")

-            && !name.equals("lenya.continuation")

-            && !name.equals("submit")) {

-            

-            var value = flowHelper.getRequest(cocoon).get(name);

-            

-            var string = new Packages.java.lang.String();

-            if (string.getClass().isInstance(value)) {

-                usecase.setParameter(name, value);

-            }

-            else {

-                usecase.setPart(name, value);

-            }

-            

-        }

-    }

-

-}

-

-function selectMethod() {

-  var page = cocoon.parameters["page"];

-  var requestURI = cocoon.parameters["requestURI"];

-  var method = cocoon.request.getMethod();

-  cocoon.sendPage(method+"/"+page, {"requestURI":requestURI});

-}

-

-function sendStatus(sc) {

-  cocoon.sendStatus(sc);

-}

- 

-function put() {

-  var status = executeUsecase("webdav.put");

-  if(status)

-    cocoon.sendPage("checkin",{});

-  else {

-    sendStatus(500);

-  }

-}

-

-function remove() {

-  var status = executeUsecase("webdav.delete");

-  sendStatus(200);

-}

-

-function filePropfind() {

-  var status = executeUsecase("webdav.filePropfind");

-  sendStatus(500);

-}

-

-function propfind() {

-  var status = executeUsecase("webdav.propfind");

-  sendStatus(500);

-}

-

-function options() {

-  cocoon.response.setHeader("DAV","1");

-  var options = "OPTIONS,GET,PUT,LOCK,PROPFIND,DELETE";

-//  var options = "OPTIONS,GET,HEAD,POST,DELETE,TRACE,PUT,LOCK" 

-//              + ",MKCOL,PROPFIND,PROPPATCH,COPY,MOVE";

-  cocoon.response.setHeader("Allow",options);

-

-  //interoperability with Windows 2000

-  var w2kDAVDiscoverAgent = "Microsoft Data Access Internet"

-                          + " Publishing Provider Protocol Discovery";

-  if (cocoon.request.getHeader("User-Agent") == w2kDAVDiscoverAgent) {

-      cocoon.response.setHeader("MS-Author-Via","DAV");

-  }

-

-  sendStatus(200);

-}

-

-/*

- * parse the depth header to find out if recursion

- * take place. (used by MOVE and COPY)

- */

-function isRecurse(depth) {

-  var recurse;

-  if (depth == null || depth == '') {

-    recurse = true;

-  }

-  else if (depth == 'Infinity') {

-    recurse = true;

-  }

-  else {

-    recurse = false;

-  }

-  return recurse;

-}

-

-/*

- * convert the overwrite header into a boolean type

- */

-function isOverwrite(header) {

-  var overwrite = true;

-  if (header == 'F') {

-    overwrite = false;

-  }

-  return overwrite;

-}

-

-

-function executeUsecase(usecaseName) {

-    var view;

-    var proxy;

-    var menu = "nomenu";

-    

-    var usecaseResolver;

-    var usecase;

-    

-    if (cocoon.log.isDebugEnabled())

-       cocoon.log.debug("usecases.js::executeUsecase() called, parameter lenya.usecase = [" + usecaseName + "]");

-    

-    try {

-        usecaseResolver = cocoon.getComponent("org.apache.lenya.cms.usecase.UsecaseResolver");

-        usecase = usecaseResolver.resolve(usecaseName);

-

-        var flowHelper = cocoon.getComponent("org.apache.lenya.cms.cocoon.flow.FlowHelper");

-        var request = flowHelper.getRequest(cocoon);

-        var sourceUrl = Packages.org.apache.lenya.util.ServletHelper.getWebappURI(request);

-        usecase.setSourceURL(sourceUrl);

-        usecase.setName(usecaseName);

-        view = usecase.getView();

-        if (view && view.showMenu()) {

-            menu = "menu";

-        }

-

-        passRequestParameters(flowHelper, usecase);

-        usecase.checkPreconditions();

-        usecase.lockInvolvedObjects();

-        proxy = new Packages.org.apache.lenya.cms.usecase.UsecaseProxy(usecase);

-    }

-    finally {

-        /* done with usecase component, tell usecaseResolver to release it */

-        if (usecaseResolver != null) {

-            if (usecase != null) {

-                usecaseResolver.release(usecase);

-                usecase = undefined;

-            }

-            cocoon.releaseComponent(usecaseResolver);

-        }

-    }

-    

-    var success = false;

-    var targetUrl;

-

-

-    /*

-     * If the usecase has a view, this means we want to display something 

-     * to the user before proceeding. This also means the usecase consists

-     * several steps; repeated until the user chooses to submit or cancel.

-     *

-     * If the usecase does not have a view, it is simply executed.

-     */

-

-    if (view) {

-        var ready = false;

-        while (!ready) {

-

-            try {

-                var viewUri = "view/" + menu + "/" + view.getTemplateURI();

-                if (cocoon.log.isDebugEnabled())

-                    cocoon.log.debug("usecases.js::executeUsecase() in usecase " + usecaseName + ", creating view, calling Cocoon with viewUri = [" + viewUri + "]");

-        

-                cocoon.sendPageAndWait(viewUri, {

-                    "usecase" : proxy

-                });

-            }

-            catch (exception) {

-                /* if an exception was thrown by the view, allow the usecase to rollback the transition */

-                try {

-                    usecaseResolver = cocoon.getComponent("org.apache.lenya.cms.usecase.UsecaseResolver");

-                    usecase = usecaseResolver.resolve(usecaseName);

-                    proxy.setup(usecase);

-                    usecase.cancel();

-                    throw exception;

-                }

-                finally {

-                    usecaseResolver.release(usecase);

-                    usecase = undefined;

-                    cocoon.releaseComponent(usecaseResolver);

-                }

-            }

-            

-            if (cocoon.log.isDebugEnabled())

-                cocoon.log.debug("usecases.js::executeUsecase() in usecase " + usecaseName + ", after view, now advancing in usecase");

-        

-            try {

-                usecaseResolver = cocoon.getComponent("org.apache.lenya.cms.usecase.UsecaseResolver");

-                usecase = usecaseResolver.resolve(usecaseName);

-                proxy.setup(usecase);

-            

-                passRequestParameters(flowHelper, usecase);

-                usecase.advance();

-            

-                if (cocoon.request.getParameter("submit")) {

-                    usecase.checkExecutionConditions();

-                    if (! usecase.hasErrors()) {

-                        usecase.execute();

-                        if (! usecase.hasErrors()) {

-                            usecase.checkPostconditions();

-                            if (! usecase.hasErrors()) {

-                                ready = true;

-                                success = true;

-                            }

-                        }

-                    }

-                }

-                else if (cocoon.request.getParameter("cancel")) {

-                    usecase.cancel();

-                    ready = true;

-                }

-                proxy = new Packages.org.apache.lenya.cms.usecase.UsecaseProxy(usecase);

-                targetUrl = usecase.getTargetURL(success);

-            }

-            catch (exception) {

-                /* allow usecase to rollback the transition */

-                usecase.cancel();

-                throw exception;

-            }

-            finally {

-                usecaseResolver.release(usecase);

-                usecase = undefined;

-                cocoon.releaseComponent(usecaseResolver);

-            }

-        }

-    }

-    else {

-        try {

-            usecaseResolver = cocoon.getComponent("org.apache.lenya.cms.usecase.UsecaseResolver");

-            usecase = usecaseResolver.resolve(usecaseName);

-            proxy.setup(usecase);

-                

-            usecase.execute();

-            if (! usecase.hasErrors()) {

-                usecase.checkPostconditions();

-                if (! usecase.hasErrors()) {

-                    success = true;

-                }

-            }

-            targetUrl = usecase.getTargetURL(success);

-        }

-        catch (exception) {

-            /* allow usecase to rollback the transition */

-            usecase.cancel();

-            throw exception;

-        }

-        finally {

-            usecaseResolver.release(usecase);

-            usecase = undefined;

-            cocoon.releaseComponent(usecaseResolver);

-        }

-    }

-    

-    var url = request.getContextPath() + targetUrl;

-

-    if (cocoon.log.isDebugEnabled())

-       cocoon.log.debug("usecases.js::executeUsecase() in usecase " + usecaseName + ", completed, redirecting to url = [" + url + "]");

-        

-    return success;

-    

-}

diff --git a/src/webapp/lenya/pubs/default/lenya/usecases/workflow/deactivate.jx b/src/webapp/lenya/pubs/default/lenya/usecases/workflow/deactivate.jx
deleted file mode 100644
index d0e3eb5..0000000
--- a/src/webapp/lenya/pubs/default/lenya/usecases/workflow/deactivate.jx
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<page:page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" 
-           xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" 
-           xmlns="http://www.w3.org/1999/xhtml" 
-           xmlns:i18n="http://apache.org/cocoon/i18n/2.1" >
-
-  <page:title><i18n:text>Deactivate</i18n:text></page:title>
-  <page:body>
-    <div class="lenya-box">
-      <div class="lenya-box-title">
-        <i18n:text>Deactivate</i18n:text>
-      </div>
-
-      <jx:import uri="templates/messages.jx"/>
-
-      <div class="lenya-box-body">
-        <form>
-          <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-          <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-          <table class="lenya-table-noborder">
-            <tr>
-              <td class="lenya-entry-caption" valign="top"><i18n:text>Document</i18n:text>:</td>
-              <td valign="top">
-                <jx:out value="${usecase.getParameter('document').getId()}"/>
-              </td>
-            </tr>
-            <tr>
-              <td/>
-              <td>
-                <jx:choose>
-                  <jx:when test="${usecase.getParameter('allowSingleDocument').equals('false')}">
-                    <input type="checkbox" checked="checked" disabled="disabled"/>
-                    <input name="subtree" type="hidden" value="on"/>
-                  </jx:when>
-                  <jx:when test="${usecase.getParameter('subtree') == null}">
-                    <input name="subtree" type="checkbox"/>
-                  </jx:when>
-                  <jx:otherwise>
-                    <input name="subtree" type="checkbox" checked="checked"/>
-                  </jx:otherwise>
-                </jx:choose>
-                <i18n:text>deactivate complete subtree</i18n:text>
-              </td>
-            </tr>
-            <tr>
-              <td/>
-              <td>
-                <input i18n:attr="value" type="submit" name="submit" value="Deactivate"/>
-                &#160;
-                <input i18n:attr="value" type="submit" name="cancel" value="Cancel"/>
-              </td>
-            </tr>
-          </table>
-        </form>
-      </div>
-    </div>
-  </page:body>
-</page:page>
diff --git a/src/webapp/lenya/pubs/default/lenya/usecases/workflow/publish.jx b/src/webapp/lenya/pubs/default/lenya/usecases/workflow/publish.jx
deleted file mode 100644
index 6a7c1e9..0000000
--- a/src/webapp/lenya/pubs/default/lenya/usecases/workflow/publish.jx
+++ /dev/null
@@ -1,105 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<page:page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" 
-           xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" 
-           xmlns="http://www.w3.org/1999/xhtml" 
-           xmlns:i18n="http://apache.org/cocoon/i18n/2.1" >
-
-  <page:title><i18n:text>Publish</i18n:text></page:title>
-  <page:body>
-    <div class="lenya-box">
-      <div class="lenya-box-title">
-        <i18n:text>Publish</i18n:text>
-      </div>
-      <div class="lenya-box-body">
-        <form>
-          <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-          <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-          <table class="lenya-table-noborder">
-            <tr>
-              <td class="lenya-entry-caption" valign="top"><i18n:text>Document</i18n:text>:</td>
-              <td valign="top">
-                <jx:out value="${usecase.getParameter('document').getId()}"/>
-              </td>
-            </tr>
-            <tr>
-              <td colspan="2">
-                <ul>
-                  <jx:forEach var="message" items="${usecase.getErrorMessages()}">
-                    <li>
-                      <i18n:text>
-                        <jx:out value="${message}"/>
-                      </i18n:text>
-                    </li>
-                  </jx:forEach>
-                  <jx:forEach var="missingDocument" items="${usecase.getParameter('missingDocuments')}">
-                    <li>
-                      <a href="${request.getContextPath() + missingDocument.getCanonicalWebappURL()}"><jx:out value="${missingDocument.getId()}"/> [<jx:out value="${missingDocument.getLanguage()}"/>]</a>
-                    </li>
-                  </jx:forEach>
-                  <jx:forEach var="message" items="${usecase.getInfoMessages()}">
-                    <li>
-                      <i18n:text>
-                        <jx:out value="${message}"/>
-                      </i18n:text>
-                    </li>
-                  </jx:forEach>
-                </ul>
-              </td>
-            </tr>
-            <tr>
-              <td/>
-              <td>
-                <jx:choose>
-                  <jx:when test="${usecase.getParameter('allowSingleDocument').equals('false')}">
-                    <input type="checkbox" checked="checked" disabled="disabled"/>
-                    <input name="subtree" type="hidden" value="on"/>
-                  </jx:when>
-                  <jx:when test="${usecase.getParameter('subtree') == null}">
-                    <input name="subtree" type="checkbox"/>
-                  </jx:when>
-                  <jx:otherwise>
-                    <input name="subtree" type="checkbox" checked="checked"/>
-                  </jx:otherwise>
-                </jx:choose>
-                <i18n:text>publish complete subtree</i18n:text>
-              </td>
-            </tr>
-            <tr>
-              <td><i18n:text>Schedule</i18n:text>:</td>
-              <td>
-                <input type="checkbox" name="schedule"/>
-                <input type="text" name="schedule.time" value="${usecase.getParameter('schedule.time')}"/>
-              </td>
-            </tr>
-            <tr>
-              <td/>
-              <td>
-                <input i18n:attr="value" type="submit" name="submit" value="Publish"/>
-                &#160;
-                <input i18n:attr="value" type="submit" name="cancel" value="Cancel"/>
-              </td>
-            </tr>
-          </table>
-        </form>
-      </div>
-    </div>
-  </page:body>
-</page:page>
diff --git a/src/webapp/lenya/pubs/default/lenya/usecases/workflow/reject.jx b/src/webapp/lenya/pubs/default/lenya/usecases/workflow/reject.jx
deleted file mode 100644
index 4fc6c6a..0000000
--- a/src/webapp/lenya/pubs/default/lenya/usecases/workflow/reject.jx
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<page:page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" 
-           xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" 
-           xmlns="http://www.w3.org/1999/xhtml" 
-           xmlns:i18n="http://apache.org/cocoon/i18n/2.1" >
-
-  <page:title><i18n:text>Reject Document</i18n:text></page:title>
-  <page:body>
-    <div class="lenya-box">
-      <div class="lenya-box-title">
-        <i18n:translate>
-          <i18n:text i18n:key="reject-doc"/>
-          <i18n:param><jx:out value="${usecase.getParameter('document').getId()}"/></i18n:param>
-        </i18n:translate>      
-      </div>
-
-      <jx:import uri="templates/messages.jx"/>
-
-      <div class="lenya-box-body">
-        <form>
-          <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-          <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-          <table class="lenya-table-noborder">
-              <tr>
-                <td colspan="2" class="lenya-entry-caption">
-                  <i18n:translate>
-                    <i18n:text i18n:key="reject-doc?"/>
-                    <i18n:param><jx:out value="${usecase.getParameter('document').getId()}"/></i18n:param>
-                  </i18n:translate>
-                </td>
-              </tr>
-              <tr>
-                <td/>
-                <td>
-                  <input i18n:attr="value" type="submit" name="submit" value="Reject"/>
-                  &#160;
-                  <input i18n:attr="value" type="submit" name="cancel" value="Cancel"/>
-                </td>
-              </tr>
-          </table>
-        </form>
-      </div>
-    </div>
-  </page:body>
-</page:page>
diff --git a/src/webapp/lenya/pubs/default/lenya/usecases/workflow/submit.jx b/src/webapp/lenya/pubs/default/lenya/usecases/workflow/submit.jx
deleted file mode 100644
index f6b8afa..0000000
--- a/src/webapp/lenya/pubs/default/lenya/usecases/workflow/submit.jx
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<page:page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" 
-           xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" 
-           xmlns="http://www.w3.org/1999/xhtml" 
-           xmlns:i18n="http://apache.org/cocoon/i18n/2.1" >
-
-  <page:title><i18n:text>Submit Document</i18n:text></page:title>
-  <page:body>
-    <div class="lenya-box">
-      <div class="lenya-box-title">
-        <i18n:translate>
-          <i18n:text i18n:key="submit-for-approval"/>
-          <i18n:param><jx:out value="${usecase.getParameter('document').getId()}"/></i18n:param>
-        </i18n:translate>      
-      </div>
-
-      <jx:import uri="templates/messages.jx"/>
-
-      <div class="lenya-box-body">
-        <form>
-          <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-          <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-          <table class="lenya-table-noborder">
-              <tr>
-                <td colspan="2" class="lenya-entry-caption">
-                  <i18n:translate>
-                    <i18n:text i18n:key="submit-for-approval?"/>
-                    <i18n:param><jx:out value="${usecase.getParameter('document').getId()}"/></i18n:param>
-                  </i18n:translate>
-                </td>
-              </tr>
-              <tr>
-                <td/>
-                <td>
-                  <input i18n:attr="value" type="submit" name="submit" value="Submit"/>
-                  &#160;
-                  <input i18n:attr="value" type="submit" name="cancel" value="Cancel"/>
-                </td>
-              </tr>
-          </table>
-        </form>
-      </div>
-    </div>
-  </page:body>
-</page:page>
diff --git a/src/webapp/lenya/pubs/default/lenya/xslt/formeditor/homepage.xsl b/src/webapp/lenya/pubs/default/lenya/xslt/formeditor/homepage.xsl
deleted file mode 100644
index c5e6896..0000000
--- a/src/webapp/lenya/pubs/default/lenya/xslt/formeditor/homepage.xsl
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: xhtml.xsl 42703 2004-03-13 12:57:53Z gregor $ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:xhtml="http://www.w3.org/1999/xhtml"
-  xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0"
-  xmlns:dc="http://purl.org/dc/elements/1.1/"
->
-
-<xsl:import href="xhtml.xsl"/>
-
-</xsl:stylesheet>  
diff --git a/src/webapp/lenya/pubs/default/lenya/xslt/formeditor/xhtml-common.xsl b/src/webapp/lenya/pubs/default/lenya/xslt/formeditor/xhtml-common.xsl
deleted file mode 100644
index 7aa20e2..0000000
--- a/src/webapp/lenya/pubs/default/lenya/xslt/formeditor/xhtml-common.xsl
+++ /dev/null
@@ -1,208 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:xhtml="http://www.w3.org/1999/xhtml"
-  xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0"
-  xmlns:dc="http://purl.org/dc/elements/1.1/"
->
-
-<xsl:template match="xhtml:body">
-<node name="Body" />
-<xsl:apply-templates mode="body"/>
-</xsl:template>
-
-<xsl:template name="insertmenu">
-<xsl:param name="path"/>
-<xsl:variable name="ns">namespace=&quot;http://www.w3.org/1999/xhtml&quot;</xsl:variable>
-<insert-after select="{$path}[@tagID='{@tagID}']">
-  <element name="Paragraph" xupdate="&lt;xupdate:insert-after select=&quot;{$path}[@tagID='{@tagID}']&quot;&gt;&lt;xupdate:element name=&quot;xhtml:p&quot; {$ns}&gt;New Paragraph&lt;/xupdate:element&gt;&lt;/xupdate:insert-after&gt;"/>
-  <element name="Table" xupdate="&lt;xupdate:insert-after select=&quot;{$path}[@tagID='{@tagID}']&quot;&gt;&lt;xupdate:element name=&quot;xhtml:table&quot; {$ns}&gt;&lt;tr&gt;&lt;td&gt;New Table&lt;/td&gt;&lt;/tr&gt;&lt;/xupdate:element&gt;&lt;/xupdate:insert-after&gt;"/>
-  <element name="Unordered List" xupdate="&lt;xupdate:insert-after select=&quot;{$path}[@tagID='{@tagID}']&quot;&gt;&lt;xupdate:element name=&quot;xhtml:ul&quot; {$ns}&gt;&lt;li&gt;New Unordered List&lt;/li&gt;;&lt;/xupdate:element&gt;&lt;/xupdate:insert-after&gt;"/>
-  <element name="Ordered List" xupdate="&lt;xupdate:insert-after select=&quot;{$path}[@tagID='{@tagID}']&quot;&gt;&lt;xupdate:element name=&quot;xhtml:ol&quot; {$ns}&gt;&lt;li&gt;New Ordered List&lt;/li&gt;&lt;/xupdate:element&gt;&lt;/xupdate:insert-after&gt;"/>
-  <element name="Headline 1" xupdate="&lt;xupdate:insert-after select=&quot;{$path}[@tagID='{@tagID}']&quot;&gt;&lt;xupdate:element name=&quot;xhtml:h1&quot; {$ns}&gt;New Headline 1&lt;/xupdate:element&gt;&lt;/xupdate:insert-after&gt;"/>
-  <element name="Headline 2" xupdate="&lt;xupdate:insert-after select=&quot;{$path}[@tagID='{@tagID}']&quot;&gt;&lt;xupdate:element name=&quot;xhtml:h2&quot; {$ns}&gt;New Headline 2&lt;/xupdate:element&gt;&lt;/xupdate:insert-after&gt;"/>
-  <element name="Headline 3" xupdate="&lt;xupdate:insert-after select=&quot;{$path}[@tagID='{@tagID}']&quot;&gt;&lt;xupdate:element name=&quot;xhtml:h3&quot; {$ns}&gt;New Headline 3&lt;/xupdate:element&gt;&lt;/xupdate:insert-after&gt;"/>
-  <element name="Headline 4" xupdate="&lt;xupdate:insert-after select=&quot;{$path}[@tagID='{@tagID}']&quot;&gt;&lt;xupdate:element name=&quot;xhtml:h4&quot; {$ns}&gt;New Headline 4&lt;/xupdate:element&gt;&lt;/xupdate:insert-after&gt;"/>
-</insert-after>
-</xsl:template>
-
-  <xsl:template match="xhtml:p" mode="body">
-    <xsl:choose >
-      <xsl:when test="xhtml:object">
-	<xsl:apply-templates select="xhtml:object" mode="body"/>
-      </xsl:when>
-      <xsl:otherwise>
-	<node name="Paragraph" select="/*/xhtml:body/xhtml:p[@tagID='{@tagID}']">
-	  <action><delete name="&lt;xupdate:remove select=&quot;/*/xhtml:body/xhtml:p[@tagID='{@tagID}']&quot;/&gt;"/></action>
-	  <content>
-	    <textarea name="&lt;xupdate:update select=&quot;/*/xhtml:body/xhtml:p[@tagID='{@tagID}']&quot;&gt;" cols="40" rows="30">
-	      <xsl:copy-of select="node()"/>
-	    </textarea>
-	  </content>
-	</node>
-	
-	<xsl:call-template name="insertmenu"><xsl:with-param name="path">/*/xhtml:body/xhtml:p</xsl:with-param></xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-<xsl:template match="xhtml:table" mode="body">
-<node name="Table" select="/*/xhtml:body/xhtml:table[@tagID='{@tagID}']">
-  <action><delete name="&lt;xupdate:remove select=&quot;/*/xhtml:body/xhtml:table[@tagID='{@tagID}']&quot;/&gt;"/></action>
-  <content>
-    <textarea name="&lt;xupdate:update select=&quot;/*/xhtml:body/xhtml:table[@tagID='{@tagID}']&quot;&gt;" cols="40" rows="30">
-      <xsl:copy-of select="."/>
-    </textarea>
-  </content>
-</node>
-
-<xsl:call-template name="insertmenu"><xsl:with-param name="path">/*/xhtml:body/xhtml:table</xsl:with-param></xsl:call-template>
-
-</xsl:template>
-
-<xsl:template match="xhtml:ul" mode="body">
-<node name="Unordered List" select="/*/xhtml:body/xhtml:ul[@tagID='{@tagID}']">
-  <action><delete name="&lt;xupdate:remove select=&quot;/*/xhtml:body/xhtml:ul[@tagID='{@tagID}']&quot;/&gt;"/></action>
-  <content>
-    <textarea name="&lt;xupdate:update select=&quot;/*/xhtml:body/xhtml:ul[@tagID='{@tagID}']&quot;&gt;" cols="40" rows="30">
-      <xsl:copy-of select="node()"/>
-    </textarea>
-  </content>
-</node>
-
-<xsl:call-template name="insertmenu"><xsl:with-param name="path">/*/xhtml:body/xhtml:ul</xsl:with-param></xsl:call-template>
-
-</xsl:template>
-
-<xsl:template match="xhtml:ol" mode="body">
-<node name="Ordered List" select="/*/xhtml:body/xhtml:ol[@tagID='{@tagID}']">
-  <action><delete name="&lt;xupdate:remove select=&quot;/*/xhtml:body/xhtml:ol[@tagID='{@tagID}']&quot;/&gt;"/></action>
-  <content>
-    <textarea name="&lt;xupdate:update select=&quot;/*/xhtml:body/xhtml:ol[@tagID='{@tagID}']&quot;&gt;" cols="40" rows="30">
-      <xsl:copy-of select="node()"/>
-    </textarea>
-  </content>
-</node>
-
-<xsl:call-template name="insertmenu"><xsl:with-param name="path">/*/xhtml:body/xhtml:ol</xsl:with-param></xsl:call-template>
-
-</xsl:template>
-
-<xsl:template match="xhtml:h1" mode="body">
-<node name="Headline 1" select="/*/xhtml:body/xhtml:h1[@tagID='{@tagID}']">
-  <action><delete name="&lt;xupdate:remove select=&quot;/*/xhtml:body/xhtml:h1[@tagID='{@tagID}']&quot;/&gt;"/></action>
-  <content>
-    <textarea name="&lt;xupdate:update select=&quot;/*/xhtml:body/xhtml:h1[@tagID='{@tagID}']&quot;&gt;" cols="40" rows="3">
-      <xsl:copy-of select="node()"/>
-    </textarea>
-  </content>
-</node>
-
-<xsl:call-template name="insertmenu"><xsl:with-param name="path">/*/xhtml:body/xhtml:h1</xsl:with-param></xsl:call-template>
-
-</xsl:template>
-    
-<xsl:template match="xhtml:h2" mode="body">
-<node name="Headline 2" select="/*/xhtml:body/xhtml:h2[@tagID='{@tagID}']">
-  <action><delete name="&lt;xupdate:remove select=&quot;/*/xhtml:body/xhtml:h2[@tagID='{@tagID}']&quot;/&gt;"/></action>
-  <content>
-    <textarea name="&lt;xupdate:update select=&quot;/*/xhtml:body/xhtml:h2[@tagID='{@tagID}']&quot;&gt;" cols="40" rows="3">
-      <xsl:copy-of select="node()"/>
-    </textarea>
-  </content>
-</node>
-
-<xsl:call-template name="insertmenu"><xsl:with-param name="path">/*/xhtml:body/xhtml:h2</xsl:with-param></xsl:call-template>
-
-</xsl:template>
-
-<xsl:template match="xhtml:h3" mode="body">
-<node name="Headline 3" select="/*/xhtml:body/xhtml:h3[@tagID='{@tagID}']">
-  <action><delete name="&lt;xupdate:remove select=&quot;/*/xhtml:body/xhtml:h3[@tagID='{@tagID}']&quot;/&gt;"/></action>
-  <content>
-    <textarea name="&lt;xupdate:update select=&quot;/*/xhtml:body/xhtml:h3[@tagID='{@tagID}']&quot;&gt;" cols="40" rows="3">
-      <xsl:copy-of select="node()"/>
-    </textarea>
-  </content>
-</node>
-
-<xsl:call-template name="insertmenu"><xsl:with-param name="path">/*/xhtml:body/xhtml:h3</xsl:with-param></xsl:call-template>
-
-</xsl:template>
-
-<xsl:template match="xhtml:h4" mode="body">
-<node name="Headline 4" select="/*/xhtml:body/xhtml:h4[@tagID='{@tagID}']">
-  <action><delete name="&lt;xupdate:remove select=&quot;/*/xhtml:body/xhtml:h4[@tagID='{@tagID}']&quot;/&gt;"/></action>
-  <content>
-    <textarea name="&lt;xupdate:update select=&quot;/*/xhtml:body/xhtml:h4[@tagID='{@tagID}']&quot;&gt;" cols="40" rows="3">
-      <xsl:copy-of select="node()"/>
-    </textarea>
-  </content>
-</node>
-
-<xsl:call-template name="insertmenu"><xsl:with-param name="path">/*/xhtml:body/xhtml:h4</xsl:with-param></xsl:call-template>
-
-</xsl:template>
-
-<xsl:template match="xhtml:hr" mode="body">
-<node name="Horizontal Rule" select="/*/xhtml:body/xhtml:hr[@tagID='{@tagID}']">
-  <action><delete name="&lt;xupdate:remove select=&quot;/*/xhtml:body/xhtml:hr[@tagID='{@tagID}']&quot;/&gt;"/></action>
-</node>
-
-<xsl:call-template name="insertmenu"><xsl:with-param name="path">/*/xhtml:body/xhtml:hr</xsl:with-param></xsl:call-template>
-
-</xsl:template>
-
-  <xsl:template match="xhtml:object" mode="body">
-    <node name="Object">
-      <action><delete name="&lt;xupdate:remove select=&quot;/*/xhtml:body/xhtml:p/xhtml:object[@tagID='{@tagID}']&quot;/&gt;"/></action>
-      <content>
-	<input type="text" name="&lt;xupdate:update select=&quot;/*/xhtml:body/xhtml:p/xhtml:object[@tagID='{@tagID}']&quot;&gt;" size="40">
-	  <xsl:attribute name="value">
-      <xsl:value-of select="@data"/>
-	  </xsl:attribute>
-	</input>
-      </content>
-    </node>
-    
-    <xsl:call-template name="insertmenu"><xsl:with-param name="path">/*/xhtml:body</xsl:with-param></xsl:call-template>
-    
-  </xsl:template>
-
-  <xsl:template match="lenya:asset" mode="body">
-    <node name="Asset">
-      <action>
-	<delete name="&lt;xupdate:remove select=&quot;/*/xhtml:body/lenya:asset[@tagID='{@tagID}']&quot;/&gt;"/>
-      </action>
-      <content>
-	<input type="text" name="&lt;xupdate:update select=&quot;/*/xhtml:body/lenya:asset[@tagID='{@tagID}']&quot;&gt;" size="40">
-	  <xsl:attribute name="value">
-	    <xsl:value-of select="@src"/>
-	  </xsl:attribute>
-	</input>
-      </content>
-    </node>
-
-    <xsl:call-template name="insertmenu"><xsl:with-param name="path">/*/xhtml:body</xsl:with-param></xsl:call-template>
-    
-  </xsl:template>
-
-</xsl:stylesheet>  
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/default/lenya/xslt/formeditor/xhtml.xsl b/src/webapp/lenya/pubs/default/lenya/xslt/formeditor/xhtml.xsl
deleted file mode 100644
index 6cebc9e..0000000
--- a/src/webapp/lenya/pubs/default/lenya/xslt/formeditor/xhtml.xsl
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:xhtml="http://www.w3.org/1999/xhtml"
-  xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0"
-  xmlns:dc="http://purl.org/dc/elements/1.1/"
->
-
-<xsl:import href="../../../../../usecases/edit/form.xsl"/>
-<xsl:import href="xhtml-common.xsl"/>
-
-<xsl:template match="xhtml:html">
-  
-<namespace prefix="xhtml" uri="http://www.w3.org/1999/xhtml"/>
-<namespace prefix="lenya" uri="http://apache.org/cocoon/lenya/page-envelope/1.0"/>
-<namespace prefix="dc" uri="http://purl.org/dc/elements/1.1/"/>
-  
-<node name="Title" select="/xhtml:html/lenya:meta/dc:title[@tagID='{lenya:meta/dc:title/@tagID}']">
-  <content><input type="text" name="&lt;xupdate:update select=&quot;/xhtml:html/lenya:meta/dc:title[@tagID='{lenya:meta/dc:title/@tagID}']&quot;&gt;" size="40"><xsl:attribute name="value"><xsl:value-of select="lenya:meta/dc:title"/></xsl:attribute></input></content>
-</node>
-
-<xsl:apply-templates select="xhtml:body"/>
-
-</xsl:template>
-
-</xsl:stylesheet>  
diff --git a/src/webapp/lenya/pubs/default/lenya/xslt/navigation/tabs.xsl b/src/webapp/lenya/pubs/default/lenya/xslt/navigation/tabs.xsl
deleted file mode 100644
index 202f60b..0000000
--- a/src/webapp/lenya/pubs/default/lenya/xslt/navigation/tabs.xsl
+++ /dev/null
@@ -1,84 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:nav="http://apache.org/cocoon/lenya/navigation/1.0"
-    xmlns="http://www.w3.org/1999/xhtml"
-    exclude-result-prefixes="nav"
-    >
-    
-<xsl:import href="../../../../../xslt/navigation/tabs.xsl"/>
-
-<xsl:template match="nav:site">
-    
-  <div id="tabs">
-  <table border="0" cellpadding="0" cellspacing="0">
-    <tr>
-    <xsl:call-template name="pre-separator"/>
-    <xsl:for-each select="nav:node">
-      <xsl:if test="position() &gt; 1">
-        <xsl:call-template name="separator"/>
-      </xsl:if>
-      
-      <xsl:choose>
-        <xsl:when test="@visibleinnav = 'false'"/>
-        <xsl:when test="descendant-or-self::nav:node[@current = 'true']">
-          <xsl:call-template name="tab-selected"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="tab"/>
-        </xsl:otherwise>
-      </xsl:choose>
-        
-    </xsl:for-each>
-    <xsl:call-template name="post-separator"/>
-    </tr>
-  </table>
-  </div>
-
-</xsl:template>
-
-
-<xsl:template name="tab">
-  <td><div class="tab"><xsl:call-template name="label"/></div></td>
-</xsl:template>
-
-
-<xsl:template name="tab-selected">
-  <td><div class="tab-selected"><xsl:call-template name="label"/></div></td>
-</xsl:template>
-
-
-<xsl:template name="separator">
-    <td><div class="tab-separator">&#160;</div></td>
-</xsl:template>
-
-
-<xsl:template name="pre-separator">
-    <td><div class="tab-pre-separator">&#160;</div></td>
-</xsl:template>
-
-
-<xsl:template name="post-separator">
-    <td class="tab-post-separator"><div class="tab-separator">&#160;</div></td>
-</xsl:template>
-
-
-</xsl:stylesheet> 
diff --git a/src/webapp/lenya/pubs/default/menus.xmap b/src/webapp/lenya/pubs/default/menus.xmap
deleted file mode 100644
index 0eee7b0..0000000
--- a/src/webapp/lenya/pubs/default/menus.xmap
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
-
-  <map:components>
-    <map:matchers default="wildcard">
-      <map:matcher name="doctype" logger="sitemap.matcher.doctype" src="org.apache.cocoon.matching.WildcardRequestParameterMatcher">
-        <parameter-name>doctype</parameter-name>
-      </map:matcher>
-    </map:matchers>
-  </map:components>
-
-  <map:pipelines>
-
-    <map:pipeline>
-    	
-      <map:match pattern="live/**">
-        <map:generate type="serverpages" src="../../content/menus/live.xsp"/>
-        <map:serialize type="xml"/>
-      </map:match>
-      
-      <!-- document type: links -->
-      <!--
-      <map:match type="doctype" pattern="links">
-        <map:generate type="serverpages" src="config/menus/links.xsp"/>
-        <map:serialize type="xml"/>
-      </map:match>
-      -->
-      
-      <!-- all other document types: xhtml, ... -->
-      <map:match pattern="**">
-        <map:generate type="serverpages" src="fallback://config/menus/generic.xsp"/>
-        <map:serialize type="xml"/>
-      </map:match>
-      
-    </map:pipeline>
-    
-  </map:pipelines>
-</map:sitemap>
diff --git a/src/webapp/lenya/pubs/default/publication-tests.xml b/src/webapp/lenya/pubs/default/publication-tests.xml
deleted file mode 100644
index d7c1ccb..0000000
--- a/src/webapp/lenya/pubs/default/publication-tests.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: publication-tests.xml,v 1.2 2004/03/13 12:47:21 gregor Exp $ -->
-
-<lenya:publication xmlns:lenya="http://apache.org/cocoon/lenya/publication/1.0">
-  <lenya:tests>
-    <lenya:test>Search: <a href="search-authoring/lucene">Authoring</a>, <a href="search-live/lucene">Live</a></lenya:test>
-  </lenya:tests>
-</lenya:publication>
diff --git a/src/webapp/lenya/pubs/default/publication.xml b/src/webapp/lenya/pubs/default/publication.xml
deleted file mode 100644
index 1aef5b3..0000000
--- a/src/webapp/lenya/pubs/default/publication.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<lenya:publication xmlns:lenya="http://apache.org/cocoon/lenya/publication/1.0">
-  <lenya:name>Default Publication</lenya:name>
-  <lenya:pub-version>@lenya.version@</lenya:pub-version>
-  <lenya:lenya-version>@lenya.version@</lenya:lenya-version>
-  <lenya:cocoon-version>2.1.7</lenya:cocoon-version>
-  <lenya:description>This publication is a best practice, getting started publication.</lenya:description>
-  <lenya:credits>Special thanks to </lenya:credits>
-  <lenya:help></lenya:help>
-  <lenya:changelog>changes.xml</lenya:changelog>
-  <lenya:license></lenya:license>
-  <lenya:readme>
-    <ol>
-      <li><a href="live/index.html">Reader`s View</a> (Live)</li>
-      <li><a href="authoring/index.html">Editor`s View</a> (Authoring)</li>
-    </ol>
-  </lenya:readme>
-</lenya:publication>
diff --git a/src/webapp/lenya/pubs/default/resources/misc/bxe/xhtml-bxe.css b/src/webapp/lenya/pubs/default/resources/misc/bxe/xhtml-bxe.css
deleted file mode 100644
index 4410f73..0000000
--- a/src/webapp/lenya/pubs/default/resources/misc/bxe/xhtml-bxe.css
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
-* Copyright 1999-2004 The Apache Software Foundation
-*
-* Licensed 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.
-*/
-@import url(page.css);
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/default/resources/misc/bxe/xhtml-namespaces.xml b/src/webapp/lenya/pubs/default/resources/misc/bxe/xhtml-namespaces.xml
deleted file mode 100644
index 197675e..0000000
--- a/src/webapp/lenya/pubs/default/resources/misc/bxe/xhtml-namespaces.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<namespaces>
-
-<xmlns>xhtml=http://www.w3.org/1999/xhtml</xmlns>
-<xmlns>dc=http://purl.org/dc/elements/1.1/</xmlns>
-<xmlns>lenya=http://apache.org/cocoon/lenya/page-envelope/1.0</xmlns>
-
-</namespaces>
diff --git a/src/webapp/lenya/pubs/default/resources/shared/css/homepage.css b/src/webapp/lenya/pubs/default/resources/shared/css/homepage.css
deleted file mode 100644
index 34f4fc0..0000000
--- a/src/webapp/lenya/pubs/default/resources/shared/css/homepage.css
+++ /dev/null
@@ -1 +0,0 @@
-/* Put your doctype-specific CSS here */
diff --git a/src/webapp/lenya/pubs/default/resources/shared/css/links.css b/src/webapp/lenya/pubs/default/resources/shared/css/links.css
deleted file mode 100644
index 86ea730..0000000
--- a/src/webapp/lenya/pubs/default/resources/shared/css/links.css
+++ /dev/null
@@ -1 +0,0 @@
-/* Put your doctype-specific CSS here */
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/default/resources/shared/css/page.css b/src/webapp/lenya/pubs/default/resources/shared/css/page.css
deleted file mode 100644
index 4f13b84..0000000
--- a/src/webapp/lenya/pubs/default/resources/shared/css/page.css
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
-* Copyright 1999-2004 The Apache Software Foundation
-*
-* Licensed 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.
-*/
-
-/* page */
-
-#page {
-    padding: 0px;
-    margin: 0px;
-}
-
-/* tabs */
-
-#tabs {
-    border-bottom: solid 5px #DDBBBB;
-    color: Maroon;
-}
-
-#tabs a {
-    text-decoration: none;
-    color: Maroon;
-}
-
-#tabs table {
-    font-family: Verdana, Arial, Sans-serif;
-    font-size: 80%;
-}
-
-#tabs td {
-    vertical-align: bottom;
-}
-
-#tabs div {
-    white-space: nowrap;
-}
-
-.tab {
-    padding: .2em .5em;
-    background-color: #FFEEEE;
-    border: solid 1px #BB9999;
-}
-
-.tab-selected {
-    padding: .2em .5em;
-    background-color: #FFCCCC;
-    border: solid 1px #BB9999;
-    border-bottom: solid 1px #DDBBBB;
-}
-
-.tab-separator {
-    border-bottom: solid 1px #BB9999;
-}
-
-.tab-pre-separator {
-    width: 25px;
-    border-bottom: solid 1px #BB9999;
-}
-
-td.tab-post-separator {
-    width: 100%;
-}
-
-/* menu */
-
-#menu {
-    font-family: Verdana, Arial, Sans-serif;
-    background-color: #DDBBBB;
-    border: solid 1px #BB9999;
-    border-left: none;
-    border-top: none;
-    color: Maroon;
-    padding: 0px 0px 5px 25px;
-}
-
-#menu a {
-    text-decoration: none;
-    color: Maroon;
-}
-
-#menu a:hover {
-    text-decoration: underline;
-}
-
-.menublock-1, .menublock-selected-1 {
-    padding: 0px;
-    border-top: solid 1px #DDBBBB;
-    background: #FFCCCC;
-}
-
-.menublock-1 a { }
-.menublock-1 a:visited { }
-
-.menublock-1 .menublock-2 { display: none; }
-
-.menublock-selected-1 .menuitem-1 { background-color: #FFEEEE; }
-.menublock-1          .menuitem-1 { }
-
-.menuitem-1 { padding: 5px 5px 5px 5px; font-size: 80%; }
-.menuitem-2 { padding: 2px 5px 2px 25px; font-size: 80%; }
-.menuitem-selected-2 { padding: 2px 5px 2px 25px; font-size: 80%; color: black; }
-.menuitem-2 a { }
-
-.menuitem-selected-1 {
-    background-color: #FFEEEE;
-    padding: 5px 5px 5px 5px;
-    font-size: 80%;
-}
-
-
-.menuitem-3 { padding: 2px 5px 2px 25px; font-size: 60%; }
-.menuitem-selected-3 { padding: 2px 5px 2px 25px; font-size: 60%; }
-
-/* breadcrumb */
-
-#breadcrumb {
-    padding: 3px 0px 3px 30px;
-    background-color: #FFEEEE;
-    border-top: solid 1px #BB9999;
-    border-bottom: solid 1px #BB9999;
-    font-family: Verdana, Arial, Sans-serif;
-    font-size: 80%;
-}
-
-#breadcrumb a {
-    text-decoration: none;
-    color: Maroon;
-}
-
-#search {
-    font-family: Verdana, Arial, Sans-serif;
-    font-size: 80%;
-    margin-right: 10px;
-    float: right;
-    position:relative;
-    top:-20px
-}
-
-input.searchfield {
-    font-size: 80%;
-    background-color: #ffffff;
-    border: 1px solid #BB9999;
-}
-
-input.searchsubmit {
-    font-size: 80%;
-    color: Maroon;
-    background-color: #FFEEEE;
-    border: 1px solid #BB9999;
-}
-
-input.searchsubmit:hover {
-    background-color: #DDBBBB;
-}
-
-/*
-#search a {
-    text-decoration: none;
-    color: Maroon;
-}
-*/
-
-/* body */
-
-#body {
-    border: none;
-    padding: 1em;
-    margin-left: 10px;
-    font-family: Verdana, Arial, Sans-serif;
-}
-
-#main {
-/*
-    float: left;
-    width: 80%;
-*/
-}
-
-h1 { font-size: 140%; }
-h2 { font-size: 100%; }
-h3 { font-size: 80%; }
-p { font-size: 80%; }
-li { font-size: 80%; }
-
-.crossheading { font-weight: bold; font-size: 110%; }
-
-table.simple {
-    border-collapse: collapse;
-/*
-    background-color: #909090;
-    border-color: #909090;
-*/
-    width: auto;
-}
-
-td.simple {
-    font-size: 80%;
-    padding: 3px;
-    background-color: White;
-    border: solid 1px Navy;
-    vertical-align: top;
-}
-
-img.simple {
-}
-
-#publication-title {
-    font-family: verdana, arial, sans-serif;
-    font-weight: bold;
-    font-size: 20px;
-    vertical-align: bottom;
-    padding-left: 25px;
-    padding-bottom: 15px;
-    color: Maroon;
-}
-
-#project-logo {
-    padding: 10px 20px 0px 0px;
-    text-align: right;
-}
-
-.media {
-    text-align: center;
-    padding: 10px;
-}
-
-.caption {
-    padding: 5px;
-    text-align: center;
-    font-style: italic;
-    font-size: 80%;
-}
-
-.abstract {
-    font-weight: bold;
-}
-
-h1 {
-    font-size: 120%;
-    color: Maroon;
-}
-
-h2 {
-    font-size: 100%;
-    color: Maroon;
-    border-bottom: solid 1px #BB9999;
-    margin-top: 30px;
-}
-
-.asset { 
-    display: block;
-    color: #000;
-    font-size: 10px;
-    margin: 10px 10px 10px 5px;
-}
diff --git a/src/webapp/lenya/pubs/default/resources/shared/css/xhtml.css b/src/webapp/lenya/pubs/default/resources/shared/css/xhtml.css
deleted file mode 100644
index 86ea730..0000000
--- a/src/webapp/lenya/pubs/default/resources/shared/css/xhtml.css
+++ /dev/null
@@ -1 +0,0 @@
-/* Put your doctype-specific CSS here */
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/default/resources/shared/images/project-logo.png b/src/webapp/lenya/pubs/default/resources/shared/images/project-logo.png
deleted file mode 100644
index 81d3105..0000000
--- a/src/webapp/lenya/pubs/default/resources/shared/images/project-logo.png
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/pubs/default/sitemap.xmap b/src/webapp/lenya/pubs/default/sitemap.xmap
deleted file mode 100644
index 0b54f88..0000000
--- a/src/webapp/lenya/pubs/default/sitemap.xmap
+++ /dev/null
@@ -1,205 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
-
-  <map:views>
-    <map:view from-label="aggregation" name="aggregation">
-      <map:serialize type="xml"/>
-    </map:view>
-  </map:views>
-  
-  <map:resources>
-    <map:resource name="style-cms-page">
-      <map:transform type="i18n">      
-        <map:parameter name="locale" value="{request:locale}"/>
-      </map:transform>    
-      <map:transform src="fallback://lenya/xslt/util/page2xhtml.xsl">
-        <map:parameter name="contextprefix" value="{request:contextPath}"/>
-      </map:transform>
-      <map:transform src="../../xslt/util/strip_namespaces.xsl"/>
-      <map:select type="parameter">
-        <map:parameter name="statusCode" value="{statusCode}"/>
-        <map:when test="">
-          <map:serialize/>
-        </map:when>
-        <!-- FIXME workaround for http://issues.apache.org/bugzilla/show_bug.cgi?id=32336 -->
-        <map:when test="404">
-          <map:serialize status-code="404"/>
-        </map:when>
-        <map:otherwise>
-          <map:serialize status-code="{statusCode}"/>
-        </map:otherwise>
-      </map:select>
-    </map:resource>
-  </map:resources>
-
-  <map:pipelines>
-
-    <map:component-configurations>
-      <global-variables>
-        <cache-dir>work/cache</cache-dir>
-      </global-variables>
-    </map:component-configurations>
-
-    <map:pipeline>
-      <map:match pattern="**">
-        <map:select type="client">
-          <map:when test="webdav">
-            <map:mount uri-prefix="" src="{fallback:lenya/usecases/webdav/sitemap.xmap}" check-reload="true" reload-method="synchron"/>    
-          </map:when>
-        </map:select>
-      </map:match>
-      
-      <map:match pattern="**">
-         <map:match type="agent-match" pattern="*DAV*">
-            <map:mount uri-prefix="" src="{fallback:lenya/usecases/webdav/sitemap.xmap}" check-reload="true" reload-method="synchron"/>    
-         </map:match>
-      </map:match>
-      
-      <map:match pattern="**/">
-         <map:redirect-to uri="index.html"/>
-      </map:match>
-
-    </map:pipeline>
-    
-    <map:pipeline>
-    <!-- pattern="{rendertype}/{area}/{doctype}/{document-path}" -->
-      <!-- NOTE: rendertype seems to be 'edit' or 'view' -->
-      <map:match pattern="lenya-document/*/*/*/**.xml">
-        <map:mount uri-prefix="lenya-document/" src="{fallback:doctypes.xmap}" check-reload="true" reload-method="synchron"/>
-      </map:match>
-    </map:pipeline>
-
-
-
-    <!-- BX Editor: RNG Schema, CSS -->
-    <map:pipeline type="noncaching">
-      
-      <map:match pattern="*/schemas/**.rng">
-        <map:generate src="fallback://lenya/resources/schemas/{2}.rng"/>
-        <map:serialize type="xml"/>
-      </map:match>
-      
-      <map:match pattern="**/*-bxe.css">
-        <map:read mime-type="text/css" src="resources/misc/bxe/{2}-bxe.css"/>
-      </map:match>
-      </map:pipeline>
-    <!-- /BX Editor: RNG Schema -->
-
-    
-    <!-- This is the pipeline that builds the page. It aggregates all
-    the navigational elements (breadcrumb, tabs, menu) with the actual
-    content of the document. -->
-    <map:pipeline>
-      <!-- /lenyabody-{rendertype}/{publication-id}/{area}/{doctype}/{url} -->
-      <map:match pattern="lenyabody-*/*/*/*/**">
-        <map:aggregate element="cmsbody">
-          <map:part src="cocoon://navigation/{2}/{3}/breadcrumb/{5}.xml"/>
-          <map:part src="cocoon://navigation/{2}/{3}/tabs/{5}.xml"/>
-          <map:part src="cocoon://navigation/{2}/{3}/menu/{5}.xml"/>
-          <map:part src="cocoon://navigation/{2}/{3}/search/{5}.xml"/>
-          <map:part src="cocoon:/lenya-document/{1}/{3}/{4}/{page-envelope:document-path}"/>
-        </map:aggregate>
-        <map:transform src="fallback://xslt/page2xhtml-{4}.xsl">
-          <map:parameter name="root" value="{page-envelope:context-prefix}/{2}/{3}"/>
-          <map:parameter name="url" value="{5}"/>
-          <map:parameter name="document-id" value="{page-envelope:document-id}"/>
-          <map:parameter name="document-type" value="{page-envelope:document-type}"/>
-          <map:parameter name="language" value="{page-envelope:document-language}"/>
-        </map:transform>
-        <map:transform type="i18n">      
-          <map:parameter name="locale" value="{page-envelope:document-language}"/>
-        </map:transform>    
-        <map:select type="parameter">
-          <map:parameter name="parameter-selector-test" value="{1}"/>
-          <map:when test="view">
-	      <map:transform type="link-rewrite"/>
-          </map:when>
-        </map:select>
-        <map:serialize type="xml"/>
-      </map:match>
-    </map:pipeline>
-    
-    <!-- This is the main entry point into the publication. This
-    pipeline uses the uriparametrizer to determine the doctype of this
-    request. It then aggregates the lenya menu (for the given area) and
-    the lenya body, the actual document. -->
-    <map:pipeline>
-      <map:match pattern="**.bxe.html">
-        <map:generate src="cocoon:/lenyabody-edit/{page-envelope:publication-id}/{page-envelope:area}/{page-envelope:document-type}{page-envelope:document-url}"/>
-        <map:serialize type="xml"/>
-      </map:match>
-      
-      <map:match pattern="*/**.html">
-        <map:act type="language-exists">
-          <map:select type="resource-exists">
-            <!-- Read from cache -->
-            <!-- If configured within Apache then mod_lenya will nevertheless read from cache -->
-            <map:when test="{global:cache-dir}/{../1}/{../2}.html">
-              <map:read src="{global:cache-dir}/{../1}/{../2}.html" mime-type="text/html"/>
-            </map:when>
-            <!-- Write to cache and serialize -->
-            <map:otherwise>
-              
-          <map:generate src="cocoon:/lenyabody-view/{page-envelope:publication-id}/{page-envelope:area}/{page-envelope:document-type}{page-envelope:document-url}"/>
-          
-          <map:select type="browser">
-            <map:when test="mozilla5DISABLED">
-              <map:match pattern="authoring/**.html">
-                <map:transform src="cocoon://lenya-page/{page-envelope:publication-id}/{../../1}/{../../2}.xml?doctype={page-envelope:document-type}&amp;uiml=xul"/>
-              </map:match>
-              <map:serialize type="xml" mime-type="application/vnd.mozilla.xul+xml"/>
-            </map:when>
-            <map:otherwise>
-              <map:match pattern="authoring/**.html">
-                <map:transform src="cocoon://lenya-page/{page-envelope:publication-id}/{../../1}/{../../2}.xml?doctype={page-envelope:document-type}"/>
-              </map:match>
-              <map:transform src="../../xslt/util/strip_namespaces.xsl"/>
-              <!-- Write to cache for requests from live area -->
-              <map:select type="parameter">
-                <map:parameter name="parameter-selector-test" value="{../1}"/>
-                <map:when test="live">
-                  <map:transform src="../../xslt/authoring/edit/addSourceTags.xsl">
-                    <map:parameter name="source" value="{global:cache-dir}/{../1}/{../2}.html"/>
-                  </map:transform>
-                  <map:transform type="write-source">
-                    <map:parameter name="serializer" value="xhtml"/>
-                  </map:transform>
-                  <map:transform src="../../xslt/authoring/edit/removeSourceTags.xsl"/>
-                </map:when>
-              </map:select>
-    	      <map:serialize type="xhtml"/>
-            </map:otherwise>
-          </map:select>
-            </map:otherwise>
-          </map:select>
-        </map:act>
-
-        <!-- There is no version of the requested document-id for the
-             requested language. -->
-        <map:generate type="serverpages" src="../../content/exception/missing-language.xsp"/>
-        <map:transform src="fallback://lenya/xslt/exception/missing-language.xsl"/>
-        <map:call resource="style-cms-page"/>
-
-      </map:match>
-      
-    </map:pipeline>
-  </map:pipelines>
-</map:sitemap>
diff --git a/src/webapp/lenya/pubs/default/test/anteater/tests.xml b/src/webapp/lenya/pubs/default/test/anteater/tests.xml
deleted file mode 100644
index adafeb9..0000000
--- a/src/webapp/lenya/pubs/default/test/anteater/tests.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: tests.xml,v 1.3 2004/03/13 12:42:19 gregor Exp $ -->
-
-<property name="publication-id" value="default"/>
-
-<target name="pubs.default" depends="
-        pubs.default.intro,
-        pubs.default.login,
-        pubs.default.admin
-    "/>
-
-<target name="pubs.default.intro">
-  <echo>Testing the default publication</echo>
-  <echo>Testing introduction</echo>
-  <httpRequest path="/${publication-id}/introduction.html">
-    <match>
-      <responseCode value="200"/>
-      <regexp>Default Publication</regexp>
-    </match>
-  </httpRequest>
-</target>
-
-<target name="pubs.default.login">
-  <echo>Testing login</echo>
-  
-  <httpRequest
-      path="/${publication-id}/admin/index.html"
-      followRedirects="true">
-    <match>
-      <responseCode value="200"/>
-      <regexp>Username:</regexp>
-    </match>
-  </httpRequest>
-  
-  <httpRequest
-      path="/${publication-id}/admin/index.html"
-      followRedirects="true">
-    <parameter name="username" value="lenya"/>
-    <parameter name="password" value="levi"/>
-    <match>
-      <responseCode value="200"/>
-      <regexp>Welcome</regexp>
-    </match>
-  </httpRequest>
-  
-</target>
-
-<target name="pubs.default.admin" depends="pubs.default.admin.user"/>
-
-<target name="pubs.default.admin.user">
-  <echo>Testing user administration</echo>
-  <httpRequest path="/${publication-id}/admin/index.html">
-    <match>
-      <responseCode value="200"/>
-      <regexp>Default Publication</regexp>
-    </match>
-  </httpRequest>
-</target>
diff --git a/src/webapp/lenya/pubs/default/test/webtest/tests.xml b/src/webapp/lenya/pubs/default/test/webtest/tests.xml
deleted file mode 100644
index f43cee5..0000000
--- a/src/webapp/lenya/pubs/default/test/webtest/tests.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: tests.xml,v 1.2 2004/03/13 12:42:18 gregor Exp $ -->
-
-<property name="publication-id" value="default"/>
-
-<target name="pubs.default">
-
-  <testSpec name="pubs.default.intro">
-    &config;
-    <steps>
-      <invoke url="${publication-id}/introduction.html"/>
-      <verifytitle text="Lenya CMS Publication: Default Publication"/>
-    </steps>
-  </testSpec>
-  
-  <testSpec name="pubs.default.login">
-    &config;
-    <steps>
-      <invoke url="${publication-id}/introduction.html"/>
-      <clicklink label="Login as Editor"/>
-      <verifytitle text="LOGIN"/>
-      
-      <setinputfield name="username" value="lenya"/>
-      <setinputfield name="password" value="wrong"/>
-      <clickbutton label="login"/>
-      <verifytitle text="LOGIN"/>
-      <verifytext text="Authentication failed"/>
-      
-      <!--
-      <setinputfield name="username" value="lenya"/>
-      <setinputfield name="password" value="levi"/>
-      <clickbutton label="login"/>
-      <verifytitle text="Apache Lenya - default"/>
-      -->
-      
-    </steps>
-  </testSpec>
-  
-</target>
-  
diff --git a/src/webapp/lenya/pubs/default/usecase-bxe.xmap b/src/webapp/lenya/pubs/default/usecase-bxe.xmap
deleted file mode 100644
index b382d21..0000000
--- a/src/webapp/lenya/pubs/default/usecase-bxe.xmap
+++ /dev/null
@@ -1,293 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-<!-- 
-  This sitemap handles the interaction between the Bitflux Editor and Lenya
--->
-<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
-  
-  <!-- =========================== Resources ================================ -->
-  <map:resources>
-        
-    <map:resource name="style-cms-page">
-      <map:transform type="i18n">
-        <map:parameter name="locale" value="{request:locale}"/>
-      </map:transform>
-      <map:transform src="fallback://lenya/xslt/util/page2xhtml.xsl">
-        <map:parameter name="contextprefix" value="{request:contextPath}"/>
-      </map:transform>
-      <map:transform src="../../xslt/util/strip_namespaces.xsl"/>
-      <map:select type="parameter">
-        <map:parameter name="statusCode" value="{statusCode}"/>
-        <map:when test="">
-          <map:serialize type="xhtml" />
-        </map:when>
-        <map:otherwise>
-          <map:serialize type="xhtml" status-code="{statusCode}"/>
-        </map:otherwise>
-      </map:select>
-    </map:resource>
-    
-    <map:resource name="cms-screen-xml">
-          <map:generate src="../../content/{serverpage}" type="serverpages"/>
-          <map:transform src="../../xslt/{stylesheet}">
-            <map:parameter name="use-request-parameters" value="true"/>
-            <map:parameter name="contextprefix" value="{request:contextPath}"/>
-          </map:transform>      
-    </map:resource>
-    
-    <map:resource name="cms-screen">
-      <map:call resource="cms-screen-xml">
-        <map:parameter name="serverpage" value="{serverpage}"/>
-        <map:parameter name="stylesheet" value="{stylesheet}"/>
-      </map:call>
-      <map:call resource="style-cms-page"/>
-    </map:resource>
-    
-    
-  </map:resources>
-  <!-- =========================== Flow ===================================== -->
-  <map:flow language="javascript">
-    <map:script src="../../usecases/edit-document.js"/>
-  </map:flow>
-	<!-- =========================== Pipelines ================================ -->
-	
-  <map:pipelines>
-	  
-    <map:pipeline type="noncaching">
-
-      <map:match type="usecase" pattern="bxe">
-        
-        <map:match type="step" pattern="open">
-
-         <!--+
-             | Check if BXE is installed 
-	     +-->
-         <map:act type="resource-exists" src="../../resources/bxe/bxeLoader.js">
-
-           <map:act type="reserved-checkout">
-             <map:generate type="serverpages" src="../../content/rc/{exception}.xsp">
-               <map:parameter name="user" value="{user}"/>
-               <map:parameter name="filename" value="{filename}"/>
-               <map:parameter name="date" value="{date}"/>
-               <map:parameter name="message" value="{message}"/>
-             </map:generate>
-             <map:transform src="../../xslt/rc/rco-exception.xsl"/>
-             <map:call resource="style-cms-page"/>
-           </map:act>
-
-           <map:aggregate element="bxe">
-             <map:part src="../../resources/misc/bxe/index.xhtml"/>
-             <map:part src="../../resources/misc/bxe/content-namespaces.xml"/>
-           </map:aggregate>
-           <map:transform src="../../xslt/bxe/aggregate.xsl"/>
-           <map:transform src="../../xslt/bxe/index-xhtml.xsl">
-             <map:parameter name="configfile" value="{request:requestURI}?lenya.usecase=bxe&amp;lenya.step=config"/>
-             <map:parameter name="context" value="{request:contextPath}"/>
-           </map:transform>
-           <map:transform src="../../xslt/util/strip_namespaces.xsl"/>
-           <map:serialize type="xhtml"/>
-         </map:act>
-
-	 <!--+
-	     | BXE is not installed - generate info page for the user 
-	     +-->
-         <map:generate src="../../resources/misc/bxe/download.xhtml"/>
-         <map:call resource="style-cms-page"/>
-         <map:serialize type="xhtml"/>
-
-      </map:match>
-      
-      <map:match pattern="image-upload-show" type="step">
-        <map:call resource="cms-screen">
-           <map:parameter name="serverpage" value="info/assets.xsp"/>
-           <map:parameter name="stylesheet" value="bxe/image.xsl"/>
-        </map:call>
-      </map:match>
-
-      <map:match pattern="asset-upload-show" type="step">
-        <map:call resource="cms-screen">
-           <map:parameter name="serverpage" value="info/assets.xsp"/>
-           <map:parameter name="stylesheet" value="bxe/asset.xsl"/>
-        </map:call>
-      </map:match> 
-      
-          <map:match type="step" pattern="asset-upload">
-            <map:call resource="cms-screen">
-              <map:parameter name="serverpage" value="info/assets.xsp"/>
-              <map:parameter name="stylesheet" value="bxe/asset.xsl"/>
-            </map:call>
-          </map:match>
-
-          <map:match type="step" pattern="image-upload">
-	        <map:call resource="cms-screen">
-	           <map:parameter name="serverpage" value="info/assets.xsp"/>
-	           <map:parameter name="stylesheet" value="bxe/image.xsl"/>
-	        </map:call>
-	       </map:match>
-
-      <map:match pattern="link-show" type="step">
-            <!-- just a dummy xsp since we call the info area directly -->
-           <map:generate type="serverpages" src="../../content/info/assets.xsp"/>
-          <map:transform src="../../xslt/bxe/link.xsl" label="content">
-            <map:parameter name="infoarea" value="true"/>
-            <map:parameter name="contextprefix" value="{request:contextPath}"/>
-            <map:parameter name="publicationid" value="{page-envelope:publication-id}"/>
-            <map:parameter name="area" value="authoring"/>
-            <map:parameter name="tab" value="en"/>
-            <map:parameter name="chosenlanguage" value="{page-envelope:document-language}"/>
-            <map:parameter name="documentid" value="{page-envelope:document-id}"/>
-            <map:parameter name="documenturl" value="/{page-envelope:document-url}"/>
-            <map:parameter name="documentextension" value="{page-envelope:document-extension}"/>
-            <map:parameter name="defaultlanguage" value="{page-envelope:default-language}"/>
-            <map:parameter name="languages" value="{page-envelope:publication-languages-csv}"/>
-          </map:transform>
-        <map:call resource="style-cms-page"/>
-      </map:match>
-      
-      <!-- {publication-id}/{area}/info-sitetree -->
-      <map:match pattern="link-tree" type="step">
-        <map:select type="parameter">
-          <map:parameter name="parameter-selector-test" value="{request-param:incremental}"/>
-          <map:when test="true">
-            <map:generate src="../../content/util/empty.xml" />
-            <map:act type="set-header">
-              <map:parameter name="Cache-Control" value="pre-check=0" />
-              <map:parameter name="Expires" value="-1" />
-            </map:act>
-            <map:transform src="../../xslt/info/sitetree2tree.xsl" label="content">
-              <map:parameter name="contextprefix" value="{request:contextPath}"/>
-              <map:parameter name="publicationid" value="{page-envelope:publication-id}"/>
-              <map:parameter name="chosenlanguage" value="{request-param:language}"/>
-              <map:parameter name="defaultlanguage" value="{page-envelope:default-language}"/>
-              <map:parameter name="cutdocumentid" value="{session-attr:org.apache.lenya.cms.info.cutdocumentid}"/>
-              <map:parameter name="incremental" value="true"/>
-              <map:parameter name="areas" value="authoring"/>
-            </map:transform>
-          </map:when>
-          
-          <map:otherwise>
-            <map:aggregate element="lenya" label="aggregate">
-              <map:part src="content/authoring/sitetree.xml"/>
-            </map:aggregate>
-    
-            <map:transform src="../../xslt/navigation/sitetree2nav.xsl" label="navtree">
-              <map:parameter name="chosenlanguage" value="{request-param:language}"/>
-              <map:parameter name="defaultlanguage" value="{page-envelope:default-language}"/>
-            </map:transform>
-    
-            <map:transform src="../../xslt/bxe/sitetree2tree.xsl" label="content">
-              <map:parameter name="contextprefix" value="{request:contextPath}"/>
-              <map:parameter name="publicationid" value="{page-envelope:publication-id}"/>
-              <map:parameter name="chosenlanguage" value="{request-param:language}"/>
-              <map:parameter name="defaultlanguage" value="{page-envelope:default-language}"/>
-              <map:parameter name="cutdocumentid" value="{session-attr:org.apache.lenya.cms.info.cutdocumentid}"/>
-             </map:transform>
-           </map:otherwise>
-         </map:select>
-         
-        <map:serialize type="text"/>
-      </map:match>      
-
-      <map:match pattern="**/*.html">
-
-        <!--+
-	    | Build the BXE configuration
-	    +-->
-
-        <map:match type="step" pattern="config">
-          <map:generate src="fallback://lenya/resources/misc/bxe/inc/config.xml"/>
-          <map:transform src="fallback://lenya/xslt/bxe/config-xml.xsl">
-
-            <!-- Parameter BX_xmlfile:
-                 defines the Lenya URL with which BXE interacts, to
-                 1. get the document contents (by issuing a GET to this URL),
-                 2. save the changed contents (by issuing a PUT to this URL)
-              -->
-            <map:parameter name="BX_xmlfile" value="{request:requestURI}?lenya.usecase=bxe&amp;lenya.step=xml"/>
-
-            <map:parameter name="defaultlanguage" value="{page-envelope:default-language}"/>
-            
-  <!--      Instead of an xsl we use the xhtml file to provide the basic layout
-            <map:parameter name="BX_xslfile" value="{2}.xsl"/>
-  -->
-            <map:parameter name="BX_xhtmlfile" value="{../2}.bxe.html"/>
-            <map:parameter name="BX_validationfile" value="{request:contextPath}/{page-envelope:publication-id}/{page-envelope:area}/schemas/{page-envelope:document-type}.rng"/>
-            <map:parameter name="css" value="{request:contextPath}/{page-envelope:publication-id}/{page-envelope:area}/css/{page-envelope:document-type}-bxe.css"/>
-  <!--       The document is checked in when we exit from bx (in case of save&exit and in case of exit), so we use the usecase
-             for the checkin while we redirect to the document
-  -->
-            <map:parameter name="BX_exitdestination" value="{request:requestURI}?lenya.usecase=edit.bxe&amp;lenya.continuation={request-param:lenya.continuation}&amp;submit=Submit"/>
-            <map:parameter name="contextmenufile" value="../../resources/misc/bxe/contextmenu.xml"/>
-          </map:transform>
-          <map:transform type="cinclude"/>
-          <map:serialize type="xml"/>
-        </map:match>
-
-      </map:match>
-      
-      <map:match pattern="*/**.html">
-      
-      <map:match type="step" pattern="xml">      
-        <!--+
-            | This step handles the exchange of XML contents between BXE and Lenya.
-            | When BXE sends a GET request, it is requesting the contents of the
-            | document. When BXE sends a PUT request, it is sending the contents
-            | back to Lenya.
-            +-->
-        <map:select type="request-method">
-          
-          <!--
-             This reads the data that BXE posts when the user saves changes,      
-             applies a transformation and provides the data as XML
-             TODO: document why the special transformation is needed, either here
-             or in the change-object-path-back.xsl stylesheet.
-           -->
-          <map:when test="PUT">
-            <map:generate type="stream"/>
-            <map:transform src="../../xslt/bxe/change-object-path-back.xsl">
-              <map:parameter name="documentid" value="{page-envelope:document-id}"/>
-            </map:transform>
-            <map:transform src="../../usecases/edit/bxe/addSourceTags.xsl">
-              <map:parameter name="source" value="context://lenya/pubs/{page-envelope:publication-id}/work/bxe/content/{page-envelope:area}/{page-envelope:document-path}.tmp"/>
-            </map:transform>
-            <map:transform type="write-source"/>
-            <map:transform src="../../usecases/edit/bxe/removeSourceTags.xsl"/>
-            <map:serialize type="xml" status-code="204"/>
-          </map:when>
-
-          <map:otherwise> <!-- GET -->
-            <map:generate src="lenya://lenya/pubs/{page-envelope:publication-id}/content/authoring/{page-envelope:document-path}"/>
-            <map:transform src="../../xslt/bxe/change-object-path.xsl">
-              <map:parameter name="documentid" value="{page-envelope:document-id}"/>
-            </map:transform>
-            <map:serialize type="xml"/>
-          </map:otherwise>
-          
-        </map:select>
-      </map:match>
-      <!-- step xml -->
-      
-      </map:match> <!-- uri pattern -->
-            
-      </map:match> <!-- usecase -->
-    </map:pipeline>
-    
-	</map:pipelines>
-	
-</map:sitemap>
diff --git a/src/webapp/lenya/pubs/default/work/search/lucene/htdocs_dump/live/index.html b/src/webapp/lenya/pubs/default/work/search/lucene/htdocs_dump/live/index.html
deleted file mode 100644
index 10add46..0000000
--- a/src/webapp/lenya/pubs/default/work/search/lucene/htdocs_dump/live/index.html
+++ /dev/null
@@ -1,82 +0,0 @@
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<link rel="stylesheet" href="/lenya/default/live/css/page.css" type="text/css">
-</head>
-<body>
-<div class="project-logo">
-<img src="/lenya/default/live/images/project-logo.png"></div>
-<div id="tabs">
-<span class="tab-selected"><a href="index.html">Home</a></span>
-</div>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr>
-<td valign="top">
-<div id="menu">
-<div class="menublock-selected-1">
-<div class="menuitem-selected-1">Home</div>
-</div>
-</div>
-</td><td valign="top">
-<div id="main">
-<div id="breadcrumb">
-  &raquo;
-Home</div>
-<div id="body">
-<h1>
-<h1>DC Title</h1>
-</h1>
-<p class="simple">Hello and welcome to the Lenya default publication!</p>
-<p class="simple">Apache Lenya is a Java Open-Source Content Management System
-    based on open standards such as XML and XSLT and the Apache
-    Software Stack, in particular the XML publishing framework Apache
-    Cocoon.</p>
-<p class="simple">For an overview of the concepts and the terminology used in
-    Apache Lenya please see the <a href="concepts.html">Concepts
-    section</a>. To see what you can do with Apache Lenya please
-    refer to the <a href="features.html">Features
-    section</a>.</p>
-<p class="simple">If you'd like to get a quick introduction on how to use Apache
-    Lenya CMS please go through the <a href="tutorial.html">tutorial</a>.</p>
-<p class="simple">The purpose of this publication is</p>
-<ul>
-      
-<li>to show beginners the basic functionality of the Apache
-      Lenya CMS,</li>
-
-      
-<li>to provide an "out of the box" publication that can be
-      easily adapted and used,</li>
-
-      
-<li>and to provide a basis for reference implementations of new
-      concepts and best practices.</li>
-
-    
-</ul>
-<p class="simple">This publication does not go to the limit of what's possible
-    with Apache Lenya CMS, there are no fancy bells and whistles to
-    confuse you, this publication simply contains everything you need
-    to get started.</p>
-</div>
-</div>
-</td>
-</tr>
-</table>
-</body>
-</html>
diff --git a/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.f1 b/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.f1
deleted file mode 100644
index 08b9811..0000000
--- a/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.f1
+++ /dev/null
@@ -1 +0,0 @@
-m
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.f2 b/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.f2
deleted file mode 100644
index ce542ef..0000000
--- a/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.f2
+++ /dev/null
@@ -1 +0,0 @@
-ÿ
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.f3 b/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.f3
deleted file mode 100644
index a3871d4..0000000
--- a/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.f3
+++ /dev/null
@@ -1 +0,0 @@
-|
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.f4 b/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.f4
deleted file mode 100644
index a3871d4..0000000
--- a/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.f4
+++ /dev/null
@@ -1 +0,0 @@
-|
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.fdt b/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.fdt
deleted file mode 100644
index 8ccb64b..0000000
--- a/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.fdt
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.fdx b/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.fdx
deleted file mode 100644
index 1b1cb4d..0000000
--- a/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.fdx
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.fnm b/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.fnm
deleted file mode 100644
index 1599e04..0000000
--- a/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.fnm
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.frq b/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.frq
deleted file mode 100644
index c029423..0000000
--- a/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.frq
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.prx b/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.prx
deleted file mode 100644
index d435d71..0000000
--- a/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.prx
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.tii b/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.tii
deleted file mode 100644
index c18c85d..0000000
--- a/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.tii
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.tis b/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.tis
deleted file mode 100644
index 7d75833..0000000
--- a/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/_1.tis
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/deletable b/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/deletable
deleted file mode 100644
index 593f470..0000000
--- a/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/deletable
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/segments b/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/segments
deleted file mode 100644
index 02ec6b7..0000000
--- a/src/webapp/lenya/pubs/default/work/search/lucene/index/authoring/index/segments
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.f1 b/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.f1
deleted file mode 100644
index 08b9811..0000000
--- a/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.f1
+++ /dev/null
@@ -1 +0,0 @@
-m
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.f2 b/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.f2
deleted file mode 100644
index ce542ef..0000000
--- a/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.f2
+++ /dev/null
@@ -1 +0,0 @@
-ÿ
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.f3 b/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.f3
deleted file mode 100644
index a3871d4..0000000
--- a/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.f3
+++ /dev/null
@@ -1 +0,0 @@
-|
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.f4 b/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.f4
deleted file mode 100644
index a3871d4..0000000
--- a/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.f4
+++ /dev/null
@@ -1 +0,0 @@
-|
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.fdt b/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.fdt
deleted file mode 100644
index 8ccb64b..0000000
--- a/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.fdt
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.fdx b/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.fdx
deleted file mode 100644
index 1b1cb4d..0000000
--- a/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.fdx
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.fnm b/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.fnm
deleted file mode 100644
index 1599e04..0000000
--- a/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.fnm
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.frq b/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.frq
deleted file mode 100644
index c029423..0000000
--- a/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.frq
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.prx b/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.prx
deleted file mode 100644
index 80ca708..0000000
--- a/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.prx
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.tii b/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.tii
deleted file mode 100644
index c18c85d..0000000
--- a/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.tii
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.tis b/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.tis
deleted file mode 100644
index 3d20b5f..0000000
--- a/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/_1.tis
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/deletable b/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/deletable
deleted file mode 100644
index 593f470..0000000
--- a/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/deletable
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/segments b/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/segments
deleted file mode 100644
index 02ec6b7..0000000
--- a/src/webapp/lenya/pubs/default/work/search/lucene/index/live/index/segments
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/pubs/default/xslt/homepage2xhtml.xsl b/src/webapp/lenya/pubs/default/xslt/homepage2xhtml.xsl
deleted file mode 100644
index 6eae8f3..0000000
--- a/src/webapp/lenya/pubs/default/xslt/homepage2xhtml.xsl
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
->
-  
-<xsl:import href="fallback://xslt/xhtml2xhtml.xsl"/>
-  
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/pubs/default/xslt/lenya-header.xsl b/src/webapp/lenya/pubs/default/xslt/lenya-header.xsl
deleted file mode 100644
index a3c957b..0000000
--- a/src/webapp/lenya/pubs/default/xslt/lenya-header.xsl
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: lenya-header.xsl,v 1.8 2004/03/13 12:42:16 gregor Exp $ -->
-
-<xsl:stylesheet version="1.0"
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:dc="http://purl.org/dc/elements/1.1/"
-    xmlns="http://www.w3.org/1999/xhtml"
-    exclude-result-prefixes="dc"
-    >
-
-<xsl:template match="dc:*[not(node())]"/>
-
-<xsl:template match="dc:title">
-  <h1>
-    <xsl:if test="$rendertype = 'edit'">
-      <xsl:attribute name="bxe_xpath">/html/lenya:meta/dc:title</xsl:attribute>
-    </xsl:if>
-    <xsl:apply-templates/>
-  </h1>
-</xsl:template>
-
-<xsl:template match="dc:description">
-  <p class="abstract"><xsl:apply-templates/></p>
-</xsl:template>
-
-</xsl:stylesheet> 
\ No newline at end of file
diff --git a/src/webapp/lenya/pubs/default/xslt/links2xhtml.xsl b/src/webapp/lenya/pubs/default/xslt/links2xhtml.xsl
deleted file mode 100644
index 98fe8d3..0000000
--- a/src/webapp/lenya/pubs/default/xslt/links2xhtml.xsl
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:default="http://apache.org/lenya/pubs/default/1.0"
-  xmlns="http://www.w3.org/1999/xhtml"
->
-
-  <!-- default parameter value -->
-  <xsl:param name="rendertype" select="''"/>
-
-  <xsl:template match="default:links">
-    <div id="body">
-      <h1><xsl:value-of select="default:title"/></h1>
-      <ul>
-        <xsl:apply-templates select="default:link"/>
-      </ul>
-    </div>
-  </xsl:template>
-
-  <xsl:template match="default:link">
-    <li>
-      <a href="{@href}"><xsl:value-of select="."/></a>
-    </li>
-  </xsl:template>
-  
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/pubs/default/xslt/page2xhtml-homepage.xsl b/src/webapp/lenya/pubs/default/xslt/page2xhtml-homepage.xsl
deleted file mode 100644
index 133c1f7..0000000
--- a/src/webapp/lenya/pubs/default/xslt/page2xhtml-homepage.xsl
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
->
-  
-<xsl:import href="fallback://xslt/page2xhtml.xsl"/>
-  
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/pubs/default/xslt/page2xhtml-links.xsl b/src/webapp/lenya/pubs/default/xslt/page2xhtml-links.xsl
deleted file mode 100644
index 133c1f7..0000000
--- a/src/webapp/lenya/pubs/default/xslt/page2xhtml-links.xsl
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
->
-  
-<xsl:import href="fallback://xslt/page2xhtml.xsl"/>
-  
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/pubs/default/xslt/page2xhtml-xhtml.xsl b/src/webapp/lenya/pubs/default/xslt/page2xhtml-xhtml.xsl
deleted file mode 100644
index fb2df33..0000000
--- a/src/webapp/lenya/pubs/default/xslt/page2xhtml-xhtml.xsl
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0"?>
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
->
-  
-<xsl:import href="fallback://xslt/page2xhtml.xsl"/>
-
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/pubs/default/xslt/page2xhtml.xsl b/src/webapp/lenya/pubs/default/xslt/page2xhtml.xsl
deleted file mode 100644
index 6e43440..0000000
--- a/src/webapp/lenya/pubs/default/xslt/page2xhtml.xsl
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns="http://www.w3.org/1999/xhtml"
-    xmlns:xhtml="http://www.w3.org/1999/xhtml"
-    xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-    xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0" 
-    xmlns:dc="http://purl.org/dc/elements/1.1/"
-    exclude-result-prefixes="page xhtml dc lenya"
-    >
-    
-    
-<!-- {context-prefix}/{publication-id}/{area} -->
-<xsl:param name="root"/>
-
-<!-- i.e. doctypes/xhtml-document -->
-<xsl:param name="document-type"/>
-
-<xsl:param name="document-id"/>
-
-<!-- The rquest url i.e. /lenya/doctypes/xhtml-document_en.html -->
-<xsl:param name="url"/>
-
-<xsl:param name="language"/>
-
-<xsl:param name="document-type"/>
-
-<xsl:template match="cmsbody">
-  <html>
-    <head>
-      <link rel="stylesheet" href="{$root}/css/page.css" type="text/css"/>
-      <!-- Load doctype-specific CSS -->
-      <xsl:choose>
-        <xsl:when test="$document-type">
-            <link rel="stylesheet" href="{$root}/css/{$document-type}.css" type="text/css"/>
-        </xsl:when>
-        <xsl:otherwise>
-            <!-- do nothing -->
-        </xsl:otherwise>
-      </xsl:choose>
-      <meta content="Apache Lenya" name="generator"/>
-      <title><xsl:value-of select="//lenya:meta/dc:title"/></title>
-      <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8"/>
-    </head>	
-    <body>
-      <div id="page">
-      <table width="100%" cellpadding="0" cellspacing="0" border="0">
-        <tr>
-          <td id="publication-title">
-            <xsl:choose>
-              <xsl:when test="$language = 'de'">
-                Willkommen zur Default Publikation!
-              </xsl:when>
-              <xsl:otherwise>
-                Welcome to the Default Publication!
-              </xsl:otherwise>
-            </xsl:choose>
-          </td>
-          <td id="project-logo"><img src="{$root}/images/project-logo.png" alt="project logo"/></td>
-        </tr>
-      </table>
-      <xsl:apply-templates select="xhtml:div[@id = 'tabs']"/>
-      <table width="100%" border="0" cellpadding="0" cellspacing="0">
-        <tr>
-          <td valign="top" style="width: 230px">
-            <xsl:apply-templates select="xhtml:div[@id = 'menu']"/>
-          </td>
-          <td valign="top">
-            <div id="main">
-              <xsl:apply-templates select="xhtml:div[@id = 'breadcrumb']"/>
-              <xsl:apply-templates select="xhtml:div[@id = 'search']"/>
-              <xsl:apply-templates select="xhtml:div[@id = 'body']"/>
-            </div>
-          </td>
-        </tr>
-      </table>
-      </div>
-    </body>
-  </html>
-</xsl:template>
-
-<xsl:template match="@*|node()" priority="-1">
-  <xsl:copy>
-    <xsl:apply-templates select="@*|node()"/>
-  </xsl:copy>
-</xsl:template>
-
-
-</xsl:stylesheet> 
diff --git a/src/webapp/lenya/pubs/default/xslt/toDoc.xsl b/src/webapp/lenya/pubs/default/xslt/toDoc.xsl
deleted file mode 100644
index f6fa288..0000000
--- a/src/webapp/lenya/pubs/default/xslt/toDoc.xsl
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: toDoc.xsl,v 1.4 2004/03/13 12:42:16 gregor Exp $ -->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
-                xmlns:rc="http://apache.org/cocoon/lenya/rc/1.0" >
-
-<xsl:template match="rc:backup">
-        <xsl:apply-templates/> 
-</xsl:template>
-
-<xsl:template match="* | @*">
- <xsl:copy>
-    <xsl:copy-of select="@*"/>
-    <xsl:apply-templates/>
-  </xsl:copy>
-</xsl:template>
-                                                                                                                                            
-</xsl:stylesheet>
-
diff --git a/src/webapp/lenya/pubs/default/xslt/upload-generic.xsl b/src/webapp/lenya/pubs/default/xslt/upload-generic.xsl
deleted file mode 100644
index 78a78ce..0000000
--- a/src/webapp/lenya/pubs/default/xslt/upload-generic.xsl
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<xsl:stylesheet version="1.0" xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:uc="http://apache.org/cocoon/lenya/usecase/1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-  
-  <xsl:param name="lenya.usecase"/>
-  
-  <xsl:output encoding="ISO-8859-1" indent="yes" version="1.0"/>
-  
-  <xsl:variable name="user-id" select="/uc:create/uc:user-id"/>
-  
-  <xsl:template match="/">
-    <page:page xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0">
-      <page:title><xsl:call-template name="title"/></page:title>
-      <page:body>
-        <xsl:apply-templates/>
-      </page:body>
-    </page:page>
-  </xsl:template>
-  
-  <xsl:template match="uc:confirm">
-    <div class="lenya-box">
-      <div class="lenya-box-title"><xsl:value-of select="uc:form-title"/></div>
-      <div class="lenya-box-body">
-
-          <xsl:apply-templates select="uc:error-messages"/>
-        
-
-          <xsl:call-template name="fields"/>
-        
-      </div>
-    </div>
-  </xsl:template>
-
-<xsl:template match="uc:error-messages">
-  <table class="lenya-table-noborder">
-    <xsl:if test="uc:message">
-       <tr>
-          <td class="lenya-entry-caption">Problem:</td>
-          <td><xsl:apply-templates select="uc:message"/></td>
-       </tr>
-    </xsl:if>
-  </table>
-</xsl:template>
-
-<xsl:template match="uc:message">
-  <span class="lenya-form-message-error"><xsl:value-of select="."/></span><br/>
-</xsl:template>
-
-
-<xsl:template name="title">Upload Document</xsl:template>
-
-<xsl:template name="fields"/>
-
-
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/pubs/default/xslt/upload.xsl b/src/webapp/lenya/pubs/default/xslt/upload.xsl
deleted file mode 100644
index 246d3cf..0000000
--- a/src/webapp/lenya/pubs/default/xslt/upload.xsl
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<xsl:stylesheet version="1.0" xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:uc="http://apache.org/cocoon/lenya/usecase/1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-  
-  <xsl:import href="upload-generic.xsl"/>
-  
-  <!--<xsl:template name="title">Import Article (SGML)</xsl:template>-->
-  
-<xsl:template name="fields">
-  <form method="POST" enctype="multipart/form-data">
-
-    <input name="lenya.usecase" type="hidden" value="{$lenya.usecase}"/>
-    <input name="lenya.continuation" type="hidden" value="{uc:continuation}"/>
-
-    <!-- DEBUG ... -->
-    <!--<input name="cocoon-view" type="hidden" value="xml"/>-->
-
-    <table class="lenya-table-noborder">
-    <tr>
-      <td class="lenya-entry-caption">Upload Document</td>
-      <td>
-        <input class="lenya-form-element" name="upload-regulation" type="file"/>
-      </td>
-    </tr>
-
-    <tr>
-      <td/>
-      <td>
-        <input type="submit" name="submit" value="Upload"/>
-        <xsl:text> </xsl:text>
-        <input type="submit" value="Cancel"/>
-      </td>
-    </tr>
-    </table>
-  </form>
-</xsl:template>
-  
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/pubs/default/xslt/xhtml2xhtml.xsl b/src/webapp/lenya/pubs/default/xslt/xhtml2xhtml.xsl
deleted file mode 100644
index 6e8c88c..0000000
--- a/src/webapp/lenya/pubs/default/xslt/xhtml2xhtml.xsl
+++ /dev/null
@@ -1,142 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:xhtml="http://www.w3.org/1999/xhtml"
-    xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0" 
-    xmlns="http://www.w3.org/1999/xhtml"
-    xmlns:dc="http://purl.org/dc/elements/1.1/"
-    exclude-result-prefixes="xhtml lenya"
-    >
-
-<xsl:param name="rendertype" select="''"/>
-<xsl:param name="nodeid"/>
-
-<xsl:template match="/xhtml:html">
-  <xsl:copy-of select="lenya:meta"/>
-  <div id="body">
-    <xsl:if test="$rendertype = 'edit'">
-      <xsl:attribute name="bxe_xpath">/xhtml:html/xhtml:body</xsl:attribute>
-    </xsl:if>
-    <xsl:apply-templates select="xhtml:body/node()"/>
-  </div>
-</xsl:template>
-
-<xsl:template match="@*|node()">
-  <xsl:copy>
-    <xsl:apply-templates select="@*|node()"/>
-  </xsl:copy>
-</xsl:template>
-
-  <xsl:template name="substring-after-last">
-    <xsl:param name="input"/>
-    <xsl:param name="substr"/>
-    <xsl:variable name="temp" select="substring-after($input, $substr)"/>
-    <xsl:choose>
-      <xsl:when test="$substr and contains($temp, $substr)">
-        <xsl:call-template name="substring-after-last">
-          <xsl:with-param name="input" select="$temp"/>
-          <xsl:with-param name="susbtr" select="$substr"/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$temp"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
- <xsl:template match="lenya:asset">
-   <xsl:variable name="extent">
-     <xsl:value-of select="@size"/>
-   </xsl:variable>
-   <xsl:variable name="suffix">
-     <xsl:call-template name="substring-after-last">
-       <xsl:with-param name="input" select="@src"/>
-       <xsl:with-param name="substr">.</xsl:with-param>
-     </xsl:call-template>
-   </xsl:variable>
-   <div class="asset">
-       <xsl:text>&#160;</xsl:text>
-       <a href="{$nodeid}/{@src}">
-         <xsl:value-of select="text()"/>
-       </a>
-       (<xsl:value-of select="number($extent)"/>KB)
-   </div>
- </xsl:template>
-
-   <!-- this template converts the object tag to img (for compatiblity with older browsers 
-    for more, see http://www.xml.com/pub/a/2003/07/02/dive.html -->
-   <xsl:template name="object2img">
-      <img border="0">
-        <xsl:attribute name="src">
-          <xsl:choose>
-            <xsl:when test="not(starts-with(@data, '/'))">
-              <xsl:value-of select="$nodeid"/>/<xsl:value-of select="@data"/>
-            </xsl:when>
-            <xsl:otherwise>            
-              <xsl:value-of select="@data"/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:attribute>
-        <xsl:attribute name="alt">
-          <!-- the overwritten title (stored in @name) has precedence over dc:title -->
-          <xsl:choose>
-            <xsl:when test="@name != ''">
-              <xsl:value-of select="@name"/>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:value-of select="dc:metadata/dc:title"/>                    
-            </xsl:otherwise>
-            </xsl:choose>
-        </xsl:attribute>
-         <xsl:if test="string(@height)">
-          <xsl:attribute name="height">
-            <xsl:value-of select="@height"/>
-          </xsl:attribute>
-        </xsl:if> 
-        <xsl:if test="string(@width)">
-          <xsl:attribute name="width">
-            <xsl:value-of select="@width"/>
-          </xsl:attribute>
-        </xsl:if>         
-      </img>
-   </xsl:template>
-  
-  <xsl:template match="xhtml:object" priority="3">
-    <xsl:choose>
-      <xsl:when test="@href != ''">
-        <a href="{@href}">
-          <xsl:call-template name="object2img"/>
-        </a>
-      </xsl:when>
-      <xsl:when test="@type = 'application/x-shockwave-flash'">
-        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
-            <param name="movie" value="{$nodeid}/{@data}"/>
-        </object>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="object2img"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>  
-
-  <xsl:template match="dc:metadata"/>
-  
-</xsl:stylesheet> 
diff --git a/src/webapp/lenya/resources-shared.xmap b/src/webapp/lenya/resources-shared.xmap
deleted file mode 100644
index cf10cb2..0000000
--- a/src/webapp/lenya/resources-shared.xmap
+++ /dev/null
@@ -1,256 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
-
-  <map:pipelines>
-    <map:pipeline>
-      
-      <!-- Lenya Publications -->
-      
-      <!-- matches pub-id/area/css/*.css -->
-      <map:match pattern="*/*/css/*.css">
-        <map:act type="resource-exists" src="pubs/{1}/resources/shared/css/{3}.xml">
-          <map:generate src="pubs/{../1}/resources/shared/css/{../3}.xml"/>
-          <map:transform src="resources/css/css.xsl">
-            <map:parameter name="contextprefix" value="{request:contextPath}"/>
-          </map:transform>
-          <map:serialize type="text" mime-type="text/css"/>
-        </map:act>
-        <map:read src="fallback://resources/shared/css/{3}.css" mime-type="text/css" />
-      </map:match>
-      
-          <!-- matches pub-id/area/javascript/**.js -->
-          <map:match pattern="*/*/javascript/**.js">
-            <map:read src="pubs/{1}/resources/shared/javascript/{3}.js" mime-type="application/x-javascript" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.jpg -->
-          <map:match pattern="*/*/**.jpg">
-            <map:read src="fallback://resources/shared/{3}.jpg" mime-type="image/jpeg" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.JPG -->
-          <map:match pattern="*/*/**.JPG">
-            <map:read src="pubs/{1}/resources/shared/{3}.JPG" mime-type="image/jpeg" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.gif -->
-          <map:match pattern="*/*/**.gif">
-            <map:read src="pubs/{1}/resources/shared/{3}.gif" mime-type="image/gif" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.png -->
-          <map:match pattern="*/*/**.png">
-            <map:read src="fallback://resources/shared/{3}.png" mime-type="image/png" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.tar.gz -->
-          <map:match pattern="*/*/**.tar.gz">
-            <map:read src="pubs/{1}/resources/shared/{3}.tar.gz" mime-type="application/x-gtar" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.pdf -->
-          <map:match pattern="*/*/**.pdf">
-            <map:read src="pubs/{1}/resources/shared/{3}.pdf" mime-type="application/pdf" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.doc -->
-          <map:match pattern="*/*/**.doc">
-            <map:read src="pubs/{1}/resources/shared/{3}.doc" mime-type="application/msword" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.dot -->
-          <map:match pattern="*/*/**.dot">
-            <map:read src="pubs/{1}/resources/shared/{3}.dot" mime-type="application/msword" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.rtf -->
-          <map:match pattern="*/*/**.rtf">
-            <map:read src="pubs/{1}/resources/shared/{3}.rtf" mime-type="application/rtf" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.txt -->
-          <map:match pattern="*/*/**.txt">
-            <map:read src="pubs/{1}/resources/shared/{3}.txt" mime-type="text/plain" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.asc -->
-          <map:match pattern="*/*/**.asc">
-            <map:read src="pubs/{1}/resources/shared/{3}.asc" mime-type="text/plain" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.ascii -->
-          <map:match pattern="*/*/**.ascii">
-            <map:read src="pubs/{1}/resources/shared/{3}.ascii" mime-type="text/plain" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.xls -->
-          <map:match pattern="*/*/**.xls">
-            <map:read src="pubs/{1}/resources/shared/{3}.xls" mime-type="application/vnd.ms-excel" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.xlt -->
-          <map:match pattern="*/*/**.xlt">
-            <map:read src="pubs/{1}/resources/shared/{3}.xlt" mime-type="application/vnd.ms-excel" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.ppt -->
-          <map:match pattern="*/*/**.ppt">
-            <map:read src="pubs/{1}/resources/shared/{3}.ppt" mime-type="application/vnd.ms-powerpoint" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.pot -->
-          <map:match pattern="*/*/**.pot">
-            <map:read src="pubs/{1}/resources/shared/{3}.pot" mime-type="application/vnd.ms-powerpoint" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.swf -->
-          <map:match pattern="*/*/**.swf">
-            <map:read src="pubs/{1}/resources/shared/{3}.swf" mime-type="application/x-shockwave-flash" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.tif -->
-          <map:match pattern="*/*/**.tif">
-            <map:read src="pubs/{1}/resources/shared/{3}.tif" mime-type="image/tiff" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.eps -->
-          <map:match pattern="*/*/**.eps">
-            <map:read src="pubs/{1}/resources/shared/{3}.eps" mime-type="application/postscript" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.pct -->
-          <map:match pattern="*/*/**.pct">
-            <map:read src="pubs/{1}/resources/shared/{3}.pct" mime-type="application/x-ms-word" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.m3u -->
-          <map:match pattern="*/*/**.m3u">
-            <map:read src="pubs/{1}/resources/shared/{3}.m3u" mime-type="application/x-mpegurl" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.kar -->
-          <map:match pattern="*/*/**.kar">
-            <map:read src="pubs/{1}/resources/shared/{3}.kar" mime-type="audio/midi" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.mid -->
-          <map:match pattern="*/*/**.mid">
-            <map:read src="pubs/{1}/resources/shared/{3}.mid" mime-type="audio/midi" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.smf -->
-          <map:match pattern="*/*/**.smf">
-            <map:read src="pubs/{1}/resources/shared/{3}.smf" mime-type="application/vnd.stardivision.math" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.mp3 -->
-          <map:match pattern="*/*/**.mp3">
-            <map:read src="pubs/{1}/resources/shared/{3}.mp3" mime-type="audio/mpeg" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.swa -->
-          <map:match pattern="*/*/**.swa">
-            <map:read src="pubs/{1}/resources/shared/{3}.swa" mime-type="audio/x-swa" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.mpg -->
-          <map:match pattern="*/*/**.mpg">
-            <map:read src="pubs/{1}/resources/shared/{3}.mpg" mime-type="video/mpeg" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.mpv -->
-          <map:match pattern="*/*/**.mpv">
-            <map:read src="pubs/{1}/resources/shared/{3}.mpv" mime-type="video/mpeg" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.mp4 -->
-          <map:match pattern="*/*/**.mp4">
-            <map:read src="pubs/{1}/resources/shared/{3}.mp4" mime-type="video/mpeg" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.mov -->
-          <map:match pattern="*/*/**.mov">
-            <map:read src="pubs/{1}/resources/shared/{3}.mov" mime-type="video/quicktime" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.bin -->
-          <map:match pattern="*/*/**.bin">
-            <map:read src="pubs/{1}/resources/shared/{3}.bin" mime-type="application/mac-binhex40" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.sea -->
-          <map:match pattern="*/*/**.sea">
-            <map:read src="pubs/{1}/resources/shared/{3}.sea" mime-type="application/sea" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.hqx -->
-          <map:match pattern="*/*/**.hqx">
-            <map:read src="pubs/{1}/resources/shared/{3}.hqx" mime-type="application/mac-binhex40" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.sit -->
-          <map:match pattern="*/*/**.sit">
-            <map:read src="pubs/{1}/resources/shared/{3}.sit" mime-type="application/x-stuffit" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.zip -->
-          <map:match pattern="*/*/**.zip">
-            <map:read src="pubs/{1}/resources/shared/{3}.zip" mime-type="application/zip" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.jmx -->
-          <map:match pattern="*/*/**.jmx">
-            <map:read src="pubs/{1}/resources/shared/{3}.jmx" mime-type="application/x-ms-word" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.jcl -->
-          <map:match pattern="*/*/**.jcl">
-            <map:read src="pubs/{1}/resources/shared/{3}.jcl" mime-type="application/x-ms-word" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.qz -->
-          <map:match pattern="*/*/**.qz">
-            <map:read src="pubs/{1}/resources/shared/{3}.qz" mime-type="application/x-ms-word" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.jbc -->
-          <map:match pattern="*/*/**.jbc">
-            <map:read src="pubs/{1}/resources/shared/{3}.jbc" mime-type="application/x-ms-word" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.jmt -->
-          <map:match pattern="*/*/**.jmt">
-            <map:read src="pubs/{1}/resources/shared/{3}.jmt" mime-type="application/x-ms-word" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.cfg -->
-          <map:match pattern="*/*/**.cfg">
-            <map:read src="pubs/{1}/resources/shared/{3}.cfg" mime-type="application/x-ms-word" />
-          </map:match>
-
-          <!-- matches pub-id/area/**favicon.ico -->
-          <map:match pattern="*/*/**favicon.ico">
-            <map:read src="pubs/{1}/resources/shared/favicon.ico" mime-type="application/ico"/>
-          </map:match>
-
-    </map:pipeline>
-  </map:pipelines>
-</map:sitemap>
diff --git a/src/webapp/lenya/resources.xmap b/src/webapp/lenya/resources.xmap
deleted file mode 100644
index d6345e3..0000000
--- a/src/webapp/lenya/resources.xmap
+++ /dev/null
@@ -1,243 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
-
-  <map:pipelines>
-    <map:pipeline>
-      
-      <!-- Lenya Publications -->      
-          <!-- matches pub-id/area/css/*.css -->
-          <map:match pattern="*/*/css/*.css">
-            <map:read src="pubs/{1}/resources/css/{3}.css" mime-type="text/css" />
-          </map:match>
-
-          <!-- matches pub-id/area/javascript/**.js -->
-          <map:match pattern="*/*/javascript/**.js">
-            <map:read src="pubs/{1}/resources/javascript/{3}.js" mime-type="application/x-javascript" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.jpg -->
-          <map:match pattern="*/*/**.jpg">
-            <map:read src="pubs/{1}/resources/{2}/{3}.jpg" mime-type="image/jpeg" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.jpg -->
-          <map:match pattern="*/*/**.JPG">
-            <map:read src="pubs/{1}/resources/{2}/{3}.JPG" mime-type="image/jpeg" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.gif -->
-          <map:match pattern="*/*/**.gif">
-            <map:read src="pubs/{1}/resources/{2}/{3}.gif" mime-type="image/gif" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.png -->
-          <map:match pattern="*/*/**.png">
-            <map:read src="pubs/{1}/resources/{2}/{3}.png" mime-type="image/png" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.tar.gz -->
-          <map:match pattern="*/*/**.tar.gz">
-            <map:read src="pubs/{1}/resources/{2}/{3}.tar.gz" mime-type="application/x-gtar" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.pdf -->
-          <map:match pattern="*/*/**.pdf">
-            <map:read src="pubs/{1}/resources/{2}/{3}.pdf" mime-type="application/pdf" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.doc -->
-          <map:match pattern="*/*/**.doc">
-            <map:read src="pubs/{1}/resources/{2}/{3}.doc" mime-type="application/msword" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.dot -->
-          <map:match pattern="*/*/**.dot">
-            <map:read src="pubs/{1}/resources/{2}/{3}.dot" mime-type="application/msword" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.rtf -->
-          <map:match pattern="*/*/**.rtf">
-            <map:read src="pubs/{1}/resources/{2}/{3}.rtf" mime-type="application/rtf" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.txt -->
-          <map:match pattern="*/*/**.txt">
-            <map:read src="pubs/{1}/resources/{2}/{3}.txt" mime-type="text/plain" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.asc -->
-          <map:match pattern="*/*/**.asc">
-            <map:read src="pubs/{1}/resources/{2}/{3}.asc" mime-type="text/plain" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.ascii -->
-          <map:match pattern="*/*/**.ascii">
-            <map:read src="pubs/{1}/resources/{2}/{3}.ascii" mime-type="text/plain" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.xls -->
-          <map:match pattern="*/*/**.xls">
-            <map:read src="pubs/{1}/resources/{2}/{3}.xls" mime-type="application/vnd.ms-excel" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.xlt -->
-          <map:match pattern="*/*/**.xlt">
-            <map:read src="pubs/{1}/resources/{2}/{3}.xlt" mime-type="application/vnd.ms-excel" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.ppt -->
-          <map:match pattern="*/*/**.ppt">
-            <map:read src="pubs/{1}/resources/{2}/{3}.ppt" mime-type="application/vnd.ms-powerpoint" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.pot -->
-          <map:match pattern="*/*/**.pot">
-            <map:read src="pubs/{1}/resources/{2}/{3}.pot" mime-type="application/vnd.ms-powerpoint" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.swf -->
-          <map:match pattern="*/*/**.swf">
-            <map:read src="pubs/{1}/resources/{2}/{3}.swf" mime-type="application/x-shockwave-flash" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.tif -->
-          <map:match pattern="*/*/**.tif">
-            <map:read src="pubs/{1}/resources/{2}/{3}.tif" mime-type="image/tiff" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.eps -->
-          <map:match pattern="*/*/**.eps">
-            <map:read src="pubs/{1}/resources/{2}/{3}.eps" mime-type="application/postscript" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.pct -->
-          <map:match pattern="*/*/**.pct">
-            <map:read src="pubs/{1}/resources/{2}/{3}.pct" mime-type="application/x-ms-word" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.m3u -->
-          <map:match pattern="*/*/**.m3u">
-            <map:read src="pubs/{1}/resources/{2}/{3}.m3u" mime-type="application/x-mpegurl" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.kar -->
-          <map:match pattern="*/*/**.kar">
-            <map:read src="pubs/{1}/resources/{2}/{3}.kar" mime-type="audio/midi" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.mid -->
-          <map:match pattern="*/*/**.mid">
-            <map:read src="pubs/{1}/resources/{2}/{3}.mid" mime-type="audio/midi" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.smf -->
-          <map:match pattern="*/*/**.smf">
-            <map:read src="pubs/{1}/resources/{2}/{3}.smf" mime-type="application/vnd.stardivision.math" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.mp3 -->
-          <map:match pattern="*/*/**.mp3">
-            <map:read src="pubs/{1}/resources/{2}/{3}.mp3" mime-type="audio/mpeg" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.swa -->
-          <map:match pattern="*/*/**.swa">
-            <map:read src="pubs/{1}/resources/{2}/{3}.swa" mime-type="audio/x-swa" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.mpg -->
-          <map:match pattern="*/*/**.mpg">
-            <map:read src="pubs/{1}/resources/{2}/{3}.mpg" mime-type="video/mpeg" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.mpv -->
-          <map:match pattern="*/*/**.mpv">
-            <map:read src="pubs/{1}/resources/{2}/{3}.mpv" mime-type="video/mpeg" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.mp4 -->
-          <map:match pattern="*/*/**.mp4">
-            <map:read src="pubs/{1}/resources/{2}/{3}.mp4" mime-type="video/mpeg" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.mov -->
-          <map:match pattern="*/*/**.mov">
-            <map:read src="pubs/{1}/resources/{2}/{3}.mov" mime-type="video/quicktime" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.bin -->
-          <map:match pattern="*/*/**.bin">
-            <map:read src="pubs/{1}/resources/{2}/{3}.bin" mime-type="application/mac-binhex40" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.sea -->
-          <map:match pattern="*/*/**.sea">
-            <map:read src="pubs/{1}/resources/{2}/{3}.sea" mime-type="application/sea" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.hqx -->
-          <map:match pattern="*/*/**.hqx">
-            <map:read src="pubs/{1}/resources/{2}/{3}.hqx" mime-type="application/mac-binhex40" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.sit -->
-          <map:match pattern="*/*/**.sit">
-            <map:read src="pubs/{1}/resources/{2}/{3}.sit" mime-type="application/x-stuffit" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.zip -->
-          <map:match pattern="*/*/**.zip">
-            <map:read src="pubs/{1}/resources/{2}/{3}.zip" mime-type="application/zip" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.jmx -->
-          <map:match pattern="*/*/**.jmx">
-            <map:read src="pubs/{1}/resources/{2}/{3}.jmx" mime-type="application/x-ms-word" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.jcl -->
-          <map:match pattern="*/*/**.jcl">
-            <map:read src="pubs/{1}/resources/{2}/{3}.jcl" mime-type="application/x-ms-word" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.qz -->
-          <map:match pattern="*/*/**.qz">
-            <map:read src="pubs/{1}/resources/{2}/{3}.qz" mime-type="application/x-ms-word" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.jbc -->
-          <map:match pattern="*/*/**.jbc">
-            <map:read src="pubs/{1}/resources/{2}/{3}.jbc" mime-type="application/x-ms-word" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.jmt -->
-          <map:match pattern="*/*/**.jmt">
-            <map:read src="pubs/{1}/resources/{2}/{3}.jmt" mime-type="application/x-ms-word" />
-          </map:match>
-
-          <!-- matches pub-id/area/**.cfg -->
-          <map:match pattern="*/*/**.cfg">
-            <map:read src="pubs/{1}/resources/{2}/{3}.cfg" mime-type="application/x-ms-word" />
-          </map:match>
-
-    </map:pipeline>
-  </map:pipelines>
-</map:sitemap>
diff --git a/src/webapp/lenya/resources/css/admin.css b/src/webapp/lenya/resources/css/admin.css
deleted file mode 100644
index efb8911..0000000
--- a/src/webapp/lenya/resources/css/admin.css
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
-* Copyright 1999-2004 The Apache Software Foundation
-*
-* Licensed 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.
-*/
-@import url(default.css);
-@import url(navigation.css);
diff --git a/src/webapp/lenya/resources/css/antlog.css b/src/webapp/lenya/resources/css/antlog.css
deleted file mode 100644
index 3179b4b..0000000
--- a/src/webapp/lenya/resources/css/antlog.css
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
-* Copyright 1999-2004 The Apache Software Foundation
-*
-* Licensed 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.
-*/
-    .lenya-ant-bannercell {
-      border: 0px;
-      padding: 0px;
-    }
-    
-    table.lenya-ant-status {
-      font:bold 80% arial,helvetica,sans-serif;
-      background-color:#525D76;
-      color:#ffffff;
-    }
-    
-    table.lenya-ant-log tr td,
-    table.lenya-ant-log tr th {
-      font-size: 80%;
-    }
-    .lenya-ant-error {
-      color:red;
-      background-color: transparent;
-    }
-    .lenya-ant-warn {
-      color:maroon;
-      background-color: transparent;
-    }
-    .lenya-ant-info {
-      color:gray;
-      background-color: transparent;
-    }
-    .lenya-ant-debug{
-      color:gray;
-      background-color: transparent;
-    }
-    .lenya-ant-failed {
-      font-size:80%;
-      background-color: red;
-      color:#FFFFFF;
-      font-weight: bold
-    }
-    .lenya-ant-complete {
-      font-size:80%;
-      background-color: #525D76;
-      color:#FFFFFF;
-      font-weight: bold
-    }
-    
-    .lenya-ant-a td { 
-      background: #efefef;
-      color: black;
-    }
-    
-    .lenya-ant-b td { 
-      background: #fff;
-      color: black;
-    }
-    
diff --git a/src/webapp/lenya/resources/css/boxes.css b/src/webapp/lenya/resources/css/boxes.css
deleted file mode 100644
index 41fd507..0000000
--- a/src/webapp/lenya/resources/css/boxes.css
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
-* Copyright 1999-2004 The Apache Software Foundation
-*
-* Licensed 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.
-*/
-div.lenya-box {
-	border: solid 1px #CCCCCC;
-	width: auto;
-	max-width: 100%;
-	font-size: small;
-	margin-bottom: 10px;
-}
-
-div.lenya-box-title {
-    background-color: #DDDCCF;
-	border-bottom: solid 1px #CCCCCC;
-	color: Black;
-	font-weight: bold;
-	padding: 3px 10px;
-}
-
-div.lenya-box-body {
-    padding: 10px;
-    background-color: #F5F4E9;
-	color: Black;
-}
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/css/css.xsl b/src/webapp/lenya/resources/css/css.xsl
deleted file mode 100644
index 353bd10..0000000
--- a/src/webapp/lenya/resources/css/css.xsl
+++ /dev/null
@@ -1,14 +0,0 @@
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-  
-<xsl:param name="contextprefix"/>
-
-<xsl:template match="css">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="context-prefix">
-  <xsl:value-of select="$contextprefix"/>
-</xsl:template>
-  
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/css/default.css b/src/webapp/lenya/resources/css/default.css
deleted file mode 100644
index 75e9f45..0000000
--- a/src/webapp/lenya/resources/css/default.css
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
-* Copyright 1999-2004 The Apache Software Foundation
-*
-* Licensed 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.
-*/
-@import url(antlog.css);
-@import url(forms.css);
-@import url(tables.css);
-@import url(menu.css);
-@import url(tabs.css);
-@import url(boxes.css);
-
-body {
-    margin: 0px;
-    padding: 0px;
-    font-family: Verdana, sans-serif;
-}
-
-h1 {
-    font-family: Verdana, sans-serif;
-    font-size: 150%;
-    padding: 0px;
-    margin: 0px;
-}
-
-p {
-    font-size: small;
-}
-
-li {
-    font-size: small;
-}
-
-.lenya-header {
-    vertical-align: bottom;
-    padding-left: 20px;
-    background-color: White;
-    border-bottom: solid 1px #B1B1B1;
-    color: black;
-}
-
-.lenya-body {
-    width: 100%;
-    height: 100%;
-    background-color: #F5F4E9;
-    color: black;
-}
-
-.lenya-project-logo {
-    vertical-align: bottom;
-    text-align: right;
-    border-bottom: solid 1px #B1B1B1;
-}
-
-td.lenya-content {
-    background-color: White;
-    padding: 30px;
-    vertical-align: top;
-    color: black;
-}
-
-td.lenya-sidebar {
-    border-right: solid 1px #B1B1B1;
-    vertical-align: top;
-    width: 20%;
-}
-
-td.lenya-frontpage {
-    background-color: White;
-    padding: 30px;
-    vertical-align: top;
-    color: black;
-}
-
-.lenya-page-title {
-    font-size: 130%;
-    font-weight: bold;
-}
-
-div.lenya-error {
-    padding: 5px;
-    margin: 5px 0px;
-    background-color: #FF9999;
-}
-
-.lenya-page-subtitle {
-    background-color: #E5F5F8;
-    border-bottom: solid 1px #B1B1B1;
-    font-size: 70%;
-    font-weight: bold;
-    text-align: right;
-    padding: 5px;
-    color: black;
-}
-
-.lenya-publication-item {
-    padding: 0px 10px;
-    margin: 20px 0px;
-    border-bottom: solid 1px #DDDCCF;
-}
-
-.lenya-sidebar a {
-    text-decoration: none;
-}
-
-.lenya-sidebar ul {
-    margin: 10px 0px;
-    padding: 10px 0px 10px 20px;
-    list-style: none;
-}
-
-.lenya-sidebar li {
-    padding: 0px;
-    margin: 3px 0px;
-    border-bottom: solid 1px #DDDCCF;
-}
-
-.lenya-sidebar-heading {
-    font-weight: bold;
-    font-size: 150%;
-    color: White;
-    background-color: #DDDCCF;
-    padding: 0px 10px 5px 10px;
-}
-
-.lenya-admin-required {
-	color: Red;
-}
-
diff --git a/src/webapp/lenya/resources/css/forms.css b/src/webapp/lenya/resources/css/forms.css
deleted file mode 100644
index eb4303c..0000000
--- a/src/webapp/lenya/resources/css/forms.css
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
-* Copyright 1999-2004 The Apache Software Foundation
-*
-* Licensed 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.
-*/
-
-form {
-	margin: 0px;
-	padding: 0px;
-}
-
-td.lenya-entry-caption {
-	text-align: right;
-	color: #606060;
-	background-color: transparent;
-}
-
-.lenya-form-element {
-    width: 300px;
-    font-family: Verdana, sans-serif;
-}
-
-.lenya-form-element-narrow {
-    width: 150px;
-    font-family: Verdana, sans-serif;
-}
-
-.lenya-form-message-error {
-    font-weight: bold;
-    color: red;
-	background-color: transparent;
-}
-
-.lenya-form-message-success {
-    font-weight: bold;
-    color: navy;
-	background-color: transparent;
-}
-
-textarea {
-    font-size: small;
-}
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/css/menu.css b/src/webapp/lenya/resources/css/menu.css
deleted file mode 100644
index 03cf4f7..0000000
--- a/src/webapp/lenya/resources/css/menu.css
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
-* Copyright 1999-2004 The Apache Software Foundation
-*
-* Licensed 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.
-*/
-just a dummy file
-use menu.xml instead
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/css/menu.xml b/src/webapp/lenya/resources/css/menu.xml
deleted file mode 100644
index 0033fb0..0000000
--- a/src/webapp/lenya/resources/css/menu.xml
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-<css>
-    
-body { background-color: #fff; margin: 0; padding: 0; }
-
-#lenya-menus { position: absolute; top: 0; left: 0; z-index: 2; width: 100%; height: 57px; background: url(<context-prefix/>/lenya/menu/images/menu-background.gif) 0 0 repeat-x; }
-
-#lenya-logo { position: absolute; z-index: 3; width: 90px; height: 25px; top: 31px; left: 100%; margin-left: -90px; }
-
-#lenya-cmsbody { position: absolute; width: 100%; top: 57px; left: 0px; z-index: 1; }
-
-#lenya-areas { float: left; height: 25px; margin: 5px 0 0 10px; }
-
-#lenya-info { float: right; height: 20px; margin: 9px 10px 0 0; font-size: 11px; font-family: Arial, "Lucida Grande", Verdana, Helvetica, sans-serif; line-height: 1; }
-
-#lenya-options { padding: 9px 0 0 27px; clear: both; height: 31px; font-size: 11px; font-family: Arial, "Lucida Grande", Verdana, Helvetica, sans-serif; line-height: 1; }
-
-#lenya-options ul { list-style: none; margin: 0; padding: 0; }
-
-#lenya-options ul li { float: left; width: 7em; }
-
-#lenya-options ul li#nav4 { width: 9em; }
-
-#lenya-options ul li, #lenya-options ul li a { display: block; color: #333; font-size: 12px; text-decoration: none; font-weight: bold; cursor: pointer; }
-
-#lenya-options ul li ul { position: absolute; display: block; width: 12em; top: 56px; border: 1px solid #c6c6c5; background: #f1f1f1; padding: 7px; visibility: hidden; }
-
-#lenya-options ul li ul#menu1 { left: 20px; }
-
-#lenya-options ul li ul#menu2 { left: 105px; }
-
-#lenya-options ul li ul#menu3 { left: 187px; }
-
-#lenya-options ul li ul#menu4 { left: 275px; }
-
-#lenya-options ul li ul#menu5 { left: 360px; }
-
-#lenya-options ul li ul#menu6 { left: 445px; }
-
-#lenya-options ul li ul li { width: 12em; }
-
-#lenya-options ul li ul li.lenya-menu-separator { border-bottom: 1px dotted #c6c5c5; margin: 4px 0; font-size: 1px; height: 2px; width: 95%; }
-
-#lenya-options ul li ul li { padding: 0 0 0 3px; }
-
-#lenya-options ul li ul li.disabled { font-size: 11px; font-weight: normal; color: #999; padding: 2px 0 2px 3px; cursor: default; }
-
-#lenya-options ul li.disabled { cursor: default; color: #999; }
-
-#lenya-options ul li ul li a { font-size: 11px; font-weight: normal; padding: 2px 0; }
-
-#lenya-options ul li ul li a:hover { background: #fff; }
-
-#lenya-areas ul { margin: 0; padding: 0; }
-
-#lenya-areas ul li { list-style: none; float: left; display: block; margin: 0 1px 0 0; }
-
-#lenya-areas ul li a { color: #454646; display: block; text-decoration: none; text-align: center; padding: 9px 9px 0 9px; height: 16px !important; height /**/: 25px; display: inline-block; }
-
-#lenya-areas ul li a span { font: bold 10px/1.0 Arial, Verdana, sans-serif; text-transform: uppercase; }
-
-#lenya-areas ul li#area-admin-active a { color: #3975b3; background: url(<context-prefix/>/lenya/menu/images/active.gif) 0 0 repeat-x; }
-
-#lenya-areas ul li#area-admin a { background: url(<context-prefix/>/lenya/menu/images/inactive.gif) 0 0 repeat-x; }
-
-#lenya-areas ul li#area-info-authoring a { background: url(<context-prefix/>/lenya/menu/images/inactive.gif) 0 0 repeat-x; }
-
-#lenya-areas ul li#area-info-authoring-active a { color: #3975b3; background: url(<context-prefix/>/lenya/menu/images/active.gif) 0 0 repeat-x; }
-
-#lenya-areas ul li#area-authoring a { background: url(<context-prefix/>/lenya/menu/images/inactive.gif) 0 0 repeat-x; }
-
-#lenya-areas ul li#area-authoring-active a { color: #3975b3; background: url(<context-prefix/>/lenya/menu/images/active.gif) 0 0 repeat-x; }
-
-#lenya-areas ul li#area-live-active a { color: #3975b3; background: url(<context-prefix/>/lenya/menu/images/active.gif) 0 0 repeat-x; }
-
-#lenya-areas ul li#area-live a { background: url(<context-prefix/>/lenya/menu/images/inactive.gif) 0 0 repeat-x; }
-
-#lenya-areas ul li#area-staging-active a { color: #3975b3; background: url(<context-prefix/>/lenya/menu/images/active.gif) 0 0 repeat-x; }
-
-#lenya-areas ul li#area-staging a { background: url(<context-prefix/>/lenya/menu/images/inactive.gif) 0 0 repeat-x; }
-
-#lenya-areas ul li#area-admin a:hover, #lenya-areas ul li#area-info-authoring a:hover, #lenya-areas ul li#area-authoring a:hover, #lenya-areas ul li#area-staging a:hover, #lenya-areas ul li#area-live a:hover { background-position: 0 -25px; }
-
-#lenya-info ul { margin: 0; padding: 0; }
-
-#lenya-info ul li { list-style: none; display: block; float: left; font-size: 11px; color: #fff; padding: 0 5px; border-right: 1px solid #fff; }
-
-#lenya-info ul li#info-time { border: 0; }
-
-#page { width: 100%; height: 100%; }
-
-</css>
diff --git a/src/webapp/lenya/resources/css/navigation.css b/src/webapp/lenya/resources/css/navigation.css
deleted file mode 100644
index adcf93b..0000000
--- a/src/webapp/lenya/resources/css/navigation.css
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
-* Copyright 1999-2004 The Apache Software Foundation
-*
-* Licensed 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.
-*/
-
-/* menu */
-
-#menu {
-	margin: 20px 0px;
-}
-
-#menu a {
-    text-decoration: none;
-}
-
-#menu a:hover {
-    text-decoration: underline;
-}
-
-#menu .menublock-1 {
-    padding: 5px 0px 5px 20px;
-    list-style: none;
-}
-
-#menu .menublock-selected-1 {
-    padding: 5px 0px 5px 20px;
-    list-style: none;
-}
-
-#menu .menublock-1 a { color: #909090; background-color: transparent;}
-#menu .menublock-1 a:visited { }
-
-#menu .menublock-1 .menublock-2 { display: none; }
-
-#menu .menublock-selected-1 .menuitem-1 { font-weight: bold; }
-
-#menu .menuitem-1 {
-    padding: 0px;
-    margin: 3px 0px;
-    border-bottom: solid 1px #DDDCCF;
-}
-
-#menu .menuitem-2 { padding-left: 20px; padding-top: 2px; padding-bottom: 2px; font-size: 70%; }
-#menu .menuitem-2 a { color: #9090C0; background-color: transparent;}
-#menu .menuitem-3 { padding-left: 30px; padding-right: .5em; padding-top: .2em; padding-bottom: .2em; font-size: 60%; }
-
-#menu .menuitem-selected-1 {
-	font-weight: bold;
-    padding: 0px;
-    margin: 3px 0px;
-    border-bottom: solid 1px #DDDCCF;
-}
-
-#menu .menuitem-selected-2 { padding-left: 20px; margin-top: 2px; margin-bottom: 2px; font-size: 70%; }
-#menu .menuitem-selected-3 { padding-left: 30px; font-size: 60%; padding-right: .5em; padding-top: .2em; padding-bottom: .2em; }
-
diff --git a/src/webapp/lenya/resources/css/tables.css b/src/webapp/lenya/resources/css/tables.css
deleted file mode 100644
index 31e553a..0000000
--- a/src/webapp/lenya/resources/css/tables.css
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-* Copyright 1999-2004 The Apache Software Foundation
-*
-* Licensed 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.
-*/
-
-table.lenya-table {
-	color: Black;
-	background-color: White;
-	border-spacing: 0px;
-	border-collapse: collapse;
-}
-
-table.lenya-table-noborder {
-	border: 0px;
-	border-spacing: 0px;
-}
-
-table.lenya-table th {
-    background-color: #DDDCCF;
-	border: solid 1px #CCCCCC;
-	color: Black;
-	font-weight: bold;
-	padding: 3px 10px;
-	text-align: left;
-	font-size: small;
-}
-
-table.lenya-table td {
-    background-color: #F5F4E9;
-	border: solid 1px #CCCCCC;
-	padding: 3px 10px;
-	font-size: small;
-	color: Black;
-}
-
-table.lenya-table-noborder td {
-	border: 0px;
-	padding: 3px 10px;
-	font-size: small;
-}
-
-table.lenya-table-noborder-nopadding td {
-	border: 0px;
-	padding: 0px;
-	font-size: small;
-}
-
-table.lenya-table-noborder-nopadding th {
-	font-size: small;
-}
-
diff --git a/src/webapp/lenya/resources/css/tabs.css b/src/webapp/lenya/resources/css/tabs.css
deleted file mode 100644
index 51437ee..0000000
--- a/src/webapp/lenya/resources/css/tabs.css
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
-* Copyright 1999-2004 The Apache Software Foundation
-*
-* Licensed 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.
-*/
-/* Styles for tabs in Site / Meta Area */
-
-.lenya-tab {
-	font-family: verdana, sans-serif;
-	font-size: small;
-	background-color: #F5F4E9; 
-	padding: 20px;
-	color: black;
-	border: solid 1px #CCCCCC;
-
-	position: relative;
-	top: 1px;
-}
-
-.lenya-tab-sitetree {
-	font-family: verdana, sans-serif;
-	font-size: small;
-	background-color: #F5F4E9; 
-	padding: 20px;
-	color: black;
-	border: solid 1px #CCCCCC;
-
-	position: relative;
-	top: 1px;
-	margin-left: 270px;
-}
-
-.lenya-tabs {
-}
-
-.lenya-tabs-sitetree {
-    margin-left: 270px;
-}
-
-.lenya-tablink {
-	color: #666666;
-	font-size: 10pt;
-	display: inline; /*mandatory*/
-	margin-right: .5em;
-	padding: 0px 1em;
-	
-	position: relative;
-	top: 1px;
-	
-	text-decoration: none;
-	
-	background-color: #DDDCCF; 
-	border: solid 1px #CCCCCC;
-}
-
-.lenya-tablink-active {
-	color: black;
-	font-size: 10pt;
-	display: inline; /*mandatory*/
-	margin-right: .5em;
-	padding: 0px 1em;
-
-	position: relative;
-	top: 1px;
-	
-	text-decoration: none;
-	
-	background-color: #F5F4E9; 
-	border: solid 1px #CCCCCC;
-	border-bottom: solid 1px #F5F4E9;
-	z-index: 1;
-}
-
-#lenya-info-body {
-	padding: 20px;
-}
-
-#lenya-info-treecanvas {
-	font-size: 8pt;
-}
-	
-#lenya-info-tree {
-	padding: 10px;
-	background-color: #F5F4E9; 
-	border: solid 1px #CCCCCC;
-    font-family: verdana,helvetica, sans-serif; 
-    text-decoration: none;
-    color: black;	
-
-	position: relative;
-	top: 1px;
-
-    width: 230px;
-    float: left;
-}
-
-#lenya-info-tree td {
-    font-family: verdana, helvetica, sans-serif;
-    font-size: small;
-}
-
-#lenya-info-tree a { color: #333333; text-decoration: none; }
-#lenya-info-tree .lenya-info-nolanguage { color: #AAAAAA; }
-#lenya-info-tree .lenya-info-cut { color: #FFAAAA; font-style: italic; }
-#lenya-info-tree .lenya-info-protected { color: #CC3333; }
-//#lenya-info-tree a:hover { text-decoration: underline; }
-#lenya-info-tree a:hover { background-color: #DDDDDD }
-
-#lenya-info-content {
-	float: left;
-	margin: 0px 20px;
-	font-size: small;
-}
diff --git a/src/webapp/lenya/resources/css/xulmenu.xml b/src/webapp/lenya/resources/css/xulmenu.xml
deleted file mode 100644
index b850efa..0000000
--- a/src/webapp/lenya/resources/css/xulmenu.xml
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-  Copyright 1999-2004 The Apache Software Foundation

-

-  Licensed 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.

--->

-<css xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

-    

-@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

-

-<!--

-    @import url("chrome://global/skin/");

--->

-

-<!--

-window, page, dialog, wizard { 

-	background-color: #C7D0D9;

-	font: message-box;

-}

--->

-

-#lenya-content-box {

-	background-color: white;

-	<!--font: caption; -->

-	font-size-adjust: 0.5;

-}

-

-#lenya-logo {

-	width: 115px;

-	height: 36px;

-	margin-left: 25px;

-	margin-right: 5px;

-}

-

-#lenya-menubar {

-	padding-top: 5px;

-	background-image: url(<xsl:value-of select="concat($contextprefix, '/lenya/menu/images/grau-bg.gif')"/>);

-}

-

-#lenya-xul-menubar {

-	<!-- -moz-border-radius-topright: 1000px; -->

-	background-image: url(<xsl:value-of select="concat($contextprefix, '/lenya/menu/images/grau-bg2.gif')"/>);

-	background-color: red;

-}

-

-

-<!--tab {-->

-	<!--background-color: red;--> <!-- does not work - it only works in the real mozilla with the modern theme not with the classic theme -->

-<!--	font-family: Verdana, sans-serif;	

-	font-size: 80%;

-	font-weight: bold;

-	color: #838383;-->

-	<!--color: black;-->

-	

-	<!-- copy from modern theme -->

-<!--	margin: 0px;

-	border: 3px solid;

-	border-bottom-width: 3px;

-	-moz-border-top-colors: #B1B1B1 #CFCFCF #E4E4E4;

-	-moz-border-right-colors: #B1B1B1 #CFCFCF #E4E4E4;

-	-moz-border-bottom-colors: #B1B1B1 #CFCFCF #E4E4E4;>

-	-moz-border-left-colors: #000000 #90A0B0 #B1B1B1;

-	-moz-border-radius-topleft: 3px;

-	-moz-border-radius-topright: 3px;

-	padding: 1px 3px;

-	

-	

-	

-	background-color: #E5F5F8;

-	

-}-->

-

-<!--tab[selected="true"] {

-	-moz-border-top-colors: #000000 #DFE2E6 #D0D7DD;

-	-moz-border-right-colors: #000000 #BAC2CD #C1C9D3;

-	-moz-border-bottom-colors: #E5F5F8;

-	-moz-border-left-colors: #000000 #DFE2E6 #D0D7DD;

-	background-color: #E5F5F8;

-	color: red;

-}-->

-

-<!--

-menubar {

-	background-color: #E5F5F8;

-	border-bottom: solid 1px #B1B1B1;

-}

-

-menupopup {

-	background-color: #E5F5F8;

-}

--->

-

-</css>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/entities/sitetree.xsd b/src/webapp/lenya/resources/entities/sitetree.xsd
deleted file mode 100644
index 6e2d0ad..0000000
--- a/src/webapp/lenya/resources/entities/sitetree.xsd
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: sitetree.xsd,v 1.4 2004/03/13 12:42:21 gregor Exp $ -->
-
-<!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN"
-    "http://www.w3.org/2001/XMLSchema.dtd">
-<xs:schema targetNamespace="http://apache.org/cocoon/lenya/sitetree/1.0" xmlns="http://apache.org/cocoon/lenya/sitetree/1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
-	<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
-	<xs:element name="site">
-		<xs:complexType>
-			<xs:sequence>
-				<xs:element ref="node" minOccurs="0" maxOccurs="unbounded"/>
-			</xs:sequence>
-		</xs:complexType>
-	</xs:element>
-	<xs:element name="node">
-		<xs:complexType>
-			<xs:sequence>
-				<xs:element ref="label" minOccurs="0" maxOccurs="unbounded"/>
-				<xs:element ref="node" minOccurs="0" maxOccurs="unbounded"/>
-			</xs:sequence>
-			<xs:attribute name="id" type="xs:string" use="required"/>
-			<xs:attribute name="href" type="xs:string" use="optional"/>
-			<xs:attribute name="suffix" type="xs:string" use="optional"/>
-			<xs:attribute name="link" type="xs:string" use="optional"/>
-		</xs:complexType>
-	</xs:element>
-	<xs:element name="label">
-		<xs:complexType>
-			<xs:simpleContent>
-				<xs:extension base="xs:string">
-					<xs:attribute ref="xml:lang"/>
-				</xs:extension>
-			</xs:simpleContent>
-		</xs:complexType>
-	</xs:element>
-</xs:schema>
diff --git a/src/webapp/lenya/resources/entities/workflow.xsd b/src/webapp/lenya/resources/entities/workflow.xsd
deleted file mode 100644
index 2010ffe..0000000
--- a/src/webapp/lenya/resources/entities/workflow.xsd
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://apache.org/cocoon/lenya/workflow/1.0" xmlns:workflow="http://apache.org/cocoon/lenya/workflow/1.0">
-  <xs:element name="workflow">
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element maxOccurs="unbounded" ref="workflow:state"/>
-        <xs:element ref="workflow:variable"/>
-        <xs:element maxOccurs="unbounded" ref="workflow:transition"/>
-      </xs:sequence>
-      <xs:attribute ref="xsi:schemaLocation" use="required"/>
-    </xs:complexType>
-  </xs:element>
-  <xs:element name="state">
-    <xs:complexType>
-      <xs:attribute name="id" use="required" type="xs:NCName"/>
-      <xs:attribute name="initial" type="xs:boolean"/>
-    </xs:complexType>
-  </xs:element>
-  <xs:element name="variable">
-    <xs:complexType>
-      <xs:attribute name="name" use="required" type="xs:NCName"/>
-      <xs:attribute name="value" use="required" type="xs:boolean"/>
-    </xs:complexType>
-  </xs:element>
-  <xs:element name="transition">
-    <xs:complexType>
-      <xs:sequence>
-        <xs:element ref="workflow:event"/>
-        <xs:element ref="workflow:condition"/>
-        <xs:element minOccurs="0" ref="workflow:assign"/>
-      </xs:sequence>
-      <xs:attribute name="destination" use="required" type="xs:NCName"/>
-      <xs:attribute name="source" use="required" type="xs:NCName"/>
-    </xs:complexType>
-  </xs:element>
-  <xs:element name="event">
-    <xs:complexType>
-      <xs:attribute name="id" use="required" type="xs:NCName"/>
-    </xs:complexType>
-  </xs:element>
-  <xs:element name="condition">
-    <xs:complexType>
-      <xs:simpleContent>
-        <xs:extension base="xs:NCName">
-          <xs:attribute name="class" use="required"/>
-        </xs:extension>
-      </xs:simpleContent>
-    </xs:complexType>
-  </xs:element>
-  <xs:element name="assign">
-    <xs:complexType>
-      <xs:attribute name="value" use="required" type="xs:boolean"/>
-      <xs:attribute name="variable" use="required" type="xs:NCName"/>
-    </xs:complexType>
-  </xs:element>
-</xs:schema>
diff --git a/src/webapp/lenya/resources/i18n/catalogue.xsp b/src/webapp/lenya/resources/i18n/catalogue.xsp
deleted file mode 100644
index 66c6c95..0000000
--- a/src/webapp/lenya/resources/i18n/catalogue.xsp
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<!-- 
-  This xsp merges a pub local i18n catalogue file with the global catalog file.
-  If a pub local catalogue exists, it is inserted first in order to override global messages.
-  
-  See the I18NTransformer for more details about catalog files and i18n messages.
--->
-
-<xsp:page 
-  language="java" 
-  xmlns:xsp="http://apache.org/xsp"
-  xmlns:xi="http://www.w3.org/2001/XInclude"
->
-
-  <xsp:structure>
-    <xsp:include>java.io.File</xsp:include>
-    <xsp:include>org.apache.excalibur.source.Source</xsp:include>
-  </xsp:structure>
-
-  <catalogue>
-    <xsp:logic>
-  
-      final Source pubCatalogue = resolver.resolveURI(parameters.getParameter("pub-catalogue-location", "null") + parameters.getParameter("catalogue-file", "null"));
-      
-      if(pubCatalogue.exists())
-      {
-          <xi:include >
-            <xsp:attribute name="href"><xsp:expr>pubCatalogue.getURI()</xsp:expr>#xpointer(//message)</xsp:attribute>
-          </xi:include>          
-       }
-      
-      <xi:include >
-        <xsp:attribute name="href"><xsp:expr>parameters.getParameter("catalogue-file", "null")</xsp:expr>#xpointer(//message)</xsp:attribute>
-      </xi:include>
-      
-    </xsp:logic> 
-  </catalogue>
-  
-</xsp:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/i18n/cmsui.xml b/src/webapp/lenya/resources/i18n/cmsui.xml
deleted file mode 100644
index 90a7dff..0000000
--- a/src/webapp/lenya/resources/i18n/cmsui.xml
+++ /dev/null
@@ -1,356 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<catalogue xml:lang="en" xmlns:xhtml="http://www.w3.org/1999/xhtml">
-
-  <!-- common used words -->
-  <message key="Save">Save</message>
-  <message key="Submit">Submit</message>
-  <message key="Cancel">Cancel</message>
-  <message key="Delete">Delete</message>
-  <message key="NOTE">NOTE</message>
-  <message key="No referer">No referer</message>
-  <message key="Referer">Referer</message>
-  <message key="EXCEPTION">EXCEPTION</message>  
-  <message key="User">User</message>
-  <message key="live">live</message>
-  <message key="not">not</message>
-  <message key="authoring">authoring</message>
-  <message key="Authoring">Authoring</message>
-  <message key="review">review</message>
-  <message key="user">user</message>
-  <message key="Users">Users</message>
-  <message key="group">group</message>
-  <message key="Group">Group</message>
-  <message key="Groups">Groups</message>
-  <message key="Group ID">Group ID</message>
-  <message key="Yes">Yes</message>
-  <message key="No">No</message>
-  <message key="Description">Description</message>
-  <message key="Name">Name</message>
-  <message key="Full Name">Full Name</message>
-  <message key="required fields">required fields</message>
-  <message key="Search">Search</message>
-  <message key="Home">Home</message>
-  <message key="Title">Title</message>
-  <message key="Last modified">Last&#160;modified</message>
-  <message key="Overview">Overview</message>
-  <message key="Role">Role</message>
-  <message key="View">View</message>
-  <message key="Assets">Assets</message>
-  <message key="true">yes</message>
-  <message key="false">no</message>
-  <message key="Rename">Rename</message>
-  <message key="Modify">Modify</message>
-  <message key="Document">Document</message>
-  <message key="Date">Date</message>
-  <message key="Back">Back</message>
-  <message key="Add">Add</message>
-  <message key="Create">Create</message>
-  <message key="The Archive">Archive</message>
-  <message key="Trash">Trash</message>
-  <message key="Publisher">Publisher</message>
-  <message key="Navigation Title">Navigation Title</message>
-  <message key="Creator">Creator</message>
-  <message key="Language">Language</message>
-  <message key="Subject">Subject</message>
-  <message key="Rights">Rights</message>
-  <message key="Select File">Select File</message>
-  <message key="select-object">Select {0}</message>
-  <message key="Insert">Insert</message>
-  <message key="Insert File">Insert File</message>
-  <message key="upload-with-invalid-extension">You tried to upload a file with an invalid extension. Valid extensions are{0}. Note that extensions need to be in lowercase.</message>
-  <message key="upload-with-missing-title">You tried to upload a file without a title.</message>
-  <message key="filename-format-exception">The file name of the file you are trying to upload either has no extension, or contains characters which are not allowed, such as spaces or umlauts.</message>
-  <message key="Creation Date">Creation Date</message>
-  <message key="File Size">File Size</message>
-  <message key="Image">Image</message>
-  <message key="Link">Link</message>
-  <message key="Caption">Caption</message>
-  <message key="All rights reserved">All rights reserved.</message>
-  <message key="show">Show</message>
-  <message key="hide">Hide</message>
-
-  <!-- submit screen -->
-  <message key="submit-for-approval">Submit {0} for approval</message>  
-  <message key="submit-for-approval?">Do you want to submit {0} for approval?</message>
-
-  <!-- publish screen -->     
-  <message key="Publish">Publish</message>  
-  <message key="Source File(s)">Source File(s)</message>
-
-  <!-- login screen -->
-  <message key="login-to-pub">LOGIN to the {0} Publication</message>
-  <message key="Login">Login</message>
-  <message key="Password">Password</message>
-  <message key="Username">Username</message>
-  <message key="Authentication failed">Authentication failed</message>
-  <message key="try-user-lenya">Try user {0} and password {1} (editor), or user {2} and password {3} (reviewer)</message>
-
-  <!-- logout screen -->
-  <message key="logout-from-pub">LOGOUT from the {0} Publication</message>
-  <message key="Your History">Your History</message>
-  <message key="Login to Authoring Area">Login to Authoring Area</message>
-
-  <!-- reject screen -->
-  <message key="Reject">Reject</message>
-  <message key="reject-doc">Reject document {0}</message>
-  <message key="reject-doc?">Do you want to reject the document {0}?</message>
-  
-  <!-- cms menu -->
-  <message key="New Document">New Document</message>
-  <message key="New Language Version">New Language Version</message>
-  <message key="Remove Language Version">Remove Language Version</message>
-  <message key="File">File</message>  
-  <message key="Edit">Edit</message>
-  <message key="Workflow">Workflow</message>
-  <message key="Deactivate">Deactivate</message>
-  <message key="Schedule">Schedule</message>
-  <message key="Copy">Copy</message>  
-  <message key="Paste">Paste</message>
-  <message key="Cut">Cut</message>
-  <message key="Help">Help</message>
-  <message key="Debug">Debug</message>
-  <message key="Delete">Delete</message>
-  <message key="Archive">Archive</message>
-  <message key="Restore">Restore</message>
-  <message key="Move Up">Move Up</message>
-  <message key="Move Down">Move Down</message>
-  <message key="Logout">Logout</message>
-  <message key="View Task Logs">View Task Logs</message>
-  <message key="Support">Support</message>
-  <message key="System Documentation">System Documentation</message>
-  <message key="User Documentation">User Documentation</message>
-  <message key="About Apache Lenya">About Apache Lenya</message>
-  <message key="Apache Lenya Homepage">Apache Lenya Homepage</message>
-  <message key="Edit with Kupu">
-    <xhtml:abbr title="What&#160;You&#160;See&#160;Is&#160;What&#160;You&#160;Get">WYSIWYG</xhtml:abbr>&#160;Editor&#160;(Kupu)
-  </message>
-  <message key="Edit with BXE">
-    <xhtml:abbr title="What&#160;You&#160;See&#160;Is&#160;What&#160;You&#160;Get">WYSIWYG</xhtml:abbr>&#160;Editor&#160;(BXE)
-  </message>
-  <message key="Edit with one Form">Edit with one Form</message>
-  <message key="Edit with Forms">Edit with Forms</message>
-  <message key="Edit Metadata">Edit&#160;Metadata</message>
-  <message key="Edit Navigation Title">Edit&#160;Navigation&#160;Title</message>
-  <message key="Rename URL">Rename&#160;URL</message>
-  
-  <!-- cms tabs -->
-  <message key="Server Time">Server Time</message>  
-  <message key="Workflow State">Workflow State</message>
-
-  <!-- Administration tab -->
-  <message key="Administration">Administration</message>
-  <message key="really-delete?">Really delete {0}?</message>
-  <message key="Do you really want to delete the trash ?">Do you really want to delete the trash ?</message>
-  <message key="delete-object">Delete {0}</message>
-  <message key="delete-object?">Do you really want to delete {0}?</message>
-  <message key="Passwd">Passwd</message>
-  <message key="Switch User">Switch User</message>
-  <message key="Delete Trash">Delete Trash</message>
-  <message key="Cocoon and Server Status">Cocoon and Server Status</message>
-  
-    <!-- Group Administration -->
-  <message key="Profile">Profile</message>
-  <message key="Members">Members</message>
-  <message key="IP Ranges">IP&#160;Ranges</message>
-  <message key="Edit Profile">Edit Profile</message>
-  <message key="Edit Members">Edit Members</message>
-  <message key="Group Administration">Group Administration</message>
-  <message key="Add Group">Add Group</message>
-  <message key="Group Data">Group Data</message>
-  <message key="group_no_such_entry">The group {0} does not exist.</message>
-
-    <!-- User Administration -->
-  <message key="User Data">User&#160;Data</message>
-
-  <message key="CMS User ID">CMS&#160;User&#160;ID</message>
-  <message key="LDAP ID">LDAP&#160;ID</message>
-  <message key="Confirm password">Confirm&#160;password</message>
-  <message key="Add User">Add User</message>
-  <message key="User Administration">User Administration</message>
-  <message key="User Details">User Details</message>
-  <message key="All Groups">All Groups</message>
-  <message key="User Groups">User Groups</message>
-  <message key="Group Affiliation">Group Affiliation</message>
-  <message key="Change Password">Change Password</message>
-  <message key="Edit Group Affiliation">Edit Group Affiliation</message>
-  <message key="user_no_such_user">The user {0} does not exist.</message>
-  <message key="ldap_no_such_user">The user {0} does not exist in the LDAP directory.</message>
-
-    <!-- User Types -->
-  <message key="LDAP User">LDAP User</message>
-  <message key="Local User">CMS User</message>
-  
-    <!-- Role Administration -->
-  <message key="role_no_such_role">The role {0} does not exist.</message>
-
-    <!-- IP Range Administration -->
-  <message key="IP Range">IP&#160;Range</message>
-  <message key="IP Range ID">IP&#160;Range&#160;ID</message>
-  <message key="Network Address">Network&#160;Address</message>
-  <message key="Subnet Mask">Subnet&#160;Mask</message>
-  <message key="IP Range Administration">IP&#160;Range&#160;Administration</message>
-  <message key="Add IP Range">Add&#160;IP&#160;Range</message>
-  <message key="IP Range Profile">IP&#160;Range&#160;Profile</message>
-
-  <!-- Site tab (info screens) -->
-  <message key="Available Languages">Available Languages</message>
-  <message key="This document is not available in this language.">This document is not available in this language.</message>
-  <message key="Document ID">Document ID</message>
-  <message key="Versions">Versions</message>
-  <message key="SSL Encryption">SSL&#160;Encryption</message>
-  <message key="Rollback to this version">Rollback to this version</message>
-  <message key="AC Archive">AC&#160;Archive</message>
-  <message key="AC Trash">AC&#160;Trash</message>
-  <message key="AC Auth">AC&#160;Auth</message>
-  <message key="AC Live">AC&#160;Live</message>
-  <message key="Scheduler">Scheduler</message>
-
-    <!-- Info screen actions-->
-  <message key="New Navigation Title">New Navigation Title</message>
-  <message key="Rename Document">Rename Document</message>
-  <message key="New Document ID">New Document ID</message>
-  <message key="No whitespace, no special characters">No whitespace, no special characters</message>
-      <!-- Scheduler -->
-  <message key="No active jobs">No active jobs.</message>
-  <message key="The job date has expired">The job date has expired.</message>
-  <message key="check the log files">check the log files</message>
-  <message key="Task">Task</message>
-  <message key="Day">Day</message>
-  <message key="Time">Time</message>
-
-      <!-- Deactivate and delete -->
-  <message key="docs-have-links-to-doc">The following documents have links to this document</message>
-  <message key="Deactivate Document">Deactivate Document</message>
-  <message key="deactivate-doc">Deactivate document {0}</message>
-  <message key="deactivate-doc?">Do you really want to deactivate the document {0}?</message>
-  <message key="Delete Document">Delete Document</message>
-  <message key="delete-doc">Delete document {0}</message>
-  <message key="cannot-deactivate-unless-children-deactivated">This document cannot be deactivated unless the following child documents are deactivated</message>
-  <message key="delete-language-versions?">Do you really want to delete all language versions of the document {0}?</message>      
-  <message key="delete-doc-live">Cannot delete because document {0} is live!</message>
-
-      <!-- Archive document -->
-  <message key="Archive Document">Archive Document</message>
-  <message key="archive-doc">Archive document {0}</message>
-  <message key="archive-doc?">Do you really want to archive the document {0}?</message>
-      <!-- Rename document -->
-  <message key="Rename Document">Rename Document</message>
-  <message key="rename-doc">Rename document {0}</message>
-  <message key="rename-label-doc">Change navigation title of document {0}</message>
-      <!-- Copy document -->
-  <message key="Copy Document">Copy Document</message>
-  <message key="copy-doc">Copy document {0}</message>
-  <message key="copy-doc-to-clip?">Do you want to copy the document {0} to the clipboard? You can paste the document later at the location of your choosing.</message>
-      <!-- Paste document -->
-  <message key="Paste Document">Paste Document</message>
-  <message key="paste-doc">Paste document {0}</message>
-  <message key="paste-doc-from-clip?">Do you want to paste the document {0} from the clipboard?</message>
-
-      <!-- Cut document -->
-  <message key="Cut Document">Cut Document</message>
-  <message key="cut-doc">Cut document {0}</message>
-  <message key="cut-doc-to-clip?">Do you want to cut the document {0} and move it to the clipboard? You can paste the document later at the location of your choosing.</message>
-
-      <!-- Nudge document -->
-  <message key="nudge-error-direction-unknown">The direction {0} is not supported!</message>
-  <message key="nudge-error-direction">Cannot move the node in this direction.</message>
-  <message key="nudge-error-area">This operation can only be invoked on site trees.</message>
-
-  <!-- Info Asset -->
-  <message key="Insert Image">Insert Image</message>
-  <message key="Insert Asset">Insert Asset</message>
-  <message key="Asset Upload">Asset Upload</message>
-  <message key="Insert a new Image">Insert a new Image</message>
-  <message key="Upload an Asset">Upload an Asset</message>
-
-  <!-- Workflow  --> 
-  <message key="Value">Value</message>
-  <message key="Event">Event</message>
-  <message key="Variables">Variables</message>
-  <message key="History">History</message>
-  <message key="State">State</message>   
-  <message key="IP Address">IP Address</message>   
-  <message key="edit">edit</message>
-  <message key="submit">submit</message>
-  <message key="reject">reject</message>
-  <message key="publish">publish</message>
-  <message key="error-workflow-document">The event {0} is not executable on
-  document {1}</message>
-
-  <!-- Info asset  --> 
-  <message key="New Asset">New Asset</message>
-  
-  <!-- Info RC  --> 
-  <message key="Current Version">Current Version</message>
-  <message key="Rollback to this revision">Rollback to this revision</message>
-
-  <!-- Info AC  --> 
-  <message key="SSL Encryption">SSL&#160;Encryption</message>
-  <message key="Access Object">Access&#160;Object</message>
-  <message key="visit">visit</message>
-  <message key="reviewer">reviewer</message>
-  <message key="editor">editor</message>
-  <message key="admin">admin</message>
-  <message key="world">world</message>
-  <message key="the world">the world</message>
-  
-  <!-- Scheduler --> 
-  <message key="New job">New&#160;job</message>
-  <message key="Active jobs">Active&#160;jobs</message>
-  <message key="Publish and Export">Publish and&#160;Export</message>
-  <message key="doc-has-links-to-unpublished">This document has links to the following unpublished documents:</message>
-
-  <!-- New Document -->
-  <message key="Please check the following possible causes of the exception">Please check the following possible causes of the exception.</message>   
-  <message key="exception.cause.createdoc.whitespace-in-id">The id is not allowed to have whitespaces</message>
-  <message key="exception.cause.createdoc.id-in-use">The id is already in use</message>   
-  <message key="failmessage.createdoc.invalidformat">Please enter a valid value in the ID field. A-Z, a-z, 0-9 or - are valid characters.</message>
-  <message key="failmessage.createdoc.required">Please input all required (*)  values.</message>
-
-  <!-- Asset Upload/Insert Dialog -->
-  <message key="lenya.assetupload.subtitle">Add to Asset Library</message>
-  <message key="Asset Library">Asset Library</message>
-  <message key="No assets available">No assets available</message>
-  <message key="Insert Asset">Insert Asset</message>
-  
-  <!-- Image Upload/Insert Dialog -->
-  <message key="lenya.imageupload.title">Insert Image</message>
-  <message key="lenya.imageupload.selectimage.label">Select Image</message>
-  <message key="lenya.imageupload.info.noimages">No images available.</message>  
-  <message key="lenya.imageupload.links.hint">External links have to start with 'http://', internal links have to start with '/'</message>  
-
-  <!-- Revision Controller -->
-  <message key="Reason">Reason</message>
-  <message key="Filename">File name</message>
-  <message key="lenya.rc.nocheckout">Resource could not be checked out</message>
-  <message key="lenya.rc.checkedoutalready">The resource has already been checked out by another user</message>
-  <message key="lenya.rc.nocheckin">Resource could not be checked in</message>
-  <message key="Generic Exception">Generic Exception</message>
-  <message key="Check the log files.">Check the log files.</message>
-
-  <!-- Error messages of a general nature -->
-  <message key="error-document-form">Document is not well-formed: {0}</message>
-  <message key="error-validation">Schema validation failed: {0}</message>
-  <message key="error-missing-language">The requested document is not available for language: {0}</message>
-  <message key="error-document-existance">The requested document {0} with document-id {1} does not exist.</message>
-  <message key="error-generic">An error occured.</message>
-
-</catalogue>
diff --git a/src/webapp/lenya/resources/i18n/cmsui_de.xml b/src/webapp/lenya/resources/i18n/cmsui_de.xml
deleted file mode 100644
index a861752..0000000
--- a/src/webapp/lenya/resources/i18n/cmsui_de.xml
+++ /dev/null
@@ -1,347 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<catalogue xml:lang="de" xmlns:xhtml="http://www.w3.org/1999/xhtml">
-
-  <!-- common used words -->
-  <message key="Save">Speichern</message>
-  <message key="Submit">Einreichen</message>
-  <message key="Cancel">Abbrechen</message>
-  <message key="Delete">Löschen</message>
-  <message key="NOTE">HINWEIS</message>
-  <message key="No referer">Keine Rückverweiseite</message>  
-  <message key="Referer">Rückverweis</message>
-  <message key="EXCEPTION">AUSNAHME</message>  
-  <message key="User">Benutzer</message>
-  <message key="live">live</message>
-  <message key="not">nicht</message>
-  <message key="authoring">Bearbeitung</message>
-  <message key="Authoring">Bearbeitung</message>
-  <message key="review">Freigabe</message>
-  <message key="user">Benutzer</message>
-  <message key="Users">Benutzer</message>  
-  <message key="group">Gruppe</message>
-  <message key="Group">Gruppe</message>
-  <message key="Groups">Gruppen</message>
-  <message key="Group ID">Gruppen ID</message>
-  <message key="Yes">Ja</message>
-  <message key="No">Nein</message>
-  <message key="Description">Beschreibung</message>
-  <message key="Name">Name</message>
-  <message key="Full Name">Vor-&#160;und&#160;Nachname</message>
-  <message key="required fields">Pflichtfelder</message> 
-  <message key="Search">Suche</message>
-  <message key="Home">Startseite</message>
-  <message key="Title">Titel</message>
-  <message key="Last modified">Letzte&#160;Änderung</message>
-  <message key="Overview">Übersicht</message>  
-  <message key="Role">Rolle</message>
-  <message key="View">Anzeigen</message>
-  <message key="Assets">Anlagen</message>
-  <message key="true">ja</message>
-  <message key="false">nein</message>
-  <message key="Rename">Umbenennen</message>
-  <message key="Modify">Ändern</message>
-  <message key="Document">Dokument</message>
-  <message key="Date">Datum</message>
-  <message key="Back">Zurück</message>
-  <message key="Add">Hinzufügen</message>
-  <message key="Create">Erstellen</message>
-  <message key="The Archive">Archiv</message>
-  <message key="Trash">Papierkorb</message>
-  <message key="Publisher">Herausgeber</message>
-  <message key="Navigation Title">Navigationstitel</message>
-  <message key="Creator">Ersteller</message>
-  <message key="Language">Sprache</message>
-  <message key="Subject">Betrifft</message>
-  <message key="Rights">Rechte</message>
-  <message key="Select File">Datei wählen</message>
-  <message key="select-object">{0}&#160;auswählen</message>
-  <message key="Insert">Einfügen</message>
-  <message key="Insert File">Datei einfügen</message>
-  <message key="upload-with-invalid-extension">Es dürfen nur Dateien mit folgenden Endungen hochgeladen werden{0}. Die Endung muss zudem klein geschrieben sein.</message>
-  <message key="upload-with-missing-title">Dateien müssen einen Titel haben.</message>
-  <message key="filename-format-exception">Der Name der gewählten Datei enthält Umlaute, Leerzeichen, unerlaubte Zeichen oder besitzt keine gültige Endung.</message>
-  <message key="Creation Date">Erstelldatum</message>
-  <message key="File Size">Dateigrösse</message>
-  <message key="Image">Bild</message>
-  <message key="Link">Verweis</message>
-  <message key="Caption">Überschrift</message>
-  <message key="All rights reserved">Alle Rechte vorbehalten.</message>
-  <message key="show">Anzeigen</message>
-  <message key="hide">Verbergen</message>
-
-  <!-- submit screen -->
-  <message key="submit-for-approval">Dokument {0} einreichen</message>
-  <message key="submit-for-approval?">Möchten Sie {0} zur Durchsicht einreichen?</message>  
-  
-  <!-- publish screen --> 
-  <message key="Publish">Veröffentlichen</message>    
-  <message key="Source File(s)">Quelldatei(en)</message>
-  <message key="publish complete subtree">den gesamten Teilbaum veröffentlichen</message>
-   
-  <!-- logn screen -->        
-  <message key="login-to-pub">Anmelden an {0} Publikation</message>    
-  <message key="Login">Anmelden</message>
-  <message key="Password">Passwort</message>    
-  <message key="Username">Benutzername</message>                
-  <message key="Authentication failed">Anmeldung ist fehlgeschlagen</message>  
-  <message key="try-user-lenya">Versuchen Sie Benutzername {0} und Passwort {1} (Bearbeiter), oder Benutzername {2} und Passwort {3} (Prüfer)</message>
-
-  <!-- logout screen -->
-  <message key="logout-from-pub">Abmelden von der {0} Publikation</message>
-  <message key="Your History">Ihr Verlauf</message>
-  <message key="Login to Authoring Area">An Autorenbereich anmelden</message>
-
-  <!-- reject screen -->
-  <message key="Reject">Ablehnen</message>
-  <message key="reject-doc">Dokument {0} ablehnen</message>
-  <message key="reject-doc?">Wollen Sie das Dokument {0} ablehnen?</message>
-
-  <!-- cms menu -->
-  <message key="New Document">Neues Dokument</message>
-  <message key="New Language Version">Neue Sprachversion</message>
-  <message key="Remove Language Version">Sprachversion löschen</message>
-  <message key="File">Datei</message>  
-  <message key="Edit">Bearbeiten</message>
-  <message key="Workflow">Arbeitsfluss</message>
-  <message key="Deactivate">Deaktivieren</message>
-  <message key="Schedule">Zeitsteuerung</message>  
-  <message key="Copy">Kopieren</message>  
-  <message key="Paste">Einfügen</message>
-  <message key="Cut">Ausschneiden</message>
-  <message key="Help">Hilfe</message>
-  <message key="Debug">Debug</message>
-  <message key="Delete">Löschen</message>
-  <message key="Archive">Archivieren</message>
-  <message key="Restore">Wiederherstellen</message>
-  <message key="Move Up">Nach oben</message>
-  <message key="Move Down">Nach unten</message>
-  <message key="Logout">Abmelden</message>
-  <message key="View Task Logs">Aufgabenberichte</message>
-  <message key="Support">Support</message>
-  <message key="System Documentation">Systemdokumentation</message>
-  <message key="User Documentation">Benutzerdokumentation</message>
-  <message key="About Apache Lenya">Über Apache Lenya</message>
-  <message key="Apache Lenya Homepage">Apache Lenya Startseite</message>
-  <message key="Edit with Kupu">
-    <xhtml:abbr title="What&#160;You&#160;See&#160;Is&#160;What&#160;You&#160;Get">WYSIWYG</xhtml:abbr>&#160;Editor&#160;(Kupu)
-  </message>
-  <message key="Edit with BXE">
-    <xhtml:abbr title="What&#160;You&#160;See&#160;Is&#160;What&#160;You&#160;Get">WYSIWYG</xhtml:abbr>&#160;Editor&#160;(BXE)
-  </message>
-  <message key="Edit with one Form">Bearbeiten mit Formulareditor</message>
-  <message key="Edit with Forms">Bearbeiten mit Formwizard</message>
-  <message key="Edit Metadata">Metadata bearbeiten</message>
-  <message key="Edit Navigation Title">Navigationstitel bearbeiten</message>
-  <message key="Rename URL">URL&#160;umbenennen</message>
-
-  <!-- cms tabs -->
-  <message key="Server Time">Serverzeit</message>  
-  <message key="Workflow State">Status</message>
-
-  <!-- Administration tab -->
-  <message key="Administration">Administration</message>
-  <message key="really-delete?">{0} wirklich löschen ?</message>
-  <message key="Do you really want to delete the trash ?">Wollen Sie den Papierkorb wirklich leeren ?</message>
-  <message key="delete-object">{0} löschen</message>
-  <message key="delete-object?">Wollen Sie {0} wirklich löschen ?</message>  
-  <message key="Passwd">Passwort ändern</message>
-  <message key="Switch User">Benutzer wechseln</message>
-  <message key="Delete Trash">Papierkorb leeren</message>
-  <message key="Cocoon and Server Status">Cocoon- und Serverstatus</message>
-  
-    <!-- Group Administration -->
-  <message key="Profile">Profil</message>  
-  <message key="Members">Mitglieder</message>
-  <message key="IP Ranges">IP&#160;Bereiche</message>
-  <message key="Edit Profile">Profil&#160;ändern</message>
-  <message key="Edit Members">Mitglieder&#160;bearbeiten</message>
-  <message key="Group Administration">Gruppenadministration</message>
-  <message key="Add Group">Gruppe hinzufügen</message>
-  <message key="Group Data">Gruppendetails</message>
-  
-    <!-- User Administration -->
-  <message key="User Data">Benutzerdetails</message>
-  <message key="User ID">Benutzer</message>
-  <message key="CMS User ID">CMS&#160;Benutzer</message>
-  <message key="LDAP ID">LDAP&#160;ID</message>
-  <message key="Confirm password">Passwort&#160;bestätigen</message>
-  <message key="Add User">Benutzer hinzufügen</message>
-  <message key="User Administration">Benutzeradministration</message>
-  <message key="User Details">Benutzerdetails</message>
-  <message key="All Groups">Alle Gruppen</message>
-  <message key="User Groups">Benutzergruppen</message>
-  <message key="Group Affiliation">Gruppenmitgliedschaften</message>
-  <message key="Change Password">Passwort ändern</message>
-  <message key="Old Password">Bestehendes Passwort</message>
-  <message key="New Password">Neues Passwort</message>
-  <message key="Confirm Password">Passwort bestätigen</message>
-  <message key="Edit Group Affiliation">Mitgliedschaften ändern</message>
-  
-  <!-- IP Range Administration -->
-  <message key="IP Range">IP&#160;Bereich</message>
-  <message key="IP Range ID">IP&#160;Bereichs-ID</message>
-  <message key="Network Address">IP&#160;Adresse</message>
-  <message key="Subnet Mask">Netzwerkmaske</message>
-  <message key="IP Range Administration">IP Administration</message>
-  <message key="Add IP Range">IP Bereich&#160;hinzufügen</message>
-  <message key="IP Range Profile">IP Bereichsprofil</message>
-
-  <!-- User Types -->
-  <message key="LDAP User">LDAP User</message>
-  <message key="Local User">CMS User</message>
-
-  <!-- Site tab (info screens) -->
-  <message key="Available Languages">Verfügbare Sprachen</message>
-  <message key="This document is not available in this language.">Das Dokument ist in der gewünschten Sprache nicht vorhanden.</message>
-  <message key="Document ID">Dokument ID</message>
-  <message key="Versions">Versionen</message>
-  <message key="SSL Encryption">SSL&#160;Verschlüsselung</message>
-  <message key="Rollback to this version">Zu dieser Version zurücksetzen</message>
-  <message key="AC Archive">Rechte&#160;Archiv</message>
-  <message key="AC Trash">Rechte&#160;Papierkorb</message>
-  <message key="AC Auth">Rechte&#160;Auth</message>
-  <message key="AC Live">Rechte&#160;Live</message>
-  <message key="Scheduler">Zeitsteuerung</message>
-
-  <!-- Info screen actions-->
-  <message key="New Navigation Title">Neuer Titel</message>
-  <message key="rename-document">Dokument {0} umbenennen</message>
-  <message key="New Document ID">Neue Dokument ID</message>
-  <message key="No whitespace, no special characters">Keine Leer- oder Sonderzeichen</message>
-
-      <!-- Scheduler -->
-  <message key="No active jobs">Keine aktiven Aufgaben.</message>
-  <message key="The job date has expired">Das Datum der Aufgabe ist abgelaufen.</message>
-  <message key="check the log files">Bitte überprüfen Sie die Log-Dateien.</message>
-  <message key="Task">Aufgabe</message>
-  <message key="Day">Tag</message>
-  <message key="Time">Zeit</message>
-      <!-- Deactivate and delete -->
-  <message key="docs-have-links-to-doc">Folgende Dokumente verweisen auf dieses Dokument</message>
-  <message key="Deactivate Document">Dokument deaktivieren</message>
-  <message key="deactivate-doc">Dokument {0} deaktivieren</message>
-  <message key="deactivate-doc?">Wollen Sie das Dokument {0} wirklich deaktivieren?</message>
-  <message key="deactivate complete subtree">den gesamten Teilbaum deaktivieren</message>
-  <message key="Delete Document">Dokument löschen</message>
-  <message key="cannot-deactivate-unless-children-deactivated">Dieses Dokument kann erst deaktiviert werden, wenn alle untergeordneten Dokumente deaktiviert worden sind.</message>
-  <message key="delete-language-versions?">Wollen Sie wirklich alle Sprachversionen des Dokuments {0} löschen?</message>
-  
-      <!-- Archive document -->
-  <message key="Archive Document">Dokument archivieren</message>
-  <message key="archive-doc">Dokument {0} archivieren</message>
-  <message key="archive-doc?">Wollen Sie das Dokument {0} wirklich archivieren?</message>
-      <!--Rename document -->
-  <message key="Rename Document">Dokument umbenennen</message>
-  <message key="rename-doc">Dokument {0} umbenennen</message>
-  <message key="rename-label-doc">Navigationstitel von Dokument {0} ändern</message>
-      <!-- Copy document -->
-  <message key="Copy Document">Dokument kopieren</message>
-  <message key="copy-doc">Kopieren von Dokument {0}</message>
-  <message key="copy-doc-to-clip?">Wollen Sie das Dokument {0} in die Zwischenablage kopieren? Sie können das Dokument später an gewünschter Stelle einfügen.</message>
-      <!-- Paste document -->
-  <message key="Paste Document">Dokument einfügen</message>
-  <message key="paste-doc">Dokument {0} einfügen</message>
-  <message key="paste-doc-from-clip?">Wollen Sie das Dokument {0} aus der Zwischenablage einfügen?</message>
-      <!-- Cut document -->
-  <message key="Cut Document">Dokument ausschneiden</message>
-  <message key="cut-doc">Ausschneiden von Dokument {0}</message>
-  <message key="cut-doc-to-clip?">Wollen Sie das Dokument {0} ausschneiden und in die Zwischenablage verschieben? Sie können das Dokument später an gewünschter Stelle einfügen.</message>
-
-  <!-- Info Asset -->
-  <message key="Insert Image">Bild einfügen</message>
-  <message key="Insert Asset">Anlage einfügen</message>
-  <message key="Asset Upload">Analge hochladen</message>
-  <message key="Insert a new Image">Neues bild einfügen</message>
-  <message key="Upload an Asset">Anlage hochladen</message>
-   
-  <!-- Info workflow  --> 
-  <message key="Value">Wert</message>
-  <message key="Event">Ereignis</message>
-  <message key="Variables">Variablen</message>
-  <message key="History">Verlauf</message>
-  <message key="State">Status</message>
-  <message key="IP Address">IP Adresse</message>   
-  <message key="edit">bearbeiten</message>
-  <message key="submit">einreichen</message>
-  <message key="reject">ablehnen</message>
-  <message key="publish">veröffentlichen</message>
-
-  <!-- Info asset  --> 
-  <message key="New Asset">Neue Anlage</message>
-
-  <!-- Info RC  --> 
-  <message key="Current Version">Aktuelle Version</message>
-  <message key="Rollback to this revision">Zu dieser version zurücksetzen</message>
-
-  <!-- Info AC  --> 
-  <message key="SSL Encryption">SSL&#160;Verschlüsselung</message>
-  <message key="Access Object">Zugriffsobjekt</message>
-  <message key="Inherited Rights">Geerbte&#160;Rechte</message>
-  <message key="visit">besuchen</message>
-  <message key="reviewer">Prüfer</message>
-  <message key="editor">Bearbeiter</message>
-  <message key="admin">Admin</message>
-  <message key="world">Welt</message>
-  <message key="the world">Die Welt</message>
-
-  <!-- Scheduler --> 
-  <message key="New job">Neuer&#160;Job</message>
-  <message key="Active jobs">Aktive Aufgaben</message>
-  <message key="Publish and Export">Veröffentlichen und&#160;exportieren</message>
-  <message key="doc-has-links-to-unpublished">Dieses Dokument hat Referenzen auf folgende unveröffentlichte Dokumente:</message>
-
-  <!-- New Document -->
-  <message key="Please check the following possible causes of the exception">Bitte überprüfen Sie folgende Ursachen für die Ausnahme.</message>
-  <message key="Parent ID">Übergerodnete ID</message>
-  <message key="exception.cause.createdoc.whitespace-in-id">Die ID darf keine Leerzeichen enthalten.</message>
-  <message key="exception.cause.createdoc.id-in-use">Die ID ist schon vergeben.</message>   
-    <message key="failmessage.createdoc.invalidformat">Bitte geben sie einen gültigen Wert für "ID" ein. Gültige Zeichen sind A-Z, a-z, 0-9 oder -</message>
-    <message key="failmessage.createdoc.required">Bitte füllen Sie alle Pflichfelder (*) aus..</message>
-
-  <!-- Asset Upload/Insert Dialog -->
-  <message key="lenya.assetupload.subtitle">Zur Bibliothek hinzufügen</message>
-  <message key="Asset Library">Objektbibliothek</message>
-  <message key="No assets available">Keine Objekte verfügbar</message>
-  <message key="lenya.assetupload.title">Objekt einfügen</message>
-
-  <!-- Image Upload/Insert Dialog -->
-  <message key="lenya.imageupload.title">Bild einfügen</message>
-  <message key="lenya.imageupload.selectimage.label">Bild auswählen</message>
-  <message key="lenya.imageupload.info.noimages">Keine Bilder verfügbar.</message>
-  <message key="lenya.imageupload.links.hint">Externe Verweise müssen mit 'http://' und interne Verweise mit '/' beginnen.</message>  
-
-  <!-- Revision Controller -->
-  <message key="Reason">Grund</message>
-  <message key="Filename">Dateiname</message>
-  <message key="lenya.rc.nocheckout">Resource konnte nicht ausgecheckt werden</message>
-  <message key="lenya.rc.checkedoutalready">Die Ressource wurde bereits von jemand anders ausgecheckt.</message>
-  <message key="lenya.rc.nocheckin">Resource konnte nicht eingecheckt werden</message>
-  <message key="Generic Exception">Allgemeiner Fehler</message>
-  <message key="Check the log files.">Ü	berprüfen Sie die Logdatei.</message>
-
-  <!-- Error messages of a general nature -->
-  <message key="error-document-form">Dokument ist nicht wohlgeformt: {0}</message>
-  <message key="error-validation">Schema Validierung schlug fehl: {0}</message>
-  <message key="error-missing-language">Das angeforderte Dokument ist nicht verfügbar in der Sprache: {0}</message>
-  <message key="error-document-existance">Das angeforderte Dokument {0} mit der ID {1} existiert nicht.</message>
-  <message key="error-generic">Ein Fehler ist aufgetreten.</message>
-</catalogue>
-
diff --git a/src/webapp/lenya/resources/i18n/cmsui_es.xml b/src/webapp/lenya/resources/i18n/cmsui_es.xml
deleted file mode 100644
index 4b0fab6..0000000
--- a/src/webapp/lenya/resources/i18n/cmsui_es.xml
+++ /dev/null
@@ -1,308 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
-  
-  $Id$
-  
-  @translators 
-	Salvador Cobrero <salvador_cobrero_jimenez at dmr-consulting dot com>
-	David Pinelo <david dot pinelo at juntadeandalucia dot es>
-	Thorsten Scherler <thorsten at apache dot org>
-  
--->
-
-<catalogue xml:lang="es">
-
-  <!-- common used words -->
-  <message key="Save">Guardar</message>
-  <message key="Submit">Aceptar</message>
-  <message key="Cancel">Cancelar</message>
-  <message key="Delete">Borrar</message>
-  <message key="NOTE">NOTA</message>
-  <message key="No referer">Sin referencia</message>
-  <message key="Referer">Referencia</message>
-  <message key="EXCEPTION">EXCEPCIÓN</message>  
-  <message key="User">Usuario</message>
-  <message key="live">producción</message>
-  <message key="not">no</message>
-  <message key="authoring">edición</message>
-  <message key="Authoring">Edición</message>
-  <message key="review">Revisión</message>
-  <message key="user">usuario</message>
-  <message key="Users">Usuarios</message>
-  <message key="group">grupo</message>
-  <message key="Group">Grupo</message>
-  <message key="Groups">Grupos</message>
-  <message key="Group ID">ID Grupo</message>
-  <message key="Yes">Sí</message>
-  <message key="No">No</message>
-  <message key="Description">Descripción</message>
-  <message key="Name">Nombre</message>
-  <message key="Full Name">Nombre&#160;completo</message>
-  <message key="required fields">campos&#160;requeridos</message>
-  <message key="Search">Buscar</message>
-  <message key="Home">Inicio</message>
-  <message key="Title">Título</message>
-  <message key="Last modified">Última modificación </message>
-  <message key="Overview">General</message>
-  <message key="Role">Rol</message>
-  <message key="View">Ver</message>
-  <message key="Assets">Activos</message>
-  <message key="true">sí</message>
-  <message key="false">no</message>
-  <message key="Rename">Renombrar</message>
-  <message key="Modify">Modificar</message>
-  <message key="Document">Documento</message>
-  <message key="Date">Fecha</message>
-  <message key="Back">Atrás</message>
-  <message key="Add">Añadir</message>
-  <message key="Create">Crear</message>
-  <message key="The Archive">El&#160;Archivo</message>
-  <message key="Trash">Papelera</message>
-  <message key="Publisher">Editor</message>
-  <message key="Navigation Title">Título&#160;de&#160;la&#160;Navegación</message>
-  <message key="Creator">Autor</message>
-  <message key="Language">Lenguaje</message>
-  <message key="Subject">Tema</message>
-  <message key="Rights">Permisos</message>
-  <message key="Select File">Seleccione fichero</message>
-  <message key="select-object">Seleccione {0}</message>
-  <message key="Insert">Insertar</message>
-  <message key="Insert File">Insertar&#160;archivo</message>
-  <message key="upload-with-invalid-extension">Intentó&#160;cargar&#160;un&#160;archivo&#160;con&#160;una&#160;extensión&#160;no&#160;válida.&#160;Extensiones&#160;válidas&#160;son&#160;{0}</message>
-  <message key="filename-format-exception">El&#160;nombre&#160;del&#160;archivo&#160;que&#160;está&#160;intentando&#160;cargar&#160;no&#160;tiene&#160;extensión&#160;o&#160;contiene&#160;caracteres&#160;no&#160;permitidos.</message>
-  <message key="Creation Date">Fecha&#160;de&#160;creación</message>
-  <message key="File Size">Tamaño&#160;del&#160;fichero</message>
-  <message key="Image">Imagen</message>
-  
-  <!-- submit screen -->
-  <message key="submit-for-approval">Enviar&#160;{0}&#160;para&#160;su&#160;aprobación</message>  
-  <message key="submit-for-approval?">¿Desea&#160;enviar&#160;{0}&#160;para&#160;su&#160;aprobación?</message>
-
-  <!-- publish screen -->     
-  <message key="Publish">Publicar</message>  
-  <message key="Source File(s)">Archivo(s)&#160;Fuente</message>
-
-  <!-- login screen -->
-  <message key="login-to-pub">Entrar&#160;a&#160;la&#160;publicación&#160;{0}</message>
-  <message key="Login">Conexión</message>
-  <message key="Password">Contraseña</message>
-  <message key="Username">Nombre&#160;de&#160;usuario</message>
-  <message key="Authentication failed">Error&#160;en&#160;la&#160;autentificación</message>
-  <message key="try-user-lenya">Pruebe con usuario {0} y contraseña {1} (editor) o usuario {2} y contraseña {3} (revisor)</message>
-
-  <!-- logout screen -->
-  <message key="logout-from-pub">Salir&#160;de&#160;la&#160;{0}&#160;Publicación</message>
-  <message key="Your History">Su&#160;Historial</message>
-  <message key="Login to Authoring Area">Entrar&#160;en&#160;la&#160;Zona&#160;de&#160;Edición</message>
-
-  <!-- reject screen -->
-  <message key="Reject">Rechazar</message>
-  <message key="reject-doc?">¿Desea rechazar&#160;el&#160;documento&#160;{0}?</message>
-  
-  <!-- cms menu -->
-  <message key="New Document">Nuevo&#160;documento</message>
-  <message key="New Language Version">Nueva&#160;versión&#160;de&#160;idioma</message>
-  <message key="Remove Language Version">Eliminar&#160;versión&#160;de&#160;idioma</message>
-  <message key="File">Archivo</message>  
-  <message key="Edit">Editar</message>
-  <message key="Workflow">Flujo de trabajo</message>
-  <message key="Deactivate">Desactivar</message>
-  <message key="Schedule">Horario</message>
-  <message key="Copy">Copiar</message>  
-  <message key="Paste">Pegar</message>
-  <message key="Cut">Cortar</message>
-  <message key="Help">Ayuda</message>
-  <message key="Debug">Depuración</message>
-  <message key="Delete">Borrar</message>
-  <message key="Archive">Archivar</message>
-  <message key="Restore">Recuperar</message>
-  <message key="Move Up">Subir</message>
-  <message key="Move Down">Bajar</message>
-  <message key="Logout">Salir</message>
-  <message key="View Task Logs">Ver&#160;registro&#160;de&#160;tareas</message>
-  <message key="Support">Soporte</message>
-  <message key="System Documentation">Documentación&#160;de&#160;sistema</message>
-  <message key="User Documentation">Documentación&#160;de&#160;usuario</message>
-  <message key="About Apache Lenya">Acerca&#160;de&#160;Apache&#160;Lenya</message>
-  <message key="Apache Lenya Homepage">Sitio&#160;web&#160;de&#160;Apache&#160;Lenya</message>
-  <message key="Edit with Epoz">Editar con Epoz</message>
-  <message key="Edit with Kupu">Editar con Kupu</message>
-  <message key="Edit with BXE">Editar&#160;con&#160;BXE</message>
-  <message key="Edit with one Form">Editar&#160;con&#160;formulario&#160;Único</message>
-  <message key="Edit with Forms">Editar&#160;con&#160;formularios</message>
-  <message key="Edit Metadata">Editar&#160;Metadatos</message>
-  <message key="Edit Navigation Title">Editar&#160;título&#160;de&#160;navegación</message>
-  <message key="Rename URL">Renombrar&#160;URL</message>
-  
-  <!-- cms tabs -->	
-  <message key="Server Time">Hora&#160;del&#160;servidor</message>  
-  <message key="Workflow State">Estado&#160;del&#160;flujo de trabajo</message>
-
-  <!-- Administration tab -->
-  <message key="Administration">Administración</message>
-  <message key="really-delete?">¿Realmente desea borrar&#160;{0}?</message>
-  <message key="Do you really want to delete the trash ?">¿Seguro&#160;que&#160;desea&#160;vaciar&#160;la&#160;papelera?</message>
-  <message key="delete-object">¿Borrar&#160;{0}</message>
-  <message key="delete-object?">&#191;Realmente quiere borrar {0}?</message>
-  <message key="Passwd">Contraseña</message>
-  <message key="Switch User">Cambiar&#160;usuario</message>
-  <message key="Delete Trash">Vaciar&#160;papelera</message>
-  <message key="Cocoon and Server Status">Estado&#160;del&#160;Servidor&#160;y&#160;de&#160;Cocoon</message>
-  
-    <!-- Group Administration -->
-  <message key="Profile">Perfil</message>
-  <message key="Members">Miembros</message>
-  <message key="IP Ranges">Rangos&#160;de IP</message>
-  <message key="Edit Profile">Editar&#160;Perfil</message>
-  <message key="Edit Members">Editar&#160;Miembros</message>
-  <message key="Group Administration">Administración de grupos</message>
-  <message key="Add Group">Añadir&#160;Grupo</message>
-  <message key="Group Data">Datos&#160;del&#160;Grupo</message>
-
-    <!-- User Administration -->
-  <message key="User Data">Datos&#160;del&#160;Usuario</message>
-
-  <message key="CMS User ID">ID&#160;del&#160;Usuario&#160;de&#160;CMS</message>
-  <message key="LDAP ID">ID&#160;LDAP</message>
-  <message key="Confirm password">Confirme&#160;contraseña</message>
-  <message key="Add User">Añadir Usuario</message>
-  <message key="User Administration">Administración del Usuario</message>
-  <message key="User Details">Detalles del Usuario</message>
-  <message key="All Groups">Todos los Grupos</message>
-  <message key="User Groups">Grupos del Usuario</message>
-  <message key="Group Affiliation">Afiliación a un Grupo</message>
-  <message key="Change Password">Cambiar Contraseña</message>
-  <message key="Edit Group Affiliation">Editar Grupo de Afiliación</message>
-  
-    <!-- IP Range Administration -->
-  <message key="IP Range">Rango&#160;de IP</message>
-  <message key="IP Range ID">ID&#160;del&#160;rango&#160;de IP</message>
-  <message key="Network Address">Dirección&#160;de&#160;red</message>
-  <message key="Subnet Mask">Máscara&#160;de&#160;la&#160;subred</message>
-  <message key="IP Range Administration">Administración&#160;del&#160;Rango&#160;IP</message>
-  <message key="Add IP Range">Añadir&#160;rango&#160;de IP</message>
-  <message key="IP Range Profile">Perfil&#160;del&#160;rango&#160;de IP</message>
- 
-  <!-- Site tab (info screens) -->
-  <message key="Available Languages">Idiomas Disponibles</message>
-  <message key="This document is not available in this language.">Este documento no se encuentra disponible en este idioma.</message>
-  <message key="Document ID">ID del Documento</message>
-  <message key="Versions">Versiones</message>
-  <message key="SSL Encryption">Cifrado&#160;SSL</message>
-  <message key="Rollback to this version">Deshacer hasta esta versión</message>
-  <message key="AC Archive">Archivo&#160;AC</message>
-  <message key="AC Trash">Papelera&#160;AC</message>
-  <message key="AC Auth">Edición&#160;AC</message>
-  <message key="AC Live">Producción&#160;AC</message>
-  <message key="Scheduler">Planificador</message>
-  <message key="Inherited Rights">Permisos heredados</message>
-
-    <!-- Info screen actions-->
-  <message key="New Navigation Title">Nuevo título de navegación</message>
-  <message key="Rename Document">Renombrar un Documento</message>
-  <message key="New Document ID">Nuevo ID de Documento</message>
-  <message key="No whitespace, no special characters">No se permiten espacios en blanco ni caracteres especiales</message>
-      <!-- Scheduler -->
-<message key="No active jobs">No hay tareas activas.</message>
-   <message key="The job date has expired">La fecha de la tarea ha expirado.</message>
-  <message key="check the log files">compruebe los archivos de log</message>
-  <message key="Task">Tarea</message>
-  <message key="Day">Día</message>
-  <message key="Time">Hora</message>
-      <!-- Deactivate and delete -->
-  <message key="docs-have-links-to-doc">Los siguientes documentos tienen enlaces a este documento</message>
-  <message key="Deactivate Document">Desactivar Documento</message>
-  <message key="deactivate-doc">Desactivar Documento {0}</message>
-  <message key="deactivate-doc?">¿Seguro que desea desactivar el documento {0}?</message>
-  <message key="Delete Document">Borrar Documento</message>
-  <message key="delete-doc">Borrar Documento {0}</message>
-  <message key="cannot-deactivate-unless-children-deactivated">No se puede desactivar este documento a menos que los documentos hijos siguientes sean desactivados</message>
-  <message key="delete-language-versions?">&#191;Quiere realmente borrar todas las versiones en diferentes lenguajes del documento {0}?</message>
-      <!-- Archive document -->
-  <message key="Archive Document">Archivar Documento</message>
-  <message key="archive-doc">Archivar documento {0}</message>
-  <message key="archive-doc?">&#191;Quiere realmente archivar el documento {0}?</message>
-      <!-- Rename document -->
-  <message key="Rename Document">Renombrar Documento</message>
-  <message key="rename-doc">Renombrar Documento {0}</message>
-      <!-- Copy document -->
-  <message key="Copy Document">Copiar Documento</message>
-  <message key="copy-doc">Copiar documento {0}</message>
-  <message key="copy-doc-to-clip?">¿Seguro que desea copiar el documento {0} al portapapeles? Más tarde puede pegar el documento en el lugar que elija.</message>
-      <!-- Paste document -->
-  <message key="Paste Document">Pegar Documento</message>
-  <message key="paste-doc">Pegar documento {0}</message>
-  <message key="paste-doc-from-clip?">¿Seguro que desea pegar el documento {0} del portapapeles?</message>
-      <!-- Cut document -->
-  <message key="Cut Document">Cortar Documento</message>
-  <message key="cut-doc">Cortar documento {0}</message>
-  <message key="cut-doc-to-clip?">¿Seguro que desea cortar el documento {0} y moverlo al portapapeles? Más tarde puede pegar el documento en el lugar que elija.</message>
-
-  <!-- Info Asset -->
-  <message key="Insert Image">Insertar Imagen</message>
-  <message key="Insert Asset">Insertar Objeto</message>
-  <message key="Asset Upload">Subida de objetos</message>
-  <message key="Insert a new Image">Insertar una Imagen</message>
-  <message key="Upload an Asset">Subir un objeto</message>
-
-  <!-- Info workflow  --> 
-  <message key="Value">Valor</message>
-  <message key="Event">Evento</message>
-  <message key="Variables">Variables</message>
-  <message key="History">Historial</message>
-  <message key="State">Estado</message>   
-  <message key="IP Address">Dirección IP</message>   
-  <message key="edit">editar</message>
-  <message key="submit">enviar</message>
-  <message key="reject">rechazar</message>
-  <message key="publish">publicar</message>
-
-  <!-- Info asset  --> 
-  <message key="New Asset">Nuevo Activo</message>
-  
-  <!-- Info RC  --> 
-  <message key="Current Version">Versión Actual</message>
-  <message key="Rollback to this revision">Deshacer hasta esta revisión</message>
-
-  <!-- Info AC  --> 
-  <message key="SSL Encryption">Cifrado&#160;SSL</message>
-  <message key="Access Object">Acceso&#160;al&#160;Objecto</message>
-  <message key="visit">visitar</message>
-  <message key="reviewer">revisor</message>
-  <message key="editor">editor</message>
-  <message key="admin">admin</message>
-  <message key="world">todos</message>
-  <message key="the world">todos</message>
-  
-  <!-- Scheduler --> 
-  <message key="New job">Nueva tarea</message>
-  <message key="Active jobs">Tareas activas</message>
-  <message key="Publish and Export">Publicar&#160;y&#160;Exportar</message>
-  <message key="doc-has-links-to-unpublished">Este documento tiene enlace a los siguientes documentos sin publicar:</message>
-
-  <!-- New Document -->
-  <message key="Please check the following possible causes of the exception">Por favor, compruebe las siguientes posibles causas de la excepción.</message>   
-  <message key="exception.cause.createdoc.whitespace-in-id">No se permiten espacios en blanco en el id</message>
-  <message key="exception.cause.createdoc.id-in-use">El id ya está siendo utilizado</message>   
-  <message key="failmessage.createdoc.invalidformat">Por favor, introduce un valor válido en el campo ID. A-Z, a-z, 0-9 o - son caracteres válidos.</message>
-  <message key="failmessage.createdoc.required">Por favor, introduce todos los valores obligatorios (*).</message>
-
-  <!-- Asset Upload/Insert Dialog -->
-  <message key="Add to Asset Library">Añadir librer&#237;a de Objetos</message>
-  <message key="Asset Library">Librer&#237;a de objetos</message>
-  <message key="No assets available">No hay objetos disponibles</message>
-  <message key="Insert Asset">Insertar Objeto</message>
-</catalogue>
diff --git a/src/webapp/lenya/resources/i18n/cmsui_fr.xml b/src/webapp/lenya/resources/i18n/cmsui_fr.xml
deleted file mode 100644
index 7bb272b..0000000
--- a/src/webapp/lenya/resources/i18n/cmsui_fr.xml
+++ /dev/null
@@ -1,312 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- 
-	$Id$ 
-	@translators Olivier Lange <wire at petit-atelier dot ch>
-	-->
-
-<catalogue xml:lang="fr" xmlns:xhtml="http://www.w3.org/1999/xhtml">
-
-  <!-- common used words -->
-  <message key="Save">Enregistrer</message>
-  <message key="Submit">Soumettre</message>
-  <message key="Cancel">Annuler</message>
-  <message key="Delete">Supprimer</message>
-  <message key="NOTE">NOTE</message>
-  <message key="No referer">Pas de référent</message>
-  <message key="Referer">Référent</message>
-  <message key="EXCEPTION">EXCEPTION</message>
-  <message key="User">Utilisateur</message>
-  <message key="Live">En ligne</message>
-  <message key="live">en ligne</message>
-  <message key="not">pas</message>
-  <message key="authoring">rédaction</message>
-  <message key="Authoring">Rédaction</message>
-  <message key="review">réviser</message>
-  <message key="user">utilisateur</message>
-  <message key="Users">Utilisateurs</message>
-  <message key="group">groupe</message>
-  <message key="Group">Groupe</message>
-  <message key="Groups">Groupes</message>
-  <message key="Group ID">ID Groupe</message>
-  <message key="Yes">Oui</message>
-  <message key="No">Non</message>
-  <message key="Description">Description</message>
-  <message key="Name">Nom</message>
-  <message key="Full Name">Nom complet</message>
-  <message key="required fields">Champs obligatoires</message>
-  <message key="Search">Rechercher</message>
-  <message key="Home">Accueil</message>
-  <message key="Title">Titre</message>
-  <message key="Last modified">Dernière&#160;mise&#160;à&#160;jour</message>
-  <message key="Overview">Résumé</message>
-  <message key="Role">R&#244;le</message>
-  <message key="View">Vue</message>
-  <message key="Assets">Actifs</message>
-  <message key="true">oui</message>
-  <message key="false">non</message>
-  <message key="Rename">Renommer</message>
-  <message key="Modify">Modifier</message>
-  <message key="Document">Document</message>
-  <message key="Date">Date</message>
-  <message key="Back">Retour</message>
-  <message key="Add">Ajouter</message>
-  <message key="Create">Créer</message>
-  <message key="The Archive">Archive</message>
-  <message key="Trash">Corbeille</message>
-  <message key="Publisher">Editeur</message>
-  <message key="Navigation Title">Titre navigation</message>
-  <message key="Creator">Créateur</message>
-  <message key="Language">Langue</message>
-  <message key="Subject">Sujet</message>
-  <message key="Rights">Droits</message>
-  <message key="Select File">Sélectionnez un fichier</message>
-  <message key="select-object">Sélectionnez {0}</message>
-  <message key="Insert">Insérer</message>
-  <message key="Insert File">Insérer un fichier</message>
-  <message key="upload-with-invalid-extension">Vous avez tenté de charger un fichier avec une extension invalide. Les extensions valides sont{0}</message>
-  <message key="filename-format-exception">Le nom du fichier que vous tentez de charger n'a soit pas d'extension, soit contient des caractères qui ne sont pas autorisés, tels que des espaces ou des caractères accentués.</message>
-  <message key="Creation Date">Date de création</message>
-  <message key="File Size">Taille</message>
-  <message key="Image">Image</message>
-
-  <!-- submit screen -->
-  <message key="submit-for-approval">Soumettre {0} pour approbation</message>
-  <message key="submit-for-approval?">Voulez-vous soumettre {0} pour approbation?</message>
-
-  <!-- publish screen -->
-  <message key="Publish">Publier</message>
-  <message key="Source File(s)">Fichier(s) source(s)</message>
-
-  <!-- login screen -->
-  <message key="login-to-pub">CONNEXION à la publication {0}</message>
-  <message key="Login">Se connecter</message>
-  <message key="Password">Mot de passe</message>
-  <message key="Username">Utilisateur</message>
-  <message key="Authentication failed">L'authentification a échoué</message>
-  <message key="try-user-lenya">Essayez l'utilisateur {0} et le mot de passe {1} (éditeur) ou l'utilisateur {2} et le mot de passe {3} (réviseur)</message>
-
-  <!-- logout screen -->
-  <message key="logout-from-pub">DECONNEXION de la publication {0}</message>
-  <message key="Your History">Votre historique</message>
-  <message key="Login to Authoring Area">Se connecter à l'espace de rédaction</message>
-
-  <!-- reject screen -->
-  <message key="Reject">Rejeter</message>
-  <message key="reject-doc?">Voulez-vous rejeter le document {0}?</message>
-
-  <!-- cms menu -->
-  <message key="New document">Nouveau document</message>
-  <message key="New Language Version">Nouvelle traduction</message>
-  <message key="Remove Language Version">Supprimer la traduction</message>
-  <message key="File">Fichier</message>
-  <message key="Edit">Edition</message>
-  <message key="Workflow">Workflow</message>
-  <message key="Deactivate">Désactiver</message>
-  <message key="Schedule">Agender</message>
-  <message key="Copy">Copier</message>
-  <message key="Paste">Coller</message>
-  <message key="Cut">Couper</message>
-  <message key="Help">Aide</message>
-  <message key="Debug">Débogage</message>
-  <message key="Delete">Effacer</message>
-  <message key="Archive">Archiver</message>
-  <message key="Restore">Restaurer</message>
-  <message key="Move Up">Déplacer vers le haut</message>
-  <message key="Move Down">Déplacer vers le bas</message>
-  <message key="Logout">Se déconnecter</message>
-  <message key="View Task Logs">Consulter le journal</message>
-  <message key="Support">Support</message>
-  <message key="System Documentation">Documentation système</message>
-  <message key="User Documentation">Documentation utilisateur</message>
-  <message key="About Apache Lenya">A propos de Apache Lenya</message>
-  <message key="Apache Lenya Homepage">Accueil de Apache Lenya</message>
-  <message key="Edit with Kupu">Rédacteur&#160;<xhtml:abbr
-    title="What&#160;You&#160;See&#160;Is&#160;What&#160;You&#160;Get">WYSIWYG</xhtml:abbr>&#160;(Kupu)
-  </message>
-  <message key="Edit with BXE">Rédacteur&#160;<xhtml:abbr
-    title="What&#160;You&#160;See&#160;Is&#160;What&#160;You&#160;Get">WYSIWYG</xhtml:abbr>&#160;(BXE)
-  </message>
-  <message key="Edit with one Form">Rédacteur&#160;De&#160;Source</message>
-  <message key="Edit with Forms">Rédacteur&#160;De&#160;Formes</message>
-  <message key="Edit Metadata">Editer&#160;les&#160;méta-données</message>
-  <message key="Edit Navigation Title">Editer&#160;le&#160;titre&#160;de&#160;navigation</message>
-  <message key="Rename URL">Renommer&#160;URL</message>
-
-  <!-- cms tabs -->
-  <message key="Server Time">Horodate</message>
-  <message key="Workflow State">Statut</message>
-
-  <!-- Administration tab -->
-  <message key="Administration">Administration</message>
-  <message key="really-delete?">Effacer {0}?</message>
-  <message key="Do you really want to delete the trash ?">Voulez-vous vraiment vider la corbeille ?</message>
-  <message key="delete-object">Effacer {0}</message>
-  <message key="delete-object?">Voulez-vous vraiment effacer {0}?</message>
-  <message key="Passwd">Mot de passe</message>
-  <message key="Switch User">Changer d'utilisateur</message>
-  <message key="Delete Trash">Vider la corbeille</message>
-  <message key="Cocoon and Server Status">Statut du serveur et&#160;de&#160;Cocoon</message>
-
-    <!-- Group Administration -->
-  <message key="Profile">Profil</message>
-  <message key="Members">Membres</message>
-  <message key="IP Ranges">Plages&#160;IP</message>
-  <message key="IP Range Groups">Groupes de plages&#160;IP</message>
-  <message key="Edit Profile">Editer le profil</message>
-  <message key="Edit Members">Editer les membres</message>
-  <message key="Group Administration">Administration des groupes</message>
-  <message key="Add Group">Ajouter un groupe</message>
-  <message key="Group Data">Détail du groupe</message>
-
-    <!-- User Administration -->
-  <message key="User Data">Détail&#160;de&#160;l'utilisateur</message>
-  <message key="User ID">ID&#160;utilisateur</message>
-  <message key="CMS User ID">ID&#160;utilisateur&#160;CMS</message>
-  <message key="LDAP ID">ID&#160;LDAP</message>
-  <message key="Confirm password">Confirmez&#160;le&#160;mot&#160;de&#160;passe</message>
-  <message key="Add User">Nouvel utilisateur</message>
-  <message key="User Administration">Administration des utilisateurs</message>
-  <message key="User Details">Détail des utilisateurs</message>
-  <message key="All Groups">Tous les groupes</message>
-  <message key="User Groups">Groupes d'utilisateurs</message>
-  <message key="Group Affiliation">Affiliation aux groupes</message>
-  <message key="Change Password">Changer le mot de passe</message>
-  <message key="Edit Group Affiliation">Editer l'affiliation</message>
-
-    <!-- IP Range Administration -->
-  <message key="IP Range">Plage&#160;IP</message>
-  <message key="IP Range ID">ID&#160;de&#160;plage&#160;IP</message>
-  <message key="Network Address">Adresse&#160;réseau</message>
-  <message key="Subnet Mask">Masque&#160;de&#160;sous-réseau</message>
-  <message key="IP Range Administration">Administrer&#160;plage&#160;IP</message>
-  <message key="Add IP Range">Ajouter&#160;une&#160;plage&#160;IP</message>
-  <message key="IP Range Profile">Profil&#160;de&#160;plage&#160;IP</message>
-
-  <!-- Site tab (info screens) -->
-  <message key="Available Languages">Langues disponibles</message>
-  <message key="This document is not available in this language.">Ce document n'est pas disponible dans cette langue.</message>
-  <message key="Document ID">ID du document</message>
-  <message key="Versions">Versions</message>
-  <message key="SSL Encryption">Encrpytage&#160;SSL</message>
-  <message key="Rollback to this version">Restaurer cette version</message>
-  <message key="AC Archive">Archive&#160;CA</message>
-  <message key="AC Trash">Corbeille&#160;CA</message>
-  <message key="AC Auth">CA&#160;auth.</message>
-  <message key="AC Live">CA&#160;en&#160;ligne</message>
-  <message key="Scheduler">Echéancier</message>
-  <message key="Meta">Méta</message>
-
-    <!-- Info screen actions-->
-  <message key="New Navigation Title">Nouveau titre de navigation</message>
-  <message key="Rename Document">Renommer document</message>
-  <message key="New Document ID">Nouvel ID de document</message>
-  <message key="No whitespace, no special characters">Pas d'espaces, pas de caractères spéciaux</message>
-      <!-- Scheduler -->
-  <message key="No active jobs">Pas de tâche active.</message>
-  <message key="The job date has expired">La date de la tâche est échue.</message>
-  <message key="check the log files">Consultez les journaux d'exécution (logfiles)</message>
-  <message key="Task">Tâche</message>
-  <message key="Day">Jour</message>
-  <message key="Time">Heure</message>
-      <!-- Deactivate and delete -->
-  <message key="docs-have-links-to-doc">Les documents suivants ont des liens qui référencent ce document</message>
-  <message key="Deactivate Document">Désactiver le document</message>
-  <message key="deactivate-doc">Désactiver le document {0}</message>
-  <message key="deactivate-doc?">Voulez-vous vraiment désactiver le document {0}?</message>
-  <message key="Delete Document">Supprimer le document</message>
-  <message key="delete-doc">Supprimer le document {0}</message>
-  <message key="cannot-deactivate-unless-children-deactivated">Ce document ne peut pas &#234;tre désactivé tant que les documents subordonnés suivants n'auront pas été également désactivés</message>
-  <message key="delete-language-versions?">Voulez-vous vraiment supprimer toutes les traductions du document {0}?</message>
-      <!-- Archive document -->
-  <message key="Archive Document">Archiver le document</message>
-  <message key="archive-doc">Archiver le document {0}</message>
-  <message key="archive-doc?">Voulez-vous vraiment archiver le document {0}?</message>
-      <!-- Rename document -->
-  <message key="Rename Document">Renommer le document</message>
-  <message key="rename-doc">Renommer le document {0}</message>
-      <!-- Copy document -->
-  <message key="Copy Document">Copier le document</message>
-  <message key="copy-doc">Copier le document {0}</message>
-  <message key="copy-doc-to-clip?">Voulez-vous copier le document {0} vers le presse-papiers? Vous pourrez le coller ultérieurement à l'endroit de votre choix.</message>
-      <!-- Paste document -->
-  <message key="Paste Document">Coller le document</message>
-  <message key="paste-doc">Coller le document {0}</message>
-  <message key="paste-doc-from-clip?">Voulez-vous coller le document {0} à partir du presse-papiers?</message>
-      <!-- Cut document -->
-  <message key="Cut Document">Couper le document</message>
-  <message key="cut-doc">Couper le document {0}</message>
-  <message key="cut-doc-to-clip?">Voulez-vous couper le document {0} vers le presse-papiers? Vous pourrez le coller ultérieurement à l'endroit de votre choix.</message>
-
-  <!-- Info Asset -->
-  <message key="Insert Image">Insérer une Image</message>
-  <message key="Insert Asset">Insérer un Actif</message>
-  <message key="Asset Upload">Télécharger un Actif</message>
-  <message key="Insert a new Image">Insérer une nouv. Image</message>
-  <message key="Upload an Asset">Télécharger un Actif</message>
-
-  <!-- Info workflow  -->
-  <message key="Value">Valeur</message>
-  <message key="Event">Evénement</message>
-  <message key="Variables">Variables</message>
-  <message key="History">Historique</message>
-  <message key="State">Statut</message>
-  <message key="IP Address">Adresse IP</message>
-  <message key="edit">éditer</message>
-  <message key="submit">soumettre</message>
-  <message key="reject">rejeter</message>
-  <message key="publish">publier</message>
-
-  <!-- Info asset  -->
-  <message key="New Asset">Nouvel Actif</message>
-
-  <!-- Info RC  -->
-  <message key="Current Version">Version courante</message>
-  <message key="Rollback to this revision">Restaurer cette version</message>
-
-  <!-- Info AC  -->
-  <message key="SSL Encryption">Chiffrement&#160;SSL</message>
-  <message key="Access Object">Objet&#160;d'accès</message>
-  <message key="Inherited Rights">Droits hérités</message>
-  <message key="visit">visiter</message>
-  <message key="reviewer">réviseur</message>
-  <message key="editor">éditeur</message>
-  <message key="admin">admin.</message>
-  <message key="world">monde</message>
-  <message key="the world">le monde</message>
-
-  <!-- Scheduler -->
-  <message key="New job">Nouvelle&#160;tâche</message>
-  <message key="Active jobs">Tâches&#160;actives</message>
-  <message key="Publish and Export">Publier et&#160;Exporter</message>
-  <message key="doc-has-links-to-unpublished">Ce document possède des liens qui référencent les documents non-publiés suivants:</message>
-
-  <!-- New Document -->
-  <message key="Please check the following possible causes of the exception">Veuillez examiner les causes possibles suivantes de cette exception.</message>
-  <message key="exception.cause.createdoc.whitespace-in-id">L'identificateur (ID) ne peut pas comporter de caractères d'espacement</message>
-  <message key="exception.cause.createdoc.id-in-use">L'identificateur (ID) est déjà utilisé</message>
-  <message key="failmessage.createdoc.invalidformat">Veuillez entrer une valeur valide dans le champ de l'identificateur (ID). Les caractères A-Z, a-z, 0-9 ou - sont valides.</message>
-  <message key="failmessage.createdoc.required">Veuillez renseigner tous les champs obligatoires (*).</message>
-
-  <!-- Asset Upload/Insert Dialog -->
-  <message key="Add to Asset Library">Ajouter à la librairie des actifs</message>
-  <message key="Asset Library">Librairie des actifs</message>
-  <message key="No assets available">Pas d'actifs disponibles</message>
-  <message key="Insert Asset">Ajouter un actif</message>
-
-</catalogue>
diff --git a/src/webapp/lenya/resources/i18n/cmsui_it.xml b/src/webapp/lenya/resources/i18n/cmsui_it.xml
deleted file mode 100644
index 95964ce..0000000
--- a/src/webapp/lenya/resources/i18n/cmsui_it.xml
+++ /dev/null
@@ -1,278 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
-  
-  $Id$ 
-  @translators Giampaolo Trapasso  <trapo at trapo dot it>
--->
-
-<catalogue xml:lang="it">
-	<!-- common used words -->
-	<message key="Save">Salva</message>
-	<message key="Submit">Sottoponi</message>
-	<message key="Cancel">Annulla</message>
-	<message key="Delete">Cancella</message>
-	<message key="NOTE">NOTA</message>
-	<message key="No referer">Nessuna pagina di provenienza</message>
-	<message key="Referer">Pagina di provenienza</message>
-	<message key="EXCEPTION">ECCEZZIONE</message>
-	<message key="User">Utente</message>
-	<message key="live">pubblicato</message>
-	<message key="not">non</message>
-	<message key="authoring">composizione</message>
-	<message key="Authoring">Composizione</message>
-	<message key="review">revisione</message>
-	<message key="user">utente</message>
-	<message key="Users">Utenti</message>
-	<message key="group">gruppo</message>
-	<message key="Group">Gruppo</message>
-	<message key="Groups">Gruppi</message>
-	<message key="Group ID">ID Gruppo</message>
-	<message key="Yes">Sì</message>
-	<message key="No">No</message>
-	<message key="Description">Descrizione</message>
-	<message key="Name">Nome</message>
-	<message key="Full Name">Nome Completo</message>
-	<message key="required fields">campi richiesti</message>
-	<message key="Search">Cerca</message>
-	<message key="Home">Home</message>
-	<message key="Title">Titolo</message>
-	<message key="Last modified">Ultima&#160;modifica</message>
-	<message key="Overview">Vista generale</message>
-	<message key="Role">Ruolo</message>
-	<message key="View">Vedi</message>
-	<message key="Assets">Risorse</message>
-	<message key="true">sì</message>
-	<message key="false">no</message>
-	<message key="Rename">Rinomina</message>
-	<message key="Modify">Modifica</message>
-	<message key="Document">Documento</message>
-	<message key="Date">Data</message>
-	<message key="Back">Indietro</message>
-	<message key="Add">Aggiungi</message>
-	<message key="Create">Crea</message>
-	<message key="The Archive">Archivio</message>
-	<message key="Trash">Cestino</message>
-	<message key="Publisher">Editore</message>
-	<message key="Navigation Title">Titolo di Navigazione</message>
-	<message key="Creator">Creatore</message>
-	<message key="Language">Lingua</message>
-	<message key="Subject">Argomento</message>
-	<message key="Rights">Diritti</message>
-	<message key="Select File">Seleziona File</message>
-	<message key="select-object">Seleziona {0}</message>
-	<message key="Insert">Inserisci</message>
-	<message key="Insert File">Inserisci File</message>
-	<message key="upload-with-invalid-extension">Hai provato a inviare un file con una estensione non valida. Le estensioni valide sono {0}</message>
-	<message key="filename-format-exception">Il nome del file che stai cercando di trasferire non ha estensioni o contiene caratteri non ammessi come spazi e lettere accentate.</message>
-	<message key="Creation Date">Data creazione</message>
-	<message key="File Size">Dimensione File</message>
-	<message key="Image">Immagine</message>
-	<!-- submit screen -->
-	<message key="submit-for-approval">Proponi {0} per la pubblicazione</message>
-	<message key="submit-for-approval?">Vuoi proporre {0} per la pubblicazione?</message>
-	<!-- publish screen -->
-	<message key="Publish">Pubblica</message>
-	<message key="Source File(s)">File sorgente/i</message>
-	<!-- login screen -->
-	<message key="login-to-pub">LOGIN nella Pubblicazione {0}</message>
-	<message key="Login">Login</message>
-	<message key="Password">Password</message>
-	<message key="Username">Nome utente</message>
-	<message key="Authentication failed">Autenticazione fallita</message>
-	<message key="try-user-lenya">Prova utente {0} e password {1} (editore) o utente {2} e password {3} (revisore)</message>
-	<!-- logout screen -->
-	<message key="logout-from-pub">LOGOUT dalla Pubblicazione {0}</message>
-	<message key="Your History">Le tue modifiche</message>
-	<message key="Login to Authoring Area">Login nell'area Authoring</message>
-	<!-- reject screen -->
-	<message key="Reject">Respingi</message>
-	<message key="reject-doc?">Vuoi respingere il documento {0}?</message>
-	<!-- cms menu -->
-	<message key="New document">Nuovo Documento</message>
-	<message key="New Language Version">Nuova Lingua</message>
-	<message key="Remove Language Version">Rimuovi Lingua</message>
-	<message key="File">File</message>
-	<message key="Edit">Modifica</message>
-	<message key="Workflow">Workflow</message>
-	<message key="Deactivate">Disattiva</message>
-	<message key="Schedule">Pianifica</message>
-	<message key="Copy">Copia</message>
-	<message key="Paste">Incolla</message>
-	<message key="Cut">Taglia</message>
-	<message key="Help">Help</message>
-	<message key="Debug">Debug</message>
-	<message key="Delete">Cancella</message>
-	<message key="Archive">Archivia</message>
-	<message key="Restore">Ripristina</message>
-	<message key="Move Up">Sposta in Alto</message>
-	<message key="Move Down">Sposta in Basso</message>
-	<message key="Logout">Logout</message>
-	<message key="View Task Logs">Mostra Log delle Attività</message>
-	<message key="Support">Supporto</message>
-	<message key="System Documentation">Documentazione di Sistema</message>
-	<message key="User Documentation">Documentazione Utente</message>
-	<message key="About Apache Lenya">Informazioni su Apache Lenya</message>
-	<message key="Apache Lenya Homepage">Homepage di Apache Lenya </message>
-	<message key="Edit with Epoz">Modifica con Kupu</message>
-	<message key="Edit with BXE">Modifica con BXE</message>
-	<message key="Edit with one Form">Modifica con una Form</message>
-	<message key="Edit with Forms">Modifica con Forms</message>
-	<message key="Edit Metadata">Modifica&#160;Metadati</message>
-	<message key="Edit Navigation Title">Modifica&#160;Titolo&#160;Navigazione</message>
-	<message key="Rename URL">Rinomina&#160;URL</message>
-	<!-- cms tabs -->
-	<message key="Server Time">Ora Server</message>
-	<message key="Workflow State">Stato Workflow</message>
-	<!-- Administration tab -->
-	<message key="Administration">Amministrazione</message>
-	<message key="really-delete?">Vuoi davvero cancellare {0}?</message>
-	<message key="Do you really want to delete the trash ?">Svuotare il cestino?</message>
-	<message key="delete-object">Cancella {0}</message>
-	<message key="delete-object?">Vuoi davvero cancellare {0}?</message>
-	<message key="Passwd">Passwd</message>
-	<message key="Switch User">Cambia Utente</message>
-	<message key="Delete Trash">Svuota Cestino</message>
-	<message key="Cocoon and Server Status">Stato Cocoon e Server</message>
-	<!-- Group Administration -->
-	<message key="Profile">Profilo</message>
-	<message key="Members">Membri</message>
-	<message key="IP Ranges">Intervalli&#160;IP</message>
-	<message key="Edit Profile">Modifica Profilo</message>
-	<message key="Edit Members">Modifica Membri</message>
-	<message key="Group Administration">Amministrazione Gruppo</message>
-	<message key="Add Group">Aggiungi Gruppo</message>
-	<message key="Group Data">Dati Gruppo</message>
-	<!-- User Administration -->
-	<message key="User Data">Dati&#160;Utente</message>
-	<message key="CMS User ID">ID&#160;Utente&#160;CMS</message>
-	<message key="LDAP ID">ID&#160;LDAP</message>
-	<message key="Confirm password">Conferma&#160;password</message>
-	<message key="Add User">Aggiungi Utente</message>
-	<message key="User Administration">Amministrazione Utente</message>
-	<message key="User Details">Dettagli Utente</message>
-	<message key="All Groups">Tutti i Gruppi</message>
-	<message key="User Groups">Gruppi Utente</message>
-	<message key="Group Affiliation">Gruppi di Appartenenza</message>
-	<message key="Change Password">Cambia Password</message>
-	<message key="Edit Group Affiliation">Modifica Gruppi di Appartenenza</message>
-	<!-- IP Range Administration -->
-	<message key="IP Range">Intervallo&#160;IP</message>
-	<message key="IP Range ID">ID&#160;Intervallo&#160;IP</message>
-	<message key="Network Address">Indirizzo&#160;di Rete</message>
-	<message key="Subnet Mask">Subnet&#160;Mask</message>
-	<message key="IP Range Administration">Amministrazione&#160;Intervalli&#160;IP</message>
-	<message key="Add IP Range">Aggiungi&#160;Intervallo&#160;IP</message>
-	<message key="IP Range Profile">Profilo&#160;Intervallo&#160;IP</message>
-	<!-- Site tab (info screens) -->
-	<message key="Available Languages">Lingue Disponibili</message>
-	<message key="This document is not available in this language.">Questo documento non è disponibile in questa lingua</message>
-	<message key="Document ID">ID Documento</message>
-	<message key="Versions">Versioni</message>
-	<message key="SSL Encryption">Codifica&#160;SSL</message>
-	<message key="Rollback to this version">Ripristina questa versione</message>
-	<message key="AC Archive">Archivio&#160;AC</message>
-	<message key="AC Trash">Cestino&#160;AC</message>
-	<message key="AC Auth">AC&#160;Auth</message>
-	<message key="AC Live">AC&#160;Live</message>
-	<message key="Scheduler">Scheduler</message>
-	<!-- Info screen actions-->
-	<message key="New Navigation Title">Nuovo Titolo Navigazione</message>
-	<message key="Rename Document">Rinomina Documento</message>
-	<message key="New Document ID">Nuovo ID Documento</message>
-	<message key="No whitespace, no special characters">Niente spazi, niente caratteri speciali</message>
-	<!-- Scheduler -->
-	<message key="No active jobs">Nessun job attivo.</message>
-	<message key="The job date has expired">La data del job è scaduta</message>
-	<message key="check the log files">controllare i file di log</message>
-	<message key="Task">Task</message>
-	<message key="Day">Giorno</message>
-	<message key="Time">Ora</message>
-	<!-- Deactivate and delete -->
-	<message key="docs-have-links-to-doc">I seguenti documenti hanno link su questo documento</message>
-	<message key="Deactivate Document">Disattiva Documento</message>
-	<message key="deactivate-doc">Disattiva documento {0}</message>
-	<message key="deactivate-doc?">Vuoi veramente disattivare il documento {0}?</message>
-	<message key="Delete Document">Cancella Documento</message>
-	<message key="delete-doc">Cancella documento {0}</message>
-	<message key="cannot-deactivate-unless-children-deactivated">Questo documento non può essere disattivato se i documenti figli non sono disattivati</message>
-	<message key="delete-language-versions?">Vuoi veramente cancellare tutte le lingue del documento {0}?</message>
-	<!-- Archive document -->
-	<message key="Archive Document">Archivia Documento</message>
-	<message key="archive-doc">Archivia documento {0}</message>
-	<message key="archive-doc?">Vuoi veramente archiviare il documento {0}?</message>
-	<!-- Rename document -->
-	<message key="Rename Document">Rinomina Documento</message>
-	<message key="rename-doc">Rinomina documento {0}</message>
-	<!-- Copy document -->
-	<message key="Copy Document">Copia Documento</message>
-	<message key="copy-doc">Copia documento {0}</message>
-	<message key="copy-doc-to-clip?">Vuoi copiare il documento {0} negli appunti? Puoi incollare successivamente il documento in un'altra posizione.</message>
-	<!-- Paste document -->
-	<message key="Paste Document">Incolla Documento</message>
-	<message key="paste-doc">Incolla documento {0}</message>
-	<message key="paste-doc-from-clip?">Vuoi incollare il documento {0} dagli appunti?</message>
-	<!-- Cut document -->
-	<message key="Cut Document">Taglia Documento</message>
-	<message key="cut-doc">Taglia documento {0}</message>
-	<message key="cut-doc-to-clip?">Vuoi tagliare il documento {0} and muoverlo negli appunti? Puoi incollare successivamente il documento in un'altra posizione.</message>
-	<!-- Info Asset -->
-	<message key="Insert Image">Inserisci Immagine</message>
-	<message key="Insert Asset">Inserisci Risorsa</message>
-	<message key="Asset Upload">Invia Risorsa</message>
-	<message key="Insert a new Image">Inserisci una nuova Immagine</message>
-	<message key="Upload an Asset">Invia una Risorsa</message>
-	<!-- Info workflow  -->
-	<message key="Value">Valore</message>
-	<message key="Event">Evento</message>
-	<message key="Variables">Variabili</message>
-	<message key="History">Storia</message>
-	<message key="State">Stato</message>
-	<message key="IP Address">Indirizzo IP</message>
-	<message key="edit">modifica</message>
-	<message key="submit">sottoponi</message>
-	<message key="reject">respingi</message>
-	<message key="publish">publica</message>
-	<!-- Info asset  -->
-	<message key="New Asset">Nuova Risorsa</message>
-	<!-- Info RC  -->
-	<message key="Current Version">Versione Corrente</message>
-	<message key="Rollback to this revision">Ripristina questa versione</message>
-	<!-- Info AC  -->
-	<message key="SSL Encryption">Codifica&#160;SSL</message>
-	<message key="Access Object">Access&#160;Object</message>
-	<message key="visit">visita</message>
-	<message key="reviewer">revisore</message>
-	<message key="editor">editore</message>
-	<message key="admin">amministratore</message>
-	<message key="world">mondo</message>
-	<message key="the world">il mondo</message>
-	<!-- Scheduler -->
-	<message key="New job">Nuovo&#160;job</message>
-	<message key="Active jobs">Job&#160;attivi</message>
-	<message key="Publish and Export">Pubblica e&#160;Esporta</message>
-	<message key="doc-has-links-to-unpublished">Questo documento ha link ai seguenti documenti non pubblicati:</message>
-	<!-- New Document -->
-	<message key="Please check the following possible causes of the exception">Controllare per favore le possibili cause dell'eccezione</message>
-	<message key="exception.cause.createdoc.whitespace-in-id">L'ID non può avere spazi</message>
-	<message key="exception.cause.createdoc.id-in-use">Questo ID è già usato</message>
-	<message key="failmessage.createdoc.invalidformat">Inserire un testo valido nel campo ID. A-Z, a-z, 0-9 o - sono caratteri validi.</message>
-	<message key="failmessage.createdoc.required">Riempire tutti i campi obbligatori (sono segnati con *).</message>
-	<!-- Asset Upload/Insert Dialog -->
-	<message key="Add to Asset Library">Aggiungi alla Libreria Risorse</message>
-	<message key="Asset Library">Libreria Risorse</message>
-	<message key="No assets available">Nessuna risorsa disponibile</message>
-	<message key="Insert Asset">Inserisci Risorsa</message>
-</catalogue>
diff --git a/src/webapp/lenya/resources/i18n/cmsui_ja.xml b/src/webapp/lenya/resources/i18n/cmsui_ja.xml
deleted file mode 100644
index 27a167f..0000000
--- a/src/webapp/lenya/resources/i18n/cmsui_ja.xml
+++ /dev/null
@@ -1,332 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<catalogue xml:lang="ja" xmlns:xhtml="http://www.w3.org/1999/xhtml">
-
-  <!-- common used words -->
-  <message key="Save">保存</message>
-  <message key="Submit">送信</message>
-  <message key="Cancel">キャンセル</message>
-  <message key="Delete">削除</message>
-  <message key="NOTE"><注></message>
-  <message key="No referer">参照無し</message>
-  <message key="Referer">参照</message>
-  <message key="EXCEPTION">例外</message>
-  <message key="User">ユーザ</message>
-  <message key="live">ライブ</message>
-  <message key="not">not</message>
-  <message key="authoring">オーサリング</message>
-  <message key="Authoring">オーサリング</message>
-  <message key="review">レビュー</message>
-  <message key="user">ユーザ</message>
-  <message key="Users">ユーザ群</message>
-  <message key="group">グループ</message>
-  <message key="Group">グループ</message>
-  <message key="Groups">グループ群</message>
-  <message key="Group ID">グループ ID</message>
-  <message key="Yes">はい</message>
-  <message key="No">いいえ</message>
-  <message key="Description">説明</message>
-  <message key="Name">名前</message>
-  <message key="Full Name">フルネーム</message>
-  <message key="required fields">必須フィールド</message>
-  <message key="Search">検索</message>
-  <message key="Home">ホーム</message>
-  <message key="Title">タイトル</message>
-  <message key="Last modified">最終更新日</message>
-  <message key="Overview">概要</message>
-  <message key="Role">ロール</message>
-  <message key="View">ビュー</message>
-  <message key="Assets">アセット</message>
-  <message key="true">はい</message>
-  <message key="false">いいえ</message>
-  <message key="Rename">名前変更</message>
-  <message key="Modify">修正</message>
-  <message key="Document">ドキュメント</message>
-  <message key="Date">日付</message>
-  <message key="Back">戻る</message>
-  <message key="Add">追加</message>
-  <message key="Create">作成</message>
-  <message key="The Archive">アーカイブ</message>
-  <message key="Trash">ゴミ箱</message>
-  <message key="Publisher">発行者</message>
-  <message key="Navigation Title">ナビゲーションタイトル</message>
-  <message key="Creator">作成者</message>
-  <message key="Language">言語</message>
-  <message key="Subject">題名</message>
-  <message key="Rights">権利</message>
-  <message key="Select File">ファイル選択</message>
-  <message key="select-object">{0} の選択</message>
-  <message key="Insert">挿入</message>
-  <message key="Insert File">ファイル挿入</message>
-  <message key="upload-with-invalid-extension">拡張子の正しくないファイルをアップロードしようとしました。正しい拡張子は {0} です。拡張子名は小文字(a,b,c,...)にしてください</message>
-  <message key="upload-with-missing-title">タイトルの無いファイルをアップロードしようとしました</message>
-  <message key="filename-format-exception">アップロードしようとしたファイルの名前に拡張子がないか或いは半角スペースやウムラウトといった使用不可能な文字が含まれています</message>
-  <message key="Creation Date">作成日</message>
-  <message key="File Size">ファイルサイズ</message>
-  <message key="Image">イメージ</message>
-  <message key="Link">リンク</message>
-  <message key="Caption">キャプション</message>
-  <message key="All rights reserved">All rights reserved.</message>
-
-  <!-- submit screen -->
-  <message key="submit-for-approval">承認用に {0} を送信</message>
-  <message key="submit-for-approval?">承認用に {0} を送信しますか?</message>
-
-  <!-- publish screen -->
-  <message key="Publish">パブリッシュ</message>
-  <message key="Source File(s)">ソースファイル</message>
-
-  <!-- login screen -->
-  <message key="login-to-pub">{0} パブリケーションへのログイン</message>
-  <message key="Login">ログイン</message>
-  <message key="Password">パスワード</message>
-  <message key="Username">ユーザ名</message>
-  <message key="Authentication failed">認証失敗</message>
-  <message key="try-user-lenya">ユーザ {0} のパスワード {1} (編集者)、あるいは、ユーザ {2} のパスワード {3} (レビュアー)を使ってください</message>
-
-  <!-- logout screen -->
-  <message key="logout-from-pub">{0} パブリケーションからのログアウト</message>
-  <message key="Your History">履歴</message>
-  <message key="Login to Authoring Area">オーサリングエリアへのログイン</message>
-
-  <!-- reject screen -->
-  <message key="Reject">拒否</message>
-  <message key="reject-doc?">ドキュメント {0} を拒否しますか?</message>
-
-  <!-- cms menu -->
-  <message key="New Document">新規ドキュメント</message>
-  <message key="New Language Version">新規言語バージョン</message>
-  <message key="Remove Language Version">言語バージョンの削除</message>
-  <message key="File">ファイル</message>
-  <message key="Edit">編集</message>
-  <message key="Workflow">ワークフロー</message>
-  <message key="Deactivate">アクティベート解除</message>
-  <message key="Schedule">スケジュール</message>
-  <message key="Copy">コピー</message>
-  <message key="Paste">貼り付け</message>
-  <message key="Cut">切り取り</message>
-  <message key="Help">ヘルプ</message>
-  <message key="Debug">デバッグ</message>
-  <message key="Delete">削除</message>
-  <message key="Archive">アーカイブ</message>
-  <message key="Restore">リストア</message>
-  <message key="Move Up">上へ</message>
-  <message key="Move Down">下へ</message>
-  <message key="Logout">ログアウト</message>
-  <message key="View Task Logs">View Task Logs</message>
-  <message key="Support">サポート</message>
-  <message key="System Documentation">システムドキュメント</message>
-  <message key="User Documentation">ユーザドキュメント</message>
-  <message key="About Apache Lenya">Apache Lenya について</message>
-  <message key="Apache Lenya Homepage">Apache Lenya ホームページ</message>
-  <message key="Edit with Kupu">
-    <xhtml:abbr title="What&#160;You&#160;See&#160;Is&#160;What&#160;You&#160;Get">WYSIWYG</xhtml:abbr>&#160;Editor&#160;(Kupu)
-  </message>
-  <message key="Edit with BXE">
-    <xhtml:abbr title="What&#160;You&#160;See&#160;Is&#160;What&#160;You&#160;Get">WYSIWYG</xhtml:abbr>&#160;Editor&#160;(BXE)
-  </message>
-  <message key="Edit with one Form">ソースエディタ</message>
-  <message key="Edit with Forms">フォームエディタ</message>
-  <message key="Edit Metadata">メタデータの編集</message>
-  <message key="Edit Navigation Title">ナビゲーションタイトルの編集</message>
-  <message key="Rename URL">URLの変更</message>
-
-  <!-- cms tabs -->
-  <message key="Server Time">サーバ時間</message>
-  <message key="Workflow State">ワークフロー状態</message>
-
-  <!-- Administration tab -->
-  <message key="Administration">管理</message>
-  <message key="really-delete?">本当に {0} を削除しますか?</message>
-  <message key="Do you really want to delete the trash ?">本当にゴミ箱を削除しますか?</message>
-  <message key="delete-object">{0} の削除</message>
-  <message key="delete-object?">本当に {0} を削除しますか?</message>
-  <message key="Passwd">パスワード</message>
-  <message key="Switch User">ユーザ切替</message>
-  <message key="Delete Trash">ゴミ箱の削除</message>
-  <message key="Cocoon and Server Status">Cocoon/Serverのステータス</message>
-
-    <!-- Group Administration -->
-  <message key="Profile">プロフィール</message>
-  <message key="Members">メンバー</message>
-  <message key="IP Ranges">IP範囲</message>
-  <message key="Edit Profile">プロフィール編集</message>
-  <message key="Edit Members">メンバー編集</message>
-  <message key="Group Administration">グループ管理</message>
-  <message key="Add Group">グループ追加</message>
-  <message key="Group Data">グループデータ</message>
-
-    <!-- User Administration -->
-  <message key="User Data">ユーザデータ</message>
-  <message key="CMS User ID">CMSユーザID</message>
-  <message key="LDAP ID">LDAP&#160;ID</message>
-  <message key="Confirm password">パスワード確認</message>
-  <message key="Add User">ユーザ追加</message>
-  <message key="User Administration">ユーザ管理</message>
-  <message key="User Details">ユーザ詳細</message>
-  <message key="All Groups">すべてのグループ</message>
-  <message key="User Groups">ユーザグループ</message>
-  <message key="Group Affiliation">グループアフィリエート</message>
-  <message key="Change Password">パスワード変更</message>
-  <message key="Edit Group Affiliation">グループアフィリエートの編集</message>
-
-    <!-- User Types -->
-  <message key="LDAP User">LDAP ユーザ</message>
-  <message key="Local User">CMS ユーザ</message>
-
-    <!-- IP Range Administration -->
-  <message key="IP Range">IP範囲</message>
-  <message key="IP Range ID">IP範囲ID</message>
-  <message key="Network Address">ネットワークアドレス</message>
-  <message key="Subnet Mask">サブネットマスク</message>
-  <message key="IP Range Administration">IP範囲管理</message>
-  <message key="Add IP Range">IP範囲の追加</message>
-  <message key="IP Range Profile">IP範囲のプロフィール</message>
-
-  <!-- Site tab (info screens) -->
-  <message key="Available Languages">利用可能言語</message>
-  <message key="This document is not available in this language.">このドキュメントで指定の言語は対応していません</message>
-  <message key="Document ID">ドキュメントID</message>
-  <message key="Versions">バージョン</message>
-  <message key="SSL Encryption">SSL暗号化</message>
-  <message key="Rollback to this version">このバージョンへロールバック</message>
-  <message key="AC Archive">ACアーカイブ</message>
-  <message key="AC Trash">ACゴミ箱</message>
-  <message key="AC Auth">AC&#160;Auth</message>
-  <message key="AC Live">AC&#160;Live</message>
-  <message key="Scheduler">スケジューラ</message>
-
-    <!-- Info screen actions-->
-  <message key="New Navigation Title">新規ナビゲーションタイトル</message>
-  <message key="Rename Document">ドキュメントの名前変更</message>
-  <message key="New Document ID">新規ドキュメントID</message>
-  <message key="No whitespace, no special characters">空白無し特殊文字無し</message>
-      <!-- Scheduler -->
-  <message key="No active jobs">有効なジョブ無し</message>
-  <message key="The job date has expired">このジョブは有効期限切れです</message>
-  <message key="check the log files">ログファイルの確認</message>
-  <message key="Task">タスク</message>
-  <message key="Day">Day</message>
-  <message key="Time">Time</message>
-      <!-- Deactivate and delete -->
-  <message key="docs-have-links-to-doc">以下のドキュメントにはこのドキュメントへのリンクがあります</message>
-  <message key="Deactivate Document">ドキュメントのアクティベート解除</message>
-  <message key="deactivate-doc">ドキュメント {0} のアクティベート解除</message>
-  <message key="deactivate-doc?">本当にドキュメント {0} のアクティベートを解除しますか?</message>
-  <message key="Delete Document">ドキュメントの削除</message>
-  <message key="delete-doc">ドキュメント {0} の削除</message>
-  <message key="cannot-deactivate-unless-children-deactivated">以下の子ドキュメントがアクティベート解除状態でなければ、このドキュメントのアクティベートを解除できません</message>
-  <message key="delete-language-versions?">本当にドキュメント {0} のすべての言語バージョンを削除してもよろしいですか?</message>
-      <!-- Archive document -->
-  <message key="Archive Document">ドキュメントのアーカイブ</message>
-  <message key="archive-doc">ドキュメント {0} のアーカイブ</message>
-  <message key="archive-doc?">本当にドキュメント {0} をアーカイブしますか?</message>
-      <!-- Rename document -->
-  <message key="Rename Document">ドキュメントの名前変更</message>
-  <message key="rename-doc">ドキュメント {0} の名前変更</message>
-      <!-- Copy document -->
-  <message key="Copy Document">ドキュメントのコピー</message>
-  <message key="copy-doc">ドキュメント {0} のコピー</message>
-  <message key="copy-doc-to-clip?">ドキュメント {0} をコピーしクリップボードに移動させますか? お好みの場所に後で貼り付けをすることが出来ます</message>
-      <!-- Paste document -->
-  <message key="Paste Document">ドキュメントの貼り付け</message>
-  <message key="paste-doc">ドキュメント {0} の貼り付け</message>
-  <message key="paste-doc-from-clip?">クリップボードからドキュメント {0} を貼り付けしますか?</message>
-      <!-- Cut document -->
-  <message key="Cut Document">ドキュメントの切り取り</message>
-  <message key="cut-doc">ドキュメント {0} の切り取り</message>
-  <message key="cut-doc-to-clip?">ドキュメント {0} を切り取りクリップボードに移動させますか? お好みの場所に後で貼り付けをすることが出来ます</message>
-    <!--Change visibility in navigation -->
-  <message key="Change">変更</message>
-  <message key="Change Document visiblity in navigation">ナビゲーションでのドキュメントの可視性の変更</message>
-  <message key="Visibility in navigation">ナビゲーションでの可視性</message>
-  <message key="visible">可視</message>
-  <message key="hidden">不可視</message>
-
-  <!-- Info Asset -->
-  <message key="Insert Image">イメージの挿入</message>
-  <message key="Insert Asset">アセットの挿入</message>
-  <message key="Asset Upload">アセットのアップロード</message>
-  <message key="Insert a new Image">新規イメージの挿入</message>
-  <message key="Upload an Asset">アセットのアップロード</message>
-
-  <!-- Info workflow  -->
-  <message key="Value">値</message>
-  <message key="Event">イベント</message>
-  <message key="Variables">変数</message>
-  <message key="History">履歴</message>
-  <message key="State">状況</message>
-  <message key="IP Address">IPアドレス</message>
-  <message key="edit">編集</message>
-  <message key="submit">送信</message>
-  <message key="reject">拒否</message>
-  <message key="publish">パブリッシュ</message>
-
-  <!-- Info asset  -->
-  <message key="New Asset">新規アセット</message>
-
-  <!-- Info RC  -->
-  <message key="Current Version">現在のバージョン</message>
-  <message key="Rollback to this revision">このリビジョンにロールバック</message>
-
-  <!-- Info AC  -->
-  <message key="SSL Encryption">SSL 暗号化</message>
-  <message key="Access Object">Access&#160;Object</message>
-  <message key="visit">訪問</message>
-  <message key="reviewer">reviewer</message>
-  <message key="editor">編集者</message>
-  <message key="admin">管理者</message>
-  <message key="world">世界</message>
-  <message key="the world">世界</message>
-
-  <!-- Scheduler -->
-  <message key="New job">新規ジョブ</message>
-  <message key="Active jobs">有効なジョブ</message>
-  <message key="Publish and Export">パブリッシュ/エクスポート</message>
-  <message key="doc-has-links-to-unpublished">このドキュメントには以下のパブリッシュされていないドキュメントへのリンクが含まれています:</message>
-
-  <!-- New Document -->
-  <message key="Please check the following possible causes of the exception">例外が発生しました:以下の可能性がありますので確認してください</message>
-  <message key="exception.cause.createdoc.whitespace-in-id">ID に空白文字を含めることは出来ません</message>
-  <message key="exception.cause.createdoc.id-in-use">この ID は既に使われています</message>
-  <message key="failmessage.createdoc.invalidformat">ID フィールドには 正しい文字を入れてください: A-Z, a-z, 0-9 あるいは - のみが利用可能です</message>
-  <message key="failmessage.createdoc.required">必須項目 (*) の値をすべて満たしてください</message>
-
-  <!-- Asset Upload/Insert Dialog -->
-  <message key="lenya.assetupload.subtitle">アセットライブラリへの追加</message>
-  <message key="Asset Library">アセットライブラリ</message>
-  <message key="No assets available">アセットは利用不可能です</message>
-  <message key="Insert Asset">アセットの挿入</message>
-
-  <!-- Image Upload/Insert Dialog -->
-  <message key="lenya.imageupload.title">イメージの挿入</message>
-  <message key="lenya.imageupload.selectimage.label">イメージの選択</message>
-  <message key="lenya.imageupload.info.noimages">イメージは利用不可能です</message>
-  <message key="lenya.imageupload.links.hint">外部リソースへのリンクは 'http://' から始め、内部リソースへは '/' から始めるようにしてください</message>
-
-  <!-- Revision Controller -->
-  <message key="Reason">理由</message>
-  <message key="Filename">ファイル名</message>
-  <message key="lenya.rc.nocheckout">リソースがチェックアウト(check out)できませんでした</message>
-  <message key="lenya.rc.checkedoutalready">このリソースは既に他のユーザがチェックアウトしています</message>
-  <message key="lenya.rc.nocheckin">リソースをチェックインできませんでした</message>
-  <message key="Generic Exception">一般的例外</message>
-  <message key="Check the log files.">ログファイルを確認してください</message>
-</catalogue>
diff --git a/src/webapp/lenya/resources/i18n/cmsui_nl.xml b/src/webapp/lenya/resources/i18n/cmsui_nl.xml
deleted file mode 100644
index da56f76..0000000
--- a/src/webapp/lenya/resources/i18n/cmsui_nl.xml
+++ /dev/null
@@ -1,378 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<catalogue xml:lang="nl" xmlns:xhtml="http://www.w3.org/1999/xhtml">
-
-  <!-- common used words -->
-  <message key="Save">Opslaan</message>
-  <message key="Submit">Verstuur</message>
-  <message key="Cancel">Afbreken</message>
-
-  <message key="Delete">Verwijder</message>
-  <message key="NOTE">LET OP</message>
-  <message key="No referer">Geen terugverwijzing</message>
-  <message key="Referer">Terugverwijzing</message>
-  <message key="EXCEPTION">EXCEPTIE</message>
-  <message key="User">Gebruiker</message>
-
-  <message key="live">live</message>
-  <message key="not">niet</message>
-  <message key="authoring">schrijven</message>
-  <message key="Authoring">Schrijven</message>
-  <message key="review">controle</message>
-  <message key="user">gebruiker</message>
-
-  <message key="Users">Gebruikers</message>
-  <message key="group">groep</message>
-  <message key="Group">Groep</message>
-  <message key="Groups">Groepen</message>
-  <message key="Group ID">Groep ID</message>
-  <message key="Yes">Ja</message>
-
-  <message key="No">Nee</message>
-  <message key="Description">Beschrijving</message>
-  <message key="Name">Naam</message>
-  <message key="Full Name">Volledige naam</message>
-  <message key="required fields">verplichte velden</message>
-  <message key="Search">Zoek</message>
-
-  <message key="Home">Startpagina</message>
-  <message key="Title">Titel</message>
-  <message key="Last modified">Laatste&#160;wijziging</message>
-  <message key="Overview">Overzicht</message>
-  <message key="Role">Rol</message>
-  <message key="View">Aanzicht</message>
-
-  <message key="Assets">Onderdelen</message>
-  <message key="true">ja</message>
-  <message key="false">nee</message>
-  <message key="Rename">Hernoemen</message>
-  <message key="Modify">Veranderen</message>
-  <message key="Document">Document</message>
-
-  <message key="Date">Datum</message>
-  <message key="Back">Terug</message>
-  <message key="Add">Toevoegen</message>
-  <message key="Create">Maken</message>
-  <message key="The Archive">Het Archief</message>
-  <message key="Trash">Prullenbak</message>
-
-  <message key="Publisher">Eigenaar</message>
-  <message key="Navigation Title">Navigatie Titel</message>
-  <message key="Creator">Maker</message>
-  <message key="Language">Taal</message>
-  <message key="Subject">Onderwerp</message>
-  <message key="Rights">Rechten</message>
-
-  <message key="Select File">Kies Bestand</message>
-  <message key="select-object">Kies {0}</message>
-  <message key="Insert">Toevoegen</message>
-  <message key="Insert File">Bestand toevoegen</message>
-  <message key="upload-with-invalid-extension">U heeft geprobeerd een bestand met een onjuiste extentie toe te voegen.  Juiste extenties zijn{0}.  Merk op dat extenties met kleine letters moeten worden geschreven.</message>
-  <message key="upload-with-missing-title">U heeft geprobeerd een bestand zonder een titel toe te voegen.</message>
-
-  <message key="filename-format-exception">De bestandsnaam van het bestand dat u probeert toe te voegen heeft geen extentie of bevat karakters die niet zijn toegestaan zoals spaties of trema's.</message>
-  <message key="Creation Date">Aanmaak datum</message>
-  <message key="File Size">Bestands omvang</message>
-  <message key="Image">Afbeelding</message>
-  <message key="Link">Verwijzing</message>
-  <message key="Caption">Onderschrift</message>
-
-  <message key="All rights reserved">Alle rechten voorbehouden.</message>
-
-  <!-- submit screen -->
-  <message key="submit-for-approval">Bied {0} aan voor goedkeuring</message>
-  <message key="submit-for-approval?">Wilt u {0} aanbieden voor goedkeuring?</message>
-
-  <!-- publish screen -->
-  <message key="Publish">Publiceer</message>
-
-  <message key="Source File(s)">Bron Bestand(en)</message>
-
-  <!-- login screen -->
-  <message key="login-to-pub">Aanmelden voor de {0} Publicatie</message>
-  <message key="Login">Inloggen</message>
-  <message key="Password">Wachtwoord</message>
-  <message key="Username">Gebruikersnaam</message>
-
-  <message key="Authentication failed">Authenticatie mislukt</message>
-  <message key="try-user-lenya">Probeer gebruiker {0} met wachtwoord {1} (auteur), of gebruiker {2} en wachtwoord {3} (reviewer)</message>
-
-  <!-- logout screen -->
-  <message key="logout-from-pub">Afmelden voor de {0} Publicatie</message>
-  <message key="Your History">Uw historie</message>
-  <message key="Login to Authoring Area">Inloggen in het schrijf onderdeel</message>
-
-  <!-- reject screen -->
-  <message key="Reject">Afwijzen</message>
-  <message key="reject-doc?">Wilt u het document {0} afwijzen?</message>
-
-  <!-- cms menu -->
-  <message key="New Document">Nieuw Document</message>
-  <message key="New Language Version">Nieuwe taal versie</message>
-
-  <message key="Remove Language Version">Verwijder taal versie</message>
-  <message key="File">Bestand</message>
-  <message key="Edit">Wijzig</message>
-  <message key="Workflow">Workflow</message>
-  <message key="Deactivate">Deactivate</message>
-  <message key="Schedule">Schedule</message>
-
-  <message key="Copy">Kopieer</message>
-  <message key="Paste">Plakken</message>
-  <message key="Cut">Knippen</message>
-  <message key="Help">Help</message>
-  <message key="Debug">Debug</message>
-  <message key="Delete">Verwijder</message>
-
-  <message key="Archive">Archiveer</message>
-  <message key="Restore">Herstel</message>
-  <message key="Move Up">Verplaats omhoog</message>
-  <message key="Move Down">Verplaats omlaag</message>
-  <message key="Logout">Uitloggen</message>
-  <message key="View Task Logs">Bekijk taak logs</message>
-
-  <message key="Support">Ondersteuning</message>
-  <message key="System Documentation">Systeem&#160;Documentatie</message>
-  <message key="User Documentation">Gebruikers Documentatie</message>
-  <message key="About Apache Lenya">Over Apache Lenya</message>
-  <message key="Apache Lenya Homepage">Apache Lenya Startpagina</message>
-  <message key="Wijzig met Kupu">
-
-    <xhtml:abbr title="What&#160;You&#160;See&#160;Is&#160;All&#160;You&#160;Get">WYSIWYG</xhtml:abbr>&#160;Editor&#160;(Kupu)
-  </message>
-  <message key="Wijzig met BXE">
-    <xhtml:abbr title="What&#160;You&#160;See&#160;Is&#160;All&#160;You&#160;Get">WYSIWYG</xhtml:abbr>&#160;Editor&#160;(BXE)
-  </message>
-  <message key="Edit with one Form">Broncode&#160;Editor</message>
-  <message key="Edit with Forms">Formulier&#160;Editor</message>
-
-  <message key="Edit Metadata">Wijzig&#160;Metadata</message>
-  <message key="Edit Navigation Title">Wijzig&#160;Navigatie&#160;Titel</message>
-  <message key="Rename URL">Hernoem&#160;URL</message>
-
-  <!-- cms tabs -->
-  <message key="Server Time">Server Tijd</message>
-
-  <message key="Workflow State">Workflow Status</message>
-
-  <!-- Administration tab -->
-  <message key="Administration">Beheer</message>
-  <message key="really-delete?">{0} echt verwijderen?</message>
-  <message key="Do you really want to delete the trash ?">Weet u zeker dat u de prullenbak wilt legen?</message>
-  <message key="delete-object">Verwijder {0}</message>
-
-  <message key="delete-object?">Weet u zeker dat u {0} wilt verwijderen?</message>
-  <message key="Passwd">Wachtwoord</message>
-  <message key="Switch User">Van gebruiker wisselen</message>
-  <message key="Delete Trash">Prullenbak legen</message>
-  <message key="Cocoon and Server Status">Status van Cocoon en de Server</message>
-
-    <!-- Group Administration -->
-
-  <message key="Profile">Profiel</message>
-  <message key="Members">Leden</message>
-  <message key="IP Ranges">IP&#160;Bereiken</message>
-  <message key="Edit Profile">Wijzig Profiel</message>
-  <message key="Edit Members">Wijzig Leden</message>
-  <message key="Group Administration">Groep Beheer</message>
-
-  <message key="Add Group">Groep Toevoegen</message>
-  <message key="Group Data">Groep Gegevens</message>
-
-    <!-- User Administration -->
-  <message key="User Data">Gebruiker&#160;Gegevens</message>
-
-  <message key="CMS User ID">CMS&#160;Gebruiker&#160;ID</message>
-
-  <message key="LDAP ID">LDAP&#160;ID</message>
-  <message key="Confirm password">Bevestig&#160;wachtwoord</message>
-  <message key="Add User">Gebruiker toevoegen</message>
-  <message key="User Administration">Gebruiker Beheer</message>
-  <message key="User Details">Gebruiker Details</message>
-
-  <message key="All Groups">Alle Groepen</message>
-  <message key="User Groups">Gebruiker Groepen</message>
-  <message key="Group Affiliation">Group Toewijzing</message>
-  <message key="Change Password">Verander Wachtwoord</message>
-  <message key="Edit Group Affiliation">Wijzig groep toewijzing</message>
-
-    <!-- User Types -->
-
-  <message key="LDAP User">LDAP Gebruiker</message>
-  <message key="Local User">CMS Gebruiker</message>
-
-    <!-- IP Range Administration -->
-  <message key="IP Range">IP&#160;Bereik</message>
-  <message key="IP Range ID">IP&#160;Bereik&#160;ID</message>
-
-  <message key="Network Address">Netwerk&#160;Adres</message>
-  <message key="Subnet Mask">Subnet&#160;Masker</message>
-  <message key="IP Range Administration">IP&#160;Bereik&#160;Beheer</message>
-  <message key="Add IP Range">IP&#160;Range&#160;Toevoegen</message>
-
-  <message key="IP Range Profile">IP&#160;Bereik&#160;Profiel</message>
-
-  <!-- Site tab (info screens) -->
-  <message key="Available Languages">Beschikbare Talen</message>
-  <message key="This document is not available in this language.">Dit document is niet beschikbaar in deze taal.</message>
-  <message key="Document ID">Document ID</message>
-
-  <message key="Versions">Versies</message>
-  <message key="SSL Encryption">SSL&#160;Encryptie</message>
-  <message key="Rollback to this version">Herstel naar deze versie</message>
-  <message key="AC Archive">AC&#160;Archief</message>
-  <message key="AC Trash">AC&#160;Prullenbak</message>
-
-  <message key="AC Auth">AC&#160;Aut</message>
-  <message key="AC Live">AC&#160;Live</message>
-  <message key="Scheduler">Scheduler</message>
-
-    <!-- Info screen actions-->
-  <message key="New Navigation Title">Nieuwe Navigatie Titel</message>
-
-  <message key="Rename Document">Hernoem Document</message>
-  <message key="New Document ID">Nieuw Document ID</message>
-  <message key="No whitespace, no special characters">Geen witruimte, geen speciale karakters</message>
-      <!-- Scheduler -->
-  <message key="No active jobs">Geen actieve opdrachten.</message>
-  <message key="The job date has expired">De opdracht datum is verlopen.</message>
-
-  <message key="check the log files">controleer de log bestanden</message>
-  <message key="Task">Opdracht</message>
-  <message key="Day">Dag</message>
-  <message key="Time">Tijd</message>
-      <!-- Deactivate and delete -->
-  <message key="docs-have-links-to-doc">De volgende documenten hebben een link naar dit document</message>
-
-  <message key="Deactivate Document">Deactiveer Document</message>
-  <message key="deactivate-doc">Deactiveer document {0}</message>
-  <message key="deactivate-doc?">Wilt u echt het document {0} deactiveren?</message>
-  <message key="Delete Document">Verwijder Document</message>
-  <message key="delete-doc">Verwijder document {0}</message>
-  <message key="cannot-deactivate-unless-children-deactivated">Dit document kan niet worden gedeactiveerd voordat de volgende kind documenten worden gedeactiveerd</message>
-
-  <message key="delete-language-versions?">Wilt u echt all taal versies van het document {0} verwijderen?</message>
-      <!-- Archive document -->
-  <message key="Archive Document">Archiveer Document</message>
-  <message key="archive-doc">Archiveer document {0}</message>
-  <message key="archive-doc?">Wilt u echt het document {0} archiveren?</message>
-      <!-- Rename document -->
-  <message key="Rename Document">Hernoem Document</message>
-
-  <message key="rename-doc">Hernoem document {0}</message>
-      <!-- Copy document -->
-  <message key="Copy Document">Kopieer Document</message>
-  <message key="copy-doc">Kopieer document {0}</message>
-  <message key="copy-doc-to-clip?">Wilt u het document {0} kopieren naar het clipboard? U kan het document later plakken op een lokatie naar keuze.</message>
-      <!-- Paste document -->
-  <message key="Paste Document">Document Plakken</message>
-
-  <message key="paste-doc">Document {0} Plakken</message>
-  <message key="paste-doc-from-clip?">Wilt u het document {0} plakken vanaf het clipboard?</message>
-      <!-- Cut document -->
-  <message key="Cut Document">Document Knippen</message>
-  <message key="cut-doc">Document {0} Knippen</message>
-  <message key="cut-doc-to-clip?">Wilt u het document {0} knippen en verplaatsen naar het clipboard? U kunt het document later plakken op een lokatie naar keuze.</message>
-
-    <!--Change visibility in navigation -->
-  <message key="Change">Aanpassen</message>
-  <message key="Change Document visiblity in navigation">Verander de document zichtbaarheid in de navigatie</message>
-  <message key="Visibility in navigation">Zichtbaarheid in navigatie</message>
-  <message key="visible">zichtbaar</message>
-  <message key="hidden">verborgen</message>
-
-  <!-- Info Asset -->
-  <message key="Insert Image">Afbeelding Toevoegen</message>
-  <message key="Insert Asset">Onderdeel Toevoegen</message>
-  <message key="Asset Upload">Onderdeel Inladen</message>
-  <message key="Insert a new Image">Nieuwe Afbeelding Toevoegen</message>
-  <message key="Upload an Asset">Inladen van een Onderdeel</message>
-
-  <!-- Info workflow  -->
-  <message key="Value">Waarde</message>
-  <message key="Event">Gebeurtenis</message>
-  <message key="Variables">Variabelen</message>
-  <message key="History">Historie</message>
-  <message key="State">Status</message>
-
-  <message key="IP Address">IP Adres</message>
-  <message key="edit">wijzig</message>
-  <message key="submit">aanbieden</message>
-  <message key="reject">wijs af</message>
-  <message key="publish">publiceer</message>
-
-  <!-- Info asset  -->
-
-  <message key="New Asset">New Onderdeel</message>
-
-  <!-- Info RC  -->
-  <message key="Current Version">Huidige Versie</message>
-  <message key="Rollback to this revision">Keer terug naar deze versie</message>
-
-  <!-- Info AC  -->
-  <message key="SSL Encryption">SSL&#160;Encryptie</message>
-
-  <message key="Access Object">Benader&#160;Objekt</message>
-  <message key="visit">bezoek</message>
-  <message key="reviewer">reviewer</message>
-  <message key="editor">auteur</message>
-  <message key="admin">beheer</message>
-  <message key="world">wereld</message>
-
-  <message key="the world">de wereld</message>
-
-  <!-- Scheduler -->
-  <message key="New job">Nieuw&#160;opdracht</message>
-  <message key="Active jobs">Actieve&#160;opdrachten</message>
-  <message key="Publish and Export">Publiseer en&#160;Export</message>
-
-  <message key="doc-has-links-to-unpublished">Dit document heeft links naar de volgende niet gepubliceerde documenten:</message>
-
-  <!-- New Document -->
-  <message key="Please check the following possible causes of the exception">Controleer aub de volgende mogelijke oorzaken van de exceptie.</message>
-  <message key="exception.cause.createdoc.whitespace-in-id">Het is niet toegestaan om witruimte in de id te gebruiken</message>
-  <message key="exception.cause.createdoc.id-in-use">De id is al in gebruik</message>
-  <message key="failmessage.createdoc.invalidformat">Vul aub een valide waarde voor het ID veld in. A-Z, a-z, 0-9 of - zijn valide characters.</message>
-
-  <message key="failmessage.createdoc.required">Aub all verplichte velden (*) invullen.</message>
-
-  <!-- Asset Upload/Insert Dialog -->
-  <message key="lenya.assetupload.subtitle">Voeg toe aan Onderdelen bibliotheek</message>
-  <message key="Asset Library">Onderdelen Bibliotheek</message>
-  <message key="No assets available">Geen Onderdelen beschikbaar</message>
-  <message key="Insert Asset">Onderdeel toevoegen</message>
-
-  <!-- Image Upload/Insert Dialog -->
-  <message key="lenya.imageupload.title">Afbeelding Toevoegen</message>
-  <message key="lenya.imageupload.selectimage.label">Selecteer Afbeelding</message>
-  <message key="lenya.imageupload.info.noimages">Geen afbeeldingen beschikbaar.</message>
-  <message key="lenya.imageupload.links.hint">Externe links moeten beginnen met 'http://', interne links moeten beginnen met '/'</message>
-
-  <!-- Revision Controller -->
-
-  <message key="Reason">Reden</message>
-  <message key="Filename">Bestandsnaam</message>
-  <message key="lenya.rc.nocheckout">Middel kon niet worden uitgechecked</message>
-  <message key="lenya.rc.checkedoutalready">Het middel is in bewerking door een andere gebruiker</message>
-  <message key="lenya.rc.nocheckin">Middel kon niet worden ingechecked</message>
-  <message key="Generic Exception">Algemene Exceptie</message>
-
-  <message key="Check the log files.">Controleer de log bestanden.</message>
-</catalogue>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/i18n/cmsui_ru.xml b/src/webapp/lenya/resources/i18n/cmsui_ru.xml
deleted file mode 100644
index dec078c..0000000
--- a/src/webapp/lenya/resources/i18n/cmsui_ru.xml
+++ /dev/null
@@ -1,365 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>

-<!--

-  Copyright 1999-2004 The Apache Software Foundation

-

-  Licensed 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.

--->

-<!-- $Id: cmsui.xml 125536 2005-01-18 19:04:09Z gregor $ -->

-<catalogue xmlns:xhtml="http://www.w3.org/1999/xhtml" xml:lang="ru">

-<!-- common used words -->

-<message key="Save">Сохранить</message>

-<message key="Submit">Отправить</message>

-<message key="Cancel">Отмена</message>

-<message key="Delete">Удалить</message>

-<message key="NOTE">ЗАМЕТКА</message>

-<message key="No referer">Нет сссылок</message>

-

-<message key="Referer">Ссылка</message>

-<message key="EXCEPTION">ИСКЛЮЧЕНИЕ</message>

-<message key="User">Пользователь</message>

-<message key="Live">Опубликованное</message>

-<message key="Authoring">разработка</message>

-<message key="not">не</message>

-<message key="review">отзыв</message>

-<message key="user">пользователь</message>

-<message key="Users">Пользователи</message>

-

-<message key="group">группа</message>

-<message key="Group">Группа</message>

-<message key="Groups">Группы</message>

-<message key="Group ID">Идентификатор группы</message>

-<message key="Yes">Да</message>

-<message key="No">Нет</message>

-<message key="Description">Описание</message>

-<message key="Name">Имя</message>

-<message key="Full Name">Полное имя</message>

-

-<message key="required fields">обязательные поля</message>

-<message key="Search">Поиск</message>

-<message key="Home">Home</message>

-<message key="Title">Заголовок</message>

-<message key="Last modified">Последнее изменение</message>

-<message key="Overview">Обзор</message>

-<message key="Role">Роль</message>

-<message key="View">Вид</message>

-<message key="Assets">Ресурсы</message>

-

-<message key="true">да</message>

-<message key="false">нет</message>

-<message key="Rename">Переименовать</message>

-<message key="Modify">Изменить</message>

-<message key="Document">Документ</message>

-<message key="Date">Дата</message>

-<message key="Back">Назад</message>

-<message key="Add">Добавить</message>

-<message key="Create">Создать</message>

-

-<message key="The Archive">Архив</message>

-<message key="Trash">Корзина</message>

-<message key="Publisher">Издатель</message>

-<message key="Navigation Title">Навигационный заголовок</message>

-<message key="Creator">Создатель</message>

-<message key="Language">Язык</message>

-<message key="Subject">Тема</message>

-<message key="Rights">Права</message>

-<message key="Select File">Выберите файл</message>

-

-<message key="select-object">Выберите {0}</message>

-<message key="Insert">Вставить</message>

-<message key="Insert File">Вставить файл</message>

-<message key="upload-with-invalid-extension">У загружаемого файла  неправильное расширение. Правильные расширения{0}. Расширение должно быть в нижнем регистре (маленькими буквами).</message>

-<message key="upload-with-missing-title">Загружамый файл без названия.</message>

-<message key="filename-format-exception">У загружаемого файла не указано расширение или его имя содержит недопустимые символы, например, пробелы или умляуты.</message>

-<message key="Creation Date">Дата создания</message>

-<message key="File Size">Размер файла</message>

-

-<message key="Image">Изображение</message>

-<message key="Link">Ссылка</message>

-<message key="Caption">Всплывающая подсказка</message>

-<message key="All rights reserved">Все права защищены.</message>

-<!-- used as tabs names AND states -->

-<message key="live">опубликовано</message>

-<message key="authoring">разработка</message>

-<message key="Site">сайт</message>

-<message key="admin">админ</message>

-

-<!-- state -->

-<message key="not live">неопубликовано</message>

-<!-- submit screen -->

-<message key="submit-for-approval">Отправить {0} на утверждение</message>

-<message key="submit-for-approval?">Хотите отправить {0} на утверждение?</message>

-<!-- publish screen -->

-<message key="Publish">Опубликовать</message>

-<message key="Source File(s)">Исходный файл (или файлы исходные)</message>

-<!-- login screen -->

-<message key="login-to-pub">Войти в {0} публикацию</message>

-<message key="Login">Логин</message>

-

-<message key="Password">Пароль</message>

-<message key="Username">Имя пользователя</message>

-<message key="Authentication failed">Авторизация провалилась</message>

-<message key="try-user-lenya">Попробуйте логин {0} и пароль {1} (редактор), или логин {2} и пароль {3} (обозреватель)</message>

-<!-- logout screen -->

-<message key="logout-from-pub">Выйти из {0} Публикации</message>

-<message key="Your History">Ваша история</message>

-<message key="Login to Authoring Area">Войти в авторскую зону</message>

-<!-- reject screen -->

-<message key="Reject">Отклонить</message>

-

-<message key="reject-doc?">Хотите отклонить документ {0}?</message>

-<!-- cms menu -->

-<message key="New Document">Новый документ</message>

-<message key="New Language Version">Версия на другом языке</message>

-<message key="Remove Language Version">Удалить версию на другом языке</message>

-<message key="File">Файл</message>

-<message key="Edit">Редактировать</message>

-<message key="Workflow">Техпроцесс</message>

-<message key="Deactivate">Отключить</message>

-

-<message key="Schedule">График</message>

-<message key="Copy">Копировать</message>

-<message key="Paste">Вставить</message>

-<message key="Cut">Вырезать</message>

-<message key="Help">Помощь</message>

-<message key="Debug">Отладить</message>

-<message key="Delete">Удалить</message>

-<message key="Archive">Архивировать</message>

-<message key="Restore">Восстановить</message>

-

-<message key="Move Up">Сместить вверх</message>

-<message key="Move Down">Сместить вниз</message>

-<message key="Logout">Выход</message>

-<message key="View Task Logs">Посмотреть журналы задач</message>

-<message key="Support">Техподдержка</message>

-<message key="System Documentation">Системная Документация</message>

-<message key="User Documentation">Пользовательская документация</message>

-<message key="About Apache Lenya">О проекте Apache Lenya</message>

-<message key="Apache Lenya Homepage">Сайт проекта Apache Lenya</message>

-

-<message key="Edit with Kupu">Редактор <xhtml:abbr title="What You See Is What You Get">WYSIWYG</xhtml:abbr> (Kupu)</message>

-<message key="Edit with BXE">Редактор <xhtml:abbr title="What You See Is What You Get">WYSIWYG</xhtml:abbr> (BXE)</message>

-<message key="Edit with one Form">Редактор исходных текстов</message>

-<message key="Edit with Forms">Редактор форм</message>

-<message key="Edit Metadata">Редактировать метаданные</message>

-<message key="Edit Navigation Title">Редактировать навигационный заголовок</message>

-<message key="Rename URL">Переименовать URL</message>

-

-<message key="Change node visibility">Переключить видимость</message>

-<!-- cms tabs -->

-<message key="Server Time">Время на сервере</message>

-<message key="Workflow State">Состояние техпроцесса</message>

-<!-- Administration tab -->

-<message key="Administration">Администрирование</message>

-<message key="really-delete?">Правда удалить {0}?</message>

-<message key="Do you really want to delete the trash ?">Дейсвительно хотите удалить корзину ?</message>

-<message key="delete-object">Удалить {0}</message>

-<message key="delete-object?">Дейсвительно хотите удалить {0}?</message>

-

-<message key="Passwd">Пароль</message>

-<message key="Switch User">Сменить пользователя</message>

-<message key="Delete Trash">Удалить корзину</message>

-<message key="Cocoon and Server Status">Cocoon and Server Status</message>

-<!-- Group Administration -->

-<message key="Profile">Параметры</message>

-<message key="Members">Участники</message>

-<message key="IP Ranges">Диапазоны IP-адресов</message>

-<message key="Edit Profile">Редактировать параметры</message>

-

-<message key="Edit Members">Редактировать членов</message>

-<message key="Group Administration">Администрирование групп</message>

-<message key="Add Group">Добавить группы</message>

-<message key="Group Data">Данные группы</message>

-<!-- User Administration -->

-<message key="User Data">Данные пользователя</message>

-<message key="CMS User ID">Идентификатор пользователя CMS</message>

-<message key="LDAP ID">Идентификатор LDAP</message>

-<message key="Confirm password">Подтвердить пароль</message>

-

-<message key="Add User">Добавить пользователя</message>

-<message key="User Administration">Управление пользователями</message>

-<message key="User Details">Детали пользователя</message>

-<message key="All Groups">Все группы</message>

-<message key="User Groups">Пользовательские группы</message>

-<message key="Group Affiliation">Членство в группе</message>

-<message key="Change Password">Сменить пароль</message>

-<message key="Edit Group Affiliation">Редактировать членство в группе</message>

-<message key="This group already exists.">Такая группа уже существует.</message>

-

-<message key="This is not a valid group ID.">Некорректный идентификатор группы.</message>

-<message key="This user already exists.">Такой пользователь уже существует.</message>

-<message key="This is not a valid user ID.">Некорректный идентификатор CMS пользователя.</message>

-<message key="Please enter an e-mail address.">Введите адрес e-mail.</message>

-<message key="This LDAP user ID does not exist.">Такой пользователь LDAP не существуте.</message>

-<message key="Password and confirmed password are not equal.">Пароль и подтверждение пароля не совпадают.</message>

-<message key="The password must be at least six characters long.">Пароль должен быть как минимум 6 символов.</message>

-<message key="The password must contain at least one number.">Пароль должен содержать как минимум одну цифру.</message>

-<message key="You cannot change the password of this user.">Вы не можете сменить пароль для этого пользователя.</message>

-

-<!-- User Types -->

-<message key="LDAP User">Пользователь LDAP</message>

-<message key="Local User">Локальный пользователь</message>

-<!-- IP Range Administration -->

-<message key="IP Range">Диапазон IP-адресов</message>

-<message key="IP Range ID">Идентификатор диапазона IP-адресов</message>

-<message key="Network Address">Сетевой адрес</message>

-<message key="Subnet Mask">Маска подсети</message>

-<message key="IP Range Administration">Администрирование диапазонов IP-адресов</message>

-

-<message key="Add IP Range">Добавить диапазон IP-адресов</message>

-<message key="IP Range Profile">Настройки диапазона IP-адресов</message>

-<!-- Site tab (info screens) -->

-<message key="Available Languages">Доступные языки</message>

-<message key="This document is not available in this language.">На этом языке документ не доступен.</message>

-<message key="Document ID">Идентификатор документа</message>

-<message key="Versions">Версии</message>

-<message key="SSL Encryption">SSL шифрование</message>

-<message key="Rollback to this version">Откатиться к этой версии</message>

-

-<message key="AC Archive">AC Архива</message>

-<message key="AC Trash">AC Корзины</message>

-<message key="AC Live">AC Просмотра</message>

-<message key="AC Auth">AC Разработки</message>

-<message key="Scheduler">Планировщик</message>

-<!-- Info screen actions-->

-<message key="New Navigation Title">Новый заголовок навигации</message>

-<message key="Rename Document">Переименовать документ</message>

-<message key="New Document ID">Новый идентификатор документа</message>

-

-<message key="No whitespace, no special characters">Без пробелов и спецсимволов</message>

-<!-- Scheduler -->

-<message key="No active jobs">Нет активных заданий.</message>

-<message key="The job date has expired">Задание просрочено.</message>

-<message key="check the log files">проверить файлы журналов</message>

-<message key="Task">Задание</message>

-<message key="Day">День</message>

-<message key="Time">Время</message>

-<!-- Deactivate and delete -->

-<message key="docs-have-links-to-doc">Следующие документы ссылаются на этот документ</message>

-

-<message key="Deactivate Document">Отключить документ</message>

-<message key="deactivate-doc">Отключить документ {0}</message>

-<message key="deactivate-doc?">Вы действительно хотите отключить документ {0}?</message>

-<message key="Delete Document">Удалить документ</message>

-<message key="delete-doc">Удалить документ {0}</message>

-<message key="cannot-deactivate-unless-children-deactivated">Этот документ не может быть отклчен пока следующие дочерние документы не отключены</message>

-<message key="delete-language-versions?">Вы действительно хотите удалить версии документа {0} на всех языках?</message>

-<!-- Archive document -->

-<message key="Archive Document">Архивировать документ</message>

-

-<message key="archive-doc">Архивировать документ {0}</message>

-<message key="archive-doc?">Вы действительно хотите заархивировать документ {0}?</message>

-<!-- Rename document -->

-<message key="Rename Document">Переименовать документ</message>

-<message key="rename-doc">Переименовать документ {0}</message>

-<!-- Copy document -->

-<message key="Copy Document">Копировать документ</message>

-<message key="copy-doc">Копировать документ {0}</message>

-<message key="copy-doc-to-clip?">Хотите скопировать документ {0} В буфер обмена? Скопированный документ можно будет вставить после в выбранное место.</message>

-<!-- Paste document -->

-

-<message key="Paste Document">Вставить документ</message>

-<message key="paste-doc">Вставить документ {0}</message>

-<message key="paste-doc-from-clip?">Хотите вставить документ {0} из буфера обмена?</message>

-<!-- Cut document -->

-<message key="Cut Document">Вырезать документ</message>

-<message key="cut-doc">Вырезать документ {0}</message>

-<message key="cut-doc-to-clip?">Хотите вырезать документ {0} и переместить его в буфер обмена? Вырезанный документ можно будет вставить после в выбранное место.</message>

-<!--Change visibility in navigation -->

-<message key="Change">Изменить</message>

-<message key="Change Document visiblity in navigation">Выберите видимость документа в навигации</message>

-

-<message key="Visibility in navigation">Видимость в навигации</message>

-<message key="visible">видимый</message>

-<message key="hidden">скрытый</message>

-<!-- Info Asset -->

-<message key="Insert Image">Вставить изображение</message>

-<message key="Insert Asset">Вставить ресурс</message>

-<message key="Asset Upload">Загрузка ресурса</message>

-<message key="Insert a new Image">Вставить новое изображение</message>

-<message key="Upload an Asset">Загрузить ресурс</message>

-

-<!-- Info workflow  -->

-<message key="Value">Значение</message>

-<message key="Event">Событие</message>

-<message key="Variables">Переменные</message>

-<message key="History">История</message>

-<message key="State">Состояние</message>

-<message key="IP Address">IP Адрес</message>

-<message key="edit">редактировать</message>

-<message key="submit">отправить</message>

-

-<message key="reject">отклонить</message>

-<message key="publish">опубликовать</message>

-<!-- Info asset  -->

-<message key="New Asset">Новый ресурс</message>

-<!-- Info RC  -->

-<message key="Current Version">Текущая версия</message>

-<message key="Rollback to this revision">Откатиться к этой версии</message>

-<!-- Info AC  -->

-<message key="SSL Encryption">SSL шифрование</message>

-<message key="Access Object">Объект доступа</message>

-

-<message key="visit">посещение</message>

-<message key="reviewer">обозреватель</message>

-<message key="editor">редактор</message>

-<message key="world">world</message>

-<message key="the world">the world</message>

-<!-- Scheduler -->

-<message key="New job">Новое задание</message>

-<message key="Active jobs">Текущие задания</message>

-<message key="Publish and Export">Опубликовать и экспортировать</message>

-

-<message key="doc-has-links-to-unpublished">Документ ссылается на следующие неопубликованные документы:</message>

-<!-- New Document -->

-<message key="Please check the following possible causes of the exception">Провертье следующие причины исключения, пожалуйста.</message>

-<message key="exception.cause.createdoc.whitespace-in-id">Идентификатор не может содержать пробелов</message>

-<message key="exception.cause.createdoc.id-in-use">Идентификатор уже используется</message>

-<message key="failmessage.createdoc.invalidformat">Введите пожалуйста допустимое значение в поле ID. A-Z, a-z, 0-9 или - составляют допустимое значение.</message>

-<message key="failmessage.createdoc.required">Заполните все обязательные (*) поля пожалуйста.</message>

-<!-- Asset Upload/Insert Dialog -->

-<message key="lenya.assetupload.subtitle">Пополнить библиотеку ресурсов</message>

-<message key="Asset Library">Библиотека ресурсов</message>

-

-<message key="No assets available">Нет доступных ресурсов</message>

-<message key="Insert Asset">Вставить ресурс</message>

-<message key="lenya.assetuploa.no.asset.selected">Ресурс не выбран. Выберите что-нибудь.</message>

-<message key="lenya.imageupload.no.image.selected">Изображение не выбрано. Выберите что-нибудь.</message>

-<!-- Image Upload/Insert Dialog -->

-<message key="lenya.imageupload.title">Вставить изображение</message>

-<message key="lenya.imageupload.selectimage.label">Выберите изображение</message>

-<message key="lenya.imageupload.info.noimages">Нет доступных изображений.</message>

-<message key="lenya.imageupload.links.hint">Внешние ссылки должны начинаться с  'http://', а внутренние &#151; с  '/'</message>

-

-<!-- Revision Controller -->

-<message key="Reason">Причина</message>

-<message key="Filename">Файл</message>

-<message key="lenya.rc.nocheckout">Ресурс не может быть извлечён</message>

-<message key="lenya.rc.checkedoutalready">Ресурс был уже излвечён другим пользователем</message>

-<message key="lenya.rc.nocheckin">Реурс не может быть записан</message>

-<message key="Generic Exception">Общее исключение</message>

-<message key="Check the log files.">Проверьте файлы журналов.</message>

-

-<message key="User ID">Идентификатор пользователя</message>

-

-<message key="rename-document">Переименование документа {0}</message>

-<message key="Inherited Rights">Унаследованные права</message>

-<message key="Parent ID">Родительский идентификатор</message>

-<message key="lenya.assetupload.title">Objekt einfügen</message>

-<message key="Add to Asset Library">Добавить в библиотеку ресурсов</message>

-<message key="New document">Nouveau document</message>

-<message key="IP Range Groups">Группы IP-адресов</message>

-<message key="IP Range Overview">Обзор IP-адресов</message>

-<message key="Meta">Мета</message>

-

-<message key="Resource Type">Тип документа</message>

-</catalogue>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/images/delete.gif b/src/webapp/lenya/resources/images/delete.gif
deleted file mode 100644
index d11cf60..0000000
--- a/src/webapp/lenya/resources/images/delete.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/images/editor/add.png b/src/webapp/lenya/resources/images/editor/add.png
deleted file mode 100644
index b2ede20..0000000
--- a/src/webapp/lenya/resources/images/editor/add.png
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/images/editor/delete.png b/src/webapp/lenya/resources/images/editor/delete.png
deleted file mode 100644
index 8b57fd1..0000000
--- a/src/webapp/lenya/resources/images/editor/delete.png
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/images/editor/edit.png b/src/webapp/lenya/resources/images/editor/edit.png
deleted file mode 100644
index c86f3a0..0000000
--- a/src/webapp/lenya/resources/images/editor/edit.png
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/images/insert.gif b/src/webapp/lenya/resources/images/insert.gif
deleted file mode 100644
index 1211990..0000000
--- a/src/webapp/lenya/resources/images/insert.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/images/lenya.ico b/src/webapp/lenya/resources/images/lenya.ico
deleted file mode 100644
index 4ed561a..0000000
--- a/src/webapp/lenya/resources/images/lenya.ico
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/images/project-logo-small.png b/src/webapp/lenya/resources/images/project-logo-small.png
deleted file mode 100644
index 01df427..0000000
--- a/src/webapp/lenya/resources/images/project-logo-small.png
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/images/project-logo.png b/src/webapp/lenya/resources/images/project-logo.png
deleted file mode 100644
index 81d3105..0000000
--- a/src/webapp/lenya/resources/images/project-logo.png
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/images/tree/ftv2blank.gif b/src/webapp/lenya/resources/images/tree/ftv2blank.gif
deleted file mode 100644
index 85df9a3..0000000
--- a/src/webapp/lenya/resources/images/tree/ftv2blank.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/images/tree/ftv2doc.gif b/src/webapp/lenya/resources/images/tree/ftv2doc.gif
deleted file mode 100644
index c59fcc7..0000000
--- a/src/webapp/lenya/resources/images/tree/ftv2doc.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/images/tree/ftv2folderclosed.gif b/src/webapp/lenya/resources/images/tree/ftv2folderclosed.gif
deleted file mode 100644
index 560b0bf..0000000
--- a/src/webapp/lenya/resources/images/tree/ftv2folderclosed.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/images/tree/ftv2folderopen.gif b/src/webapp/lenya/resources/images/tree/ftv2folderopen.gif
deleted file mode 100644
index aa1acd1..0000000
--- a/src/webapp/lenya/resources/images/tree/ftv2folderopen.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/images/tree/ftv2lastnode.gif b/src/webapp/lenya/resources/images/tree/ftv2lastnode.gif
deleted file mode 100644
index b7b3e55..0000000
--- a/src/webapp/lenya/resources/images/tree/ftv2lastnode.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/images/tree/ftv2link.gif b/src/webapp/lenya/resources/images/tree/ftv2link.gif
deleted file mode 100644
index 32d3b9e..0000000
--- a/src/webapp/lenya/resources/images/tree/ftv2link.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/images/tree/ftv2mlastnode.gif b/src/webapp/lenya/resources/images/tree/ftv2mlastnode.gif
deleted file mode 100644
index 11ae43a..0000000
--- a/src/webapp/lenya/resources/images/tree/ftv2mlastnode.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/images/tree/ftv2mnode.gif b/src/webapp/lenya/resources/images/tree/ftv2mnode.gif
deleted file mode 100644
index fcc2d37..0000000
--- a/src/webapp/lenya/resources/images/tree/ftv2mnode.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/images/tree/ftv2node.gif b/src/webapp/lenya/resources/images/tree/ftv2node.gif
deleted file mode 100644
index 40167db..0000000
--- a/src/webapp/lenya/resources/images/tree/ftv2node.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/images/tree/ftv2plastnode.gif b/src/webapp/lenya/resources/images/tree/ftv2plastnode.gif
deleted file mode 100644
index b87f003..0000000
--- a/src/webapp/lenya/resources/images/tree/ftv2plastnode.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/images/tree/ftv2pnode.gif b/src/webapp/lenya/resources/images/tree/ftv2pnode.gif
deleted file mode 100644
index 5b68013..0000000
--- a/src/webapp/lenya/resources/images/tree/ftv2pnode.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/images/tree/ftv2vertline.gif b/src/webapp/lenya/resources/images/tree/ftv2vertline.gif
deleted file mode 100644
index 63ee93a..0000000
--- a/src/webapp/lenya/resources/images/tree/ftv2vertline.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/images/util/pixel.gif b/src/webapp/lenya/resources/images/util/pixel.gif
deleted file mode 100644
index 8f09684..0000000
--- a/src/webapp/lenya/resources/images/util/pixel.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/images/util/uploadasset.gif b/src/webapp/lenya/resources/images/util/uploadasset.gif
deleted file mode 100644
index f32855c..0000000
--- a/src/webapp/lenya/resources/images/util/uploadasset.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/images/util/uploadimage.gif b/src/webapp/lenya/resources/images/util/uploadimage.gif
deleted file mode 100644
index 0a89e64..0000000
--- a/src/webapp/lenya/resources/images/util/uploadimage.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/javascript/asset.js b/src/webapp/lenya/resources/javascript/asset.js
deleted file mode 100644
index 2b0639d..0000000
--- a/src/webapp/lenya/resources/javascript/asset.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-* Copyright 1999-2004 The Apache Software Foundation
-*
-* Licensed 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.
-*/
-
-/* $Id$ */
-
-/* Show a preview of an image to be uploaded */
-function imagepreview(obj) {
-   prev = document.getElementById('preview');
-   prev.style.visibility = 'hidden';
-   var i = 0;
-   var delimiter = ' '; 
-   var imageext = 'gif jpg jpeg png';
-   var isimage = false;
-   var _tempArray = new Array();
-   _tempArray = imageext.split(delimiter);
-   for(i in _tempArray) { 
-     if(obj.value.indexOf('.' + _tempArray[i]) != -1) { // file is an image. 
-       isimage = true; 
-     } 
-   } 
-   if (isimage) { 
-     prev.setAttribute('src','file://' + obj.value);
-     prev.style.visibility = 'visible';
-   }
-}
-            
diff --git a/src/webapp/lenya/resources/javascript/javascript.xsl b/src/webapp/lenya/resources/javascript/javascript.xsl
deleted file mode 100644
index 5b7f841..0000000
--- a/src/webapp/lenya/resources/javascript/javascript.xsl
+++ /dev/null
@@ -1,8 +0,0 @@
-<xsl:stylesheet version="1.0"

-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

-  

-<xsl:template match="script">

-  <xsl:apply-templates/>

-</xsl:template>

-  

-</xsl:stylesheet>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/javascript/tree.js b/src/webapp/lenya/resources/javascript/tree.js
deleted file mode 100644
index 8bc08c8..0000000
--- a/src/webapp/lenya/resources/javascript/tree.js
+++ /dev/null
@@ -1,1520 +0,0 @@
-/*
-* Copyright 1999-2004 The Apache Software Foundation
-*
-* Licensed 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.
-*/
-// $Id$
-//**************************************************************** 
-// TreeView by Marcelino Martins http://www.treeview.net
-//**************************************************************** 
- 
-// Definition of class Folder 
-// ***************************************************************** 
-function Folder(folderDescription, hreference) //constructor 
-{ 
-  //constant data 
-  ICONPATH = CONTEXT_PREFIX + '/lenya/images/tree/';
-  this.desc = folderDescription; 
-  this.hreference = hreference;
-  this.area = "";
-  this.documentid = "";
-  this.id = -1;
-  this.navObj = 0;
-  this.iconImg = 0; 
-  this.nodeImg = 0;
-  this.isLastNode = 0;
-  this.iconSrc = ICONPATH + "ftv2folderopen.gif";
-  this.iconSrcClosed = ICONPATH + "ftv2folderclosed.gif";
-  this.children = new Array;
-  this.nChildren = 0;
-  this.level = 0;
-  this.leftSideCoded = "";
-  this.isLastNode=false;
-  this.parentObj = null;
-  this.maySelect=true;
-  this.prependHTML = "";
- 
-  //dynamic data 
-  this.isOpen = false
-  this.isLastOpenedFolder = false
-  this.isRendered = 0
-  this.isLoaded = false
- 
-  //methods 
-  this.initialize = initializeFolder 
-  this.reinitialize = reinitializeFolder 
-  this.setState = setStateFolder 
-  this.addChild = addChild 
-  this.createIndex = createEntryIndex 
-  this.escondeBlock = escondeBlock
-  this.esconde = escondeFolder 
-  this.folderMstr = folderMstr 
-  this.renderOb = drawFolder 
-  this.totalHeight = totalHeight 
-  this.subEntries = folderSubEntries 
-  this.linkHTML = linkFolderHTML
-  this.blockStartHTML = blockStartHTML
-  this.blockEndHTML = blockEndHTML
-  this.nodeImageSrc = nodeImageSrc
-  this.iconImageSrc = iconImageSrc
-  this.getID = getID
-  this.forceOpeningOfAncestorFolders = forceOpeningOfAncestorFolders
-} 
- 
-function initializeFolder(level, lastNode, leftSide) 
-{ 
-  var j=0 
-  var i=0       
-  nc = this.nChildren 
-   
-  this.createIndex() 
-  this.level = level
-  this.leftSideCoded = leftSide
-
-  if (browserVersion == 0 || STARTALLOPEN==1)
-    this.isOpen=true;
-
-  if (level>0)
-    if (lastNode) //the last child in the children array 
-    leftSide = leftSide + "0"
-  else
-    leftSide = leftSide + "1"
-
-  this.isLastNode = lastNode
- 
-  if (nc > 0) 
-  { 
-    level = level + 1 
-    for (i=0 ; i < this.nChildren; i++)  
-    { 
-      if (i == this.nChildren-1) 
-        this.children[i].initialize(level, 1, leftSide)
-      else 
-        this.children[i].initialize(level, 0, leftSide)
-    } 
-  } 
-} 
-
-// call this after ading new children
-function reinitializeFolder() 
-{ 
-  var i=0;       
-  var nc = this.nChildren 
-  var leftSide;
-   
-  if (this.level>0) {
-    if (this.isLastNode) { //the last child in the children array 
-      leftSide = this.leftSideCoded + "0"
-    } else {
-      leftSide = this.leftSideCoded + "1"
-    }
-  }
-
-  if (nc > 0) 
-  { 
-    var level = this.level + 1 
-    for (i=0 ; i < nc; i++)  
-    { 
-      if (i == nc-1) 
-        this.children[i].initialize(level, 1, leftSide)
-      else 
-        this.children[i].initialize(level, 0, leftSide)
-    } 
-  } 
-} 
- 
-function setAreaTabs(url) 
-{
-   // rewrite the links of the language tabs when a node is clicked
-   var authoringTab = getElById('authoring-tab');
-   var liveTab = getElById('live-tab');
-
-   // make sure the area tabs are there (they are not in the link popup, for instance)
-   if (authoringTab != null && liveTab != null) {
-     area = url.substring(url.indexOf('lenya.area=')+11, url.length);
-     urlhead = url.substring(0, url.indexOf(area)); // strip usecase   
-     urltail = url.substring(url.indexOf(area)+area.length, url.indexOf('?')); // strip usecase
-     authoringTab.href = urlhead +'authoring'+ urltail;
-     liveTab.href = urlhead +'live'+ urltail;
-  }
-}
-
-
-function drawFolder(insertAtObj) 
-{ 
-  var nodeName = ""
-  var auxEv = ""
-  var docW = ""
-
-  var leftSide = leftSideHTML(this.leftSideCoded)
-
-  if (browserVersion > 0) 
-    auxEv = "<a href='javascript:clickOnNode(\""+this.getID()+"\")'>" 
-  else 
-    auxEv = "<a>" 
-
-  nodeName = this.nodeImageSrc()
- 
-  if (this.level>0) 
-    if (this.isLastNode) //the last child in the children array 
-      leftSide = leftSide + "<td valign=top>" + auxEv + "<img name='nodeIcon" + this.id + "' id='nodeIcon" + this.id + "' src='" + nodeName + "' width=16 height=22 border=0></a></td>"
-    else 
-      leftSide = leftSide + "<td valign=top background=" + ICONPATH + "ftv2vertline.gif>" + auxEv + "<img name='nodeIcon" + this.id + "' id='nodeIcon" + this.id + "' src='" + nodeName + "' width=16 height=22 border=0></a></td>"
-
-  this.isRendered = 1
-
-  if (browserVersion == 2) { 
-    if (!doc.yPos) 
-      doc.yPos=20 
-  } 
-
-  docW = this.blockStartHTML("folder");
-
-  docW = docW + "<tr>" + leftSide + "<td valign=top>";
-  if (USEICONS)
-  {
-    docW = docW + this.linkHTML(false) 
-    docW = docW + "<img id='folderIcon" + this.id + "' name='folderIcon" + this.id + "' src='" + this.iconImageSrc() + "' border=0></a>"
-  }
-  else
-  {
-    if (this.prependHTML == "")
-        docW = docW + "<img src=" + ICONPATH + "ftv2blank.gif height=2 width=2>"
-  }
-  if (WRAPTEXT)
-    docW = docW + "</td>"+this.prependHTML+"<td valign=middle width=100%>"
-  else
-    docW = docW + "</td>"+this.prependHTML+"<td valign=middle nowrap width=100%>"
-  if (USETEXTLINKS) 
-  { 
-    docW = docW + this.linkHTML(true) 
-    docW = docW + this.desc;
-    if (this.hreference) {
-      docW = docW + "</a>"
-    }
-  } 
-  else 
-    docW = docW + this.desc
-  docW = docW + "</td>"
-
-  docW = docW + this.blockEndHTML()
-
-  if (insertAtObj == null)
-  {
-    if (supportsDeferral) {
-      doc.write("<div id=domRoot></div>") //transition between regular flow HTML, and node-insert DOM DHTML
-      insertAtObj = getElById("domRoot")
-      insertAtObj.insertAdjacentHTML("beforeEnd", docW)
-    }
-    else
-      doc.write(docW)
-  }
-  else
-  {
-      insertAtObj.insertAdjacentHTML("afterEnd", docW)
-  }
- 
-  if (browserVersion == 2) 
-  { 
-    this.navObj = doc.layers["folder"+this.id] 
-    if (USEICONS)
-      this.iconImg = this.navObj.document.images["folderIcon"+this.id] 
-    this.nodeImg = this.navObj.document.images["nodeIcon"+this.id] 
-    doc.yPos=doc.yPos+this.navObj.clip.height 
-  } 
-  else if (browserVersion != 0)
-  { 
-    this.navObj = getElById("folder"+this.id)
-    if (USEICONS)
-      this.iconImg = getElById("folderIcon"+this.id) 
-    this.nodeImg = getElById("nodeIcon"+this.id)
-  } 
-} 
- 
-function setStateFolder(isOpen) 
-{ 
-  var subEntries 
-  var totalHeight 
-  var fIt = 0 
-  var i=0 
-  var currentOpen
- 
-  if (isOpen == this.isOpen) 
-    return 
- 
-  if (browserVersion == 2)  
-  { 
-    totalHeight = 0 
-    for (i=0; i < this.nChildren; i++) 
-      totalHeight = totalHeight + this.children[i].navObj.clip.height 
-      subEntries = this.subEntries() 
-    if (this.isOpen) 
-      totalHeight = 0 - totalHeight 
-    for (fIt = this.id + subEntries + 1; fIt < nEntries; fIt++) 
-      indexOfEntries[fIt].navObj.moveBy(0, totalHeight) 
-  }  
-  this.isOpen = isOpen;
-
-  if (this.getID()!=foldersTree.getID() && PRESERVESTATE && !this.isOpen) //closing
-  {
-     currentOpen = GetCookie("clickedFolder")
-     if (currentOpen != null) {
-         currentOpen = currentOpen.replace(this.getID()+cookieCutter, "")
-         SetCookie("clickedFolder", currentOpen)
-     }
-  }
-  
-  if (!this.isOpen && this.isLastOpenedfolder)
-  {
-    lastOpenedFolder = null;
-    this.isLastOpenedfolder = false;
-  }
-  propagateChangesInState(this) 
-} 
- 
-function propagateChangesInState(folder) 
-{   
-  var i=0 
-
-  //Change icon
-  if (folder.nChildren > 0 && folder.level>0)  //otherwise the one given at render stays
-    folder.nodeImg.src = folder.nodeImageSrc()
-
-  //Change node
-  if (USEICONS)
-    folder.iconImg.src = folder.iconImageSrc()
-
-  //Propagate changes
-  for (i=folder.nChildren-1; i>=0; i--) 
-    if (folder.isOpen) 
-      folder.children[i].folderMstr(folder.navObj)
-    else 
-      folder.children[i].esconde() 
-} 
- 
-function escondeFolder() 
-{ 
-  this.escondeBlock()
-   
-  this.setState(0) 
-} 
- 
-function linkFolderHTML(isTextLink) 
-{ 
-  var docW = "";
-
-  if (this.hreference) 
-  { 
-  if (USEFRAMES)
-    docW = docW + '<a href="' + this.hreference + '" TARGET="basefrm" '
-  else
-    docW = docW + '<a href="' + this.hreference + '" TARGET="_self" '
-        
-    if (isTextLink) {
-        docW += 'id="itemTextLink'+this.id+'" ';
-    }
-
-    if (browserVersion > 0) 
-      docW = docW + 'onClick="javascript:clickOnFolder(\''+this.getID()+'\')"'
-
-    docW = docW + '>'
-  } 
-  else {
-//    docW = docW + "<a>" 
-  }
-
-  return docW;
-} 
- 
-function addChild(childNode) 
-{ 
-  this.children[this.nChildren] = childNode 
-  childNode.parentObj = this
-  this.nChildren++ 
-  return childNode 
-} 
- 
-function folderSubEntries() 
-{ 
-  var i = 0 
-  var se = this.nChildren 
- 
-  for (i=0; i < this.nChildren; i++){ 
-    if (this.children[i].children) //is a folder 
-      se = se + this.children[i].subEntries() 
-  } 
- 
-  return se 
-} 
-
-function nodeImageSrc() {
-  var srcStr = "";
-
-  if (this.isLastNode) //the last child in the children array 
-  { 
-    if (this.isLoaded && this.nChildren == 0)
-      srcStr = ICONPATH + "ftv2lastnode.gif"
-    else
-      if (this.isOpen)
-        srcStr = ICONPATH + "ftv2mlastnode.gif"  
-      else
-        srcStr = ICONPATH + "ftv2plastnode.gif"  
-  } 
-  else 
-  { 
-    if (this.isLoaded && this.nChildren == 0)
-      srcStr = ICONPATH + "ftv2node.gif"
-    else
-      if (this.isOpen)
-        srcStr = ICONPATH + "ftv2mnode.gif"
-      else
-        srcStr = ICONPATH + "ftv2pnode.gif"
-  }   
-  return srcStr;
-}
-
-function iconImageSrc() {
-  if (this.isOpen)
-    return(this.iconSrc)
-  else
-    return(this.iconSrcClosed)
-} 
-
-// Definition of class Item (a document or link inside a Folder) 
-// ************************************************************* 
- 
-function Item(itemDescription, itemLink, target) // Constructor 
-{ 
-  // constant data 
-  this.desc = itemDescription 
-  this.link = itemLink    
-  this.area = ""
-  this.documentid = ""
-  this.id = -1 //initialized in initalize() 
-  this.navObj = 0 //initialized in render() 
-  this.iconImg = 0 //initialized in render() 
-  this.iconSrc = ICONPATH + "ftv2doc.gif" 
-  this.isRendered = 0
-  this.isLastNode = false
-  this.level = 0
-  this.leftSideCoded = ""
-  this.nChildren = 0
-  this.target = target
-  this.parentObj = null
-  this.maySelect=true
-  this.prependHTML = ""
- 
-  // methods 
-  this.initialize = initializeItem 
-  this.createIndex = createEntryIndex 
-  this.escondeBlock = escondeBlock
-  this.esconde = escondeBlock
-  this.folderMstr = folderMstr 
-  this.renderOb = drawItem 
-  this.totalHeight = totalHeight 
-  this.blockStartHTML = blockStartHTML
-  this.blockEndHTML = blockEndHTML
-  this.getID = getID
-  this.forceOpeningOfAncestorFolders = forceOpeningOfAncestorFolders
-} 
- 
-function initializeItem(level, lastNode, leftSide) 
-{  
-  this.createIndex() 
-  this.level = level
-  this.leftSideCoded = leftSide
-  this.isLastNode = lastNode
-} 
-
-function escapeQuotes(s)
-{
-  return s.replace(/\'/g, '\\\'');
-}
-
-function drawItem(insertAtObj) 
-{ 
-  var leftSide = leftSideHTML(this.leftSideCoded)
-  var docW = ""
-
-  var fullLink = "href=\""+this.link+"\" target=\""+this.target+"\" onClick=\"clickOnLink('"+this.getID()+"\', '"+escapeQuotes(this.link)+"','"+this.target+"');return false;\"";
-  this.isRendered = 1
-
-  if (this.level>0) 
-    if (this.isLastNode) //the last 'brother' in the children array 
-    { 
-      leftSide = leftSide + "<td valign=top><img src='" + ICONPATH + "ftv2lastnode.gif' width=16 height=22></td>"
-    } 
-    else 
-    { 
-      leftSide = leftSide + "<td valign=top background=" + ICONPATH + "ftv2vertline.gif><img src='" + ICONPATH + "ftv2node.gif' width=16 height=22></td>"
-    } 
-
-  docW = docW + this.blockStartHTML("item")
-
-  docW = docW + "<tr>" + leftSide + "<td valign=top>"
-  if (USEICONS && this.link != "undefined") {
-      docW = docW + "<a " + fullLink  + " id=\"itemIconLink"+this.id+"\">" + "<img id='itemIcon"+this.id+"' " + "src='"+this.iconSrc+"' border=0>" + "</a>"
-  }
-  else
-    if (this.prependHTML == "")
-        docW = docW + "<img src=" + ICONPATH + "ftv2blank.gif height=2 width=3>"
-
-  if (WRAPTEXT)
-    docW = docW + "</td>"+this.prependHTML+"<td valign=middle width=100%>"
-  else
-    docW = docW + "</td>"+this.prependHTML+"<td valign=middle nowrap width=100%>"
-
-  if (USETEXTLINKS && this.link != "undefined") 
-    docW = docW + "<a " + fullLink + " id=\"itemTextLink"+this.id+"\">" + this.desc + "</a>"
-  else 
-    docW = docW + this.desc
-
-  docW = docW + "</td>"
-
-  docW = docW + this.blockEndHTML()
- 
-  if (insertAtObj == null)
-  {
-    doc.write(docW)
-  }
-  else
-  {
-      insertAtObj.insertAdjacentHTML("afterEnd", docW)
-  }
-
-  if (browserVersion == 2) { 
-    this.navObj = doc.layers["item"+this.id] 
-    if (USEICONS)
-      this.iconImg = this.navObj.document.images["itemIcon"+this.id] 
-    doc.yPos=doc.yPos+this.navObj.clip.height 
-  } else if (browserVersion != 0) { 
-    this.navObj = getElById("item"+this.id)
-    if (USEICONS)
-      this.iconImg = getElById("itemIcon"+this.id)
-  } 
-} 
- 
- 
-// Methods common to both objects (pseudo-inheritance) 
-// ******************************************************** 
- 
-function forceOpeningOfAncestorFolders() {
-  if (this.parentObj == null || this.parentObj.isOpen)
-    return
-  else {
-    this.parentObj.forceOpeningOfAncestorFolders()
-    clickOnNodeObj(this.parentObj)
-  }
-}
-
-function escondeBlock() 
-{ 
-  if (this.navObj.style==null || typeof this.navObj.style.display == 'undefined') return;
-  
-  if (browserVersion == 1 || browserVersion == 3) { 
-    if (this.navObj.style.display == "none") 
-      return 
-    this.navObj.style.display = "none" 
-  } else { 
-    if (this.navObj.visibility == "hiden") 
-      return 
-    this.navObj.visibility = "hiden" 
-  }     
-} 
- 
-function folderMstr(domObj) 
-{ 
-  if (browserVersion == 1 || browserVersion == 3) { 
-    if (t==-1)
-      return
-    var str = new String(doc.links[t])
-    if (str.slice(14,16) != "em")
-      return
-  }
-
-  if (!this.isRendered)
-     this.renderOb(domObj)
-  else
-    if (browserVersion == 1 || browserVersion == 3) 
-      this.navObj.style.display = "block" 
-    else 
-      this.navObj.visibility = "show" 
-} 
-
-function blockStartHTML(idprefix) {
-  var idParam = "id='" + idprefix + this.id + "'"
-  var docW = ""
-
-  if (browserVersion == 2) 
-    docW = "<layer "+ idParam + " top=" + doc.yPos + " visibility=show>"
-  else if (browserVersion != 0)
-    docW = "<div " + idParam + " style='display:block; position:block;'>"
-     
-  docW = docW + "<table border=0 cellspacing=0 cellpadding=0 width=100% >"
-
-  return docW
-}
-
-function blockEndHTML() {
-  var docW = ""
-
-  docW = "</table>"
-   
-  if (browserVersion == 2) 
-    docW = docW + "</layer>"
-  else if (browserVersion != 0)
-    docW = docW + "</div>"
-
-  return docW
-}
- 
-function createEntryIndex() 
-{ 
-  this.id = nEntries 
-  indexOfEntries[nEntries] = this 
-  nEntries++ 
-} 
- 
-// total height of subEntries open 
-function totalHeight() //used with browserVersion == 2 
-{ 
-  var h = this.navObj.clip.height 
-  var i = 0 
-   
-  if (this.isOpen) //is a folder and _is_ open 
-    for (i=0 ; i < this.nChildren; i++)  
-      h = h + this.children[i].totalHeight() 
- 
-  return h 
-} 
-
-
-function leftSideHTML(leftSideCoded) {
-  var i;
-  var retStr = "";
-
-  for (i=0; i<leftSideCoded.length; i++)
-  {
-    if (leftSideCoded.charAt(i) == "1")
-    {
-      retStr = retStr + "<td valign=top background=" + ICONPATH + "ftv2vertline.gif><img src='" + ICONPATH + "ftv2vertline.gif' width=16 height=22></td>"
-    }
-    if (leftSideCoded.charAt(i) == "0")
-    {
-      retStr = retStr + "<td valign=top><img src='" + ICONPATH + "ftv2blank.gif' width=16 height=22></td>"
-    }
-  }
-  return retStr
-}
-
-function getID()
-{
-  //define a .xID in all nodes (folders and items) if you want to PERVESTATE that
-  //work when the tree changes. The value eXternal value must be unique for each
-  //node and must node change when other nodes are added or removed
-  //The value may be numeric or string, but cannot have the same char used in cookieCutter
-  if (typeof this.xID != "undefined") 
-    return this.xID
-  else
-    return this.id
-}
-
- 
-// Events 
-// ********************************************************* 
- 
-function clickOnFolder(folderId) 
-{ 
-    var clicked = findObj(folderId)
-
-    if (!clicked.isOpen) {
-      clickOnNodeObj(clicked) 
-    }
-
-    if (lastOpenedFolder != null && lastOpenedFolder != folderId)
-      clickOnNode(lastOpenedFolder); //sets lastOpenedFolder to null
-
-    if (clicked.nChildren==0) {
-      lastOpenedFolder = folderId;
-      clicked.isLastOpenedfolder = true
-    }
-
-    if (isLinked(clicked.hreference)) {
-        highlightObjLink(clicked);
-        setAreaTabs(clicked.hreference);
-    }
-} 
- 
-function clickOnNode(folderId) 
-{
-  folderObj = findObj(folderId);
-  if (INCREMENTAL_LOADING && folderObj.id!=foldersTree.id && !folderObj.isLoaded) {
-    loadSubTree(folderObj);
-    folderObj.isLoaded = true;
-  }
-
-  clickOnNodeObj(folderObj)  
-}
-
-function clickOnNodeObj(folderObj) 
-{ 
-  var state = 0 
-  var currentOpen
-  
-  state = folderObj.isOpen;
-  if (folderObj.isLoaded || !INCREMENTAL_LOADING) {
-    folderObj.setState(!state); //open<->close
-  }
-
-  if (folderObj.id!=foldersTree.id && PRESERVESTATE)
-  {
-    currentOpen = GetCookie("clickedFolder")
-    if (currentOpen == null)
-      currentOpen = ""
-
-    if (!folderObj.isOpen) //closing
-    {
-      currentOpen = currentOpen.replace(folderObj.getID()+cookieCutter, "")
-      SetCookie("clickedFolder", currentOpen)
-    }
-    else
-      SetCookie("clickedFolder", currentOpen+folderObj.getID()+cookieCutter)
-  }
-}
-
-function clickOnLink(clickedId, target, windowName) {
-    clickedObj = findObj(clickedId);
-    highlightObjLink(clickedObj);
-    if (isLinked(target)) {
-        window.open(target,windowName);
-        setAreaTabs(target);
-    }
-    if (typeof clickedObj.setState != 'undefined') {
-      clickedObj.setState(true); // open the clicked folder
-    }
-}
-
-function ld  ()
-{
-  return document.links.length-1
-}
- 
-
-
-
-
-// Dynamic Loading Functions 
-// *************************
-
-
-function loadInitialTree(area, documentid)
-{
-  var url = CONTEXT_PREFIX + '/' + PUBLICATION_ID + PIPELINE_PATH + '?area='+area+'&documentid='+documentid+'&language='+CHOSEN_LANGUAGE+'&initial=true&areas='+ALL_AREAS;  
-  var xml = loadSitetreeFragment(url);
-  if (xml!=null) initialTreeLoaded(xml);
-}
-
-function loadSubTree(clicked) 
-{
-  area = clicked.area;
-  documentid = clicked.documentid;  
-  
-  var url = CONTEXT_PREFIX + '/' + PUBLICATION_ID + PIPELINE_PATH + '?area='+area+'&documentid='+documentid+'&language='+CHOSEN_LANGUAGE+'&areas='+ALL_AREAS;
-
-  var xml = loadSitetreeFragment(url);
-  if (xml!=null) subTreeLoaded(xml, clicked, area);
-}
-  
-function loadSitetreeFragment(url)
-{
-  if (xmlhttp==null) createXMLHttp();
-  
-  // alert('load subtree for '+url);
-  // do synchronous loading 
-  // (maybe should be changed to async loading to avoid stall if something goes wrong)
-  // (i've had problems with async on mozilla, maybe should use the onload thing?) 
-  xmlhttp.open("GET",url,false);  
-  /* xmlhttp.onreadystatechange=function() {
-    if (xmlhttp.readyState==4) {
-      alert('response: '+xmlhttp.responseText);
-      //subTreeLoaded(xmlhttp.responseXML, clicked);
-    }
-  } */
-  xmlhttp.setRequestHeader('Accept','text/xml');
-  xmlhttp.send(null);
-  
-  var xml = xmlhttp.responseXML;
-  if( xml == null || xml.documentElement == null) {
-    alert('Error: could not load sitetree xml');
-    return null;
-  } 
-  return xml;
-}
-
-function initialTreeLoaded(xml)
-{
-  var root = xml.documentElement;
-
-  // loop through all tree children
-  var cs = root.childNodes;
-  var l = cs.length;
-  for (var i = 0; i < l; i++) {
-     if (cs[i].tagName == "nav:site") {
-        addLoadedSite(cs[i]);
-     }
-  }
-  foldersTree.isLoaded = true;
-}
-
-function subTreeLoaded(xml, clicked, area)
-{
-  var root = xml.documentElement;
-
-  // loop through all tree children
-  var cs = root.childNodes;
-  var l = cs.length;
-  for (var i = 0; i < l; i++) {
-     if (cs[i].tagName == "nav:node") {
-        addLoadedNode(cs[i], clicked, area);
-     } 
-  }
-  clicked.reinitialize();   
-}
-
-function addLoadedSite(site)
-{
-  var folder = site.getAttribute('folder');
-  var area = site.getAttribute('area');
-  var label = site.getAttribute('label');
-  var langSuffix = '';
-  if (CHOSEN_LANGUAGE!=DEFAULT_LANGUAGE) langSuffix = '_'+CHOSEN_LANGUAGE;
-  
-  label = addProtectedStyle(label, site);
-  label = addLabelStyle(label);
-
-  var newSite;  
-  if (folder=='true') {
-    if (isNodeProtected(site)) {
-      newSite = insFld(foldersTree, gFld(label));
-    } else {
-      newSite = insFld(foldersTree,
-        gFld(label, makeHref(area, langSuffix)));
-    }
-    addNodesRec(site, newSite, area);
-  } else {
-    if (isNodeProtected(site)) {
-      newSite = insDoc(foldersTree, gLnk("S", label));
-    } else {
-      newSite = insDoc(foldersTree,
-        gLnk("S", label, makeHref(area, langSuffix))
-      );
-    }
-  }
-  newSite.area = area;
-  newSite.documentid = "/";
-}
-
-// you can override the makeHref function to create your own links
-// useful e.g. for link lookup in xopus or bxe.
-var makeHref = function makeDefaultHref(area, link)
-{
-  return CONTEXT_PREFIX+'/'+PUBLICATION_ID+"/"+area+"/"+link+"?lenya.usecase=tab.overview"; 
-}
-
-function addNodesRec(parentNode, parentFolder, area)
-{
-    var cs = parentNode.childNodes;
-    var l = cs.length;
-    for (var i = 0; i < l; i++) {
-       if (cs[i].tagName == "nav:node") {
-          parentFolder.isLoaded = true;
-          loadedNode = addLoadedNode(cs[i], parentFolder, area);
-          if (cs[i].getAttribute('folder')=='true') addNodesRec(cs[i], loadedNode, area); 
-       } 
-    }
-}
-
-function addLoadedNode(item, parent, area)
-{
-  var folder = item.getAttribute('folder');
-  if (folder=='true') return addLoadedFolder(item, parent, area);
-  else return addLoadedDoc(item, parent, area);
-}
-
-function addLoadedDoc(doc, parent, area)
-{
-  var href = doc.getAttribute('href');
-  var label = getLabel(doc);
-    
-  label = addNoLanguageStyle(label, doc);
-  label = addCutStyle(label, doc);
-  label = addProtectedStyle(label, doc);
-  label = addLabelStyle(label);
-  
-  var newDoc;
-  if (isNodeProtected(doc)) {
-    newDoc = insDoc(parent,
-      gLnk("S", label)
-    );
-  } else {
-    newDoc = insDoc(parent,
-      gLnk("S", label, makeHref(area, href))
-    );
-  }
-  newDoc.area = area;
-  newDoc.documentid = "/" + doc.getAttribute('basic-url');
-  return newDoc;
-
-}
-
-function addLoadedFolder(folder, parent, area)
-{
-  var href = folder.getAttribute('href');
-  var label = getLabel(folder);
-    
-  label = addNoLanguageStyle(label, folder);
-  label = addCutStyle(label, folder);
-  label = addProtectedStyle(label, folder);
-  label = addLabelStyle(label);
-  
-  var newFolder;
-  if (isNodeProtected(folder)) {  
-    newFolder = insFld(parent,
-     gFld(label)
-    );
-  } else {
-    newFolder = insFld(parent,
-     gFld(label, makeHref(area, href))
-    );
-  }
-  newFolder.area = area;
-  newFolder.documentid = "/" + folder.getAttribute('basic-url');
-  return newFolder;
-}
-
-function getLabel(node) 
-{
-    var cs = node.childNodes;
-    var l = cs.length;
-    for (var i = 0; i < l; i++) {
-       if (cs[i].tagName=='nav:label' && cs[i].getAttribute('xml:lang')==CHOSEN_LANGUAGE) {
-          return cs[i].firstChild.nodeValue;
-       } 
-    }
-    // if chosen language not found, try default language:
-    for (var i = 0; i < l; i++) {
-       if (cs[i].tagName=='nav:label' && cs[i].getAttribute('xml:lang')==DEFAULT_LANGUAGE) {
-          return cs[i].firstChild.nodeValue;
-       } 
-    }
-    // if default language not found either, try any language:
-    for (var i = 0; i < l; i++) {
-       if (cs[i].tagName=='nav:label') {
-          return cs[i].firstChild.nodeValue;
-       } 
-    }
-    return '';
-}
-
-function addLabelStyle(label) {
-  return "<span style=\"padding: 0px 5px;\">"+label+"</span>";
-}
-
-function addNoLanguageStyle(label, node)
-{
-  if (!existsChosenLanguage(node)) { // document does not exists in this language
-    return "<span class=\"lenya-info-nolanguage\">" + label + "</span>";
-  }
-  return label;
-}
-
-function addCutStyle(label, node)
-{
-  if (CUT_DOCUMENT_ID=='/'+node.getAttribute('basic-url')) { 
-    return "<span class=\"lenya-info-cut\">[" + label + "]</span>";
-  }
-  return label;
-}
-
-function addProtectedStyle(label, node)
-{
-  if (isNodeProtected(node)) { 
-    return "<span class=\"lenya-info-protected\">[" + label + "]</span>";
-  }
-  return label;
-}
-
-function isNodeProtected(node) 
-{
-  var prot = node.getAttribute('protected');
-  if (prot == 'true') return true;
-  return false;
-}
-
-// check if the node has a label of the chosen language
-function existsChosenLanguage(node) 
-{
-    var cs = node.childNodes;
-    var l = cs.length;
-    for (var i = 0; i < l; i++) {
-       if (cs[i].tagName=='nav:label' && cs[i].getAttribute('xml:lang')==CHOSEN_LANGUAGE) {
-          return true;
-       } 
-    }
-    return false;
-}
-
-
-// Auxiliary Functions 
-// *******************
- 
-function findObj(id)
-{
-  var i=0;
-  var nodeObj;
-  if (typeof foldersTree.xID != "undefined") {
-    nodeObj = indexOfEntries[i];
-    for(i=0;i<nEntries&&indexOfEntries[i].xID!=id;i++) //may need optimization
-      ;
-    id = i
-  }
-  if (id >= nEntries)
-    return null; //example: node removed in DB
-  else
-    return indexOfEntries[id];
-}
-
-function isLinked(hrefText) {
-    var result = true;
-    result = (result && hrefText !=null);
-    result = (result && hrefText != '');
-    result = (result && hrefText.indexOf('undefined') < 0);
-    result = (result && hrefText.indexOf('parent.op') < 0);
-    return result;
-}
-
-// Do highlighting by changing background and foreg. colors of folder or doc text
-function highlightObjLink(nodeObj) {
-  if (!HIGHLIGHT || nodeObj==null || nodeObj.maySelect==false) {//node deleted in DB 
-    return;
-  }
-
-  if (browserVersion == 1 || browserVersion == 3) {
-    var clickedDOMObj = getElById('itemTextLink'+nodeObj.id);
-    if (clickedDOMObj != null) {
-        if (lastClicked != null) {
-            var prevClickedDOMObj = getElById('itemTextLink'+lastClicked.id);
-            if (prevClickedDOMObj) {
-                prevClickedDOMObj.style.color=lastClickedColor;
-                prevClickedDOMObj.style.backgroundColor=lastClickedBgColor;
-            }
-        }
-        
-        lastClickedColor    = clickedDOMObj.style.color;
-        lastClickedBgColor  = clickedDOMObj.style.backgroundColor;
-        clickedDOMObj.style.color=HIGHLIGHT_COLOR;
-        clickedDOMObj.style.backgroundColor=HIGHLIGHT_BG;
-    }
-  }
-  lastClicked = nodeObj;
-  if (PRESERVESTATE)
-    SetCookie('highlightedTreeviewLink', nodeObj.getID());
-}
-
-function gFld(description, hreference) 
-{ 
-  folder = new Folder(description, hreference);
-  return folder;
-} 
- 
-function gLnk(optionFlags, description, linkData) 
-{ 
-  var fullLink = "";
-  var targetFlag = "";
-  var target = "";
-  var protocolFlag = "";
-  var protocol = "";
-
-  if (optionFlags>=0) //is numeric (old style) or empty (error)
-  {
-    return oldGLnk(optionFlags, description, linkData)
-  }
-
-  targetFlag = optionFlags.charAt(0)
-  if (targetFlag=="B")
-    target = "_blank"
-  if (targetFlag=="P")
-    target = "_parent"
-  if (targetFlag=="R")
-    target = "basefrm"
-  if (targetFlag=="S")
-    target = "_self"
-  if (targetFlag=="T")
-    target = "_top"
-
-  if (optionFlags.length > 1) {
-    protocolFlag = optionFlags.charAt(1)
-    if (protocolFlag=="h")
-      protocol = "http://"
-    if (protocolFlag=="s")
-      protocol = "https://"
-    if (protocolFlag=="f")
-      protocol = "ftp://"
-    if (protocolFlag=="m")
-      protocol = "mailto:"
-  }
-
-  fullLink = "'" + protocol + linkData + "' target=" + target
-
-  linkItem = new Item(description, protocol+linkData, target)
-  return linkItem 
-} 
-
-//Function created Aug 1, 2002 for backwards compatibility purposes
-function oldGLnk(target, description, linkData)
-{
-  var fullLink = "";
-  //Backwards compatibility code
-  if (USEFRAMES)
-  {
-    if (target==0) 
-    { 
-    fullLink = "'"+linkData+"' target=\"basefrm\"" 
-    } 
-    else 
-    { 
-    if (target==1) 
-       fullLink = "'http://"+linkData+"' target=_blank" 
-    else 
-       if (target==2)
-        fullLink = "'http://"+linkData+"' target=\"basefrm\"" 
-       else
-        fullLink = linkData+" target=\"_top\"" 
-    } 
-  }
-  else
-  {
-    if (target==0) 
-    { 
-    fullLink = "'"+linkData+"' target=_top" 
-    } 
-    else 
-    { 
-    if (target==1) 
-       fullLink = "'http://"+linkData+"' target=_blank" 
-    else 
-       fullLink = "'http://"+linkData+"' target=_top" 
-    } 
-  }
-
-  linkItem = new Item(description, fullLink)   
-  return linkItem 
-}
- 
-function insFld(parentFolder, childFolder) 
-{ 
-  return parentFolder.addChild(childFolder) 
-} 
- 
-function insDoc(parentFolder, document) 
-{ 
-  return parentFolder.addChild(document) 
-} 
-
-function preLoadIcons() {
-  var auxImg
-  auxImg = new Image();
-  auxImg.src = ICONPATH + "ftv2vertline.gif";
-  auxImg.src = ICONPATH + "ftv2mlastnode.gif";
-  auxImg.src = ICONPATH + "ftv2mnode.gif";
-  auxImg.src = ICONPATH + "ftv2plastnode.gif";
-  auxImg.src = ICONPATH + "ftv2pnode.gif";
-  auxImg.src = ICONPATH + "ftv2blank.gif";
-  auxImg.src = ICONPATH + "ftv2lastnode.gif";
-  auxImg.src = ICONPATH + "ftv2node.gif";
-  auxImg.src = ICONPATH + "ftv2folderclosed.gif";
-  auxImg.src = ICONPATH + "ftv2folderopen.gif";
-  auxImg.src = ICONPATH + "ftv2doc.gif";
-}
-
-//Open some folders for initial layout, if necessary
-function setInitialLayout() {
-  if (browserVersion > 0 && !STARTALLOPEN)
-    clickOnNodeObj(foldersTree);
-  
-  if (!STARTALLOPEN && (browserVersion > 0) && PRESERVESTATE)
-    PersistentFolderOpening();
-}
-
-//Used with NS4 and STARTALLOPEN
-function renderAllTree(nodeObj, parent) {
-  var i=0;
-  nodeObj.renderOb(parent)
-  if (supportsDeferral)
-    for (i=nodeObj.nChildren-1; i>=0; i--) 
-      renderAllTree(nodeObj.children[i], nodeObj.navObj)
-  else
-    for (i=0 ; i < nodeObj.nChildren; i++) 
-      renderAllTree(nodeObj.children[i], null)
-}
-
-function hideWholeTree(nodeObj, hideThisOne, nodeObjMove) {
-  var i=0;
-  var heightContained=0;
-  var childrenMove=nodeObjMove;
-
-  if (hideThisOne)
-    nodeObj.escondeBlock()
-
-  if (browserVersion == 2)
-    nodeObj.navObj.moveBy(0, 0-nodeObjMove)
-
-  for (i=0 ; i < nodeObj.nChildren; i++) {
-    heightContainedInChild = hideWholeTree(nodeObj.children[i], true, childrenMove)
-    if (browserVersion == 2) {
-      heightContained = heightContained + heightContainedInChild + nodeObj.children[i].navObj.clip.height
-      childrenMove = childrenMove + heightContainedInChild
-  }
-  }
-
-  return heightContained;
-}
-
- 
-// Simulating inserAdjacentHTML on NS6
-// Code by thor@jscript.dk
-// ******************************************
-
-if(typeof HTMLElement!="undefined" && !HTMLElement.prototype.insertAdjacentElement){
-  HTMLElement.prototype.insertAdjacentElement = function (where,parsedNode)
-  {
-    switch (where){
-    case 'beforeBegin':
-      this.parentNode.insertBefore(parsedNode,this)
-      break;
-    case 'afterBegin':
-      this.insertBefore(parsedNode,this.firstChild);
-      break;
-    case 'beforeEnd':
-      this.appendChild(parsedNode);
-      break;
-    case 'afterEnd':
-      if (this.nextSibling) 
-        this.parentNode.insertBefore(parsedNode,this.nextSibling);
-      else this.parentNode.appendChild(parsedNode);
-      break;
-    }
-  }
-
-  HTMLElement.prototype.insertAdjacentHTML = function(where,htmlStr)
-  {
-    var r = this.ownerDocument.createRange();
-    r.setStartBefore(this);
-    var parsedHTML = r.createContextualFragment(htmlStr);
-    this.insertAdjacentElement(where,parsedHTML)
-  }
-}
-
-function getElById(idVal) {
-  if (document.getElementById != null)
-    return document.getElementById(idVal)
-  if (document.all != null)
-    return document.all[idVal]
-  
-  alert("Problem getting element by id")
-  return null
-}
-
-
-// Functions for cookies
-// Note: THESE FUNCTIONS ARE OPTIONAL. No cookies are used unless
-// the PRESERVESTATE variable is set to 1 (default 0)
-// The separator currently in use is ^ (chr 94)
-// *********************************************************** 
-
-function PersistentFolderOpening()
-{
-  var stateInCookie;
-  var fldStr=""
-  var fldArr
-  var fldPos=0
-  var id
-  var nodeObj
-  stateInCookie = GetCookie("clickedFolder");
-  SetCookie('clickedFolder', "") //at the end of function it will be back, minus null cases
-
-  if(stateInCookie!=null)
-  {
-    fldArr = stateInCookie.split(cookieCutter)
-    for (fldPos=0; fldPos<fldArr.length; fldPos++)
-    {
-      fldStr=fldArr[fldPos]
-      if (fldStr != "") {
-        nodeObj = findObj(fldStr)
-        if (nodeObj!=null) //may have been deleted
-          if (nodeObj.setState) {
-            nodeObj.forceOpeningOfAncestorFolders()
-            clickOnNodeObj(nodeObj);
-          }
-//          else 
-//            alert("Internal id is not pointing to a folder anymore. Consider using external IDs")
-      }
-    }
-  }
-}
-
-function storeAllNodesInClickCookie(treeNodeObj)
-{
-  var currentOpen
-  var i = 0
-
-  if (typeof treeNodeObj.setState != "undefined") //is folder
-  {
-    currentOpen = GetCookie("clickedFolder")
-    if (currentOpen == null)
-      currentOpen = ""
-
-    if (treeNodeObj.getID() != foldersTree.getID())
-      SetCookie("clickedFolder", currentOpen+treeNodeObj.getID()+cookieCutter)
-
-    for (i=0; i < treeNodeObj.nChildren; i++) 
-        storeAllNodesInClickCookie(treeNodeObj.children[i])
-  }
-}
-
-function CookieBranding(name) {
-  if (typeof foldersTree.treeID != "undefined")
-    return name+foldersTree.treeID //needed for multi-tree sites. make sure treeId does not contain cookieCutter
-  else
-    return name
-}
- 
-function GetCookie(name)
-{  
-  name = CookieBranding(name)
-
-  var arg = name + "=";  
-  var alen = arg.length;  
-  var clen = document.cookie.length;  
-  var i = 0;  
-
-  while (i < clen) {    
-    var j = i + alen;    
-    if (document.cookie.substring(i, j) == arg)      
-      return getCookieVal (j);    
-    i = document.cookie.indexOf(" ", i) + 1;    
-    if (i == 0) break;   
-  }  
-  return null;
-}
-
-function getCookieVal(offset) {  
-  var endstr = document.cookie.indexOf (";", offset);  
-  if (endstr == -1)    
-  endstr = document.cookie.length;  
-  return unescape(document.cookie.substring(offset, endstr));
-}
-
-function SetCookie(name, value) 
-{  
-  var argv = SetCookie.arguments;  
-  var argc = SetCookie.arguments.length;  
-  var expires = (argc > 2) ? argv[2] : null;  
-  //var path = (argc > 3) ? argv[3] : null;  
-  var domain = (argc > 4) ? argv[4] : null;  
-  var secure = (argc > 5) ? argv[5] : false;  
-  var path = "/"; //allows the tree to remain open across pages with diff names & paths
-
-  name = CookieBranding(name)
-
-  document.cookie = name + "=" + escape (value) + 
-  ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
-  ((path == null) ? "" : ("; path=" + path)) +  
-  ((domain == null) ? "" : ("; domain=" + domain)) +    
-  ((secure == true) ? "; secure" : "");
-}
-
-function ExpireCookie (name) 
-{  
-  var exp = new Date();  
-  exp.setTime (exp.getTime() - 1);  
-  var cval = GetCookie (name);  
-  name = CookieBranding(name)
-  document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
-}
-
-
-//To customize the tree, overwrite these variables in the configuration file (demoFramesetNode.js, etc.)
-var USETEXTLINKS = 0 
-var STARTALLOPEN = 0
-var USEFRAMES = 1
-var USEICONS = 1
-var WRAPTEXT = 0
-var PRESERVESTATE = 0
-var ICONPATH = ''
-var HIGHLIGHT = 0
-var HIGHLIGHT_COLOR = 'white';
-var HIGHLIGHT_BG    = 'blue';
-var BUILDALL = 0
-
-
-//Other variables
-var lastClicked = null;
-var lastClickedColor;
-var lastClickedBgColor;
-var indexOfEntries = new Array 
-var nEntries = 0 
-var browserVersion = 0 
-var selectedFolder=0
-var lastOpenedFolder=null
-var t=5
-var doc = document
-var supportsDeferral = false
-var cookieCutter = '^' //You can change this if you need to use ^ in your xID or treeID values
-
-var xmlhttp=null;
-
-doc.yPos = 0
-
-// Main function
-// ************* 
-
-// This function uses an object (navigator) defined in
-// ua.js, imported in the main html page (left frame).
-function initializeDocument(area, documentid) 
-{ 
-  preLoadIcons();
-  switch(navigator.family)
-  {
-    case 'ie4':
-      browserVersion = 1 //Simply means IE > 3.x
-      break;
-    case 'opera':
-      browserVersion = (navigator.version > 6 ? 1 : 0); //opera7 has a good DOM
-      break;
-    case 'nn4':
-      browserVersion = 2 //NS4.x 
-      break;
-    case 'gecko':
-      browserVersion = 3 //NS6.x
-      break;
-    case 'safari':
-      browserVersion = 1 //Safari Beta 3 seems to behave like IE in spite of being based on Konkeror
-      break;
-  default:
-      browserVersion = 0 //other, possibly without DHTML  
-      break;
-  }
-
-  supportsDeferral = ((navigator.family=='ie4' && navigator.version >= 5 && navigator.OS != "mac") || browserVersion == 3);
-  supportsDeferral = supportsDeferral & (!BUILDALL)
-  if (!USEFRAMES && browserVersion == 2)
-    browserVersion = 0;
-  eval(String.fromCharCode(116,61,108,100,40,41))
-
-  //If PRESERVESTATE is on, STARTALLOPEN can only be effective the first time the page 
-  //loads during the session. For subsequent (re)loads the PRESERVESTATE data stored 
-  //in cookies takes over the control of the initial expand/collapse
-  if (PRESERVESTATE && GetCookie("clickedFolder") != null)
-    STARTALLOPEN = 0
-
-  if (INCREMENTAL_LOADING) loadInitialTree(area, documentid);
-  
-  //foldersTree (with the site's data) is created in an external .js (demoFramesetNode.js, for example)
-  foldersTree.initialize(0, true, "") 
-  if (supportsDeferral && !STARTALLOPEN)
-    foldersTree.renderOb(null) //delay construction of nodes
-  else {
-    renderAllTree(foldersTree, null);
-
-    if (PRESERVESTATE && STARTALLOPEN)
-      storeAllNodesInClickCookie(foldersTree)
-
-    //To force the scrollable area to be big enough
-    if (browserVersion == 2) 
-      doc.write("<layer top=" + indexOfEntries[nEntries-1].navObj.top + ">&nbsp;</layer>") 
-
-    if (browserVersion != 0 && !STARTALLOPEN)
-      hideWholeTree(foldersTree, false, 0)
-  }
-
-  setInitialLayout()
-
-  if (PRESERVESTATE && GetCookie('highlightedTreeviewLink')!=null  && GetCookie('highlightedTreeviewLink')!="") {
-    var nodeObj = findObj(GetCookie('highlightedTreeviewLink'))
-    if (nodeObj!=null){
-      nodeObj.forceOpeningOfAncestorFolders()
-      highlightObjLink(nodeObj);
-    }
-    else
-      SetCookie('highlightedTreeviewLink', '')
-  }
-
-  if (INCREMENTAL_LOADING && xmlhttp==null) { 
-    createXMLHttp();
-  }
-} 
-
-// create the xmlhttp object
-function createXMLHttp() 
-{
-    /*@cc_on @*/
-    /*@if (@_jscript_version >= 5)
-    // JScript gives us Conditional compilation, we can cope with old IE versions.
-    // and security blocked creation of the objects.
-     try {
-      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
-     } catch (e) {
-      try {
-       xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
-      } catch (E) {
-       xmlhttp = false;
-      }
-     }
-    @end @*/
-    if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
-      xmlhttp = new XMLHttpRequest();
-    }
-}
-    
-// Load a page as if a node on the tree was clicked (synchronize frames)
-// (Highlights selection if highlight is available.)
-function loadSynchPage(srclink) 
-{
-        var docObj;
-        var linkID;
-        linkID = findIDbyLink(srclink);
-        docObj = findObj(linkID);
-        docObj.forceOpeningOfAncestorFolders();
-        clickOnLink(linkID,docObj.srclink,'basefrm');
-        
-  //Scroll the tree window to show the selected node
-  //Other code in these functions needs to be changed to work with
-  //frameless pages, but this code should, I think, simply be removed
-  //document.body.scrollTop = docObj.navObj.offsetTop
-}
-
-function findIDbyLink(srclink)
-{
-  var i=0;
-  
-  for (i = 0; i < nEntries && (indexOfEntries[i].link == undefined || indexOfEntries[i].link.split('?')[0] != srclink) && (indexOfEntries[i].hreference == undefined || indexOfEntries[i].hreference.split('?')[0] != srclink); i++) {
-  }
-  //FIXME: extend to allow for mapping of index.html to index_defaultlanguage.html
-  if (i >= nEntries) {
-     return 1; //example: node removed in DB
-  }
-  else {
-    return i;
-  }
-} 
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/javascript/ua.js b/src/webapp/lenya/resources/javascript/ua.js
deleted file mode 100644
index 17fef7f..0000000
--- a/src/webapp/lenya/resources/javascript/ua.js
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * $Log: ua.js,v $
- * Revision 1.2  2003/06/06 17:42:13  gregor
- * *** keyword substitution change ***
- *
- * Revision 1.1  2003/05/21 15:20:33  gregor
- * first cut of a tree widget for the admin area. comes with a preliminary xsl that converts a sitetree to the required javascript.
- *
- * Revision 1.9  2002/07/22 14:06:21  bc6ix
- * fix license path, change version reporting to use 2 digits for each level
- *
- * Revision 1.8  2002/07/07 08:23:07  bc6ix
- * fix line endings
- *
- * Revision 1.7  2002/05/14 16:52:52  bc6ix
- * use CVS Log for revision history
- *
- *
- */
-
-/* ***** BEGIN LICENSE BLOCK *****
- * Licensed under Version: MPL 1.1/GPL 2.0/LGPL 2.1
- * Full Terms at http://bclary.com/lib/js/license/mpl-tri-license.txt
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Netscape code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2001
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s): Bob Clary <bclary@netscape.com>
- *
- * ***** END LICENSE BLOCK ***** */
-
-function xbDetectBrowser()
-{
-  var oldOnError = window.onerror;
-  var element = null;
-
-  window.onerror = null;
-  
-  // work around bug in xpcdom Mozilla 0.9.1
-  window.saveNavigator = window.navigator;
-
-  navigator.OS    = '';
-  navigator.version  = parseFloat(navigator.appVersion);
-  navigator.org    = '';
-  navigator.family  = '';
-
-  var platform;
-  if (typeof(window.navigator.platform) != 'undefined')
-  {
-    platform = window.navigator.platform.toLowerCase();
-    if (platform.indexOf('win') != -1)
-      navigator.OS = 'win';
-    else if (platform.indexOf('mac') != -1)
-      navigator.OS = 'mac';
-    else if (platform.indexOf('unix') != -1 || platform.indexOf('linux') != -1 || platform.indexOf('sun') != -1)
-      navigator.OS = 'nix';
-  }
-
-  var i = 0;
-  var ua = window.navigator.userAgent.toLowerCase();
-  
-  if (ua.indexOf('safari') != -1)
-  {
-    i = ua.indexOf('safari');
-    navigator.family = 'safari';
-    navigator.org = 'safari';
-    navigator.version = parseFloat('0' + ua.substr(i+7), 10);
-  }
-  else if (ua.indexOf('opera') != -1)
-  {
-    i = ua.indexOf('opera');
-    navigator.family  = 'opera';
-    navigator.org    = 'opera';
-    navigator.version  = parseFloat('0' + ua.substr(i+6), 10);
-  }
-  else if ((i = ua.indexOf('msie')) != -1)
-  {
-    navigator.org    = 'microsoft';
-    navigator.version  = parseFloat('0' + ua.substr(i+5), 10);
-    
-    if (navigator.version < 4)
-      navigator.family = 'ie3';
-    else
-      navigator.family = 'ie4'
-  }
-  else if (ua.indexOf('gecko') != -1)
-  {
-    navigator.family = 'gecko';
-    var rvStart = ua.indexOf('rv:');
-    var rvEnd   = ua.indexOf(')', rvStart);
-    var rv      = ua.substring(rvStart+3, rvEnd);
-    var rvParts = rv.split('.');
-    var rvValue = 0;
-    var exp     = 1;
-
-    for (var i = 0; i < rvParts.length; i++)
-    {
-      var val = parseInt(rvParts[i]);
-      rvValue += val / exp;
-      exp *= 100;
-    }
-    navigator.version = rvValue;
-
-    if (ua.indexOf('netscape') != -1)
-      navigator.org = 'netscape';
-    else if (ua.indexOf('compuserve') != -1)
-      navigator.org = 'compuserve';
-    else
-      navigator.org = 'mozilla';
-  }
-  else if ((ua.indexOf('mozilla') !=-1) && (ua.indexOf('spoofer')==-1) && (ua.indexOf('compatible') == -1) && (ua.indexOf('opera')==-1)&& (ua.indexOf('webtv')==-1) && (ua.indexOf('hotjava')==-1))
-  {
-    var is_major = parseFloat(navigator.appVersion);
-    
-    if (is_major < 4)
-      navigator.version = is_major;
-    else
-    {
-      i = ua.lastIndexOf('/')
-      navigator.version = parseFloat('0' + ua.substr(i+1), 10);
-    }
-    navigator.org = 'netscape';
-    navigator.family = 'nn' + parseInt(navigator.appVersion);
-  }
-  else if ((i = ua.indexOf('aol')) != -1 )
-  {
-    // aol
-    navigator.family  = 'aol';
-    navigator.org    = 'aol';
-    navigator.version  = parseFloat('0' + ua.substr(i+4), 10);
-  }
-  else if ((i = ua.indexOf('hotjava')) != -1 )
-  {
-    // hotjava
-    navigator.family  = 'hotjava';
-    navigator.org    = 'sun';
-    navigator.version  = parseFloat(navigator.appVersion);
-  }
-
-  window.onerror = oldOnError;
-}
-
-xbDetectBrowser();
-
diff --git a/src/webapp/lenya/resources/javascript/usecases/edit/insertAsset.js b/src/webapp/lenya/resources/javascript/usecases/edit/insertAsset.js
deleted file mode 100644
index 96fd957..0000000
--- a/src/webapp/lenya/resources/javascript/usecases/edit/insertAsset.js
+++ /dev/null
@@ -1,29 +0,0 @@
-   ext = '';
-   
-   function insertAsset(nodeid) {
-      var src = document.forms['image'].assetName.value;
-      var title = document.forms['image'].caption.value;
-      var type = document.forms['image'].type.value;
-      var size = document.forms['image'].assetSize.value;
-      window.opener.bxe_insertContent('<asset xmlns="http://apache.org/cocoon/lenya/page-envelope/1.0" src="'+src+'" size="'+size+'" type="'+type+'">'+title+'</asset>',window.opener.BXE_SELECTION,window.opener.BXE_SPLIT_IF_INLINE);
-      window.close();
-    }
-   
-   function insertImage(nodeid) { 
-      // var link = document.forms['image'].link.value;
-      var link = '';
-      var src = document.forms['image'].assetName.value;
-      var title = document.forms['image'].caption.value;
-      var type = document.forms['image'].type.value;
-      var content = '<object xmlns="'+window.opener.XHTMLNS+'" href="'+link+'" title="'+title+'" type="'+type+'" data="'+nodeid + '/' + src+'">'+src+'</object>'; 
-      window.opener.bxe_insertContent(content,window.opener.bxe_ContextNode); 
-      window.close();
-   }
-
-   function insertCaption(name, caption, type, size) { 
-     document.forms['image'].assetName.value = name;
-     document.forms['image'].caption.value = caption;
-     document.forms['image'].type.value = type;
-     document.forms['image'].assetSize.value = size;
-     focus(); 
-   } 
diff --git a/src/webapp/lenya/resources/javascript/validation.xml b/src/webapp/lenya/resources/javascript/validation.xml
deleted file mode 100644
index 4d0db7b..0000000
--- a/src/webapp/lenya/resources/javascript/validation.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-  Copyright 1999-2004 The Apache Software Foundation

-

-  Licensed 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.

--->

-

-<!-- $Id: image.xsl 56062 2004-10-30 19:20:06Z gregor $ -->

-

-<script xmlns:i18n="http://apache.org/cocoon/i18n/2.1"

-        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 

-

- /* check files to be uploaded against a list of valid extensions, required title and no whitespace in filenames */

-  function check_upload(fileinput, ext) {

-    var i = 0;

-    var delimiter = ' '; 

-    var thefile = fileinput["properties.asset.data"].value;

-    var title = fileinput["properties.asset.title"].value;

-    if (title == "") {

-     alert("<i18n:translate><i18n:text key="upload-with-missing-title"/></i18n:translate>"); 

-     return false;

-    }

-    var _tempArray = new Array();

-    _tempArray = ext.split(delimiter);

-    for(i in _tempArray) { 

-      if(thefile.indexOf('.' + _tempArray[i]) != -1) { // file has one of the accepted extensions. 

-           return true; 

-      } 

-     } // file does not have one of the accepted extensions. 

-     alert("<i18n:translate><i18n:text key="upload-with-invalid-extension"/><i18n:param>:\n\n"+ext+"\n</i18n:param></i18n:translate>"); 

-     return false;

-  } 

-function validRequired(formField,fieldLabel)

-{

-	var result = true;

-

-	if (formField.value == "")

-	{

-		alert('<i18n:text key="failmessage.createdoc.required"/>');

-		formField.focus();

-		result = false;

-	}

-	

-	return result;

-}

-

-function validContent(formField,fieldLabel)

-{

-	var result = true;

-	

-	if (formField.value.match("[^a-zA-Z0-9\\-]+"))

-	{

-		alert('<i18n:text key="failmessage.createdoc.invalidformat"/>');

-		formField.focus();

-		result = false;

-	}

-	

-	return result;

-}

-

-function check_num(obj) {

-  var value = parseInt(obj.value);

-  if (value &amp;&amp; 0 &lt;= value &amp;&amp; value &lt;= 255) {

-  obj.value = "" + parseInt(obj.value);

-  }

-  else {

-    obj.value = "0";

-  }

-}

-</script>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/menu/images/active.gif b/src/webapp/lenya/resources/menu/images/active.gif
deleted file mode 100644
index 095de8f..0000000
--- a/src/webapp/lenya/resources/menu/images/active.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/admin_active.gif b/src/webapp/lenya/resources/menu/images/admin_active.gif
deleted file mode 100644
index f1cb124..0000000
--- a/src/webapp/lenya/resources/menu/images/admin_active.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/admin_active.png b/src/webapp/lenya/resources/menu/images/admin_active.png
deleted file mode 100644
index a9a9834..0000000
--- a/src/webapp/lenya/resources/menu/images/admin_active.png
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/admin_inactive.gif b/src/webapp/lenya/resources/menu/images/admin_inactive.gif
deleted file mode 100644
index f860b46..0000000
--- a/src/webapp/lenya/resources/menu/images/admin_inactive.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/authoring_active.gif b/src/webapp/lenya/resources/menu/images/authoring_active.gif
deleted file mode 100644
index f32ac68..0000000
--- a/src/webapp/lenya/resources/menu/images/authoring_active.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/authoring_inactive.gif b/src/webapp/lenya/resources/menu/images/authoring_inactive.gif
deleted file mode 100644
index b078f1c..0000000
--- a/src/webapp/lenya/resources/menu/images/authoring_inactive.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/blau_anfang.gif b/src/webapp/lenya/resources/menu/images/blau_anfang.gif
deleted file mode 100644
index eacd291..0000000
--- a/src/webapp/lenya/resources/menu/images/blau_anfang.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/blau_anfang_oben.gif b/src/webapp/lenya/resources/menu/images/blau_anfang_oben.gif
deleted file mode 100644
index 181f0f3..0000000
--- a/src/webapp/lenya/resources/menu/images/blau_anfang_oben.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/bottombg.gif b/src/webapp/lenya/resources/menu/images/bottombg.gif
deleted file mode 100644
index b0d3a00..0000000
--- a/src/webapp/lenya/resources/menu/images/bottombg.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/dotted.gif b/src/webapp/lenya/resources/menu/images/dotted.gif
deleted file mode 100644
index c256dae..0000000
--- a/src/webapp/lenya/resources/menu/images/dotted.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/edit.gif b/src/webapp/lenya/resources/menu/images/edit.gif
deleted file mode 100644
index 97fc42d..0000000
--- a/src/webapp/lenya/resources/menu/images/edit.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/file.gif b/src/webapp/lenya/resources/menu/images/file.gif
deleted file mode 100644
index 1fb9194..0000000
--- a/src/webapp/lenya/resources/menu/images/file.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/frame-bg_oben.gif b/src/webapp/lenya/resources/menu/images/frame-bg_oben.gif
deleted file mode 100644
index 3afae56..0000000
--- a/src/webapp/lenya/resources/menu/images/frame-bg_oben.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/grau-bg.gif b/src/webapp/lenya/resources/menu/images/grau-bg.gif
deleted file mode 100644
index ed1ca42..0000000
--- a/src/webapp/lenya/resources/menu/images/grau-bg.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/grau-bg2.gif b/src/webapp/lenya/resources/menu/images/grau-bg2.gif
deleted file mode 100644
index 2f7cc91..0000000
--- a/src/webapp/lenya/resources/menu/images/grau-bg2.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/grau-bg3.gif b/src/webapp/lenya/resources/menu/images/grau-bg3.gif
deleted file mode 100644
index e88b610..0000000
--- a/src/webapp/lenya/resources/menu/images/grau-bg3.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/grau-bg4.gif b/src/webapp/lenya/resources/menu/images/grau-bg4.gif
deleted file mode 100644
index 2b25650..0000000
--- a/src/webapp/lenya/resources/menu/images/grau-bg4.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/grau.gif b/src/webapp/lenya/resources/menu/images/grau.gif
deleted file mode 100644
index 84c9cff..0000000
--- a/src/webapp/lenya/resources/menu/images/grau.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/help.gif b/src/webapp/lenya/resources/menu/images/help.gif
deleted file mode 100644
index fc30e9b..0000000
--- a/src/webapp/lenya/resources/menu/images/help.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/inactive.gif b/src/webapp/lenya/resources/menu/images/inactive.gif
deleted file mode 100644
index 8fe4208..0000000
--- a/src/webapp/lenya/resources/menu/images/inactive.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/info_active.gif b/src/webapp/lenya/resources/menu/images/info_active.gif
deleted file mode 100644
index db5c161..0000000
--- a/src/webapp/lenya/resources/menu/images/info_active.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/info_inactive.gif b/src/webapp/lenya/resources/menu/images/info_inactive.gif
deleted file mode 100644
index 3e490bf..0000000
--- a/src/webapp/lenya/resources/menu/images/info_inactive.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/lenya-logo.gif b/src/webapp/lenya/resources/menu/images/lenya-logo.gif
deleted file mode 100644
index 2b24a30..0000000
--- a/src/webapp/lenya/resources/menu/images/lenya-logo.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/lenya.gif b/src/webapp/lenya/resources/menu/images/lenya.gif
deleted file mode 100644
index a5b93a2..0000000
--- a/src/webapp/lenya/resources/menu/images/lenya.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/lenya_oben.gif b/src/webapp/lenya/resources/menu/images/lenya_oben.gif
deleted file mode 100644
index 20cf519..0000000
--- a/src/webapp/lenya/resources/menu/images/lenya_oben.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/lenya_oben_2.gif b/src/webapp/lenya/resources/menu/images/lenya_oben_2.gif
deleted file mode 100644
index b1b1178..0000000
--- a/src/webapp/lenya/resources/menu/images/lenya_oben_2.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/lenya_unten.gif b/src/webapp/lenya/resources/menu/images/lenya_unten.gif
deleted file mode 100644
index 5fe6f04..0000000
--- a/src/webapp/lenya/resources/menu/images/lenya_unten.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/live_inactive.gif b/src/webapp/lenya/resources/menu/images/live_inactive.gif
deleted file mode 100644
index 29a3c35..0000000
--- a/src/webapp/lenya/resources/menu/images/live_inactive.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/menu-background.gif b/src/webapp/lenya/resources/menu/images/menu-background.gif
deleted file mode 100644
index fd19040..0000000
--- a/src/webapp/lenya/resources/menu/images/menu-background.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/menu-bg.gif b/src/webapp/lenya/resources/menu/images/menu-bg.gif
deleted file mode 100644
index f58931a..0000000
--- a/src/webapp/lenya/resources/menu/images/menu-bg.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/menu-bg_2.gif b/src/webapp/lenya/resources/menu/images/menu-bg_2.gif
deleted file mode 100644
index c551939..0000000
--- a/src/webapp/lenya/resources/menu/images/menu-bg_2.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/menu-bg_anfang.gif b/src/webapp/lenya/resources/menu/images/menu-bg_anfang.gif
deleted file mode 100644
index 12b8853..0000000
--- a/src/webapp/lenya/resources/menu/images/menu-bg_anfang.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/menu_bg_anfang2.gif b/src/webapp/lenya/resources/menu/images/menu_bg_anfang2.gif
deleted file mode 100644
index 6ff01e6..0000000
--- a/src/webapp/lenya/resources/menu/images/menu_bg_anfang2.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/pixel.gif b/src/webapp/lenya/resources/menu/images/pixel.gif
deleted file mode 100644
index 8f09684..0000000
--- a/src/webapp/lenya/resources/menu/images/pixel.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/search.gif b/src/webapp/lenya/resources/menu/images/search.gif
deleted file mode 100644
index 5acb6b3..0000000
--- a/src/webapp/lenya/resources/menu/images/search.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/staging_active.gif b/src/webapp/lenya/resources/menu/images/staging_active.gif
deleted file mode 100644
index 20943c6..0000000
--- a/src/webapp/lenya/resources/menu/images/staging_active.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/staging_inactive.gif b/src/webapp/lenya/resources/menu/images/staging_inactive.gif
deleted file mode 100644
index 33db07d..0000000
--- a/src/webapp/lenya/resources/menu/images/staging_inactive.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/images/unten.gif b/src/webapp/lenya/resources/menu/images/unten.gif
deleted file mode 100644
index 7f1a2e0..0000000
--- a/src/webapp/lenya/resources/menu/images/unten.gif
+++ /dev/null
Binary files differ
diff --git a/src/webapp/lenya/resources/menu/menu.js b/src/webapp/lenya/resources/menu/menu.js
deleted file mode 100644
index b6b17cd..0000000
--- a/src/webapp/lenya/resources/menu/menu.js
+++ /dev/null
@@ -1,68 +0,0 @@
-/*

-* Copyright 1999-2004 The Apache Software Foundation

-*

-* Licensed 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.

-*/

-

-var numberOfMenus = 5; // change this if you have a different number of menus

-var activeMenu = null; //defines which menu is currently open

-

-//runs at onload of window        

-function initialize() {

-    userEventsInit(); //set up all user events

-}

-

-function menuOver() {

-    document.onclick = null;

-    if (window.event != null) window.event.cancelBubble=true; // IE requires this

-}

-

-function menuOut() {

-    document.onclick = eventHideMenu;

-    if (window.event != null) window.event.cancelBubble=true; // IE requires this

-}

-

-//turns on the display for nav menus

-function eventShowMenu(e) {

-    if (activeMenu != null) eventHideMenu();

-    activeMenu = "menu"+this.id.substring(3,this.id.length)

-    obj = document.getElementById(activeMenu);

-    if (obj != null) obj.style.visibility = "visible";

-    if (document.all) document.onclick = eventHideMenu; // IE requires this

-    if (window.event != null) window.event.cancelBubble=true; // IE requires this

-}

-

-//hides nav menus and pop ups

-function eventHideMenu() {

-    document.onclick = null;

-    if (activeMenu != null) {

-        obj = document.getElementById(activeMenu);

-        obj.style.visibility = "hidden";

-    }

-}

-

-//nav events

-function userEventsInit() {

-    for (i=1; i < numberOfMenus + 1; i++) {

-	    obj = document.getElementById("nav"+i);

-	    if (obj != null) {

-		    obj.onclick = eventShowMenu;

-	    }

-	

-	    obj = document.getElementById("menu"+i);

-	    if (obj != null) {

-		    obj.onmouseover = menuOver;

-		    obj.onmouseout = menuOut;

-	    }

-    }

- }
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/misc/bxe/content-namespaces.xml b/src/webapp/lenya/resources/misc/bxe/content-namespaces.xml
deleted file mode 100644
index c5a5d2f..0000000
--- a/src/webapp/lenya/resources/misc/bxe/content-namespaces.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<namespaces>
-  <xmlns>xhtml=http://www.w3.org/1999/xhtml</xmlns>
-  <xmlns>lenya=http://apache.org/cocoon/lenya/page-envelope/1.0</xmlns>
-  <xmlns>dc=http://purl.org/dc/elements/1.1/</xmlns>
-  <xmlns>dcterms=http://purl.org/dc/terms/</xmlns>
-</namespaces>
diff --git a/src/webapp/lenya/resources/misc/bxe/contextmenu.xml b/src/webapp/lenya/resources/misc/bxe/contextmenu.xml
deleted file mode 100644
index 687cdaf..0000000
--- a/src/webapp/lenya/resources/misc/bxe/contextmenu.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-    <context type="dontShow">
-         <!-- inline elements -->       
-         <element name="abbr" ns="http://www.w3.org/1999/xhtml"/>
-         <element name="acronym" ns="http://www.w3.org/1999/xhtml"/>
-         <element name="big" ns="http://www.w3.org/1999/xhtml"/>
-         <element name="button" ns="http://www.w3.org/1999/xhtml"/>
-         <element name="caption" ns="http://www.w3.org/1999/xhtml"/>
-         <element name="dfn" ns="http://www.w3.org/1999/xhtml"/>
-         <element name="input" ns="http://www.w3.org/1999/xhtml"/>
-         <element name="kbd" ns="http://www.w3.org/1999/xhtml"/>
-         <element name="label" ns="http://www.w3.org/1999/xhtml"/>
-         <element name="q" ns="http://www.w3.org/1999/xhtml"/>
-         <element name="samp" ns="http://www.w3.org/1999/xhtml"/>
-         <element name="select" ns="http://www.w3.org/1999/xhtml"/>
-         <element name="small" ns="http://www.w3.org/1999/xhtml"/>
-         <element name="span" ns="http://www.w3.org/1999/xhtml"/>
-         <element name="textarea" ns="http://www.w3.org/1999/xhtml"/>
-         <element name="tt" ns="http://www.w3.org/1999/xhtml"/>
-         <element name="var" ns="http://www.w3.org/1999/xhtml"/>
-         <!-- block elements --> 
-         <element name="address" ns="http://www.w3.org/1999/xhtml"/>
-         <element name="blockquote" ns="http://www.w3.org/1999/xhtml"/>
-         <element name="div" ns="http://www.w3.org/1999/xhtml"/>
-         <element name="dl" ns="http://www.w3.org/1999/xhtml"/>
-         <element name="fieldset" ns="http://www.w3.org/1999/xhtml"/>
-         <element name="form" ns="http://www.w3.org/1999/xhtml"/>
-         <element name="h1" ns="http://www.w3.org/1999/xhtml"/>
-         <element name="h5" ns="http://www.w3.org/1999/xhtml"/>
-         <element name="h6" ns="http://www.w3.org/1999/xhtml"/>         
-         <element name="asset" ns="http://apache.org/cocoon/lenya/page-envelope/1.0"/> 
-         <element name="pre" ns="http://www.w3.org/1999/xhtml"/>
-         <element name="table" ns="http://www.w3.org/1999/xhtml"/>
-         <element name="ol" ns="http://www.w3.org/1999/xhtml"/>
-         <element name="ul" ns="http://www.w3.org/1999/xhtml"/>
-         <!-- attributes --> 
-         <attribute name="id"/>      
-         <attribute name="style"/>      
-         <attribute name="xml:lang"/>      
-         <attribute name="accesskey"/>      
-         <attribute name="rel"/>      
-         <attribute name="rev"/>      
-         <attribute name="tabindex"/>      
-         <attribute name="name"/>      
-         <attribute name="axis"/>      
-         <attribute name="abbr"/>      
-         <attribute name="headers"/>      
-         <attribute name="scope"/>      
-         <attribute name="hreflang"/>      
-    </context>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/misc/bxe/download.xhtml b/src/webapp/lenya/resources/misc/bxe/download.xhtml
deleted file mode 100644
index c1dacb8..0000000
--- a/src/webapp/lenya/resources/misc/bxe/download.xhtml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-    
-<page:page  
-   xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0">
-
-<page:title>It seems that Bitflux Editor is not installed on your server</page:title>
-<page:body>
-<div class="lenya-box">
-<br />Please <a href="http://bxe.oscom.org/download/">download Bitflux Editor</a> and copy the
-    contents of the tarball to the <em>webapps/lenya/lenya/resources/bxe</em> directory.
-<p>
-No further setup is required.
-<br /><br />
-If you use Jetty, copy the contents of the tarball to the <em>build/lenya/webapps/lenya/resources/bxe</em> directory.
-<br /><br />
-Many thanks to the <a href="http://bxe.oscom.org">Bitflux Editor community</a> for making this great tool available.
-</p>
-</div>
-      </page:body>
-    </page:page>
diff --git a/src/webapp/lenya/resources/misc/bxe/inc/config.xml b/src/webapp/lenya/resources/misc/bxe/inc/config.xml
deleted file mode 100644
index 3347450..0000000
--- a/src/webapp/lenya/resources/misc/bxe/inc/config.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<?xml version="1.0" ?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<config>
-    <files>
-        <input>
-            <!-- The XML-document with the actual data -->
-            <file name="BX_xmlfile">index-bxe.xml</file>
-           <!-- The xhtml with the appropriate div tag (e.g. <div bxe_xpath="/xhtml:html/lenya:meta/dc:title" />)
-                 An xhtml file can be used instead of an xsl to provide the page layout of the non-editable part -->
-            <file name="BX_xhtmlfile">testxhtml.xml</file>
-
-            <!-- The XSL-document which transforms the xml to the output format -->
-            <file name="BX_xslfile">entry-bxe.xsl</file>
-            <!-- The RelaxNG (XML Schema) -->
-            <file name="BX_validationfile">relaxng.xml</file>
-        </input>
-        <output>
-            <file name="BX_exitdestination">index.html</file>
-
-         </output>
-        
-        <!-- You can't provide a different "method" than http.get for the following files -->
-        <css>
-            <!-- Document specific css, which you should adjust.  -->
-             <file>entry-bxe.css</file>
-          
-        </css>
-        
-        <scripts>
-        <!-- These are the to be included js files 
-        the important .js files are included by bxeLoader.js, but you should
-        not have to worry about them. 
-        You can also add your own js-files here.
-        -->
-
-            <file>js/bxehtmltb.js</file>
-            <file>js/table.js</file>
-            <file>mozile/jsdav.js</file>
-            <file>mozile/td/webdav.js</file>
-            <file>mozile/mozilekb.js</file>
-            
-            
-            <file>relaxng/AttributeVDOM.js</file>
-
-            <file>relaxng/NodeVDOM.js</file>
-            <file>relaxng/DocumentVDOM.js</file>
-            <file>relaxng/ElementVDOM.js</file>
-            <file>relaxng/DocumentVAL.js</file>
-            <file>relaxng/NodeVAL.js</file>
-            <file>relaxng/ElementVAL.js</file>
-
-            <file>relaxng/RelaxNG.js</file>
-        
-        </scripts>
-        
-        
-    </files>
-    <options> 
-    <option name="autoParaElementName">p</option>
-    <option name="autoParaElementNamespace">http://www.w3.org/1999/xhtml</option>
-    <option name="showSplashScreen">true</option>
-    <option name="mergeDifferentBlocksOnDelete">true</option>
-    </options>
-<!-- here we define the buttons for the top button bar -->
-    <buttons>
-    
-    <!-- The location of the image for the buttons
-           if none is provided, the images/buttons.png is taken 
-    <location src="../../images/bxe.png"/>
-    -->
-     <!-- the dimension tag is for defining the dimensions of your button image and how
-            large each button is. -->
-    <dimension  width="120" height="140" buttonwidth="20" buttonheight="20"/>
-    <!-- For each button, we need a definition
-    attributes:  
-        col: in which column the button is in the button image
-        row: in which row the button is in the button image
-        name: the name of the button, this has to be unique and is used as tool tip at the moment
-        ns: a namespace associated to the button (usually the namespace of the element to be inserted)
-        type: The type of the "event" which should happen
-            "function": This function will be called, when the button is clicked
-            "insertElement": This element will be inserted
-            "event": This event will be triggered
-            
-            If there's no "type" attribute, but a "action" attribute, the event in the action attribute
-            will be triggered. 
-            
-            If type "event" or the action attribute is defined, the event gets the value of @name as parameter.
-        examples: 
-        - inserts the element xhtml:strong at cursor position 
-          <button name="strong" col="1" row="1" type="insertElement" ns="http://www.w3.org/1999/xhtml">b</button>
-        - calls the function DoSomething(), when clicked
-          <button name="strong" col="1" row="1" type="function">DoSomething</button>
-        - triggers the event ToggleTextClass (and makes the selection bold in this example)
-          the 2 examples are the same, the later is here for backwards compatibility.
-          <button name="strong" col="1" row="1" type="event" ns="http://www.w3.org/1999/xhtml">ToggleTextClass</button>
-          <button name="strong" col="1" row="1" action="ToggleTextClass" ns="http://www.w3.org/1999/xhtml"/>
-          
-    -->
-
-        <button name="strong" col="1" row="1" action="ToggleTextClass" ns="http://www.w3.org/1999/xhtml"/>
-        <button name="em" col="0" row="1" action="ToggleTextClass" ns="http://www.w3.org/1999/xhtml"/>
-
-        <button name="sub" col="4" row="1" action="ToggleTextClass" ns="http://www.w3.org/1999/xhtml"/>
-        <button name="sup" col="5" row="1" action="ToggleTextClass" ns="http://www.w3.org/1999/xhtml"/>
-        <button name="clean_inline" col="0" row="6" action="CleanInline"/>
-        <button name="link" col="0" row="5" type="insertElement" ns="http://www.w3.org/1999/xhtml">a</button>
-        <button name="unlink" col="1" row="5" action="DeleteLink"/>
-        <button name="create_table" col="2" row="5" action="InsertTable"/>
-        <button name="Unordered_List" col="3" row="2" action="UnorderedList"/>
-        <button name="Ordered_List" col="2" row="2" action="OrderedList"/>
-
-        <button name="Copy" col="0" row="4" action="ClipboardCopy"/>
-        <button name="Cut" col="1" row="4" action="ClipboardCut"/>
-
-        <button name="Paste" col="2" row="4" action="ClipboardPaste"/>
-        <button name="Image" col="3" row="5" action="InsertImage"/>
-        <button name="Save" col="1" row="6" action="DocumentSave"/>
-        <button name="Undo" col="3" row="6" action="Undo"/>
-        <button name="Redo" col="4" row="6" action="Redo"/>
-        <button name="Asset" col="2" row="6" action="InsertAsset"/>
-    </buttons>
-    <callbacks>
-        <element name="object" ns="http://www.w3.org/1999/xhtml" type="popup">?lenya.usecase=edit.insertImage</element>
-        <element name="img" ns="http://www.w3.org/1999/xhtml" type="popup">?lenya.usecase=edit.insertImage</element>
-        <element name="table" ns="http://www.w3.org/1999/xhtml" type="function">bxe_InsertTableCallback</element>
-        <element name="asset" ns="http://apache.org/cocoon/lenya/page-envelope/1.0" type="popup">?lenya.usecase=edit.insertAsset</element>
-        <element name="a" ns="http://www.w3.org/1999/xhtml" precheck="bxe_checkIfNotALink" type="popup">?lenya.usecase=bxe&amp;lenya.step=link-show</element>
-    </callbacks>
-    <options>
-     <option name="autoParaElementName">p</option>
-     <option name="autoParaElementNamespace">http://www.w3.org/1999/xhtml</option>
-    </options>
-</config>
diff --git a/src/webapp/lenya/resources/misc/bxe/index.xhtml b/src/webapp/lenya/resources/misc/bxe/index.xhtml
deleted file mode 100755
index 01aad8b..0000000
--- a/src/webapp/lenya/resources/misc/bxe/index.xhtml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-    
-<html xmlns="http://www.w3.org/1999/xhtml"  >
-<head>
-
-<!-- Namespaces are doctype specific and will be added during aggregation -->
-
-<link rel="stylesheet" href="@EDITOR_CSS@" type="text/css" />
-<!-- href="/bxe/css/editor.css" -->
-
-<script src="@BXELOADER_JS@" type="text/javascript"></script>
-<!-- src="/bxe/bxeLoader.js" -->
-
-
-<title>Bitflux Editor</title>
-
-</head>
-
-<body onload="bxe_start('CONFIG_FILE')">
-<!-- everything in the following div element will be replaced -->
-<div id="bxe_area">
-<noscript>
-<span style='font-family: Arial; padding: 5px; background-color: #ffffff'>
-You need JavaScript enabled. Otherwise nothing at all works here
-:)</span></noscript>
-</div>
-
-<!-- another way to do it without having to use xslt
-  <div id="foobar" bxe_xpath="/xhtml:body"></div>
--->
-</body>
-</html>
diff --git a/src/webapp/lenya/resources/misc/kupu/download.xhtml b/src/webapp/lenya/resources/misc/kupu/download.xhtml
deleted file mode 100644
index cccfe2e..0000000
--- a/src/webapp/lenya/resources/misc/kupu/download.xhtml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0"?>
-<!--

-  Copyright 1999-2004 The Apache Software Foundation

-

-  Licensed 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.

--->
-<!-- $Id: download.xhtml,v 1.5 2004/03/13 12:42:20 gregor Exp $ -->
-<page:page xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0">
-  <page:title>It seems that Kupu is not built properly</page:title>
-  <page:body>
-    <div class="lenya-box">
-      <p><strong>NOTE:</strong> If you are using a SVN checkout of Lenya, you need to run 
-        <code>make</code> in the Kupu root directory or <code>./build.sh kupu</code> on Linux or <code>build.bat kupu</code> on Windows in the Apache Lenya source directory. 
-        Make sure that <em>xsltproc</em> is installed on your system.
-      </p> 
-      <p>Lenya releases ship with Kupu already preconfigured.</p>       
-      <p>Many thanks to the <a href="http://kupu.oscom.org">Kupu community</a> for making this 
-        great browser XHTML WYSIWYG editor available. </p>
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/misc/lucene/crawler.xconf b/src/webapp/lenya/resources/misc/lucene/crawler.xconf
deleted file mode 100644
index b0ad62a..0000000
--- a/src/webapp/lenya/resources/misc/lucene/crawler.xconf
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<crawler>
-  <base-url href="http://127.0.0.1:8888/default/index.html"/>
-  <scope-url href="http://127.0.0.1:8888/default/"/>
-  <user-agent>lenya</user-agent>
-
-  <uri-list src="../lucene/uris.txt"/>
-  <htdocs-dump-dir src="../lucene/htdocs_dump_regression_test"/>
-</crawler>
diff --git a/src/webapp/lenya/resources/misc/lucene/htdocs_dump_regression_test/contents.html b/src/webapp/lenya/resources/misc/lucene/htdocs_dump_regression_test/contents.html
deleted file mode 100644
index 8a47934..0000000
--- a/src/webapp/lenya/resources/misc/lucene/htdocs_dump_regression_test/contents.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-<html>
-<head>
-<title>Test searching within contents</title>
-</head>
-<body>
-TestSearchingWithinContents
-TestSearchingWithinTitle
-</body>
diff --git a/src/webapp/lenya/resources/misc/lucene/htdocs_dump_regression_test/do-not-index-specific-areas.html b/src/webapp/lenya/resources/misc/lucene/htdocs_dump_regression_test/do-not-index-specific-areas.html
deleted file mode 100644
index d2819f4..0000000
--- a/src/webapp/lenya/resources/misc/lucene/htdocs_dump_regression_test/do-not-index-specific-areas.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-<html>
-<head>
-<title>Do not index specific areas</title>
-
-<meta name="lucene-tag-name" value="div">
-<meTa name="lucene-class-value" value="lucene-index">
-<META name="sugus" value="gugus">
-
-</head>
-<body>
-<span type="nav">
-Navigation
-</span>
-<div class="lucene-index">
-Content <a href="elephant.html">Elephant</a>
-</div>
-<span class="lucene-no-index">
-RSS
-</span>
-</body>
-</html>
diff --git a/src/webapp/lenya/resources/misc/lucene/htdocs_dump_regression_test/iex2003.pdf b/src/webapp/lenya/resources/misc/lucene/htdocs_dump_regression_test/iex2003.pdf
deleted file mode 100644
index 6a278fe..0000000
--- a/src/webapp/lenya/resources/misc/lucene/htdocs_dump_regression_test/iex2003.pdf
+++ /dev/null
@@ -1,309 +0,0 @@
-%PDF-1.3
-%ª«¬­
-4 0 obj
-<< /Type /Info
-/Producer (FOP 0.20.3) >>
-endobj
-5 0 obj
-<< /Length 421 /Filter [ /ASCII85Decode /FlateDecode ]
- >>
-stream
-Gas2F;+ne\&BE]".IOGCc#U@j8`+&>6#iQ"E9M\:V65N[`OSkDp1C25Y3dJF4oW"h?[nE3`,'g\5U")79YcMl/g*n+JoCqq8TS_T6DM*</usMh?p;1A6'HOGNHJ*;^O'2JT35L'H<57'bsq10nSQl`3qlH=&<c&LfDW!Ir[dc8TW6/3HlB=%7UiRhO,@1mb4(K$BLA;CJtuf7Rf_QK@Lm;7n^.9nFdbtH;'K[oL"?!ij[lmSf0+eb1s*m^1JE@;2Td-j)f[-A<-TWoqne9fX"'GuWJWTjP.Dg!`W]DTEWa=m@45kUA.(d-M?/f0EC1?_i@sa8LDEB"*ISM>O8PX-Dl50VB0E<Ujm_!^Eqh0"*$'$D"kl;XDa'`d1arS#1S8k1LNd2P/TGR^,FHA&+4GV,p0@+VP2EqH^)-~>
-endstream
-endobj
-6 0 obj
-<</Type /XObject
-/Subtype /Image
-/Name /Im1
-/Length 5470
-/Width 300
-/Height 49
-/BitsPerComponent 8
-/ColorSpace /DeviceRGB
-/Filter [ /ASCII85Decode /FlateDecode ]
->>
-stream
-Gb"/,$VXN$)BKka[SSP"_[OFu"F4oS;er_=Qq[kBoW^:)<bc(o[Ae=S>>&cWBoK9e@;m2SZgDL3h%_VO/$#CDApF-E&%&=3FuONlLK.iWM-GrrZjO[!p\o-E%`;fE*Oo+paWE;KpR_DTs8:dS39S&#qYGHsNOM!`h<_i.h:'W*dtFIPhHk>Ef@JMR[D0jfBZXSl1h4A>-BflB+eB@FM*m\6R4D=>E,9[,S?<sZSJsNOF`b!C.6ogT1fV@3DnKd@IZs\OiAs5E:YD>?=0IW)qH@+LXErj9i2KYOgnt;M)^?S;'9WdgJ)J7Z64q^R*u^m(:6He&^*t^RK?r@_B4pD]=4RQZ#8%b+%1EZ(T:_7W4P.+Bh8FofAD=qFLGQ*CNYA;s6;Vp*IGC<g;6Q4[03]B\2B/=98s"ic%6:1Z!/O_n\R*%seS)g/B#ZHM%GVDQ7_QKA^UYu0a;Jlr%50idM:9BeW-sfW@'9YD!/K5HGK2n0';@E@T9qei*RUWK!!:=FnDO1#)FU9<I*pO1LlrE4Ro<\h&LU>D)!Qo_J;20d+?A3#Hm2Bc^:.?*!"j]96q:cM%c=2AdK&X75$:XNI^:;E7Rn\4<$Z5f5)u`T,lg=OLu:((CD1*Yq?/fu\g%JgR9<dUcucQu)!9pskYEf!S!p^e=Q_YukZ@G&ET2'F&Kl_Q1c]3d4oYC!Vn7-@)C5@q^="SV_*J2heYg<Ae"'#<L&kId<s;0)F*$r/!:8o_Vo*_/2s$l`%R<dZ'G=f@Y]poY[?S%_cHa_o0poXr.@ic#5*h0J;"a@"icM(3]HM;_[RGg:D\rJcS1[#j_.eYCbV\"D.NUk=X>TbNoe7f<;WAFZrmh[BN5DYR;[X)qY=a+1&,7jVN+Q/p7PfEK*U:Zi,8uUU7M%Y-(k)\iIoX!D1G&Jt4I!@'+tJf\e4Ep_lAAi'"dN%sL,cNAX_fHprcunT\7RKYk"GOH/IcG((q>+[rq)96pJ6;=jeZb8l0BEQheN(8RcQH(15P41/?F-rK2^l=S<r&Wh:E[J&"JL5>W\02Jab&>2"T\4\G3,u.mBBNik:tqbm4H#Hf4:g]NTlKm%-k=s,5/Wk+Pb@/EF\B:>j:@03jd_V<*KU\/h,Jb_#qP=l9AC;YonL7BA-n`_]-LgrSDe9[5P[/'NDnf-::1rUtTL+=_4d'IMV4c:03m"murX9qOTcdeW3gfc,,;EQl'_MeJf4dQa$:7UrY`&MBa)YQI't`7d;ucf3e4%55:-Ws!:>L,HKhF[LH;O?Mrnd<9Vd`Iilo=__?n+B%<[cj@:P@B#RPrHFa2nYPg%=_n$)8$"RKgn5\mYu2pl!FoXc*Sc"c$L'YS:,"\@K3DJ6=C4$%8;r;Qe'le"HKP!ZisP%7:HsEl_<b'dk8N^[q>j7DI]\MF?,(h/f?!0d\[e+7'?^@=:7%Gg_R]i=^NSM1CT_!WMH^ci#<an%2*EdG?=71!XOh[[`>O4=!6A3IUSAj]aQQm-XW"EmE2KjC\jH-/+[0=n@(PIE!]RD[hE1NTaGlTX.0c%c5g--m?b6*#q#!oPhnQiWe>d,78OU[WfI(^X\hhUFIJX4Y&8R.fq$0]bATnsf\.MsMiY/c1R9>qV!rT#qDR'>l%MZOP5*cWd;Ifh4,=Xp?jt;8u/e68)rB;\#nGWsNR+'sF:8#sl0cNdno73ZKV6f/o;9#_K3c%:[peQcP?%f;1,"(JnXb@Or[sm1XHgd1!M#H=Whb[DJIo[CE<jL^50LBGCJ"fPag-taZJT/:d1h>,EcOF!\RlT6s_CuTI.0e8aUrsF<<g4+qf&_!N=860.s/q6U-=Dg@%$hP_6Jgl05U;13bkUuOC1W!!!a$pM,a`T"+t._MnskM+Q6eZdEl-g98go,@=p+q0AI8nreqKNg9GtDh4H8o"Njjsd916e[E&o8dQd)S9d/)"0Up3J8kkjrAE`VlF13\;d\Id"?(BEK+;ODC6<F6=VMLim2)l3GQB3,^,/mUFI_aRg<;@k[j."ugTBEq>i!b$=LX]aO/5)k$f6mF`)*X&tnK1X1A=<Q9@U=E[92f$gi0I\Jh2I_8;e;\aaKqjD5*?obQ&7oI$S-b(kCb1:#n4aa\a\aEbM*$_H-VAEA2_f4YRnr=<[&uBs`/Ccbm#C@QR(WMt-mE;G\@8gR7`-Y.1$B6a/>O:&+%PURkg:nM_[uT@r+7L[7B@dm.BoY*"dQCT#4$j8O9J26c`W&o@"F]S-&'a(Ku=7e^^,S_Q4**^,8(Ti/g:W.#C2LP"sZjKPUO=hS!3*el`[J-J>9P2WE/b)YD5iI&l?&-.X(165o:%/bBDiI$oNcpjWJ4Z43LaqY]-8Gj@'@3[oMGK29NZnh^<#K\o=3JPe=!91PdbA>XPIOed`)m:FJIHU=E"*aFVhC=&L.JBp730hCK\*>h`e5dQ6gM]rV0Ha`:e][T%?f2<!+21Bu,d-rcl6V80FXUd%Bh^W:9(HhuP](u]i*1M.!o#TE5``oEdlVuR3[7?<hF&7O4!%)U*,((QWLnJ10b<Vrg.LUc__N@W]JiDp5"Y[^Q>;?.@C*5pj8nL'&W5i_jN<7l7oEh>kj;@NQnnn"mnCdJaKbc>_MD.l:tm3FrD5JJ>R_uSI:ioehQ\T!f'>FaSU^.+NH7a+>1;Y5[W5HA61,[6/1:h2CdJRJ>qN\OMC3SIEK*.bpF4i154<UUmtpCdb-?QpGCqb&P]@I@L1?[:Ss->th+Uqr*g*tgCNT_9rA_lP_WO)uP>?7A`Eal2/Ec.`MV85BG":gFaN0SmdZ(n@C[6-SK_R)'5a0KTP8@Z*aG!lJRdD+?%&_S>Sa;)Y+D.0_/81r?Shp-uNf7m]7+EP<@re)/dfBT.C0E"d?*^#kR;WGPE$K=>9.A#0lln:SfT&NV,a_j,?@VQ/ZC[cPbs8MR^X$"dRAZL+<G0kbRITQ'h2*X8P"#oJ=;6tu]1No$.aSePX15G0n7+RD#E`c<@S"qqcU)XI^l5-sf=Ld@/<+ShIiVdj216hEj$+7P!nK9Vi9Kg>hkE22lork@r1LS6q!_X#I\q?4apn:"1U)PShg8b,#R4ua#hKYrMtG`+j!+ta#c\5sna:rjrb7k!D2ChhCS(_l[;/2`71qS[760um\jXaJKB%"8?+;4`@R!6uT5@*ilaK.J)i%$EAA.s00>"!B.(E3t^X_j)jcJ+0hW*eQiU_>Jn43XAP:*s=E&<+@MeN"H9e[r6]4p<(1D?7:0!Ka,gW(Dn`Z-uu'm/'9@Z#/Q*j+b/bA6?Jd(jM`jj+MqXBr;#=,3V]nUFiE3H&/8u``cPm,12'TDRAmoO'09M4$cEAk?tp6>0FS:[V0G)oBCn)e-Pl#GWDZ5V].R=n$ZO^-&4n]eYbIjYMF$s[+>-K+?PKe4G#(a>V9R6,KN!VRVXe#H,V=]oHVUD<:ti!>:ZEB3IDQpu(K2[iqo_Xa8<S)IOh*Xk.$+X:/LNc;+2i7f/TQ(F->B>.X_mk1hb#:9Q-gtVK1Q(FbbW%,#6kB-$1Kn7n#&3`<nm-?X(u=K[,;_/gIK?n>m3g(7Y`#$-:"hspI0R1(k`Jr?RE]+>4&-G-]UhSM#[<Gnf-&&Bf#ru@Y`Z.f('?CK].W>.jn_$$:?LVLYA(IS-MsQ0tMj]*U]csAP5^0'0;VHcF$eH.eFSpitgb*M0Cq%P(Nc!p,h!K?i1j47NNeq!H;YiFXpLokWa^(oeSq\<8N/hn\b3!(;=uZh@soR>6:2IPdD,cejTEIF;JG+9*9j(0u3$HX7]$Bfc`-$.]>\\=@herZPV<1Y&rKMoG#aLT707?-%on5L$2nIV32U1b@AK?Sm3bqp-?\g]8N@M>*t2%cT[a/i/B4G]V/cl7.:!FlboX/=/_4FdBg1mgTf9p#P#(B?=R/)G*31Fcu/L2PW&d"gS%*7NEYkFf'SD;fMmYmpft6f7bP@V(t99A7C%lB(Lq]'rk,s2NCo6CGR-34]pcMd0lDBZq&'fu_1S!.TNVVkOLm4a!ZbA]=E<%9Kq3G^F<d$E@_X&.OsI:83N8I2Vciu&:R\Dc!SKV9OYI\:]$o3`HA2GgG(WK@9>+_2U^rZ@*>mmSgO&J&Dj3%ECqsfBKVGtc6#KRbBJQ!?T+=7\KYa\e<GH!iE=Ar5]bVZ]jP@:`+,M3$O_*fA6*Df?7J?9$Re<^fGRiC9jJJ"=&:-Q+EjjXD5mQb>@:SC@T3Vam]6<Y+d;sSY3HR,g_8Go^F,1W!2K!5J44ZfoA6f-e`df%DDeYX1l'.L!`l(8tST*@8R1[k%\.UL4'$KTga3G]]5M983UXEa%gCCe0=;o,+e2cXm0X;HtTK+bEiPm1%Sts&2MF+)?e\ik04L.@7,eVu7UHsQF<;%RX>bUu_=d[%$`*$h`&1W612e(W1R]jcPG[[EtP_)&"Z^?NpJRloL"<e=cj*R[,BRJ<km2BlgG/J/`SJAgZRD&XCgSP^H<Ztej%5F?m\cUiuP8c#l%E(o*:jI\(gb:-)Ye:'^&"1$06dh"MLZ^Qu4Cs%FKS'Ji6':O_$qo[HU3klt6@si#1IBlN,u.a;CN@or)$s;a>P^2mn2,#`Wf;hh@@\Mq#Tk-fn:R4r^mC?N1FmOFhb>?%US2=JL<ude,cDAu!23]>oD-N8Z)CJf3QRq(R_gl+[Y)q>ff]FcY]@VtjMS_W^]5UXY"rY_!OGo#2F]SP(h#rPR-^F/k7!*s!MBY'`W@T"jKVf'ZUcXG`&4c)K3-<%U67XC""B(Cj`<)XVqi37&.]:L@o!M-$1JaIKmKr/O:8i="pE*,',mbG>C_e0Wr_bsg,L"7-1$kJd?Y!/9Lga"$T[:,i)\no&pbUiU'_!!YWuSQN8_X"$*33`OA$K@@YS<F2F\r/q4%od^>F_.cPo'/hG^k<TLuWdr8$(s3%6/#4^o&tZXk_d>)!&#2;5d;3..Sjc*s`nicM(3]GQ#64;qWX^EA"o!)c4RPak:R6tAD$='WeZ+X^%A;b`Xm+kg,Ed_O).9QkqJ@V]apUVr8,T`AWllOQ!qR`M:G*&DE4N(TR63(cb8nb+6>[IjqkA*u;F"pX%aQZucXM:5"K\.N+?>#u\+FfO=!!&%V;mhGg?%&nc:c>aI4YF9%+&[mu":CqR+jGCa3C5!H3fFB*^UGqkn7];KE06g9=&3qJ37#0uc_Fp1G#68i=66T*o-915sNrffr--$W+.[.3`<4+-mOFDX3Rob[G,;1:Mm[e=:<X7A^7>m"Z#0c%@9m5KoMp>Q9p,Ys=-5;U)!s48hkElVW$;03S)'^A]3K'6O&Bt:(XL_1P^-L45GZt%CN4I99KQE)W>r:BM4k.-(';rI6T^#?uW.!r@feM_%!XR4@7j'P$+CFrN!$5?K>?bFj#.A*c)fNA\>?lOqJk"W]o&I"Rdacn#e3qUj+>.69-Z?Xl["]RFA27_.A\pC6S8(q#0UI_&aFgnDkpkRpc5U[8Um741<E)p_m@jGf'Q`ib)fNCZ`nLW1rs(:]8lP~>
-endstream
-endobj
-7 0 obj
-<</Type /XObject
-/Subtype /Image
-/Name /Im2
-/Length 3611
-/Width 425
-/Height 27
-/BitsPerComponent 8
-/ColorSpace /DeviceRGB
-/Filter [ /ASCII85Decode /FlateDecode ]
->>
-stream
-Gb"/,D3<U7&2]&*3!b)>&-Cf5KY]t\KS'gAL(FWA&.!_`gMa]MB1?CQkKR:4e3?hpY:Rqb>,)TigGUeV@9D-(\`%kJSlOsG5C]cCY@#&=B"P93mH.RE8"?a!@@.H7`XMalZ:mqc1iYSL)9';%]IX(QJBq`?8U[3NYfZ!Iq.N&@-N;'MeG&@b2cTSKqJ);qr:uQ@ht*d\;VrkBUqV]3L=<+T#5R`F^RlPBPPRI'-M:)\2EZim/EMdK-h[GE8-<6/E(_C[J.88Wi7G/>r9<V9m2D&ne#Lu&s7,-)9j::dY0tspG13i<gPRj*n8,\]A*'g*lR"$:[d<#Np[:";)DuFD9MH8Pr\`Bq:D6+=QiL)-nt_CaO5%!A!-:1,*t8D#/6E7cIgaHP9skCE[Qdd;mFKZaGVbe'V\30S?bUoEPrS%r]C[,n)-WefG1IF?YStlA?1cb/TRt!/Qr)hpPkk_O_CUF&bckGaT]C&!g^SV1[C6A5_=b#[Sh`a9.Q+;cbjFOea:Ge8=It!d>3KN6KX:rVeoTK'Ip-d"^Jd[&A[.q6_3GQu,K+>!!j$DW2-j3_\GcO?\h](Ae$6'u/4P-:3!?bCWeq>@9bkPqZ)[)t9J9oKe2n!fEtQo_BOn+T0HQpfQ9=l)`bK?@f?LGRe1B!&#aiK,C).OX!so'C@:<32e7X1]D:^'"+,NO1f[ldYXcgTV**-^qHI/34TR;eB8^W5k'YZ72@)7@`,5$)i?6:`PZG$j#=ak.A+tIS#JkOBNj.A&)pNI%aXkN,EL5Il$NUNlY!A:/^YTS$Oj]]#L\kA^sHVLkF@5e/s\pdhu1u2_-3Wc6-)YA_e!/$q%6mlGgHFq#QMO%[HU"AW@E`@^C``O.(G&9*H1fP@"g[Z\OKb+s9/g(@Vkte1:p)T@D)F=m.(X*[t$#?bS<nKgjOQ[R:>]eAb4aq35XeuA3.rH<&duU;_+r=g9mA*:gbeePPA7Jj-[Z:2`G^A<u-\%FDD=TtV6:\O^_3bkYZ[T%3XMFtF?7YM+j.A'$U*?hL0N@(cDRnrP9Mn^Ui^hRnCBd[IcBM=6^)@Bd#,W(gr[uSe+CEsLpKUpFf/Q6JbN"t*lHfTH?_GW!E97S68!CP=6ErsX,Yj"MhB4hrZ5*P*457&i`W23UZkCj)=YD\54f^9<_U[nVjWWh!'0YY.:"S.a_+m3EeYc+\\ZnCCK9"tQ\\mXN[UPb/r=h+985XV3(A,ee0sidj:*k*]3Y_U:bij/$=e,AQL`F8afjZ4IFX0!]/68^;D.Lg(*$\?6e^XX),Ta'-10'5'k`ernV).*bok?uf.4Ie[N2u/7<u\bIEN5!aLd%ch&KJ4j!7W<c.C@%J*fltuOu2=/;tMbGSDt;1XhglmUf#)uVV:K/,+[#k336\![&X1SY[obJ0!_QaM^coNGc>(g!@/GRW)tG6\(cJ$U!0ZMSCN4jFRJ1>9&`Gc\r:,$+Jo8Fg`f#-dnI.b,o09.2cIX8(-Z1WVe"Y)a!Q_I](F\X"3c#kSgq6Z'AB].TP)`PZ]`ZcY5G(lWe;.i#\6IclI5TD^qpdd%n7tmqfERL-!m^-QF,@fJM(5F0%:"`7UO?@>8ip1C7TfQ)KB=F.I*&3AQapf;lufAeLb2D*)$[j<=-o1dfO%dHE,G33\P@cVE0O$Q>2Pu&;PCS[Ukt#k)$V^I+P\_(c>20msd%IUYuJld=p,6h.=Sel@ttfKJsbNfZ>VYXZc(3G&<,<@;DH@^iZ>:Ym6/K!^r_GFk!=Mi(b<4;>4N`gI^=6;5UiaSTeQHDRR,._!Y,3B6nH7e;o!qM&5?ok(:1i<qOtBEhp"s,h_k/elnp<dA-poo;LK$_L4%KMO9>o\G="tFR?5oVWq)T0;=4s$]TI5p7d\u'X$:`lDaJ2kRjBG`&ZO(>!"V0aNA2(*1h*bU)7d4qK,hH#LDZ-Pjb;0ndi3;!-W4M0J]Q+O1TAhf[XH\c32,8QrdQ'/8-PW#G@HAeDn^fH=ErQY%J-RmR2QK'\8*9S(l<1B!H.'ofe^aV+ZWL_aaW!2;14fZ=K(;A^Ju`:-=1*1ggei+!*7e>H8"ml(cd<%d7fi>U=P.e$VB!W/m[e,&rUC?4=A*S\*[<HL>N&C1h">D-RFc:cHLg9mq"noWM,!S5Hk^%iYO<J`UmB/QFD!&Uc.cN"Yic&4S=k(0elnet'$0mXBRBos*6m5"BH@LLiNsNXkI@]R[SpFcKXBJnp>onuW:Sh%nm>I<?F:f,;P&_;O"s_ARaBO)\XM]bTjQlt)`We?1`iSkl;E%)gh+?1T]ANS<bbbg[];O*k==T]Vk+L@1()30<9?`]^:XJVhKQ&+rB$4<[W!Z`.l.[D)KW^&rt`O&h\4VRkg7EBP6JC(jjaLr.DG#o^Tp/3R2D6e'^kWf#b@VgOtE?hKgPcA$GcWifKoB%@!@OU9i`]A<3Fgdu!&PI9_U,DE<;!W'.@Id.l[gZd3((H`Ed?npt@a-ZEd1r8#\8PDneRIIIH\d\.)lI1BSMOOC%mI3/6FeEY9$]eL07WkankQ4hH$Coe31Ku/.F$Y4lF"PAX%V?7Eopht;gGCe9Kt*j\mdPDrOb(PjAM(L,Q-L?a-IPXTW\63ZdlY^?]+$>YXm`1%;7k4DB2RR;5/g#q/*O5q=;77&I,r(PQUu35oe#pI?X(:rh8Em,omEI`MfhM?HE!3rh!O7*XZkYD0^j>$!S;%WUO+M!K2`8MaL(6+0'S[G9:`r.\mgk<\j!j!fD55+h-`qbkdDMO^4&<3S'JO=8([NlZ<8Z0T$1/<Bu$MT.Yh[Z*,R)U4@FV<id[3hH4Eb3BG5*2V*05T&jOodBK6m33C\F:5.c`f5^f-o1:qMiSA#dD@J"]!G`\M,W;WNePtOaBV.g@JFI#"\O.VXtm(2s/PZI+a5G0Z8@QAG[a?A%^4c[^PgWO\@(2.P#QjP0E4d"7S1"XHA4e);N^Gsj;plTMqWM\5XAMA>oBS&2;omIgfPt'mnI!e3@<$S.r(KZt8[2MY32ai']Fup6kI,+@GA`?3`@Y?`.dO;+s;q&\2N@[6M'**obK0@_nL=8Eq9rDKZ.F+[%p`diA#/*C!BpW)m1EBPaA%d6.421*Vl'YS(P%lWJU5mA620E[Z0/l:):8GU@Dh/'SlqFnTm:*RM!LP"nb@N:4)=f#G;&&DS'B#mHo?2/u\$M>U#TW-ZEJoLMDi?3\I<dmHp"Sk!bf"d<'Kaa-b7`:GC$2Jj\nNQmUjlcg(-YE?>N9c?<Z!n(mXDkGE>J3J0"E1c:l)1t?))@ng9MCr^kl_`!iEsl!T<)7_Fn\$h=@H.E\@$mbi8VK%P+<+*NKj2A&sHUo_XcL-eC!>;J7NsD:K9U`7'J9i7@mZMLLHJFR&2$gTd,cf'A0hG9VGmXNhIK#/O:N'@]sbhVV8IM7(gu57B@%g\ko@]<\QJY7.+8D(%7m?3$s9=RUKqnM-KZO+5F"PeRuM82ZjI;ir4fp</!2n^2fZd2pnIQ21K^Q9;PW[dX^;!U'SteJ?Q$3"q)).%cloGQoAb9cQDmICgl@-71)=1+)[bJsuNGIl)1T@cBtHe9;7'e;$guI^F21',)FNqG)Tg_1Bdp+"c*_`'fXYn\5t<([rLLTZ8;~>
-endstream
-endobj
-8 0 obj
-<< /Type /Page
-/Parent 1 0 R
-/MediaBox [ 0 0 595 842 ]
-/Resources 3 0 R
-/Contents 5 0 R
->>
-endobj
-9 0 obj
-<< /Length 438 /Filter [ /ASCII85Decode /FlateDecode ]
- >>
-stream
-GasIc>t`'h'Re<2\A!*Y=[&9$I?WoMM?@DnLX(ZY@iK)[X<#3.Dq5\:NPiEaE,p!ErL,$G\tHh`8DXooMRW`k7mgfmKI-ru80H"c"c!0`l,Z^)OVF/gpUc$T?uBe[9tRh/"J-dIl(k<DU`hss+Q=4oeI-11',)4-B/63K\g&?-9$;.#++gd^n<d1%kWtR&a^BM7MT(tPJ#jD[RVV5gV`s`f["kc*ASg(ZPAR]VXY)*Z%-c"MoSu9#>1Y(AUq8%+.@2/WLdfB.X3gLM@W5JFHSjJQ8H:(8PX`("+dSWa9JBPTYAJ!Z,1Ye9j94^/PSI4X*khs#q,[HD]^,CV]?f3.330)7D)43FUt3^n&%gT1Pie_pqmH4lZnlRXJJWGe2QCOS#(0c6?[J/E?LBTk[uDp,mlb*:A#7rljIqtl\'`p]5"tMT4mBO'~>
-endstream
-endobj
-10 0 obj
-<< /Type /Page
-/Parent 1 0 R
-/MediaBox [ 0 0 595 842 ]
-/Resources 3 0 R
-/Contents 9 0 R
->>
-endobj
-11 0 obj
-<< /Length 663 /Filter [ /ASCII85Decode /FlateDecode ]
- >>
-stream
-GasIeh/8]9(qo)]I$mNb_$4DI2qtpOd]-@5)Q$OS]5S`KGRZWR8Eo!F%Ra$J$#jBrr7U9.Hp8F(k?fAD`ZTQt!ltH?JH3^e("Xri940[\O9c?tMZX*\%?=p0;Z[&1:Zp[1k^dZl?lq>DPhEg6g6<*@<=>pe:Lil!,hFn<@PpAPStI7U.E&;r8MMQI.qsqbZ6'+B05E0ql*/G);d",#DHsk"]4IeI`IaFK(OKF8Pi*u!_>trIMc-"Od=:8!H1(0ncoH*-a4hOlW\L\Y@mh006Z.$PI^blOe0\,5db3X!U>mE_PnJGiNm0FDQ^'JT]h1Z3+;o2U/'E&s<Th*rR]dj;NJ-":I8RW9pQHaY>X[//1H,oPS"pG*F2;Yk_L#;@L^b0I]j+.CO`'Po(r3QrOV<r4-o>)JQZV#`"Aq3b-:/Td*Ju9/B^.]]V60WDc@?BP]UNt$MqmIOc8WV=q)dtTir/HmCo:0*N2cba"JUtZas'BN&;]-5^ZQG]e(tW(@Q+:De^Y)DQKDlaBo'S^J0@:>k$',e/ls-:O?*a[;ImaA`"AT$g=aW<o<;uh5?Il-_4f5$4"MDE3ENU-[_Y!D[b7Z[R5po\*_/Td6gN<RbH!6;*R*XiF<c9PNI>,Wr\4d(@l=Yc@-1._;ED:?LJ5D_Vf6r;~>
-endstream
-endobj
-12 0 obj
-<< /Type /Page
-/Parent 1 0 R
-/MediaBox [ 0 0 595 842 ]
-/Resources 3 0 R
-/Contents 11 0 R
->>
-endobj
-13 0 obj
-<< /Length 497 /Filter [ /ASCII85Decode /FlateDecode ]
- >>
-stream
-GasId>>Kl*'Ro4HS4?,Wd[&>@PP9<+1*^dsiWEYD-I=5[RJqOp=PU,Uqf8.oS:9A+odKM,c7mT^dMFQ),.%SA'X'(P/@6^*B*`51@B__!i&3QT+m'2ebe@uQ_7u3$,1k-s)8I_JQZ-AOIO^7JS(a*!l2VkK^$K:7k[^CB_Tn;I&^ceTKWm<eO"nNF0_!,gXnNjT_iH<*>=iZT-OC.EJ)od&Qi!f]I*ZU$^>jIXk4KZt)W)D1B+bdiM#UQ8FEHn"WE34QmC)jZ^*p*qC+9(uFe'&,e)`\F?&$Rqd,QZZjaESDDdGiuR(LQK[hljlVB!+%&;qqNNOO,Z&3)E$NH_bb-jDZt2el02&g:!V,U&l`pI1-B;<>+?8:kup9pQ_C>6iLP@1>s2*\I6`K>jb93@[]Y%*O5CLMGJm*ZNFtlsM??9?4G:ZcW<0:%?EB2ZZu]SPC3LIPg=ZhToD1hX:h?"@YZ0+n0V1Dl"A"^7HWS:\"li5iHA~>
-endstream
-endobj
-14 0 obj
-<< /Type /Page
-/Parent 1 0 R
-/MediaBox [ 0 0 595 842 ]
-/Resources 3 0 R
-/Contents 13 0 R
->>
-endobj
-15 0 obj
-<< /Length 452 /Filter [ /ASCII85Decode /FlateDecode ]
- >>
-stream
-GasIc>u/<k'RfGR\;qksZF9(&ShqQ:)G)b:JLE^@;HY7!in1R3mk*9.YbHQVmHM=IT)17"d,9WY$R'gb5*ioGi8_&J['<GD^jc+k.7Cu25X8H70SE8AluO,:_Qu1^M^n*[kLlb"g7)/F`EG@e3*1Bsp#$"J]5uaY_#0*pB4Yr0S)0Ht?-ln:Oc=82S>"kG@Nes1-)LM^6\GRUHT67+S]4fHPbW6$=+:PcUr8f%_`f^Dh6&umCD/c9*idcAlk5M!\ic/^]q^,3Si3"8YSYD9@02+hh$=jr'FeqY$J.:a7&0_U3"WhFhhfE_J-D]%oJ)Q*'fe-$M=pR5#PZt><KcU`_3a";e@a6g*nROo<W/%m0iiRGlF-%b3)kh#]n7>ls5U.<A`A5`B20*t)fuLuH-KmY@!8T=lhOKp[_1K&:*meUg*)8>1M>F+g0rrq8U^`)]#"%~>
-endstream
-endobj
-16 0 obj
-<< /Type /Page
-/Parent 1 0 R
-/MediaBox [ 0 0 595 842 ]
-/Resources 3 0 R
-/Contents 15 0 R
->>
-endobj
-17 0 obj
-<< /Length 537 /Filter [ /ASCII85Decode /FlateDecode ]
- >>
-stream
-GasJP?#SI?'Sc)T/'_]MD8ui"KC?Bh?+"C/g;[<s0"^U$NKJ&@LneY\ocnXeaDi0/!?DZrH$T4q/>MtrJM`/Q3D**n^-RAHTr3;LD@M%MJPnr?HlNE2T:G)+F+t"mX'>?R]67EMU`.c5e#>A*K^rnS-_dNVq@*]\$D_-=X=.Y$397d93C2XDK@s.HWi]S;fJc(&^a'A>DY/j%Zr-@ag=WNk.fQU$mOU;,!dR>pU?^h>M1%=`PrjmuKg6E:H``6I<G.lS><R[r7"h*^?"Gq?G-'6%!Ar%hf\<6C\n^lp!/ke;p(J%a6P:G`mt9u62<1gY97KI.GP$F#.\klu7f>dD$W-6rJg!]GE02<e;NP`0Iq^?ZZI*N2\UQEZf,rkn86_3":FQtaVLf61(0]:SC6%j5lXej%=e!*%-h5`'/@QYNj)2rQf_r(P6>>1og1pV)JpLOHS&B3Q^Daeb[96;&G.O_%_2n<N<ngP;Vfh[__^+BZP'!/g\937IYFdTc.15#EJKN-A._Yjc:+5r.,l[o*[1jn~>
-endstream
-endobj
-18 0 obj
-<< /Type /Page
-/Parent 1 0 R
-/MediaBox [ 0 0 595 842 ]
-/Resources 3 0 R
-/Contents 17 0 R
->>
-endobj
-19 0 obj
-<< /Length 586 /Filter [ /ASCII85Decode /FlateDecode ]
- >>
-stream
-GasIe?#SFN'Re<2n7.QkS(Na2B2<<:P?*r_)qh/lp(1+TYs`%:9G.;R-:).X/bm<9n\+Z:h[eV@?LSOO)Pcr6(P2q[66X:fSTHr.94T\CPSP<0(.T3]CE1ACjpXRg]kd8hTC6odO3l;F*T=l,r)R^di1Q.:q1ftKIr@K"U%G&-K12[CQ#G$T,QT*8er1/`$I<2jfIhpVZ#5M:N'fbQS%P!YCKIk@`lOjVqC(Y=+XDW#?4laRZ++eP^,P=G[Mrd5)F^fl77MRPWhOMsa1<<a>]5U<GIh'C]>ahinGs48^oq=T11pJK#ZO`=QamuslPB&6?;qPZ>6YnSW"?bI-0quIk#Q)jSm=2Ek<h+I3P#+IB&R1lc+u(EZdE?t=Bt=#M6-A)b'iRRnKMEiU5MCK4U;7ZEl:BL/>B)A^#2g`cpW4f]t;2O0ndGnp]_@o#WO+Y$%WH=9:4FNaQ;^%LTp3kF'2J%C`PY0cT8W2LL"iu@<WPi.*fFR)r3KISu.PYp1:j@WD04Xd^e'\;`Wc<(MB;6cb9CG=5?)$R/N5ICUr(=L?8)K&j\eh>6KCIk"I6LSLFD8ahOR1,=_~>
-endstream
-endobj
-20 0 obj
-<< /Type /Page
-/Parent 1 0 R
-/MediaBox [ 0 0 595 842 ]
-/Resources 3 0 R
-/Contents 19 0 R
->>
-endobj
-21 0 obj
-<< /Length 417 /Filter [ /ASCII85Decode /FlateDecode ]
- >>
-stream
-GasIc>u/<k'RelB\A!qj0E##)m`g8!23MWX!`=?\=]pr*eH$imHcri'9-s;n2Q*J9oUaf7)@Weun/0T7J=n*(!Pu:HXJo%"^`=%YZ[dYFJV&")3/1NB,f8@ii?]Ju!Hb\s#r?@t?fZf1[0K4UX?V[soDi2@]kcu6C@#AO_F5^V1=_gE(_[-O),m>K#mbHk;-;.^B'\ITXReKHc4VE#+*C!<6mcX;'h$:=h8h;72G,+R&u:C]6l`Kf(uCPeY&*SEN:mhkTVRRWpOXYWaVc?,\YAI!VC'KQ\i=Fm1h"[OQ<1Zkn3tt?]km/tY2s$Y^2:9rba*\2@W:a,c)::Wp98rqbW7]5aue=F:%!RBS+Vc$s$-\]^1K.p0_b1Kc[=U#Y._TJaV77Ag^rNibU76cg/Ck(8cA_$*N73~>
-endstream
-endobj
-22 0 obj
-<< /Type /Page
-/Parent 1 0 R
-/MediaBox [ 0 0 595 842 ]
-/Resources 3 0 R
-/Contents 21 0 R
->>
-endobj
-23 0 obj
-<< /Length 408 /Filter [ /ASCII85Decode /FlateDecode ]
- >>
-stream
-GasIc>u/<k'RfGR\;ql^dZ8P<h@'HO,8%d*M;lDmF)/Y$a@D'dhTN?`ZP*/`gXFVmg2f?38:SiL"q\H]7Ld69N!AZ#l5@#Ji$O()+WM$u%N<GT!.e18.6LnOM`6L9or\NOo3,g[Q1nBAcsgM:.5G6R]!)(CWVn!P@&(T#$IcMdKMZ;M*H9/@..AS2oV'gJTHZ_Fj?G-#iOBU?7HB*r!ZtOf#`XO8PY2J>pf.&%P(N>p$3A&%bfSe-V#nr2/3>crIB',oOAT_:F+^Gdni5J'#Y1F8mjV!%1>P"db56qYFjZ_Wa+f(br2e&.-<8HiXa4'/eFF='05PfVgXoeLbKSX#g3rC>[oLj6WiE?4\A!-nF>3W%dUbTa[eRMM].&]7`aBJP3Qsp,pSjo#Sic`OR9--$~>
-endstream
-endobj
-24 0 obj
-<< /Type /Page
-/Parent 1 0 R
-/MediaBox [ 0 0 595 842 ]
-/Resources 3 0 R
-/Contents 23 0 R
->>
-endobj
-25 0 obj
-<< /Length 416 /Filter [ /ASCII85Decode /FlateDecode ]
- >>
-stream
-GasIc9i&Y\%)(h*pt/0"jeHP<)f,o`g&u)SQs^n'.;P`e&`(IF^W1+?7L9aBfQqggG+LK\8H4j*N$*BjN#IEON(.Y"FbXW;GfV"!#m\D"K19kq6)56,$?$aM'O364f6%U-k,H]3X5LGYU$4MC:VlODdXu1'DX(Z?WJ?&dOe+%_WA%&i\Ie$KY9Qe&L4\?2]?+>ib@N2O6qYC^aa^,+p*4?Q7L=>fTtiV=3^R=b']i5F2Bc(oKX;m#lU&C@,PP`Q[oWTCNP1kpifIn(+D+RkhMa.nBthYh5Q"Ee57^ncQW`G/o:YDZdG1Y3L4?Z/FQJ+OY3=<r]b=1V2Apkoh=bDkf6M5mYG7ZEj;p:&Bt'4GAJak5g<n-^nCL7(q7*QrH%3"r(lg6.'(j#aBkB;lVo%+qQ![K2Vnr~>
-endstream
-endobj
-26 0 obj
-<< /Type /Page
-/Parent 1 0 R
-/MediaBox [ 0 0 595 842 ]
-/Resources 3 0 R
-/Contents 25 0 R
->>
-endobj
-27 0 obj
-<< /Length 417 /Filter [ /ASCII85Decode /FlateDecode ]
- >>
-stream
-GarnS;+ne\&:Vs/38ZdD/4l<XI?Wn"M?Ci7L=V,4MeuirZ!/+Blcn/CXMMPSq!Pc;IG\V%U?R7r(dn.[#aWCL+?1DdlQS.h\0QW)+US\a$Gqqc(h1<9iNBbDf3j_jRDT0a+MI6T;V?2Hih'\O,ac]f2Ih\A@,P=IQt#=jLLAZdX_uE5-D\6WgUu'rojDWaCh%pe;[E)D<GJ/7bI&pDF"mrfVs"4ObfT1*B#7h!a#"JQA;#4BJu[2iY$u?SUF.l[3QZi8hT:o:,f1a9O:WC(g?W#_<T\W%CC8o-\'h:`,J?73"_/-E?]U72s8)LngDm9*)Ul"6V:TIqI.4A\G-a"%db)E0*R1;M^meMe+0'*<#5i\iI-kA1K7uM\V/;a8@1e"%A<Jtih%IZZb\(c&g?V)iH'R8!a/0U~>
-endstream
-endobj
-28 0 obj
-<< /Type /Page
-/Parent 1 0 R
-/MediaBox [ 0 0 595 842 ]
-/Resources 3 0 R
-/Contents 27 0 R
->>
-endobj
-29 0 obj
-<< /Length 530 /Filter [ /ASCII85Decode /FlateDecode ]
- >>
-stream
-Gasal>u-),'Rf.Ggc&B1[3(WV53`!$)OG+_dHGscLnbRGA=JMWhN"<DMT3B;3VS/Qc97+1DuYar$R'id0Tt'.^aO#:>2N0$^]ZA[M+>A>5X:^t0SE8AKXn'7i6`W@QjAj+XTn7td:M.%aLX1OIVHTQ6U[cQT2<Z8d,aSNO<A!B#QImR>*mtT("0aBl6+]DSlKc-W,d(>"Rjd<>HmsY2O?YQeKQg":?#G/1C(Q7?SteEjG"+(0gqC3EcLpAe6g5aEIWToFg+9n+6p4)(p.':-g>uHlZl\$/=bA')/cJIl^tKd9Hqd]Z)Q#&4gU)J.Y$kb\JDQ)*R3cX9&c\qje<X^2"KM9J/[b(,>qqkOs@gH#T4a+0LuOhs.Z0*U:hLaZuJ)2K!!5NWsXqrFL*\KM.JVH8J\6"O%D=>#"l1Aj6dC@n_999>E@>ns)@q1b8;P:BW"Q/]2#E8!#E1QosiG)3j,htT-)d;qd">jmpP;@B5ZkLW\X5CSO+VW.[hZ>XdHSs>,G%26FX#n"A%2IoD~>
-endstream
-endobj
-30 0 obj
-<< /Type /Page
-/Parent 1 0 R
-/MediaBox [ 0 0 595 842 ]
-/Resources 3 0 R
-/Contents 29 0 R
->>
-endobj
-31 0 obj
-<< /Length 427 /Filter [ /ASCII85Decode /FlateDecode ]
- >>
-stream
-GarnS>t`'h'Re<2\A!*Y=[&9$HW&uaQoInn3j_*#P-r+a`O[f%pL\8bQFOT_E,p!e4XZZ;BY:"R,D\:7?q&iPJtp&c[R-114!YAMLk<NqJop'%Jk-5BKY(O+9CQV:WU0t;l33Bom=JJUh`YqBE#CPT]IXsaJldbH:,V)U(-`7<D1330,q*V6<;N[t3&m\5FU%XJ4WtN*Wfp'm'?>r?6nrgW5d4qM>hdG.FrmCh'Ja=6Q"&0YPe`MVONL96El]^e?<.JH27c<,6cK0UkqX;R0aY,G$ml*u7Ct!L-7_u"reX+OhO\gi=P\4H&e$Rp])-a0nZVXn[7tXA=$p.H3qoH$X'6+HgV&m7ZS4<3NqR'hGi3_8%3*j**<L[s1LGKrqg.%1549D&n,FKH'Qkk98!(bF+10^9:PJB";gngK];f*~>
-endstream
-endobj
-32 0 obj
-<< /Type /Page
-/Parent 1 0 R
-/MediaBox [ 0 0 595 842 ]
-/Resources 3 0 R
-/Contents 31 0 R
->>
-endobj
-33 0 obj
-<< /Type /Font
-/Subtype /Type1
-/Name /F1
-/BaseFont /Helvetica
-/Encoding /WinAnsiEncoding >>
-endobj
-34 0 obj
-<< /Type /Font
-/Subtype /Type1
-/Name /F5
-/BaseFont /Times-Roman
-/Encoding /WinAnsiEncoding >>
-endobj
-1 0 obj
-<< /Type /Pages
-/Count 13
-/Kids [8 0 R 10 0 R 12 0 R 14 0 R 16 0 R 18 0 R 20 0 R 22 0 R 24 0 R 26 0 R 28 0 R 30 0 R 32 0 R ] >>
-endobj
-2 0 obj
-<< /Type /Catalog
-/Pages 1 0 R
- >>
-endobj
-3 0 obj
-<< 
-/Font << /F1 33 0 R /F5 34 0 R >> 
-/ProcSet [ /PDF /ImageC /Text ] /XObject <</Im1 6 0 R 
-/Im2 7 0 R 
- >>
->> 
-endobj
-xref
-0 35
-0000000000 65535 f 
-0000018570 00000 n 
-0000018713 00000 n 
-0000018763 00000 n 
-0000000015 00000 n 
-0000000071 00000 n 
-0000000583 00000 n 
-0000006251 00000 n 
-0000010060 00000 n 
-0000010166 00000 n 
-0000010695 00000 n 
-0000010802 00000 n 
-0000011557 00000 n 
-0000011665 00000 n 
-0000012254 00000 n 
-0000012362 00000 n 
-0000012906 00000 n 
-0000013014 00000 n 
-0000013643 00000 n 
-0000013751 00000 n 
-0000014429 00000 n 
-0000014537 00000 n 
-0000015046 00000 n 
-0000015154 00000 n 
-0000015654 00000 n 
-0000015762 00000 n 
-0000016270 00000 n 
-0000016378 00000 n 
-0000016887 00000 n 
-0000016995 00000 n 
-0000017617 00000 n 
-0000017725 00000 n 
-0000018244 00000 n 
-0000018352 00000 n 
-0000018460 00000 n 
-trailer
-<<
-/Size 35
-/Root 2 0 R
-/Info 4 0 R
->>
-startxref
-18892
-%%EOF
diff --git a/src/webapp/lenya/resources/misc/lucene/htdocs_dump_regression_test/index.html b/src/webapp/lenya/resources/misc/lucene/htdocs_dump_regression_test/index.html
deleted file mode 100644
index 8b024cc..0000000
--- a/src/webapp/lenya/resources/misc/lucene/htdocs_dump_regression_test/index.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-<html>
-<head>
-<title>Start Lucene Regression Test</title>
-</head>
-<body>
-<a href="title.html">Test searching within title</a>
-<br>
-<a href="contents.html">Test searching within contents</a>
-<br>
-<a href="iex2003.pdf">Test PDF</a>
-<br>
-<a href="no-title.html">No title</a>
-<br>
-<a href="do-not-index-specific-areas.html">Do not index specific areas</a>
-</body>
diff --git a/src/webapp/lenya/resources/misc/lucene/htdocs_dump_regression_test/no-title.html b/src/webapp/lenya/resources/misc/lucene/htdocs_dump_regression_test/no-title.html
deleted file mode 100644
index 00160a8..0000000
--- a/src/webapp/lenya/resources/misc/lucene/htdocs_dump_regression_test/no-title.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-<html>
-<body>
-<h1>No HTML Title</h1>
-/html/head/title is missing here!
-</body>
diff --git a/src/webapp/lenya/resources/misc/lucene/htdocs_dump_regression_test/robots.txt b/src/webapp/lenya/resources/misc/lucene/htdocs_dump_regression_test/robots.txt
deleted file mode 100644
index 91e90eb..0000000
--- a/src/webapp/lenya/resources/misc/lucene/htdocs_dump_regression_test/robots.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-# cocoon.apache.org
-
-User-agent: *
-Disallow: /there_seems_to_be_a_bug_within_websphinx_Robot_Exclusion.html
-#Disallow:
-
-User-agent: lenya
-Disallow: /docs/
-Disallow: /license.html
diff --git a/src/webapp/lenya/resources/misc/lucene/htdocs_dump_regression_test/title.html b/src/webapp/lenya/resources/misc/lucene/htdocs_dump_regression_test/title.html
deleted file mode 100644
index 93c3d3a..0000000
--- a/src/webapp/lenya/resources/misc/lucene/htdocs_dump_regression_test/title.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-<html>
-<head>
-<title>TestSearchingWithinTitle</title>
-</head>
-<body>
-<h1>Test searching within title</h1>
-The title says all
-</body>
diff --git a/src/webapp/lenya/resources/misc/lucene/lucene.xconf b/src/webapp/lenya/resources/misc/lucene/lucene.xconf
deleted file mode 100644
index 071ee4a..0000000
--- a/src/webapp/lenya/resources/misc/lucene/lucene.xconf
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: lucene.xconf,v 1.2 2004/03/13 12:42:08 gregor Exp $ -->
-
-<lucene>
-  <update-index type="new"/>
-<!--
-  <update-index type="incremental"/>
--->
-  <index-dir src="../lucene/index"/>
-  <htdocs-dump-dir src="../lucene/htdocs_dump_regression_test"/>
-</lucene>
diff --git a/src/webapp/lenya/resources/misc/xopus/download.xhtml b/src/webapp/lenya/resources/misc/xopus/download.xhtml
deleted file mode 100644
index df13508..0000000
--- a/src/webapp/lenya/resources/misc/xopus/download.xhtml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-    
-<page:page  
-   xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0">
-<page:title>It seems that Xopus is not installed on your server</page:title>
-<page:body>
-<div class="lenya-box">
-Lenya is expecting an <em>@XOPUS:CONTEXT@</em> (e.g. Xopus-2.1.66) directory within your <em>@XOPUS:PATH@</em> (e.g. <em>webapps/ROOT</em>) directory, whereas <em>@XOPUS:CONTEXT@</em> and <em>@XOPUS:PATH@</em> are being configured within <em>build.properties</em> (xopus.context resp. xopus.path). The path is relative to <em>usecase.xmap</em>. Also don't forget to patch the files within the <em>xopusPlugins</em> directory (<em>cmsdriver.js</em>, etc.) according to the Apache Lenya documentation.
-<br />
-<br />
-Xopus is not Open Source, but you can buy it at <a href="http://www.xopus.com">http://www.xopus.com</a>.
-</div>
-      </page:body>
-    </page:page>
diff --git a/src/webapp/lenya/resources/schemas/dublincore/dublincore.rng b/src/webapp/lenya/resources/schemas/dublincore/dublincore.rng
deleted file mode 100644
index 37b21bb..0000000
--- a/src/webapp/lenya/resources/schemas/dublincore/dublincore.rng
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: dublincore.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-    
-<grammar xmlns="http://relaxng.org/ns/structure/1.0"
-         xmlns:dc="http://purl.org/dc/elements/1.1/"
-         xmlns:dcterms="http://purl.org/dc/terms/"
-         >
-
-<!-- Dublin Core Schema -->
-
-<define name="dublincore">
-  <interleave>
-    
-  <optional><element name="dc:title"><text/></element></optional>
-  <optional><element name="dc:creator"><text/></element></optional>
-  <optional><element name="dc:subject"><text/></element></optional>
-  <optional><element name="dc:description"><text/></element></optional>
-  <optional><element name="dc:publisher"><text/></element></optional>
-  <optional><element name="dc:contributor"><text/></element></optional>
-  <optional><element name="dc:date"><text/></element></optional>
-  <optional><element name="dc:type"><text/></element></optional>
-  <optional><element name="dc:format"><text/></element></optional>
-  <optional><element name="dc:identifier"><text/></element></optional>
-  <optional><element name="dc:source"><text/></element></optional>
-  <optional><element name="dc:language"><text/></element></optional>
-  <optional><element name="dc:relation"><text/></element></optional>
-  <optional><element name="dc:coverage"><text/></element></optional>
-  <optional><element name="dc:rights"><text/></element></optional>
-  
-  <optional><element name="dcterms:audience"><text/></element></optional>
-  <optional><element name="dcterms:alternative"><text/></element></optional>
-  <optional><element name="dcterms:tableOfContents"><text/></element></optional>
-  <optional><element name="dcterms:abstract"><text/></element></optional>
-  <optional><element name="dcterms:created"><text/></element></optional>
-  <optional><element name="dcterms:valid"><text/></element></optional>
-  <optional><element name="dcterms:available"><text/></element></optional>
-  <optional><element name="dcterms:issued"><text/></element></optional>
-  <optional><element name="dcterms:modified"><text/></element></optional>
-  <optional><element name="dcterms:extent"><text/></element></optional>
-  <optional><element name="dcterms:medium"><text/></element></optional>
-  <optional><element name="dcterms:isVersionOf"><text/></element></optional>
-  <optional><element name="dcterms:hasVersion"><text/></element></optional>
-  <optional><element name="dcterms:isReplacedBy"><text/></element></optional>
-  <optional><element name="dcterms:replaces"><text/></element></optional>
-  <optional><element name="dcterms:isRequiredBy"><text/></element></optional>
-  <optional><element name="dcterms:requires"><text/></element></optional>
-  <optional><element name="dcterms:isPartOf"><text/></element></optional>
-  <optional><element name="dcterms:hasPart"><text/></element></optional>
-  <optional><element name="dcterms:isReferencedBy"><text/></element></optional>
-  <optional><element name="dcterms:references"><text/></element></optional>
-  <optional><element name="dcterms:isFormatOf"><text/></element></optional>
-  <optional><element name="dcterms:hasFormat"><text/></element></optional>
-  <optional><element name="dcterms:conformsTo"><text/></element></optional>
-  <optional><element name="dcterms:spatial"><text/></element></optional>
-  <optional><element name="dcterms:temporal"><text/></element></optional>
-  <optional><element name="dcterms:mediator"><text/></element></optional>
-  <optional><element name="dcterms:dateAccepted"><text/></element></optional>
-  <optional><element name="dcterms:dateCopyrighted"><text/></element></optional>
-  <optional><element name="dcterms:dateSubmitted"><text/></element></optional>
-  <optional><element name="dcterms:educationLevel"><text/></element></optional>
-  <optional><element name="dcterms:accessRights"><text/></element></optional>
-  <optional><element name="dcterms:bibliographicCitation"><text/></element></optional>
-  
-  </interleave>
-</define>
-
-</grammar>
diff --git a/src/webapp/lenya/resources/schemas/lenya.rng b/src/webapp/lenya/resources/schemas/lenya.rng
deleted file mode 100644
index 0f8c15c..0000000
--- a/src/webapp/lenya/resources/schemas/lenya.rng
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: lenya.rng 160958 2005-04-11 21:40:46Z andreas $ -->
-
-<grammar ns="http://www.w3.org/1999/xhtml"
-         xmlns="http://relaxng.org/ns/structure/1.0"
-         xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0"
-         xmlns:dc="http://purl.org/dc/elements/1.1/"
-         xmlns:dcterms="http://purl.org/dc/terms/"
-         xmlns:xhtml="http://www.w3.org/1999/xhtml"
-         >
-
-
-<include href="dublincore/dublincore.rng"/>
-
-
-<define name="lenya.meta">
-  <element name="lenya:meta">
-    <ref name="dublincore"/>
-  </element>
-</define>
-
-
-<define name="lenya.asset">
-  <element name="lenya:asset">
-    <attribute name="src"><ref name="Text.datatype"/></attribute>
-    <attribute name="type"><ref name="Text.datatype"/></attribute>
-    <attribute name="size"><ref name="Number.datatype"/></attribute>
-    <text/>
-  </element>
-</define>
-
-
-<!-- namespace dummy attributes -->
-<define name="dummy.attlist">
-  <optional><attribute name="dummy"><ref name="Text.datatype"/></attribute></optional>
-  <optional><attribute name="dc:dummy"><ref name="Text.datatype"/></attribute></optional>
-  <optional><attribute name="dcterms:dummy"><ref name="Text.datatype"/></attribute></optional>
-  <optional><attribute name="lenya:dummy"><ref name="Text.datatype"/></attribute></optional>
-  <optional><attribute name="xhtml:dummy"><ref name="Text.datatype"/></attribute></optional>
-</define>
-
-
-</grammar>
diff --git a/src/webapp/lenya/resources/schemas/xhtml.rng b/src/webapp/lenya/resources/schemas/xhtml.rng
deleted file mode 100644
index 095f871..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml.rng
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: xhtml.rng 168097 2005-05-04 07:49:22Z jwkaltz $ -->
-
-<!--+
-    | XHTML doctype
-    +-->
-
-<!--+
-    | Namespaces:
-    | lenya namespace is required for embedding assets.
-    +-->
-
-<grammar ns="http://www.w3.org/1999/xhtml"
-         xmlns="http://relaxng.org/ns/structure/1.0"
-         xmlns:xhtml="http://www.w3.org/1999/xhtml"
-         xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0"
-         >
-
-
-<!-- include Lenya schema, for Lenya assets within xhtml -->
-<include href="lenya.rng"/>
-
-<!-- include original XHTML transitional schema -->
-<include href="xhtml/xhtml-basic.rng">
-
-  <define name="html">
-    <element name="html">
-      <ref name="html.attlist"/>
-      <ref name="head"/>
-      <ref name="body"/>
-    </element>
-  </define>
-
-  <define name="html.attlist">
-    <ref name="XHTML.version.attrib"/>
-    <ref name="I18n.attrib"/>
-  </define>
-
-</include>
-
-
-<!-- additional block elements -->
-<define name="Block.class" combine="choice">
-  <choice>
-    <ref name="lenya.asset"/>
-  </choice>
-</define>
-
-
-</grammar>
diff --git a/src/webapp/lenya/resources/schemas/xhtml/exclude/basic-table.rng b/src/webapp/lenya/resources/schemas/xhtml/exclude/basic-table.rng
deleted file mode 100644
index a4b30be..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/exclude/basic-table.rng
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: basic-table.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-    
-<!--
-  Checks exclusions applying to basic-table module.
-  This schema is intended to be used in addition to xhtml.rng.
--->
-<grammar ns="http://www.w3.org/1999/xhtml" xmlns="http://relaxng.org/ns/structure/1.0">
-  <start>
-    <ref name="normalElement"/>
-  </start>
-  <define name="normalElement">
-    <element>
-      <anyName>
-        <except>
-          <name>table</name>
-        </except>
-      </anyName>
-      <ref name="normalContent"/>
-    </element>
-  </define>
-  <define name="normalContent">
-    <zeroOrMore>
-      <choice>
-        <ref name="normalElement"/>
-        <ref name="tableElement"/>
-        <ref name="anyAttribute"/>
-        <text/>
-      </choice>
-    </zeroOrMore>
-  </define>
-  <define name="tableElement">
-    <element name="table">
-      <ref name="tableContent"/>
-    </element>
-  </define>
-  <define name="tableContent">
-    <zeroOrMore>
-      <choice>
-        <element>
-          <anyName>
-            <except>
-              <name>table</name>
-            </except>
-          </anyName>
-          <ref name="tableContent"/>
-        </element>
-        <ref name="anyAttribute"/>
-        <text/>
-      </choice>
-    </zeroOrMore>
-  </define>
-  <define name="anyAttribute">
-    <attribute>
-      <anyName/>
-    </attribute>
-  </define>
-</grammar>
diff --git a/src/webapp/lenya/resources/schemas/xhtml/exclude/basic.rng b/src/webapp/lenya/resources/schemas/xhtml/exclude/basic.rng
deleted file mode 100644
index 3ffb716..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/exclude/basic.rng
+++ /dev/null
@@ -1,140 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: basic.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-    
-<!--
-  Checks exclusions applying to "a" and "pre" elements.
-  This schema is intended to be used in addition to xhtml.rng.
--->
-<grammar ns="http://www.w3.org/1999/xhtml" xmlns="http://relaxng.org/ns/structure/1.0">
-  <start>
-    <ref name="normalElement"/>
-  </start>
-  <define name="normalElement">
-    <element>
-      <anyName>
-        <except>
-          <name>a</name>
-          <name>pre</name>
-        </except>
-      </anyName>
-      <ref name="normalContent"/>
-    </element>
-  </define>
-  <define name="normalContent">
-    <zeroOrMore>
-      <choice>
-        <ref name="normalElement"/>
-        <ref name="aElement"/>
-        <ref name="preElement"/>
-        <ref name="anyAttribute"/>
-        <text/>
-      </choice>
-    </zeroOrMore>
-  </define>
-  <define name="aElement">
-    <element name="a">
-      <ref name="aContent"/>
-    </element>
-  </define>
-  <define name="aContent">
-    <zeroOrMore>
-      <choice>
-        <element>
-          <anyName>
-            <except>
-              <name>a</name>
-              <name>pre</name>
-            </except>
-          </anyName>
-          <ref name="aContent"/>
-        </element>
-        <ref name="anyAttribute"/>
-        <text/>
-      </choice>
-    </zeroOrMore>
-  </define>
-  <define name="preElement">
-    <element name="pre">
-      <ref name="preContent"/>
-    </element>
-  </define>
-  <define name="preContent">
-    <zeroOrMore>
-      <choice>
-        <element>
-          <anyName>
-            <except>
-              <name>a</name>
-              <name>pre</name>
-              <name>img</name>
-              <name>object</name>
-              <name>applet</name>
-              <name>big</name>
-              <name>small</name>
-              <name>sub</name>
-              <name>sup</name>
-              <name>font</name>
-              <name>basefont</name>
-            </except>
-          </anyName>
-          <ref name="preContent"/>
-        </element>
-        <ref name="aPreElement"/>
-        <ref name="anyAttribute"/>
-        <text/>
-      </choice>
-    </zeroOrMore>
-  </define>
-  <define name="aPreElement">
-    <element name="a">
-      <ref name="aPreContent"/>
-    </element>
-  </define>
-  <define name="aPreContent">
-    <zeroOrMore>
-      <choice>
-        <element>
-          <anyName>
-            <except>
-              <name>a</name>
-              <name>pre</name>
-              <name>img</name>
-              <name>object</name>
-              <name>applet</name>
-              <name>big</name>
-              <name>small</name>
-              <name>sub</name>
-              <name>sup</name>
-              <name>font</name>
-              <name>basefont</name>
-            </except>
-          </anyName>
-          <ref name="aPreContent"/>
-        </element>
-        <ref name="anyAttribute"/>
-        <text/>
-      </choice>
-    </zeroOrMore>
-  </define>
-  <define name="anyAttribute">
-    <attribute>
-      <anyName/>
-    </attribute>
-  </define>
-</grammar>
diff --git a/src/webapp/lenya/resources/schemas/xhtml/exclude/form.rng b/src/webapp/lenya/resources/schemas/xhtml/exclude/form.rng
deleted file mode 100644
index 9964966..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/exclude/form.rng
+++ /dev/null
@@ -1,136 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: form.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-
-<!--
-  Checks exclusions applying to form and basic-form modules.
-  This schema is intended to be used in addition to xhtml.rng.
--->
-<grammar ns="http://www.w3.org/1999/xhtml" xmlns="http://relaxng.org/ns/structure/1.0">
-  <start>
-    <ref name="normalElement"/>
-  </start>
-  <define name="normalElement">
-    <element>
-      <anyName>
-        <except>
-          <name>form</name>
-          <name>label</name>
-          <name>button</name>
-        </except>
-      </anyName>
-      <ref name="normalContent"/>
-    </element>
-  </define>
-  <define name="normalContent">
-    <zeroOrMore>
-      <choice>
-        <ref name="normalElement"/>
-        <ref name="formElement"/>
-        <ref name="labelElement"/>
-        <ref name="buttonElement"/>
-        <ref name="anyAttribute"/>
-        <text/>
-      </choice>
-    </zeroOrMore>
-  </define>
-  <define name="formElement">
-    <element name="form">
-      <ref name="formContent"/>
-    </element>
-  </define>
-  <define name="formContent">
-    <zeroOrMore>
-      <choice>
-        <element>
-          <anyName>
-            <except>
-              <name>form</name>
-              <name>label</name>
-              <name>button</name>
-            </except>
-          </anyName>
-          <ref name="formContent"/>
-        </element>
-        <ref name="labelElement"/>
-        <ref name="buttonElement"/>
-        <ref name="anyAttribute"/>
-        <text/>
-      </choice>
-    </zeroOrMore>
-  </define>
-  <define name="labelElement">
-    <element name="label">
-      <ref name="labelContent"/>
-    </element>
-  </define>
-  <define name="labelContent">
-    <zeroOrMore>
-      <choice>
-        <element>
-          <anyName>
-            <except>
-              <name>form</name>
-              <name>label</name>
-              <name>button</name>
-            </except>
-          </anyName>
-          <ref name="labelContent"/>
-        </element>
-        <ref name="buttonElement"/>
-        <ref name="anyAttribute"/>
-        <text/>
-      </choice>
-    </zeroOrMore>
-  </define>
-  <define name="buttonElement">
-    <element name="button">
-      <ref name="buttonContent"/>
-    </element>
-  </define>
-  <define name="buttonContent">
-    <zeroOrMore>
-      <choice>
-        <element>
-          <anyName>
-            <except>
-              <name>a</name>
-              <name>input</name>
-              <name>select</name>
-              <name>textarea</name>
-              <name>label</name>
-              <name>button</name>
-              <name>form</name>
-              <name>isindex</name>
-              <name>fieldset</name>
-              <name>iframe</name>
-            </except>
-          </anyName>
-          <ref name="buttonContent"/>
-        </element>
-        <ref name="anyAttribute"/>
-        <text/>
-      </choice>
-    </zeroOrMore>
-  </define>
-  <define name="anyAttribute">
-    <attribute>
-      <anyName/>
-    </attribute>
-  </define>
-</grammar>
diff --git a/src/webapp/lenya/resources/schemas/xhtml/index.html b/src/webapp/lenya/resources/schemas/xhtml/index.html
deleted file mode 100644
index 8631a69..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/index.html
+++ /dev/null
@@ -1,127 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<html xmlns="http://www.w3.org/1999/xhtml">
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: index.html 42702 2004-03-13 12:34:18Z gregor $ -->
-
-<head>
-<title>Modularization of XHTML in RELAX NG</title>
-</head>
-<body>
-<h1>Modularization of XHTML in RELAX NG</h1>
-
-<p>This directory contains an implementataion in RELAX NG of the
-modularization of XHTML specified by the <a
-href="http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410"
->Modularization of XHTML Recommendation</a>.</p>
-
-<p>The RELAX NG schema has not been mechanically derived from the DTDs.
-Rather, it has been hand-crafted so as to produce a good quality RELAX NG
-schema.  However, it may well contain bugs.</p>
-
-<p>The <a href="modules"><code>modules</code></a> directory contains
-all the modules; <a
-href="xhtml-basic.rng"><code>xhtml-basic.rng</code></a> uses the
-modules to implement <a href="http://www.w3.org/TR/xhtml-basic/">XHTML
-Basic</a>; <a
-href="xhtml-strict.rng"><code>xhtml-strict.rng</code></a> uses the
-modules to implement <a href="http://www.w3.org/TR/xhtml1/">XHTML
-1.0</a> strict; <a href="xhtml.rng"><code>xhtml.rng</code></a> uses
-the modules to implement the union of <a
-href="http://www.w3.org/TR/xhtml1/">XHTML 1.0</a> transitional and <a
-href="http://www.w3.org/TR/xhtml1/">XHTML 1.0</a> frameset.  You can
-<a href="http://www.thaiopensource.com/download">download</a>
-everything as part of the main Jing distribution.  To create a custom
-version of XHTML, simply copy <code>xhtml.rng</code> and delete the
-inclusions of the modules that you do not want.</p>
-
-<p>The biggest difference between the RELAX NG implementation and the
-DTD implementation is that the RELAX NG implementation does not
-require you to create a model module specific to the combination of
-XHTML modules you are using. Instead, simply include the modules you
-want. The modules take care of redefining the content models
-appropriately.</p>
-
-<p>Note also the following differences:</p>
-
-<ul>
-
-<li>The frames module is used instead of the struct module, rather
-than in addition to it.</li>
-
-<li>In the frames module, the <code>frameset</code> element does not
-restrict the optional <code>noframes</code> element to follow all the
-other child elements. XHTML Modularization is inconsistent with both
-HTML 4.0 and XHTML 1.0 here.</li>
-
-<li>In the basic tables abstract module, the <code>table</code>
-element does not have a <code>width</code> attribute.  The XHTML Rec is
-ambiguous here: the abstract module has the attribute, but the DTD
-does not.</li>
-
-<li>The object and applet modules takes advantage of RELAX NG's
-absence of restrictions on mixed content to enforce the requirement
-that <code>param</code>s precede other content.</li>
-
-<li>The forms module takes advantage of RELAX NG's absence of
-restrictions on mixed content to enforce the requirement that any
-<code>legend</code> precedes other content.</li>
-
-<li>The RELAX NG schema does not enforce exclusions. The HTML 4 DTD
-uses exclusions in several places, for example, to disallow an
-<code>a</code> element from having an <code>a</code> element as a
-descendant. It is not possible to represent this constraint in XML
-DTDs. XHTML Modularization takes the approach of partially
-representing this restriction by, for example, disallowing an
-<code>a</code> element from having an <code>a</code> element as a
-<em>child</em>, without disallowing it from having an <code>a</code>
-element as a non-immediate descendant.  This partial restriction has a
-substantial cost in increasing the complexity and reducing the
-modularity of the schemas. This implementation adopts a different
-approach. The <a href="exclude"><code>exclude</code></a> directory
-contains separate, independent RELAX NG schemas that enforce
-exclusions.  To check use of exclusions, a document should be
-validated against each of these schemas that is applicable <strong>in
-addition to</strong> being validated against the RELAX NG XHTML schema
-proper. The available schemas are as follows:
-
-<dl>
-
-<dt><a href="exclude/basic.rng"><code>exclude/basic.rng</code></a></dt>
-<dd>checks the exclusions relating to <code>a</code> and
-<code>pre</code> elements</dd>
-
-<dt><a
-href="exclude/basic-table.rng"><code>exclude/basic-table.rng</code></a></dt>
-
-<dd>checks the exclusions relating to basic tables module (i.e.
-checks that <code>table</code> elements are not nested)</dd>
-
-<dt><a href="exclude/form.rng"><code>exclude/form.rng</code></a></dt>
-
-<dd>checks the exclusions relating to forms and basic forms modules</dd>
-
-</dl>
-
-</li>
-
-</ul>
-
-<address><a href="mailto:jjc@jclark.com">James Clark</a></address>
-
-</body>
-</html>
diff --git a/src/webapp/lenya/resources/schemas/xhtml/modules/applet.rng b/src/webapp/lenya/resources/schemas/xhtml/modules/applet.rng
deleted file mode 100644
index 8203f25..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/modules/applet.rng
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: applet.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-
-<!-- Applet Module -->
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
-
-<define name="applet">
-  <element name="applet">
-    <ref name="applet.attlist"/>
-    <!-- No restrictions on mixed content in TREX. -->
-    <zeroOrMore>
-      <ref name="param"/>
-    </zeroOrMore>
-    <ref name="Flow.model"/>
-  </element>
-</define>
-
-<define name="applet.attlist">
-  <ref name="Core.attrib"/>
-  <attribute name="alt">
-    <ref name="Text.datatype"/>
-  </attribute>
-  <optional>
-    <attribute name="archive"/>
-  </optional>
-  <optional>
-    <attribute name="code"/>
-  </optional>
-  <optional>
-    <attribute name="codebase">
-      <ref name="URI.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="object"/>
-  </optional>
-  <attribute name="height">
-    <ref name="Length.datatype"/>
-  </attribute>
-  <attribute name="width">
-    <ref name="Length.datatype"/>
-  </attribute>
-</define>
-
-<define name="Inline.class" combine="choice">
-  <ref name="applet"/>
-</define>
-
-</grammar>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/schemas/xhtml/modules/attribs.rng b/src/webapp/lenya/resources/schemas/xhtml/modules/attribs.rng
deleted file mode 100644
index 17de5dd..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/modules/attribs.rng
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: attribs.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-    
-<!-- Common Attributes Module -->
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
-
-<define name="id.attrib">
-  <optional>
-    <attribute name="id">
-      <ref name="ID.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="class.attrib">
-  <optional>
-    <attribute name="class">
-      <ref name="NMTOKENS.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="title.attrib">
-  <optional>
-    <attribute name="title">
-      <ref name="Text.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="Core.attrib">
-  <ref name="id.attrib"/>
-  <ref name="class.attrib"/>
-  <ref name="title.attrib"/>
-</define>
-
-<define name="lang.attrib">
-  <optional>
-    <attribute name="xml:lang">
-      <ref name="LanguageCode.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="I18n.attrib">
-  <ref name="lang.attrib"/>
-</define>
-
-<define name="Common.attrib">
-  <ref name="Core.attrib"/>
-  <ref name="I18n.attrib"/>
-</define>
-
-<define name="CommonIdRequired.attrib">
-  <attribute name="id">
-    <ref name="ID.datatype"/>
-  </attribute>
-  <ref name="class.attrib"/>
-  <ref name="title.attrib"/>
-  <ref name="I18n.attrib"/>
-</define>
-
-</grammar>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/schemas/xhtml/modules/base.rng b/src/webapp/lenya/resources/schemas/xhtml/modules/base.rng
deleted file mode 100644
index 22ab400..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/modules/base.rng
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: base.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-
-<!-- Base Module -->
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
-
-<define name="base">
-  <element name="base">
-    <ref name="base.attlist"/>
-  </element>
-</define>
-
-<define name="base.attlist">
-  <attribute name="href">
-    <ref name="URI.datatype"/>
-  </attribute>
-</define>
-
-<define name="head.content" combine="interleave">
-  <optional>
-    <ref name="base"/>
-  </optional>
-</define>
-
-</grammar>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/schemas/xhtml/modules/basic-form.rng b/src/webapp/lenya/resources/schemas/xhtml/modules/basic-form.rng
deleted file mode 100644
index 0d41f21..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/modules/basic-form.rng
+++ /dev/null
@@ -1,219 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: basic-form.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-
-    
-<!-- Simplified Forms Module -->
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
-
-<define name="form">
-  <element name="form">
-    <ref name="form.attlist"/>
-    <!-- Don't use Block.model, because this gets redefined by the
-	 legacy module. -->
-    <oneOrMore>
-      <ref name="Block.class"/>
-    </oneOrMore>
-  </element>
-</define>
-
-<define name="form.attlist">
-  <ref name="Common.attrib"/>
-  <attribute name="action">
-    <ref name="URI.datatype"/>
-  </attribute>
-  <optional>
-    <attribute name="method">
-      <choice>
-	<value>get</value>
-	<value>post</value>
-      </choice>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="enctype">
-      <ref name="ContentType.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="label">
-  <element name="label">
-    <ref name="label.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="label.attlist">
-  <ref name="Common.attrib"/>
-  <optional>
-    <attribute name="for">
-      <ref name="IDREF.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="accesskey">
-      <ref name="Character.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="input">
-  <element name="input">
-    <ref name="input.attlist"/>
-  </element>
-</define>
-
-<define name="input.attlist">
-  <ref name="Common.attrib"/>
-  <optional>
-    <attribute name="type">
-      <ref name="InputType.class"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="name"/>
-  </optional>
-  <optional>
-    <attribute name="value"/>
-  </optional>
-  <optional>
-    <attribute name="checked">
-      <value>checked</value>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="size"/>
-  </optional>
-  <optional>
-    <attribute name="maxlength">
-      <ref name="Number.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="src">
-       <ref name="URI.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="accesskey">
-      <ref name="Character.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="InputType.class">
-  <choice>
-    <value>text</value>
-    <value>password</value>
-    <value>checkbox</value>
-    <value>radio</value>
-    <value>submit</value>
-    <value>reset</value>
-    <value>hidden</value>
-  </choice>
-</define>
-
-<define name="select">
-  <element name="select">
-    <ref name="select.attlist"/>
-    <oneOrMore>
-      <ref name="option"/>
-    </oneOrMore>
-  </element>
-</define>
-
-<define name="select.attlist">
-  <ref name="Common.attrib"/>
-  <optional>
-    <attribute name="name"/>
-  </optional>
-  <optional>
-    <attribute name="size">
-      <ref name="Number.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="multiple">
-      <value>multiple</value>
-    </attribute>
-  </optional>
-</define>
-   
-<define name="option">
-  <element name="option">
-    <ref name="Common.attrib"/>
-    <optional>
-      <attribute name="selected">
-        <value>selected</value>
-      </attribute>
-    </optional>
-    <optional>
-      <attribute name="value"/>
-    </optional>
-    <text/>
-  </element>
-</define>
-
-<define name="textarea">
-  <element name="textarea">
-    <ref name="textarea.attlist"/>
-  </element>
-</define>
-
-<define name="textarea.attlist">
-  <ref name="Common.attrib"/>
-  <optional>
-    <attribute name="name"/>
-  </optional>
-  <attribute name="rows">
-    <ref name="Number.datatype"/>
-  </attribute>
-  <attribute name="cols">
-    <ref name="Number.datatype"/>
-  </attribute>
-  <optional>
-    <attribute name="accesskey">
-      <ref name="Character.datatype"/>
-    </attribute>
-  </optional>
-  <text/>
-</define>
-
-<define name="Form.class">
-  <ref name="form"/>
-</define>
-
-<define name="Formctrl.class">
-  <choice>
-    <ref name="input"/>
-    <ref name="label"/>
-    <ref name="select"/>
-    <ref name="textarea"/>
-  </choice>
-</define>
-
-<define name="Block.class" combine="choice">
-  <ref name="Form.class"/>
-</define>
-
-<define name="Inline.class" combine="choice">
-  <ref name="Formctrl.class"/>
-</define>
-
-</grammar>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/schemas/xhtml/modules/basic-table.rng b/src/webapp/lenya/resources/schemas/xhtml/modules/basic-table.rng
deleted file mode 100644
index c01d585..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/modules/basic-table.rng
+++ /dev/null
@@ -1,164 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: basic-table.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-    
-<!-- Basic Tables Module -->
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
-
-<define name="table">
-  <element name="table">
-    <ref name="table.attlist"/>
-    <optional>
-      <ref name="caption"/>
-    </optional>
-    <oneOrMore>
-      <ref name="tr"/>
-    </oneOrMore>
-  </element>
-</define>
-
-<define name="table.attlist">
-  <ref name="Common.attrib"/>
-  <optional>
-    <attribute name="summary">
-      <ref name="Text.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="caption">
-  <element name="caption">
-    <ref name="caption.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="caption.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="tr">
-  <element name="tr">
-    <ref name="tr.attlist"/>
-    <oneOrMore>
-      <choice>
-        <ref name="th"/>
-        <ref name="td"/>
-      </choice>
-    </oneOrMore>
-  </element>
-</define>
-
-<define name="tr.attlist">
-  <ref name="Common.attrib"/>
-  <ref name="CellHAlign.attrib"/>
-  <ref name="CellVAlign.attrib"/>
-</define>
-
-<define name="th">
-  <element name="th">
-    <ref name="th.attlist"/>
-    <ref name="Flow.model"/>
-  </element>
-</define>
-
-<define name="th.attlist">
-  <ref name="Cell.attrib"/>
-</define>
-
-<define name="td">
-  <element name="td">
-    <ref name="td.attlist"/>
-    <ref name="Flow.model"/>
-  </element>
-</define>
-
-<define name="td.attlist">
-  <ref name="Cell.attrib"/>
-</define>
-
-<define name="Cell.attrib">
-  <ref name="Common.attrib"/>
-  <optional>
-    <attribute name="abbr">
-      <ref name="Text.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="axis"/>
-  </optional>
-  <optional>
-    <attribute name="headers">
-      <ref name="IDREFS.datatype"/>
-    </attribute>
-  </optional>
-  <ref name="scope.attrib"/>
-  <optional>
-    <attribute name="rowspan">
-      <ref name="Number.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="colspan">
-      <ref name="Number.datatype"/>
-    </attribute>
-  </optional>
-  <ref name="CellHAlign.attrib"/>
-  <ref name="CellVAlign.attrib"/>
-</define>
-
-<define name="CellHAlign.attrib">
-  <optional>
-    <attribute name="align">
-      <choice>
-	<value>left</value>
-	<value>center</value>
-	<value>right</value>
-      </choice>
-    </attribute>
-  </optional>
-</define>
-
-<define name="CellVAlign.attrib">
-  <optional>
-    <attribute name="valign">
-      <choice>
-	<value>top</value>
-	<value>middle</value>
-	<value>bottom</value>
-      </choice>
-    </attribute>
-  </optional>
-</define>
-
-<define name="scope.attrib">
-  <optional>
-    <attribute name="scope">
-      <choice>
-	<value>row</value>
-	<value>col</value>
-      </choice>
-    </attribute>
-  </optional>
-</define>
-
-<define name="Block.class" combine="choice">
-  <ref name="table"/>
-</define>
-
-</grammar>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/schemas/xhtml/modules/bdo.rng b/src/webapp/lenya/resources/schemas/xhtml/modules/bdo.rng
deleted file mode 100644
index ff5fed7..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/modules/bdo.rng
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: bdo.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-
-<!-- Bi-directional Module -->
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
-
-<define name="bdo">
-  <element name="bdo">
-    <ref name="bdo.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="bdo.attlist">
-  <ref name="Core.attrib"/>
-  <ref name="lang.attrib"/>
-  <ref name="dir.attrib"/>
-</define>
-
-<define name="dir.attrib">
-  <attribute name="dir">
-    <choice>
-      <value>ltr</value>
-      <value>rtl</value>
-    </choice>
-  </attribute>
-</define>
-
-<define name="I18n.attrib" combine="interleave">
-  <optional>
-    <ref name="dir.attrib"/>
-  </optional>
-</define>
-
-<define name="Inline.class" combine="choice">
-  <ref name="bdo"/>
-</define>
-
-</grammar>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/schemas/xhtml/modules/csismap.rng b/src/webapp/lenya/resources/schemas/xhtml/modules/csismap.rng
deleted file mode 100644
index 6edd912..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/modules/csismap.rng
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: csismap.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-
-<!-- Client-side Image Map Module -->
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
-
-<define name="area">
-  <element name="area">
-    <ref name="area.attlist"/>
-  </element>
-</define>
-
-<define name="area.attlist">
-  <ref name="Common.attrib"/>
-  <optional>
-    <attribute name="href">
-      <ref name="URI.datatype"/>
-    </attribute>
-  </optional>
-  <ref name="shape.attrib"/>
-  <ref name="coords.attrib"/>
-  <optional>
-    <attribute name="nohref">
-      <value>nohref</value>
-    </attribute>
-  </optional>
-  <attribute name="alt">
-    <ref name="Text.datatype"/>
-  </attribute>
-  <optional>
-    <attribute name="tabindex">
-      <ref name="Number.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="accesskey">
-      <ref name="Character.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="map">
-  <element name="map">
-    <ref name="map.attlist"/>
-    <oneOrMore>
-      <choice>
-        <!-- This does not use Block.mix
-             because loose.dtd doesn't use %Flow; -->
-        <ref name="Block.class"/>
-        <ref name="area"/>
-      </choice>
-    </oneOrMore>
-  </element>
-</define>
-
-<define name="map.attlist">
-  <ref name="CommonIdRequired.attrib"/>
-</define>
-
-<define name="a.attlist" combine="interleave">
-  <ref name="shape.attrib"/>
-  <ref name="coords.attrib"/>
-</define>
-
-<define name="img.attlist" combine="interleave">
-  <ref name="usemap.attlist"/>
-</define>
-
-<define name="object.attlist" combine="interleave">
-  <ref name="usemap.attlist"/>
-</define>
-
-<define name="usemap.attlist">
-  <optional>
-    <attribute name="usemap">
-      <ref name="IDREF.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="shape.attrib">
-  <optional>
-    <attribute name="shape">
-      <choice>
-        <value>rect</value>
-        <value>circle</value>
-        <value>poly</value>
-        <value>default</value>
-      </choice>
-    </attribute>
-  </optional>
-</define>
-
-<define name="coords.attrib">
-  <optional>
-    <attribute name="coords"/>
-  </optional>
-</define>
-
-<define name="Inline.class" combine="choice">
-  <ref name="map"/>
-</define>
-
-</grammar>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/schemas/xhtml/modules/datatypes.rng b/src/webapp/lenya/resources/schemas/xhtml/modules/datatypes.rng
deleted file mode 100644
index 3201f21..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/modules/datatypes.rng
+++ /dev/null
@@ -1,138 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: datatypes.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-
-<!-- Datatypes Module -->
-<grammar xmlns="http://relaxng.org/ns/structure/1.0"
-         datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
-
-<!-- Length defined for cellpadding/cellspacing -->
-
-<!-- nn for pixels or nn% for percentage length -->
-<define name="Length.datatype">
-  <text/>
-</define>
-
-<!-- space-separated list of link types -->
-<define name="LinkTypes.datatype">
-  <ref name="NMTOKENS.datatype"/>
-</define>
-
-<!-- single or comma-separated list of media descriptors -->
-<define name="MediaDesc.datatype">
-  <text/>
-</define>
-
-<!-- pixel, percentage, or relative -->
-<define name="MultiLength.datatype">
-  <text/>
-</define>
-
-<!-- one or more digits (NUMBER) -->
-<define name="Number.datatype">
-  <text/>
-</define>
-
-<!-- integer representing length in pixels -->
-<define name="Pixels.datatype">
-  <text/>
-</define>
-
-<!-- script expression -->
-<define name="Script.datatype">
-  <text/>
-</define>
-
-<!-- textual content -->
-<define name="Text.datatype">
-  <text/>
-</define>
-
-<!-- Imported Datatypes ................................ -->
-
-<!-- a single character from [ISO10646] -->
-<define name="Character.datatype">
-  <text/>
-</define>
-
-<!-- a character encoding, as per [RFC2045] -->
-<define name="Charset.datatype">
-  <text/>
-</define>
-
-<!-- a space separated list of character encodings, as per [RFC2045] -->
-<define name="Charsets.datatype">
-  <text/>
-</define>
-
-<!-- media type, as per [RFC2045] -->
-<define name="ContentType.datatype">
-  <text/>
-</define>
-
-<!-- comma-separated list of media types, as per [RFC2045] -->
-<define name="ContentTypes.datatype">
-  <text/>
-</define>
-
-<!-- date and time information. ISO date format -->
-<define name="Datetime.datatype">
-  <text/>
-</define>
-
-<!-- formal public identifier, as per [ISO8879] -->
-<define name="FPI.datatype">
-  <text/>
-</define>
-
-<!-- a language code, as per [RFC1766] -->
-<define name="LanguageCode.datatype">
-  <data type="language"/>
-</define>
-
-<!-- a Uniform Resource Identifier, see [URI] -->
-<define name="URI.datatype">
-  <data type="anyURI"/>
-</define>
-
-<!-- a space-separated list of Uniform Resource Identifiers, see [URI] -->
-<define name="URIs.datatype">
-  <text/>
-</define>
-
-<define name="NMTOKEN.datatype">
-  <data type="NMTOKEN"/>
-</define>
-
-<define name="NMTOKENS.datatype">
-  <data type="NMTOKENS"/>
-</define>
-
-<define name="ID.datatype">
-  <data type="ID"/>
-</define>
-
-<define name="IDREF.datatype">
-  <data type="IDREF"/>
-</define>
-
-<define name="IDREFS.datatype">
-  <data type="IDREFS"/>
-</define>
-
-</grammar>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/schemas/xhtml/modules/edit.rng b/src/webapp/lenya/resources/schemas/xhtml/modules/edit.rng
deleted file mode 100644
index 2b8858f..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/modules/edit.rng
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: edit.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-    
-<!-- Edit Module -->
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
-
-<define name="del">
-  <element name="del">
-    <ref name="del.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="del.attlist">
-  <ref name="Edit.attrib"/>
-</define>
-
-<define name="ins">
-  <element name="ins">
-    <ref name="ins.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="ins.attlist">
-  <ref name="Edit.attrib"/>
-</define>
-
-<define name="Edit.attrib">
-  <optional>
-    <attribute name="cite">
-      <ref name="URI.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="datetime">
-      <ref name="Datetime.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="Edit.class">
-  <choice>
-    <ref name="del"/>
-    <ref name="ins"/>
-  </choice>
-</define>
-
-<define name="Inline.class" combine="choice">
-  <ref name="Edit.class"/>
-</define>
-
-<define name="Block.class" combine="choice">
-  <ref name="Edit.class"/>
-</define>
-
-</grammar>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/schemas/xhtml/modules/events.rng b/src/webapp/lenya/resources/schemas/xhtml/modules/events.rng
deleted file mode 100644
index f35681b..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/modules/events.rng
+++ /dev/null
@@ -1,226 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: events.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-    
-<!-- Events Module -->
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
-
-<define name="a.attlist" combine="interleave">
-  <optional>
-    <attribute name="onblur">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="onfocus">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="area.attlist" combine="interleave">
-  <optional>
-    <attribute name="onblur">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="onfocus">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="form.attlist" combine="interleave">
-  <optional>
-    <attribute name="onreset">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="onsubmit">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="body.attlist" combine="interleave">
-  <optional>
-    <attribute name="onload">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="onunload">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="label.attlist" combine="interleave">
-  <optional>
-    <attribute name="onblur">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="onfocus">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="input.attlist" combine="interleave">
-  <optional>
-    <attribute name="onblur">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="onchange">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="onfocus">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="onselect">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="select.attlist" combine="interleave">
-  <optional>
-    <attribute name="onblur">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="onchange">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="onfocus">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="textarea.attlist" combine="interleave">
-  <optional>
-    <attribute name="onblur">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="onchange">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="onfocus">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="onselect">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="button.attlist" combine="interleave">
-  <optional>
-    <attribute name="onblur">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="onfocus">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="Events.attrib">
-  <optional>
-    <attribute name="onclick">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="ondblclick">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="onmousedown">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="onmouseup">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="onmouseover">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="onmousemove">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="onmouseout">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="onkeypress">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="onkeydown">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="onkeyup">
-      <ref name="Script.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="Common.attrib" combine="interleave">
-  <ref name="Events.attrib"/>
-</define>
-
-<define name="CommonIdRequired.attrib" combine="interleave">
-  <ref name="Events.attrib"/>
-</define>
-
-</grammar>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/schemas/xhtml/modules/form.rng b/src/webapp/lenya/resources/schemas/xhtml/modules/form.rng
deleted file mode 100644
index b69ccfe..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/modules/form.rng
+++ /dev/null
@@ -1,227 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: form.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-
-<!-- Forms Module -->
-<!-- Unlike the DTD implementation, this builds on the basic-form module --><grammar xmlns="http://relaxng.org/ns/structure/1.0">
-
-<include href="basic-form.rng">
-
-  <define name="select">
-    <element name="select">
-      <ref name="select.attlist"/>
-      <oneOrMore>
-	<choice>
-	  <ref name="option"/>
-	  <ref name="optgroup"/>
-	</choice>
-      </oneOrMore>
-    </element>
-  </define>
-
-</include>
-
-<define name="form.attlist" combine="interleave">
-  <optional>
-    <attribute name="accept-charset">
-      <ref name="Charsets.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="accept">
-      <ref name="ContentTypes.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="input.attlist" combine="interleave">
-  <optional>
-    <attribute name="disabled">
-      <value>disabled</value>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="readonly">
-      <value>readonly</value>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="alt"/>
-  </optional>
-  <optional>
-    <attribute name="tabindex">
-      <ref name="Number.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="accept">
-      <ref name="ContentTypes.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="InputType.class" combine="choice">
-  <choice>
-    <value>image</value>
-    <value>button</value>
-  </choice>
-</define>
-
-<define name="select.attlist" combine="interleave">
-  <optional>
-    <attribute name="disabled">
-      <value>disabled</value>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="tabindex">
-      <ref name="Number.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="option.attlist" combine="interleave">
-  <optional>
-    <attribute name="disabled">
-      <value>disabled</value>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="label">
-      <ref name="Text.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="optgroup">
-  <element name="optgroup">
-    <ref name="optgroup.attlist"/>
-    <oneOrMore>
-      <ref name="option"/>
-    </oneOrMore>
-  </element>
-</define>
-
-<define name="optgroup.attlist">
-  <ref name="Common.attrib"/>
-  <optional>
-    <attribute name="disabled">
-      <value>disabled</value>
-    </attribute>
-  </optional>
-  <attribute name="label">
-    <ref name="Text.datatype"/>
-  </attribute>
-</define>
-
-<define name="textarea.attlist" combine="interleave">
-  <optional>
-    <attribute name="disabled">
-      <value>disabled</value>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="readonly">
-      <value>readonly</value>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="tabindex">
-      <ref name="Number.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="fieldset">
-  <element name="fieldset">
-    <ref name="fieldset.attlist"/>
-    <ref name="legend"/>
-    <ref name="Flow.model"/>
-  </element>
-</define>
-
-<define name="fieldset.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="button">
-  <element name="button">
-    <ref name="button.attlist"/>
-    <ref name="Flow.model"/>
-  </element>
-</define>
-
-<define name="button.attlist">
-  <ref name="Common.attrib"/>
-  <optional>
-    <attribute name="name"/>
-  </optional>
-  <optional>
-    <attribute name="value"/>
-  </optional>
-  <optional>
-    <attribute name="type">
-      <choice>
-        <value>button</value>
-        <value>submit</value>
-        <value>reset</value>
-      </choice>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="disabled">
-      <value>disabled</value>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="tabindex">
-      <ref name="Number.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="accesskey">
-      <ref name="Character.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="legend">
-  <element name="legend">
-    <ref name="legend.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="legend.attlist">
-  <ref name="Common.attrib"/>
-  <optional>
-    <attribute name="accesskey">
-      <ref name="Character.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="Form.class" combine="choice">
-  <ref name="fieldset"/>
-</define>
-
-<define name="Formctrl.class" combine="choice">
-  <ref name="button"/>
-</define>
-
-</grammar>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/schemas/xhtml/modules/frames.rng b/src/webapp/lenya/resources/schemas/xhtml/modules/frames.rng
deleted file mode 100644
index d44248b..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/modules/frames.rng
+++ /dev/null
@@ -1,129 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: frames.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-
-<!-- Frames Module -->
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
-
-<include href="struct.rng">
-
-  <define name="html">
-    <element name="html">
-      <ref name="html.attlist"/>
-      <ref name="head"/>
-      <ref name="frameset"/>
-    </element>
-  </define>
-
-</include>
-
-<define name="frameset">
-  <element name="frameset">
-    <ref name="frameset.attlist"/>
-    <interleave>
-      <oneOrMore>
-	<choice>
-	  <ref name="frameset"/>
-	  <ref name="frame"/>
-	</choice>
-      </oneOrMore>
-      <optional>
-	<ref name="noframes"/>
-      </optional>
-    </interleave>
-  </element>
-</define>
-
-<define name="frameset.attlist">
-  <ref name="Core.attrib"/>
-  <optional>
-    <attribute name="cols">
-      <ref name="MultiLength.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="rows">
-      <ref name="MultiLength.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="frame">
-  <element name="frame">
-    <ref name="frame.attlist"/>
-  </element>
-</define>
-
-<define name="frame.attlist">
-  <ref name="Core.attrib"/>
-  <optional>
-    <attribute name="longdesc">
-      <ref name="URI.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="src">
-      <ref name="URI.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="frameborder">
-      <choice>
-        <value>1</value>
-        <value>0</value>
-      </choice>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="marginwidth">
-      <ref name="Pixels.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="marginheight">
-      <ref name="Pixels.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="noresize">
-      <value>noresize</value>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="scrolling">
-      <choice>
-        <value>yes</value>
-        <value>no</value>
-        <value>auto</value>
-      </choice>
-    </attribute>
-  </optional>
-</define>
-
-<define name="noframes">
-  <element name="noframes">
-    <ref name="noframes.attlist"/>
-    <ref name="body"/>
-  </element>
-</define>
-
-<define name="noframes.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-</grammar>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/schemas/xhtml/modules/hypertext.rng b/src/webapp/lenya/resources/schemas/xhtml/modules/hypertext.rng
deleted file mode 100644
index ed02826..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/modules/hypertext.rng
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: hypertext.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-
-<!-- Hypertext Module -->
-<!-- Depends on text module. -->
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
-
-<define name="a">
-  <element name="a">
-    <ref name="a.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="a.attlist">
-  <ref name="Common.attrib"/>
-  <optional>
-    <attribute name="href">
-      <ref name="URI.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="charset">
-      <ref name="Charset.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="type">
-      <ref name="ContentType.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="hreflang">
-      <ref name="LanguageCode.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="rel">
-      <ref name="LinkTypes.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="rev">
-      <ref name="LinkTypes.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="accesskey">
-      <ref name="Character.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="tabindex">
-      <ref name="Number.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="Inline.class" combine="choice">
-  <ref name="a"/>
-</define>
-
-</grammar>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/schemas/xhtml/modules/iframe.rng b/src/webapp/lenya/resources/schemas/xhtml/modules/iframe.rng
deleted file mode 100644
index 1a45452..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/modules/iframe.rng
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: iframe.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-
-<!-- Iframe Module -->
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
-
-<define name="iframe">
-  <element name="iframe">
-    <ref name="iframe.attlist"/>
-    <ref name="Flow.model"/>
-  </element>
-</define>
-
-<define name="iframe.attlist">
-  <ref name="Core.attrib"/>
-  <optional>
-    <attribute name="longdesc">
-      <ref name="URI.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="src">
-      <ref name="URI.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="frameborder">
-      <choice>
-        <value>1</value>
-        <value>0</value>
-      </choice>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="width">
-      <ref name="Length.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="height">
-      <ref name="Length.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="marginwidth">
-      <ref name="Pixels.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="marginheight">
-      <ref name="Pixels.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="scrolling">
-      <choice>
-        <value>yes</value>
-        <value>no</value>
-        <value>auto</value>
-      </choice>
-    </attribute>
-  </optional>
-</define>
-
-<define name="Inline.class" combine="choice">
-  <ref name="iframe"/>
-</define>
-
-</grammar>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/schemas/xhtml/modules/image.rng b/src/webapp/lenya/resources/schemas/xhtml/modules/image.rng
deleted file mode 100644
index 81455f2..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/modules/image.rng
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: image.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-
-<!-- Image Module -->
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
-
-<define name="img">
-  <element name="img">
-    <ref name="img.attlist"/>
-  </element>
-</define>
-
-<define name="img.attlist">
-  <ref name="Common.attrib"/>
-  <attribute name="src">
-    <ref name="URI.datatype"/>
-  </attribute>
-  <attribute name="alt">
-    <ref name="Text.datatype"/>
-  </attribute>
-  <optional>
-    <attribute name="longdesc">
-      <ref name="URI.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="height">
-      <ref name="Length.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="width">
-      <ref name="Length.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="Inline.class" combine="choice">
-  <ref name="img"/>
-</define>
-
-</grammar>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/schemas/xhtml/modules/inlstyle.rng b/src/webapp/lenya/resources/schemas/xhtml/modules/inlstyle.rng
deleted file mode 100644
index 8c93920..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/modules/inlstyle.rng
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: inlstyle.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-
-<!-- Inline Style Module -->
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
-
-<define name="Core.attrib" combine="interleave">
-  <optional>
-    <attribute name="style"/>
-  </optional>
-</define>
-
-</grammar>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/schemas/xhtml/modules/legacy.rng b/src/webapp/lenya/resources/schemas/xhtml/modules/legacy.rng
deleted file mode 100644
index 2afc197..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/modules/legacy.rng
+++ /dev/null
@@ -1,520 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: legacy.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-
-<!-- Legacy Module -->
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
-
-<define name="lang.attrib" combine="interleave">
-  <optional>
-    <attribute name="lang">
-      <ref name="LanguageCode.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="basefont">
-  <element name="basefont">
-    <ref name="basefont.attlist"/>
-  </element>
-</define>
-
-<define name="basefont.attlist">
-  <ref name="id.attrib"/>
-  <ref name="Font.attrib"/>
-</define>
-
-<define name="center">
-  <element name="center">
-    <ref name="center.attlist"/>
-    <ref name="Flow.model"/>
-  </element>
-</define>
-
-<define name="center.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="font">
-  <element name="font">
-    <ref name="font.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="font.attlist">
-  <ref name="Core.attrib"/>
-  <ref name="I18n.attrib"/>
-  <ref name="Font.attrib"/>
-</define>
-
-<define name="Font.attrib">
-  <optional>
-    <attribute name="size"/>
-  </optional>
-  <optional>
-    <attribute name="color">
-      <ref name="Color.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="face"/>
-  </optional>
-</define>
-
-<define name="s">
-  <element name="s">
-    <ref name="s.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="s.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="strike">
-  <element name="strike">
-    <ref name="strike.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="strike.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="u">
-  <element name="u">
-    <ref name="u.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="u.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="dir">
-  <element name="dir">
-    <ref name="dir.attlist"/>
-    <oneOrMore>
-      <ref name="li.noblock"/>
-    </oneOrMore>
-  </element>
-</define>
-
-<define name="dir.attlist">
-  <ref name="Common.attrib"/>
-  <optional>
-    <attribute name="compact">
-      <value>compact</value>
-    </attribute>
-  </optional>
-</define>
-
-<define name="menu">
-  <element name="menu">
-    <ref name="menu.attlist"/>
-    <oneOrMore>
-      <ref name="li.noblock"/>
-    </oneOrMore>
-  </element>
-</define>
-
-<define name="menu.attlist">
-  <ref name="Common.attrib"/>
-  <optional>
-    <attribute name="compact">
-      <value>compact</value>
-    </attribute>
-  </optional>
-</define>
-
-<define name="li.noblock">
-  <element name="li">
-    <ref name="li.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="isindex">
-  <element name="isindex">
-    <ref name="isindex.attlist"/>
-  </element>
-</define>
-
-<define name="isindex.attlist">
-  <ref name="Core.attrib"/>
-  <ref name="I18n.attrib"/>
-  <optional>
-    <attribute name="prompt">
-      <ref name="Text.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="applet.attlist" combine="interleave">
-  <optional>
-    <attribute name="align">
-      <choice>
-	<value>top</value>
-	<value>middle</value>
-	<value>bottom</value>
-	<value>left</value>
-	<value>right</value>
-      </choice>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="hspace">
-      <ref name="Pixels.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="vspace">
-      <ref name="Pixels.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="body.attlist" combine="interleave">
-  <optional>
-    <attribute name="background">
-      <ref name="URI.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="bgcolor">
-      <ref name="Color.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="text">
-      <ref name="Color.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="link">
-      <ref name="Color.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="vlink">
-      <ref name="Color.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="alink">
-      <ref name="Color.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="br.attlist" combine="interleave">
-  <optional>
-    <attribute name="clear">
-      <choice>
-	<value>left</value>
-	<value>all</value>
-	<value>right</value>
-	<value>none</value>
-      </choice>
-    </attribute>
-  </optional>
-</define>
-
-<define name="caption.attlist" combine="interleave">
-  <ref name="align.attrib"/>
-</define>
-
-<define name="div.attlist" combine="interleave">
-  <ref name="align.attrib"/>
-</define>
-
-<!-- Not in the CR, but surely an error. -->
-
-<define name="dl.attlist" combine="interleave">
-  <optional>
-    <attribute name="compact">
-      <value>compact</value>
-    </attribute>
-  </optional>
-</define>
-
-<define name="Heading.attrib" combine="interleave">
-  <ref name="align.attrib"/>
-</define>
-
-<define name="hr.attlist" combine="interleave">
-  <optional>
-    <attribute name="align">
-      <choice>
-	<value>left</value>
-	<value>center</value>
-	<value>right</value>
-      </choice>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="noshade">
-      <value>noshade</value>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="size">
-      <ref name="Pixels.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="width">
-      <ref name="Pixels.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="img.attlist" combine="interleave">
-  <optional>
-    <attribute name="align">
-      <choice>
-	<value>top</value>
-	<value>middle</value>
-	<value>bottom</value>
-	<value>left</value>
-	<value>right</value>
-      </choice>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="border">
-      <ref name="Pixels.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="hspace">
-      <ref name="Pixels.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="vspace">
-      <ref name="Pixels.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="input.attlist" combine="interleave">
-  <ref name="align.attrib"/>
-</define>
-
-<define name="legend.attlist" combine="interleave">
-  <optional>
-    <attribute name="align">
-      <choice>
-	<value>top</value>
-	<value>bottom</value>
-	<value>left</value>
-	<value>right</value>
-      </choice>
-    </attribute>
-  </optional>
-</define>
-
-<define name="li.attlist" combine="interleave">
-  <optional>
-    <attribute name="type"/>
-  </optional>
-  <optional>
-    <attribute name="value"/>
-  </optional>
-</define>
-
-<define name="object.attlist" combine="interleave">
-  <optional>
-    <attribute name="align">
-      <choice>
-	<value>top</value>
-	<value>middle</value>
-	<value>bottom</value>
-	<value>left</value>
-	<value>right</value>
-      </choice>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="border">
-      <ref name="Pixels.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="hspace">
-      <ref name="Pixels.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="vspace">
-      <ref name="Pixels.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="ol.attlist" combine="interleave">
-  <optional>
-    <attribute name="type"/>
-  </optional>
-  <optional>
-    <attribute name="compact">
-      <value>compact</value>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="start"/>
-  </optional>
-</define>
-
-<define name="p.attlist" combine="interleave">
-  <ref name="align.attrib"/>
-</define>
-
-<define name="pre.attlist" combine="interleave">
-  <optional>
-    <attribute name="width">
-      <ref name="Length.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="script.attlist" combine="interleave">
-  <optional>
-    <attribute name="language">
-      <ref name="ContentType.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="table.attlist" combine="interleave">
-  <ref name="align.attrib"/>
-  <optional>
-    <attribute name="bgcolor">
-      <ref name="Color.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="tr.attlist" combine="interleave">
-  <optional>
-    <attribute name="bgcolor">
-      <ref name="Color.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="Cell.attrib" combine="interleave">
-  <optional>
-    <attribute name="nowrap">
-      <value>nowrap</value>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="bgcolor">
-      <ref name="Color.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="width">
-      <ref name="Pixels.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="height">
-      <ref name="Pixels.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="ul.attlist" combine="interleave">
-  <optional>
-    <attribute name="type"/>
-  </optional>
-  <optional>
-    <attribute name="compact">
-      <value>compact</value>
-    </attribute>
-  </optional>
-</define>
-
-<define name="align.attrib">
-  <optional>
-    <attribute name="align">
-      <choice>
-	<value>left</value>
-	<value>all</value>
-	<value>right</value>
-	<value>none</value>
-      </choice>
-    </attribute>
-  </optional>
-</define>
-
-<define name="Color.datatype">
-  <text/>
-</define>
-
-<define name="Inline.class" combine="choice">
-  <choice>
-    <ref name="font"/>
-    <ref name="basefont"/>
-    <ref name="s"/>
-    <ref name="strike"/>
-    <ref name="u"/>
-  </choice>
-</define>
-
-<define name="Block.class" combine="choice">
-  <choice>
-    <ref name="center"/>
-    <ref name="isindex"/>
-  </choice>
-</define>
-
-<define name="List.class" combine="choice">
-  <choice>
-    <ref name="dir"/>
-    <ref name="menu"/>
-  </choice>
-</define>
-
-<define name="head.content" combine="interleave">
-  <optional>
-    <ref name="isindex"/>
-  </optional>
-</define>
-
-<define name="Block.mix" combine="choice">
-  <choice>
-    <text/>
-    <ref name="Inline.class"/>
-  </choice>
-</define>
-
-<!-- With the legacy module and the frames modules, the html
-     element can contain either body or frameset. -->
-<define name="frameset" combine="choice">
-  <ref name="body"/>
-</define>
-
-</grammar>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/schemas/xhtml/modules/link.rng b/src/webapp/lenya/resources/schemas/xhtml/modules/link.rng
deleted file mode 100644
index d34021c..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/modules/link.rng
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: link.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-    
-<!-- Link Module -->
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
-
-<define name="link">
-  <element name="link">
-    <ref name="link.attlist"/>
-  </element>
-</define>
-
-<define name="link.attlist">
-  <ref name="Common.attrib"/>
-  <optional>
-    <attribute name="charset">
-      <ref name="Charset.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="href">
-      <ref name="URI.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="hreflang">
-      <ref name="LanguageCode.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="type">
-      <ref name="ContentType.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="rel">
-      <ref name="LinkTypes.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="rev">
-      <ref name="LinkTypes.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="media">
-      <ref name="MediaDesc.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="head.content" combine="interleave">
-  <zeroOrMore>
-    <ref name="link"/>
-  </zeroOrMore>
-</define>
-
-</grammar>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/schemas/xhtml/modules/list.rng b/src/webapp/lenya/resources/schemas/xhtml/modules/list.rng
deleted file mode 100644
index e78f883..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/modules/list.rng
+++ /dev/null
@@ -1,110 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: list.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-
-<!-- List Module -->
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
-
-<define name="dl">
-  <element name="dl">
-    <ref name="dl.attlist"/>
-    <oneOrMore>
-      <choice>
-	<ref name="dt"/>
-	<ref name="dd"/>
-      </choice>
-    </oneOrMore>
-  </element>
-</define>
-
-<define name="dl.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="dt">
-  <element name="dt">
-    <ref name="dt.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="dt.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="dd">
-  <element name="dd">
-    <ref name="dd.attlist"/>
-    <ref name="Flow.model"/>
-  </element>
-</define>
-
-<define name="dd.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="ol">
-  <element name="ol">
-    <ref name="ol.attlist"/>
-    <oneOrMore>
-      <ref name="li"/>
-    </oneOrMore>
-  </element>
-</define>
-
-<define name="ol.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="ul">
-  <element name="ul">
-    <ref name="ul.attlist"/>
-    <oneOrMore>
-      <ref name="li"/>
-    </oneOrMore>
-  </element>
-</define>
-
-<define name="ul.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="li">
-  <element name="li">
-    <ref name="li.attlist"/>
-    <ref name="Flow.model"/>
-  </element>
-</define>  
-
-<define name="li.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="List.class">
-  <choice>
-    <ref name="ul"/>
-    <ref name="ol"/>
-    <ref name="dl"/>
-  </choice>
-</define>
-
-<define name="Block.class" combine="choice">
-  <ref name="List.class"/>
-</define>
-
-</grammar>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/schemas/xhtml/modules/meta.rng b/src/webapp/lenya/resources/schemas/xhtml/modules/meta.rng
deleted file mode 100644
index 3c076d9..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/modules/meta.rng
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: meta.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-
-<!-- Meta Module -->
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
-
-<define name="meta">
-  <element name="meta">
-    <ref name="meta.attlist"/>
-  </element>
-</define>
-
-<define name="meta.attlist">
-  <ref name="I18n.attrib"/>
-  <optional>
-    <attribute name="http-equiv">
-      <ref name="NMTOKEN.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="name">
-      <ref name="NMTOKEN.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="content"/>
-  </optional>
-  <optional>
-    <attribute name="scheme"/>
-  </optional>
-</define>
-
-<define name="head.content" combine="interleave">
-  <zeroOrMore>
-    <ref name="meta"/>
-  </zeroOrMore>
-</define>
-
-</grammar>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/schemas/xhtml/modules/nameident.rng b/src/webapp/lenya/resources/schemas/xhtml/modules/nameident.rng
deleted file mode 100644
index 7338db9..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/modules/nameident.rng
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: nameident.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-
-<!-- Name Identification Module -->
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
-
-<define name="a.attlist" combine="interleave">
-  <ref name="name.attlist"/>
-</define>
-
-<define name="applet.attlist" combine="interleave">
-  <ref name="name.attlist"/>
-</define>
-
-<define name="form.attlist" combine="interleave">
-  <ref name="name.attlist"/>
-</define>
-
-<define name="frame.attrib" combine="interleave">
-  <ref name="name.attlist"/>
-</define>
-
-<define name="iframe.attlist" combine="interleave">
-  <ref name="name.attlist"/>
-</define>
-
-<define name="img.attlist" combine="interleave">
-  <ref name="name.attlist"/>
-</define>
-
-<define name="map.attlist" combine="interleave">
-  <ref name="name.attlist"/>
-</define>
-
-<define name="name.attlist">
-  <optional>
-    <attribute name="name"/>
-  </optional>
-</define>
-
-</grammar>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/schemas/xhtml/modules/object.rng b/src/webapp/lenya/resources/schemas/xhtml/modules/object.rng
deleted file mode 100644
index 023407a..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/modules/object.rng
+++ /dev/null
@@ -1,105 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: object.rng 56344 2004-11-02 04:28:38Z gregor $ -->
-
-<!-- Object Module -->
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
-
-<define name="object">
-  <element name="object">
-    <ref name="object.attlist"/>
-    <!-- No restrictions on mixed content in TREX. -->
-    <zeroOrMore>
-      <ref name="param"/>
-    </zeroOrMore>
-    <ref name="Flow.model"/>
-  </element>
-</define>
-
-<define name="object.attlist">
-  <ref name="Common.attrib"/>
-  <optional>
-    <attribute name="href">
-      <ref name="URI.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="declare">
-      <value>declare</value>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="classid">
-      <ref name="URI.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="codebase">
-      <ref name="URI.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="data">
-      <ref name="URI.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="type">
-      <ref name="ContentType.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="codetype">
-      <ref name="ContentType.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="archive">
-      <ref name="URIs.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="standby">
-      <ref name="Text.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="height">
-      <ref name="Length.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="width">
-      <ref name="Length.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="name"/>
-  </optional>
-  <optional>
-    <attribute name="tabindex">
-      <ref name="Number.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="Inline.class" combine="choice">
-  <ref name="object"/>
-</define>
-
-</grammar>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/schemas/xhtml/modules/param.rng b/src/webapp/lenya/resources/schemas/xhtml/modules/param.rng
deleted file mode 100644
index f3703fa..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/modules/param.rng
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: param.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-
-<!-- Param Module -->
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
-
-<define name="param">
-  <element name="param">
-    <ref name="param.attlist"/>
-  </element>
-</define>
-
-<define name="param.attlist">
-  <ref name="id.attrib"/>
-  <attribute name="name"/>
-  <optional>
-    <attribute name="value"/>
-  </optional>
-  <optional>
-    <attribute name="valuetype">
-      <choice>
-	<value>data</value>
-	<value>ref</value>
-	<value>object</value>
-      </choice>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="type">
-      <ref name="ContentType.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-</grammar>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/schemas/xhtml/modules/pres.rng b/src/webapp/lenya/resources/schemas/xhtml/modules/pres.rng
deleted file mode 100644
index fe03fb5..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/modules/pres.rng
+++ /dev/null
@@ -1,125 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: pres.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
-
-<define name="hr">
-  <element name="hr">
-    <ref name="hr.attlist"/>
-  </element>
-</define>
-
-<define name="hr.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="Block.class" combine="choice">
-  <ref name="hr"/>
-</define>
-
-<define name="b">
-  <element name="b">
-    <ref name="b.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="b.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="big">
-  <element name="big">
-    <ref name="big.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="big.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="i">
-  <element name="i">
-    <ref name="i.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="i.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="small">
-  <element name="small">
-    <ref name="small.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="small.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="sub">
-  <element name="sub">
-    <ref name="sub.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="sub.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="sup">
-  <element name="sup">
-    <ref name="sup.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="sup.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="tt">
-  <element name="tt">
-    <ref name="tt.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="tt.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="Inline.class" combine="choice">
-  <choice>
-    <ref name="b"/>
-    <ref name="big"/>
-    <ref name="i"/>
-    <ref name="small"/>
-    <ref name="sub"/>
-    <ref name="sup"/>
-    <ref name="tt"/>
-  </choice>
-</define>
-
-</grammar>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/schemas/xhtml/modules/ruby.rng b/src/webapp/lenya/resources/schemas/xhtml/modules/ruby.rng
deleted file mode 100644
index a2df599..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/modules/ruby.rng
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: ruby.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-    
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
-
-<define name="ruby">
-  <element name="ruby">
-    <ref name="ruby.attlist"/>
-    <choice>
-      <group>
-        <ref name="rb"/>
-        <choice>
-          <ref name="rt"/>
-          <group>
-            <ref name="rp"/>
-            <ref name="rt"/>
-            <ref name="rp"/>
-          </group>
-        </choice>
-      </group>
-      <group>
-        <ref name="rbc"/>
-        <ref name="rtc"/>
-        <optional>
-          <ref name="rtc"/>
-        </optional>
-      </group>
-    </choice>
-  </element>
-</define>
-
-<define name="ruby.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="rbc">
-  <element name="rbc">
-    <ref name="rbc.attlist"/>
-    <oneOrMore>
-      <ref name="rb"/>
-    </oneOrMore>
-  </element>
-</define>
-
-<define name="rbc.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="rtc">
-  <element name="rtc">
-    <ref name="rtc.attlist"/>
-    <oneOrMore>
-      <ref name="rt"/>
-    </oneOrMore>
-  </element>
-</define>
-
-<define name="rtc.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="rb">
-  <element name="rb">
-    <ref name="rb.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="rb.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="rt">
-  <element name="rt">
-    <ref name="rt.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="rt.attlist">
-  <ref name="Common.attrib"/>
-  <optional>
-    <attribute name="rt">
-      <ref name="Number.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="rp">
-  <element name="rp">
-    <ref name="rp.attlist"/>
-    <text/>
-  </element>
-</define>
-
-<define name="rp.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="Inline.class" combine="choice">
-  <ref name="ruby"/>
-</define>
-
-</grammar>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/schemas/xhtml/modules/script.rng b/src/webapp/lenya/resources/schemas/xhtml/modules/script.rng
deleted file mode 100644
index 74c9b29..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/modules/script.rng
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: script.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-    
-<!-- Script Module -->
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
-
-<define name="script">
-  <element name="script">
-    <ref name="script.attlist"/>
-    <text/>
-  </element>
-</define>
-
-<define name="script.attlist">
-  <optional>
-    <attribute name="charset">
-      <ref name="Charset.datatype"/>
-    </attribute>
-  </optional>
-  <attribute name="type">
-    <ref name="ContentType.datatype"/>
-  </attribute>
-  <optional>
-    <attribute name="src">
-      <ref name="URI.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="defer">
-      <value>defer</value>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="xml:space">
-      <value>preserve</value>
-    </attribute>
-  </optional>
-</define>
-
-<define name="noscript">
-  <element name="noscript">
-    <ref name="noscript.attlist"/>
-    <ref name="Block.model"/>
-  </element>
-</define>
-
-<define name="noscript.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="head.content" combine="interleave">
-  <zeroOrMore>
-    <ref name="script"/>
-  </zeroOrMore>
-</define>
-
-<define name="Script.class">
-  <choice>
-    <ref name="noscript"/>
-    <ref name="script"/>
-  </choice>
-</define>
-
-<define name="Inline.class" combine="choice">
-  <ref name="Script.class"/>
-</define>
-
-<define name="Block.class" combine="choice">
-  <ref name="Script.class"/>
-</define>
-
-</grammar>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/schemas/xhtml/modules/ssismap.rng b/src/webapp/lenya/resources/schemas/xhtml/modules/ssismap.rng
deleted file mode 100644
index 8de0d10..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/modules/ssismap.rng
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: ssismap.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-
-<!-- Server-side Image Map Module -->
-<!-- Depends on image module. -->
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
-
-<define name="img.attlist" combine="interleave">
-  <optional>
-    <attribute name="ismap">
-      <value>ismap</value>
-    </attribute>
-  </optional>
-</define>
-
-</grammar>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/schemas/xhtml/modules/struct.rng b/src/webapp/lenya/resources/schemas/xhtml/modules/struct.rng
deleted file mode 100644
index 170ac26..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/modules/struct.rng
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: struct.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-
-<!-- Structure Module -->
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
-
-<start>
-  <ref name="html"/>
-</start>
-
-<define name="title">
-  <element name="title">
-    <ref name="title.attlist"/>
-    <text/>
-  </element>
-</define>
-
-<define name="title.attlist">
-  <ref name="I18n.attrib"/>
-</define>
-
-<define name="head">
-  <element name="head">
-    <ref name="head.attlist"/>
-    <ref name="head.content"/>
-  </element>
-</define>
-
-<define name="head.attlist">
-  <ref name="I18n.attrib"/>
-  <ref name="profile.attlist"/>
-</define>
-
-<define name="head.content">
-  <ref name="title"/>
-</define>
-
-<define name="profile.attlist">
-  <optional>
-    <attribute name="profile">
-      <ref name="URI.datatype"/>
-    </attribute>     
-  </optional>
-</define>
-
-<define name="body">
-  <element name="body">
-    <ref name="body.attlist"/>
-    <ref name="Block.model"/>
-  </element>
-</define>
-
-<define name="body.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="html">
-  <element name="html">
-    <ref name="html.attlist"/>
-    <ref name="head"/>
-    <ref name="body"/>
-  </element>
-</define>
-
-<define name="html.attlist">
-  <ref name="XHTML.version.attrib"/>
-  <ref name="I18n.attrib"/>
-</define>
-
-<define name="XHTML.version.attrib">
-  <optional>
-    <attribute name="version">
-      <ref name="FPI.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-</grammar>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/schemas/xhtml/modules/style.rng b/src/webapp/lenya/resources/schemas/xhtml/modules/style.rng
deleted file mode 100644
index 82a73af..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/modules/style.rng
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: style.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-    
-<!-- Style Module -->
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
-
-<define name="style">
-  <element name="style">
-    <ref name="style.attlist"/>
-    <text/>
-  </element>
-</define>
-
-<define name="style.attlist">
-  <ref name="title.attrib"/>
-  <ref name="I18n.attrib"/>
-  <attribute name="type">
-    <ref name="ContentType.datatype"/>
-  </attribute>
-  <optional>
-    <attribute name="media">
-      <ref name="MediaDesc.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="xml:space">
-      <value>preserve</value>
-    </attribute>
-  </optional>
-</define>
-
-<define name="head.content" combine="interleave">
-  <zeroOrMore>
-    <ref name="style"/>
-  </zeroOrMore>
-</define>
-
-</grammar>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/schemas/xhtml/modules/table.rng b/src/webapp/lenya/resources/schemas/xhtml/modules/table.rng
deleted file mode 100644
index 4d3d41f..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/modules/table.rng
+++ /dev/null
@@ -1,275 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: table.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-    
-<!-- Tables Module -->
-<!-- This builds on the basic tables module, unlike with the DTD
-implementation. -->
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
-
-<include href="basic-table.rng">
-
-  <define name="table">
-    <element name="table">
-      <ref name="table.attlist"/>
-      <optional>
-	<ref name="caption"/>
-      </optional>
-      <choice>
-	<zeroOrMore>
-	  <ref name="col"/>
-	</zeroOrMore>
-	<zeroOrMore>
-	  <ref name="colgroup"/>
-	</zeroOrMore>
-      </choice>
-      <choice>
-	<group>
-	  <optional>
-	    <ref name="thead"/>
-	  </optional>
-	  <optional>
-	    <ref name="tfoot"/>
-	  </optional>
-	  <oneOrMore>
-	    <ref name="tbody"/>
-	  </oneOrMore>
-	</group>
-	<oneOrMore>
-	  <ref name="tr"/>
-	</oneOrMore>
-      </choice>
-    </element>
-  </define>
-
-  <define name="th">
-    <element name="th">
-      <ref name="th.attlist"/>
-      <ref name="Flow.model"/>
-    </element>
-  </define>
-
-  <define name="td">
-    <element name="td">
-      <ref name="td.attlist"/>
-      <ref name="Flow.model"/>
-    </element>
-  </define>
-
-  <define name="CellHAlign.attrib">
-    <optional>
-      <attribute name="align">
-	<choice>
-	  <value>left</value>
-	  <value>center</value>
-	  <value>right</value>
-	  <value>justify</value>
-	  <value>char</value>
-	</choice>
-      </attribute>
-    </optional>
-    <optional>
-      <attribute name="char">
-	<ref name="Character.datatype"/>
-      </attribute>
-    </optional>
-    <optional>
-      <attribute name="charoff">
-	<ref name="Length.datatype"/>
-      </attribute>
-    </optional>
-  </define>
-
-  <define name="CellVAlign.attrib">
-    <optional>
-      <attribute name="valign">
-	<choice>
-	  <value>top</value>
-	  <value>middle</value>
-	  <value>bottom</value>
-	  <value>baseline</value>
-	</choice>
-      </attribute>
-    </optional>
-  </define>
-
-  <define name="scope.attrib">
-    <optional>
-      <attribute name="scope">
-	<choice>
-	  <value>row</value>
-	  <value>col</value>
-	  <value>rowgroup</value>
-	  <value>colgroup</value>
-	</choice>
-      </attribute>
-    </optional>
-  </define>
-
-</include>
-
-<define name="table.attlist" combine="interleave">
-  <optional>
-    <attribute name="width">
-      <ref name="Length.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="border">
-      <ref name="Pixels.datatype"/>
-    </attribute>
-  </optional>
-  <ref name="frame.attrib"/>
-  <ref name="rules.attrib"/>
-  <optional>
-    <attribute name="cellspacing">
-      <ref name="Length.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="cellpadding">
-      <ref name="Length.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="col">
-  <element name="col">
-    <ref name="col.attlist"/>
-  </element>
-</define>
-
-<define name="col.attlist">
-  <ref name="Common.attrib"/>
-  <optional>
-    <attribute name="span">
-      <ref name="Number.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="width">
-      <ref name="MultiLength.datatype"/>
-    </attribute>
-  </optional>
-  <ref name="CellHAlign.attrib"/>
-  <ref name="CellVAlign.attrib"/>
-</define>
-
-<define name="colgroup">
-  <element name="colgroup">
-    <ref name="colgroup.attlist"/>
-    <zeroOrMore>
-      <ref name="col"/>
-    </zeroOrMore>
-  </element>
-</define>
-
-<define name="colgroup.attlist">
-  <ref name="Common.attrib"/>
-  <optional>
-    <attribute name="span">
-      <ref name="Number.datatype"/>
-    </attribute>
-  </optional>
-  <optional>
-    <attribute name="width">
-      <ref name="MultiLength.datatype"/>
-    </attribute>
-  </optional>
-  <ref name="CellHAlign.attrib"/>
-  <ref name="CellVAlign.attrib"/>
-</define>
-
-<define name="tbody">
-  <element name="tbody">
-    <ref name="tbody.attlist"/>
-    <oneOrMore>
-      <ref name="tr"/>
-    </oneOrMore>
-  </element>
-</define>
-
-<define name="tbody.attlist">
-  <ref name="Common.attrib"/>
-  <ref name="CellHAlign.attrib"/>
-  <ref name="CellVAlign.attrib"/>
-</define>
-
-<define name="thead">
-  <element name="thead">
-    <ref name="thead.attlist"/>
-    <oneOrMore>
-      <ref name="tr"/>
-    </oneOrMore>
-  </element>
-</define>
-
-<define name="thead.attlist">
-  <ref name="Common.attrib"/>
-  <ref name="CellHAlign.attrib"/>
-  <ref name="CellVAlign.attrib"/>
-</define>
-
-<define name="tfoot">
-  <element name="tfoot">
-    <ref name="tfoot.attlist"/>
-    <oneOrMore>
-      <ref name="tr"/>
-    </oneOrMore>
-  </element>
-</define>
-
-<define name="tfoot.attlist">
-  <ref name="Common.attrib"/>
-  <ref name="CellHAlign.attrib"/>
-  <ref name="CellVAlign.attrib"/>
-</define>
-
-<define name="frame.attrib">
-  <optional>
-    <attribute name="frame">
-      <choice>
-        <value>void</value>
-        <value>above</value>
-        <value>below</value>
-        <value>hsides</value>
-        <value>lhs</value>
-        <value>rhs</value>
-        <value>vsides</value>
-        <value>box</value>
-        <value>border</value>
-      </choice>
-    </attribute>
-  </optional>
-</define>
-
-<define name="rules.attrib">
-  <optional>
-    <attribute name="rules">
-      <choice>
-        <value>none</value>
-        <value>groups</value>
-        <value>rows</value>
-        <value>cols</value>
-        <value>all</value>
-      </choice>
-    </attribute>
-  </optional>
-</define>
-
-</grammar>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/schemas/xhtml/modules/target.rng b/src/webapp/lenya/resources/schemas/xhtml/modules/target.rng
deleted file mode 100644
index 2c5afec..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/modules/target.rng
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: target.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-    
-<!-- Target Module -->
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
-
-<define name="a.attlist" combine="interleave">
-  <ref name="target.attrib"/>
-</define>
-
-<define name="area.attlist" combine="interleave">
-  <ref name="target.attrib"/>
-</define>
-
-<define name="base.attlist" combine="interleave">
-  <ref name="target.attrib"/>
-</define>
-
-<define name="link.attrib" combine="interleave">
-  <ref name="target.attrib"/>
-</define>
-
-<define name="form.attlist" combine="interleave">
-  <ref name="target.attrib"/>
-</define>
-
-<define name="target.attrib">
-  <optional>
-    <attribute name="target"/>
-  </optional>
-</define>
-
-</grammar>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/schemas/xhtml/modules/text.rng b/src/webapp/lenya/resources/schemas/xhtml/modules/text.rng
deleted file mode 100644
index d3c9086..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/modules/text.rng
+++ /dev/null
@@ -1,356 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: text.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-    
-<!-- Text Module -->
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
-
-<define name="br">
-  <element name="br">
-    <ref name="br.attlist"/>
-    <empty/>
-  </element>
-</define>
-
-<define name="br.attlist">
-  <ref name="Core.attrib"/>
-</define>
-
-<define name="span">
-  <element name="span">
-    <ref name="span.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="span.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="abbr">
-  <element name="abbr">
-    <ref name="abbr.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="abbr.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="acronym">
-  <element name="acronym">
-    <ref name="acronym.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="acronym.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="cite">
-  <element name="cite">
-    <ref name="cite.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="cite.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="code">
-  <element name="code">
-    <ref name="code.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="code.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="dfn">
-  <element name="dfn">
-    <ref name="dfn.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="dfn.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="em">
-  <element name="em">
-    <ref name="em.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="em.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="kbd">
-  <element name="kbd">
-    <ref name="kbd.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="kbd.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="q">
-  <element name="q">
-    <ref name="q.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="q.attlist">
-  <ref name="Common.attrib"/>
-  <optional>
-    <attribute name="cite">
-      <ref name="URI.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="samp">
-  <element name="samp">
-    <ref name="samp.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="samp.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="strong">
-  <element name="strong">
-    <ref name="strong.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="strong.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="var">
-  <element name="var">
-    <ref name="var.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="var.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="div">
-  <element name="div">
-    <ref name="div.attlist"/>
-    <ref name="Flow.model"/>
-  </element>
-</define>
-
-<define name="div.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="p">
-  <element name="p">
-    <ref name="p.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="p.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="address">
-  <element name="address">
-    <ref name="address.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="address.attlist">
-  <ref name="Common.attrib"/>
-</define>
-
-<define name="blockquote">
-  <element name="blockquote">
-    <ref name="blockquote.attlist"/>
-    <ref name="Block.model"/>
-  </element>
-</define>
-
-<define name="blockquote.attlist">
-  <ref name="Common.attrib"/>
-  <optional>
-    <attribute name="cite">
-      <ref name="URI.datatype"/>
-    </attribute>
-  </optional>
-</define>
-
-<define name="pre">
-  <element name="pre">
-    <ref name="pre.attlist"/>
-    <ref name="Inline.model"/>
-  </element>
-</define>
-
-<define name="pre.attlist">
-  <ref name="Common.attrib"/>
-  <optional>
-    <attribute name="xml:space">
-      <value>preserve</value>
-    </attribute>
-  </optional>
-</define>
-
-<define name="h1">
-  <element name="h1">
-    <ref name="Heading.attrib"/>
-    <ref name="Heading.content"/>
-  </element>
-</define>
- 
-<define name="h2">
-  <element name="h2">
-    <ref name="Heading.attrib"/>
-    <ref name="Heading.content"/>
-  </element>
-</define>
- 
-<define name="h3">
-  <element name="h3">
-    <ref name="Heading.attrib"/>
-    <ref name="Heading.content"/>
-  </element>
-</define>
- 
-<define name="h4">
-  <element name="h4">
-    <ref name="Heading.attrib"/>
-    <ref name="Heading.content"/>
-  </element>
-</define>
- 
-<define name="h5">
-  <element name="h5">
-    <ref name="Heading.attrib"/>
-    <ref name="Heading.content"/>
-  </element>
-</define>
-
-<define name="h6">
-  <element name="h6">
-    <ref name="Heading.attrib"/>
-    <ref name="Heading.content"/>
-  </element>
-</define>
-
-<define name="Heading.attrib">
-  <ref name="Common.attrib"/>
-</define>
- 
-<define name="Heading.content">
-  <ref name="Inline.model"/>
-</define>
-
-<define name="Heading.class">
-  <choice>
-    <ref name="h1"/>
-    <ref name="h2"/>
-    <ref name="h3"/>
-    <ref name="h4"/>
-    <ref name="h5"/>
-    <ref name="h6"/>
-  </choice>
-</define>
-
-<define name="Block.class">
-  <choice>
-    <ref name="address"/>
-    <ref name="blockquote"/>
-    <ref name="div"/>
-    <ref name="p"/>
-    <ref name="pre"/>
-    <ref name="Heading.class"/>
-  </choice>
-</define>
-
-<define name="Inline.class">
-  <choice>
-    <ref name="abbr"/>
-    <ref name="acronym"/>
-    <ref name="br"/>
-    <ref name="cite"/>
-    <ref name="code"/>
-    <ref name="dfn"/>
-    <ref name="em"/>
-    <ref name="kbd"/>
-    <ref name="q"/>
-    <ref name="samp"/>
-    <ref name="span"/>
-    <ref name="strong"/>
-    <ref name="var"/>
-  </choice>
-</define>
-
-<define name="Inline.model">
-  <zeroOrMore>
-    <choice>
-      <text/>
-      <ref name="Inline.class"/>
-    </choice>
-  </zeroOrMore>
-</define>
-
-<!-- This is redefined by the legacy module to include inlines. -->
-<define name="Block.mix">
-  <ref name="Block.class"/>
-</define>
-
-<define name="Block.model">
-  <oneOrMore>
-    <ref name="Block.mix"/>
-  </oneOrMore>
-</define>
-
-<define name="Flow.model">
-  <zeroOrMore>
-    <choice>
-      <text/>
-      <ref name="Inline.class"/>
-      <ref name="Block.class"/>
-    </choice>
-  </zeroOrMore>
-</define>
-
-</grammar>
\ No newline at end of file
diff --git a/src/webapp/lenya/resources/schemas/xhtml/xhtml-basic.rng b/src/webapp/lenya/resources/schemas/xhtml/xhtml-basic.rng
deleted file mode 100644
index 6f21876..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/xhtml-basic.rng
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: xhtml-basic.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-
-<!-- XHTML Basic -->
-
-<grammar ns="http://www.w3.org/1999/xhtml"
-         xmlns="http://relaxng.org/ns/structure/1.0">
-
-<include href="modules/datatypes.rng"/>
-<include href="modules/attribs.rng"/>
-<include href="modules/struct.rng"/>
-<include href="modules/text.rng"/>
-<include href="modules/hypertext.rng"/>
-<include href="modules/list.rng"/>
-<include href="modules/basic-form.rng"/>
-<include href="modules/basic-table.rng"/>
-<include href="modules/image.rng"/>
-<include href="modules/param.rng"/>
-<include href="modules/object.rng"/>
-<include href="modules/meta.rng"/>
-<include href="modules/link.rng"/>
-<include href="modules/base.rng"/>
-
-</grammar>
diff --git a/src/webapp/lenya/resources/schemas/xhtml/xhtml-strict.rng b/src/webapp/lenya/resources/schemas/xhtml/xhtml-strict.rng
deleted file mode 100644
index e42c753..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/xhtml-strict.rng
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: xhtml-strict.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-
-<!-- XHTML Strict -->
-
-<grammar ns="http://www.w3.org/1999/xhtml"
-         xmlns="http://relaxng.org/ns/structure/1.0">
-
-<include href="modules/datatypes.rng"/>
-<include href="modules/attribs.rng"/>
-<include href="modules/struct.rng"/>
-<include href="modules/text.rng"/>
-<include href="modules/hypertext.rng"/>
-<include href="modules/list.rng"/>
-<include href="modules/image.rng"/>
-<include href="modules/ssismap.rng"/>
-<include href="modules/base.rng"/>
-<include href="modules/link.rng"/>
-<include href="modules/meta.rng"/>
-<include href="modules/param.rng"/>
-<include href="modules/object.rng"/>
-<include href="modules/bdo.rng"/>
-<include href="modules/pres.rng"/>
-<include href="modules/edit.rng"/>
-<include href="modules/applet.rng"/>
-<!-- <include href="modules/basic-form.rng"/> -->
-<include href="modules/form.rng"/>
-<include href="modules/style.rng"/>
-<include href="modules/script.rng"/>
-<!-- <include href="modules/basic-table.rng"/> -->
-<include href="modules/table.rng"/>
-<include href="modules/csismap.rng"/>
-<include href="modules/events.rng"/>
-<include href="modules/inlstyle.rng"/>
-<include href="modules/target.rng"/>
-<include href="modules/iframe.rng"/>
-<include href="modules/nameident.rng"/>
-
-</grammar>
diff --git a/src/webapp/lenya/resources/schemas/xhtml/xhtml.rng b/src/webapp/lenya/resources/schemas/xhtml/xhtml.rng
deleted file mode 100644
index 799d966..0000000
--- a/src/webapp/lenya/resources/schemas/xhtml/xhtml.rng
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: xhtml.rng 42702 2004-03-13 12:34:18Z gregor $ -->
-    
-<grammar ns="http://www.w3.org/1999/xhtml"
-         xmlns="http://relaxng.org/ns/structure/1.0">
-
-<!-- XHTML -->
-<!-- This corresponds to the union of transitional and frameset. -->
-
-
-<include href="modules/datatypes.rng"/>
-<include href="modules/attribs.rng"/>
-<!-- <include href="modules/struct.rng"/> -->
-<include href="modules/frames.rng"/>
-<include href="modules/text.rng"/>
-<include href="modules/hypertext.rng"/>
-<include href="modules/list.rng"/>
-<include href="modules/image.rng"/>
-<include href="modules/ssismap.rng"/>
-<include href="modules/base.rng"/>
-<include href="modules/link.rng"/>
-<include href="modules/meta.rng"/>
-<include href="modules/param.rng"/>
-<include href="modules/object.rng"/>
-<include href="modules/bdo.rng"/>
-<include href="modules/pres.rng"/>
-<include href="modules/edit.rng"/>
-<include href="modules/applet.rng"/>
-<!-- <include href="modules/basic-form.rng"/> -->
-<include href="modules/form.rng"/>
-<include href="modules/style.rng"/>
-<include href="modules/script.rng"/>
-<!-- <include href="modules/basic-table.rng"/> -->
-<include href="modules/table.rng"/>
-<include href="modules/csismap.rng"/>
-<include href="modules/events.rng"/>
-<include href="modules/inlstyle.rng"/>
-<include href="modules/target.rng"/>
-<include href="modules/iframe.rng"/>
-<include href="modules/nameident.rng"/>
-<include href="modules/legacy.rng"/>
-
-</grammar>
diff --git a/src/webapp/lenya/usecase.xmap b/src/webapp/lenya/usecase.xmap
deleted file mode 100644
index 0956b5d..0000000
--- a/src/webapp/lenya/usecase.xmap
+++ /dev/null
@@ -1,303 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: usecase.xmap 45963 2004-09-13 10:05:56Z andreas $ -->
-
-<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
-  
-  <!-- =========================== Views ================================= -->
-
-  <map:views>
-    <map:view from-label="aggregation" name="aggregation">
-      <map:serialize type="xml"/>
-    </map:view>
-    <map:view from-label="xsp" name="xsp">
-      <map:serialize type="xml"/>
-    </map:view>
-  </map:views>
-  
-  <!-- =========================== Resources ================================ -->
-  <map:resources>
-    <map:resource name="style-cms-page">
-      <map:transform type="i18n">      
-        <map:parameter name="locale" value="{request:locale}"/>
-      </map:transform>    
-      <map:transform src="fallback://lenya/xslt/util/page2xhtml.xsl">
-        <map:parameter name="contextprefix" value="{request:contextPath}"/>
-      </map:transform>
-      <map:transform src="xslt/util/strip_namespaces.xsl"/>
-      <map:serialize type="xhtml"/>
-    </map:resource>
-    
-  </map:resources>
-  
-  <!-- =========================== Pipelines ================================ -->
-  <map:pipelines>
-  
-    <!-- =================================================================== -->
-    <!-- Usecases that use the Usecase Framework -->
-    <!-- =================================================================== -->
-    
-    <map:pipeline>
-      <map:match type="registered-usecase">
-        <map:mount src="usecases/usecase.xmap" uri-prefix="" check-reload="yes" reload-method="synchron"/>
-      </map:match>
-    </map:pipeline>
- 
-    <!-- =================================================================== -->
-    <!-- Notification Pipelines -->
-    <!-- =================================================================== -->
-    
-    <map:pipeline>
-      
-      <!-- notification/{publication-id}/{usecase}.xml -->
-      <map:match pattern="notification/*/*.xml">
-        <map:select type="resource-exists">
-          <map:when test="fallback://config/notification/notification.xconf">
-            <map:generate src="fallback://config/notification/notification.xconf"/>
-          </map:when>
-          <map:otherwise>
-            <map:generate src="config/notification/notification.xconf"/>
-          </map:otherwise>      
-        </map:select>
-        <map:transform src="fallback://lenya/xslt/notification/notification2message.xsl">
-          <map:parameter name="usecase" value="{2}"/>
-        </map:transform>
-        <map:serialize type="xml"/>
-      </map:match>
-      
-      <!-- notification/{publication-id}/{usecase}.xsl -->
-      <map:match pattern="notification/*/*.xsl">
-        <map:generate src="cocoon:/notification/{1}/{2}.xml"/>
-        <map:transform src="fallback://lenya/xslt/notification/message2xslt.xsl">
-          <map:parameter name="usecase" value="{2}"/>
-          <map:parameter name="server-uri" value="http://{request:serverName}:{request:serverPort}"/>
-          <map:parameter name="document-url" value="{request:contextPath}/{page-envelope:publication-id}/{page-envelope:area}{page-envelope:document-url}"/>
-        </map:transform>
-        <map:serialize type="xml"/>
-      </map:match>
-      
-    </map:pipeline>
-
-    <!-- =================================================================== -->
-    <!-- Usecase Pipelines -->
-    <!-- =================================================================== -->
-    
-    <map:pipeline type="noncaching">
-      
-      <!-- {publication-id}/{area}/{uri}-->
-      <map:match pattern="*/*/**">
-        
-        <!-- mount publication-specific usecase sitemap -->
-        <map:match type="usecase" pattern="*">
-          <map:act src="fallback://usecase-{1}.xmap" type="resource-exists">
-            <map:mount check-reload="true" reload-method="synchron" src="{fallback://usecase-{../1}.xmap}" uri-prefix="{../../1}"/>
-          </map:act>
-        </map:match>
-        
-        <!-- Mount separate usecase sitemap if it exists. -->
-        <map:match type="usecase" pattern="*">
-          <map:act src="usecases/{1}/usecase-{1}.xmap" type="resource-exists">
-            <map:mount check-reload="true" reload-method="synchron" src="usecases/{../1}/usecase-{../1}.xmap" uri-prefix=""/>
-          </map:act>
-        </map:match>
-        
-        <!-- ************************************************************** -->
-        <!-- ** Xopus                                                    ** -->
-        <!-- **                                                          ** -->
-        <!-- ** NOTE: page-envelope:document-path depends on the         ** -->
-        <!-- **       publication specific DocumentIdToPathMapper which  ** -->
-        <!-- **       is configured within config/publication.xconf      ** -->
-        <!-- ************************************************************** -->
-        <map:match pattern="xopus" type="usecase">
-          <map:match pattern="open" type="step">
-            <map:match pattern="*/authoring/**.html">
-              <map:act type="resource-exists" src="../../ROOT/{xopus:context}/xopus/xopus.js"> <!-- Check for Xopus -->
-              
-                <map:act type="reserved-checkout">
-                  <map:generate type="serverpages" src="content/rc/{exception}.xsp">
-                    <map:parameter name="user" value="{user}"/>
-                    <map:parameter name="filename" value="{filename}"/>
-                    <map:parameter name="date" value="{date}"/>
-                    <map:parameter name="message" value="{message}"/>
-                  </map:generate>
-                  <map:transform src="fallback://lenya/xslt/rc/rco-exception.xsl"/>
-                  <map:call resource="style-cms-page"/>
-                </map:act>
-                
-                <map:generate src="content/util/empty.xml"/>
-                <map:transform src="fallback://lenya/xslt/authoring/edit/xopus-xhtml.xsl">
-                  <map:parameter name="contextPrefix" value="{request:contextPath}"/>
-                  <map:parameter name="publicationId" value="{page-envelope:publication-id}"/>
-                  <map:parameter name="completeArea" value="authoring"/>
-                  <map:parameter name="documentUrl" value="{page-envelope:document-url}"/>
-                  <map:parameter name="documentId" value="{page-envelope:document-id}"/>
-                  <map:parameter name="documentType" value="{request-param:doctype}"/>
-                  <map:parameter name="xopusContext" value="{xopus:context}"/>
-                </map:transform>
-                <!-- NOTE: IE or Xopus doesn't appreciate the DTD which is being inserted by Cocoon -->
-                <map:serialize type="html-no-dtd"/>
-              </map:act>
-              <map:generate src="resources/misc/xopus/download.xhtml"/>
-              <map:call resource="style-cms-page"/>
-            </map:match>
-          </map:match>
-          
-          
-          <map:match pattern="xml" type="step">
-            <map:match pattern="*/*/**.html">
-              <map:select type="request-method">
-                <map:when test="POST"> <!-- Save -->
-
-                  <!-- test if the document is checked out -->
-        	        <map:act type="reserved-checkout-test">
-            	      <map:generate type="serverpages" src="../../content/rc/{exception}.xsp">
-                	    <map:parameter name="user" value="{user}"/>
-                    	<map:parameter name="filename" value="{filename}"/>
-        	            <map:parameter name="date" value="{date}"/>
-                        <map:parameter name="message" value="{message}"/>
-            	      </map:generate>
-                	  <map:transform src="fallback://lenya/xslt/rc/rco-exception.xsl"/>
-        	          <map:call resource="style-cms-page"/>
-                	</map:act>
-        
-                  <map:generate type="stream"/>
-                  <map:transform src="xslt/authoring/edit/addSourceTags.xsl">
-                    <map:parameter name="source" value="pubs/{1}/content/{2}/{page-envelope:document-path}"/>
-                  </map:transform>
-                  <map:transform type="write-source">
-                    <map:parameter name="serializer" value="xml"/>
-                  </map:transform>
-                  <map:serialize type="xml"/>
-                </map:when>
-                <map:otherwise> <!-- GET: Open -->
-                  <map:generate src="pubs/{1}/content/{2}/{page-envelope:document-path}"/>
-                  <map:serialize type="xml"/>
-                </map:otherwise>
-              </map:select>
-            </map:match>
-          </map:match>
-          
-          
-          <map:match pattern="xsd" type="step">
-            <map:match pattern="*/authoring/**.html">
-              <map:generate src="fallback://config/doctypes/schemas/{request-param:doctype}.xsd"/>
-              <map:serialize type="xml"/>
-            </map:match>
-          </map:match>
-          <map:match pattern="xslt" type="step">
-            <map:match pattern="*/authoring/**.html">
-              <map:generate src="fallback://lenya/xslt/xopus/{request-param:doctype}.xsl"/>
-              <map:serialize type="xml"/>
-            </map:match>
-          </map:match>
-        </map:match>
-        <!-- ************************************************************** -->
-        <!-- ********  /Xopus Editor ************************************** -->
-        <!-- ************************************************************** -->
-        
-        <!--Rollback-->
-        <map:match pattern="rollback" type="usecase">
-          
-          <map:match pattern="view" type="step">
-            <map:redirect-to session="true" uri="{page-envelope:context-prefix}/{../../1}/authoring/{../../3}?lenya.step=view-revision&amp;rollbackTime={request-param:rollbackTime}"/>
-          </map:match>
-          
-          <map:match pattern="rollback" type="step">
-            <map:act type="rollback">
-              <map:act type="workflow">
-                <map:parameter name="area" value="{page-envelope:area}"/>
-                <map:parameter name="document-id" value="{page-envelope:document-id}"/>
-                <map:parameter name="language" value="{page-envelope:document-language}"/>
-                <map:parameter name="event" value="edit"/>
-              </map:act>
-              <map:redirect-to session="true" uri="{location}"/>
-            </map:act>
-            <map:redirect-to session="true" uri="{request:requestURI}"/>
-          </map:match>
-          
-        </map:match>
-        
-        
-        <!-- CheckOut -->
-        <map:match pattern="checkout" type="usecase">
-          
-          <map:match pattern="checkout" type="step">
-            <map:act type="reserved-checkout">
-              <map:generate src="content/rc/{exception}.xsp" type="serverpages">
-                <map:parameter name="user" value="{user}"/>
-                <map:parameter name="filename" value="{filename}"/>
-                <map:parameter name="date" value="{date}"/>
-              </map:generate>
-              <map:transform src="fallback://lenya/xslt/rc/rco-exception.xsl"/>
-              <map:call resource="style-cms-page"/>
-            </map:act>
-            <map:redirect-to session="true" uri="{request:requestURI}"/>
-          </map:match>
-          
-        </map:match>
-        
-        
-        <!-- CheckIn -->
-        <map:match pattern="checkin" type="usecase">
-          
-          <map:match pattern="checkin" type="step">
-            <map:act type="reserved-checkin">
-              <map:parameter name="backup" value="{request-param:backup}"/>
-              <map:generate src="content/rc/{exception}.xsp" type="serverpages">
-                <map:parameter name="user" value="{user}"/>
-                <map:parameter name="filename" value="{filename}"/>
-                <map:parameter name="checkType" value="{checkType}"/>
-                <map:parameter name="date" value="{date}"/>
-              </map:generate>
-              <map:transform src="fallback://lenya/xslt/rc/rco-exception.xsl"/>
-              <map:call resource="style-cms-page"/>
-            </map:act>
-            <map:redirect-to session="true" uri="{request:requestURI}"/>
-          </map:match>
-          
-        </map:match>
-
-        <!-- initialize the workflow -->
-        <map:match type="usecase" pattern="initworkflow">
-          <map:act type="task">
-            <map:parameter name="task-id" value="ant"/>
-            <map:parameter name="target" value="initworkflow"/>
-            <map:parameter name="properties.initworkflow.document-id" value="{page-envelope:document-id}"/>
-            <map:parameter name="properties.initworkflow.document-type" value="{page-envelope:document-type}"/>
-            <map:parameter name="properties.initworkflow.language" value="{page-envelope:document-language}"/>
-            <map:parameter name="properties.initworkflow.user-id" value="{access-control:user-id}"/>
-            <map:parameter name="properties.initworkflow.machine-ip" value="{access-control:ip-address}"/>
-            <map:redirect-to session="true" uri="{request:requestURI}"/>
-          </map:act>
-        </map:match>
-
-        <map:match pattern="transition" type="usecase">
-          <map:act type="task">
-            <map:parameter name="publication-id" value="{../1}"/>
-            <map:parameter name="task-id" value="empty"/>
-            <map:redirect-to session="true" uri="{request:requestURI}"/>
-          </map:act>
-        </map:match>
-        
-      </map:match>
-      
-    </map:pipeline>
-    
-  </map:pipelines>
-  
-</map:sitemap>
diff --git a/src/webapp/lenya/usecases/ac/login.jx b/src/webapp/lenya/usecases/ac/login.jx
deleted file mode 100644
index cfa5bb0..0000000
--- a/src/webapp/lenya/usecases/ac/login.jx
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<page:page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" 
-           xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" 
-           xmlns="http://www.w3.org/1999/xhtml" 
-           xmlns:i18n="http://apache.org/cocoon/i18n/2.1" >
-
-  <page:title>
-    <i18n:translate>
-      <i18n:text i18n:key="login-to-pub"/>
-      <i18n:param></i18n:param>
-    </i18n:translate>
-  </page:title>
-  <page:body>
-    <p>
-      <strong> <i18n:text>NOTE</i18n:text>: </strong>
-      <i18n:translate>
-        <i18n:text i18n:key="try-user-lenya" />
-        <i18n:param>"lenya"</i18n:param>
-        <i18n:param>"levi"</i18n:param>
-        <i18n:param>"alice"</i18n:param>
-        <i18n:param>"levi"</i18n:param>
-      </i18n:translate>
-    </p>
-    <div class="lenya-box">
-      <div class="lenya-box-title">
-        <i18n:text>Login</i18n:text>
-      </div>
-
-      <jx:import uri="templates/messages.jx"/>
-
-      <div class="lenya-box-body">
-        <form>
-          <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-          <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-          <table class="lenya-table-noborder">
-            <tr>
-              <td><label for="name"><i18n:text>Username</i18n:text>: </label></td>
-              <td>
-                <input class="lenya-form-element" name="username" type="text" />
-              </td>
-            </tr>
-            <tr>
-              <td><label for="password"> <i18n:text>Password</i18n:text>: </label></td>
-              <td>
-                <input class="lenya-form-element" name="password" type="password" />
-              </td>
-            </tr>
-            <tr>
-              <td />
-              <td>
-                <input i18n:attr="value" name="submit" type="submit" value="Login"/>
-              </td>
-            </tr>
-          </table>
-        </form>
-      </div>
-    </div>
-  </page:body>
-</page:page>
diff --git a/src/webapp/lenya/usecases/ac/logout.jx b/src/webapp/lenya/usecases/ac/logout.jx
deleted file mode 100644
index 5ec09b5..0000000
--- a/src/webapp/lenya/usecases/ac/logout.jx
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<page:page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" 
-           xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" 
-           xmlns="http://www.w3.org/1999/xhtml" 
-           xmlns:i18n="http://apache.org/cocoon/i18n/2.1" >
-
-  <page:title>
-    <i18n:translate>
-      <i18n:text i18n:key="logout-from-pub"/>
-      <i18n:param></i18n:param>
-    </i18n:translate>
-  </page:title>
-  <page:body>
-    <div class="lenya-box">
-      <div class="lenya-box-title">
-        <i18n:text>Logout</i18n:text>
-      </div>
-
-      <jx:import uri="templates/messages.jx"/>
-
-      <div class="lenya-box-body">
-        <form>
-          <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-          <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-          <table class="lenya-table-noborder">
-            <tr>
-              <td>
-                <input i18n:attr="value" name="submit" type="submit" value="Logout" />
-                &#160;
-                <input i18n:attr="value" name="cancel" type="submit" value="Cancel" />
-              </td>
-            </tr>
-          </table>
-        </form>
-      </div>
-    </div>
-    <div class="lenya-box">
-      <div class="lenya-box-title">
-        <i18n:text>Your History</i18n:text>
-      </div>
-      <div class="lenya-box-body">
-        <ul>
-          <jx:forEach var="url" items="${usecase.getParameter('history')}">
-            <li><jx:out value="${url}"/></li>
-          </jx:forEach>
-        </ul>
-      </div>
-    </div>
-  </page:body>
-</page:page>
diff --git a/src/webapp/lenya/usecases/admin/addGroup.jx b/src/webapp/lenya/usecases/admin/addGroup.jx
deleted file mode 100644
index a3f929d..0000000
--- a/src/webapp/lenya/usecases/admin/addGroup.jx
+++ /dev/null
@@ -1,67 +0,0 @@
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-
-<page:page
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-  >
-  
-  <page:body>
-    <jx:import uri="admin/tabs.jx"/>
-    <div id="contentblock1" class="lenya-tab">
-      <h1><i18n:text>Add Group</i18n:text></h1>
-    
-    <form>
-      <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-      <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-
-      <table class="lenya-table-noborder">
-        <tr>
-          <td colspan="2">
-            <jx:import uri="templates/messages.jx"/>
-          </td>
-        </tr>
-        <tr>
-          <td class="lenya-entry-caption"><label for="groupId"><i18n:text>Group ID</i18n:text> *</label></td>
-          <td><input type="text" name="groupId" class="lenya-form-element" value="${request.getParameter('groupId')}"/></td>
-        </tr>
-        <tr>
-          <td class="lenya-entry-caption"><label for="name"><i18n:text>Name</i18n:text></label></td>
-          <td><input type="text" name="name" class="lenya-form-element" value="${request.getParameter('name')}"/></td>
-        </tr>
-        <tr>
-          <td valign="top" class="lenya-entry-caption"><label for="description"><i18n:text>Description</i18n:text></label></td>
-          <td>
-            <!-- N.B.: do not put spaces or carriage returns inside the
-                 textarea element - these would be rendered -->
-            <textarea name="description" class="lenya-form-element"><jx:out value="${request.getParameter('description')}"/></textarea>
-          </td>
-        </tr>
-        <tr>
-          <td/>
-          <td>
-            <input i18n:attr="value" type="submit" name="submit" value="Add"/>
-            <input i18n:attr="value" type="submit" name="cancel" value="Cancel"/>
-          </td>
-        </tr>
-      </table>
-    </form>
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/admin/addIPRange.jx b/src/webapp/lenya/usecases/admin/addIPRange.jx
deleted file mode 100644
index 6578005..0000000
--- a/src/webapp/lenya/usecases/admin/addIPRange.jx
+++ /dev/null
@@ -1,92 +0,0 @@
-<page:page
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-  >
-  
-  <page:body>
-    <jx:import uri="admin/tabs.jx"/>
-    <div id="contentblock1" class="lenya-tab">
-      
-    <h1><i18n:text>Add IP Range</i18n:text></h1>
-    
-    <form>
-      <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-      <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-
-      <table class="lenya-table-noborder">
-        <tr>
-          <td colspan="2">
-            <jx:import uri="templates/messages.jx"/>
-          </td>
-        </tr>
-        <tr>
-          <td class="lenya-entry-caption"><i18n:text>IP Range ID</i18n:text> *</td>
-          <td><input type="text" name="ipRangeId" class="lenya-form-entry" value="${request.getParameter('ipRangeId')}"/></td>
-        </tr>
-        
-        <tr>
-          <td class="lenya-entry-caption"><i18n:text>Name</i18n:text></td>
-          <td><input type="text" name="name" class="lenya-form-entry" value="${request.getParameter('name')}"/></td>
-        </tr>
-        <tr>
-          <td valign="top" class="lenya-entry-caption"><i18n:text>Description</i18n:text></td>
-          <td>
-            <textarea name="description" class="lenya-form-entry">
-              <jx:out value="${request.getParameter('description')}"/>
-            </textarea>
-          </td>
-        </tr>
-
-        <tr>
-          <td class="lenya-entry-caption"><i18n:text>Network Address</i18n:text></td>
-          <td>
-            <jx:forEach var="part" items="${usecase.getParameter('partNumbers')}">
-              <jx:choose>
-              	<jx:when test="${usecase.getParameter('networkAddress-' + part).isValid()}">
-                  <input type="text" name="networkAddress-${part}" size="3" maxlength="3"
-                         value="${usecase.getParameter('networkAddress-' + part).getValue()}"
-                         style="text-align: right"/>
-              	</jx:when>
-              	<jx:otherwise>
-                  <input type="text" name="networkAddress-${part}" size="3" maxlength="3"
-                         value="${usecase.getParameter('networkAddress-' + part).getValue()}"
-                         style="background-color: #FF9999; text-align: right;"/>
-              	</jx:otherwise>
-            	</jx:choose>
-  		      </jx:forEach>
-          </td>
-        </tr>
-        <tr>
-          <td class="lenya-entry-caption"><i18n:text>Subnet Mask</i18n:text></td>
-          <td>
-            <jx:forEach var="part" items="${usecase.getParameter('partNumbers')}">
-              <jx:choose>
-              	<jx:when test="${usecase.getParameter('subnetMask-' + part).isValid()}">
-                  <input type="text" name="subnetMask-${part}" size="3" maxlength="3"
-                         value="${usecase.getParameter('subnetMask-' + part).getValue()}"
-                         style="text-align: right"/>
-              	</jx:when>
-              	<jx:otherwise>
-                  <input type="text" name="subnetMask-${part}" size="3" maxlength="3"
-                         value="${usecase.getParameter('subnetMask-' + part).getValue()}"
-                         style="background-color: #FF9999; text-align: right;"/>
-              	</jx:otherwise>
-            	</jx:choose>
-  		      </jx:forEach>
-          </td>
-        </tr>
-    
-        <tr>
-          <td/>
-          <td>
-            <input i18n:attr="value" type="submit" name="submit" value="Add"/>
-            <input i18n:attr="value" type="submit" name="cancel" value="Cancel"/>
-          </td>
-        </tr>
-      </table>
-    </form>
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/admin/addUser.jx b/src/webapp/lenya/usecases/admin/addUser.jx
deleted file mode 100644
index 3d2cece..0000000
--- a/src/webapp/lenya/usecases/admin/addUser.jx
+++ /dev/null
@@ -1,92 +0,0 @@
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-
-<page:page
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-  >
-  
-  <page:body>
-    <jx:import uri="admin/tabs.jx"/>
-    <div id="contentblock1" class="lenya-tab">
-    
-    <h1><i18n:text>Add <jx:out value="${request.getParameter('userType')}"/></i18n:text></h1>
-    
-    <form>
-      <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-      <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-
-      <table class="lenya-table-noborder">
-        <tr>
-          <td colspan="2">
-            <jx:import uri="templates/messages.jx"/>
-          </td>
-        </tr>
-        <tr>
-          <td class="lenya-entry-caption"><label for="userId"><i18n:text>User ID</i18n:text> *</label></td>
-          <td><input type="text" name="userId" class="lenya-form-element" value="${request.getParameter('userId')}"/></td>
-        </tr>
-        
-        <jx:if test="${request.getParameter('className') == 'org.apache.lenya.ac.ldap.LDAPUser'}">
-          <tr>
-            <td class="lenya-entry-caption"><label for="ldapId"><i18n:text>LDAP ID</i18n:text> *</label></td>
-            <td><input type="text" name="ldapId" class="lenya-form-element" value="${request.getParameter('ldapId')}"/></td>
-          </tr>
-        </jx:if>
-        
-        <tr>
-          <td class="lenya-entry-caption"><label for="fullName"><i18n:text>Name</i18n:text> *</label></td>
-          <td><input type="text" name="fullName" class="lenya-form-element" value="${request.getParameter('fullName')}"/></td>
-        </tr>
-        <tr>
-          <td valign="top" class="lenya-entry-caption"><label for="description"><i18n:text>Description</i18n:text></label></td>
-          <td>
-            <!-- N.B.: do not put spaces or carriage returns inside the
-                 textare element - these would be rendered -->
-            <textarea name="description" class="lenya-form-element"><jx:out value="${request.getParameter('description')}"/></textarea>
-          </td>
-        </tr>
-        <tr>
-          <td class="lenya-entry-caption"><label for="email"><i18n:text>E-Mail</i18n:text> *</label></td>
-          <td><input type="text" name="email" class="lenya-form-element" value="${request.getParameter('email')}"/></td>
-        </tr>
-        
-        <jx:if test="${request.getParameter('className') != 'org.apache.lenya.ac.ldap.LDAPUser'}">
-        <tr>
-          <td class="lenya-entry-caption"><label for="password"><i18n:text>Password</i18n:text> *</label></td>
-          <td><input type="password" name="password" class="lenya-form-element" value="${request.getParameter('password')}"/></td>
-        </tr>
-        <tr>
-          <td class="lenya-entry-caption"><label for="confirmPassword"><i18n:text>Confirm password</i18n:text> *</label></td>
-          <td><input type="password" name="confirmPassword" class="lenya-form-element" value="${request.getParameter('confirmPassword')}"/></td>
-        </tr>
-        </jx:if>
-        
-        <tr>
-          <td/>
-          <td>
-            <input i18n:attr="value" type="submit" name="submit" value="Add"/>
-            <input i18n:attr="value" type="submit" name="cancel" value="Cancel"/>
-          </td>
-        </tr>
-      </table>
-    </form>
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/admin/changePassword.jx b/src/webapp/lenya/usecases/admin/changePassword.jx
deleted file mode 100644
index 76c07b8..0000000
--- a/src/webapp/lenya/usecases/admin/changePassword.jx
+++ /dev/null
@@ -1,67 +0,0 @@
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-
-<page:page
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-  >
-  
-  <page:body>
-    <jx:import uri="admin/tabs.jx"/>
-    <div id="contentblock1" class="lenya-tab">
-    
-    <h1><i18n:text>Change Password</i18n:text></h1>
-    
-    <form>
-      <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-      <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-
-      <table class="lenya-table-noborder">
-        <tr>
-          <td colspan="2">
-            <jx:import uri="templates/messages.jx"/>
-          </td>
-        </tr>
-        <jx:if test="${usecase.getParameter('checkPassword').equals('true')}">
-          <tr>
-            <td class="lenya-entry-caption"><label for="oldPassword"><i18n:text>Old Password</i18n:text> *</label></td>
-            <td><input type="password" name="oldPassword" class="lenya-form-element" value="${usecase.getParameter('oldPassword')}"/></td>
-          </tr>
-        </jx:if>
-        <tr>
-          <td class="lenya-entry-caption"><label for="password"><i18n:text>New Password</i18n:text> *</label></td>
-          <td><input type="password" name="password" class="lenya-form-element" value="${usecase.getParameter('password')}"/></td>
-        </tr>
-        <tr>
-          <td class="lenya-entry-caption"><label for="confirmPassword"><i18n:text>Confirm Password</i18n:text> *</label></td>
-          <td><input type="password" name="confirmPassword" class="lenya-form-element" value="${usecase.getParameter('confirmPassword')}"/></td>
-        </tr>
-        
-        <tr>
-          <td/>
-          <td>
-            <input i18n:attr="value" type="submit" name="submit" value="Save"/>
-            <input i18n:attr="value" type="submit" name="cancel" value="Cancel"/>
-          </td>
-        </tr>
-      </table>
-    </form>
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/admin/deleteGroup.jx b/src/webapp/lenya/usecases/admin/deleteGroup.jx
deleted file mode 100644
index 92d0ee1..0000000
--- a/src/webapp/lenya/usecases/admin/deleteGroup.jx
+++ /dev/null
@@ -1,60 +0,0 @@
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-
-<page:page
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-  >
-  
-  <page:body>
-    <jx:import uri="admin/tabs.jx"/>
-    <div id="contentblock1" class="lenya-tab">
-    <h1><i18n:text>Delete Group</i18n:text></h1>
-    
-    <form>
-      <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-      <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-
-      <table class="lenya-table-noborder">
-        <tr>
-          <td colspan="2">
-            <jx:import uri="templates/messages.jx"/>
-          </td>
-        </tr>
-        <tr>
-          <td/>
-          <td>
-            <i18n:translate>
-              <i18n:text i18n:key="delete-object?"/>
-              <i18n:param><i18n:text>group</i18n:text>&#160;<q><jx:out value="${request.getParameter('groupId')}"/></q></i18n:param>
-            </i18n:translate>       
-          </td>
-        </tr>
-        <tr>
-          <td/>
-          <td>
-            <input i18n:attr="value" type="submit" name="submit" value="Yes"/>
-            <input i18n:attr="value" type="submit" name="cancel" value="No"/>
-          </td>
-        </tr>
-      </table>
-    </form>
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/admin/deleteUser.jx b/src/webapp/lenya/usecases/admin/deleteUser.jx
deleted file mode 100644
index c49e7d4..0000000
--- a/src/webapp/lenya/usecases/admin/deleteUser.jx
+++ /dev/null
@@ -1,59 +0,0 @@
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-
-<page:page
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-  >
-  
-  <page:body>
-    <jx:import uri="admin/tabs.jx"/>
-    <div id="contentblock1" class="lenya-tab">
-    <h1><i18n:text>Delete User</i18n:text></h1>    
-    <form>
-      <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-      <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-
-      <table class="lenya-table-noborder">
-        <tr>
-          <td colspan="2">
-            <jx:import uri="templates/messages.jx"/>
-          </td>
-        </tr>
-        <tr>
-          <td/>
-          <td>
-            <i18n:translate>
-              <i18n:text i18n:key="delete-object?"/>
-              <i18n:param><i18n:text>user</i18n:text>&#160;<q><jx:out value="${request.getParameter('userId')}"/></q></i18n:param>
-            </i18n:translate>       
-          </td>
-        </tr>
-        <tr>
-          <td/>
-          <td>
-            <input i18n:attr="value" type="submit" name="submit" value="Yes"/>
-            <input i18n:attr="value" type="submit" name="cancel" value="No"/>
-          </td>
-        </tr>
-      </table>
-    </form>
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/admin/emptyTrash.jx b/src/webapp/lenya/usecases/admin/emptyTrash.jx
deleted file mode 100644
index e1fb1e2..0000000
--- a/src/webapp/lenya/usecases/admin/emptyTrash.jx
+++ /dev/null
@@ -1,60 +0,0 @@
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-
-<page:page
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-  >
-  
-  <page:body>
-    <jx:import uri="admin/tabs.jx"/>
-    <div id="contentblock1" class="lenya-tab">
-    <h1><i18n:text>Delete Trash</i18n:text></h1>
-      
-    <jx:import uri="templates/messages.jx"/>
-    <p>
-      <jx:choose>
-        <jx:when test="${usecase.getParameter('documents').isEmpty()}">
-          <i18n:text>The trash is empty.</i18n:text>
-        </jx:when>
-        <jx:otherwise>
-          <strong><i18n:text>Documents in trash</i18n:text>:</strong>
-          <ul style="list-style-type: none">
-            <jx:forEach var="document" items="${usecase.getParameter('documents')}">
-              <li><jx:out value="${document.getId()}"/></li>
-            </jx:forEach>
-          </ul>
-        </jx:otherwise>
-      </jx:choose>
-    </p>
-    <form>
-      <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-      <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-      <jx:choose>
-        <jx:when test="${usecase.getParameter('documents').isEmpty()}">
-          <input i18n:attr="value" name="submit" type="submit" value="Delete" disabled="disabled"/>
-        </jx:when>
-        <jx:otherwise>
-          <input i18n:attr="value" name="submit" type="submit" value="Delete"/>
-        </jx:otherwise>
-      </jx:choose>
-    </form>
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/admin/group.jx b/src/webapp/lenya/usecases/admin/group.jx
deleted file mode 100644
index 591db45..0000000
--- a/src/webapp/lenya/usecases/admin/group.jx
+++ /dev/null
@@ -1,93 +0,0 @@
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-
-<page:page
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-  >
-  
-  <page:body>
-    <jx:import uri="admin/tabs.jx"/>
-    <div id="contentblock1" class="lenya-tab">
-    <h1><i18n:text>Group Profile</i18n:text></h1>
-      
-      <jx:set var="group" value="${usecase.getParameter('group')}"/>
-
-      <table class="lenya-table-noborder">
-        <tr>
-          <td colspan="2">
-            <jx:import uri="templates/messages.jx"/>
-          </td>
-        </tr>
-        <tr>
-          <td class="lenya-entry-caption"><i18n:text>Name</i18n:text>:</td>
-          <td><jx:out value="${group.getName()}"/></td>
-        </tr>
-        <tr>
-          <td valign="top" class="lenya-entry-caption"><i18n:text>Description</i18n:text>:</td>
-          <td>
-            <!-- N.B.: do not put spaces or carriage returns inside the
-                 textarea element - these would be rendered -->
-            <jx:out value="${group.getDescription()}"/>
-          </td>
-        </tr>
-        <tr>
-          <td/>
-          <td>
-            <form>
-              <input type="hidden" name="lenya.usecase" value="admin.groupProfile"/>
-              <input type="hidden" name="groupId" value="${group.getId()}"/>
-              <input i18n:attr="value" type="submit" value="Edit Profile"/>
-            </form>
-          </td>
-        </tr>
-        
-        <tr>
-          <td valign="top" class="lenya-entry-caption"><i18n:text>Members</i18n:text>:</td>
-          <td>
-            <jx:forEach var="member" items="${group.getMembers()}">
-              <jx:out value="${member.getId() + ' '}"/>
-            </jx:forEach>
-          </td>
-        </tr>
-        <tr>
-          <td/>
-          <td>
-            <form>
-              <input type="hidden" name="lenya.usecase" value="admin.groupMembers"/>
-              <input type="hidden" name="groupId" value="${group.getId()}"/>
-              <input i18n:attr="value" type="submit" value="Edit Members"/>
-            </form>
-          </td>
-        </tr>
-        
-        <tr>
-          <td/>
-          <td>
-            <form>
-              <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-              <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-              <input i18n:attr="value" type="submit" name="cancel" value="Cancel"/>
-            </form>
-          </td>
-        </tr>
-      </table>
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/admin/groupMembers.jx b/src/webapp/lenya/usecases/admin/groupMembers.jx
deleted file mode 100644
index 21fe42d..0000000
--- a/src/webapp/lenya/usecases/admin/groupMembers.jx
+++ /dev/null
@@ -1,89 +0,0 @@
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-
-<page:page
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-  >
-  
-  <page:body>
-    <jx:import uri="admin/tabs.jx"/>
-    <div id="contentblock1" class="lenya-tab">
-    <h1><i18n:text>Group Affiliation</i18n:text></h1>
-    
-    <form>
-      <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-      <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-
-       <table class="lenya-table-noborder">
-        <tr>
-          <td colspan="2">
-            <jx:import uri="templates/messages.jx"/>
-          </td>
-        </tr>
-      </table>
-
-      <table class="lenya-table-noborder-nopadding">
-        <tr>
-          <td>
-            <strong>
-              <i18n:text>Group Users</i18n:text>
-            </strong>
-          </td>
-          <td/>
-          <td>
-            <strong>
-              <i18n:text>All Users</i18n:text>
-            </strong>
-          </td>
-        </tr>
-        <tr>
-          <td valign="middle">
-            <select name="groupUser" size="15" class="lenya-form-element-narrow">
-              <jx:forEach var="user" items="${usecase.getParameter('groupUsers')}">
-                <option value="${user}"><jx:out value="${user}"/></option>
-              </jx:forEach>
-            </select>
-          </td>
-          <td valign="middle">
-            <input name="add" type="submit" value="&lt;"/>
-            <br/>
-            <input name="remove" type="submit" value="&gt;"/>
-          </td>
-          <td valign="middle">
-            <select name="otherUser" size="15" class="lenya-form-element-narrow">
-              <jx:forEach var="otherUser" items="${usecase.getParameter('otherUsers')}">
-                <option value="${otherUser}"><jx:out value="${otherUser}"/></option>
-              </jx:forEach>
-            </select>
-          </td>
-        </tr>
-        <tr>
-          <td colspan="3" style="text-align: center">
-            <br/>
-            <input i18n:attr="value" type="submit" name="submit" value="Save"/>
-            <input i18n:attr="value" type="submit" name="cancel" value="Cancel"/>
-          </td>
-        </tr>
-      </table>
-
-    </form>
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/admin/groupProfile.jx b/src/webapp/lenya/usecases/admin/groupProfile.jx
deleted file mode 100644
index 00a845e..0000000
--- a/src/webapp/lenya/usecases/admin/groupProfile.jx
+++ /dev/null
@@ -1,64 +0,0 @@
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-
-<page:page
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-  >
-  
-  <page:body>
-    <jx:import uri="admin/tabs.jx"/>
-    <div id="contentblock1" class="lenya-tab">
-    <h1><i18n:text>Edit Group Profile</i18n:text></h1>
-    
-    <form>
-      <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-      <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-
-      <table class="lenya-table-noborder">
-        <tr>
-          <td colspan="2">
-            <jx:import uri="templates/messages.jx"/>
-          </td>
-        </tr>
-        <tr>
-          <td class="lenya-entry-caption"><label for="name"><i18n:text>Name</i18n:text> *</label></td>
-          <td><input type="text" name="name" class="lenya-form-element" value="${usecase.getParameter('name')}"/></td>
-        </tr>
-        <tr>
-          <td valign="top" class="lenya-entry-caption"><label for="description"><i18n:text>Description</i18n:text></label></td>
-          <td>
-            <!-- N.B.: do not put spaces or carriage returns inside the
-                 textarea element - these would be rendered -->
-            <textarea name="description" class="lenya-form-element"><jx:out value="${usecase.getParameter('description')}"/></textarea>
-          </td>
-        </tr>
-        
-        <tr>
-          <td/>
-          <td>
-            <input i18n:attr="value" type="submit" name="submit" value="Save"/>
-            <input i18n:attr="value" type="submit" name="cancel" value="Cancel"/>
-          </td>
-        </tr>
-      </table>
-    </form>
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/admin/groups.jx b/src/webapp/lenya/usecases/admin/groups.jx
deleted file mode 100644
index 7b0e432..0000000
--- a/src/webapp/lenya/usecases/admin/groups.jx
+++ /dev/null
@@ -1,76 +0,0 @@
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-
-<page:page
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-  >
-  
-  <page:body>
-    <jx:import uri="admin/tabs.jx"/>
-    <div id="contentblock1" class="lenya-tab">
-    
-      <table class="lenya-table-noborder">
-        <tr>
-          <td colspan="2">
-            <jx:import uri="templates/messages.jx"/>
-          </td>
-        </tr>
-      </table>
-      
-      <div style="margin: 10px 0px">
-        <table class="lenya-table-noborder">
-      	  <tr>
-            <td>
-              <form method="GET">
-                <input type="hidden" name="lenya.usecase" value="admin.addGroup"/>
-                <input i18n:attr="value" type="submit" value="Add Group"/>
-              </form>
-            </td>
-          </tr>
-        </table>
-      </div>
-      
-      <table cellspacing="0" class="lenya-table">
-        <tr>
-          <th><i18n:text>Group ID</i18n:text></th>
-          <th><i18n:text>Name</i18n:text></th>
-          <th></th>
-        </tr>
-        <jx:forEach var="group" items="${usecase.getParameter('groups')}">
-          <tr>
-            <td style="vertical-align: middle">
-              <a href="${request.contextPath}${request.requestURI}?lenya.usecase=admin.group&amp;groupId=${group.getId()}"><jx:out value="${group.getId()}"/></a>
-            </td>
-            <td style="vertical-align: middle">
-              <jx:out value="${group.getName()}"/>
-            </td>
-            <td style="vertical-align: middle">
-              <form method="GET">
-                <input type="hidden" name="lenya.usecase" value="admin.deleteGroup"/>
-                <input name="groupId" type="hidden" value="${group.getId()}"/>
-                <input i18n:attr="value" type="submit" value="Delete"/>
-              </form>
-            </td>
-          </tr>
-        </jx:forEach>
-      </table>
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/admin/ipRange.jx b/src/webapp/lenya/usecases/admin/ipRange.jx
deleted file mode 100644
index 13e140a..0000000
--- a/src/webapp/lenya/usecases/admin/ipRange.jx
+++ /dev/null
@@ -1,105 +0,0 @@
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id: user.jx 164231 2005-04-22 12:56:59Z jwkaltz $ -->
-
-<page:page
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-  >
-  
-  <page:body>
-    <jx:import uri="admin/tabs.jx"/>
-    <div id="contentblock1" class="lenya-tab">
-    <h1><i18n:text>IP Range Profile</i18n:text></h1>
-    
-      <jx:set var="ipRange" value="${usecase.getParameter('ipRange')}"/>
-    
-      <table class="lenya-table-noborder">
-        <tr>
-          <td colspan="2">
-            <jx:import uri="templates/messages.jx"/>
-          </td>
-        </tr>
-        <tr>
-          <td class="lenya-entry-caption"><i18n:text>Name</i18n:text>:</td>
-          <td><jx:out value="${ipRange.getName()}"/></td>
-        </tr>
-        <tr>
-          <td valign="top" class="lenya-entry-caption"><i18n:text>Description</i18n:text>:</td>
-          <td>
-            <jx:out value="${ipRange.getDescription()}"/>
-          </td>
-        </tr>
-        <tr>
-          <td valign="top" class="lenya-entry-caption"><i18n:text>Network Address</i18n:text>:</td>
-          <td>
-            <jx:out value="${ipRange.getNetworkAddress().getHostAddress()}"/>
-          </td>
-        </tr>
-        <tr>
-          <td valign="top" class="lenya-entry-caption"><i18n:text>Subnet Mask</i18n:text>:</td>
-          <td>
-            <jx:out value="${ipRange.getSubnetMask().getHostAddress()}"/>
-          </td>
-        </tr>
-
-        <tr>
-          <td/>
-          <td>
-            <form>
-              <input type="hidden" name="lenya.usecase" value="admin.ipRangeProfile"/>
-              <input type="hidden" name="ipRangeId" value="${ipRange.getId()}"/>
-              <input i18n:attr="value" type="submit" value="Edit Profile"/>
-            </form>
-          </td>
-        </tr>
-        
-        <tr>
-          <td class="lenya-entry-caption"><i18n:text>Groups</i18n:text>:</td>
-          <td>
-            <jx:forEach var="group" items="${ipRange.getGroups()}">
-              <a href="${request.contextPath}${request.requestURI}?lenya.usecase=admin.groupProfile&amp;groupId=${group.getId()}"><jx:out value="${group.getId()}"/></a>
-            </jx:forEach>
-          </td>
-        </tr>
-        
-        <tr>
-          <td/>
-          <td>
-            <form>
-              <input type="hidden" name="lenya.usecase" value="admin.ipRangeGroups"/>
-              <input type="hidden" name="ipRangeId" value="${ipRange.getId()}"/>
-              <input i18n:attr="value" type="submit" value="Edit Group Affiliation"/>
-            </form>
-          </td>
-        </tr>
-        
-        <tr>
-          <td/>
-          <td>
-            <form>
-              <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-              <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-              <input i18n:attr="value" type="submit" name="cancel" value="Cancel"/>
-            </form>
-          </td>
-        </tr>
-      </table>
-    </div>
-  </page:body>
-</page:page>
diff --git a/src/webapp/lenya/usecases/admin/ipRangeGroups.jx b/src/webapp/lenya/usecases/admin/ipRangeGroups.jx
deleted file mode 100644
index 1a502f1..0000000
--- a/src/webapp/lenya/usecases/admin/ipRangeGroups.jx
+++ /dev/null
@@ -1,88 +0,0 @@
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id: userGroups.jx 164233 2005-04-22 13:01:45Z jwkaltz $ -->
-
-<page:page
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-  >
-  
-  <page:body>
-    <jx:import uri="admin/tabs.jx"/>
-    <div id="contentblock1" class="lenya-tab">
-      <h1><i18n:text>Group Affiliation</i18n:text></h1>
-    <form>
-      <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-      <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-
-       <table class="lenya-table-noborder">
-        <tr>
-          <td colspan="2">
-            <jx:import uri="templates/messages.jx"/>
-          </td>
-        </tr>
-      </table>
-
-      <table class="lenya-table-noborder-nopadding">
-        <tr>
-          <td>
-            <strong>
-              <i18n:text>IP Range Groups</i18n:text>
-            </strong>
-          </td>
-          <td/>
-          <td>
-            <strong>
-              <i18n:text>All Groups</i18n:text>
-            </strong>
-          </td>
-        </tr>
-        <tr>
-          <td valign="middle">
-            <select name="ipRangeGroup" size="15" class="lenya-form-element-narrow">
-              <jx:forEach var="group" items="${usecase.getParameter('ipRangeGroups')}">
-                <option value="${group}"><jx:out value="${group}"/></option>
-              </jx:forEach>
-            </select>
-          </td>
-          <td valign="middle">
-            <input name="add" type="submit" value="&lt;"/>
-            <br/>
-            <input name="remove" type="submit" value="&gt;"/>
-          </td>
-          <td valign="middle">
-            <select name="otherGroup" size="15" class="lenya-form-element-narrow">
-              <jx:forEach var="otherGroup" items="${usecase.getParameter('otherGroups')}">
-                <option value="${otherGroup}"><jx:out value="${otherGroup}"/></option>
-              </jx:forEach>
-            </select>
-          </td>
-        </tr>
-        <tr>
-          <td colspan="3" style="text-align: center">
-            <br/>
-            <input i18n:attr="value" type="submit" name="submit" value="Save"/>
-            <input i18n:attr="value" type="submit" name="cancel" value="Cancel"/>
-          </td>
-        </tr>
-      </table>
-
-    </form>
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/admin/ipRangeProfile.jx b/src/webapp/lenya/usecases/admin/ipRangeProfile.jx
deleted file mode 100644
index 4ef5c3e..0000000
--- a/src/webapp/lenya/usecases/admin/ipRangeProfile.jx
+++ /dev/null
@@ -1,92 +0,0 @@
-<page:page
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-  >
-  
-  <page:body>
-    <jx:import uri="admin/tabs.jx"/>
-    <div id="contentblock1" class="lenya-tab">
-      
-    <h1><i18n:text>IP Range Profile</i18n:text></h1>
-    
-    <form>
-      <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-      <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-      
-      <table class="lenya-table-noborder">
-        <tr>
-          <td colspan="2">
-            <jx:import uri="templates/messages.jx"/>
-          </td>
-        </tr>
-        <tr>
-          <td class="lenya-entry-caption"><i18n:text>IP Range ID</i18n:text></td>
-          <td><jx:out value="${usecase.getParameter('ipRange').getId()}"/></td>
-        </tr>
-        
-        <tr>
-          <td class="lenya-entry-caption"><i18n:text>Name</i18n:text></td>
-          <td><input type="text" name="name" class="lenya-form-entry" value="${request.getParameter('name')}"/></td>
-        </tr>
-        <tr>
-          <td valign="top" class="lenya-entry-caption"><i18n:text>Description</i18n:text></td>
-          <td>
-            <textarea name="description" class="lenya-form-entry">
-              <jx:out value="${request.getParameter('description')}"/>
-            </textarea>
-          </td>
-        </tr>
-
-        <tr>
-          <td class="lenya-entry-caption"><i18n:text>Network Address</i18n:text></td>
-          <td>
-            <jx:forEach var="part" items="${usecase.getParameter('partNumbers')}">
-              <jx:choose>
-              	<jx:when test="${usecase.getParameter('networkAddress-' + part).isValid()}">
-                  <input type="text" name="networkAddress-${part}" size="3" maxlength="3"
-                         value="${usecase.getParameter('networkAddress-' + part).getValue()}"
-                         style="text-align: right"/>
-              	</jx:when>
-              	<jx:otherwise>
-                  <input type="text" name="networkAddress-${part}" size="3" maxlength="3"
-                         value="${usecase.getParameter('networkAddress-' + part).getValue()}"
-                         style="background-color: #FF9999; text-align: right;"/>
-              	</jx:otherwise>
-            	</jx:choose>
-  		      </jx:forEach>
-          </td>
-        </tr>
-        <tr>
-          <td class="lenya-entry-caption"><i18n:text>Subnet Mask</i18n:text></td>
-          <td>
-            <jx:forEach var="part" items="${usecase.getParameter('partNumbers')}">
-              <jx:choose>
-              	<jx:when test="${usecase.getParameter('subnetMask-' + part).isValid()}">
-                  <input type="text" name="subnetMask-${part}" size="3" maxlength="3"
-                         value="${usecase.getParameter('subnetMask-' + part).getValue()}"
-                         style="text-align: right"/>
-              	</jx:when>
-              	<jx:otherwise>
-                  <input type="text" name="subnetMask-${part}" size="3" maxlength="3"
-                         value="${usecase.getParameter('subnetMask-' + part).getValue()}"
-                         style="background-color: #FF9999; text-align: right;"/>
-              	</jx:otherwise>
-            	</jx:choose>
-  		      </jx:forEach>
-          </td>
-        </tr>
-    
-        <tr>
-          <td/>
-          <td>
-            <input i18n:attr="value" type="submit" name="submit" value="Save"/>
-            <input i18n:attr="value" type="submit" name="cancel" value="Cancel"/>
-          </td>
-        </tr>
-      </table>
-    </form>
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/admin/ipRanges.jx b/src/webapp/lenya/usecases/admin/ipRanges.jx
deleted file mode 100644
index a25f456..0000000
--- a/src/webapp/lenya/usecases/admin/ipRanges.jx
+++ /dev/null
@@ -1,83 +0,0 @@
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-
-<page:page
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-  >
-  
-  <page:body>
-    <jx:import uri="admin/tabs.jx"/>
-    <div id="contentblock1" class="lenya-tab">
-    
-      <table class="lenya-table-noborder">
-        <tr>
-          <td colspan="2">
-            <jx:import uri="templates/messages.jx"/>
-          </td>
-        </tr>
-      </table>
-      
-      <div style="margin: 10px 0px">
-        <table class="lenya-table-noborder">
-      	  <tr>
-      	    <td>
-              <form method="GET">
-                <input type="hidden" name="lenya.usecase" value="admin.addIPRange"/>
-                <input i18n:attr="value" type="submit" value="Add IP Range"/>
-              </form>
-            </td>
-          </tr>
-        </table>
-      </div>
-      
-      <table cellspacing="0" class="lenya-table">
-        <tr>
-          <th><i18n:text>IP Range ID</i18n:text></th>
-          <th><i18n:text>Name</i18n:text></th>
-          <th><i18n:text>Groups</i18n:text></th>
-          <th></th>
-        </tr>
-        <jx:forEach var="ipRange" items="${usecase.getParameter('ipRanges')}">
-          <tr>
-            <td style="vertical-align: middle">
-              <a href="${request.contextPath}${request.requestURI}?lenya.usecase=admin.ipRange&amp;ipRangeId=${ipRange.getId()}"><jx:out value="${ipRange.getId()}"/></a>
-            </td>
-            <td style="vertical-align: middle">
-              <jx:out value="${ipRange.getName()}"/>
-            </td>
-            <td>
-              <jx:forEach var="group" items="${ipRange.getGroups()}">
-                <a href="${request.contextPath}${request.requestURI}?lenya.usecase=admin.groupProfile&amp;groupId=${group.getId()}"><jx:out value="${group.getId()}"/></a>
-              </jx:forEach>
-            </td>
-            <td style="vertical-align: middle">
-              <form method="GET">
-                <input type="hidden" name="lenya.usecase" value="admin.deleteIPRange"/>
-                <input name="ipRangeId" type="hidden" value="${ipRange.getId()}"/>
-                <input i18n:attr="value" type="submit" value="Delete"/>
-              </form>
-            </td>
-          </tr>
-        </jx:forEach>
-      </table>
-        
-  </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/admin/serverStatus.jx b/src/webapp/lenya/usecases/admin/serverStatus.jx
deleted file mode 100644
index 628b095..0000000
--- a/src/webapp/lenya/usecases/admin/serverStatus.jx
+++ /dev/null
@@ -1,37 +0,0 @@
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-
-<page:page
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
-  xmlns:cinclude="http://apache.org/cocoon/include/1.0"
-  >
-  
-  <page:body>
-    <jx:import uri="admin/tabs.jx"/>
-    <div id="contentblock1" class="lenya-tab">
-      <jx:import uri="templates/messages.jx"/>
-      
-      <cinclude:includexml>
-        <cinclude:src>cocoon://core/admin/status.xml</cinclude:src>
-      </cinclude:includexml>
-      
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/admin/tabs.jx b/src/webapp/lenya/usecases/admin/tabs.jx
deleted file mode 100644
index 318048e..0000000
--- a/src/webapp/lenya/usecases/admin/tabs.jx
+++ /dev/null
@@ -1,91 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: overview.jx 123960 2005-01-03 12:39:05Z andreas $ -->
-
-<jx:template
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
-  xmlns="http://www.w3.org/1999/xhtml"
-  name="">
-  
-	<div class="lenya-tabs">
-    <table border="0" cellpadding="0" cellspacing="0">
-      <tr>
-        <td>
-          <jx:choose>
-            <jx:when test="${usecase.getView().getParameter('tab').equals('users')}">
-              <a href="?lenya.usecase=admin.users" class="lenya-tablink-active"><i18n:text>Users</i18n:text></a>
-            </jx:when>
-            <jx:otherwise>
-              <a href="?lenya.usecase=admin.users" class="lenya-tablink"><i18n:text>Users</i18n:text></a>
-            </jx:otherwise>
-          </jx:choose>
-        </td>
-        <td>
-          <jx:choose>
-            <jx:when test="${usecase.getView().getParameter('tab').equals('groups')}">
-              <a href="?lenya.usecase=admin.groups" class="lenya-tablink-active"><i18n:text>Groups</i18n:text></a>
-            </jx:when>
-            <jx:otherwise>
-              <a href="?lenya.usecase=admin.groups" class="lenya-tablink"><i18n:text>Groups</i18n:text></a>
-            </jx:otherwise>
-          </jx:choose>
-        </td>
-        <td>
-          <jx:choose>
-            <jx:when test="${usecase.getView().getParameter('tab').equals('ipRanges')}">
-              <a href="?lenya.usecase=admin.ipRanges" class="lenya-tablink-active"><i18n:text>IP Ranges</i18n:text></a>
-            </jx:when>
-            <jx:otherwise>
-              <a href="?lenya.usecase=admin.ipRanges" class="lenya-tablink"><i18n:text>IP Ranges</i18n:text></a>
-            </jx:otherwise>
-          </jx:choose>
-        </td>
-        
-        <jx:set var="contextPath" value="${request.contextPath}"/>
-        <jx:set var="requestURI" value="${request.requestURI}"/>
-        <jx:set var="steps" value="${requestURI.substring(contextPath.length()).split('/')}"/>
-        <jx:set var="urlPrefix" value="${contextPath + steps[1]}"/>
-        
-        <td>
-          <jx:choose>
-            <jx:when test="${usecase.getView().getParameter('tab').equals('trash')}">
-              <a href="?lenya.usecase=admin.emptyTrash" class="lenya-tablink-active"><i18n:text>Delete Trash</i18n:text></a>
-            </jx:when>
-            <jx:otherwise>
-              <a href="?lenya.usecase=admin.emptyTrash" class="lenya-tablink"><i18n:text>Delete Trash</i18n:text></a>
-            </jx:otherwise>
-          </jx:choose>
-        </td>
-        <td>
-          <a class="lenya-tablink" href="/${urlPrefix}/admin/lucene.html"><i18n:text>Search</i18n:text></a>
-        </td>
-        <td>
-          <jx:choose>
-            <jx:when test="${usecase.getView().getParameter('tab').equals('serverStatus')}">
-              <a href="?lenya.usecase=admin.serverStatus" class="lenya-tablink-active"><i18n:text>Cocoon and Server Status</i18n:text></a>
-            </jx:when>
-            <jx:otherwise>
-              <a href="?lenya.usecase=admin.serverStatus" class="lenya-tablink"><i18n:text>Cocoon and Server Status</i18n:text></a>
-            </jx:otherwise>
-          </jx:choose>
-        </td>
-      </tr>
-    </table>
-  </div>
-</jx:template>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/admin/usecase.xmap b/src/webapp/lenya/usecases/admin/usecase.xmap
deleted file mode 100644
index b95786a..0000000
--- a/src/webapp/lenya/usecases/admin/usecase.xmap
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: admin.xmap 160670 2005-04-09 09:12:12Z andreas $ -->
-
-<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
-
-  <map:pipelines>
-    <map:pipeline>
-
-      <map:match pattern="status.xml">
-        <map:generate src="status" type="status"/>
-        <map:transform src="fallback://lenya/xslt/admin/status2html.xslt">
-          <map:parameter name="contextPath" value="{request:contextPath}"/>
-        </map:transform>
-        <map:serialize type="xml"/>
-      </map:match>
-    
-    </map:pipeline>
-  </map:pipelines>
-  
-</map:sitemap>
diff --git a/src/webapp/lenya/usecases/admin/user.jx b/src/webapp/lenya/usecases/admin/user.jx
deleted file mode 100644
index 8a70756..0000000
--- a/src/webapp/lenya/usecases/admin/user.jx
+++ /dev/null
@@ -1,114 +0,0 @@
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-
-<page:page
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-  >
-  
-  <page:body>
-    <jx:import uri="admin/tabs.jx"/>
-    <div id="contentblock1" class="lenya-tab">
-    <h1><i18n:text>User Profile</i18n:text></h1>
-    
-      <jx:set var="user" value="${usecase.getParameter('user')}"/>
-    
-      <table class="lenya-table-noborder">
-        <tr>
-          <td colspan="2">
-            <jx:import uri="templates/messages.jx"/>
-          </td>
-        </tr>
-        <tr>
-          <td class="lenya-entry-caption"><i18n:text>Name</i18n:text>:</td>
-          <td><jx:out value="${user.getName()}"/></td>
-        </tr>
-        <jx:if test="${user.getLdapId()}">
-           <tr>
-              <td class="lenya-entry-caption"><i18n:text>LDAP ID</i18n:text>:</td>
-              <td><jx:out value="${user.getLdapId()}"/></td>
-           </tr>
-        </jx:if>
-        <tr>
-          <td valign="top" class="lenya-entry-caption"><i18n:text>Description</i18n:text>:</td>
-          <td>
-            <jx:out value="${user.getDescription()}"/>
-          </td>
-        </tr>
-
-        <tr>
-          <td class="lenya-entry-caption"><i18n:text>E-Mail</i18n:text>:</td>
-          <td><jx:out value="${user.getEmail()}"/></td>
-        </tr>
-        
-        <tr>
-          <td class="lenya-entry-caption"><i18n:text>Default Menu Locale</i18n:text>:</td>
-          <td><jx:out value="${user.getDefaultMenuLocale()}"/></td>
-        </tr>
-        
-        <tr>
-          <td class="lenya-entry-caption"><i18n:text>Default Document Locale</i18n:text>:</td>
-          <td><jx:out value="${user.getDefaultDocumentLocale()}"/></td>
-        </tr>
-        
-        <tr>
-          <td/>
-          <td>
-            <form>
-              <input type="hidden" name="lenya.usecase" value="admin.userProfile"/>
-              <input type="hidden" name="userId" value="${user.getId()}"/>
-              <input i18n:attr="value" type="submit" value="Edit Profile"/>
-            </form>
-          </td>
-        </tr>
-        
-        <tr>
-          <td class="lenya-entry-caption"><i18n:text>Groups</i18n:text>:</td>
-          <td>
-            <jx:forEach var="group" items="${user.getGroups()}">
-              <a href="${request.contextPath}${request.requestURI}?lenya.usecase=admin.groupProfile&amp;groupId=${group.getId()}"><jx:out value="${group.getId()}"/></a>
-            </jx:forEach>
-          </td>
-        </tr>
-        
-        <tr>
-          <td/>
-          <td>
-            <form>
-              <input type="hidden" name="lenya.usecase" value="admin.userGroups"/>
-              <input type="hidden" name="userId" value="${user.getId()}"/>
-              <input i18n:attr="value" type="submit" value="Edit Group Affiliation"/>
-            </form>
-          </td>
-        </tr>
-        
-        <tr>
-          <td/>
-          <td>
-            <form>
-              <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-              <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-              <input i18n:attr="value" type="submit" name="cancel" value="Cancel"/>
-            </form>
-          </td>
-        </tr>
-      </table>
-    </div>
-  </page:body>
-</page:page>
diff --git a/src/webapp/lenya/usecases/admin/userGroups.jx b/src/webapp/lenya/usecases/admin/userGroups.jx
deleted file mode 100644
index 3c2a9ec..0000000
--- a/src/webapp/lenya/usecases/admin/userGroups.jx
+++ /dev/null
@@ -1,88 +0,0 @@
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-
-<page:page
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-  >
-  
-  <page:body>
-    <jx:import uri="admin/tabs.jx"/>
-    <div id="contentblock1" class="lenya-tab">
-      <h1><i18n:text>Group Affiliation</i18n:text></h1>
-    <form>
-      <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-      <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-
-       <table class="lenya-table-noborder">
-        <tr>
-          <td colspan="2">
-            <jx:import uri="templates/messages.jx"/>
-          </td>
-        </tr>
-      </table>
-
-      <table class="lenya-table-noborder-nopadding">
-        <tr>
-          <td>
-            <strong>
-              <i18n:text>User Groups</i18n:text>
-            </strong>
-          </td>
-          <td/>
-          <td>
-            <strong>
-              <i18n:text>All Groups</i18n:text>
-            </strong>
-          </td>
-        </tr>
-        <tr>
-          <td valign="middle">
-            <select name="userGroup" size="15" class="lenya-form-element-narrow">
-              <jx:forEach var="group" items="${usecase.getParameter('userGroups')}">
-                <option value="${group}"><jx:out value="${group}"/></option>
-              </jx:forEach>
-            </select>
-          </td>
-          <td valign="middle">
-            <input name="add" type="submit" value="&lt;"/>
-            <br/>
-            <input name="remove" type="submit" value="&gt;"/>
-          </td>
-          <td valign="middle">
-            <select name="otherGroup" size="15" class="lenya-form-element-narrow">
-              <jx:forEach var="otherGroup" items="${usecase.getParameter('otherGroups')}">
-                <option value="${otherGroup}"><jx:out value="${otherGroup}"/></option>
-              </jx:forEach>
-            </select>
-          </td>
-        </tr>
-        <tr>
-          <td colspan="3" style="text-align: center">
-            <br/>
-            <input i18n:attr="value" type="submit" name="submit" value="Save"/>
-            <input i18n:attr="value" type="submit" name="cancel" value="Cancel"/>
-          </td>
-        </tr>
-      </table>
-
-    </form>
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/admin/userProfile.jx b/src/webapp/lenya/usecases/admin/userProfile.jx
deleted file mode 100644
index 35324b9..0000000
--- a/src/webapp/lenya/usecases/admin/userProfile.jx
+++ /dev/null
@@ -1,79 +0,0 @@
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-
-<page:page
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-  >
-  
-  <page:body>
-    <jx:import uri="admin/tabs.jx"/>
-    <div id="contentblock1" class="lenya-tab">
-    <h1><i18n:text>Edit User Profile</i18n:text></h1>
-    
-    <form>
-      <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-      <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-
-      <table class="lenya-table-noborder">
-        <tr>
-          <td colspan="2">
-            <jx:import uri="templates/messages.jx"/>
-          </td>
-        </tr>
-        <tr>
-          <td class="lenya-entry-caption"><label for="name"><i18n:text>Name</i18n:text> *</label></td>
-          <td><input type="text" name="fullName" class="lenya-form-element" value="${usecase.getParameter('fullName')}"/></td>
-        </tr>
-        <tr>
-          <td valign="top" class="lenya-entry-caption"><label for="description"><i18n:text>Description</i18n:text></label></td>
-          <td>
-            <!-- N.B.: do not put spaces or carriage returns inside the
-                 textarea element - these would be rendered -->
-            <textarea name="description" class="lenya-form-element"><jx:out value="${usecase.getParameter('description')}"/></textarea>
-          </td>
-        </tr>
-
-        <tr>
-          <td class="lenya-entry-caption"><label for="email"><i18n:text>E-Mail</i18n:text> *</label></td>
-          <td><input type="text" name="email" class="lenya-form-element" value="${usecase.getParameter('email')}"/></td>
-        </tr>
-        
-        <tr>
-          <td class="lenya-entry-caption"><label for="defaultMenuLocale"><i18n:text>Default Menu Locale</i18n:text> *</label></td>
-          <td><input type="text" name="defaultMenuLocale" class="lenya-form-element" value="${usecase.getParameter('defaultMenuLocale')}"/></td>
-        </tr>
-        
-        <tr>
-          <td class="lenya-entry-caption"><label for="defaultDocumentLocale"><i18n:text>Default Document Locale</i18n:text> *</label></td>
-          <td><input type="text" name="defaultDocumentLocale" class="lenya-form-element" value="${usecase.getParameter('defaultDocumentLocale')}"/></td>
-        </tr>
-        
-        <tr>
-          <td/>
-          <td>
-            <input i18n:attr="value" type="submit" name="submit" value="Save"/>
-            <input i18n:attr="value" type="submit" name="cancel" value="Cancel"/>
-          </td>
-        </tr>
-      </table>
-    </form>
-    </div>
-  </page:body>
-</page:page>
diff --git a/src/webapp/lenya/usecases/admin/users.jx b/src/webapp/lenya/usecases/admin/users.jx
deleted file mode 100644
index 5261279..0000000
--- a/src/webapp/lenya/usecases/admin/users.jx
+++ /dev/null
@@ -1,80 +0,0 @@
-<page:page
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-  >
-  
-  <page:body>
-    <jx:import uri="admin/tabs.jx"/>
-    <div id="contentblock1" class="lenya-tab">
-    
-      <table class="lenya-table-noborder">
-        <tr>
-          <td colspan="2">
-            <jx:import uri="templates/messages.jx"/>
-          </td>
-        </tr>
-      </table>
-      
-      <div style="margin: 10px 0px">
-        <table class="lenya-table-noborder">
-      	  <tr>
-    	    <td>
-      		  <i18n:text>Add User</i18n:text>:&#160;
-    	    </td>
-    	    <jx:forEach var="type" items="${usecase.getParameter('userTypes')}">
-    	      <td>
-    	        <form method="GET">
-                <input type="hidden" name="lenya.usecase" value="admin.addUser"/>
-                <input type="hidden" name="className" value="${type.getClassName()}"/>
-                <input type="hidden" name="userType" value="${type.getKey()}"/>
-                <input i18n:attr="value" type="submit" value="${type.getKey()}"/>
-              </form>
-    	      </td>
-    	    </jx:forEach>
-          </tr>
-        </table>
-      </div>
-      
-      <table cellspacing="0" class="lenya-table">
-        <tr>
-          <th><i18n:text>User ID</i18n:text></th>
-          <th><i18n:text>Full Name</i18n:text></th>
-          <th><i18n:text>Groups</i18n:text></th>
-          <th></th>
-        </tr>
-        <jx:forEach var="user" items="${usecase.getParameter('users')}">
-          <tr>
-            <td style="vertical-align: middle">
-              <a href="${request.contextPath}${request.requestURI}?lenya.usecase=admin.user&amp;userId=${user.getId()}"><jx:out value="${user.getId()}"/></a>
-            </td>
-            <td style="vertical-align: middle">
-              <jx:out value="${user.getName()}"/>
-            </td>
-            <td>
-              <jx:forEach var="group" items="${user.getGroups()}">
-                <a href="${request.contextPath}${request.requestURI}?lenya.usecase=admin.groupProfile&amp;groupId=${group.getId()}"><jx:out value="${group.getId()}"/></a>
-              </jx:forEach>
-            </td>
-            <td style="vertical-align: middle">
-              <form method="GET">
-                <input type="hidden" name="lenya.usecase" value="admin.deleteUser"/>
-                <input name="userId" type="hidden" value="${user.getId()}"/>
-                <jx:choose>
-                  <jx:when test="${user.equals(usecase.getParameter('currentUser'))}">
-                    <input i18n:attr="value" type="submit" value="Delete" disabled="disabled"/>
-                  </jx:when>
-                  <jx:otherwise>
-                    <input i18n:attr="value" type="submit" value="Delete"/>
-                  </jx:otherwise>
-                </jx:choose>
-              </form>
-            </td>
-          </tr>
-        </jx:forEach>
-      </table>
-        
-  </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/edit-document.js b/src/webapp/lenya/usecases/edit-document.js
deleted file mode 100644
index 51f20ad..0000000
--- a/src/webapp/lenya/usecases/edit-document.js
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-importClass(Packages.org.apache.lenya.cms.cocoon.flow.FlowHelper);
-importClass(Packages.org.apache.excalibur.source.SourceResolver);
-importClass(Packages.org.apache.lenya.cms.cocoon.source.SourceUtil);
-
-/**
- * Provides general flow functions for document editing.
- * @version $Id$
- */
-
-function checkoutDocument() {
-}
-
-function checkinDocument() {
-}
-
-/**
- * Saves a Source to the document in the current PageEnvelope.
- * TODO: Use nobby's new usecase fw in 1.4 branch. Exception handling e.g. display appropriate error pages.
- * @param sourceUri An URI of a Source providing the edited document data
- * @param useBuffer If "true", the source Source is read into a buffer before it is written to its final destination.
- * @param workflowEvent Name of the workflow event to trigger. Default is "edit".
- * @param noWorkflow If true, no workflow event will be triggered. Default is false.
- * @param noCheckin If true, the current document is not checked in. Default is false.
- * @param backup If true, a new revision is created on checkin. Default is true.
- * @param status Default int value is 204. Used to set the response status.
- * @param noStatus If true, then no response status will be set.     
- */
-function editDocument() {
-    var usecaseName = cocoon.parameters["lenya.usecase"];
-    
-    var usecaseResolver;
-    var usecase;
-    
-    try {
-        usecaseResolver = cocoon.getComponent("org.apache.lenya.cms.usecase.UsecaseResolver");
-        usecase = usecaseResolver.resolve(usecaseName);
-
-        var flowHelper = cocoon.getComponent("org.apache.lenya.cms.cocoon.flow.FlowHelper");
-        var request = flowHelper.getRequest(cocoon);
-        var sourceUrl = Packages.org.apache.lenya.util.ServletHelper.getWebappURI(request);
-
-        if (cocoon.log.isDebugEnabled()) {
-            cocoon.log.debug("edit-document.js::editDocument() calling usecase methods, usecaseName [" + usecaseName + "], sourceUrl [" + sourceUrl + "]");    
-        }
-
-        usecase.setSourceURL(sourceUrl);
-        usecase.setName(usecaseName);
-
-        usecase.checkPreconditions();
-        usecase.lockInvolvedObjects();
-        if (!usecase.getErrorMessages().isEmpty()) {
-            throw new Exception("Checking pre-conditions or locking failed!");
-        }
-        else {
-            usecase.execute();
-            if (usecase.getErrorMessages().isEmpty()) {
-                // TODO: handle error messages
-            }
-        }
-
-        if (cocoon.log.isDebugEnabled()) {
-            cocoon.log.debug("edit-document.js::editDocument() after usecase.execute(), hasErrors ? " + usecase.hasErrors());
-        }
-
-        // FIXME: handle error messages
-        //if (usecase.hasErrors()) {
-        //}
-
-        if(_getParameter("noStatus", "false") == "false")
-            cocoon.sendStatus(_getParameter("status", 204));
-        else
-            cocoon.redirectTo(_getParameter("redirectUrl", "FIXME"));
-
-    } catch (exception) {
-
-	/* FIXME: This is unclean because the flow will not return a value
-	   if there is an exception */
-        cocoon.log.error("Can not edit document.", exception);
-        
-    }
-    finally {
-        /* done with usecase component, tell usecaseResolver to release it */
-        if (usecaseResolver != null) {
-            if (usecase != null) {
-                usecaseResolver.release(usecase);
-                usecase = undefined;
-            }
-            cocoon.releaseComponent(usecaseResolver);
-        }
-    }
-        
-}
-
-function _getParameter(name, defaultValue) {
-    if(cocoon.parameters[name])
-        return cocoon.parameters[name];
-    else
-        return defaultValue;
-}
-
diff --git a/src/webapp/lenya/usecases/edit/bxe/addSourceTags.xsl b/src/webapp/lenya/usecases/edit/bxe/addSourceTags.xsl
deleted file mode 100644
index aee66c9..0000000
--- a/src/webapp/lenya/usecases/edit/bxe/addSourceTags.xsl
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: addSourceTags.xsl 42703 2004-03-13 12:57:53Z gregor $ -->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-<xsl:param name="source"/>
-
-<xsl:template match="/">
-  <open>
-  <source:write xmlns:source="http://apache.org/cocoon/source/1.0">
-    <source:source><xsl:value-of select="$source"/></source:source>
-    <source:fragment>
-      <xsl:copy-of select="."/>
-    </source:fragment>
-  </source:write>
-    <content>
-      <xsl:copy-of select="."/>
-    </content>
-  </open>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/usecases/edit/bxe/bxe.jx b/src/webapp/lenya/usecases/edit/bxe/bxe.jx
deleted file mode 100644
index ce55166..0000000
--- a/src/webapp/lenya/usecases/edit/bxe/bxe.jx
+++ /dev/null
@@ -1,48 +0,0 @@
-<page:page
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
-  xmlns:cinclude="http://apache.org/cocoon/include/1.0"
-  >
-  
-  <page:head>
-    <link rel="stylesheet" href="${request.getContextPath()}/bxe/css/editor.css" type="text/css"/>
-    <script src="${request.getContextPath()}/bxe/bxeLoader.js" type="text/javascript"/>
-    
-    <meta name="bxeNS" content="xhtml=http://www.w3.org/1999/xhtml"/>
-    <meta name="bxeNS" content="lenya=http://apache.org/cocoon/lenya/page-envelope/1.0"/>
-    <meta name="bxeNS" content="dc=http://purl.org/dc/elements/1.1/"/>
-    <meta name="bxeNS" content="dcterms=http://purl.org/dc/terms/"/>
-  </page:head>
-  
-  <page:title><i18n:text>Bitflux Editor</i18n:text></page:title>
-  
-  <jx:set var="configFile" value="${request.getRequestURI()}"/>
-
-  <jx:choose>
-    <jx:when test="${usecase.hasErrors()}">
-      <page:body>
-        <jx:import uri="templates/messages.jx"/>
-      </page:body>
-    </jx:when>
-    <jx:otherwise>
-      <page:body onload="bxe_start('${configFile}?lenya.usecase=bxe&amp;lenya.step=config&amp;lenya.continuation=${continuation.id}')">
-    
-        <!-- everything in the following div element will be replaced -->
-        <div id="bxe_area">
-        <noscript>
-        <span style='font-family: Arial; padding: 5px; background-color: #ffffff'>
-        You need JavaScript enabled. Otherwise nothing at all works here
-        :)</span></noscript>
-        </div>
-        
-        <!-- another way to do it without having to use xslt
-          <div id="foobar" bxe_xpath="/xhtml:body"></div>
-        -->
-            
-      </page:body>
-    </jx:otherwise>
-  </jx:choose>
-  
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/edit/bxe/removeSourceTags.xsl b/src/webapp/lenya/usecases/edit/bxe/removeSourceTags.xsl
deleted file mode 100644
index 7318e84..0000000
--- a/src/webapp/lenya/usecases/edit/bxe/removeSourceTags.xsl
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: removeSourceTags.xsl 42703 2004-03-13 12:57:53Z gregor $ -->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-<xsl:template match="/">
-  <xsl:copy-of select="/open/content/*"/>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/usecases/edit/forms/copy-mixed-content.xsl b/src/webapp/lenya/usecases/edit/forms/copy-mixed-content.xsl
deleted file mode 100644
index d7f8476..0000000
--- a/src/webapp/lenya/usecases/edit/forms/copy-mixed-content.xsl
+++ /dev/null
@@ -1,163 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: copy-mixed-content.xsl 42908 2004-04-26 14:57:25Z michi $ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
->
-
-
-
-
-<!-- FIXME: works bugfree, but is kind of ugly, because each element will list all namespaces -->
-<!--
-<xsl:template match="//*" mode="mixedcontent" priority="-1">
-<xsl:variable name="prefix"><xsl:if test="contains(name(),':')">:<xsl:value-of select="substring-before(name(),':')"/></xsl:if></xsl:variable>
-
-<xsl:choose>
-<xsl:when test="node()">
-<xsl:text>&lt;</xsl:text><xsl:value-of select="name()"/>
-
-<xsl:apply-templates select="@*[local-name()!='tagID']" mode="mixedcontent"/>
-
-<xsl:for-each select="namespace::*">
-<xsl:variable name="prefix"><xsl:if test="local-name() != ''">:<xsl:value-of select="local-name()"/></xsl:if></xsl:variable>
-<xsl:if test=". != 'http://www.w3.org/XML/1998/namespace'">
-<xsl:text> </xsl:text>xmlns<xsl:value-of select="$prefix"/>="<xsl:value-of select="."/><xsl:text>"</xsl:text>
-</xsl:if>
-</xsl:for-each>
-
-<xsl:text>&gt;</xsl:text>
-
-<xsl:apply-templates select="node()" mode="mixedcontent"/>
-
-<xsl:text>&lt;/</xsl:text><xsl:value-of select="name()"/><xsl:text>&gt;</xsl:text>
-
-</xsl:when>
-
-<xsl:otherwise>
-
-<xsl:text>&lt;</xsl:text><xsl:value-of select="name()"/>
-
-<xsl:apply-templates select="@*[local-name()!='tagID']" mode="mixedcontent"/>
-
-<xsl:for-each select="namespace::*">
-<xsl:variable name="prefix"><xsl:if test="local-name() != ''">:<xsl:value-of select="local-name()"/></xsl:if></xsl:variable>
-<xsl:if test=". != 'http://www.w3.org/XML/1998/namespace'">
-<xsl:text> </xsl:text>xmlns<xsl:value-of select="$prefix"/>="<xsl:value-of select="."/><xsl:text>"</xsl:text>
-</xsl:if>
-</xsl:for-each>
-
-<xsl:text>/&gt;</xsl:text></xsl:otherwise>
-</xsl:choose>
-</xsl:template>
-
-<xsl:template match="@*" mode="mixedcontent"><xsl:text> </xsl:text><xsl:value-of select="name()"/>="<xsl:value-of select="."/>"</xsl:template>
--->
-
-
-
-
-
-
-
-
-
-
-<!-- List all the namespaces -->
-<xsl:template match="//*" mode="namespaces" priority="-1">
-<xsl:variable name="prefix"><xsl:if test="contains(name(),':')">:<xsl:value-of select="substring-before(name(),':')"/></xsl:if></xsl:variable>
-
-<xsl:if test="namespace-uri()"><xsl:text> </xsl:text>xmlns<xsl:value-of select="$prefix"/>="<xsl:value-of select="namespace-uri()"/>"</xsl:if><xsl:apply-templates select="@*[local-name()!='tagID']" mode="namespaces"/>
-<xsl:apply-templates select="node()" mode="namespaces"/>
-</xsl:template>
-
-<xsl:template match="@*" mode="namespaces">
-<xsl:variable name="prefix"><xsl:if test="contains(name(),':')">:<xsl:value-of select="substring-before(name(),':')"/></xsl:if></xsl:variable>
-
-<xsl:if test="namespace-uri()"><xsl:text> </xsl:text>xmlns<xsl:value-of select="$prefix"/>="<xsl:value-of select="namespace-uri()"/>"</xsl:if></xsl:template>
-
-<xsl:template match="text()" mode="namespaces"/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<!-- FIXME: namespaces occur multiple times, e.g. xlink:show="" xlink:href="" xmlns:xlink="" xmlns:xlink="" -->
-<xsl:template match="//*" mode="mixedcontent" priority="-1">
-<xsl:variable name="prefix"><xsl:if test="contains(name(),':')">:<xsl:value-of select="substring-before(name(),':')"/></xsl:if></xsl:variable>
-
-<xsl:choose>
-<xsl:when test="node()">
-<xsl:text>&lt;</xsl:text><xsl:value-of select="name()"/><!--<xsl:if test="namespace-uri()"><xsl:text> </xsl:text>xmlns<xsl:value-of select="$prefix"/>="<xsl:value-of select="namespace-uri()"/>"</xsl:if>--><xsl:apply-templates select="@*[local-name()!='tagID']" mode="mixedcontent"/><xsl:text>&gt;</xsl:text>
-<xsl:apply-templates select="node()" mode="mixedcontent"/>
-<xsl:text>&lt;/</xsl:text><xsl:value-of select="name()"/><xsl:text>&gt;</xsl:text>
-</xsl:when>
-
-<!-- Empty element (why is this not node?) -->
-<xsl:otherwise>
-<xsl:text>&lt;</xsl:text><xsl:value-of select="name()"/><!--<xsl:if test="namespace-uri()"><xsl:text> </xsl:text>xmlns<xsl:value-of select="$prefix"/>="<xsl:value-of select="namespace-uri()"/>"</xsl:if>--><xsl:apply-templates select="@*[local-name()!='tagID']" mode="mixedcontent"/><xsl:text> /&gt;</xsl:text>
-</xsl:otherwise>
-</xsl:choose>
-</xsl:template>
-
-<!-- Attributes -->
-<xsl:template match="@*" mode="mixedcontent">
-<xsl:variable name="prefix"><xsl:if test="contains(name(),':')">:<xsl:value-of select="substring-before(name(),':')"/></xsl:if></xsl:variable>
-
-<xsl:text> </xsl:text><xsl:value-of select="name()"/>="<xsl:call-template name="search-and-replace"><xsl:with-param name="string" select="."/></xsl:call-template>"<!--<xsl:if test="namespace-uri()"><xsl:text> </xsl:text>xmlns<xsl:value-of select="$prefix"/>="<xsl:value-of select="namespace-uri()"/>"</xsl:if>--></xsl:template>
-
-
-
-<xsl:template match="text()" mode="mixedcontent">
-  <xsl:call-template name="search-and-replace">
-    <xsl:with-param name="string" select="."/>
-  </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="search-and-replace">
-<xsl:param name="string"/>
-
-<xsl:choose>
-<xsl:when test="contains($string, '&lt;')">
-  <xsl:call-template name="search-and-replace"><xsl:with-param name="string" select="substring-before($string, '&lt;')"/></xsl:call-template>&amp;lt;<xsl:call-template name="search-and-replace"><xsl:with-param name="string" select="substring-after($string, '&lt;')"/></xsl:call-template>
-</xsl:when>
-<xsl:when test="contains($string, '&gt;')">
-  <xsl:call-template name="search-and-replace"><xsl:with-param name="string" select="substring-before($string, '&gt;')"/></xsl:call-template>&amp;gt;<xsl:call-template name="search-and-replace"><xsl:with-param name="string" select="substring-after($string, '&gt;')"/></xsl:call-template>
-</xsl:when>
-<xsl:when test="contains($string, '&amp;')">
-  <xsl:call-template name="search-and-replace"><xsl:with-param name="string" select="substring-before($string, '&amp;')"/></xsl:call-template>&amp;amp;<xsl:call-template name="search-and-replace"><xsl:with-param name="string" select="substring-after($string, '&amp;')"/></xsl:call-template>
-</xsl:when>
-<!-- FIXME: &quot; and &apos; -->
-<xsl:otherwise>
-  <xsl:value-of select="$string"/>
-</xsl:otherwise>
-</xsl:choose>
-</xsl:template>
- 
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/usecases/edit/forms/form-layout.xsl b/src/webapp/lenya/usecases/edit/forms/form-layout.xsl
deleted file mode 100644
index a17e7f3..0000000
--- a/src/webapp/lenya/usecases/edit/forms/form-layout.xsl
+++ /dev/null
@@ -1,205 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: form-layout.xsl 155267 2005-02-24 22:41:27Z gregor $ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns="http://www.w3.org/1999/xhtml"
->
-
-<xsl:param name="nodeid" select="''"/>
-
-<xsl:param name="contextPrefix" select="'/lenya'"/>
-<xsl:param name="edit" select="'No node selected yet'"/>
-<xsl:param name="wfevent" select="'null'"/>
-
-<xsl:variable name="imagesPath"><xsl:value-of select="$contextPrefix"/>/lenya/images/editor</xsl:variable>
-
-<xsl:include href="copy-mixed-content.xsl"/>
-
-<xsl:template match="form">
-<div>
-<div class="lenya-box">
-  <div class="lenya-box-title" style="text-align: right">
-    <input type="hidden" name="namespaces"><xsl:attribute name="value"><xsl:apply-templates select="//*" mode="namespaces" /></xsl:attribute></input>
-    <input type="submit" value="SAVE" name="submit"/>&#160;<input type="submit" value="CANCEL" name="cancel"/>
-  </div>
-  <div class="lenya-box-body">
-  
-  <table class="lenya-table">
-    <xsl:apply-templates mode="nodes"/>
-  </table>
-
-  </div>
-  <div class="lenya-box-title" style="text-align: right">
-    <input type="submit" value="SAVE" name="submit"/>&#160;<input type="submit" value="CANCEL" name="cancel"/>
-  </div>
-</div>
-
-<div class="lenya-box">
-  <div class="lenya-box-title"><a href="http://www.w3.org/TR/REC-xml#syntax">Predefined Entities</a></div>
-  <div class="lenya-box-body">
-<ul>
-<li>&amp;lt; instead of &lt; (left angle bracket <strong>must</strong> be escaped)</li>
-<li>&amp;amp; instead of &amp; (ampersand <strong>must</strong> be escaped)</li>
-<li>&amp;gt; instead of > (right angle bracket)</li>
-<li>&amp;apos; instead of ' (single-quote)</li>
-<li>&amp;quot; instead of " (double-quote)</li>
-</ul>
-</div>
-</div>
-
- <xsl:variable name="currentTagID">
-    <xsl:value-of select="substring-before(substring-after($edit, &quot;@tagID='&quot;), &quot;'&quot;)"/>
-  </xsl:variable>
-  <xsl:if test="$currentTagID != ''">
-    <script type="text/javascript">
-
-      function addLoadEvent(func) {
-        var oldonload = window.onload;
-        if (typeof window.onload != 'function') {
-          window.onload = func;
-        } else {
-          window.onload = function() {
-            oldonload();
-            func();
-          }
-        }
-      }
-
-     addLoadEvent(goAnchor);
-
-      function goAnchor() {
-         document.location.hash = '<xsl:value-of select="$currentTagID"/>';
-         window.scrollBy(0, -150);
-      }
-    </script>
-  </xsl:if>
-
-</div>
-</xsl:template>
-
-<xsl:template match="namespace" mode="nodes">
-  <input type="hidden" name="namespace.{@prefix}" value="{@uri}"/>
-</xsl:template>
-
-<xsl:template match="node" mode="nodes">
-<tr>
-  <td valign="top" style="background-color: #BFBFA2"><xsl:apply-templates select="action"/><xsl:if test="not(action)">&#160;</xsl:if><xsl:apply-templates select="@select"/></td>
-  <xsl:choose>
-    <xsl:when test="content">
-      <td valign="top" style="background-color:#DCDBBF"><xsl:apply-templates select="@name"/></td>
-      <td valign="top"><xsl:apply-templates select="content"/></td>
-    </xsl:when>
-    <xsl:otherwise>
-      <td colspan="2" valign="top" style="background-color:#DCDBBF"><xsl:apply-templates select="@name"/></td>
-    </xsl:otherwise>
-  </xsl:choose>
-</tr>
-</xsl:template>
-
-<xsl:template match="insert-before" mode="nodes">
-    <tr>
-      <td style="background-color: #BFBFA2"><input type="submit" value="INSERT BEFORE" name="insert-before"/></td>
-      <td colspan="2" style="background-color: #DCDBBF">
-        <select name="&lt;xupdate:insert-before select=&quot;{@select}&quot;/&gt;" size="1">
-            <option value="null">Choose element ...</option>
-          <xsl:for-each select="element">
-            <option value="{@xupdate}"><xsl:value-of select="@name"/></option>
-          </xsl:for-each>
-        </select>
-      </td>
-    </tr>
-</xsl:template>
-
-<xsl:template match="insert-after" mode="nodes">
-    <tr>
-      <td style="background-color: #BFBFA2"><input type="submit" value="INSERT AFTER" name="insert-after"/></td>
-      <td colspan="2" style="background-color: #DCDBBF">
-        <select name="&lt;xupdate:insert-after select=&quot;{@select}&quot;/&gt;" size="1">
-            <option value="null">Choose element ...</option>
-          <xsl:for-each select="element">
-            <option value="{@xupdate}"><xsl:value-of select="@name"/></option>
-          </xsl:for-each>
-        </select>
-      </td>
-    </tr>
-</xsl:template>
-
-<xsl:template match="node()" mode="nodes" priority="-1">
-</xsl:template>
-
-<xsl:template match="action">
-<xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="content">
-<xsl:choose>
-<xsl:when test="$edit = ../@select">
-  <xsl:apply-templates select="textarea"/>
-  <xsl:copy-of select="input"/>
-</xsl:when>
-<xsl:otherwise>
-  <p>
-    <xsl:choose>
-      <xsl:when test="(../@name='Object')">
-        <img src="{$nodeid}/{input/@value}"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="input/@value"/>
-        <xsl:copy-of select="textarea/node()"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </p>
-</xsl:otherwise>
-</xsl:choose>
-</xsl:template>
-
-<xsl:template match="textarea">
-<xsl:copy>
-  <xsl:copy-of select="@*"/>
-  <xsl:apply-templates mode="mixedcontent"/>
-</xsl:copy>
-</xsl:template>
-
-<xsl:template match="insert">
-<!--
-<input type="submit" name="{@name}" value="INSERT"/>
--->
-<xsl:text> </xsl:text>
-<input type="image" src="{$imagesPath}/add.png" name="{@name}" value="LENYA"/>
-</xsl:template>
-
-<xsl:template match="delete">
-<xsl:text> </xsl:text>
-<input type="image" src="{$imagesPath}/delete.png" name="{@name}" value="true"/>
-</xsl:template>
-
-<xsl:template match="@select">
-<xsl:text> </xsl:text>
-<!-- FIXME: Internet Explorer does not send the value of input type equals image. Mozilla does. -->
-
-<xsl:variable name="tagID">
-    <xsl:value-of select="substring-before(substring-after(., &quot;@tagID='&quot;), &quot;'&quot;)"/>
-</xsl:variable>
-<xsl:value-of select="@tagID"/>
-<a name="{$tagID}"/>
-<input type="image" src="{$imagesPath}/edit.png" name="edit[{.}]" value="{.}"/>
-</xsl:template>
-
-</xsl:stylesheet>  
diff --git a/src/webapp/lenya/usecases/edit/forms/form.xsl b/src/webapp/lenya/usecases/edit/forms/form.xsl
deleted file mode 100644
index da8070b..0000000
--- a/src/webapp/lenya/usecases/edit/forms/form.xsl
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: form.xsl 42908 2004-04-26 14:57:25Z michi $ -->
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
-    <xsl:param name="docid"/>
-    <xsl:param name="form"/>
-    <xsl:param name="message"/>
-    
-    <xsl:template match="/">
-        <form>
-            <docid><xsl:value-of select="$docid"/></docid>
-            <ftype><xsl:value-of select="$form"/></ftype>
-            <xsl:if test="$message">
-                <message><xsl:value-of select="$message"/></message>
-            </xsl:if>
-            <xsl:apply-templates/>
-        </form>
-    </xsl:template>
-    
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/usecases/edit/forms/forms.jx b/src/webapp/lenya/usecases/edit/forms/forms.jx
deleted file mode 100644
index 9a1736f..0000000
--- a/src/webapp/lenya/usecases/edit/forms/forms.jx
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-<page:page
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
-  xmlns:cinclude="http://apache.org/cocoon/include/1.0"
-  >
-  
-  <page:title><i18n:text>Edit</i18n:text></page:title>
-  <page:body>
-    
-    <jx:import uri="templates/messages.jx"/>
-
-    <form method="post">
-      <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-      <input type="hidden" name="lenya.usecase" value="${usecase.getName()}"/>
-      <jx:choose>
-        <jx:when test="${! usecase.hasErrors()}">
-          
-          <div class="lenya-box">
-            <div class="lenya-box-title">Information</div>
-            <div class="lenya-box-body">
-              <table class="lenya-table-noborder">
-                <tr>
-                  <td class="lenya-entry-caption">Document:</td>
-                  <td><jx:out value="${usecase.getParameter('document').getId()}"/></td>
-                </tr>
-                <tr>
-                  <td class="lenya-entry-caption">Form:</td>
-                  <td><jx:out value="${usecase.getParameter('form')}"/></td>
-                </tr>
-                <tr>
-                  <td class="lenya-entry-caption">Node:</td>
-                  <td><jx:out value="${usecase.getParameter('editSelect')}"/></td>
-                </tr>
-                <tr>
-                  <td class="lenya-entry-caption">Workflow Event:</td>
-                  <jx:set var="event" value="${request.getParameter('lenya.event')}"/>
-                  <jx:choose>
-                    <jx:when test="${event.equals('') || event.equals('null')}">
-                      <td>No workflow event specified</td>
-                    </jx:when>
-                    <jx:otherwise>
-                      <td><jx:out value="${event}"/></td>
-                    </jx:otherwise>
-                  </jx:choose>
-                </tr>
-              </table>
-            </div>
-          </div>
-          
-          <cinclude:includexml>
-            <cinclude:src>cocoon://core/edit/form/<jx:out value="${usecase.getParameter('form')}"/>/<jx:out value="${usecase.getParameter('editSelect')}"/></cinclude:src>
-          </cinclude:includexml>
-        </jx:when>
-        <jx:otherwise>
-          <input type="submit" name="cancel" value="Cancel"/>
-        </jx:otherwise>
-      </jx:choose>
-    </form>
-    
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/edit/forms/numberTags.xsl b/src/webapp/lenya/usecases/edit/forms/numberTags.xsl
deleted file mode 100644
index 573a655..0000000
--- a/src/webapp/lenya/usecases/edit/forms/numberTags.xsl
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: numberTags.xsl 155356 2005-02-25 18:25:59Z gregor $ -->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-<xsl:output method="xml" version="1.0" indent="yes"/>
-
-<xsl:template match="/">
-  <xsl:apply-templates select="*">
-    <xsl:with-param name="parentID" select="'tag'"/>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="*|text()|@*">
-  <xsl:param name="parentID"/>
-  <xsl:variable name="thisID" select="concat($parentID,'.', count(preceding-sibling::*))"/>
-  <xsl:copy>
-    <xsl:attribute name="tagID"><xsl:value-of select="$thisID"/></xsl:attribute>
-    <xsl:copy-of select="@*"/>
-    <xsl:apply-templates select="*|text()|@*">
-      <xsl:with-param name="parentID" select="$thisID"/>
-    </xsl:apply-templates>
-  </xsl:copy>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/usecases/edit/forms/oneform.jx b/src/webapp/lenya/usecases/edit/forms/oneform.jx
deleted file mode 100644
index b27b470..0000000
--- a/src/webapp/lenya/usecases/edit/forms/oneform.jx
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-<page:page
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
-  xmlns:cinclude="http://apache.org/cocoon/include/1.0"
-  >
-  
-  <page:title><i18n:text>Edit</i18n:text></page:title>
-  <page:body>
-    
-    <jx:import uri="templates/messages.jx"/>
-
-    <form method="post">
-      <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-      <input type="hidden" name="lenya.usecase" value="${usecase.getName()}"/>
-      <jx:choose>
-        <jx:when test="${! usecase.hasErrors()}">
-          
-          <div class="lenya-box">
-            <div class="lenya-box-title">Information</div>
-            <div class="lenya-box-body">
-              <table class="lenya-table-noborder">
-                <tr>
-                  <td class="lenya-entry-caption">Document:</td>
-                  <td><jx:out value="${usecase.getParameter('document').getId()}"/></td>
-                </tr>
-                <tr>
-                  <td class="lenya-entry-caption">Workflow Event:</td>
-                  <jx:set var="event" value="${request.getParameter('lenya.event')}"/>
-                  <jx:choose>
-                    <jx:when test="${event.equals('') || event.equals('null')}">
-                      <td>No workflow event specified</td>
-                    </jx:when>
-                    <jx:otherwise>
-                      <td><jx:out value="${event}"/></td>
-                    </jx:otherwise>
-                  </jx:choose>
-                </tr>
-              </table>
-            </div>
-          </div>
-          
-          <cinclude:includexml>
-            <cinclude:src>cocoon://core/edit/oneform</cinclude:src>
-          </cinclude:includexml>
-        </jx:when>
-        <jx:otherwise>
-          <input type="submit" name="cancel" value="Cancel"/>
-        </jx:otherwise>
-      </jx:choose>
-    </form>
-    
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/edit/forms/oneform.xsl b/src/webapp/lenya/usecases/edit/forms/oneform.xsl
deleted file mode 100644
index 69dc625..0000000
--- a/src/webapp/lenya/usecases/edit/forms/oneform.xsl
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: oneform.xsl 42908 2004-04-26 14:57:25Z michi $ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
-  >
-
-  <xsl:output indent="no" />
-  <xsl:param name="docid" />
-  <xsl:param name="language" />
-
-  <xsl:include href="copy-mixed-content.xsl" />
-  
-  <xsl:template match="/">
-    <div>
-        <div class="lenya-box">
-          <div class="lenya-box-title">
-            <a href="http://www.w3.org/TR/REC-xml#syntax">Predefined Entities</a>
-          </div>
-          <div class="lenya-box-body">
-            <ul>
-              <li>&amp;lt; instead of &lt; (left angle bracket <strong>must</strong> be escaped)</li>
-              <li>&amp;amp; instead of &amp; (ampersand <strong>must</strong> be escaped)</li>
-              <li>&amp;gt; instead of &gt; (right angle bracket)</li>
-              <li>&amp;apos; instead of ' (single-quote)</li>
-              <li>&amp;quot; instead of " (double-quote)</li>
-            </ul>
-          </div>
-        </div>
-        <div class="lenya-box">
-          <div class="lenya-box-body">
-    	      <input type="hidden" name="namespaces"><xsl:attribute name="value"><xsl:apply-templates mode="namespaces" /></xsl:attribute></input>
-              <table border="0">
-                <tr>
-                  <td align="right">
-                    <input type="submit" value="Save" name="submit" />
-                    <input type="submit" value="Cancel" name="cancel" />
-                  </td>
-                </tr>
-                <tr>
-                  <td>
-                    <textarea name="content" cols="120" rows="80">
-                      <xsl:apply-templates mode="mixedcontent" />
-                    </textarea>
-                  </td>
-                </tr>
-                <tr>
-                  <td align="right">
-                    <input type="submit" value="Save" name="submit" />
-                    <input type="submit" value="Cancel" name="cancel" />
-                  </td>
-                </tr>
-              </table>
-          </div>
-        </div>
-    </div>
-  </xsl:template>
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/usecases/edit/forms/unnumberTags.xsl b/src/webapp/lenya/usecases/edit/forms/unnumberTags.xsl
deleted file mode 100644
index 8e6b396..0000000
--- a/src/webapp/lenya/usecases/edit/forms/unnumberTags.xsl
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: unnumberTags.xsl 42703 2004-03-13 12:57:53Z gregor $ -->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-<xsl:output method="xml" version="1.0" indent="yes"/>
-
-<xsl:template match="/">
-  <xsl:apply-templates select="*"/>
-</xsl:template>
-
-<!-- FIXME: there seems to be something wrong!!! (Xalan?) if something is written in front of Copy, then it works, else it doesn't ... -->
-<xsl:template match="*|text()">
-  <xsl:copy>
-    <xsl:copy-of select="@*[name()!='tagID']"/>
-    <xsl:apply-templates select="*|text()"/>
-  </xsl:copy>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/usecases/edit/insertAsset.jx b/src/webapp/lenya/usecases/edit/insertAsset.jx
deleted file mode 100644
index 917bf69..0000000
--- a/src/webapp/lenya/usecases/edit/insertAsset.jx
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<page:page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" 
-           xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" 
-           xmlns="http://www.w3.org/1999/xhtml" 
-           xmlns:i18n="http://apache.org/cocoon/i18n/2.1" >
-           
-  <page:head>
-    <script src="${request.contextPath}/lenya/javascript/usecases/edit/insertAsset.js"/>
-  </page:head>
-
-  <page:body>
-    <form method="POST" name="image">
-      <input type="hidden" name="lenya.usecase" value="${usecase.getName()}"/>
-      <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-      <table class="lenya-table">
-        <tr>
-          <th/>
-          <th><i18n:text>Assets</i18n:text></th>
-          <th><i18n:text>Preview</i18n:text></th>
-          <th><i18n:text>Title</i18n:text></th>
-          <th><i18n:text>File Size</i18n:text></th>
-          <th><i18n:text>Creation Date</i18n:text></th>
-        </tr>
-        <jx:forEach var="asset" items="${usecase.getParameter('assets')}">
-          <tr>
-            <td><input type="radio" name="asset" value="${asset.getName()}"
-                       onClick="javascript:insertCaption('${asset.getName()}', '${asset.getMetaDataManager().getDublinCoreMetaData().getFirstValue('title')}', '${asset.getMimeType()}', '${asset.getContentLength() / 1000}')"/></td>
-            <td><jx:out value="${asset.getName()}"/></td>
-            <td>        
-              <jx:set var="mimeType" value="${asset.getMimeType()}"/>
-              <jx:if test="${mimeType.startsWith('image/')}">
-                <jx:set var="doc" value="${usecase.getParameter('document')}"/>
-                <img src="${request.getContextPath()}/${doc.getPublication().getId()}/authoring/${doc.getId()}/${asset.getName()}"
-                     style="height: 32px; vertical-align: middle;"/>&#160;
-              </jx:if>
-            </td>
-            <td><jx:out value="${asset.getMetaDataManager().getDublinCoreMetaData().getFirstValue('title')}"/></td>
-            <td align="right"><jx:out value="${asset.getContentLength() / 1000}"/> kB</td>
-            <td align="right"><jx:out value="${java.text.DateFormat.getDateInstance().format(asset.getLastModified())}"/></td>
-          </tr>
-        </jx:forEach>
-        <tr>
-          <td colspan="6">
-            <div style="margin: 10px">
-              <label for="caption"><i18n:text>Caption</i18n:text></label>: <input class="lenya-form-element" type="text" name="caption"/>
-              <input type="hidden" name="type" value=""/>
-              <input type="hidden" name="assetName" value=""/>
-              <input type="hidden" name="assetSize" value=""/>
-            </div>
-            <div style="margin: 10px">
-              <input i18n:attr="value" type="submit" name="submit" value="Submit"
-                     onClick="javascript:${usecase.getView().getParameter('callbackFunction')}('${usecase.getParameter('document').getName()}');" />
-              &#160;
-              <input i18n:attr="value" type="submit" name="cancel" value="Cancel"
-                     onClick="location.href='javascript:window.close();';" />
-            </div>
-          </td>
-        </tr>
-      </table>
-    </form>
-     <jx:if test="${usecase.getParameter('document').getArea().equals('authoring')}">
-      <form method="POST" enctype="multipart/form-data">
-        <input type="hidden" name="lenya.usecase" value="${usecase.getName()}"/>
-        <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-        <table class="lenya-table-noborder">
-          <tr>
-            <td colspan="2">
-              <jx:import uri="templates/messages.jx"/>
-            </td>
-          </tr>
-          <tr>
-            <td class="lenya-entry-caption"><label for="file"><i18n:text>File</i18n:text> *</label></td>
-            <td><input type="file" name="file" class="lenya-form-element"/></td>
-          </tr>
-          <tr>
-            <td class="lenya-entry-caption"><label for="title"><i18n:text>Title</i18n:text> *</label></td>
-            <td><input type="text" name="title" class="lenya-form-element" value="${usecase.getParameter('title')}"/></td>
-          </tr>
-          <tr>
-            <td class="lenya-entry-caption"><label for="creator"><i18n:text>Creator</i18n:text> *</label></td>
-            <td><input type="text" name="creator" class="lenya-form-element" value="${usecase.getParameter('creator')}"/></td>
-          </tr>
-          <tr>
-            <td class="lenya-entry-caption"><label for="rights"><i18n:text>Rights</i18n:text> *</label></td>
-            <td><input type="text" name="rights" class="lenya-form-element" value="${usecase.getParameter('rights')}"/></td>
-          </tr>
-          <tr>
-            <td/>
-            <td>
-              <input i18n:attr="value" type="submit" value="New Asset"/>
-            </td>
-          </tr>
-        </table>
-       </form>
-     </jx:if>
-  </page:body>
-</page:page>
diff --git a/src/webapp/lenya/usecases/edit/usecase.xmap b/src/webapp/lenya/usecases/edit/usecase.xmap
deleted file mode 100644
index a7939ad..0000000
--- a/src/webapp/lenya/usecases/edit/usecase.xmap
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
-  <!-- =========================== Components ================================ -->
-  <map:components/>
-  <!-- =========================== Pipelines ================================ -->  
-  <map:pipelines>
-    
-    <map:component-configurations>
-      <global-variables>
-        <!-- To access core resources -->
-        <basedir>../..</basedir>
-      </global-variables>
-    </map:component-configurations>
-
-    <map:pipeline>
-      <map:match pattern="form/*/**">
-        <map:generate src="lenya://lenya/pubs/{page-envelope:publication-id}/content/authoring/{page-envelope:document-path}"/>
-        <map:select type="parameter">
-          <map:parameter name="parameter-selector-test" value="{request-param:lenya.continutation}"/>
-          <map:when test="">
-            <map:transform src="fallback://lenya/usecases/edit/forms/numberTags.xsl"/>
-          </map:when>
-        </map:select>
-        <map:transform src="fallback://lenya/usecases/edit/forms/{1}.xsl">
-          <map:parameter name="docid" value="{page-envelope:document-path}"/>
-          <map:parameter name="nodeid" value="{page-envelope:document-name}"/>
-          <map:parameter name="form" value="{1}"/>
-        </map:transform>
-        <map:transform src="fallback://lenya/usecases/edit/forms/form-layout.xsl">
-          <map:parameter name="contextPrefix" value="{page-envelope:context-prefix}"/>
-          <map:parameter name="nodeid" value="{page-envelope:document-name}"/>
-          <map:parameter name="wfevent" value="{request-param:lenya.event}"/>
-<!--          <map:parameter name="edit" value="{flow-attribute:usecase/parameter[@name = 'editSelect']}"/> -->
-          <map:parameter name="edit" value="{2}"/>
-        </map:transform>
-        <map:serialize type="xml"/>
-      </map:match>
-      
-      <map:match pattern="oneform">
-        <map:generate src="lenya://lenya/pubs/{page-envelope:publication-id}/content/authoring/{page-envelope:document-path}"/>
-        <map:transform src="fallback://lenya/usecases/edit/forms/oneform.xsl">
-          <map:parameter name="docid" value="{page-envelope:document-id}"/>
-          <map:parameter name="language" value="{page-envelope:document-language}"/>
-        </map:transform>
-        <map:serialize type="xml"/>
-      </map:match>
-      
-    </map:pipeline>
-    
-  </map:pipelines>
-
-</map:sitemap>
diff --git a/src/webapp/lenya/usecases/kupu/usecase-kupu.js b/src/webapp/lenya/usecases/kupu/usecase-kupu.js
deleted file mode 100644
index 98ae108..0000000
--- a/src/webapp/lenya/usecases/kupu/usecase-kupu.js
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-importClass(Packages.java.util.ArrayList);
-
-importClass(Packages.org.apache.lenya.cms.cocoon.flow.FlowHelper);
-importClass(Packages.org.apache.lenya.cms.publication.util.DocumentHelper);
-importClass(Packages.org.apache.lenya.cms.publication.DefaultResourcesManager);
-
-/**
- * Kupu usecase flow.
- * @version $Id$
- */
-
-/**
- * Collects all link/url information from a publication's siteree.
- * This information is used to generate xml for the Kupu (link) library drawer.
- */
-function sitetree_link_library() {
-    
-    var flowHelper = new FlowHelper();
-    var documentHelper = flowHelper.getDocumentHelper(cocoon);
-    var pageEnvelope = flowHelper.getPageEnvelope(cocoon);
-    var siteTree = pageEnvelope.getPublication().getSiteTree(pageEnvelope.getDocument().getArea());
-    var allNodes = siteTree.getNode("/").preOrder();
-    var resources = new ArrayList(allNodes.size()-1);
-    var addedResourcesCount = 0;
-    
-    for(var i=1; i<allNodes.size(); i++) {
-    	var languageLabel = allNodes.get(i).getLabel(pageEnvelope.getDocument().getLanguage())
-		/* If the current sitree node does not exist in the displayed document's language
-		 * Continue with next node. This is a quick fix for bug #32808.
-		 * Next step would be to offer all links to the available languages.
-		 * by roku 
-		 */
-		if (languageLabel == null) continue;
-		
-        resources.add(addedResourcesCount, {
-                "url" : documentHelper.getDocumentUrl(allNodes.get(i).getAbsoluteId(), pageEnvelope.getDocument().getArea(), null),
-                "label" : languageLabel.getLabel(),
-                "id" : allNodes.get(i).getId(),
-                "fullid" : allNodes.get(i).getAbsoluteId(),
-                "language" : pageEnvelope.getDocument().getLanguage()});
-        addedResourcesCount++;
-    }
-    
-    cocoon.sendPage("sitetree_link_library_template", {"resources" : resources});
-}
-
-/**
- * Collects infos about all image resources in a publication.
-FIXME PublicationHelper does no longer exist
-function publication_image_library() {        
-    var pageEnvelope = new FlowHelper().getPageEnvelope(cocoon);
-    var pubHelper = new PublicationHelper(pageEnvelope.getPublication());
-    var allDocs = pubHelper.getAllDocuments(pageEnvelope.getDocument().getArea(), pageEnvelope.getDocument().getLanguage());
-    var imageInfos = new ArrayList();
-    
-    for(var i=0; i<allDocs.length; i++) {
-        if(allDocs[i].getId().equals(pageEnvelope.getDocument().getId()))
-            continue;
-        var resourcesMgr = new DefaultResourcesManager(allDocs[i]);
-        var imageResources = resourcesMgr.getImageResources();
-        
-        for(var j=0; j<imageResources.length; j++) {
-            var metaDoc = org.apache.lenya.xml.DocumentHelper.readDocument(resourcesMgr.getMetaFile(imageResources[j]));
-            var title = metaDoc.getElementsByTagNameNS("http://purl.org/dc/elements/1.1/", "title").item(0).getChildNodes().item(0).getNodeValue();
-            
-            imageInfos.add({
-                    "url" : pageEnvelope.getContext() + "/" + resourcesMgr.getResourceUrl(imageResources[j]),
-                    "name" : imageResources[j].getName(),
-                    "title" : title,
-                    "length" : imageResources[j].length(),
-                    "iconUrl" : cocoon.parameters["iconUrl"]
-            });
-        }
-    }
-    cocoon.sendPage(cocoon.parameters["template"], {"imageInfos" : imageInfos});
-}
-*/
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/kupu/usecase-kupu.xmap b/src/webapp/lenya/usecases/kupu/usecase-kupu.xmap
deleted file mode 100644
index 3f33897..0000000
--- a/src/webapp/lenya/usecases/kupu/usecase-kupu.xmap
+++ /dev/null
@@ -1,260 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<!--
-  Kupu usecase sitemaps. Integrates the Kupu editor (http://kupu.oscom.org/) into Lenya.
-  Most matchers serve as callbacks for Kupu running in a client's browser.
-  Make sure that Kupu is installed under lenya/resources/kupu.
-  
-  Most of (re)sources used in generators and transfomers of this sitemap
-  are located in the Kupu distribution.
-  
-  Enjoy using Kupu.
--->
-
-<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
-  <!-- =========================== Components ================================ -->
-  <map:components/>
-  <!-- =========================== Resources ================================ -->
-  <map:resources>
-    <map:resource name="style-cms-page">
-      <map:transform type="i18n">      
-        <map:parameter name="locale" value="{request:locale}"/>
-      </map:transform>    
-      <map:transform src="{global:basedir}/xslt/util/page2xhtml.xsl">
-        <map:parameter name="contextprefix" value="{request:contextPath}"/>
-      </map:transform>
-      <map:transform src="{global:basedir}/xslt/util/strip_namespaces.xsl"/>
-      <map:serialize type="xhtml"/>
-    </map:resource>    
-  </map:resources>  
-  <!-- =========================== Flow ===================================== -->
-  <map:flow language="javascript">
-    <map:script src="usecase-kupu.js"/>
-    <map:script src="context://lenya/usecases/edit-document.js"/>
-  </map:flow>
-  <!-- =========================== Pipelines ================================ -->  
-  <map:pipelines>
-    
-    <map:component-configurations>
-      <global-variables>
-        <!-- To access core resources -->
-        <basedir>../..</basedir>
-        <resourceIconUrl>kupu/apache-lenya/kupu/images/right_arrow.png</resourceIconUrl>
-      </global-variables>
-    </map:component-configurations>
-
-
-    <map:pipeline internal-only="true">
-      <map:match pattern="kupu-stream">
-        <map:generate type="stream"/>
-        <map:serialize type="xml"/>
-      </map:match>
-      
-      <!-- Flow callbacks -->
-      <map:match pattern="sitetree_link_library_template">
-        <map:generate src="fallback://lenya/resources/kupu/apache-lenya/kupu/imagedrawer/sitetree_link_library.xml.jx" type="jx">
-          <map:parameter name="resource-icon-url" value="{page-envelope:context-prefix}/kupu/apache-lenya/kupu/images/right_arrow.png"/>
-        </map:generate>
-        <map:serialize type="xml"/>
-      </map:match>      
-      <map:match pattern="publication_image_library_template">
-        <map:generate src="fallback://lenya/resources/kupu/apache-lenya/kupu/imagedrawer/publication_image_library.xml.jx" type="jx">
-          <map:parameter name="resource-icon-url" value="{page-envelope:context-prefix}/{global:resourceIconUrl}"/>
-        </map:generate>
-        <map:serialize type="xml"/>
-      </map:match>      
-      <map:match pattern="request2document">
-        <map:aggregate element="edit-envelope">
-          <map:part element="edited" src="cocoon:/kupu-stream"/>
-          <map:part element="original" 
-              src="{global:basedir}/pubs/{page-envelope:publication-id}/content/authoring/{page-envelope:document-path}"/>
-        </map:aggregate>              
-        <map:transform src="fallback://lenya/resources/kupu/apache-lenya/lenya/kupusave.xsl"/>
-        <map:serialize type="xml"/>
-      </map:match>
-    </map:pipeline>   
-    
-    <!-- Usecase pipeline -->  
-    <map:pipeline>           
-      <map:match pattern="kupu" type="usecase">
-        <map:match pattern="open" type="step">
-          <map:match pattern="*/authoring/**.html">
-            <!-- Check if Kupu is installed -->
-            <map:act type="resource-exists" 
-              src="{global:basedir}/resources/kupu/apache-lenya/kupu/kupumacros.html">
-              <map:act type="reserved-checkout">
-                <map:generate type="serverpages" 
-                  src="{global:basedir}/content/rc/{exception}.xsp">
-                  <map:parameter name="user" value="{user}"/>
-                  <map:parameter name="filename" value="{filename}"/>
-                  <map:parameter name="date" value="{date}"/>
-                  <map:parameter name="message" value="{message}"/>
-                </map:generate>
-                <map:transform src="{global:basedir}/xslt/rc/rco-exception.xsl"/>
-                <map:call resource="style-cms-page"/>
-              </map:act>
-              <map:generate 
-                src="fallback://lenya/resources/kupu/apache-lenya/kupu/kupumacros.html"/>
-              <map:transform src="fallback://lenya/resources/kupu/apache-lenya/lenya/kupumacros.xsl">
-                <map:parameter name="contentfile" 
-                  value="{request:requestURI}?lenya.usecase=kupu&amp;lenya.step=content"/>
-                <map:parameter name="context-prefix" value="{request:contextPath}"/>
-                <!-- Only used to display the document path of the edited doc  -->
-                <map:parameter name="document-path" value="{page-envelope:document-path}"/>
-                <map:parameter name="save-destination" 
-                  value="{request:requestURI}?lenya.usecase=kupu&amp;lenya.step=save"/>
-                <map:parameter name="exit-destination" 
-                  value="{request:requestURI}?lenya.usecase=kupu&amp;lenya.step=exit"/>
-                <map:parameter name="reload-after-save" value="1"/>
-                <map:parameter name="use-css" value="1"/>
-                <map:parameter name="imagedrawer-xsl-uri" 
-                  value="{request:requestURI}?lenya.usecase=kupu&amp;lenya.step=imagedrawerxsl"/>
-                <map:parameter name="linkdrawer-xsl-uri" 
-                  value="{request:requestURI}?lenya.usecase=kupu&amp;lenya.step=linkdrawerxsl"/>
-                <map:parameter name="image-libraries-uri" 
-                  value="{request:requestURI}?lenya.usecase=kupu&amp;lenya.step=image_libraries"/>
-                <map:parameter name="link-libraries-uri" 
-                  value="{request:requestURI}?lenya.usecase=kupu&amp;lenya.step=link_libraries"/>
-              </map:transform>
-              <map:serialize type="xhtml"/>
-            </map:act>
-            <!-- If Kupu is not installed; Action failed -->
-            <map:generate src="{global:basedir}/resources/misc/kupu/download.xhtml"/>
-            <map:call resource="style-cms-page"/>
-          </map:match>
-        </map:match>
-        <!-- Requested by Kupu to load the document into the editor -->    
-        <map:match pattern="content" type="step">
-          <map:match pattern="*/authoring/**">
-            <map:generate src="{global:basedir}/pubs/{1}/content/authoring/{page-envelope:document-path}"/>
-            <map:transform 
-              src="fallback://lenya/resources/kupu/apache-lenya/lenya/content2edit.xsl">
-              <map:parameter name="css" 
-                value="{page-envelope:context-prefix}/{1}/authoring/css/page.css"/>
-              <map:parameter name="nodeid" value="{page-envelope:document-name}"/>
-            </map:transform>
-            <map:transform src="{global:basedir}/xslt/util/strip_namespaces.xsl"/>
-              <map:serialize type="xhtml"/>
-          </map:match>            
-        </map:match>
-        
-        <!-- Kupu Image Drawer -->
-        <map:match pattern="*drawerxsl" type="step">
-          <map:generate type="jx" src="fallback://lenya/resources/kupu/apache-lenya/kupu/imagedrawer/{1}drawer.xsl">
-            <!-- We need to use the hole uri scheme i.e. http://servername:port/, since IE xslt processor  
-                 throws an access violation upon loading of xslts from the internet.
-             -->
-            <map:parameter name="import-stylesheet-url"
-              value="{request:scheme}://{request:serverName}:{request:serverPort}{page-envelope:context-prefix}/kupu/common/kupudrawers/drawer.xsl"/>
-          </map:generate>  
-          <map:serialize type="xml"/>
-        </map:match>
-        
-        <map:match pattern="image_libraries" type="step">
-          <map:generate src="fallback://lenya/resources/kupu/apache-lenya/kupu/imagedrawer/imagelibraries.xml.jx" type="jx">
-            <map:parameter name="pubLibUrl" value="{request:requestURI}?lenya.usecase=kupu&amp;lenya.step=publication_image_library"/>
-            <map:parameter name="pageLibUrl" value="{request:requestURI}?lenya.usecase=kupu&amp;lenya.step=page_image_library"/>
-            <map:parameter name="imageBaseUrl" value="{page-envelope:context-prefix}/kupu/apache-lenya/kupu/images"/>
-          </map:generate>
-          <map:serialize type="xml"/>
-        </map:match>
-        <map:match pattern="link_libraries" type="step">
-          <map:generate src="fallback://lenya/resources/kupu/apache-lenya/kupu/imagedrawer/linklibraries.xml.jx" type="jx">
-            <map:parameter name="pubLibUrl" value="{request:requestURI}?lenya.usecase=kupu&amp;lenya.step=sitetree_link_library"/>
-            <map:parameter name="pageLibUrl" value="{request:requestURI}?lenya.usecase=kupu&amp;lenya.step=other_link_library"/>
-            <map:parameter name="imageBaseUrl" value="{page-envelope:context-prefix}/kupu/apache-lenya/kupu/images"/>
-          </map:generate>
-          <map:serialize type="xml"/>
-        </map:match>
-                  
-        <map:match pattern="page_image_library" type="step">
-          <map:generate src="fallback://lenya/content/info/assets.xsp" type="serverpages"/>
-          <map:transform src="fallback://lenya/resources/kupu/apache-lenya/lenya/pageassets2kupulibrary.xsl">
-            <map:parameter name="iconUrl" value="{page-envelope:context-prefix}/{global:resourceIconUrl}"/>
-            <map:parameter name="resource-path-url" value="{page-envelope:document-id}/"/>
-          </map:transform>
-          <map:serialize type="xml"/>            
-        </map:match>
-        <map:match pattern="sitetree_link_library" type="step">
-          <map:call function="sitetree_link_library"/>
-        </map:match>        
-        <map:match pattern="publication_image_library" type="step">
-          <map:call function="publication_image_library">
-            <map:parameter name="template" value="publication_image_library_template"/>
-            <map:parameter name="iconUrl" value="{page-envelope:context-prefix}/{global:resourceIconUrl}"/>
-          </map:call>
-        </map:match>
-        
-        <map:match pattern="*_library" type="step">
-          <map:generate src="fallback://lenya/resources/kupu/apache-lenya/kupu/imagedrawer/{1}_library.xml.jx" type="jx"/>
-          <map:serialize type="xml"/>
-        </map:match>
-        <!-- /Kupu Image Drawer -->  
-        
-        <!-- Checkin document on exit and trigger workflow -->
-        <map:match pattern="exit" type="step">
-          <map:act type="reserved-checkin">
-            <map:generate src="{global:basedir}/content/rc/{exception}.xsp" type="serverpages">
-              <map:parameter name="user" value="{user}"/>
-              <map:parameter name="filename" value="{filename}"/>
-              <map:parameter name="checkType" value="{checkType}"/>
-              <map:parameter name="date" value="{date}"/>
-              <map:parameter name="message" value="{message}"/>
-            </map:generate>
-            <map:transform src="{global:basedir}/xslt/rc/rco-exception.xsl"/>
-            <map:call resource="style-cms-page"/>
-          </map:act>
-          <map:redirect-to uri="{request:requestURI}"/>
-        </map:match>
-      
-        <!-- 
-             Kupu uses PUT to transmit the edited file for save.
-             The problem is, Kupu removes namespace information. 
-             That means we can not use the StreamGenerator, because 
-             it complains about an unbound element.
-        -->
-        <map:match pattern="save" type="step">
-          <map:select type="request-method">
-            <map:when test="PUT">
-              <map:act type="reserved-checkout-test">
-                <map:generate type="serverpages" 
-                  src="{global:basedir}/../../content/rc/{exception}.xsp">
-                  <map:parameter name="user" value="{user}"/>
-                  <map:parameter name="filename" value="{filename}"/>
-                  <map:parameter name="date" value="{date}"/>
-                  <map:parameter name="message" value="{message}"/>
-                </map:generate>
-                <map:transform src="{global:basedir}/../../xslt/rc/rco-exception.xsl"/>
-                <map:call resource="style-cms-page"/>
-              </map:act>
-              
-              <map:call function="editDocument">
-                <map:parameter name="sourceUri" value="cocoon:/request2document"/>
-                <map:parameter name="useBuffer" value="true"/>
-                <map:parameter name="noCheckin" value="true"/>
-              </map:call>
-            </map:when>
-          </map:select>
-        </map:match>
-      </map:match>
-    </map:pipeline>
-  </map:pipelines>
-
-</map:sitemap>
diff --git a/src/webapp/lenya/usecases/publication/createPublicationFromTemplate.jx b/src/webapp/lenya/usecases/publication/createPublicationFromTemplate.jx
deleted file mode 100644
index 35cbad1..0000000
--- a/src/webapp/lenya/usecases/publication/createPublicationFromTemplate.jx
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id: renameLabel.jx 123364 2004-12-26 16:11:27Z gregor $ -->
-<page:page xmlns:c="http://apache.org/cocoon/templates/jx/1.0" 
-           xmlns="http://www.w3.org/1999/xhtml" 
-           xmlns:i18n="http://apache.org/cocoon/i18n/2.1" 
-           xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-           xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-           >
-           
-  <page:title>
-    <i18n:text>Create Publication From Template</i18n:text>
-  </page:title>
-  <page:body>
-    <div class="lenya-box">
-      <div class="lenya-box-title">
-        <i18n:text>Create Publication From Template</i18n:text>
-      </div>
-      <div class="lenya-box-body">
-        <form method="get" action="">
-          <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-          <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-          <table class="lenya-table-noborder">
-            <tr>
-              <td colspan="2">
-                <jx:import uri="templates/messages.jx"/>
-              </td>
-            </tr>
-            <tr>
-              <td class="lenya-entry-caption"><label for="publicationId"><i18n:text>Publication ID</i18n:text>:</label></td>
-              <td><input type="text" class="lenya-form-element" name="publicationId" value="${usecase.getParameter('publicationId')}"/></td>
-            </tr>
-            <tr>
-              <td class="lenya-entry-caption"><label for="publicationName"><i18n:text>Publication Name</i18n:text>:</label></td>
-              <td><input type="text" class="lenya-form-element" name="publicationName" value="${usecase.getParameter('publicationName')}"/></td>
-            </tr>
-            <tr>
-              <td class="lenya-entry-caption"><label for="template"><i18n:text>Template</i18n:text>:</label></td>
-              <td>
-                <select name="template" class="lenya-form-element">
-                  <jx:forEach var="template" items="${usecase.getParameter('availableTemplates')}">
-                    <jx:choose>
-                      <jx:when test="${template.equals(usecase.getParameter('template'))}">
-                        <option value="${template}" selected="selected"><jx:out value="${template}"/></option>
-                      </jx:when>
-                      <jx:otherwise>
-                        <option value="${template}"><jx:out value="${template}"/></option>
-                      </jx:otherwise>
-                    </jx:choose>
-                  </jx:forEach>
-                </select>
-              </td>
-            </tr>
-            <tr>
-              <td/>
-              <td>
-                <br/>
-                <input i18n:attr="value" type="submit" name="submit" value="Create"/>
-                &#160;
-                <input i18n:attr="value" type="submit" name="cancel" value="Cancel"/>
-              </td>
-            </tr>
-          </table>
-        </form>
-      </div>
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/search/search.jx b/src/webapp/lenya/usecases/search/search.jx
deleted file mode 100644
index 6b53248..0000000
--- a/src/webapp/lenya/usecases/search/search.jx
+++ /dev/null
@@ -1,157 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<page:page
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-  >
-  
-  <page:title><i18n:text>Search</i18n:text></page:title>
-  <page:body>
-    
-    <div class="lenya-box">
-        <div class="lenya-box-title">Search <jx:out value="${usecase.getParameter('publication')}"/></div>
-  
-      <jx:import uri="templates/messages.jx"/>
-
-      <div class="lenya-box-body">
-          <form>
-            <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-            <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-      
-            <table class="lenya-table-noborder">
-              <tr>
-                  <td><label for="queryString"><i18n:text>Search</i18n:text></label></td>
-                  <td>
-                      <input type="text" name="queryString" size="60" class="lenya-form-element" value="${usecase.getParameter('query')}"/>
-                  </td>
-              </tr>
-              <jx:forEach var="publication" items="${usecase.getParameter('publications')}">
-                  <tr>
-                      <td><label for="publication-id"><i18n:text>Publications</i18n:text></label></td>
-                      <td>
-                          <jx:choose>
-                              <jx:when test="@pid = ../@checked-pid">
-                                  <input type="radio" name="publication-id" value="${publication.id}" checked="true"/>
-                                  <jx:out value="${publication.name}"/>
-                              </jx:when>
-                              <jx:otherwise>
-                                  <input type="radio" name="publication-id" value="${publication.id}"/>
-                                  <jx:out value="${publication.name}"/>
-                              </jx:otherwise>
-                          </jx:choose>
-                      </td>
-                  </tr>
-                  <tr>
-                      <td><label for="dummy-index-id.fields"><i18n:text>Fields</i18n:text></label></td>
-                      <td>
-                          <select name="dummy-index-id.fields" class="lenya-form-element">
-                              <jx:forEach select="search-fields/field">
-                                <jx:choose>
-                                  <jx:when test="/search-and-results/search/fields/field = .">
-                                    <option value="{.}" selected="selected">
-                                        <jx:out value="."/>
-                                    </option>                                    

-                                  </jx:when>
-                                  <jx:otherwise>
-                                    <option value="{.}">
-                                        <jx:out value="."/>
-                                    </option>
-                                  </jx:otherwise>

-                                </jx:choose>
-                              </jx:forEach>
-                          </select>
-                      </td>
-                  </tr>
-              </jx:forEach>
-              <tr>
-                  <td><label for="sortBy"><i18n:text>Sort by</i18n:text></label></td>
-                  <td>
-                      <select name="sortBy" class="lenya-form-element">
-                        <jx:choose>
-                          <jx:when test="${sort-by} = 'score'">
-                            <option value="score" selected="selected"><i18n:text>Score</i18n:text></option>
-                          </jx:when>
-                          <jx:otherwise>
-                            <option value="score"><i18n:text>Score</i18n:text></option>
-                          </jx:otherwise>
-                        </jx:choose>
-                        <jx:choose>
-                          <jx:when test="${sort-by} = 'title'">
-                            <option value="title" selected="selected"><i18n:text>Title</i18n:text></option>
-                          </jx:when>
-                          <jx:otherwise>
-                            <option value="title"><i18n:text>Title</i18n:text></option>
-                          </jx:otherwise>
-                        </jx:choose>
-                      </select>
-                  </td>
-              </tr>
-              <tr>
-                  <td colspan="2" align="right">
-                    <input i18n:attr="value" type="submit" name="submit" value="Search"/>
-                  </td>
-              </tr>
-            </table>
-          </form>
-          <h3><i18n:text>Results for <jx:out value="../search/publication-name"/></i18n:text></h3>
-          <jx:choose>
-              <jx:when test="hits">
-                  <p> Documents <jx:out 
-                      value="pages/page[@type='current']/@start"/> - 
-                      <jx:out value="pages/page[@type='current']/@end"/> 
-                      of <jx:out value="@total-hits"/> matches </p>
-                  <table width="90%" cellpadding="4" class="lenya-table">
-                      <tr>
-                          <td>&#160;</td>
-                          <td><i18n:text>Score</i18n:text></td>
-                          <td><i18n:text>Document</i18n:text></td>
-                      </tr>
-                      <tr>
-                          <td valign="top">
-                              <jx:out value="@pos"/>
-                          </td>
-                          <td valign="top"><jx:out value="score/@percent"/>%</td>
-                          <jx:choose>
-                              <jx:when test="path">
-                                  <td>Document: <jx:out value="path"/></td>
-                              </jx:when>
-                              <jx:when test="uri">
-                                  <td> <strong><a href="$contextprefix/@pid/$area$uri"><jx:out 
-                                      value="title"/></a></strong> <br />
-                                      <jx:out value="excerpt"/><jx:out value="no-excerpt"/></td>
-                              </jx:when>
-                              <jx:otherwise>
-                                  <td>Neither PATH nor URL</td>
-                              </jx:otherwise>
-                          </jx:choose>
-                      </tr>
-                  </table>
-              </jx:when>
-              <jx:otherwise>
-                  <p><i18n:text><strong>No results</strong> found.</i18n:text></p>
-              </jx:otherwise>
-          </jx:choose>
-          <jx:out value="pages"/>
-        </div>
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/site/archive.jx b/src/webapp/lenya/usecases/site/archive.jx
deleted file mode 100644
index 0ff5a3f..0000000
--- a/src/webapp/lenya/usecases/site/archive.jx
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<page:page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" 
-           xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" 
-           xmlns="http://www.w3.org/1999/xhtml" 
-           xmlns:i18n="http://apache.org/cocoon/i18n/2.1" >
-           
-  <page:title><i18n:text>Archive Document</i18n:text></page:title>
-  <page:body>
-    <div class="lenya-box">
-      <div class="lenya-box-title">
-        <i18n:translate>
-          <i18n:text key="archive-doc"/>
-          <i18n:param><q><jx:out value="${usecase.getParameter('document').getId()}"/></q></i18n:param>
-        </i18n:translate>
-      </div>
-      <div class="lenya-box-body">
-        <form method="get">
-          
-          <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-          <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-          
-          <table class="lenya-table-noborder">
-            <tr>
-              <td>
-                <i18n:translate>
-                  <i18n:text key="archive-doc?"/>
-                  <i18n:param><strong><jx:out value="${usecase.getParameter('documentid')}"/></strong></i18n:param>
-                </i18n:translate><br/><br/>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <jx:import uri="templates/messages.jx"/>
-              </td>
-            </tr>
-            <tr>
-              <jx:if test="${not(empty(usecase.getParameter('inconsistentdocument')))}">
-                <td class="lenya-entry-caption">
-                  <span class="lenya-form-message-error"><i18n:text key="docs-have-links-to-doc"/>:</span>
-                </td>
-                <td valign="top">
-                  <jx:forEach var="item" items="${usecase.getParameter('inconsistentdocument')}">
-                    <a target="_blank" href="{@href}"><jx:out value="${item.id}"/><jx:out value="."/></a><br/>
-                  </jx:forEach>
-                </td>
-              </jx:if>
-            </tr>
-            <tr>
-              <td>
-                <input i18n:attr="value" type="submit" name="submit" value="Archive"/>&#160;
-                <input i18n:attr="value" type="submit" name="cancel" value="Cancel"/>
-              </td>
-            </tr>
-          </table>
-        </form>
-      </div>
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/site/changeLabel.jx b/src/webapp/lenya/usecases/site/changeLabel.jx
deleted file mode 100644
index a767323..0000000
--- a/src/webapp/lenya/usecases/site/changeLabel.jx
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id: renameLabel.jx 123364 2004-12-26 16:11:27Z gregor $ -->
-<page:page xmlns:c="http://apache.org/cocoon/templates/jx/1.0" 
-           xmlns="http://www.w3.org/1999/xhtml" 
-           xmlns:i18n="http://apache.org/cocoon/i18n/2.1" 
-           xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-           xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-           >
-           
-  <page:title>
-    <i18n:text>Edit Navigation Title</i18n:text>
-  </page:title>
-  <page:body>
-    <div class="lenya-box">
-      <div class="lenya-box-title">
-        <i18n:translate>
-          <i18n:text key="rename-label-doc"/>
-          <i18n:param>
-            <q>
-              <jx:out value="${usecase.getParameter('document').getId()}"/>
-            </q>
-          </i18n:param>
-        </i18n:translate>
-      </div>
-      <div class="lenya-box-body">
-        <form method="get" action="">
-          <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-          <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-          <table class="lenya-table-noborder">
-            <tr>
-              <td colspan="2">
-                <jx:import uri="templates/messages.jx"/>
-              </td>
-            </tr>
-            <tr>
-              <td class="lenya-entry-caption"><label for="label"><i18n:text>New Navigation Title</i18n:text>:</label></td>
-              <td><input type="text" class="lenya-form-element" name="label" value="${usecase.getParameter('label')}"/></td>
-            </tr>
-            <tr>
-              <td/>
-              <td>
-                <br/>
-                <input i18n:attr="value" type="submit" name="submit" value="Save"/>
-                &#160;
-                <input i18n:attr="value" type="submit" name="cancel" value="Cancel"/>
-              </td>
-            </tr>
-          </table>
-        </form>
-      </div>
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/site/changeNodeID.jx b/src/webapp/lenya/usecases/site/changeNodeID.jx
deleted file mode 100644
index f6c6b94..0000000
--- a/src/webapp/lenya/usecases/site/changeNodeID.jx
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id: renameLabel.jx 123364 2004-12-26 16:11:27Z gregor $ -->
-<page:page xmlns:c="http://apache.org/cocoon/templates/jx/1.0" 
-           xmlns="http://www.w3.org/1999/xhtml" 
-           xmlns:i18n="http://apache.org/cocoon/i18n/2.1" 
-           xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-           xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-           >
-           
-  <page:title>
-    <i18n:text>Change Document ID</i18n:text>
-  </page:title>
-  <page:body>
-    <div class="lenya-box">
-      <div class="lenya-box-title">
-        <i18n:translate>
-          <i18n:text key="rename-label-doc"/>
-          <i18n:param>
-            <q>
-              <jx:out value="${usecase.getParameter('documentId')}"/>
-            </q>
-          </i18n:param>
-        </i18n:translate>
-      </div>
-      <div class="lenya-box-body">
-        <form method="get" action="">
-          <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-          <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-          <table class="lenya-table-noborder">
-            <tr>
-              <td colspan="2">
-                <jx:import uri="templates/messages.jx"/>
-              </td>
-            </tr>
-            <tr>
-              <td class="lenya-entry-caption"><label for="nodeId"><i18n:text>New Document ID</i18n:text>:</label></td>
-              <td><input type="text" class="lenya-form-element" name="nodeId" value="${usecase.getParameter('nodeId')}"/></td>
-            </tr>
-            <tr>
-              <td/>
-              <td>
-                <br/>
-                <input i18n:attr="value" type="submit" name="submit" value="Save"/>
-                &#160;
-                <input i18n:attr="value" type="submit" name="cancel" value="Cancel"/>
-              </td>
-            </tr>
-          </table>
-        </form>
-      </div>
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/site/copy.jx b/src/webapp/lenya/usecases/site/copy.jx
deleted file mode 100644
index c2c2229..0000000
--- a/src/webapp/lenya/usecases/site/copy.jx
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-<page:page xmlns:c="http://apache.org/cocoon/templates/jx/1.0" 
-           xmlns="http://www.w3.org/1999/xhtml" 
-           xmlns:i18n="http://apache.org/cocoon/i18n/2.1" 
-           xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-           xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-           >
-           
-  <page:title>
-    <i18n:text>Copy Document</i18n:text>
-  </page:title>
-  <page:body>
-    <div class="lenya-box">
-      <div class="lenya-box-title">
-        <i18n:translate>
-          <i18n:text key="copy-doc"/>
-          <i18n:param>
-            <q>
-              <jx:out value="${usecase.getParameter('document').getId()}"/>
-            </q>
-          </i18n:param>
-        </i18n:translate>
-      </div>
-      <div class="lenya-box-body">
-        <form method="get" action="">
-          <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-          <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-          <table class="lenya-table-noborder">
-            <tr>
-              <td>
-                <jx:import uri="templates/messages.jx"/>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <br/>
-                <i18n:translate>
-                  <i18n:text key="copy-doc-to-clip?"/>
-                  <i18n:param>
-                    <strong>
-                      <jx:out value="${usecase.getParameter('document').getId()}"/>
-                    </strong>
-                  </i18n:param>
-                </i18n:translate>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <br/>
-                <input i18n:attr="value" type="submit" name="submit" value="Copy"/>
-                &#160;
-                <input i18n:attr="value" type="submit" name="cancel" value="Cancel"/>
-              </td>
-            </tr>
-          </table>
-        </form>
-      </div>
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/site/cut.jx b/src/webapp/lenya/usecases/site/cut.jx
deleted file mode 100644
index a7b2a5b..0000000
--- a/src/webapp/lenya/usecases/site/cut.jx
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-<page:page xmlns:c="http://apache.org/cocoon/templates/jx/1.0" 
-           xmlns="http://www.w3.org/1999/xhtml" 
-           xmlns:i18n="http://apache.org/cocoon/i18n/2.1" 
-           xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-           xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-           >
-           
-  <page:title>
-    <i18n:text>Cut Document</i18n:text>
-  </page:title>
-  <page:body>
-    <div class="lenya-box">
-      <div class="lenya-box-title">
-        <i18n:translate>
-          <i18n:text key="cut-doc"/>
-          <i18n:param>
-            <q>
-              <jx:out value="${usecase.getParameter('document').getId()}"/>
-            </q>
-          </i18n:param>
-        </i18n:translate>
-      </div>
-      <div class="lenya-box-body">
-        <form method="get" action="">
-          <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-          <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-          <table class="lenya-table-noborder">
-            <tr>
-              <td>
-                <jx:import uri="templates/messages.jx"/>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <br/>
-                <i18n:translate>
-                  <i18n:text key="cut-doc-to-clip?"/>
-                  <i18n:param>
-                    <strong>
-                      <jx:out value="${usecase.getParameter('document').getId()}"/>
-                    </strong>
-                  </i18n:param>
-                </i18n:translate>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <br/>
-                <input i18n:attr="value" type="submit" name="submit" value="Cut"/>
-                &#160;
-                <input i18n:attr="value" type="submit" name="cancel" value="Cancel"/>
-              </td>
-            </tr>
-          </table>
-        </form>
-      </div>
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/site/deactivate.jx b/src/webapp/lenya/usecases/site/deactivate.jx
deleted file mode 100644
index a905018..0000000
--- a/src/webapp/lenya/usecases/site/deactivate.jx
+++ /dev/null
@@ -1,109 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-<page:page xmlns:c="http://apache.org/cocoon/templates/jx/1.0" 
-           xmlns="http://www.w3.org/1999/xhtml" 
-           xmlns:i18n="http://apache.org/cocoon/i18n/2.1" 
-           xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" >
-           
-  <page:title>
-    <i18n:text>Deactivate Document</i18n:text>
-  </page:title>
-  <page:body>
-    <div class="lenya-box">
-      <div class="lenya-box-title">
-        <i18n:translate>
-          <i18n:text key="deactivate-doc"/>
-          <i18n:param>
-            <q>
-              <jx:out value="${usecase.getParameter('documentid')}"/>
-            </q>
-          </i18n:param>
-        </i18n:translate>
-      </div>
-      <div class="lenya-box-body">
-        <jx:choose>
-          <jx:when test="${not(empty(usecase.getParameter('message')))}"> <!-- there is a warning -->
-            <form method="get">
-              <div class="lenya-box">
-                <div class="lenya-box-title"><i18n:text>Deactivate Document</i18n:text></div>
-                <div class="lenya-box-body">
-                  <table class="lenya-table-noborder">
-                    <tr>
-                      <td class="lenya-entry-caption"><i18n:text>Document</i18n:text>:</td>
-                      <td><jx:out value="${usecase.getParameter('documentid')}"/> [<jx:out value="${usecase.getParameter('language')}"/>]</td>
-                    </tr>
-                    <tr>
-                      <td valign="top" class="lenya-entry-caption"><i18n:text>Problem</i18n:text>:</td>
-                      <td>
-                        <span class="lenya-form-error"><i18n:text key="cannot-deactivate-unless-children-deactivated"/>:</span>
-                        <ul>
-                          <jx:forEach var="item" items="${usecase.getParameter('livechildren')}">
-                            <li><a href="{@href}"><jx:out value="${item.id}"/> [<jx:out value="${item.language}"/>]</a></li>
-                          </jx:forEach>
-                        </ul>
-                      </td>
-                    </tr>
-                  </table>
-                </div>
-              </div>
-              <input onClick="location.href='{$request-uri}';" type="button" value="Cancel"/>
-            </form>
-          </jx:when>
-          <jx:otherwise> <!-- no warning -->
-            <form method="get" action="">
-              <input type="hidden" name="lenya.usecase" value="deactivate"/>
-              <table class="lenya-table-noborder">
-                <tr>
-                  <td>
-                    <br/>
-                    <i18n:translate>
-                      <i18n:text key="deactivate-doc?"/>
-                      <i18n:param>
-                        <strong>
-                          <jx:out value="${usecase.getParameter('documentid')}"/>
-                        </strong>
-                      </i18n:param>
-                    </i18n:translate>
-                  </td>
-                </tr>
-                <tr>
-                  <jx:if test="${not(empty(usecase.getParameter('inconsistentdocument')))}">
-                    <td class="lenya-entry-caption">
-                      <span class="lenya-form-message-error"><i18n:text key="docs-have-links-to-doc"/>:</span>
-                    </td>
-                    <td valign="top">
-                      <jx:forEach var="item" items="${usecase.getParameter('inconsistentdocument')}">
-                        <a target="_blank" href="{@href}"><jx:out value="${item.id}"/><jx:out value="."/></a><br/>
-                      </jx:forEach>
-                    </td>
-                  </jx:if>
-                </tr>
-                <tr>
-                  <td>
-                    <br/><input i18n:attr="value" type="submit" value="Deactivate"/>&#160; 
-                    <input i18n:attr="value" type="button" onClick="location.href='${requesturi}';" value="Cancel"/> 
-                  </td>
-                </tr>
-              </table>
-            </form>
-          </jx:otherwise>
-        </jx:choose>
-      </div>
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/site/delete.jx b/src/webapp/lenya/usecases/site/delete.jx
deleted file mode 100644
index 0220925..0000000
--- a/src/webapp/lenya/usecases/site/delete.jx
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<page:page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" 
-           xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" 
-           xmlns="http://www.w3.org/1999/xhtml" 
-           xmlns:i18n="http://apache.org/cocoon/i18n/2.1" >
-           
-  <page:title><i18n:text>Delete Document</i18n:text></page:title>
-  <page:body>
-    <div class="lenya-box">
-      <div class="lenya-box-title">
-        <i18n:translate>
-          <i18n:text key="delete-doc"/>
-          <i18n:param><q><jx:out value="${usecase.getParameter('document').getId()}"/></q></i18n:param>
-        </i18n:translate>
-      </div>
-      <div class="lenya-box-body">
-        <form method="get">
-          <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-          <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-          <table class="lenya-table-noborder">
-            <tr>
-              <td>
-                <jx:import uri="templates/messages.jx"/>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <i18n:translate>
-                  <i18n:text key="delete-language-versions?"/>
-                  <i18n:param><strong><jx:out value="${usecase.getParameter('document').getId()}"/></strong></i18n:param>
-                </i18n:translate><br/><br/>
-              </td>
-            </tr>
-            <tr>
-              <jx:if test="${not(empty(usecase.getParameter('inconsistentdocument')))}">
-                <td class="lenya-entry-caption">
-                  <span class="lenya-form-message-error"><i18n:text key="docs-have-links-to-doc"/>:</span>
-                </td>
-                <td valign="top">
-                  <jx:forEach var="item" items="${usecase.getParameter('inconsistentdocument')}">
-                    <a target="_blank" href="{@href}"><jx:out value="${item.id}"/><jx:out value="."/></a><br/>
-                  </jx:forEach>
-                </td>
-              </jx:if>
-            </tr>
-            <tr>
-              <td>
-                <input i18n:attr="value" type="submit" name="submit" value="Delete"/>
-                &#160;
-                <input i18n:attr="value" type="submit" name="cancel" value="Cancel"/>
-              </td>
-            </tr>
-          </table>
-        </form>
-      </div>
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/site/deleteLanguage.jx b/src/webapp/lenya/usecases/site/deleteLanguage.jx
deleted file mode 100644
index 4a0950b..0000000
--- a/src/webapp/lenya/usecases/site/deleteLanguage.jx
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0"?>

-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->

-

-<!-- $Id: login.jx 123986 2005-01-03 15:23:11Z andreas $ -->

-

-<page:page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" 

-           xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" 

-           xmlns="http://www.w3.org/1999/xhtml" 

-           xmlns:i18n="http://apache.org/cocoon/i18n/2.1" >

-

-  <page:title><i18n:text>Remove Language Version</i18n:text></page:title>

-  <page:body>

-    <div class="lenya-box">

-      <div class="lenya-box-title">

-        <i18n:text>Remove Language Version</i18n:text>

-      </div>

-      <div class="lenya-box-body">

-        <form>

-          <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>

-          <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>

-          <table class="lenya-table-noborder">

-            <tr>

-              <td colspan="2">

-                <jx:import uri="templates/messages.jx"/>

-              </td>

-            </tr>

-              <tr>

-                <td class="lenya-entry-caption">

-                  <i18n:text>Document ID</i18n:text>: </td>

-                <td>

-                  <jx:out value="${usecase.getParameter('document').getId()}"/>

-                </td>

-              </tr>

-              <tr>

-                <td class="lenya-entry-caption">

-                  <i18n:text>Language</i18n:text>*: </td>

-                <td>

-                  <jx:out value="${usecase.getParameter('document').getLanguage()}"/>

-                </td>

-              </tr>

-              <tr>

-                <td/>

-                <td>

-                  <input i18n:attr="value" type="submit" name="submit" value="Delete"/>

-                  &#160;

-                  <input i18n:attr="value" type="submit" name="cancel" value="Cancel"/>

-                </td>

-              </tr>

-          </table>

-        </form>

-      </div>

-    </div>

-  </page:body>

-</page:page>

diff --git a/src/webapp/lenya/usecases/site/paste.jx b/src/webapp/lenya/usecases/site/paste.jx
deleted file mode 100644
index 864add8..0000000
--- a/src/webapp/lenya/usecases/site/paste.jx
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-<page:page xmlns:c="http://apache.org/cocoon/templates/jx/1.0" 
-           xmlns="http://www.w3.org/1999/xhtml" 
-           xmlns:i18n="http://apache.org/cocoon/i18n/2.1" 
-           xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-           xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-           >
-           
-  <page:title>
-    <i18n:text>Paste Document</i18n:text>
-  </page:title>
-  <page:body>
-    <div class="lenya-box">
-      <div class="lenya-box-title">
-        <i18n:translate>
-          <i18n:text key="paste-doc"/>
-          <i18n:param>
-            <q>
-              <jx:out value="${usecase.getParameter('clipboardDocumentId')}"/>
-            </q>
-          </i18n:param>
-        </i18n:translate>
-      </div>
-      <div class="lenya-box-body">
-        <form method="get" action="">
-          <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-          <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-          <table class="lenya-table-noborder">
-            <tr>
-              <td>
-                <jx:import uri="templates/messages.jx"/>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <br/>
-                <i18n:translate>
-                  <i18n:text key="paste-doc-from-clip?"/>
-                  <i18n:param>
-                    <strong>
-                      <jx:out value="${usecase.getParameter('clipboardDocumentId')}"/>
-                    </strong>
-                  </i18n:param>
-                </i18n:translate>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <br/>
-                <input i18n:attr="value" type="submit" name="submit" value="Paste"/>
-                &#160;
-                <input i18n:attr="value" type="submit" name="cancel" value="Cancel"/>
-              </td>
-            </tr>
-          </table>
-        </form>
-      </div>
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/site/restore.jx b/src/webapp/lenya/usecases/site/restore.jx
deleted file mode 100644
index bdb6c34..0000000
--- a/src/webapp/lenya/usecases/site/restore.jx
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- $Id$ -->
-<page:page xmlns:c="http://apache.org/cocoon/templates/jx/1.0" 
-           xmlns="http://www.w3.org/1999/xhtml" 
-           xmlns:i18n="http://apache.org/cocoon/i18n/2.1" 
-           xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" >
-           
-  <page:title>
-    <i18n:text>Restore Document</i18n:text>
-  </page:title>
-  <page:body>
-    <div class="lenya-box">
-      <div class="lenya-box-title">
-        <i18n:translate>
-          <i18n:text key="restore-doc"/>
-          <i18n:param>
-            <q>
-              <jx:out value="${usecase.getParameter('documentid')}"/>
-            </q>
-          </i18n:param>
-        </i18n:translate>
-      </div>
-      <div class="lenya-box-body">
-        <jx:choose>
-          <jx:when test="${usecase.hasErrors()}">		
-            <jx:import uri="templates/messages.jx"/>
-            <input type="button" class="lenya-form-element" onClick="location.href='${requesturi}';" value="Back"/>
-          </jx:when>
-          <jx:otherwise>
-            <form method="get">
-              <input type="hidden" name="lenya.usecase" value="restore"/>
-              <i18n:translate>
-                <i18n:text key="restore-doc?"/>
-                <i18n:param>
-                  <strong>
-                    <jx:out value="${usecase.getParameter('documentid')}"/>
-                  </strong>
-                </i18n:param>
-              </i18n:translate>
-              <input type="submit" value="Restore"/>&#160;
-              <input type="button" onClick="location.href='${requesturi}';" value="Cancel"/>
-            </form>
-          </jx:otherwise>
-        </jx:choose>	
-      </div>
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/tab/ac/ac.jx b/src/webapp/lenya/usecases/tab/ac/ac.jx
deleted file mode 100644
index fb5c44a..0000000
--- a/src/webapp/lenya/usecases/tab/ac/ac.jx
+++ /dev/null
@@ -1,182 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: ac.jx 156161 2005-03-04 15:23:21Z andreas $ -->
-<page:page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns="http://www.w3.org/1999/xhtml" xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
-  
-  <jx:import uri="tab/head.jx"/>
-  <page:body>
-    <jx:import uri="tab/sitetree.jx"/>
-    <jx:import uri="tab/tabs.jx"/>
-    
-    <jx:set var="area" value="${usecase.getParameter('acArea')}"/>
-    <div id="contentblock1" class="lenya-tab-sitetree">
-      <table class="lenya-table">
-        <tr>
-          <td colspan="4">
-            <jx:import uri="templates/messages.jx"/>
-          </td>
-        </tr>
-        <tr>
-          <th colspan="4">
-            <jx:import uri="tab/ac/ssl-form.jx"/>
-          </th>
-        </tr>
-        <tr><td colspan="4">&#160;</td></tr>
-        <tr>
-          <th colspan="2">
-            <i18n:text>Access Object</i18n:text>
-          </th>
-          <th>
-            <jx:if test="${area.equals('authoring')}">
-              <i18n:text>Role</i18n:text>
-            </jx:if>&#160;
-          </th>
-          <th/>
-        </tr>
-        <tr>
-          
-          <form method="get">
-            <input type="hidden" name="lenya.usecase" value="${usecase.getName()}"/>
-            <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-            <td><i18n:text>user</i18n:text></td>
-            <td>
-              <select name="user" class="lenya-form-element-narrow">
-                <jx:forEach var="user" items="${usecase.getParameter('users')}">
-                  <option value="${user}"><jx:out value="${user}"/></option>
-                </jx:forEach>
-              </select>
-            </td>
-            <td>
-              <select name="role" class="lenya-form-element-narrow">
-                <jx:forEach var="role" items="${usecase.getParameter('roles')}">
-                  <option value="${role}"><jx:out value="${role}"/></option>
-                </jx:forEach>
-              </select>
-            </td>
-            <td>
-              <input i18n:attr="value" type="submit" name="addCredential_user" value="Add"/>
-            </td>
-          </form>
-                    
-        </tr>
-        <tr>
-          <form method="get">
-            <input type="hidden" name="lenya.usecase" value="${usecase.getName()}"/>
-            <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-            <td><i18n:text>group</i18n:text></td>
-            <td>
-              <select name="group" class="lenya-form-element-narrow">
-                <jx:forEach var="group" items="${usecase.getParameter('groups')}">
-                  <option value="${group}"><jx:out value="${group}"/></option>
-                </jx:forEach>
-              </select>
-            </td>
-            <td>
-              <select name="role" class="lenya-form-element-narrow">
-                <jx:forEach var="role" items="${usecase.getParameter('roles')}">
-                  <option value="${role}"><jx:out value="${role}"/></option>
-                </jx:forEach>
-              </select>
-            </td>
-            <td>
-              <input i18n:attr="value" type="submit" name="addCredential_group" value="Add"/>
-            </td>
-          </form>
-        </tr>
-        <jx:if test="${area.equals('live')}">
-          <tr>
-            <form method="get">
-              <input type="hidden" name="lenya.usecase" value="${usecase.getName()}"/>
-              <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-              <td><i18n:text>IP Range</i18n:text></td>
-              <td>
-                <select name="ipRange" class="lenya-form-element-narrow">
-                  <jx:forEach var="ipRange" items="${usecase.getParameter('ipRanges')}">
-                    <option value="${ipRange}"><jx:out value="${ipRange}"/></option>
-                  </jx:forEach>
-                </select>
-              </td>
-              <td>
-                <select name="role" class="lenya-form-element-narrow">
-                  <jx:forEach var="role" items="${usecase.getParameter('roles')}">
-                    <option value="${role}"><jx:out value="${role}"/></option>
-                  </jx:forEach>
-                </select>
-              </td>
-              <td>
-                <input i18n:attr="value" type="submit" name="addCredential_ipRange" value="Add"/>
-              </td>
-            </form>
-          </tr>
-        </jx:if>
-        
-        <tr><td colspan="4">&#160;</td></tr>
-        <tr>
-          <th colspan="4">
-            <i18n:text>URL Rights</i18n:text>
-          </th>
-        </tr>
-        <jx:forEach var="credential" items="${usecase.getParameter('urlCredentials')}">
-          <form method="get">
-            <input type="hidden" name="lenya.usecase" value="${usecase.getName()}"/>
-            <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-            <tr>
-              <td>
-                <i18n:text><jx:out value="${credential.getType()}"/></i18n:text>
-              </td>
-              <td>
-                <input type="hidden" name="${credential.getType()}" value="${credential.getAccreditableId()}"/>
-                <jx:out value="${credential.getAccreditableId()}"/>
-              </td>
-              <td>
-                <input type="hidden" name="role" value="${credential.getRoleId()}"/>
-                <jx:out value="${credential.getRoleId()}"/>
-              </td>
-              <td>
-                <input type="submit" name="deleteCredential_${credential.getType()}" i18n:attr="value" value="Delete"/>
-              </td>
-            </tr>
-          </form>
-        </jx:forEach>
-        
-        <tr><td colspan="4">&#160;</td></tr>
-        <tr>
-          <th colspan="4">
-            <i18n:text>Inherited Rights</i18n:text>
-          </th>
-        </tr>
-        <jx:forEach var="credential" items="${usecase.getParameter('parentCredentials')}">
-          <tr>
-            <td>
-              <i18n:text><jx:out value="${credential.getType()}"/></i18n:text>
-            </td>
-            <td>
-              <jx:out value="${credential.getAccreditableId()}"/>
-            </td>
-            <td colspan="2">
-              <jx:out value="${credential.getRoleId()}"/>
-            </td>
-          </tr>
-        </jx:forEach>
-        
-      </table>
-    </div>
-  </page:body>
-</page:page>
diff --git a/src/webapp/lenya/usecases/tab/ac/add-credential.jx b/src/webapp/lenya/usecases/tab/ac/add-credential.jx
deleted file mode 100644
index 58f16f1..0000000
--- a/src/webapp/lenya/usecases/tab/ac/add-credential.jx
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: ac.jx 156161 2005-03-04 15:23:21Z andreas $ -->
-<jx:template
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
-  xmlns="http://www.w3.org/1999/xhtml"
-  name="">
-    	<form method="get">
-    	<input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-    	<!--
-    	<td><xsl:apply-templates select="//lenya-info:items[@type = $type]"/></td>
-    	-->
-    	<td>
-    		<jx:choose>
-    			<xsl:when test="$larea != 'live'">
-    				<xsl:apply-templates select="//lenya-info:items[@type = 'role']"/>
-    			</xsl:when>
-    			<xsl:otherwise>
-    				<input type="hidden" name="role_id" value="${usecase.getParameter('visitorRole')}"/>
-    			</xsl:otherwise>
-    		</jx:choose>
-    	</td>
-    	<td>
-    		<input i18n:attr="value" type="submit" name="add_credential_{$type}" value="Add">
-    			<xsl:if test="not(//lenya-info:items[@type = $type]/lenya-info:item) or ($area = 'live')">
-    				<xsl:attribute name="disabled">disabled</xsl:attribute>
-    			</xsl:if>
-    		</input>
-    	</td>
-    	</form>
-</jx:template>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/tab/ac/ssl-form.jx b/src/webapp/lenya/usecases/tab/ac/ssl-form.jx
deleted file mode 100644
index 747b4c3..0000000
--- a/src/webapp/lenya/usecases/tab/ac/ssl-form.jx
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: ac.jx 156161 2005-03-04 15:23:21Z andreas $ -->
-<jx:template
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
-  xmlns="http://www.w3.org/1999/xhtml"
-  name="">
-<jx:set var="area" value="${usecase.getParameter('document').getArea()}"/>
-<form method="get" name="form_ssl_${area}">
-  <input type="hidden" name="lenya.usecase" value="${usecase.getName()}"/>
-  <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-  <input type="hidden" name="change_ssl" value="true"/>
-  
-  <jx:set var="ssl" value="${usecase.getParameter('ssl')}"/>
-  <jx:set var="ancestorSsl" value="${usecase.getParameter('ancestorSsl')}"/>
-  <jx:choose>
-    <jx:when test="${ssl.equals('true') || ancestorSsl.equals('true')}">
-      <jx:choose>
-        <jx:when test="${ancestorSsl.equals('true')}">
-          <input type="checkbox" name="ssl" onclick="document.forms.form_ssl_${area}.submit()" value="true" checked="checked" disabled="disabled">
-            <i18n:text>SSL Encryption</i18n:text>
-          </input>
-        </jx:when>
-        <jx:otherwise>
-          <input type="checkbox" name="ssl" onclick="document.forms.form_ssl_${area}.submit()" value="true" checked="checked">
-            <i18n:text>SSL Encryption</i18n:text>
-          </input>
-        </jx:otherwise>
-      </jx:choose>
-    </jx:when>
-    <jx:otherwise>
-      <jx:choose>
-        <jx:when test="${ancestorSsl.equals('true')}">
-          <input type="checkbox" name="ssl" onclick="document.forms.form_ssl_${area}.submit()" value="true" disabled="disabled">
-            <i18n:text>SSL Encryption</i18n:text>
-          </input>
-        </jx:when>
-        <jx:otherwise>
-          <input type="checkbox" name="ssl" onclick="document.forms.form_ssl_${area}.submit()" value="true">
-            <i18n:text>SSL Encryption</i18n:text>
-          </input>
-        </jx:otherwise>
-      </jx:choose>
-    </jx:otherwise>
-  </jx:choose>
-</form>
-</jx:template>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/tab/acAuthoring.jx b/src/webapp/lenya/usecases/tab/acAuthoring.jx
deleted file mode 100644
index bbd61a1..0000000
--- a/src/webapp/lenya/usecases/tab/acAuthoring.jx
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: ac.jx 156161 2005-03-04 15:23:21Z andreas $ -->
-<jx:import uri="tab/ac/ac.jx"
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"/>
diff --git a/src/webapp/lenya/usecases/tab/acLive.jx b/src/webapp/lenya/usecases/tab/acLive.jx
deleted file mode 100644
index bbd61a1..0000000
--- a/src/webapp/lenya/usecases/tab/acLive.jx
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: ac.jx 156161 2005-03-04 15:23:21Z andreas $ -->
-<jx:import uri="tab/ac/ac.jx"
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"/>
diff --git a/src/webapp/lenya/usecases/tab/assets.jx b/src/webapp/lenya/usecases/tab/assets.jx
deleted file mode 100644
index 489bc66..0000000
--- a/src/webapp/lenya/usecases/tab/assets.jx
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<page:page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" 
-           xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" 
-           xmlns="http://www.w3.org/1999/xhtml" 
-           xmlns:i18n="http://apache.org/cocoon/i18n/2.1" >
-
-  <jx:import uri="tab/head.jx"/>
-  <page:body>
-    <jx:import uri="tab/sitetree.jx"/>
-    <jx:import uri="tab/tabs.jx"/>
-    <div id="contentblock1" class="lenya-tab-sitetree">
-      <table class="lenya-table">
-        <tr>
-          <th><i18n:text>Assets</i18n:text></th>
-          <th><i18n:text>Preview</i18n:text></th>
-          <th><i18n:text>Title</i18n:text></th>
-          <th><i18n:text>File Size</i18n:text></th>
-          <th><i18n:text>Creation Date</i18n:text></th>
-          <th></th>
-        </tr>
-        <jx:forEach var="asset" items="${usecase.getParameter('assets')}">
-          <tr>
-            <td><jx:out value="${asset.getName()}"/></td>
-            <td>        
-              <jx:set var="mimeType" value="${asset.getMimeType()}"/>
-              <jx:if test="${mimeType.startsWith('image/')}">
-                <jx:set var="doc" value="${usecase.getParameter('document')}"/>
-                <img src="${request.getContextPath()}/${doc.getPublication().getId()}/authoring/${doc.getId()}/${asset.getName()}"
-                     style="height: 32px; vertical-align: middle;"/>&#160;
-              </jx:if>
-            </td>
-            <td><jx:out value="${asset.getMetaDataManager().getDublinCoreMetaData().getFirstValue('title')}"/></td>
-            <td align="right"><jx:out value="${asset.getContentLength() / 1000}"/> kB</td>
-            <td align="right"><jx:out value="${java.text.DateFormat.getDateInstance().format(asset.getLastModified())}"/></td>
-            <td>
-              <form method="POST">
-                <input type="hidden" name="lenya.usecase" value="${usecase.getName()}"/>
-                <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-                <input type="hidden" name="delete" value="${asset.getName()}"/>
-                <jx:choose>
-                  <jx:when test="${usecase.getParameter('document').getArea().equals('authoring')}"><input i18n:attr="value" name="submit" type="submit" value="Delete"/></jx:when>
-                  <jx:otherwise><input i18n:attr="value" type="submit" disabled="disabled" value="Delete"/></jx:otherwise>
-                </jx:choose>              
-              </form>
-            </td>
-          </tr> 
-        </jx:forEach>
-      </table>
-     <jx:if test="${usecase.getParameter('document').getArea().equals('authoring')}">
-      <form method="POST" enctype="multipart/form-data">
-        <input type="hidden" name="lenya.usecase" value="${usecase.getName()}"/>
-        <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-        <table class="lenya-table-noborder">
-          <tr>
-            <td colspan="2">
-              <jx:import uri="templates/messages.jx"/>
-            </td>
-          </tr>
-          <tr>
-            <td class="lenya-entry-caption"><label for="file"><i18n:text>File</i18n:text> *</label></td>
-            <td><input type="file" name="file" class="lenya-form-element"/></td>
-          </tr>
-          <tr>
-            <td class="lenya-entry-caption"><label for="title"><i18n:text>Title</i18n:text> *</label></td>
-            <td><input type="text" name="title" class="lenya-form-element" value="${usecase.getParameter('title')}"/></td>
-          </tr>
-          <tr>
-            <td class="lenya-entry-caption"><label for="creator"><i18n:text>Creator</i18n:text> *</label></td>
-            <td><input type="text" name="creator" class="lenya-form-element" value="${usecase.getParameter('creator')}"/></td>
-          </tr>
-          <tr>
-            <td class="lenya-entry-caption"><label for="rights"><i18n:text>Rights</i18n:text> *</label></td>
-            <td><input type="text" name="rights" class="lenya-form-element" value="${usecase.getParameter('rights')}"/></td>
-          </tr>
-          <tr>
-            <td/>
-            <td>
-              <input i18n:attr="value" name="submit" type="submit" value="New Asset"/>
-            </td>
-          </tr>
-        </table>
-       </form>
-     </jx:if>
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/tab/head.jx b/src/webapp/lenya/usecases/tab/head.jx
deleted file mode 100644
index 1f9ec34..0000000
--- a/src/webapp/lenya/usecases/tab/head.jx
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: overview.jx 123960 2005-01-03 12:39:05Z andreas $ -->
-
-<jx:template
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" 
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
-  xmlns="http://www.w3.org/1999/xhtml"
-  name="">
-  
-  <page:head>
-    <jx:set var="pubId" value="${usecase.getParameter('document').getPublication().getId()}"/>
-    <jx:set var="area" value="${usecase.getParameter('document').getArea()}"/>
-    <jx:set var="language" value="${usecase.getParameter('document').getLanguage()}"/>
-    <jx:set var="incrementalLoading" value="${'false'}"/>
-    <script src="${request.contextPath}/${pubId}/${area}/info-sitetree/ua.js"/>
-    <script src="${request.contextPath}/${pubId}/${area}/info-sitetree/tree.js"/>
-    <script src="${request.contextPath}/${pubId}/${area}/info-sitetree/sitetree.js?language=${language}&amp;incremental=${incrementalLoading}"/>
-  </page:head>
-</jx:template>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/tab/meta.jx b/src/webapp/lenya/usecases/tab/meta.jx
deleted file mode 100644
index 4849575..0000000
--- a/src/webapp/lenya/usecases/tab/meta.jx
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<page:page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" 
-           xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" 
-           xmlns="http://www.w3.org/1999/xhtml" 
-           xmlns:i18n="http://apache.org/cocoon/i18n/2.1" >
-  <jx:import uri="tab/head.jx"/>
-  <page:body>
-    <jx:import uri="tab/sitetree.jx"/>
-    <jx:import uri="tab/tabs.jx"/>
-    <div id="contentblock1" class="lenya-tab-sitetree">
-      <form>
-        <table class="lenya-table-noborder">
-          <tr>
-            <td colspan="2">
-              <jx:import uri="templates/messages.jx"/>
-            </td>
-          </tr>
-          <tr>
-            <td class="lenya-entry-caption"><label for="title"><i18n:text>Title</i18n:text>:</label></td>
-            <td>
-              <input type="text" id="title" name="title" class="lenya-form-element" value="${usecase.getParameter('title')}"/>
-            </td>
-          </tr>
-          <tr>
-            <td class="lenya-entry-caption"><label for="subject"><i18n:text>Subject</i18n:text>:</label></td>
-            <td>
-              <input type="text" id="subject" name="subject" class="lenya-form-element" value="${usecase.getParameter('subject')}"/>
-            </td>
-          </tr>
-          <tr>
-            <td class="lenya-entry-caption"><label for="description"><i18n:text>Description</i18n:text>:</label></td>
-            <td>
-              <!-- N.B.: do not put spaces or carriage returns inside the
-                   textarea element - these would be rendered -->
-              <textarea id="description" name="description" rows="3" class="lenya-form-element"><jx:out value="${usecase.getParameter('description')}"/></textarea>
-            </td>
-          </tr>
-          <tr>
-            <td class="lenya-entry-caption"><label for="publisher"><i18n:text>Publisher</i18n:text>:</label></td>
-            <td>
-              <input type="text" id="publisher" name="publisher" class="lenya-form-element" value="${usecase.getParameter('publisher')}"/>
-            </td>
-          </tr>
-          <tr>
-            <td class="lenya-entry-caption"><label for="rights"><i18n:text>Rights</i18n:text>:</label></td>
-            <td>
-              <input type="text" id="rights" name="rights" class="lenya-form-element" value="${usecase.getParameter('rights')}"/>
-            </td>
-          </tr>
-          <tr>
-            <td class="lenya-entry-caption"><i18n:text>Creation Date</i18n:text>:</td>
-            <td>
-              <jx:out value="${usecase.getParameter('date')}"/>
-            </td>
-          </tr>
-          <tr>
-            <td class="lenya-entry-caption"><label for="creator"><i18n:text>Creator</i18n:text>:</label></td>
-            <td>
-              <input type="hidden" id="creator" name="creator" class="lenya-form-element" value="${usecase.getParameter('creator')}"/>
-              <jx:out value="${usecase.getParameter('creator')}"/>
-            </td>
-          </tr>
-          <tr>
-            <td/>
-            <td>
-              <br/>
-              <jx:choose>
-                <jx:when test="${usecase.getParameter('document').getArea().equals('authoring') &amp;&amp; ! usecase.hasErrors()}">
-                  <input i18n:attr="value" name="submit" type="submit" value="Save"/>
-                </jx:when>
-                <jx:otherwise>
-                  <input i18n:attr="value" name="submit" type="submit" disabled="disabled" value="Save"/>
-                </jx:otherwise>
-              </jx:choose>
-            </td>
-          </tr>
-        </table>
-        <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-        <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
-      </form>
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/tab/overview.jx b/src/webapp/lenya/usecases/tab/overview.jx
deleted file mode 100644
index 649507d..0000000
--- a/src/webapp/lenya/usecases/tab/overview.jx
+++ /dev/null
@@ -1,100 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<page:page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" 
-           xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" 
-           xmlns="http://www.w3.org/1999/xhtml" 
-           xmlns:i18n="http://apache.org/cocoon/i18n/2.1" >
-  <jx:import uri="tab/head.jx"/>
-  <page:body>
-    <jx:import uri="tab/sitetree.jx"/>
-    <jx:import uri="tab/tabs.jx"/>
-    <div id="contentblock1" class="lenya-tab-sitetree">
-      <jx:choose>
-        <jx:when test="${not(empty(usecase.getParameter('title')))}">
-          <table class="lenya-table-noborder">
-            <tr>
-              <td colspan="2">
-                <jx:import uri="templates/messages.jx"/>
-              </td>
-            </tr>
-            <tr>
-              <td class="lenya-entry-caption"><i18n:text>Title</i18n:text>:</td>
-              <td>
-                <jx:out value="${usecase.getParameter('title')}"/>
-              </td>
-            </tr>
-            <tr>
-              <td class="lenya-entry-caption"><i18n:text>Description</i18n:text>:</td>
-              <td>
-                <jx:out value="${usecase.getParameter('description')}"/>
-              </td>
-            </tr>
-            <tr>
-              <td class="lenya-entry-caption"><i18n:text>Workflow State</i18n:text>:</td>
-              <td>
-                <jx:choose>
-                  <jx:when test="${not(empty(usecase.getParameter('state')))}"><jx:out value="${usecase.getParameter('state')}"/></jx:when>
-                  <jx:otherwise><span style="color: #999999;"><i18n:text>[no workflow]</i18n:text></span></jx:otherwise>
-                </jx:choose>
-              </td>
-            </tr>
-            <tr>
-              <td class="lenya-entry-caption"><i18n:text>Live</i18n:text>:</td>
-              <td>
-                <jx:out value="${usecase.getParameter('isLive')}"/>
-              </td>
-            </tr>
-            <tr>
-              <td class="lenya-entry-caption"><i18n:text>Available Languages</i18n:text>:</td>
-              <td>
-                <jx:forEach var="language" items="${usecase.getParameter('languages')}">
-                  <jx:out value="${language}"/>
-                </jx:forEach>
-              </td>
-            </tr>
-            <tr>
-              <td class="lenya-entry-caption"><i18n:text>Last modified</i18n:text>:</td>
-              <td>
-                <jx:out value="${usecase.getParameter('lastmodified')}"/>
-              </td>
-            </tr>
-            <tr>
-              <td class="lenya-entry-caption"><i18n:text>Document ID</i18n:text>:</td>
-              <td>
-                <jx:out value="${usecase.getParameter('document').getId()}"/>
-              </td>
-            </tr>
-            <tr>
-              <td class="lenya-entry-caption"><i18n:text>Resource Type</i18n:text>:</td>
-              <td>
-                <jx:out value="${usecase.getParameter('resourcetype')}"/>
-              </td>
-            </tr>
-          </table>
-        </jx:when>
-        <jx:when test="${usecase.getParameter('languageexists').equals('false')}">
-          <i18n:text>This document is not available in this language.</i18n:text><br/><br/>
-          <i18n:text>Available Languages</i18n:text>: <jx:out value="${usecase.getParameter('languages')}"/>
-        </jx:when>
-        <jx:otherwise><i18n:text>No overview available.</i18n:text></jx:otherwise>
-      </jx:choose>
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/tab/revisions.jx b/src/webapp/lenya/usecases/tab/revisions.jx
deleted file mode 100644
index dfdea70..0000000
--- a/src/webapp/lenya/usecases/tab/revisions.jx
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<page:page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" 
-           xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" 
-           xmlns="http://www.w3.org/1999/xhtml" 
-           xmlns:i18n="http://apache.org/cocoon/i18n/2.1" >
-
-  <jx:import uri="tab/head.jx"/>
-  <page:body>
-    <jx:import uri="tab/sitetree.jx"/>
-    <jx:import uri="tab/tabs.jx"/>
-    <div id="contentblock1" class="lenya-tab-sitetree">
-    <table class="lenya-table-noborder">
-      <jx:forEach var="item" items="${usecase.getParameter('entries')}" end="0">
-        <tr>
-          <td><i18n:text>Current Version</i18n:text></td>
-          <td>&#160;</td>
-          <td align="right"><jx:formatDate value="${item.time}" pattern="yyyy-MM-dd hh:mm:ss"/></td>
-          <td><jx:out value="${item.identity}"/></td>
-        </tr>
-      </jx:forEach>
-      <jx:forEach var="item" items="${usecase.getParameter('entries')}" begin="1">
-          <tr>
-            <td>
-              <a href="?lenya.usecase=rollback&amp;lenya.step=rollback&amp;rollbackTime=${item.time}">
-                <i18n:text>Rollback to this version</i18n:text>
-              </a>
-            </td>
-            <td>
-              <a href="?lenya.usecase=rollback&amp;lenya.step=view&amp;rollbackTime=${item.time}" target="_blank">
-               <i18n:text>View</i18n:text></a>
-            </td>
-            <td align="right"><jx:formatDate value="${item.time}" pattern="yyyy-MM-dd hh:mm:ss"/></td>
-            <td><jx:out value="${item.identity}"/></td>
-          </tr>
-      </jx:forEach>
-    </table>
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/tab/scheduler.jx b/src/webapp/lenya/usecases/tab/scheduler.jx
deleted file mode 100644
index b91e8cf..0000000
--- a/src/webapp/lenya/usecases/tab/scheduler.jx
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<page:page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" 
-           xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" 
-           xmlns="http://www.w3.org/1999/xhtml" 
-           xmlns:i18n="http://apache.org/cocoon/i18n/2.1" >
-  <jx:import uri="tab/head.jx"/>
-  <page:body>
-    <jx:import uri="tab/sitetree.jx"/>
-    <jx:import uri="tab/tabs.jx"/>
-    <div id="contentblock1" class="lenya-tab-sitetree">
-      
-      <table class="lenya-table">
-        <tr>
-          <th><i18n:text>Job</i18n:text></th>
-          <th><i18n:text>Time</i18n:text></th>
-        </tr>
-        <jx:forEach var="job" items="${usecase.getParameter('jobs')}">
-          <tr>
-            <td>
-              <jx:out value="${job.getJobName()}"/>
-            </td>
-            <td>
-              <jx:out value="${job.getNextTime()}"/>
-            </td>
-          </tr>
-        </jx:forEach>
-      </table>
-      
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/tab/sitetree.jx b/src/webapp/lenya/usecases/tab/sitetree.jx
deleted file mode 100644
index d99c696..0000000
--- a/src/webapp/lenya/usecases/tab/sitetree.jx
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: overview.jx 123960 2005-01-03 12:39:05Z andreas $ -->
-
-<jx:template
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
-  xmlns="http://www.w3.org/1999/xhtml"
-  name="">
-  
-  <jx:set var="document" value="${usecase.getParameter('document')}"/>
-  <jx:set var="area" value="${document.getArea()}"/>
-  <jx:set var="publicationId" value="${document.getPublication().getId()}"/>
-    
-  <table border="0" cellpadding="0" cellspacing="0">
-    <tr>
-      <jx:forEach var="language" items="${document.getPublication().getLanguages()}">
-        
-        <jx:set var="languageVersion"
-                value="${document.getIdentityMap().getLanguageVersion(document, language)}"/>
-        <jx:set var="languageUrl"
-                value="${request.contextPath + '/' + publicationId + '/' + area + languageVersion.getCanonicalDocumentURL()}"/>
-        
-        <td>
-          <jx:choose>
-            <jx:when test="${language.equals(document.getLanguage())}">
-              <a id="${language}" class="lenya-tablink-active" href="${languageUrl}?lenya.usecase=${usecase.getName()}"><jx:out value="${language}"/></a>
-            </jx:when>
-            <jx:otherwise>
-              <a id="${language}" class="lenya-tablink" href="${languageUrl}?lenya.usecase=${usecase.getName()}"><jx:out value="${language}"/></a>
-            </jx:otherwise>
-          </jx:choose>
-        </td>
-      </jx:forEach>
-    </tr>
-  </table>
-
-  <div id="lenya-info-tree">
-    <div style="display:none;">
-      <table border="0">
-        <tr>
-          <td>
-            <a style="font-size:7pt;text-decoration:none;color:white"
-               href="http://www.treemenu.net/" target="_blank">JavaScript Tree Menu</a>
-          </td>
-        </tr>
-      </table>
-    </div>
-    <jx:set var="url" value="${request.contextPath + '/' + publicationId + '/' + area + document.getCanonicalDocumentURL()}"/>
-      <script>
-      initializeDocument('<jx:out value="${area}"/>', '<jx:out value="${document.getId()}"/>');
-      loadSynchPage('<jx:out value="${url}"/>');
-    </script>
-  </div>
-</jx:template>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/tab/tabs.jx b/src/webapp/lenya/usecases/tab/tabs.jx
deleted file mode 100644
index 52aac06..0000000
--- a/src/webapp/lenya/usecases/tab/tabs.jx
+++ /dev/null
@@ -1,141 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: overview.jx 123960 2005-01-03 12:39:05Z andreas $ -->
-
-<jx:template
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
-  xmlns="http://www.w3.org/1999/xhtml"
-  name="">
-  
-	<div class="lenya-tabs-sitetree">
-    <table border="0" cellpadding="0" cellspacing="0">
-      <tr>
-        <td>
-          <jx:choose>
-            <jx:when test="${request.getParameter('lenya.usecase').equals('tab.overview')}">
-              <a href="?lenya.usecase=tab.overview" class="lenya-tablink-active"><i18n:text>Overview</i18n:text></a>
-            </jx:when>
-            <jx:otherwise>
-              <a href="?lenya.usecase=tab.overview" class="lenya-tablink"><i18n:text>Overview</i18n:text></a>
-            </jx:otherwise>
-          </jx:choose>
-        </td>
-        <jx:if test="${usecase.getParameter('document').exists()}">
-          <td>
-            <jx:choose>
-              <jx:when test="${request.getParameter('lenya.usecase').equals('tab.meta')}">
-                <a href="?lenya.usecase=tab.meta" class="lenya-tablink-active"><i18n:text>Meta</i18n:text></a>
-              </jx:when>
-              <jx:otherwise>
-                <a href="?lenya.usecase=tab.meta" class="lenya-tablink"><i18n:text>Meta</i18n:text></a>
-              </jx:otherwise>
-            </jx:choose>
-          </td>
-          <td>
-            <jx:choose>
-              <jx:when test="${request.getParameter('lenya.usecase').equals('tab.assets')}">
-                <a href="?lenya.usecase=tab.assets" class="lenya-tablink-active"><i18n:text>Assets</i18n:text></a>
-              </jx:when>
-              <jx:otherwise>
-                <a href="?lenya.usecase=tab.assets" class="lenya-tablink"><i18n:text>Assets</i18n:text></a>
-              </jx:otherwise>
-            </jx:choose>
-          </td>
-          <td>
-            <jx:choose>
-              <jx:when test="${request.getParameter('lenya.usecase').equals('tab.workflow')}">
-                <a href="?lenya.usecase=tab.workflow" class="lenya-tablink"><i18n:text>Workflow</i18n:text></a>
-              </jx:when>
-              <jx:otherwise>
-              </jx:otherwise>
-            </jx:choose>
-          </td>
-          <td>
-            <jx:choose>
-              <jx:when test="${request.getParameter('lenya.usecase').equals('tab.revisions')}">
-                <a href="?lenya.usecase=tab.revisions" class="lenya-tablink-active"><i18n:text>Versions</i18n:text></a>
-              </jx:when>
-              <jx:otherwise>
-                <a href="?lenya.usecase=tab.revisions" class="lenya-tablink"><i18n:text>Versions</i18n:text></a>
-              </jx:otherwise>
-            </jx:choose>
-          </td>
-          <jx:choose>
-            <jx:when test="${usecase.getParameter('document').getArea().equals('authoring')}">
-              <td>
-                <jx:choose>
-                  <jx:when test="${request.getParameter('lenya.usecase').equals('tab.acAuthoring')}">
-                    <a href="?lenya.usecase=tab.acAuthoring" class="lenya-tablink-active"><i18n:text>AC Auth</i18n:text></a>
-                  </jx:when>
-                  <jx:otherwise>
-                    <a href="?lenya.usecase=tab.acAuthoring" class="lenya-tablink"><i18n:text>AC Auth</i18n:text></a>
-                  </jx:otherwise>
-                </jx:choose>
-              </td>
-              <td>
-                <jx:choose>
-                  <jx:when test="${request.getParameter('lenya.usecase').equals('tab.acLive')}">
-                    <a href="?lenya.usecase=tab.acLive" class="lenya-tablink-active"><i18n:text>AC Live</i18n:text></a>
-                  </jx:when>
-                  <jx:otherwise>
-                    <a href="?lenya.usecase=tab.acLive" class="lenya-tablink"><i18n:text>AC Live</i18n:text></a>
-                  </jx:otherwise>
-                </jx:choose>
-              </td>
-            </jx:when>
-            <jx:when test="${usecase.getParameter('document').getArea().equals('archive')}">
-              <td>
-                <jx:choose>
-                  <jx:when test="${request.getParameter('lenya.usecase').equals('tab.acArchive')}">
-                    <a href="?lenya.usecase=tab.acArchive" class="lenya-tablink-active"><i18n:text>AC Archive</i18n:text></a>
-                  </jx:when>
-                  <jx:otherwise>
-                    <a href="?lenya.usecase=tab.acArchive" class="lenya-tablink"><i18n:text>AC Archive</i18n:text></a>
-                  </jx:otherwise>
-                </jx:choose>
-              </td>
-            </jx:when>
-            <jx:when test="${usecase.getParameter('document').getArea().equals('trash')}">
-              <td>
-                <jx:choose>
-                  <jx:when test="${request.getParameter('lenya.usecase').equals('tab.acTrash')}">
-                    <a href="?lenya.usecase=tab.acTrash" class="lenya-tablink-active"><i18n:text>AC Trash</i18n:text></a>
-                  </jx:when>
-                  <jx:otherwise>
-                    <a href="?lenya.usecase=tab.acTrash" class="lenya-tablink"><i18n:text>AC Trash</i18n:text></a>
-                  </jx:otherwise>
-                </jx:choose>
-              </td>
-            </jx:when>
-          </jx:choose>
-          <td>
-            <jx:choose>
-              <jx:when test="${request.getParameter('lenya.usecase').equals('tab.scheduler')}">
-                <a href="?lenya.usecase=tab.scheduler" class="lenya-tablink-active"><i18n:text>Scheduler</i18n:text></a>
-              </jx:when>
-              <jx:otherwise>
-                <a href="?lenya.usecase=tab.scheduler" class="lenya-tablink"><i18n:text>Scheduler</i18n:text></a>
-              </jx:otherwise>
-            </jx:choose>
-          </td>
-        </jx:if>
-      </tr>
-    </table>
-  </div>
-</jx:template>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/tab/workflow.jx b/src/webapp/lenya/usecases/tab/workflow.jx
deleted file mode 100644
index 1d1e079..0000000
--- a/src/webapp/lenya/usecases/tab/workflow.jx
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<page:page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" 
-           xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" 
-           xmlns="http://www.w3.org/1999/xhtml" 
-           xmlns:i18n="http://apache.org/cocoon/i18n/2.1" >
-  <jx:import uri="tab/head.jx"/>
-  <page:body>
-    <jx:import uri="tab/sitetree.jx"/>
-    <jx:import uri="tab/tabs.jx"/>
-    <div id="contentblock1" class="lenya-tab-sitetree">
-      <h2><i18n:text>Variables</i18n:text></h2>
-      <table class="lenya-table">
-        <tr><th><i18n:text>Name</i18n:text></th><th><i18n:text>Value</i18n:text></th></tr>
-        <jx:forEach var="item" items="${usecase.getParameter('variables')}">
-          <!--wf:variable -->
-          <tr>
-            <td>
-              <jx:out value="${item.name}"/>
-            </td>
-            <td>
-              <jx:out value="${item.value}"/>
-            </td>
-          </tr>
-        </jx:forEach>
-      </table>
-      <h2><i18n:text>History</i18n:text></h2>
-      <table class="lenya-table">
-      <tr>
-          <th><i18n:text>Date</i18n:text></th>
-          <th><i18n:text>Event</i18n:text></th>
-          <th><i18n:text>State</i18n:text></th>
-          <th><i18n:text>User</i18n:text></th>
-          <th><i18n:text>IP Address</i18n:text></th>
-        </tr>
-        <jx:forEach var="item" items="${usecase.getParameter('versions')}">
-          <tr>
-            <td><jx:out value="${item.date}"/></td>
-            <td><i18n:text><jx:out value="${item.event.name}"/></i18n:text></td>
-            <td><i18n:text><jx:out value="${item.state}"/></i18n:text></td>
-            <td>
-              <span style="white-space: nobreak">
-                <jx:out value="${item.userId}"/>
-              </span>
-            </td>
-            <td>
-              <jx:out value="${item.ip-address}"/>
-            </td>
-          </tr>
-        </jx:forEach>
-      </table>
-    </div>
-  </page:body>
-</page:page>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/templates/messages.jx b/src/webapp/lenya/usecases/templates/messages.jx
deleted file mode 100644
index 49d318b..0000000
--- a/src/webapp/lenya/usecases/templates/messages.jx
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<jx:template name="messages"
-           xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" 
-           xmlns="http://www.w3.org/1999/xhtml" 
-           xmlns:i18n="http://apache.org/cocoon/i18n/2.1" >
-
-  <!-- 
-     Note: in current implementation, ${usecase} refers to an 
-     instance of UsecaseProxy, not of Usecase !
-     -->
-  <jx:if test="${usecase.hasErrors() || usecase.hasInfoMessages()}">
-    <div class="lenya-error">
-      <ul>
-        
-        <jx:forEach var="message" items="${usecase.getErrorMessages()}">
-          <li>
-            <i18n:translate>
-              <i18n:text><jx:out value="${message.getMessage()}"/></i18n:text>
-                <jx:if test="${message.hasParameters()}"> 
-                    <jx:forEach var="param" items="${message.getParameters()}">
-                        <i18n:param><jx:out value="${param}"/></i18n:param>
-                    </jx:forEach>
-                </jx:if>
-            </i18n:translate>
-          </li>
-        </jx:forEach>
-        
-        <jx:forEach var="message" items="${usecase.getInfoMessages()}">
-          <li>
-            <i18n:translate>
-              <i18n:text><jx:out value="${message.getMessage()}"/></i18n:text>
-                <jx:if test="${message.hasParameters()}"> 
-                    <jx:forEach var="param" items="${message.getParameters()}">
-                        <i18n:param><jx:out value="${param}"/></i18n:param>
-                    </jx:forEach>
-                </jx:if>
-            </i18n:translate>
-          </li>
-        </jx:forEach>
-        
-      </ul>
-    </div>
-  </jx:if>
-
-</jx:template>
\ No newline at end of file
diff --git a/src/webapp/lenya/usecases/usecase.xmap b/src/webapp/lenya/usecases/usecase.xmap
deleted file mode 100644
index b974b1f..0000000
--- a/src/webapp/lenya/usecases/usecase.xmap
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-<!--
-    This sitemap handles calls to usecases which are registered in the
-    usecase framework.
--->
-
-<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
-  
-  <!-- =========================== FlowScript =============================== -->
-
-  <map:flow language="javascript">
-    <map:script src="usecases.js"/>
-  </map:flow>
-  
-  <!-- =========================== Pipelines ================================ -->
-
-  <map:pipelines>
-    
-    <map:pipeline type="noncaching">
-      <map:match pattern="redirect">
-        <map:generate src="../content/admin/common/redirect.xsp" type="serverpages"/>
-        <map:transform src="../xslt/admin/common/redirect.xsl"/>
-        <map:serialize/>
-      </map:match>
-      
-      <!-- 
-        This internal sitemap fragment renders the usecase, once the
-        executeUsecase() flowscript has completed and issued a redirect,
-        which is matched here.
-        -->
-      <map:match pattern="view/*/**" internal-only="true">
-        
-        <map:generate type="jx" src="fallback://lenya/usecases/{2}.jx"/>
-        <map:transform type="cinclude"/>
-        <map:transform type="i18n">
-          <map:parameter name="locale" value="{request:locale}"/>
-        </map:transform>
-        <map:transform src="cocoon://lenya-screen.xsl"/>
-        <map:match pattern="view/menu/**">
-          <map:transform src="cocoon://lenya-page/{page-envelope:publication-id}/{page-envelope:area}/default.xml"/>
-        </map:match>
-        <map:transform src="fallback://lenya/xslt/util/strip_namespaces.xsl"/>
-        <map:serialize type="xhtml"/>
-      </map:match>
-      
-    </map:pipeline>
-
-    <map:pipeline>
-      <map:match type="request-parameter" pattern="lenya.continuation">
-        <map:call continuation="{1}"/>
-      </map:match>
-      <map:match type="usecase" pattern="*">
-        <map:call function="executeUsecase"/>
-      </map:match>
-    </map:pipeline>
-    
-  </map:pipelines>
-	
-</map:sitemap>
diff --git a/src/webapp/lenya/usecases/usecases.js b/src/webapp/lenya/usecases/usecases.js
deleted file mode 100644
index f9803be..0000000
--- a/src/webapp/lenya/usecases/usecases.js
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * Copyright  1999-2005 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-/* $Id$ */
- 
-
-/* Helper method to add all request parameters to a usecase */
-function passRequestParameters(flowHelper, usecase) {
-    var names = cocoon.request.getParameterNames();
-    while (names.hasMoreElements()) {
-        var name = names.nextElement();
-        if (!name.equals("lenya.usecase")
-            && !name.equals("lenya.continuation")
-            && !name.equals("submit")) {
-            
-            var value = flowHelper.getRequest(cocoon).get(name);
-            
-            var string = new Packages.java.lang.String();
-            if (string.getClass().isInstance(value)) {
-                usecase.setParameter(name, value);
-            }
-            else {
-                usecase.setPart(name, value);
-            }
-            
-        }
-    }
-}
-
-
-/*
- * Main function to execute a usecase.
- *
- * Uses request parameter "lenya.usecase" to determine what
- * usecase to execute.
- * 
- */
-function executeUsecase() {
-    var usecaseName = cocoon.request.getParameter("lenya.usecase");
-    var view;
-    var proxy;
-    var menu = "nomenu";
-    
-    var usecaseResolver;
-    var usecase;
-    
-    if (cocoon.log.isDebugEnabled())
-       cocoon.log.debug("usecases.js::executeUsecase() called, parameter lenya.usecase = [" + usecaseName + "]");
-    
-    try {
-        usecaseResolver = cocoon.getComponent("org.apache.lenya.cms.usecase.UsecaseResolver");
-        usecase = usecaseResolver.resolve(usecaseName);
-
-        var flowHelper = cocoon.getComponent("org.apache.lenya.cms.cocoon.flow.FlowHelper");
-        var request = flowHelper.getRequest(cocoon);
-        var sourceUrl = Packages.org.apache.lenya.util.ServletHelper.getWebappURI(request);
-        usecase.setSourceURL(sourceUrl);
-        usecase.setName(usecaseName);
-        view = usecase.getView();
-        if (view && view.showMenu()) {
-            menu = "menu";
-        }
-
-        passRequestParameters(flowHelper, usecase);
-        usecase.checkPreconditions();
-        usecase.lockInvolvedObjects();
-        proxy = new Packages.org.apache.lenya.cms.usecase.UsecaseProxy(usecase);
-    }
-    finally {
-        /* done with usecase component, tell usecaseResolver to release it */
-        if (usecaseResolver != null) {
-            if (usecase != null) {
-                usecaseResolver.release(usecase);
-                usecase = undefined;
-            }
-            cocoon.releaseComponent(usecaseResolver);
-        }
-    }
-    
-    var success = false;
-    var targetUrl;
-
-
-    /*
-     * If the usecase has a view, this means we want to display something 
-     * to the user before proceeding. This also means the usecase consists
-     * several steps; repeated until the user chooses to submit or cancel.
-     *
-     * If the usecase does not have a view, it is simply executed.
-     */
-
-    if (view) {
-        var ready = false;
-        while (!ready) {
-
-            try {
-                var viewUri = "view/" + menu + "/" + view.getTemplateURI();
-                if (cocoon.log.isDebugEnabled())
-                    cocoon.log.debug("usecases.js::executeUsecase() in usecase " + usecaseName + ", creating view, calling Cocoon with viewUri = [" + viewUri + "]");
-        
-                cocoon.sendPageAndWait(viewUri, {
-                    "usecase" : proxy
-                });
-            }
-            catch (exception) {
-                /* if an exception was thrown by the view, allow the usecase to rollback the transition */
-                try {
-                    usecaseResolver = cocoon.getComponent("org.apache.lenya.cms.usecase.UsecaseResolver");
-                    usecase = usecaseResolver.resolve(usecaseName);
-                    proxy.setup(usecase);
-                    usecase.cancel();
-                    throw exception;
-                }
-                finally {
-                    usecaseResolver.release(usecase);
-                    usecase = undefined;
-                    cocoon.releaseComponent(usecaseResolver);
-                }
-            }
-            
-            if (cocoon.log.isDebugEnabled())
-                cocoon.log.debug("usecases.js::executeUsecase() in usecase " + usecaseName + ", after view, now advancing in usecase");
-        
-            try {
-                usecaseResolver = cocoon.getComponent("org.apache.lenya.cms.usecase.UsecaseResolver");
-                usecase = usecaseResolver.resolve(usecaseName);
-                proxy.setup(usecase);
-            
-                passRequestParameters(flowHelper, usecase);
-                usecase.advance();
-            
-                if (cocoon.request.getParameter("submit")) {
-                    usecase.checkExecutionConditions();
-                    if (! usecase.hasErrors()) {
-                        usecase.execute();
-                        if (! usecase.hasErrors()) {
-                            usecase.checkPostconditions();
-                            if (! usecase.hasErrors()) {
-                                ready = true;
-                                success = true;
-                            }
-                        }
-                    }
-                }
-                else if (cocoon.request.getParameter("cancel")) {
-                    usecase.cancel();
-                    ready = true;
-                }
-                proxy = new Packages.org.apache.lenya.cms.usecase.UsecaseProxy(usecase);
-                targetUrl = usecase.getTargetURL(success);
-            }
-            catch (exception) {
-                /* allow usecase to rollback the transition */
-                usecase.cancel();
-                throw exception;
-            }
-            finally {
-                usecaseResolver.release(usecase);
-                usecase = undefined;
-                cocoon.releaseComponent(usecaseResolver);
-            }
-        }
-    }
-    else {
-        try {
-            usecaseResolver = cocoon.getComponent("org.apache.lenya.cms.usecase.UsecaseResolver");
-            usecase = usecaseResolver.resolve(usecaseName);
-            proxy.setup(usecase);
-                
-            usecase.execute();
-            if (! usecase.hasErrors()) {
-                usecase.checkPostconditions();
-                if (! usecase.hasErrors()) {
-                    success = true;
-                }
-            }
-            targetUrl = usecase.getTargetURL(success);
-        }
-        catch (exception) {
-            /* allow usecase to rollback the transition */
-            usecase.cancel();
-            throw exception;
-        }
-        finally {
-            usecaseResolver.release(usecase);
-            usecase = undefined;
-            cocoon.releaseComponent(usecaseResolver);
-        }
-    }
-    
-    var url = request.getContextPath() + targetUrl;
-
-    if (cocoon.log.isDebugEnabled())
-       cocoon.log.debug("usecases.js::executeUsecase() in usecase " + usecaseName + ", completed, redirecting to url = [" + url + "]");
-        
-    cocoon.redirectTo(url);
-    
-}
diff --git a/src/webapp/lenya/xslt/admin/page2xhtml.xsl b/src/webapp/lenya/xslt/admin/page2xhtml.xsl
deleted file mode 100644
index 0f4ce7c..0000000
--- a/src/webapp/lenya/xslt/admin/page2xhtml.xsl
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: page2xhtml.xsl,v 1.6 2004/03/13 12:42:10 gregor Exp $ -->
-
-<xsl:stylesheet version="1.0"
-	  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-	  xmlns="http://www.w3.org/1999/xhtml"
-	  xmlns:xhtml="http://www.w3.org/1999/xhtml"
-      xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-	  >
-	  
-	  
-<xsl:param name="contextprefix"/>
-
-<xsl:template match="/cmsbody">
-    <html>
-      <head>
-        <title><xsl:value-of select="page:page/page:title"/></title>
-        <link rel="stylesheet" type="text/css"
-          href="{$contextprefix}/lenya/css/admin.css" title="admin css"/>
-      </head>
-      <body>
-        <xsl:apply-templates/>
-      </body>
-    </html>
-</xsl:template>
-
-
-<xsl:template match="page:page">
-  <table class="lenya-body" border="0" cellpadding="0" cellspacing="0">
-    <tr>
-      <td class="lenya-sidebar">
-        <div class="lenya-sidebar-heading">Administration</div>
-        <xsl:copy-of select="/cmsbody/xhtml:div[@id = 'menu']"/>
-      </td>
-      <td class="lenya-content">
-        <div style="margin-bottom: 10px">
-          <h1><xsl:apply-templates select="page:title/node()"/></h1>
-        </div>
-        <xsl:apply-templates select="page:body/node()"/>
-      </td>
-    </tr>
-  </table>
-</xsl:template>
-
-
-<!-- do not copy menu -->
-<xsl:template match="xhtml:div[@id = 'menu']"/>
-
-
-<xsl:template match="@*|node()">
-  <xsl:copy>
-    <xsl:apply-templates select="@*|node()"/>
-  </xsl:copy>
-</xsl:template>
-
-
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/xslt/admin/root.xsl b/src/webapp/lenya/xslt/admin/root.xsl
deleted file mode 100644
index df06921..0000000
--- a/src/webapp/lenya/xslt/admin/root.xsl
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" 
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
-  >
-  
-  <xsl:param name="contextprefix"/>
-
-   <xsl:template match="/">
-    <html>
-      <head>
-        <link href="{$contextprefix}/lenya/css/default.css" rel="stylesheet" type="text/css"/>
-      </head>
-
-      <body>
-        <div id="lenya-info-body">
-          <table border="0" cellpadding="0" cellspacing="0" width="100%">
-            <tr>
-              <td valign="top" width="80%">
-                <div id="lenya-info-content">
-                  <!-- support both old-style tabs and new-style JX tabs -->
-                  <xsl:choose>
-                    <xsl:when test="/page:page">
-                      <xsl:copy-of select="page:page/node()"/>
-                    </xsl:when>
-                    <xsl:otherwise>
-                      <xsl:copy-of select="*"/>
-                    </xsl:otherwise>
-                  </xsl:choose>
-                </div>
-              </td>
-            </tr>
-          </table>
-        </div>
-      </body>
-    </html>
-  </xsl:template>
-
-</xsl:stylesheet> 
\ No newline at end of file
diff --git a/src/webapp/lenya/xslt/admin/status2html.xslt b/src/webapp/lenya/xslt/admin/status2html.xslt
deleted file mode 100644
index 09faf0e..0000000
--- a/src/webapp/lenya/xslt/admin/status2html.xslt
+++ /dev/null
@@ -1,90 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:status="http://apache.org/cocoon/status/2.0">
- 
-  <xsl:param name="contextPath"/>
-
-  <xsl:template match="status:statusinfo">
-    <div>
-      <h2><xsl:value-of select="@status:host"/> - <xsl:value-of select="@status:date"/></h2>
-      <xsl:apply-templates/>
-    </div>
-  </xsl:template>
-
-  <xsl:template match="status:group">
-    <h3><xsl:value-of select="@status:name"/></h3>
-    <ul><xsl:apply-templates select="status:value"/></ul>
-    <xsl:apply-templates select="status:group"/>
-  </xsl:template>
-
-  <xsl:template match="status:value">
-    <li>
-      <span class="description"><xsl:value-of select="@status:name"/><xsl:text>: </xsl:text></span>    
-
-<!--
-          <ul>
-             <xsl:apply-templates />
-          </ul>
--->
-      <xsl:choose>
-        <xsl:when test="contains(@status:name,'free') or contains(@status:name,'total')">
-          <xsl:call-template name="suffix">
-            <xsl:with-param name="bytes" select="number(.)"/>
-          </xsl:call-template>
-        </xsl:when>      
-        <xsl:when test="count(status:line) &lt;= 1">
-          <xsl:value-of select="status:line"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <ul>
-             <xsl:apply-templates />
-          </ul>
-        </xsl:otherwise>
-      </xsl:choose>
-    </li>
-  </xsl:template>
-
-  <xsl:template match="status:line">
-    <li><xsl:value-of select="."/></li>
-  </xsl:template>
-
-	<xsl:template name="suffix">
-		<xsl:param name="bytes"/>
-		<xsl:choose>
-			<!-- More than 4 MB (=4194304) -->
-			<xsl:when test="$bytes &gt;= 4194304">
-				<xsl:value-of select="round($bytes div 10485.76) div 100"/> MB
-			</xsl:when>
-			<!-- More than 4 KB (=4096) -->
-			<xsl:when test="$bytes &gt; 4096">
-				<xsl:value-of select="round($bytes div 10.24) div 100"/> KB
-			</xsl:when>
-			<!-- Less -->
-			<xsl:otherwise>
-				<xsl:value-of select="$bytes"/> B
-			</xsl:otherwise>
-		</xsl:choose>
-	</xsl:template>
-  
-</xsl:stylesheet>
-
diff --git a/src/webapp/lenya/xslt/authoring/addMetaData.xsl b/src/webapp/lenya/xslt/authoring/addMetaData.xsl
deleted file mode 100644
index bee1cf9..0000000
--- a/src/webapp/lenya/xslt/authoring/addMetaData.xsl
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:dc="http://purl.org/dc/elements/1.1/"
-  xmlns:dcterms="http://purl.org/dc/terms/"
-  xmlns:xhtml="http://www.w3.org/1999/xhtml"
-  exclude-result-prefixes="xhtml dcterms"
- >
-
-  <xsl:param name="creator"/>
-  <xsl:param name="title"/>
-  <xsl:param name="description"/>
-  <xsl:param name="subject"/>
-  <xsl:param name="language"/>
-  <xsl:param name="publisher"/>
-  <xsl:param name="date"/>
-  <xsl:param name="rights"/>
-
-  <xsl:template match="dc:creator[$creator!='']">
-    <dc:creator>
-      <xsl:value-of select="$creator"/>
-    </dc:creator>
-  </xsl:template>  
-
-  <xsl:template match="dc:title[$title!='']">
-    <dc:title>
-      <xsl:value-of select="$title"/>
-    </dc:title>
-  </xsl:template>  
-
-  <xsl:template match="dc:description[$description!='']">
-    <dc:description>
-      <xsl:value-of select="$description"/>
-    </dc:description>
-  </xsl:template>  
-
-  <xsl:template match="dc:subject[$subject!='']">
-    <dc:subject>
-      <xsl:value-of select="$subject"/>
-    </dc:subject>
-  </xsl:template>  
-
-  <xsl:template match="dc:language[$language!='']">
-    <dc:language>
-      <xsl:value-of select="$language"/>
-    </dc:language>
-  </xsl:template>  
-
-  <xsl:template match="dc:publisher[$publisher!='']">
-    <dc:publisher>
-      <xsl:value-of select="$publisher"/>
-    </dc:publisher>
-  </xsl:template>  
-
-  <xsl:template match="dc:date[$date!='']">
-    <dc:date>
-      <xsl:value-of select="$date"/>
-    </dc:date>
-  </xsl:template>  
-
-  <xsl:template match="dc:rights[$rights!='']">
-    <dc:rights>
-      <xsl:value-of select="$rights"/>
-    </dc:rights>
-  </xsl:template>  
-
-  <!-- Identity transformation -->
-  <xsl:template match="@*|*">
-    <xsl:copy>
-      <xsl:apply-templates select="@*|node()"/>
-    </xsl:copy>
-  </xsl:template>  
-  
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/xslt/authoring/asset-upload.xsl b/src/webapp/lenya/xslt/authoring/asset-upload.xsl
deleted file mode 100644
index d4d4840..0000000
--- a/src/webapp/lenya/xslt/authoring/asset-upload.xsl
+++ /dev/null
@@ -1,170 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-    xmlns:lenya-info="http://apache.org/cocoon/lenya/info/1.0"
-    xmlns:wf="http://apache.org/cocoon/lenya/workflow/1.0"
-    xmlns:rc="http://apache.org/cocoon/lenya/rc/1.0"
-    xmlns:dc="http://purl.org/dc/elements/1.1/"
-    xmlns="http://www.w3.org/1999/xhtml"
-    xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-    xmlns:usecase="http://apache.org/cocoon/lenya/usecase/1.0"
-    exclude-result-prefixes="lenya-info wf rc dc usecase page i18n"
-    >
-
-<xsl:param name="lenya.usecase" select="'asset'"/>
-<xsl:param name="lenya.step"/>
-<xsl:param name="error"/>
-<xsl:param name="extensions" select="'doc dot rtf txt asc ascii xls xlw xlt ppt pot gif jpg png tif eps pct m3u kar mid smf mp3 swa mpg mpv mp4 mov bin sea hqx sit zip jmx jcl qz jbc jmt cfg pdf'"/>
-
-  <xsl:param name="contextprefix"/>
-
-<xsl:template match="/lenya-info:info">
-  <page:page>
-    <page:title><i18n:text key="lenya.assetupload.subtitle"/></page:title>
-    <page:body>
-      <xsl:apply-templates select="lenya-info:assets"/>
-    </page:body>
-  </page:page>
-</xsl:template>
-
-
-<xsl:template match="lenya-info:assets">
-  <xsl:call-template name="pre-body"/>
-  <xsl:call-template name="upload-form"/>
-  <xsl:call-template name="library-form"/>
-</xsl:template>
-
-
-<!--
-Override this template to add scripts etc.
--->
-<xsl:template name="pre-body"/>
-
-
-<xsl:template name="upload-form">
-  <div class="lenya-box">
-    <div class="lenya-box-title"><i18n:text key="lenya.assetupload.subtitle"/></div>
-    <div class="lenya-box-body">
-      <form name="fileinput" action="" method="post" enctype="multipart/form-data" onsubmit="return check_upload(fileinput, ext)">
-        <input type="hidden" name="lenya.usecase" value="{$lenya.usecase}"/>
-        <input type="hidden" name="lenya.step" value="asset-upload"/>
-        <input type="hidden" name="task-id" value="insert-asset"/>
-        <input type="hidden" name="uploadtype" value="asset"/>
-        <input type="hidden" name="properties.asset.date" value="{/lenya-info:info/lenya-info:assets/lenya-info:date}"/>
-        <input type="hidden" name="properties.insert.asset.document-id" value="{/lenya-info:info/lenya-info:assets/lenya-info:document-id}"/>
-        <input type="hidden" name="properties.insert.asset.language" value="{/lenya-info:info/lenya-info:assets/lenya-info:language}"/>
-        <table class="lenya-table-noborder">
-          <xsl:if test="$error = 'true'">
-            <tr>
-              <td colspan="2" class="lenya-form-caption">
-                <span class="lenya-form-message-error"><i18n key="filename-format-exception"/></span>
-              </td>
-            </tr>
-          </xsl:if>
-          <tr>
-            <td class="lenya-form-caption"><i18n:text>Select File</i18n:text>:</td><td><input class="lenya-form-element" type="file" name="properties.asset.data" 
-                onchange="imagepreview(this)"/><br/>(<i18n:text>No whitespace, no special characters</i18n:text>)</td>
-          </tr>
-          <tr><td>&#160;</td></tr>
-          <tr>
-            <td class="lenya-form-caption"><i18n:text>Title</i18n:text>*:</td><td><input class="lenya-form-element" type="text" name="properties.asset.title"/></td>
-          </tr>
-          <tr>
-            <td class="lenya-form-caption"><i18n:text>Creator</i18n:text>:</td><td><input class="lenya-form-element" type="text" name="properties.asset.creator" value="{/lenya-info:info/lenya-info:assets/lenya-info:creator}"/></td>
-          </tr>
-          <tr>
-            <td class="lenya-form-caption"><i18n:text>Rights</i18n:text>:</td><td><input class="lenya-form-element" type="text" name="properties.asset.rights" value="All rights reserved."/></td>
-          </tr>
-          <tr>
-            <td class="lenya-form-caption"><i18n:text>Preview</i18n:text>:</td><td><img src="" id="preview" style="visibility: hidden; height: 100px;"/></td>
-          </tr>
-          <tr><td>&#160;</td></tr>
-          <tr>
-            <td/>
-            <td>
-              <input i18n:attr="value" type="submit" value="Add" />&#160;
-              <input i18n:attr="value" type="button" onClick="location.href='javascript:window.close();';" value="Cancel"/>
-            </td>
-          </tr>
-        </table>
-      </form>
-    </div>
-  </div>
-</xsl:template>
-
-
-<xsl:template name="library-form">
-  <div class="lenya-box">
-    <div class="lenya-box-title"><i18n:text>Asset Library</i18n:text></div>
-    <div class="lenya-box-body">
-      <form name="assetlibrary" action="">
-        <table class="lenya-table-noborder">
-          <xsl:if test="not(lenya-info:asset)">
-            <tr><td colspan="5" class="lenya-form-caption"><i18n:text>No assets available</i18n:text></td></tr>
-          </xsl:if>
-          <tr>
-            <td class="lenya-form-caption"><i18n:text>Title</i18n:text>:</td>
-            <td colspan="4">
-              <input id="assetTitle" class="lenya-form-element" type="text" name="properties.insert.asset.title" value=""/>
-              <input type="hidden" id="assetSource" name="properties.asset.data" value=""/>
-              <input type="hidden" id="assetExtent" name="extent" value=""/>
-            </td>
-          </tr>
-          <xsl:apply-templates select="lenya-info:asset"/>
-          <tr>
-            <td/>
-            <td colspan="4">
-              <xsl:call-template name="library-buttons"/>
-            </td>
-          </tr>
-        </table>
-      </form>
-    </div>
-  </div>
-</xsl:template>
-
-
-<xsl:template match="lenya-info:asset">
-  <tr>
-    <td/>
-    <td>
-      <input type="radio" name="asset"
-        onclick="document.getElementById('assetTitle').value = '{dc:title}';
-                 document.getElementById('assetSource').value = '{dc:source}';
-                 document.getElementById('assetExtent').value = '{dc:extent}';"/>
-    </td>
-    <td>
-        <xsl:if test="dc:format = 'image/jpeg' or dc:format = 'image/gif' or  dc:format = 'image/png'">
-            <img src="{../lenya-info:documentnodeid}/{dc:source}" style="height: 32px; vertical-align: middle;"/>&#160;
-        </xsl:if>
-        <xsl:value-of select="dc:title"/>
-    </td>
-    <td><xsl:value-of select="dc:extent"/> KB</td>
-    <td><xsl:value-of select="dc:date"/></td>
-  </tr>
-</xsl:template>
-
-
-<xsl:template name="library-buttons"/>
-
-
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/src/webapp/lenya/xslt/authoring/asset.xsl b/src/webapp/lenya/xslt/authoring/asset.xsl
deleted file mode 100644
index cde54df..0000000
--- a/src/webapp/lenya/xslt/authoring/asset.xsl
+++ /dev/null
@@ -1,306 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-  xmlns:lenya-info="http://apache.org/cocoon/lenya/info/1.0"
-  xmlns:wf="http://apache.org/cocoon/lenya/workflow/1.0"
-  xmlns:rc="http://apache.org/cocoon/lenya/rc/1.0"
-  xmlns:dc="http://purl.org/dc/elements/1.1/"
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  exclude-result-prefixes="lenya-info wf rc dc lenya-info"
-  >
-  
-  <xsl:param name="contextprefix"/>
-  <xsl:param name="lenya.usecase" select="'asset'"/>
-  <xsl:param name="lenya.step"/>
-  <xsl:param name="insert"/>
-  <xsl:param name="insertimage"/> 
-  <xsl:param name="insertTemplate"/>
-  <xsl:param name="insertReplace"/>
- 
-  <xsl:param name="assetXPath"/>
-  <xsl:param name="insertWhere"/>
-
-  <xsl:param name="error"/>
-
-  <xsl:param name="extensions" select="'doc dot rtf txt asc ascii xls xlw xlt ppt pot gif jpg png tif eps pct m3u kar mid smf mp3 swa mpg mpv mp4 mov bin sea hqx sit zip jmx jcl qz jbc jmt cfg pdf'"/>
-
-  <xsl:template match="/lenya-info:info">
-    <page:page xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0">
-      <xsl:choose>
-        <xsl:when test="$insert = 'true'">
-          <xsl:choose>
-            <xsl:when test="$insertimage = 'true'">
-              <page:title><i18n:text>Insert Image</i18n:text></page:title>
-            </xsl:when>
-            <xsl:otherwise>
-              <page:title><i18n:text>Insert Asset</i18n:text></page:title>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-        <xsl:otherwise>
-          <page:title><i18n:text>New Asset</i18n:text></page:title>
-        </xsl:otherwise>
-      </xsl:choose>
-      <page:body>
-        <xsl:apply-templates/>
-      </page:body>
-    </page:page>
-  </xsl:template>
-  
-  <xsl:template match="lenya-info:assets">
-    
-    <div class="lenya-box">
-      <xsl:choose>
-        <xsl:when test="$insert = 'true'">
-          <xsl:choose>
-            <xsl:when test="$insertimage = 'true'">
-              <div class="lenya-box-title"><i18n:text>Insert a new Image</i18n:text></div>
-            </xsl:when>
-            <xsl:otherwise>
-              <div class="lenya-box-title"><i18n:text>Insert a new Asset</i18n:text></div>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-        <xsl:otherwise>
-          <div class="lenya-box-title"><i18n:text>Upload an Asset</i18n:text></div>
-        </xsl:otherwise>
-      </xsl:choose>
-      <div class="lenya-box-body">
-    <script type="text/javascript" src="{$contextprefix}/lenya/javascript/validation.js">&#160;</script>
-    <script type="text/javascript" src="{$contextprefix}/lenya/javascript/asset.js">&#160;</script>
-    <script>
-      var ext = '<xsl:value-of select="$extensions"/>';
-    </script>  
-        <form name="fileinput" action="{/lenya-info:info/lenya-info:assets/lenya-info:request-uri}" method="post" enctype="multipart/form-data" onsubmit="return check_upload(fileinput, ext)">
-          <input type="hidden" name="lenya.usecase" value="{$lenya.usecase}"/>
-          <input type="hidden" name="lenya.event" value="edit"/>
-          <xsl:choose>
-            <xsl:when test="$insert = 'true'">
-              <input type="hidden" name="lenya.step" value="upload-and-insert"/>
-            </xsl:when>
-            <xsl:otherwise>
-              <input type="hidden" name="lenya.step" value="upload"/>
-            </xsl:otherwise>
-          </xsl:choose>
-      <!-- some values appear twice, this is required for roundtripping. -->
-          <input type="hidden" name="task-id" value="insert-asset"/>
-          <input type="hidden" name="uploadtype" value="asset"/>
-          <input type="hidden" name="properties.insert.asset.assetXPath" value="{$assetXPath}"/>
-          <input type="hidden" name="assetXPath" value="{$assetXPath}"/>
-          <input type="hidden" name="properties.insert.asset.insertWhere" value="{$insertWhere}"/>
-          <input type="hidden" name="insertWhere" value="{$insertWhere}"/>
-          <input type="hidden" name="properties.insert.asset.area" value="{/lenya-info:info/lenya-info:assets/lenya-info:area}"/>
-          <input type="hidden" name="insert" value="{$insert}"/>
-          <input type="hidden" name="insertimage" value="{$insertimage}"/>
-          <input type="hidden" name="properties.insert.asset.document-id" value="{/lenya-info:info/lenya-info:assets/lenya-info:documentid}"/>
-          <input type="hidden" name="properties.insert.asset.language" value="{/lenya-info:info/lenya-info:assets/lenya-info:language}"/>
-          <input type="hidden" name="properties.asset.date" value="{/lenya-info:info/lenya-info:assets/lenya-info:date}"/>
-          <input type="hidden" name="properties.insert.asset.insertTemplate" value="{$insertTemplate}"/>
-          <input type="hidden" name="insertTemplate" value="{$insertTemplate}"/>
-          <input type="hidden" name="properties.insert.asset.insertReplace" value="{$insertReplace}"/>
-          <input type="hidden" name="insertReplace" value="{$insertReplace}"/>
-          <table class="lenya-table-noborder">
-            <xsl:if test="$error = 'true'">
-              <tr>
-                <td colspan="2" class="lenya-form-caption">
-                  <span class="lenya-form-message-error">
-                    <i18n:text key="filename-format-exception"/>
-                  </span>
-                </td>
-              </tr>
-            </xsl:if>
-            <tr>
-              <td class="lenya-form-caption" style="vertical-align: top;">
-                <i18n:translate>
-                  <i18n:text key="select-object"/>
-                  <i18n:param>
-                    <i18n:text>
-                      <xsl:choose>
-                        <xsl:when test="$insertimage = 'true'">Image</xsl:when>
-                            <xsl:otherwise>File</xsl:otherwise>
-                      </xsl:choose>
-                    </i18n:text>
-                  </i18n:param>
-                </i18n:translate>:
-              </td>
-              <td><input class="lenya-form-element" type="file" name="properties.asset.data" onchange="imagepreview(this)"/><br/>(<i18n:text>No whitespace, no special characters</i18n:text>)</td>
-            </tr>
-            <tr><td>&#160;</td></tr>
-            <tr>
-              <td class="lenya-form-caption"><i18n:text>Title</i18n:text>*:</td><td><input class="lenya-form-element" type="text" name="properties.asset.title"/></td>
-            </tr>
-            <tr>
-              <td class="lenya-form-caption"><i18n:text>Creator</i18n:text>:</td><td><input class="lenya-form-element" type="text" name="properties.asset.creator" value="{/lenya-info:info/lenya-info:assets/lenya-info:creator}"/></td>
-            </tr>
-            <tr>
-              <td class="lenya-form-caption"><i18n:text>Rights</i18n:text>:</td><td><input class="lenya-form-element" type="text" name="properties.asset.rights" value="All rights reserved."/></td>
-            </tr>
-            <tr><td>&#160;</td></tr>
-            <xsl:if test="$insertimage = 'true'">
-              <tr>
-                <td class="lenya-form-caption"><i18n:text>Caption</i18n:text>:</td><td><input class="lenya-form-element" type="text" name="properties.insert.asset.caption" value=""/></td>
-              </tr>
-              <tr>
-                <td class="lenya-form-caption"><i18n:text>Link</i18n:text>:</td><td><input class="lenya-form-element" type="text" name="properties.insert.asset.link"/><br/>External links have to start with 'http://', internal links have to start with '/'</td>
-              </tr>
-            </xsl:if>
-              <tr>
-                <td class="lenya-form-caption"><i18n:text>Preview</i18n:text>:</td><td><img src="" id="preview" style="visibility: hidden; height: 100px;"/></td>
-              </tr>
-            <tr><td>&#160;</td></tr>
-            <tr>
-              <td/>
-              <td>
-                <input i18n:attr="value" type="submit" value="Submit"/>&#160;
-                <input i18n:attr="value" type="button" onClick="location.href='{/lenya-info:info/lenya-info:assets/lenya-info:request-uri}?lenya.usecase=checkin&amp;lenya.step=checkin&amp;backup=false';" value="Cancel"/>
-              </td>
-            </tr>
-          </table>
-        </form>
-      </div>
-    </div>
-    
-    <xsl:choose>
-      <xsl:when test="$insert = 'true'">
-        <div class="lenya-box">
-          <xsl:choose>
-            <xsl:when test="$insertimage = 'true'">
-              <div class="lenya-box-title"><i18n:text>Insert an existing Image</i18n:text></div>
-            </xsl:when>
-            <xsl:otherwise>
-              <div class="lenya-box-title"><i18n:text>Insert an existing Asset</i18n:text></div>
-            </xsl:otherwise>
-          </xsl:choose>
-          <div class="lenya-box-body">
-            <form method="GET"
-              action="">
-              <input type="hidden" name="lenya.usecase" value="{$lenya.usecase}"/>
-              <input type="hidden" name="lenya.step" value="insert"/>
-              <input type="hidden" name="lenya.event" value="edit"/>
-              <input type="hidden" name="task-id" value="insert-asset"/>
-              <input type="hidden" name="properties.insert.asset.assetXPath" value="{$assetXPath}"/>
-              <input type="hidden" name="properties.insert.asset.insertWhere" value="{$insertWhere}"/>
-              <input type="hidden" name="properties.insert.asset.insertTemplate" value="{$insertTemplate}"/>
-              <input type="hidden" name="properties.insert.asset.insertReplace" value="{$insertReplace}"/>
-              <input type="hidden" name="properties.insert.asset.area" value="{/lenya-info:info/lenya-info:assets/lenya-info:area}"/>
-              <input type="hidden" name="properties.insert.asset.document-id" value="{/lenya-info:info/lenya-info:assets/lenya-info:documentid}"/>
-              <input type="hidden" name="properties.insert.asset.language" value="{/lenya-info:info/lenya-info:assets/lenya-info:language}"/>
-
-              <table class="lenya-table-noborder">
-                <xsl:if test="not(lenya-info:asset)">
-                  <tr><td colspan="5" class="lenya-form-caption"><i18n:text>No assets available</i18n:text></td></tr>
-                </xsl:if>
-                <tr>
-                  <td class="lenya-form-caption"><i18n:text>Title</i18n:text>:</td>
-                  <td colspan="4">
-                    <input id="assetTitle" class="lenya-form-element" type="text" name="properties.asset.title" value=""/>
-                    <input type="hidden" id="assetSource" name="properties.asset.data" value=""/>
-                    <input type="hidden" id="assetExtent" name="extent" value=""/>
-                  </td>
-                </tr>
-                <xsl:if test="$insertimage = 'true'">
-                  <tr>
-                    <td class="lenya-form-caption"><i18n:text>Caption</i18n:text>:</td>
-                    <td colspan="4">
-                      <input class="lenya-form-element" type="text" name="properties.insert.asset.caption" value="Default Caption"/>
-                    </td>
-                  </tr>
-                  <tr>
-                    <td class="lenya-form-caption"><i18n:text>Link</i18n:text>:</td>
-                    <td colspan="4">
-                      <input class="lenya-form-element" type="text" name="properties.insert.asset.link"/>
-                      <br/>
-                      <xsl:text>External links have to start with 'http://', internal links have to start with '/'</xsl:text>
-                    </td>
-                  </tr>
-                </xsl:if>
-                <xsl:apply-templates select="lenya-info:asset"/>
-                <tr>
-                  <td/>
-                  <td colspan="4">
-                    <input i18n:attr="value" type="submit" value="Submit"/>&#160;
-                    <input i18n:attr="value" type="button" onClick="location.href='{/lenya-info:info/lenya-info:assets/lenya-info:request-uri}?lenya.usecase=checkin&amp;lenya.step=checkin&amp;backup=false';" value="Cancel"/>
-                  </td>
-                </tr>
-              </table>
-      
-              <!--
-              <table class="lenya-table-noborder">
-                <tr>
-                  <td class="lenya-form-caption">
-                  <xsl:choose>
-                    <xsl:when test="$insertimage = 'true'"><i18n:text>Image</i18n:text>:</xsl:when>
-                    <xsl:otherwise><i18n:text>File</i18n:text>:</xsl:otherwise></xsl:choose>
-                  </td>
-                  <td class="lenya-form-caption">
-                    <xsl:apply-templates select="lenya-info:asset"/>
-                  </td>
-                </tr>
-                <tr><td>&#160;</td></tr>
-                <tr>
-                  <td class="lenya-form-caption"><i18n:text>Title</i18n:text>:</td><td><input class="lenya-form-element" type="text" name="properties.asset.title" value=""/></td>
-                </tr>
-                <xsl:if test="$insertimage = 'true'">
-                  <tr>
-                    <td class="lenya-form-caption"><i18n:text>Caption</i18n:text>:</td><td><input class="lenya-form-element" type="text" name="properties.insert.asset.caption" value="Default Caption"/></td>
-                  </tr>
-                  <tr>
-                    <td class="lenya-form-caption"><i18n:text>Link</i18n:text>:</td><td><input class="lenya-form-element" type="text" name="properties.insert.asset.link"/><br/>External links have to start with 'http://', internal links have to start with '/'</td>
-                  </tr>
-                </xsl:if>
-                <tr><td>&#160;</td></tr>
-                <tr>
-                  <td/>
-                  <td>
-                    <input i18n:attr="value" type="submit" value="Submit"/>&#160;
-                    <input i18n:attr="value" type="button" onClick="location.href='{/usecase:asset/usecase:request-uri}?lenya.usecase=checkin&amp;lenya.step=checkin&amp;backup=false';" value="Cancel"/>
-                  </td>
-                </tr>
-              </table>
-              -->
-            </form>
-          </div>
-        </div>
-      </xsl:when>
-    </xsl:choose>
-  </xsl:template>
-
-<xsl:template match="lenya-info:asset">
-  <xsl:if test="$insertimage != 'true' or (contains(dc:source, '.jpg') or contains(dc:source, '.gif') or contains(dc:source, '.png') or contains(dc:source, '.swf'))">
-  <tr>
-    <td/>
-    <td>
-      <input type="radio" name="asset"
-        onclick="document.getElementById('assetTitle').value = '{dc:title}';
-                 document.getElementById('assetSource').value = '{dc:source}';
-                 document.getElementById('assetExtent').value = '{dc:extent}';"/>
-    </td>
-    <td><xsl:value-of select="dc:title"/></td>
-    <td><xsl:value-of select="dc:extent"/> KB</td>
-    <td><xsl:value-of select="dc:date"/></td>
-  </tr>
-  </xsl:if>
-</xsl:template>
-  
-  
-</xsl:stylesheet>  
diff --git a/src/webapp/lenya/xslt/authoring/edit/addSourceTags.xsl b/src/webapp/lenya/xslt/authoring/edit/addSourceTags.xsl
deleted file mode 100644
index 8fa35f0..0000000
--- a/src/webapp/lenya/xslt/authoring/edit/addSourceTags.xsl
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0"?>

-<!--

-  Copyright 1999-2004 The Apache Software Foundation

-

-  Licensed 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.

--->

-

-<!-- $Id: addSourceTags.xsl 42703 2004-03-13 12:57:53Z gregor $ -->

-

-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

-

-<xsl:param name="source"/>

-

-<xsl:template match="/">

-  <open>

-  <source:write xmlns:source="http://apache.org/cocoon/source/1.0">

-    <source:source><xsl:value-of select="$source"/></source:source>

-    <source:fragment>

-      <xsl:copy-of select="."/>

-    </source:fragment>

-  </source:write>

-    <content>

-      <xsl:copy-of select="."/>

-    </content>

-  </open>

-</xsl:template>

-

-</xsl:stylesheet>

diff --git a/src/webapp/lenya/xslt/authoring/edit/removeSourceTags.xsl b/src/webapp/lenya/xslt/authoring/edit/removeSourceTags.xsl
deleted file mode 100644
index 6507dc1..0000000
--- a/src/webapp/lenya/xslt/authoring/edit/removeSourceTags.xsl
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>

-<!--

-  Copyright 1999-2004 The Apache Software Foundation

-

-  Licensed 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.

--->

-

-<!-- $Id: removeSourceTags.xsl 42703 2004-03-13 12:57:53Z gregor $ -->

-

-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

-

-<xsl:template match="/">

-  <xsl:copy-of select="/open/content/*"/>

-</xsl:template>

-

-</xsl:stylesheet>

diff --git a/src/webapp/lenya/xslt/authoring/edit/replace-predefined-entities.xsl b/src/webapp/lenya/xslt/authoring/edit/replace-predefined-entities.xsl
deleted file mode 100644
index 7d4998d..0000000
--- a/src/webapp/lenya/xslt/authoring/edit/replace-predefined-entities.xsl
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: replace-predefined-entities.xsl,v 1.4 2004/03/13 12:42:05 gregor Exp $ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
->
-
-<xsl:output indent="no"/>
-
-<!-- FIXME: CDATA is also being modified by replace-predefined-entities.xsl, which actually shouldn't -->
-
-
-<xsl:template match="text()">
-  <xsl:call-template name="search-and-replace">
-    <xsl:with-param name="string" select="."/>
-  </xsl:call-template>
-</xsl:template>
-
-
-
-<xsl:template match="node()|@*" priority="-1">
-  <xsl:copy>
-    <xsl:apply-templates select="node()|@*"/>
-  </xsl:copy>
-</xsl:template>
-
-
-
-
-<xsl:template name="search-and-replace">
-<xsl:param name="string"/>
-
-<xsl:choose>
-<xsl:when test="contains($string, '&lt;')">
-  <xsl:call-template name="search-and-replace"><xsl:with-param name="string" select="substring-before($string, '&lt;')"/></xsl:call-template>&amp;lt;<xsl:call-template name="search-and-replace"><xsl:with-param name="string" select="substring-after($string, '&lt;')"/></xsl:call-template>
-</xsl:when>
-<xsl:when test="contains($string, '&gt;')">
-  <xsl:call-template name="search-and-replace"><xsl:with-param name="string" select="substring-before($string, '&gt;')"/></xsl:call-template>&amp;gt;<xsl:call-template name="search-and-replace"><xsl:with-param name="string" select="substring-after($string, '&gt;')"/></xsl:call-template>
-</xsl:when>
-<xsl:when test="contains($string, '&amp;')">
-  <xsl:call-template name="search-and-replace"><xsl:with-param name="string" select="substring-before($string, '&amp;')"/></xsl:call-template>&amp;amp;<xsl:call-template name="search-and-replace"><xsl:with-param name="string" select="substring-after($string, '&amp;')"/></xsl:call-template>
-</xsl:when>
-<!-- FIXME: &quot; and &apos; -->
-<xsl:otherwise>
-  <xsl:value-of select="$string"/>
-</xsl:otherwise>
-</xsl:choose>
-</xsl:template> 
-
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/xslt/authoring/edit/xopus-xhtml.xsl b/src/webapp/lenya/xslt/authoring/edit/xopus-xhtml.xsl
deleted file mode 100644
index b5b58e1..0000000
--- a/src/webapp/lenya/xslt/authoring/edit/xopus-xhtml.xsl
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: xopus-xhtml.xsl,v 1.7 2004/07/20 13:51:13 edith Exp $ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
->
-
-<xsl:param name="documentType"/>
-<xsl:param name="documentId"/>
-<xsl:param name="documentUrl"/>
-<xsl:param name="publicationId"/>
-<xsl:param name="completeArea"/>
-<xsl:param name="contextPrefix"/>
-<xsl:param name="xopusContext"/>
-
-
-<xsl:variable name="lenyaContext" select="concat($contextPrefix, '/', $publicationId, '/', $completeArea)"/>
-<xsl:variable name="lenyaDocumentUrl" select="concat($lenyaContext, $documentUrl)"/>
-
-<xsl:template match="/*">
-<html>
-  <head>
-    <title>Load Xopus ...</title>
-    <script language="JavaScript" src="/{$xopusContext}/xopus/xopus.js"/>
-  </head>
-  <body bgcolor="#FFFFFF">
-    <div xopus="true" autostart="true">
-      ...Xopus hasn't started yet...
-      <xml>
-        <pipeline
-            xml="{$lenyaDocumentUrl}?lenya.usecase=xopus&amp;lenya.step=xml"
-            xsd="{$lenyaDocumentUrl}?lenya.usecase=xopus&amp;lenya.step=xsd&amp;doctype={$documentType}">
-            
-          <view id="defaultView" default="true">
-            <transform xsl="/{$xopusContext}/xopusPlugins/preparexinclude.xsl"/>
-            <resolveXIncludes/>
-            <transform xsl="{$lenyaDocumentUrl}?lenya.usecase=xopus&amp;lenya.step=xslt&amp;doctype={$documentType}">
-              <param name="contextprefix"><xsl:value-of select="$contextPrefix"/></param>
-              <param name="publicationid"><xsl:value-of select="$publicationId"/></param>
-              <param name="completearea"><xsl:value-of select="$completeArea"/></param>
-	      <param name="documentid"><xsl:value-of select="$documentId"/></param>
-            </transform>
-          </view>
-          
-          <!--
-          <view id="step1">
-            <transform xsl="/{$xopusContext}/xopusPlugins/preparexinclude.xsl"/>
-            <transform xsl="/{$xopusContext}/xopus/media/treeview/tree.xsl"></transform>
-          </view>
-          <view id="step2">
-            <transform xsl="/{$xopusContext}/xopusPlugins/preparexinclude.xsl"/>
-            <resolveXIncludes/>
-            <transform xsl="/{$xopusContext}/xopus/media/treeview/tree.xsl"></transform>
-          </view>
-          -->
-          
-          <view id="treeView">
-            <transform xsl="/{$xopusContext}/xopus/media/treeview/tree.xsl"></transform>
-          </view>
-        </pipeline>
-      </xml>
-    </div>
-  </body>
-</html>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/xslt/bxe/aggregate.xsl b/src/webapp/lenya/xslt/bxe/aggregate.xsl
deleted file mode 100644
index e2d546a..0000000
--- a/src/webapp/lenya/xslt/bxe/aggregate.xsl
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:xhtml="http://www.w3.org/1999/xhtml"
->
-
-<xsl:template match="/">
-<xsl:apply-templates select="bxe"/>
-</xsl:template>
-
-<xsl:template match="bxe">
-<html>
-<xsl:apply-templates select="xhtml:html/xhtml:head"/>
-<xsl:copy-of select="xhtml:html/xhtml:body"/>
-</html>
-</xsl:template>
-
-<xsl:template match="xhtml:head">
-<xhtml:head>
-<xsl:for-each select="/bxe/namespaces/xmlns">
-  <meta name="bxeNS" content="{.}"/>
-</xsl:for-each>
-<xsl:copy-of select="@*|node()"/>
-</xhtml:head>
-</xsl:template>
- 
-</xsl:stylesheet>  
diff --git a/src/webapp/lenya/xslt/bxe/asset.xsl b/src/webapp/lenya/xslt/bxe/asset.xsl
deleted file mode 100644
index 70dae42..0000000
--- a/src/webapp/lenya/xslt/bxe/asset.xsl
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-    xmlns:lenya-info="http://apache.org/cocoon/lenya/info/1.0"
-    xmlns:wf="http://apache.org/cocoon/lenya/workflow/1.0"
-    xmlns:rc="http://apache.org/cocoon/lenya/rc/1.0"
-    xmlns:dc="http://purl.org/dc/elements/1.1/"
-    xmlns="http://www.w3.org/1999/xhtml"
-    xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-    xmlns:usecase="http://apache.org/cocoon/lenya/usecase/1.0"
-    exclude-result-prefixes="lenya-info wf rc dc usecase page i18n"
-    >
-    
-<xsl:import href="../authoring/asset-upload.xsl"/>
-
-<xsl:param name="contextprefix"/>
-
-<xsl:template name="pre-body">
-  <script type="text/javascript" src="{$contextprefix}/lenya/javascript/validation.js">&#160;</script>
-  <script type="text/javascript" src="{$contextprefix}/lenya/javascript/asset.js">&#160;</script>
-  <script>
-    var ext = '<xsl:value-of select="$extensions"/>';
-
-    function insertAsset(src, size, title) {    
-      <![CDATA[
-      window.opener.bxe_insertContent('<asset xmlns="http://apache.org/cocoon/lenya/page-envelope/1.0" src="'+src+'" size="'+size+'" type="">'+title+'</asset>',window.opener.BXE_SELECTION,window.opener.BXE_SPLIT_IF_INLINE);
-      ]]>
-      window.close();
-    }
-    
-  </script>
-</xsl:template>
-
-
-<xsl:template name="library-buttons">
-  <input i18n:attr="value" type="submit"
-         onClick="insertAsset(document.getElementById('assetSource').value,
-                              document.getElementById('assetExtent').value,
-                              document.getElementById('assetTitle').value);" value="Submit"/>&#160;
-  <input i18n:attr="value" type="button" onClick="location.href='javascript:window.close();';" value="Cancel"/>
-</xsl:template>
-
-
-</xsl:stylesheet>  
diff --git a/src/webapp/lenya/xslt/bxe/change-object-path-back.xsl b/src/webapp/lenya/xslt/bxe/change-object-path-back.xsl
deleted file mode 100644
index 995cb25..0000000
--- a/src/webapp/lenya/xslt/bxe/change-object-path-back.xsl
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0"
-    xmlns:xhtml="http://www.w3.org/1999/xhtml"
-    >
-
-  <xsl:template match="xhtml:object/@data[not(starts-with(., '/'))]">
-    <xsl:variable name="url">
-      <xsl:value-of select="." />
-    </xsl:variable>
-    <xsl:attribute name="data">
-      <xsl:value-of select="substring-after($url, '/')" />
-    </xsl:attribute>
-  </xsl:template>
-  
-  <xsl:template match="@*|node()">
-    <xsl:copy>
-      <xsl:apply-templates select="@*|node()" />
-    </xsl:copy>
-  </xsl:template>
-  
-</xsl:stylesheet>
-
diff --git a/src/webapp/lenya/xslt/bxe/change-object-path.xsl b/src/webapp/lenya/xslt/bxe/change-object-path.xsl
deleted file mode 100644
index 954d1f4..0000000
--- a/src/webapp/lenya/xslt/bxe/change-object-path.xsl
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-    
-<xsl:stylesheet version="1.0"
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0"
-    xmlns:xhtml="http://www.w3.org/1999/xhtml"
-    >
-  <xsl:param name="documentid" />
-  
-  
-  <xsl:variable name="nodeid">
-    <xsl:call-template name="getnodeid">
-      <xsl:with-param name="url" select="$documentid"/>
-    </xsl:call-template>
-  </xsl:variable>
-  
-  
-  <xsl:template match="xhtml:object/@data[not(starts-with(., '/'))]">
-    <xsl:attribute name="data">
-      <xsl:value-of select="concat($nodeid, '/', .)" />
-    </xsl:attribute>
-  </xsl:template>
-  
-  
-  <xsl:template match="@*|node()">
-    <xsl:copy>
-      <xsl:apply-templates select="@*|node()" />
-    </xsl:copy>
-  </xsl:template>
-  
-  
-  <xsl:template name="getnodeid">
-    <xsl:param name="url" />
-    <xsl:variable name="slash">/</xsl:variable>
-    <xsl:choose>
-      <xsl:when test="contains($url, $slash)">
-        <xsl:call-template name="getnodeid">
-          <xsl:with-param name="url" select="substring-after($url, $slash)" />
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$url" />
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-  
-  
-</xsl:stylesheet>
-
diff --git a/src/webapp/lenya/xslt/bxe/config-xml.xsl b/src/webapp/lenya/xslt/bxe/config-xml.xsl
deleted file mode 100644
index 2a0c43e..0000000
--- a/src/webapp/lenya/xslt/bxe/config-xml.xsl
+++ /dev/null
@@ -1,98 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: config-xml.xsl,v 1.9 2004/04/29 08:14:57 gregor Exp $ -->
-
-<xsl:stylesheet version="1.0" 
-  xmlns:cinclude="http://apache.org/cocoon/include/1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-<xsl:param name="BX_xmlfile"/>
-<xsl:param name="BX_xhtmlfile"/>
-<xsl:param name="BX_xslfile"/>
-<xsl:param name="BX_validationfile"/>
-<xsl:param name="css"/>
-<xsl:param name="script"/>
-<xsl:param name="callbackscript"/>
-<xsl:param name="BX_exitdestination"/>
-<xsl:param name="contextmenufile"/>
-<xsl:param name="defaultlanguage"/>
-
-<xsl:template match="/config">
-  <xsl:copy>
-    <xsl:apply-templates select="@* | node()"/>
-
-  <cinclude:include src="{$contextmenufile}"/>
-  </xsl:copy>
-</xsl:template>
-
-<xsl:template match="files/input/file[@name = 'BX_xmlfile']">
-  <file name="BX_xmlfile"><xsl:value-of select="$BX_xmlfile"/></file>
-</xsl:template>
-
-<xsl:template match="files/input/file[@name = 'BX_xhtmlfile']">
-  <xsl:if test="$BX_xhtmlfile">
-    <file name="BX_xhtmlfile"><xsl:value-of select="$BX_xhtmlfile"/></file>
-  </xsl:if>
-
-</xsl:template>
-
-<xsl:template match="files/input/file[@name = 'BX_xslfile']">
-  <xsl:if test="$BX_xslfile">
-    <file name="BX_xslfile"><xsl:value-of select="$BX_xslfile"/></file>
-  </xsl:if>
-</xsl:template>
-
-<xsl:template match="files/input/file[@name = 'BX_validationfile']">
-  <xsl:if test="$BX_validationfile">
-    <file name="BX_validationfile"><xsl:value-of select="$BX_validationfile"/></file>
-  </xsl:if>
-
-</xsl:template>
-
-<xsl:template match="files/output/file[@name = 'BX_exitdestination']">
-  <file name="BX_exitdestination"><xsl:value-of select="$BX_exitdestination"/></file>
-</xsl:template>
-
-<xsl:template match="files/css/file">
-  <file><xsl:value-of select="$css"/></file>
-</xsl:template>
-
-  <xsl:template match="files/scripts/file[position()=last()]">
-    <file><xsl:value-of select="."/></file>
-    <xsl:if test="$script">
-      <file><xsl:value-of select="$script"/></file>
-    </xsl:if>
-    <xsl:if test="$callbackscript">
-      <file><xsl:value-of select="$callbackscript"/></file>
-    </xsl:if>
-  </xsl:template>
-
-<!-- pass default language to link screen for sitetree display -->  
-<xsl:template match="callbacks/element[@name = 'a']/text()">
-  <xsl:value-of select="."/>&amp;language=<xsl:value-of select="$defaultlanguage"/>
-</xsl:template>
-  
-
-<xsl:template match="@*|node()">
-  <xsl:copy>
-    <xsl:apply-templates select="@*|node()"/>
-
-  </xsl:copy>
-</xsl:template>
-   
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/src/webapp/lenya/xslt/bxe/image.xsl b/src/webapp/lenya/xslt/bxe/image.xsl
deleted file mode 100644
index 6d2cd6f..0000000
--- a/src/webapp/lenya/xslt/bxe/image.xsl
+++ /dev/null
@@ -1,246 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
-    xmlns:lenya-info="http://apache.org/cocoon/lenya/info/1.0" 
-    xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-    xmlns:wf="http://apache.org/cocoon/lenya/workflow/1.0" 
-    xmlns:rc="http://apache.org/cocoon/lenya/rc/1.0" 
-    xmlns:dc="http://purl.org/dc/elements/1.1/" 
-    xmlns="http://www.w3.org/1999/xhtml" 
-    xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" 
-    xmlns:usecase="http://apache.org/cocoon/lenya/usecase/1.0" 
-    xmlns:xhtml="http://www.w3.org/1999/xhtml" >
-    <xsl:param name="lenya.usecase" select="'asset'"/>
-    <xsl:param name="lenya.step"/>
-    <xsl:variable name="noimages"/>
-    <xsl:param name="error"/>
-
-    <xsl:param name="extensions" select="'gif jpg png swf'"/>
-    <xsl:param name="contextprefix"/>
-
-    <xsl:template match="lenya-info:assets">
-        <page:page>
-            <page:title>
-              <i18n:text key="lenya.imageupload.title"/>
-            </page:title>
-            <page:body >
-                <script type="text/javascript" src="{$contextprefix}/lenya/javascript/validation.js">&#160;</script>
-                <script type="text/javascript" src="{$contextprefix}/lenya/javascript/asset.js">&#160;</script>
-                <script> 
-                   window.onload = insertCaption
-                   
-                   ext = '<xsl:value-of select="$extensions"/>';
-                   
-                   function insertImage(src, type) { 
-                      var nodeid = '<xsl:value-of select="lenya-info:documentnodeid"/>/';
-                      var link = document.forms['image'].link.value;
-                      var caption = document.forms['image'].caption.value;
-                      var title = document.forms['image'].title.value;
-                      <![CDATA[
-                      var content = '<object xmlns="'+window.opener.XHTMLNS+'" href="'+link+'" title="'+title+'" type="'+type+'" data="'+nodeid + src+'">'+caption+'</object>'; 
-                      ]]>
-                      window.opener.bxe_insertContent(content,window.opener.bxe_ContextNode); 
-                      window.close();
-                   }
-
-                   function insertCaption() { 
-                    var selectionContent = window.opener.getSelection().getEditableRange().toString(); 
-                    if (selectionContent.length != 0) { 
-                      document.forms['image'].caption.value = selectionContent;
-                    } 
-                    focus(); 
-                  } 
-                </script>
-                <div class="lenya-box">
-                    <div class="lenya-box-title"><i18n:text key="lenya.assetupload.subtitle"/></div>
-                    <form name="fileinput" 
-                        action="" 
-                        method="post" enctype="multipart/form-data" 
-                        onsubmit="return check_upload(fileinput, ext)">
-                        <input type="hidden" name="lenya.usecase" 
-                            value="{$lenya.usecase}"/>
-                        <input type="hidden" name="lenya.step" 
-                            value="image-upload"/>
-                        <input type="hidden" name="uploadtype" value="asset"/>
-                        <input type="hidden" name="properties.asset.date" value="{/lenya-info:info/lenya-info:assets/lenya-info:date}"/>
-                        <table class="lenya-table-noborder">
-                            <xsl:if test="$error = 'true'">
-                                <tr>
-                                    <td colspan="2" class="lenya-form-caption">
-                                        <span class="lenya-form-message-error">
-                                          <i18n:text key="filename-format-exception"/>
-                                        </span>
-                                    </td>
-                                </tr>
-                            </xsl:if>
-                            <tr>
-                                <td class="lenya-form-caption"><i18n:text key="lenya.imageupload.selectimage.label"/>:</td>
-                                <td><input class="lenya-form-element" 
-                                    type="file" name="properties.asset.data" onchange="imagepreview(this)" 
-                                    id="data"/><br/>(<i18n:text>No whitespace, no special characters</i18n:text>)</td>
-                            </tr>
-                            <tr>
-                                <td class="lenya-form-caption"><i18n:text>Title</i18n:text>*:</td>
-                                <td>
-                                    <input class="lenya-form-element" 
-                                        type="text" 
-                                        name="properties.asset.title"/>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="lenya-form-caption"><i18n:text>Creator</i18n:text>:</td>
-                                <td>
-                                    <input class="lenya-form-element" 
-                                        type="text" 
-                                        name="properties.asset.creator" 
-                                        value="{/lenya-info:info/lenya-info:assets/lenya-info:creator}"/>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="lenya-form-caption"><i18n:text>Rights</i18n:text>:</td>
-                                <td>
-                                    <input class="lenya-form-element" 
-                                        i18n:attr="value"
-                                        type="text" 
-                                        name="properties.asset.rights"
-                                        value="All rights reserved"/>
-                                </td>
-                            </tr>
-                          <tr>
-                            <td class="lenya-form-caption"><i18n:text>Preview</i18n:text>:</td><td><img src="" id="preview" style="visibility: hidden; height: 100px;"/></td>
-                          </tr>
-                            <tr>
-                                <td>&#160;</td>
-                            </tr>
-                            <tr>
-                                <td/>
-                                <td> <input type="submit" 
-                                    i18n:attr="value"
-                                    value="Add"/>&#160; <input type="button" 
-                                    i18n:attr="value"
-                                    onClick="location.href='javascript:window.close();';" 
-                                    value="Cancel"/> </td>
-                            </tr>
-                        </table>
-                    </form>
-                </div>
-                <div class="lenya-box">
-                    <div class="lenya-box-title"><i18n:text>Asset Library</i18n:text></div>
-                    <form id="image">
-                        <table class="lenya-table-noborder">
-                            <xsl:choose>
-                                <xsl:when test="not(lenya-info:asset)">
-                                    <tr>
-                                        <td colspan="5" 
-                                            class="lenya-form-caption">
-                                            <xsl:value-of select="dc:title"/><i18n:text key="lenya.imageupload.info.noimages"/></td>
-                                    </tr>
-                                </xsl:when>
-                                <xsl:otherwise>
-                                    <xsl:for-each select="lenya-info:asset">
-                                        <xsl:choose>
-                                            <xsl:when 
-                                                test="dc:format = 'image/jpeg' or dc:format = 'image/gif' or  dc:format = 'image/png' or dc:format = 'application/x-shockwave-flash'">
-                                                <tr>
-                                                    <td>
-                                                        <img src="{../lenya-info:documentnodeid}/{dc:source}"        
-                                                          onclick="javascript:insertImage('{dc:source}', '{dc:format}');"
-                                                          style="cursor: pointer; height: 32px; vertical-align: middle;"/>
-                                                    </td>
-                                                    <td 
-                                                        colspan="2">
-                                                        <xsl:value-of 
-                                                            select="dc:title"/>
-                                                    </td>
-                                                    <td>
-                                                         <xsl:value-of 
-                                                        select="dc:extent"/> 
-                                                        kB</td>
-                                                    <td>
-                                                        <xsl:value-of select="dc:date"/>
-                                                    </td>
-                                                </tr>
-                                                <xsl:variable name="noimages">
-                                                    false</xsl:variable>
-                                            </xsl:when>
-                                            <xsl:otherwise>
-                                                <xsl:variable name="noimages">
-                                                    true</xsl:variable>
-                                            </xsl:otherwise>
-                                        </xsl:choose>
-                                    </xsl:for-each>
-                                    <xsl:choose>
-                                        <xsl:when test="$noimages = 'true'">
-                                            <tr>
-                                                <td colspan="5" 
-                                                    class="lenya-form-caption"> 
-                                                    <xsl:value-of 
-                                                    select="dc:title"/><i18n:text key="lenya.imageupload.info.noimages"/></td>
-                                            </tr>
-                                        </xsl:when>
-                                        <xsl:otherwise>
-                                            <tr>
-                                                <td class="lenya-form-caption" 
-                                                    colspan="5">&#160;</td>
-                                            </tr>
-                                            <tr>
-                                                <td class="lenya-form-caption"> 
-                                                    <i18n:text>Title</i18n:text>:</td>
-                                                <td colspan="4" 
-                                                    class="lenya-form-caption">
-                                                    <input 
-                                                        class="lenya-form-element" 
-                                                        type="text" 
-                                                        name="title"/>
-                                                </td>
-                                            </tr>
-                                            <tr>
-                                                <td class="lenya-form-caption"> 
-                                                    <i18n:text>Caption</i18n:text>:</td>
-                                                <td colspan="4" 
-                                                    class="lenya-form-caption">
-                                                    <input 
-                                                        class="lenya-form-element" 
-                                                        type="text" 
-                                                        name="caption" 
-                                                        />
-                                                </td>
-                                            </tr>
-                                            <tr>
-                                                <td class="lenya-form-caption"> 
-                                                    <i18n:text>Link</i18n:text>:</td>
-                                                <td colspan="4" 
-                                                    class="lenya-form-caption"> 
-                                                    <input 
-                                                    class="lenya-form-element" 
-                                                    type="text" 
-                                                    name="link"/><br/><i18n:text key="lenya.imageupload.links.hint"/></td>
-                                            </tr>
-                                        </xsl:otherwise>
-                                    </xsl:choose>
-                                </xsl:otherwise>
-                            </xsl:choose>
-                        </table>
-                    </form>
-                </div>
-            </page:body>
-        </page:page>
-    </xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/src/webapp/lenya/xslt/bxe/index-xhtml.xsl b/src/webapp/lenya/xslt/bxe/index-xhtml.xsl
deleted file mode 100644
index ac09c1a..0000000
--- a/src/webapp/lenya/xslt/bxe/index-xhtml.xsl
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:xhtml="http://www.w3.org/1999/xhtml"
->
-
-<xsl:param name="configfile"/>
-<xsl:param name="context"/>
-
-<xsl:template match="xhtml:head/xhtml:title">
-  <title><xsl:value-of select="$configfile"/></title>
-</xsl:template>
-
-<xsl:template match="xhtml:body/@onload">
-  <xsl:attribute name="onload">bxe_start('<xsl:value-of select="$configfile"/>')</xsl:attribute>
-</xsl:template>
-
-<xsl:template match="xhtml:head/xhtml:link/@href">
-  <xsl:attribute name="href"><xsl:value-of select="$context"/>/bxe/css/editor.css</xsl:attribute>
-</xsl:template>
-
-<xsl:template match="xhtml:head/xhtml:script/@src">
-  <xsl:attribute name="src"><xsl:value-of select="$context"/>/bxe/bxeLoader.js</xsl:attribute>
-</xsl:template>
-
-<xsl:template match="@*|node()">
-  <xsl:copy>
-    <xsl:apply-templates select="@*|node()"/>
-  </xsl:copy>
-</xsl:template>
-   
-</xsl:stylesheet> 
diff --git a/src/webapp/lenya/xslt/bxe/link.xsl b/src/webapp/lenya/xslt/bxe/link.xsl
deleted file mode 100644
index 176e9e1..0000000
--- a/src/webapp/lenya/xslt/bxe/link.xsl
+++ /dev/null
@@ -1,233 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!--
- $Id$
- -->
-
-<xsl:stylesheet version="1.0"
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns="http://www.w3.org/1999/xhtml"
-	xmlns:xhtml="http://www.w3.org/1999/xhtml"
-    xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-    xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-    xmlns:usecase="http://apache.org/cocoon/lenya/usecase/1.0"     
-    >
-
-<xsl:param name="contextprefix"/>
-<xsl:param name="publicationid"/>
-<xsl:param name="area"/>
-<xsl:param name="tab"/>
-<xsl:param name="documentid"/>
-<xsl:param name="documentextension"/>
-<xsl:param name="documenturl"/>
-<xsl:param name="languages"/>
-<xsl:param name="chosenlanguage"/>
-<xsl:param name="defaultlanguage"/>
-
-<xsl:variable name="extension"><xsl:if test="$documentextension != ''">.</xsl:if><xsl:value-of select="$documentextension"/></xsl:variable>
-  
-<!-- Decide whether to load the sitetree incrementally. 
-     true:  The sitetree.js will only contain the root node of the tree.  
-            All other nodes will be loaded dynamically by tree.js when needed.
-            Useful for large trees.
-     false: The sitetree.js will contain the whole sitetree structure and tree.js 
-            won't load anything dynamically. Useful for small trees or for browsers
-            which don't support xmlhttp requests. 
--->
-  <xsl:variable name="incremental-loading" select="'true'"/>
-    
-<xsl:template match="/">
-    <page:page>
-      <page:title>Insert Link</page:title>
-      <page:body>
-      <script type="text/javascript" src="{$contextprefix}/{$publicationid}/{$area}/info-sitetree/ua.js">&#160;</script>
-      <script type="text/javascript" src="{$contextprefix}/{$publicationid}/{$area}/info-sitetree/tree.js">&#160;</script>
-      <script type="text/javascript" src="{$contextprefix}/{$publicationid}/{$area}/{$documenturl}?lenya.usecase=bxe&amp;lenya.step=link-tree&amp;language={$chosenlanguage}&amp;incremental={$incremental-loading}">&#160;</script>
-      <script> 
-          var url;
-          window.onload = insertText
-
-          function insertText() { 
-            var selectionContent = window.opener.getSelection().getEditableRange().toString(); 
-            if (selectionContent.length != 0) { 
-                document.forms["link"].text.value = selectionContent;
-            } 
-            focus(); 
-          } 
-
-          function setLink(src) { 
-            url = src;
-            document.forms["link"].url.value = url;
-          }
-          
-          <!-- override the makeHref function -->
-          var makeHref = function makeSetLinkHref(area, link)
-          {
-            var temp = 'javascript:setLink(\'/'+link+'\')';
-            return temp;
-          }
-          
-          function insertLink() { 
-          var text = document.forms["link"].text.value;
-          var title = document.forms["link"].title.value;
-          var prefix ='<xsl:value-of select="$contextprefix"/>' + '/<xsl:value-of select="$publicationid"/>' + '/<xsl:value-of select="$area"/>';
-          var url = document.forms["link"].url.value;
-          if (url.charAt(0) == "/") {
-           // prepend hostname etc for internal links
-           url = prefix + url;
-          }
-          <![CDATA[
-          var content = '<a xmlns="'+window.opener.XHTMLNS+'" href="'+url+'" title="'+title+'">'+text+'</a>'; 
-          ]]>
-          window.opener.bxe_insertContent(content,window.opener.bxe_ContextNode); 
-          window.close();
-          }
-      </script>
-    <table border="0" cellpadding="0" cellspacing="0" width="100%">
-<tr>
-<td valign="top" width="20%">
-    <div id="lenya-info-treecanvas">
-<!-- Build the tree. -->
-	<table border="0" cellpadding="0" cellspacing="0">
-                <tr>
-                      <xsl:call-template name="languagetabs">
-                        <xsl:with-param name="tablanguages">
-                          <xsl:value-of select="$languages"/>
-                        </xsl:with-param>
-                      </xsl:call-template>
-                </tr>
-        </table>
-
-   <div id="lenya-info-tree">
-      <div style="display:none;">
-              <table border="0">
-                      <tr>
-                              <td>
-                                      <a style="font-size:7pt;text-decoration:none;color:white" href="http://www.treemenu.net/">JavaScript Tree Menu</a>
-                              </td>
-                      </tr>
-              </table>
-      </div>
-      <script type="text/javascript">
-         initializeDocument('authoring', '/');
-      </script>
-    </div>
-</div>
-</td>
-<td>
- <form action="" name="link" onsubmit="insertLink()">
-                        <table class="lenya-table-noborder">
-                                <tr>
-                                <td colspan="2" class="lenya-form-caption">You can either click on a node in the tree for an internal link or enter a link in the URL field. </td>
-                                </tr>
-                            <tr>
-                                <td colspan="2">&#160;</td>
-                            </tr>
-                                <tr>
-                                <td class="lenya-form-caption">URL:</td>
-                                <td>
-                                    <input class="lenya-form-element" 
-                                        type="text" 
-                                        name="url"/>
-                                </td>
-                            </tr>
-                                 <tr>
-                                <td class="lenya-form-caption">Title:</td>
-                                <td>
-                                    <input class="lenya-form-element" 
-                                        type="text" 
-                                        name="title"/>
-                                </td>
-                            </tr>
-                                 <tr>
-                                <td class="lenya-form-caption">Link text:</td>
-                                <td>
-                                    <input class="lenya-form-element" 
-                                        type="text" 
-                                        name="text"/>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td colspan="2">&#160;</td>
-                            </tr>
-                            <tr>
-                                <td/>
-                                <td> <input type="submit" 
-                                    value="Insert"/>
-                                </td>
-                            </tr>
-                        </table>
- </form>   
-</td>
-</tr></table>
-      </page:body>
-    </page:page>
-</xsl:template>
-
-
-<xsl:template name="selecttab">
-  <xsl:text>?lenya.usecase=</xsl:text>
-  <xsl:choose>
-    <xsl:when test="$tab"><xsl:value-of select="$tab"/></xsl:when>
-    <xsl:otherwise>bxe</xsl:otherwise>
-  </xsl:choose>
-  <xsl:text>&amp;lenya.step=link-show</xsl:text>
-</xsl:template>
-
-
-<xsl:template name="languagetabs">
-  <xsl:param name="tablanguages"/>
-  <xsl:choose>
-    <xsl:when test="not(contains($tablanguages,','))">
-      <xsl:call-template name="languagetab">
-        <xsl:with-param name="tablanguage">
-          <xsl:value-of select="$tablanguages"/>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:variable name="head" select="substring-before($tablanguages,',')" />
-      <xsl:variable name="tail" select="substring-after($tablanguages,',')" />
-      <xsl:call-template name="languagetab">
-        <xsl:with-param name="tablanguage" select="$head"/>
-      </xsl:call-template>
-      <xsl:call-template name="languagetabs">
-        <xsl:with-param name="tablanguages" select="$tail"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-
-<xsl:template name="languagetab">
-  <xsl:param name="tablanguage"/>
-  <td><a id="{$tablanguage}">
-      <xsl:call-template name="activate">
-        <xsl:with-param name="tablanguage" select="$tablanguage"/>
-      </xsl:call-template>
-    </a></td>
-</xsl:template>
-
-
-<xsl:template name="activate">
-  <xsl:param name="tablanguage"/>
-  <xsl:attribute name="href"><xsl:value-of select="$contextprefix"/>/<xsl:value-of select="$publicationid"/>/<xsl:value-of select="$area"/><xsl:value-of select="$documentid"/>_<xsl:value-of select="$tablanguage"/><xsl:value-of select="$extension"/>?lenya.usecase=bxe&amp;lenya.step=link-show</xsl:attribute>
-  <xsl:attribute name="class">lenya-tablink<xsl:choose><xsl:when test="$chosenlanguage = $tablanguage">-active</xsl:when><xsl:otherwise/></xsl:choose></xsl:attribute><xsl:value-of select="$tablanguage"/>
-</xsl:template>
-
-</xsl:stylesheet> 
\ No newline at end of file
diff --git a/src/webapp/lenya/xslt/bxe/sitetree2tree.xsl b/src/webapp/lenya/xslt/bxe/sitetree2tree.xsl
deleted file mode 100644
index fc76224..0000000
--- a/src/webapp/lenya/xslt/bxe/sitetree2tree.xsl
+++ /dev/null
@@ -1,206 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<!--
-        Converts a sitetree into a javascript array suitable for the tree widget.
--->
-
-<xsl:stylesheet version="1.0"
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:s="http://apache.org/cocoon/lenya/navigation/1.0">
-
-<xsl:import href="../util/string-functions.xsl"/>
-
-<xsl:output omit-xml-declaration="yes"/>    
-
-<xsl:param name="contextprefix"/>
-<xsl:param name="publicationid"/>
-<xsl:param name="chosenlanguage"/>
-<xsl:param name="defaultlanguage"/>
-<xsl:param name="cutdocumentid"/>
-<xsl:param name="incremental"/>
-<xsl:param name="areas"/>
-   
-<xsl:template match="/">
-    <xsl:param name="parentPath"/>
-// You can find instructions for this file at http://www.treeview.net
-
-//Environment variables are usually set at the top of this file.
-USETEXTLINKS = 1
-STARTALLOPEN = 0
-USEFRAMES = 0
-USEICONS = 0
-WRAPTEXT = 1
-PRESERVESTATE = 1
-HIGHLIGHT = 1
-HIGHLIGHT_BG = "#DDDCCF"
-HIGHLIGHT_COLOR = "#666666"
-CONTEXT_PREFIX = "<xsl:value-of select="$contextprefix"/>";
-PUBLICATION_ID = "<xsl:value-of select="$publicationid"/>";
-CHOSEN_LANGUAGE = "<xsl:value-of select="$chosenlanguage"/>";
-DEFAULT_LANGUAGE = "<xsl:value-of select="$defaultlanguage"/>";
-CUT_DOCUMENT_ID = "<xsl:value-of select="$cutdocumentid"/>";
-ALL_AREAS = "<xsl:value-of select="$areas"/>"
-PIPELINE_PATH = '/authoring/info-sitetree/sitetree-fragment.xml'
-<xsl:choose>
-  <xsl:when test="$incremental='true'">
-INCREMENTAL_LOADING = true;
-  </xsl:when>
-  <xsl:otherwise>
-INCREMENTAL_LOADING = false;
-  </xsl:otherwise>
-</xsl:choose>
-
-<!-- incremental loading does not work with the preserve state mechanism (cookies) -->
-if (INCREMENTAL_LOADING) PRESERVESTATE=0;
-
-foldersTree = gFld("&lt;strong&gt;<xsl:value-of select="$publicationid"/>&lt;/strong&gt;")
-
-  <xsl:if test="$incremental!='true'">
-    <xsl:apply-templates select="lenya/s:site"/>
-  </xsl:if>
-
-//Set this string if Treeview and other configuration files may also be loaded in the same session
-foldersTree.treeID = "t2"
-</xsl:template>
-
-<xsl:template match="s:site">
-  <xsl:param name="parentPath"/>
-  <xsl:variable name="suffix">
-  	<xsl:if test="not($chosenlanguage = $defaultlanguage)">_<xsl:value-of select="$chosenlanguage"/></xsl:if>
-  </xsl:variable>
-  
-  <xsl:variable name="link">
-      <xsl:text>, 'javascript:setLink(\'</xsl:text>
-      <xsl:value-of select="concat('/', $suffix)"/>
-      <xsl:text>\')'</xsl:text>
-  </xsl:variable>
-  
-  <xsl:variable name="protected-pre"><xsl:if test="@protected = 'true'">&lt;span class=\"lenya-info-protected\"&gt;</xsl:if></xsl:variable>
-  <xsl:variable name="protected-post"><xsl:if test="@protected = 'true'">&lt;/span&gt;</xsl:if></xsl:variable>
-  
-  <xsl:variable name="pre" select="$protected-pre"/>
-  <xsl:variable name="post" select="$protected-post"/>
-  
-  <xsl:choose>
-  	<xsl:when test="descendant::s:node"><xsl:value-of select="generate-id(.)"/> = insFld(foldersTree, gFld("&#160;<xsl:value-of select="$pre"/><xsl:value-of select="@label"/><xsl:value-of select="$post"/>&#160;" <xsl:value-of select="$link"/>))</xsl:when>
-    <xsl:otherwise>insDoc(foldersTree, gLnk("S", "&#160;<xsl:value-of select="$pre"/><xsl:value-of select="@label"/><xsl:value-of select="$post"/>&#160;" <xsl:value-of select="$link"/>))</xsl:otherwise>
-  </xsl:choose>
-  <xsl:apply-templates>
-    <xsl:with-param name="parentPath"><xsl:value-of select="@id"/></xsl:with-param>
-  </xsl:apply-templates>   
-</xsl:template>
-
-<xsl:template match="s:node">
-  <xsl:param name="parentPath"/>
-  <xsl:variable name="tree-area" select="ancestor::s:site/@area"/>
-  <xsl:variable name="link">
-    <xsl:if test="not(@protected = 'true')">
-      <xsl:text>, 'javascript:setLink(\'</xsl:text>
-      <xsl:value-of select="concat('/', @basic-url, @language-suffix, @suffix)"/>
-      <xsl:text>\')'</xsl:text>
-    </xsl:if>
-  </xsl:variable>
-  <xsl:variable name="exists-language" select="s:label[lang($chosenlanguage)]"/>
-  
-  <xsl:variable name="protected-pre"><xsl:if test="@protected = 'true'">&lt;span class=\"lenya-info-protected\"&gt;</xsl:if></xsl:variable>
-  <xsl:variable name="protected-post"><xsl:if test="@protected = 'true'">&lt;/span&gt;</xsl:if></xsl:variable>
-  
-  <xsl:variable name="no-language-pre"><xsl:if test="not($exists-language)">&lt;span class=\"lenya-info-nolanguage\"&gt;</xsl:if></xsl:variable>
-  <xsl:variable name="no-language-post"><xsl:if test="not($exists-language)">&lt;/span&gt;</xsl:if></xsl:variable>
-  
-  <xsl:variable name="cut-pre"><xsl:if test="$cutdocumentid = concat('/', @basic-url)">&lt;span class='lenya-info-cut'&gt;[</xsl:if></xsl:variable>
-  <xsl:variable name="cut-post"><xsl:if test="$cutdocumentid = concat('/', @basic-url)">]&lt;/span&gt;</xsl:if></xsl:variable>
-  
-  <xsl:variable name="pre" select="concat($no-language-pre, $protected-pre, $cut-pre)"/>
-  <xsl:variable name="post" select="concat($cut-post, $protected-post, $no-language-post)"/>
-
-  <xsl:choose>
-  	<xsl:when test="descendant::s:node">
-  		<xsl:value-of select="generate-id(.)"/>
-  		= insFld(
-  			   <xsl:value-of select="generate-id(..)"/>,
-           gFld("&lt;span style=\"padding: 0px 5px;\"&gt;<xsl:value-of select="$pre"/><xsl:call-template name="getLabel"/><xsl:value-of select="$post"/>&lt;/span&gt;"
-           <xsl:value-of select="$link"/>)
-      );
-    </xsl:when>
-    <xsl:otherwise>
-    	insDoc(<xsl:value-of select="generate-id(..)"/>,
-    	       gLnk(
-    	           "S",
-    	           "&lt;span style=\"padding: 0px 5px;\"&gt;<xsl:value-of select="$pre"/><xsl:call-template name="getLabel"/>&lt;/span&gt;"
-    	           <xsl:value-of select="$link"/>)
-      );
-      </xsl:otherwise>
-  </xsl:choose>
-  <xsl:apply-templates>
-    <xsl:with-param name="parentPath"><xsl:value-of select="$parentPath"/>/<xsl:value-of select="@id"/></xsl:with-param>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template name="getLabel">
-  <xsl:choose>
-    <xsl:when test="s:label[lang($chosenlanguage)]">
-      <xsl:call-template name="escape-characters">
-        <xsl:with-param name="input" select="s:label[lang($chosenlanguage)]"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="s:label[lang($defaultlanguage)]">
-      <xsl:call-template name="escape-characters">
-        <xsl:with-param name="input" select="s:label[lang($defaultlanguage)]"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="escape-characters">
-        <xsl:with-param name="input" select="s:label"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>	
-</xsl:template>
-
-<xsl:template match="s:label"/>
-
-
-<xsl:template name="escape-characters">
-  <xsl:param name="input"/>
-  <xsl:variable name="escape-lt">
-    <xsl:call-template name="search-and-replace">
-      <xsl:with-param name="input" select="$input"/>
-      <xsl:with-param name="search-string">&lt;</xsl:with-param>
-      <xsl:with-param name="replace-string">&amp;lt;</xsl:with-param>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:variable name="escape-gt">
-    <xsl:call-template name="search-and-replace">
-      <xsl:with-param name="input" select="$escape-lt"/>
-      <xsl:with-param name="search-string">&gt;</xsl:with-param>
-      <xsl:with-param name="replace-string">&amp;gt;</xsl:with-param>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:variable name="escape-quot">
-    <xsl:call-template name="search-and-replace">
-      <xsl:with-param name="input" select="$escape-gt"/>
-      <xsl:with-param name="search-string">"</xsl:with-param>
-      <xsl:with-param name="replace-string">\"</xsl:with-param>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:value-of select="$escape-quot"/>
-</xsl:template>
-
-</xsl:stylesheet> 
diff --git a/src/webapp/lenya/xslt/exception/document-does-not-exist.xsl b/src/webapp/lenya/xslt/exception/document-does-not-exist.xsl
deleted file mode 100644
index 7f25b6e..0000000
--- a/src/webapp/lenya/xslt/exception/document-does-not-exist.xsl
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-  >
-  
-  <xsl:import href="../util/page-util.xsl"/>
-  
-  <xsl:param name="documentid"/>
-  <xsl:param name="documenturl"/>
-
-  <xsl:template match="/">
-    
-    <page:page>
-      <page:title><i18n:text>404: Page not found</i18n:text></page:title>
-      <page:body>
-	<div class="lenya-box">
-	  <div class="lenya-box-title"><i18n:text>The requested document does not exist</i18n:text></div>
-	  <div class="lenya-box-body">
-	    <p>
-      <i18n:translate>
-        <i18n:text i18n:key="error-document-existance" />
-        <i18n:param>'<xsl:value-of select="$documenturl"/>'</i18n:param>
-        <i18n:param>'<xsl:value-of select="$documentid"/>'</i18n:param>
-      </i18n:translate>
-	    </p>
-	  </div>
-	</div>
-      </page:body>
-    </page:page>
-  </xsl:template>
-  
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/xslt/exception/generic.xsl b/src/webapp/lenya/xslt/exception/generic.xsl
deleted file mode 100644
index b8f3da2..0000000
--- a/src/webapp/lenya/xslt/exception/generic.xsl
+++ /dev/null
@@ -1,109 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns:error="http://apache.org/cocoon/error/2.1"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
-  
-  <xsl:import href="../util/page-util.xsl"/>
-  
-  <xsl:param name="documentid"/>
-  <xsl:param name="documenturl"/>
-  <xsl:param name="contextPath"/>
-
-  <xsl:template match="error:notify">
-    
-    <page:page>
-      <page:title>Apache Lenya: <i18n:text i18n:key="error-generic" /></page:title>
-        <style>
-          h1 { color: #336699; text-align: left; margin: 0px 0px 30px 0px; padding: 0px; border-width: 0px 0px 1px 0px; border-style: solid; border-color: #336699;}
-          p.message { padding: 10px 30px 10px 30px; font-weight: bold; font-size: 130%; border-width: 1px; border-style: dashed; border-color: #336699; }
-          p.description { padding: 10px 30px 20px 30px; border-width: 0px 0px 1px 0px; border-style: solid; border-color: #336699;}
-          p.topped { padding-top: 10px; border-width: 1px 0px 0px 0px; border-style: solid; border-color: #336699; }
-          pre { font-size: 120%; }
-        </style>
-      <page:body>
-        <xsl:apply-templates select="." mode="onload"/>
-        <script>
-function toggle(id) {
-    var element = document.getElementById(id);
-    with (element.style) {
-        if ( display == "none" ){
-            display = ""
-        } else{
-            display = "none"
-        }
-    }
-    var text = document.getElementById(id + "-switch").firstChild;
-    if (text.nodeValue == "[<i18n:text i18n:key="show" />]") {
-        text.nodeValue = "[<i18n:text i18n:key="hide" />]";
-    } else {
-        text.nodeValue = "[<i18n:text i18n:key="show" />]";
-    }
-}
-</script>
-	<div class="lenya-box">
-	  <div class="lenya-box-title"><i18n:text i18n:key="error-generic" /></div>
-	  <div class="lenya-box-body">
-	    <p>
-          <xsl:value-of select="error:message"/>
-	    </p>
-	    <p>
-          <xsl:value-of select="error:description"/>
-	    </p>
-        <xsl:apply-templates select="error:extra"/>
-	  </div>
-	</div>
-      </page:body>
-    </page:page>
-  </xsl:template>
-
-  <xsl:template match="error:extra">
-    <xsl:choose>
-     <xsl:when test="contains(@error:description,'stacktrace')">
-      <p class="stacktrace">
-       <span class="description"><xsl:value-of select="@error:description"/></span>
-       <span class="switch" id="{@error:description}-switch" onclick="toggle('{@error:description}')">[<i18n:text i18n:key="hide" />]</span>
-       <pre id="{@error:description}">
-         <xsl:value-of select="translate(.,'&#13;','')"/>
-       </pre>
-      </p>
-     </xsl:when>
-     <xsl:otherwise>
-      <p class="extra">
-       <span class="description"><xsl:value-of select="@error:description"/>:&#160;</span>
-       <xsl:value-of select="."/>
-      </p>
-     </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-  <xsl:template match="error:notify" mode="onload">
-    <xsl:attribute name="onload">
-      <xsl:for-each select="error:extra[contains(@error:description,'stacktrace')]">
-        <xsl:text>toggle('</xsl:text>
-        <xsl:value-of select="@error:description"/>
-        <xsl:text>');</xsl:text>
-      </xsl:for-each>
-    </xsl:attribute>
-  </xsl:template>
-  
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/xslt/exception/missing-language.xsl b/src/webapp/lenya/xslt/exception/missing-language.xsl
deleted file mode 100644
index 2515429..0000000
--- a/src/webapp/lenya/xslt/exception/missing-language.xsl
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-  >
-  
-  <xsl:import href="../util/page-util.xsl"/>
-  
-  <xsl:variable name="language"><xsl:value-of select="/missing-language/current-language"/></xsl:variable>
-
-  <xsl:template match="/">
-    
-    <page:page>
-      <page:title><i18n:text>Document not available for this language</i18n:text></page:title>
-      <page:body>
-	<div class="lenya-box">
-	  <div class="lenya-box-title">      <i18n:translate>
-        <i18n:text i18n:key="error-missing-language" />
-        <i18n:param>'<xsl:value-of select="$language"/>'</i18n:param>
-      </i18n:translate>
-</div>
-	  <div class="lenya-box-body">
-	    <p>
-      <i18n:translate>
-        <i18n:text i18n:key="error-missing-language" />
-        <i18n:param>'<xsl:value-of select="$language"/>'</i18n:param>
-      </i18n:translate>
-	      <i18n:text>The following languages are available:</i18n:text>
-	    </p>
-	    <ul>
-	      <xsl:apply-templates select="missing-language/available-languages/available-language"/>
-	    </ul>
-	  </div>
-	</div>
-      </page:body>
-    </page:page>
-  </xsl:template>
-  
-  <xsl:template match="available-languages/available-language">
-    <li>
-      <a><xsl:attribute name="href"><xsl:value-of select="url"/></xsl:attribute><xsl:value-of select="language"/></a>
-    </li>
-  </xsl:template>
-
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/xslt/exception/not-published-yet.xsl b/src/webapp/lenya/xslt/exception/not-published-yet.xsl
deleted file mode 100644
index 7aac17d..0000000
--- a/src/webapp/lenya/xslt/exception/not-published-yet.xsl
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-  >
-  
-  <xsl:import href="../util/page-util.xsl"/>
-  
-  <xsl:template match="/">
-    
-    <page:page>
-      <page:title><i18n:text>Page not published yet</i18n:text></page:title>
-      <page:body>
-	<div class="lenya-box">
-	  <div class="lenya-box-title"><i18n:text>Page not published yet</i18n:text></div>
-	  <div class="lenya-box-body">
-	    <p>
-	      <i18n:text>An error occured. Most likely you are trying access a
-	      page which has not been published yet.</i18n:text></p>
-	      
-	    <p><i18n:text>To publish this page click on the <strong>File</strong> menu
-	      within the Authoring area and then click on the
-	      <strong>Publish</strong> menu item.</i18n:text></p>
-	  </div>
-	</div>
-      </page:body>
-    </page:page>
-  </xsl:template>
-  
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/xslt/exception/parent-node-not-found.xsl b/src/webapp/lenya/xslt/exception/parent-node-not-found.xsl
deleted file mode 100644
index d6db0e2..0000000
--- a/src/webapp/lenya/xslt/exception/parent-node-not-found.xsl
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-  >
-  
-  <xsl:import href="../util/page-util.xsl"/>
-  
-  <xsl:variable name="separator" select="','"/>
-  
-  <xsl:template match="/">
-    
-    <page:page>
-      <page:title><i18n:text>Parent document not found</i18n:text></page:title>
-      <page:body>
-	<div class="lenya-box">
-	  <div class="lenya-box-title"><i18n:text>Error while publishing</i18n:text></div>
-	  <div class="lenya-box-body">
-	    <p>
-	      <i18n:text>An error occured while publishing. Most likely you are trying
-	      to publish a document whose parent document hasn't been
-	      published yet.</i18n:text></p>
-	    <p><i18n:text>Try to publish the parent document first.</i18n:text></p>
-	  </div>
-	</div>
-      </page:body>
-    </page:page>
-  </xsl:template>
-  
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/xslt/info/sitetree2areatree.xsl b/src/webapp/lenya/xslt/info/sitetree2areatree.xsl
deleted file mode 100644
index 258fea4..0000000
--- a/src/webapp/lenya/xslt/info/sitetree2areatree.xsl
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: sitetree2areatree.xsl,v 1.2 2004/03/13 12:42:06 gregor Exp $ -->
-
-<!--
-        Adds an area attribute to a sitetree root element.
--->
-
-<xsl:stylesheet version="1.0"
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:s="http://apache.org/cocoon/lenya/sitetree/1.0"
-    >
-
-<xsl:param name="area"/>
-   
-<xsl:template match="s:site">
-	<s:site area="{$area}">
-		<xsl:copy-of select="@*"/>
-		<xsl:apply-templates/>
-	</s:site>
-</xsl:template>
-	
-
-<xsl:template match="@*|node()">
-	<xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy>
-</xsl:template>
-
-</xsl:stylesheet> 
diff --git a/src/webapp/lenya/xslt/info/sitetree2tree.xsl b/src/webapp/lenya/xslt/info/sitetree2tree.xsl
deleted file mode 100644
index f58501f..0000000
--- a/src/webapp/lenya/xslt/info/sitetree2tree.xsl
+++ /dev/null
@@ -1,219 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<!--
-        Converts a sitetree into a javascript array suitable for the tree widget.
--->
-
-<xsl:stylesheet version="1.0"
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:s="http://apache.org/cocoon/lenya/navigation/1.0">
-
-<xsl:import href="../util/string-functions.xsl"/>
-
-<xsl:output omit-xml-declaration="yes"/>    
-
-<xsl:param name="contextprefix"/>
-<xsl:param name="publicationid"/>
-<xsl:param name="chosenlanguage"/>
-<xsl:param name="defaultlanguage"/>
-<xsl:param name="cutdocumentid"/>
-<xsl:param name="incremental"/>
-<xsl:param name="areas"/>
-
-<xsl:template match="/">
-    <xsl:param name="parentPath"/>
-// You can find instructions for this file at http://www.treeview.net
-
-//Environment variables are usually set at the top of this file.
-USETEXTLINKS = 1
-STARTALLOPEN = 0
-USEFRAMES = 0
-USEICONS = 0
-WRAPTEXT = 1
-PRESERVESTATE = 1
-HIGHLIGHT = 1
-HIGHLIGHT_BG = "#DDDCCF"
-HIGHLIGHT_COLOR = "#666666"
-CONTEXT_PREFIX = "<xsl:value-of select="$contextprefix"/>";
-PUBLICATION_ID = "<xsl:value-of select="$publicationid"/>";
-CHOSEN_LANGUAGE = "<xsl:value-of select="$chosenlanguage"/>";
-DEFAULT_LANGUAGE = "<xsl:value-of select="$defaultlanguage"/>";
-CUT_DOCUMENT_ID = "<xsl:value-of select="$cutdocumentid"/>";
-ALL_AREAS = "<xsl:value-of select="$areas"/>"
-PIPELINE_PATH = '/authoring/info-sitetree/sitetree-fragment.xml'
-<xsl:choose>
-  <xsl:when test="$incremental='true'">
-INCREMENTAL_LOADING = true;
-  </xsl:when>
-  <xsl:otherwise>
-INCREMENTAL_LOADING = false;
-  </xsl:otherwise>
-</xsl:choose>
-
-<!-- incremental loading does not work with the preserve state mechanism (cookies) -->
-if (INCREMENTAL_LOADING) PRESERVESTATE=0;
-
-foldersTree = gFld("&lt;strong&gt;<xsl:value-of select="$publicationid"/>&lt;/strong&gt;")
-
-  <xsl:if test="$incremental!='true'">
-    <xsl:apply-templates select="lenya/s:site"/>
-  </xsl:if>
-
-//Set this string if Treeview and other configuration files may also be loaded in the same session
-foldersTree.treeID = "t2"
-</xsl:template>
-
-<xsl:template match="s:site">
-  <xsl:param name="parentPath"/>
-  <xsl:variable name="suffix">
-  	<xsl:if test="not($chosenlanguage = $defaultlanguage)">_<xsl:value-of select="$chosenlanguage"/></xsl:if>
-  </xsl:variable>
-  
-  <xsl:variable name="link">
-    <xsl:if test="not(@protected = 'true')">
-      <xsl:text>, "</xsl:text>
-      <xsl:value-of select="concat($contextprefix, '/', $publicationid, '/', @area, '/', $suffix)"/>
-      <xsl:text>?lenya.usecase=tab.overview</xsl:text>
-      <xsl:text>"</xsl:text>
-    </xsl:if>
-  </xsl:variable>
-  
-  <xsl:variable name="protected-pre"><xsl:if test="@protected = 'true'">&lt;span class=\"lenya-info-protected\"&gt;</xsl:if></xsl:variable>
-  <xsl:variable name="protected-post"><xsl:if test="@protected = 'true'">&lt;/span&gt;</xsl:if></xsl:variable>
-  
-  <xsl:variable name="pre" select="$protected-pre"/>
-  <xsl:variable name="post" select="$protected-post"/>
-  
-  <xsl:choose>
-    <!-- FIXME
-    The area nodes must not be clickable unless we find a solution for non-document URLs.
-    The nodes were used for area access control and for an overview of the scheduled jobs.
-    
-  	<xsl:when test="descendant::s:node"><xsl:value-of select="generate-id(.)"/> = insFld(foldersTree, gFld("&#160;<xsl:value-of select="$pre"/><xsl:value-of select="@label"/><xsl:value-of select="$post"/>&#160;" <xsl:value-of select="$link"/>))</xsl:when>
-    <xsl:otherwise>insDoc(foldersTree, gLnk("S", "&#160;<xsl:value-of select="$pre"/><xsl:value-of select="@label"/><xsl:value-of select="$post"/>&#160;" <xsl:value-of select="$link"/>))</xsl:otherwise>
-    -->
-    
-  	<xsl:when test="descendant::s:node"><xsl:value-of select="generate-id(.)"/> = insFld(foldersTree, gFld("&#160;<xsl:value-of select="$pre"/><xsl:value-of select="@label"/><xsl:value-of select="$post"/>&#160;"))</xsl:when>
-    <xsl:otherwise>insDoc(foldersTree, gLnk("S", "&#160;<xsl:value-of select="$pre"/><xsl:value-of select="@label"/><xsl:value-of select="$post"/>&#160;"))</xsl:otherwise>
-
-  </xsl:choose>
-  <xsl:apply-templates>
-    <xsl:with-param name="parentPath"><xsl:value-of select="@id"/></xsl:with-param>
-  </xsl:apply-templates>   
-</xsl:template>
-
-<xsl:template match="s:node">
-  <xsl:param name="parentPath"/>
-  <xsl:variable name="tree-area" select="ancestor::s:site/@area"/>
-  <xsl:variable name="link">
-    <xsl:if test="not(@protected = 'true')">
-      <xsl:text>, "</xsl:text>
-      <xsl:value-of select="concat($contextprefix, '/', $publicationid, '/', $tree-area, '/', @basic-url, @language-suffix, @suffix)"/>
-      <xsl:text>?lenya.usecase=tab.overview</xsl:text>
-      <xsl:text>"</xsl:text>
-    </xsl:if>
-  </xsl:variable>
-  <xsl:variable name="exists-language" select="s:label[lang($chosenlanguage)]"/>
-  
-  <xsl:variable name="protected-pre"><xsl:if test="@protected = 'true'">&lt;span class=\"lenya-info-protected\"&gt;</xsl:if></xsl:variable>
-  <xsl:variable name="protected-post"><xsl:if test="@protected = 'true'">&lt;/span&gt;</xsl:if></xsl:variable>
-  
-  <xsl:variable name="no-language-pre"><xsl:if test="not($exists-language)">&lt;span class=\"lenya-info-nolanguage\"&gt;</xsl:if></xsl:variable>
-  <xsl:variable name="no-language-post"><xsl:if test="not($exists-language)">&lt;/span&gt;</xsl:if></xsl:variable>
-  
-  <xsl:variable name="cut-pre"><xsl:if test="$cutdocumentid = concat('/', @basic-url)">&lt;span class='lenya-info-cut'&gt;[</xsl:if></xsl:variable>
-  <xsl:variable name="cut-post"><xsl:if test="$cutdocumentid = concat('/', @basic-url)">]&lt;/span&gt;</xsl:if></xsl:variable>
-  
-  <xsl:variable name="pre" select="concat($no-language-pre, $protected-pre, $cut-pre)"/>
-  <xsl:variable name="post" select="concat($cut-post, $protected-post, $no-language-post)"/>
-
-  <xsl:choose>
-  	<xsl:when test="descendant::s:node">
-  		<xsl:value-of select="generate-id(.)"/>
-  		= insFld(
-  			   <xsl:value-of select="generate-id(..)"/>,
-           gFld("&lt;span style=\"padding: 0px 5px;\"&gt;<xsl:value-of select="$pre"/><xsl:call-template name="getLabel"/><xsl:value-of select="$post"/>&lt;/span&gt;"
-           <xsl:value-of select="$link"/>)
-      );
-    </xsl:when>
-    <xsl:otherwise>
-    	insDoc(<xsl:value-of select="generate-id(..)"/>,
-    	       gLnk(
-    	           "S",
-    	           "&lt;span style=\"padding: 0px 5px;\"&gt;<xsl:value-of select="$pre"/><xsl:call-template name="getLabel"/>&lt;/span&gt;"
-    	           <xsl:value-of select="$link"/>)
-      );
-      </xsl:otherwise>
-  </xsl:choose>
-  <xsl:apply-templates>
-    <xsl:with-param name="parentPath"><xsl:value-of select="$parentPath"/>/<xsl:value-of select="@id"/></xsl:with-param>
-  </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template name="getLabel">
-  <xsl:choose>
-    <xsl:when test="s:label[lang($chosenlanguage)]">
-      <xsl:call-template name="escape-characters">
-        <xsl:with-param name="input" select="s:label[lang($chosenlanguage)]"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:when test="s:label[lang($defaultlanguage)]">
-      <xsl:call-template name="escape-characters">
-        <xsl:with-param name="input" select="s:label[lang($defaultlanguage)]"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:call-template name="escape-characters">
-        <xsl:with-param name="input" select="s:label"/>
-      </xsl:call-template>
-    </xsl:otherwise>
-  </xsl:choose>	
-</xsl:template>
-
-<xsl:template match="s:label"/>
-
-
-<xsl:template name="escape-characters">
-  <xsl:param name="input"/>
-  <xsl:variable name="escape-lt">
-    <xsl:call-template name="search-and-replace">
-      <xsl:with-param name="input" select="$input"/>
-      <xsl:with-param name="search-string">&lt;</xsl:with-param>
-      <xsl:with-param name="replace-string">&amp;lt;</xsl:with-param>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:variable name="escape-gt">
-    <xsl:call-template name="search-and-replace">
-      <xsl:with-param name="input" select="$escape-lt"/>
-      <xsl:with-param name="search-string">&gt;</xsl:with-param>
-      <xsl:with-param name="replace-string">&amp;gt;</xsl:with-param>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:variable name="escape-quot">
-    <xsl:call-template name="search-and-replace">
-      <xsl:with-param name="input" select="$escape-gt"/>
-      <xsl:with-param name="search-string">"</xsl:with-param>
-      <xsl:with-param name="replace-string">\"</xsl:with-param>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:value-of select="$escape-quot"/>
-</xsl:template>
-
-</xsl:stylesheet> 
diff --git a/src/webapp/lenya/xslt/menu/menu2xhtml.xsl b/src/webapp/lenya/xslt/menu/menu2xhtml.xsl
deleted file mode 100644
index 16876f6..0000000
--- a/src/webapp/lenya/xslt/menu/menu2xhtml.xsl
+++ /dev/null
@@ -1,252 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
-  xmlns:uc="http://apache.org/cocoon/lenya/usecase/1.0"
-  xmlns:menu="http://apache.org/cocoon/lenya/menubar/1.0"
-  xmlns="http://www.w3.org/1999/xhtml"
-  >
-  
-<xsl:param name="contextprefix"/>
-<xsl:param name="publicationid"/>
-<xsl:param name="area"/>
-<xsl:param name="documenturl"/>
-<xsl:param name="documentid"/>
-<xsl:param name="userid"/>
-<xsl:param name="servertime"/>
-<xsl:param name="workflowstate"/>
-<xsl:param name="islive"/>
-<xsl:param name="usecase"/>
-
-<xsl:variable name="currentTab">
-  <xsl:choose>
-    <xsl:when test="starts-with($usecase, 'admin.')">admin</xsl:when>
-    <xsl:when test="starts-with($usecase, 'tab.')">site</xsl:when>
-    <xsl:otherwise>authoring</xsl:otherwise>
-  </xsl:choose>
-</xsl:variable>
-
-<xsl:variable name="image-prefix"><xsl:value-of select="$contextprefix"/>/lenya/menu/images</xsl:variable>
- 
-<xsl:template match="menu:menu">
-    
-  <!-- Lenya graphic -->
-  <div id="lenya-logo">
-    <img src="{$image-prefix}/lenya-logo.gif" alt="Lenya" />
-  </div>
-
-  <div id="lenya-menus">
-
-    <!-- The main tabs for the different areas of Lenya -->
-    <div id="lenya-areas">
-      <ul>
-        
-        <!-- ADMIN TAB -->
-        <xsl:if test="not(menu:tabs/menu:tab[@label = 'admin']/@show = 'false')">
-          <xsl:call-template name="area-tab">
-            <xsl:with-param name="tab-area">admin</xsl:with-param>
-            <xsl:with-param name="tabName">admin</xsl:with-param>
-          </xsl:call-template>
-        </xsl:if>
-          
-        <xsl:variable name="info-area">
-          <xsl:choose>
-            <xsl:when test="$area = 'admin'">authoring</xsl:when>
-            <xsl:otherwise><xsl:value-of select="$area"/></xsl:otherwise>
-          </xsl:choose>
-        </xsl:variable>
-          
-        <xsl:if test="not(menu:tabs/menu:tab[@label = 'info']/@show = 'false')">
-          <xsl:call-template name="area-tab">
-            <xsl:with-param name="tab-area" select="$info-area"/>
-            <xsl:with-param name="queryString">?lenya.usecase=tab.overview</xsl:with-param>
-            <xsl:with-param name="tabName">site</xsl:with-param>
-          </xsl:call-template>
-        </xsl:if>
-          
-        <!-- AUTHORING TAB -->
-        <xsl:call-template name="area-tab">
-          <xsl:with-param name="tab-area">authoring</xsl:with-param>
-          <xsl:with-param name="tabName">authoring</xsl:with-param>
-        </xsl:call-template>
-          
-        <!-- STAGING TAB -->
-        <xsl:if test="menu:tabs/menu:tab[@label = 'staging']/@show = 'true'">
-          <xsl:call-template name="area-tab">
-            <xsl:with-param name="tab-area">staging</xsl:with-param>
-          </xsl:call-template>
-        </xsl:if>
-          
-        <!-- LIVE TAB -->
-        <xsl:if test="not(menu:tabs/menu:tab[@label = 'live']/@show = 'false')">
-          <xsl:call-template name="area-tab">
-            <xsl:with-param name="tab-area">live</xsl:with-param>
-            <xsl:with-param name="target">_blank</xsl:with-param>
-            <xsl:with-param name="tabName">live</xsl:with-param>
-          </xsl:call-template>
-        </xsl:if>
-          
-      </ul>
-    </div>
- 
-    <!-- General information about the state  of the page, etc. -->
-    <div id="lenya-info">
-      <ul>
-        <xsl:if test="$workflowstate != ''">
-          <xsl:call-template name="workflow"/>
-        </xsl:if>
-        <li id="info-user"><i18n:text>User</i18n:text>: <span id="logged-user"><xsl:value-of select="$userid"/></span></li>
-        <li id="info-time"><i18n:text>Server Time</i18n:text>: <span id="server-time"><xsl:value-of select="$servertime"/></span></li>
-      </ul>
-    </div>
-
-    <!-- drop down menus for area options -->
-    <div id="lenya-options">
-      <ul>
-        <xsl:apply-templates select="menu:menus/menu:menu" mode="nav"/>
-      </ul>
-    </div>
-
-  </div>
-
-</xsl:template>
-  
-  
-  <xsl:template name="area-tab">
-    <xsl:param name="tab-area"/>
-    <xsl:param name="tab-area-prefix" select="$tab-area"/>
-    <xsl:param name="target" select="'_self'"/>
-    <xsl:param name="queryString"/>
-    <xsl:param name="tabName"/>
-    
-    <xsl:variable name="tab-documenturl">
-      <xsl:choose>
-        <!-- index.html for link from/to admin area -->
-        <xsl:when test="$tab-area = 'admin' or $area = 'admin'">/index.html</xsl:when>
-        <xsl:when test="($currentTab = 'site') and $documentid = '/'">/index.html</xsl:when>
-        <xsl:otherwise><xsl:value-of select="$documenturl"/></xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-
-    <xsl:choose>
-      <xsl:when test="$tabName = $currentTab">
-        <li id="area-{$tab-area}-active"><a href="{$contextprefix}/{$publicationid}/{$tab-area}{normalize-space($tab-documenturl)}{$queryString}" target="{$target}"><span><i18n:text><xsl:value-of select="$tabName"/></i18n:text></span></a></li>
-      </xsl:when>
-      <xsl:otherwise>
-        <li id="area-{$tab-area}"><a href="{$contextprefix}/{$publicationid}/{$tab-area}{normalize-space($tab-documenturl)}{$queryString}" target="{$target}"><span><i18n:text><xsl:value-of select="$tabName"/></i18n:text></span></a></li>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-  
-  
-  <xsl:template name="workflow">
-    <li id="info-state"><i18n:text>Workflow State</i18n:text>: <span id="workflow-state"><i18n:text><xsl:value-of select="$workflowstate"/></i18n:text></span></li>
-    <li id="info-live">
-      <xsl:choose>
-        <xsl:when test="$islive = 'false'">
-          <i18n:text>not live</i18n:text>
-        </xsl:when>
-        <xsl:otherwise>
-          <i18n:text>live</i18n:text>
-        </xsl:otherwise>
-      </xsl:choose>
-    </li>
-  </xsl:template>
-  
-  <xsl:template match="menu:menu" mode="nav">
-    <li id="nav{position()}"><xsl:value-of select="@name"/>
-      <ul id="menu{position()}">
-        <xsl:apply-templates select="menu:block[not(@info = 'false') and ($currentTab = 'site') or not(@*[local-name() = $currentTab] = 'false') and not($currentTab = 'site')]"/>
-      </ul>
-    </li>
-  </xsl:template>
-
-  <xsl:template match="menu:menu[not(*)]" mode="nav">
-    <li id="nav{position()}" class="disabled">
-      <xsl:value-of select="@name"/>
-    </li>
-  </xsl:template>
- 
-  <!-- match blocks with not area='false' -->
-  <xsl:template match="menu:block">
-    <xsl:apply-templates select="menu:title"/>
-    <xsl:apply-templates select="menu:item[not(@info = 'false') and ($currentTab = 'site') or not(@*[local-name() = $currentTab] = 'false') and not($currentTab = 'site')]"/>
-		
-    <xsl:if test="position() != last()">
-      <li class="lenya-menu-separator"></li>
-    </xsl:if>
-  </xsl:template>
-  
-  
-  <xsl:template match="menu:title">
-    <xsl:apply-templates/>
-  </xsl:template>
-  	
-  <!-- match items with not area='false' -->
-  <xsl:template match="menu:item">
-    <xsl:choose>
-      <xsl:when test="@href">
-        <li><a>
-          <xsl:attribute name="href">
-            <xsl:value-of select="@href"/>
-            <xsl:apply-templates select="@*[local-name() != 'href']"/>
-            <xsl:text/>
-            <xsl:if test="$currentTab = 'site'">
-              <xsl:choose>
-                <xsl:when test="contains(@href, '?')">
-                  <xsl:text>&amp;</xsl:text>
-                </xsl:when>
-                <xsl:otherwise>
-                  <xsl:text>?</xsl:text>
-                </xsl:otherwise>
-              </xsl:choose>
-            </xsl:if>
-          </xsl:attribute>
-          <span><xsl:value-of select="."/></span>
-        </a></li>
-      </xsl:when>
-      <xsl:otherwise>
-        <li class="disabled"><xsl:value-of select="."/></li>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-  
-  
-  <xsl:template match="menu:item/@uc:usecase">
-    <xsl:text/>
-    <xsl:choose>
-      <xsl:when test="contains(../@href, '?')">&amp;</xsl:when>
-      <xsl:otherwise>?</xsl:otherwise>
-    </xsl:choose>
-    <xsl:text/>lenya.usecase=<xsl:value-of select="normalize-space(.)"/><xsl:text/>
-    <xsl:if test="$usecase != ''">
-      <xsl:text>&amp;lenya.exitUsecase=</xsl:text><xsl:value-of select="$usecase"/><xsl:text/>
-    </xsl:if>
-  </xsl:template>
-  
-  <xsl:template match="menu:item/@uc:step">
-    <xsl:text/>&amp;lenya.step=<xsl:value-of select="normalize-space(.)"/><xsl:text/>
-  </xsl:template>
-  
-  <xsl:template match="menu:item/@*[not(namespace-uri() = 'http://apache.org/cocoon/lenya/usecase/1.0')]"><xsl:copy-of select="."/></xsl:template>
-  
-  
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/xslt/menu/menu2xslt.xsl b/src/webapp/lenya/xslt/menu/menu2xslt.xsl
deleted file mode 100644
index e2ea75a..0000000
--- a/src/webapp/lenya/xslt/menu/menu2xslt.xsl
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xhtml="http://www.w3.org/1999/xhtml"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:xso="http://apache.org/cocoon/lenya/xslt/1.0"
-  >
-  
-<xsl:param name="contextprefix"/>
-<xsl:param name="publicationid"/>
-<xsl:param name="area"/>
-<xsl:param name="documenturl"/>
-  
-<xsl:namespace-alias stylesheet-prefix="xso" result-prefix="xsl"/>
-  
-<xsl:template match="/">
-  
-  <xso:stylesheet version="1.0"
-    xmlns:xhtml="http://www.w3.org/1999/xhtml"
-    exclude-result-prefixes="xhtml">
-    
-  <xso:output method="xml" indent="yes"/>
-
-  <xsl:if test="$area != 'live'">
-    
-  <xso:template match="/">
-    <html>
-      <head>
-        <xso:call-template name="title"/>
-        <script src="{$contextprefix}/lenya/menu/menu.js" type="text/javascript">&#160;</script>
-        <link href="{$contextprefix}/lenya/css/menu.css" rel="stylesheet" type="text/css"/>
-        <xso:apply-templates select="xhtml:html/xhtml:head/*[local-name() != 'title']"/>
-      </head>
-      <body>
-        <xsl:apply-templates select="xhtml:div[@id = 'lenya-logo']"/>
-        <xsl:apply-templates select="xhtml:div[@id = 'lenya-menus']"/>
-        <div id="lenya-cmsbody">
-          <xso:apply-templates select="xhtml:html/xhtml:body/node()"/>
-        </div>
-        <script type="text/javascript"> initialize(); </script>
-      </body>
-    </html>
-  </xso:template>
-  
-  <xso:template name="title">
-    <title>
-      Apache Lenya |
-      <xsl:value-of select="$publicationid"/> |
-      <xsl:value-of select="$area"/> |
-      <xsl:value-of select="$documenturl"/> |
-      <xso:value-of select="xhtml:html/xhtml:head/xhtml:title"/>
-    </title>
-  </xso:template>
-  
-  </xsl:if>
-    
-    <xso:template match="xhtml:script">
-        <xso:copy>
-           <xso:apply-templates select="@*|node()"/>
-           <xso:if test="not(.//text())"><xso:text>&#160;</xso:text></xso:if>
-        </xso:copy>
-    </xso:template>
-
-  <xso:template match="xhtml:*">
-    <xso:element>
-      <xsl:attribute name="name">{local-name()}</xsl:attribute>
-      <xso:apply-templates select="@*|node()"/>
-    </xso:element>
-  </xso:template>
-  
-  
-  <xso:template match="@*|node()">
-    <xso:copy>
-      <xso:apply-templates select="@*|node()"/>
-    </xso:copy>
-  </xso:template>
-
-  </xso:stylesheet>
-  
-</xsl:template>
-  
-
-
-<xsl:template match="xhtml:*">
-  <xsl:element name="{local-name()}">
-    <xsl:apply-templates select="@*|node()"/>
-  </xsl:element>
-</xsl:template>
-
-  
-<xsl:template match="@*|node()">
-  <xsl:copy>
-    <xsl:apply-templates select="@*|node()"/>
-  </xsl:copy>
-</xsl:template>
-  
-
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/xslt/menu/menu2xsltwithxul.xsl b/src/webapp/lenya/xslt/menu/menu2xsltwithxul.xsl
deleted file mode 100644
index b40977d..0000000
--- a/src/webapp/lenya/xslt/menu/menu2xsltwithxul.xsl
+++ /dev/null
@@ -1,131 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:xso="http://apache.org/cocoon/lenya/xslt/1.0"
-  xmlns:xhtml="http://www.w3.org/1999/xhtml"
-  >
-  
-<xsl:param name="contextprefix"/>
-<xsl:param name="publicationid"/>
-<xsl:param name="area"/>
-<xsl:param name="documentid"/>
-  
-<xsl:namespace-alias stylesheet-prefix="xso" result-prefix="xsl"/>
-
-<xsl:output method="xml" indent="yes"/>
-  
-<xsl:template match="/">
-  
-  <xso:stylesheet version="1.0"
-    xmlns:xhtml="http://www.w3.org/1999/xhtml"
-    xmlns="http://www.w3.org/1999/xhtml"
-    xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-    >
-    <!--
-    exclude-result-prefixes="xhtml">
-    -->
-    <!--
-    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"-->
-<!--    exclude-result-prefixes="xhtml"-->
-    
-  <xso:output method="xml" indent="yes"/>
-
-  <xsl:if test="$area != 'live'">
-    
-  <xso:template match="/">
-      <!--xso:processing-instruction name="xml-stylesheet">
-          href="chrome://global/skin/" type="text/css"
-      </xso:processing-instruction-->
-      <xso:processing-instruction name="xml-stylesheet">
-          href="<xsl:value-of select="$contextprefix"/>/lenya/css/xulmenu.css" type="text/css"
-      </xso:processing-instruction>
-      
-      <xso:apply-templates select="xhtml:html/xhtml:head/xhtml:link"/>
-      
-      <xul:window
-          xmlns:xhtml="http://www.w3.org/1999/xhtml"
-          xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-          
-          
-          <!-- TODO does not work !!! -->
-          <!--xso:attribute name="title"><xsl:value-of select="concat('Apache Lenya - ', $publicationid, ' - ', $area, ' - ', $documentid, ' - ')"/><xso:value-of select="xhtml:html/xhtml:head/xhtml:title"/></xso:attribute-->
-          
-          <xul:script type="application/x-javascript">
-              function loadURL(event) {
-              	var url = event.target.getAttribute('value');
-              	if (url) window.location = url;
-              }
-          </xul:script>
-          <xsl:apply-templates select="xul:hbox[@id = 'lenya-menubar']"/>
-          <xul:spacer flex="1" />
-          <xul:box style="overflow: auto;" flex="100" id="lenya-content-box">
-              <xul:vbox flex="1">
-                  <xhtml:html>
-                    <xso:apply-templates select="xhtml:html/xhtml:body"/>
-		  </xhtml:html>
-              </xul:vbox>
-          </xul:box>
-      </xul:window>
-  </xso:template>
-  
-  <xso:template match="xhtml:link">
-      <xso:processing-instruction name="xml-stylesheet">
-          href="<xso:value-of select="@href"/>" type="text/css" 
-      </xso:processing-instruction>
-  </xso:template>
-  
-  </xsl:if>
-    
-  <xso:template match="xhtml:*">
-    <xso:element>
-      <xsl:attribute name="name">{local-name()}</xsl:attribute>
-      <xso:apply-templates select="@*|node()"/>
-    </xso:element>
-  </xso:template>
-  
-  
-  <xso:template match="@*|node()">
-    <xso:copy>
-      <xso:apply-templates select="@*|node()"/>
-    </xso:copy>
-  </xso:template>
-
-  </xso:stylesheet>
-  
-</xsl:template>
-  
-
-
-<xsl:template match="xhtml:*">
-  <xsl:element name="{local-name()}">
-    <xsl:apply-templates select="@*|node()"/>
-  </xsl:element>
-</xsl:template>
-
-  
-<xsl:template match="@*|node()">
-  <xsl:copy>
-    <xsl:apply-templates select="@*|node()"/>
-  </xsl:copy>
-</xsl:template>
-  
-
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/xslt/menu/menu2xul.xsl b/src/webapp/lenya/xslt/menu/menu2xul.xsl
deleted file mode 100644
index 418317e..0000000
--- a/src/webapp/lenya/xslt/menu/menu2xul.xsl
+++ /dev/null
@@ -1,244 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
-  xmlns:uc="http://apache.org/cocoon/lenya/usecase/1.0"
-  xmlns:menu="http://apache.org/cocoon/lenya/menubar/1.0"
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"      
-  >
-  
-<xsl:param name="contextprefix"/>
-<xsl:param name="publicationid"/>
-<xsl:param name="documentarea"/>
-<xsl:param name="completearea"/>
-<xsl:param name="documenturl"/>
-<xsl:param name="documentid"/>
-<xsl:param name="userid"/>
-<xsl:param name="servertime"/>
-<xsl:param name="workflowstate"/>
-<xsl:param name="islive"/>
-
-<xsl:variable name="image-prefix"><xsl:value-of select="$contextprefix"/>/lenya/menu/images</xsl:variable>
- 
-<xsl:template match="menu:menu">
-        
-	<xul:hbox id="lenya-menubar" style="background-image: url({$contextprefix}/lenya/menu/images/grau-bg2.gif);">
-	   <xul:vbox flex="100">
-        <xul:image src="{$image-prefix}/frame-bg_oben.gif" width="100%" height="4" />
-
-	    <xul:hbox flex="100">
-	   	<xul:image src="{$image-prefix}/blau_anfang_oben.gif"/>
-	   	
-	   	<xul:vbox flex="100">
-	   	<xul:hbox>			    
-
-        <!-- ADMIN TAB -->
-        <xsl:if test="not(menu:tabs/menu:tab[@label = 'admin']/@show = 'false')">
-          <xsl:call-template name="area-tab">
-            <xsl:with-param name="tab-area">admin</xsl:with-param>
-          </xsl:call-template>
-        </xsl:if>          
-
-        <!-- INFO/SITE TAB -->
-        <xsl:variable name="info-area">
-          <xsl:text>info-</xsl:text>
-          <xsl:choose>
-            <xsl:when test="$documentarea = 'admin'">authoring</xsl:when>
-            <xsl:otherwise><xsl:value-of select="$documentarea"/></xsl:otherwise>
-          </xsl:choose>
-        </xsl:variable>
-          
-        <xsl:if test="not(menu:tabs/menu:tab[@label = 'info']/@show = 'false')">
-          <xsl:call-template name="area-tab">
-            <xsl:with-param name="tab-area" select="$info-area"/>
-            <xsl:with-param name="tab-area-prefix">info</xsl:with-param>
-          </xsl:call-template>
-        </xsl:if>
-          
-        <!-- AUTHORING TAB -->
-        <xsl:call-template name="area-tab">
-          <xsl:with-param name="tab-area">authoring</xsl:with-param>
-        </xsl:call-template>
-          
-        <!-- STAGING TAB -->
-        <xsl:if test="menu:tabs/menu:tab[@label = 'staging']/@show = 'true'">
-          <xsl:call-template name="area-tab">
-            <xsl:with-param name="tab-area">staging</xsl:with-param>
-          </xsl:call-template>
-        </xsl:if>
-          
-        <!-- LIVE TAB -->
-        <xsl:if test="not(menu:tabs/menu:tab[@label = 'live']/@show = 'false')">
-          <xsl:call-template name="area-tab">
-            <xsl:with-param name="tab-area">live</xsl:with-param>
-            <xsl:with-param name="target">_blank</xsl:with-param>
-          </xsl:call-template>
-        </xsl:if>
-        
-        <xul:image src="{$contextprefix}/lenya/menu/images/grau-bg2.gif" flex="100"/>
-        
-	   	</xul:hbox>
-	   	    <xul:image width="100%" src="{$image-prefix}/unten.gif" />
-	  </xul:vbox>
-
-    </xul:hbox>
-    <xul:menubar oncommand="loadURL(event);" grippyhidden="true" id="lenya-xul-menubar" flex="100" 
-        style="background-image: url({$contextprefix}/lenya/menu/images/menu-bg_2.gif); font-family: verdana, helvetica, sans-serif; font-size: 10pt;">
-	    <xsl:apply-templates select="menu:menus/menu:menu" mode="menu"/>
-	</xul:menubar>
-   </xul:vbox>   
-   <!--xul:vbox>
-	<xul:image src="{$image-prefix}/lenya_unten.gif" />	
-   </xul:vbox-->
- </xul:hbox>
-	
-</xsl:template>
-  
-  
-  <xsl:template name="area-tab">
-    <xsl:param name="tab-area"/>
-    <xsl:param name="tab-area-prefix" select="$tab-area"/>
-    <xsl:param name="target" select="'_self'"/>
-    
-    <xsl:variable name="tab-documenturl">
-      <xsl:choose>
-        <!-- index.html for link from/to admin area -->
-        <xsl:when test="$tab-area = 'admin' or $documentarea = 'admin'">/index.html</xsl:when>
-        <xsl:when test="starts-with($completearea, 'info') and $documentid = '/'">/index.html</xsl:when>
-        <xsl:otherwise><xsl:value-of select="$documenturl"/></xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    
-    <xsl:variable name="selected">
-          <xsl:choose>
-            <xsl:when test="starts-with($completearea, $tab-area-prefix)">true</xsl:when>
-            <xsl:otherwise>false</xsl:otherwise>
-          </xsl:choose>        
-    </xsl:variable>
-    
-    <xsl:variable name="tab-image-url">
-          <xsl:choose>
-            <xsl:when test="starts-with($completearea, $tab-area-prefix)"><xsl:value-of select="concat($image-prefix, '/', $tab-area-prefix, '_active.gif')"/></xsl:when>
-            <xsl:otherwise><xsl:value-of select="concat($image-prefix, '/', $tab-area-prefix, '_inactive.gif')"/></xsl:otherwise>
-          </xsl:choose>        
-    </xsl:variable>
-
-    
-    <xsl:variable name="tab-label">
-          <xsl:choose>
-            <xsl:when test="$tab-area = 'info-authoring'">site</xsl:when>
-            <xsl:otherwise><xsl:value-of select="$tab-area"/></xsl:otherwise>
-          </xsl:choose>        
-    </xsl:variable>
-    
-    
-    <!--xul:tab label="{$tab-label}" 
-        onclick="window.location = '{$contextprefix}/{$publicationid}/{$tab-area}{normalize-space($tab-documenturl)}';" 
-        id="lenya-xul-{$tab-area-prefix}-tab"
-        image="{$tab-image-url}"
-        selected="{$selected}"/-->
-        
-    <xul:image label="" 
-        onclick="window.location = '{$contextprefix}/{$publicationid}/{$tab-area}{normalize-space($tab-documenturl)}';" 
-        id="lenya-xul-{$tab-area-prefix}-tab"
-        src="{$tab-image-url}"/>
-        
-        
-  </xsl:template>
-  
-  
-  <xsl:template name="workflow">
-    <i18n:text>Workflow State</i18n:text>: <b class="lenya-menubar-highlight"><i18n:text><xsl:value-of select="$workflowstate"/></i18n:text></b>
-    <xsl:text>&#160;&#160;|&#160;&#160;</xsl:text>
-    <xsl:if test="$islive = 'false'"><i18n:text>not</i18n:text>&#160;</xsl:if>
-    <i18n:text>live</i18n:text><xsl:text>&#160;&#160;|</xsl:text>
-  </xsl:template>  
-  
-  <xsl:template match="menu:menu" mode="menu">
-    <xsl:if test="menu:block">
-      <xul:menu label="{@name}">
-     	 <xul:menupopup style="background-image: url({$contextprefix}/lenya/menu/images/bottombg.gif);">
-           <xsl:apply-templates select="menu:block[not(@info = 'false') and starts-with($completearea, 'info') or not(@*[local-name() = $completearea] = 'false') and not(starts-with($completearea, 'info'))]" mode="menu"/>
-       </xul:menupopup>
-      </xul:menu>
-    </xsl:if>
-  </xsl:template>
-  
-  
-  <!-- match blocks with not area='false' -->
-  <xsl:template match="menu:block" mode="menu">
-    <!-- * is menu and item -->
-    <xsl:apply-templates select="*[not(@info = 'false') and starts-with($completearea, 'info') or not(@*[local-name() = $completearea] = 'false') and not(starts-with($completearea, 'info'))]" mode="menu"/>
-
-    <xsl:if test="position() != last()">
-      <xul:menuseparator/>
-    </xsl:if>
-  </xsl:template>
-  	
-  <!-- match items with not area='false' -->
-  <xsl:template match="menu:item" mode="menu">
-    <xsl:choose>
-      <xsl:when test="@href">
-        <xul:menuitem label="{.}">
-
-	<!-- For whatever reason the value, event, loadURL mechanism doesn't work anymore -->
-	<!--
-        <xsl:attribute name="value">
-	-->
-          <xsl:attribute name="oncommand">
-	    window.location = '<xsl:value-of select="@href"/>
-            <xsl:apply-templates select="@*[local-name() != 'href']"/>
-            <xsl:text/>
-						<xsl:if test="starts-with($completearea, 'info-')">
-							<xsl:choose>
-								<xsl:when test="contains(@href, '?')"><xsl:text>&amp;</xsl:text></xsl:when>
-								<xsl:otherwise><xsl:text>?</xsl:text></xsl:otherwise>
-							</xsl:choose>
-							 <xsl:text>lenya.area=info</xsl:text>
-						</xsl:if>'
-          </xsl:attribute>
-        </xul:menuitem>
-      </xsl:when>
-      <xsl:otherwise>
-        <xul:menuitem label="{.}" disabled="true"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-  
-  
-  <xsl:template match="menu:item/@uc:usecase">
-    <xsl:text/>
-    <xsl:choose>
-      <xsl:when test="contains(../@href, '?')">&amp;</xsl:when>
-      <xsl:otherwise>?</xsl:otherwise>
-    </xsl:choose>
-    <xsl:text/>lenya.usecase=<xsl:value-of select="normalize-space(.)"/><xsl:text/>
-  </xsl:template>
-  
-  <xsl:template match="menu:item/@uc:step">
-    <xsl:text/>&amp;lenya.step=<xsl:value-of select="normalize-space(.)"/><xsl:text/>
-  </xsl:template>
-  
-  <xsl:template match="menu:item/@*[not(namespace-uri() = 'http://apache.org/cocoon/lenya/usecase/1.0')]"><xsl:copy-of select="."/></xsl:template>
-  
-  
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/xslt/navigation/admin-menu.xsl b/src/webapp/lenya/xslt/navigation/admin-menu.xsl
deleted file mode 100644
index dc80997..0000000
--- a/src/webapp/lenya/xslt/navigation/admin-menu.xsl
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: admin-menu.xsl,v 1.2 2004/03/13 12:42:05 gregor Exp $ -->
-
-<xsl:stylesheet version="1.0"
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:nav="http://apache.org/cocoon/lenya/navigation/1.0"
-    xmlns="http://www.w3.org/1999/xhtml"
-    exclude-result-prefixes="nav"
-    >
-    
-<xsl:import href="menu.xsl"/>
-
-</xsl:stylesheet> 
diff --git a/src/webapp/lenya/xslt/navigation/breadcrumb.xsl b/src/webapp/lenya/xslt/navigation/breadcrumb.xsl
deleted file mode 100644
index 2b398b0..0000000
--- a/src/webapp/lenya/xslt/navigation/breadcrumb.xsl
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: breadcrumb.xsl,v 1.16 2004/03/13 12:42:05 gregor Exp $ -->
-
-<xsl:stylesheet version="1.0"
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:nav="http://apache.org/cocoon/lenya/navigation/1.0"
-    xmlns="http://www.w3.org/1999/xhtml"
-    exclude-result-prefixes="nav"
-    >
-    
-<xsl:template match="nav:site">
-  <div id="breadcrumb">
-    <xsl:apply-templates select="nav:node"/>
-</div>
-</xsl:template>
-
-
-<xsl:template match="nav:node">
-  
-  <xsl:if test="descendant-or-self::nav:node[@current = 'true']">
-    <xsl:call-template name="separator"/>
-    <xsl:call-template name="step"/>
-    <xsl:apply-templates select="nav:node"/>
-  </xsl:if>
-  
-</xsl:template>
-
-
-<xsl:template name="step">
-  <xsl:choose>
-    <xsl:when test="@current = 'true'">
-      <xsl:apply-templates select="nav:label"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <a href="{@href}"><xsl:apply-templates select="nav:label"/></a>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-    
-<xsl:template match="nav:label">
-  <xsl:value-of select="."/>
-</xsl:template>
-
-
-<xsl:template name="separator">
-  &#x00BB;
-</xsl:template>
-
-
-<xsl:template match="@*|node()">
-  <xsl:copy>
-    <xsl:apply-templates select="@*|node()"/>
-  </xsl:copy>
-</xsl:template>
-
-
-</xsl:stylesheet> 
diff --git a/src/webapp/lenya/xslt/navigation/menu.xsl b/src/webapp/lenya/xslt/navigation/menu.xsl
deleted file mode 100644
index c6b085f..0000000
--- a/src/webapp/lenya/xslt/navigation/menu.xsl
+++ /dev/null
@@ -1,91 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: menu.xsl,v 1.15 2004/03/13 12:42:05 gregor Exp $ -->
-
-<xsl:stylesheet version="1.0"
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:nav="http://apache.org/cocoon/lenya/navigation/1.0"
-    xmlns="http://www.w3.org/1999/xhtml"
-    exclude-result-prefixes="nav"
-    >
-    
-
-<xsl:template match="nav:site">
-  <div id="menu">
-    <xsl:apply-templates select="nav:node"/>
-  </div>
-</xsl:template>
-
-
-<xsl:template match="nav:node">
-  <xsl:choose>
-    <xsl:when test="descendant-or-self::nav:node[@current = 'true']">
-      <div class="menublock-selected-{count(ancestor-or-self::nav:node)}">
-        <xsl:call-template name="item"/>
-        <xsl:apply-templates select="nav:node"/>
-      </div>
-    </xsl:when>
-    <xsl:otherwise>
-      <div class="menublock-{count(ancestor-or-self::nav:node)}">
-        <xsl:call-template name="item"/>
-        <xsl:apply-templates select="nav:node"/>
-      </div>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-
-<xsl:template name="item">
-    <xsl:choose>
-      <xsl:when test="@current = 'true'">
-        <xsl:call-template name="item-selected"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="item-default"/>
-      </xsl:otherwise>
-    </xsl:choose>
-</xsl:template>
-
-
-<xsl:template name="item-default">
-  <div class="menuitem-{count(ancestor-or-self::nav:node)}">
-    <a href="{@href}"><xsl:apply-templates select="nav:label"/></a>
-  </div>
-</xsl:template>
-    
-    
-<xsl:template name="item-selected">
-  <div class="menuitem-selected-{count(ancestor-or-self::nav:node)}">
-    <xsl:apply-templates select="nav:label"/>
-  </div>
-</xsl:template>
-
-
-<xsl:template match="nav:label">
-  <xsl:value-of select="."/>
-</xsl:template>
-    
-    
-<xsl:template match="@*|node()">
-  <xsl:copy>
-    <xsl:apply-templates select="@*|node()"/>
-  </xsl:copy>
-</xsl:template>
-
-
-</xsl:stylesheet> 
diff --git a/src/webapp/lenya/xslt/navigation/search.xsl b/src/webapp/lenya/xslt/navigation/search.xsl
deleted file mode 100644
index 7a45e28..0000000
--- a/src/webapp/lenya/xslt/navigation/search.xsl
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:nav="http://apache.org/cocoon/lenya/navigation/1.0"
-    xmlns="http://www.w3.org/1999/xhtml"
-    exclude-result-prefixes="nav"
-    >
-    
-<xsl:param name="area"/>
-<xsl:param name="root"/>
-
-<xsl:template match="nav:site">
-  <div id="search">
-    <form action="{$root}../search-{$area}/lucene"><p><input class="searchfield" type="text" name="queryString" alt="Search field"/><input class="searchsubmit" type="submit" value="Search" name="find"/></p></form>
-      </div>
-</xsl:template>
-
-<xsl:template match="@*|node()">
-  <xsl:copy>
-    <xsl:apply-templates select="@*|node()"/>
-  </xsl:copy>
-</xsl:template>
-
-</xsl:stylesheet> 
diff --git a/src/webapp/lenya/xslt/navigation/sitetree2nav.xsl b/src/webapp/lenya/xslt/navigation/sitetree2nav.xsl
deleted file mode 100644
index 78fbcc7..0000000
--- a/src/webapp/lenya/xslt/navigation/sitetree2nav.xsl
+++ /dev/null
@@ -1,218 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet
-    version="1.0"
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:tree="http://apache.org/cocoon/lenya/sitetree/1.0"
-    xmlns:nav="http://apache.org/cocoon/lenya/navigation/1.0"
-    exclude-result-prefixes="tree"
-    >
-
-<xsl:param name="url"/>
-<xsl:param name="chosenlanguage"/>
-<xsl:param name="defaultlanguage"/>
-    
-<xsl:variable name="path-to-context"><xsl:call-template name="create-path-to-context"/></xsl:variable>
-<xsl:variable name="root" select="$path-to-context"/>
-  
-<xsl:template name="create-path-to-context">
-  <xsl:param name="local-url" select="$url"/>
-  <xsl:if test="contains($local-url, '/')">
-    <xsl:text/>../<xsl:call-template name="create-path-to-context">
-      <xsl:with-param name="local-url" select="substring-after($local-url, '/')"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-
-<xsl:template match="tree:fragment">
-  <nav:fragment>
-    <xsl:copy-of select="@*"/> 
-    <xsl:choose>
-      <xsl:when test="@base">
-         <xsl:apply-templates>
-          <xsl:with-param name="previous-url" select="concat(substring-after(@base, '/'), '/')"/>
-        </xsl:apply-templates>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:apply-templates/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </nav:fragment>
-</xsl:template>
-
-
-<xsl:template match="tree:site">
-
-  <nav:site url="{$root}{$url}" request-url="{$url}">
-    <xsl:copy-of select="@*"/> 
-    <xsl:apply-templates/>
-  </nav:site>
-
-</xsl:template>
-
-
-<!--
-Resolves the existing language of a node, preferrably
-the default language.
--->
-<xsl:template name="resolve-existing-language">
-  <xsl:choose>
-    <xsl:when test="tree:label[lang($chosenlanguage)]"><xsl:value-of select="$chosenlanguage"/></xsl:when>
-    <xsl:when test="tree:label[lang($defaultlanguage)]"><xsl:value-of select="$defaultlanguage"/></xsl:when>
-    <xsl:otherwise><xsl:value-of select="tree:label/@xml:lang"/></xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-
-
-<!--
-Apply nodes recursively
--->
-<xsl:template match="tree:node[not(@visible = 'false')]">
-
-  <!-- basic url of parent node -->
-  <xsl:param name="previous-url" select="''"/>
-  
-  <xsl:variable name="existinglanguage">
-    <xsl:call-template name="resolve-existing-language"/>
-  </xsl:variable>
-  
-  <nav:node>
-  
-    <xsl:copy-of select="@id"/>
-    <xsl:copy-of select="@protected"/>
-    <xsl:copy-of select="@folder"/>
-  
-    <!-- basic url - for all nodes -->
-  
-    <xsl:variable name="basic-url">
-      <xsl:text/>
-      <xsl:choose>
-        <xsl:when test="@href">
-          <xsl:value-of select="@href"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="$previous-url"/><xsl:value-of select="@id"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>  
-    
-    <xsl:variable name="language-suffix">
-      <xsl:text>_</xsl:text><xsl:value-of select="$existinglanguage"/>
-    </xsl:variable>
-    
-    <xsl:variable name="canonical-language-suffix">
-      <xsl:choose>
-        <xsl:when test="$existinglanguage != '' and $defaultlanguage != $existinglanguage">
-          <xsl:value-of select="$language-suffix"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <!-- no suffix for default language -->
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    
-    <!-- suffix - only when @href is not present -->
-    
-    <xsl:variable name="suffix">
-      <xsl:if test="not(@href)">
-        <xsl:text>.</xsl:text>
-        <xsl:choose>
-          <xsl:when test="@suffix">
-            <xsl:value-of select="@suffix"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:text>html</xsl:text>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:if>
-    </xsl:variable>
-    
-    <xsl:attribute name="suffix"><xsl:value-of select="$suffix"/></xsl:attribute>
-    <xsl:attribute name="basic-url"><xsl:value-of select="$previous-url"/><xsl:value-of select="@id"/></xsl:attribute>
-    <xsl:attribute name="language-suffix"><xsl:value-of select="$canonical-language-suffix"/></xsl:attribute>
-    
-    <xsl:variable name="canonical-url">
-      <xsl:text/>
-      <xsl:value-of select="$basic-url"/><xsl:text/>
-      <xsl:value-of select="$canonical-language-suffix"/><xsl:text/>
-      <xsl:value-of select="$suffix"/><xsl:text/>
-    </xsl:variable>
-    
-    <xsl:variable name="non-canonical-url">
-      <xsl:text/>
-      <xsl:value-of select="$basic-url"/><xsl:text/>
-      <xsl:value-of select="$language-suffix"/><xsl:text/>
-      <xsl:value-of select="$suffix"/><xsl:text/>
-    </xsl:variable>
-    
-    <xsl:if test="$url = $canonical-url or $url = $non-canonical-url">
-      <xsl:attribute name="current">true</xsl:attribute>
-    </xsl:if>
-    
-    <xsl:attribute name="href">
-      <xsl:choose>
-        <xsl:when test="@href">
-          <xsl:value-of select="@href"/>
-        </xsl:when>
-        <xsl:otherwise>
-	  <xsl:value-of select="concat($root, $canonical-url)"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:attribute>
-    
-    <xsl:choose>
-      <xsl:when test="tree:label[lang($existinglanguage)]">
-        <xsl:apply-templates select="tree:label[lang($existinglanguage)]">
-         <xsl:with-param name="previous-url" select="concat($basic-url, '/')"/>
-        </xsl:apply-templates>      	  	    
-      </xsl:when>
-      <xsl:otherwise>
-       <xsl:apply-templates select="tree:label[1]">
-         <xsl:with-param name="previous-url" select="concat($basic-url, '/')"/>
-       </xsl:apply-templates>
-      </xsl:otherwise>
-    </xsl:choose>
-         
-    <xsl:apply-templates select="tree:node">
-      <xsl:with-param name="previous-url" select="concat($basic-url, '/')"/>
-    </xsl:apply-templates>
-    
-  </nav:node>
-</xsl:template>
-
-
-<xsl:template match="tree:label">
-  <nav:label>
-  	<xsl:copy-of select="@*"/>
-    <xsl:apply-templates/>
-  </nav:label>
-</xsl:template>
-
-
-<xsl:template match="@*|node()" priority="-1">
-  <xsl:copy>
-    <xsl:apply-templates select="@*|node()"/>
-  </xsl:copy>
-</xsl:template>
-
-
-</xsl:stylesheet> 
diff --git a/src/webapp/lenya/xslt/navigation/tabs.xsl b/src/webapp/lenya/xslt/navigation/tabs.xsl
deleted file mode 100644
index 042dc00..0000000
--- a/src/webapp/lenya/xslt/navigation/tabs.xsl
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:nav="http://apache.org/cocoon/lenya/navigation/1.0"
-    xmlns="http://www.w3.org/1999/xhtml"
-    exclude-result-prefixes="nav"
-    >
-
-
-<xsl:template match="nav:site">
-
-  <div id="tabs">
-
-    <xsl:call-template name="pre-separator"/>
-    <xsl:for-each select="nav:node">
-      <xsl:if test="position() &gt; 1">
-        <xsl:call-template name="separator"/>
-      </xsl:if>
-      
-      <xsl:choose>
-        <xsl:when test="@visibleinnav = 'false'"/>
-        <xsl:when test="descendant-or-self::nav:node[@current = 'true']">
-          <xsl:call-template name="tab-selected"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:call-template name="tab"/>
-        </xsl:otherwise>
-      </xsl:choose>
-        
-    </xsl:for-each>
-    <xsl:call-template name="post-separator"/>
-  </div>
-</xsl:template>
-
-
-<xsl:template name="tab">
-  <span class="tab"><xsl:call-template name="label"/></span>
-</xsl:template>
-
-
-<xsl:template name="tab-selected">
-  <span class="tab-selected"><xsl:call-template name="label"/></span>
-</xsl:template>
-
-
-<xsl:template name="label">
-   <xsl:choose>
-    <xsl:when test="@current='true'"><xsl:apply-templates select="nav:label"/></xsl:when>
-    <xsl:otherwise><a href="{@href}"><xsl:apply-templates select="nav:label"/></a></xsl:otherwise>
-  </xsl:choose>	  
-</xsl:template>
-
-
-<xsl:template match="nav:label">
-  <xsl:value-of select="."/>
-</xsl:template>
-
-
-<xsl:template name="pre-separator">
-</xsl:template>
-
-
-<xsl:template name="separator">
-   <xsl:text>&#160;</xsl:text>
-</xsl:template>
-
-
-<xsl:template name="post-separator">
-</xsl:template>
-
-
-<xsl:template match="@*|node()">
-  <xsl:copy>
-    <xsl:apply-templates select="@*|node()"/>
-  </xsl:copy>
-</xsl:template>
-
-
-</xsl:stylesheet> 
diff --git a/src/webapp/lenya/xslt/notification/message2xslt.xsl b/src/webapp/lenya/xslt/notification/message2xslt.xsl
deleted file mode 100644
index 220ba96..0000000
--- a/src/webapp/lenya/xslt/notification/message2xslt.xsl
+++ /dev/null
@@ -1,136 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<!--
-	This stylesheet converts a notification message to a named stylesheet.
--->
-
-<xsl:stylesheet version="1.0"
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:xslt="http://apache.org/cocoon/lenya/xslt/1.0"
-    xmlns:not="http://apache.org/cocoon/lenya/notification/1.0"
-    xmlns="http://www.w3.org/1999/xhtml"
-    >
-    
-<xsl:param name="server-uri"/>
-<xsl:param name="document-url"/>
-    
-<xsl:namespace-alias stylesheet-prefix="xslt" result-prefix="xsl"/>
-    
-<xsl:template match="/">
-	<xslt:stylesheet exclude-result-prefixes="not" version="1.0">
-		<xsl:apply-templates/>
-	</xslt:stylesheet>
-</xsl:template>
-		
-		
-<xsl:template match="/not:notification[not(@enabled = 'true')]">
-	
-	<xslt:template match="not:notification"/>
-	<xslt:template match="not:notification-subject"/>
-	<xslt:template match="not:notification-comment"/>
-		
-	<xslt:template match="@*|node()">
-		<xslt:copy><xslt:apply-templates select="@*|node()"/></xslt:copy>
-	</xslt:template>
- 
-</xsl:template>
-	
-	
-<xsl:template match="/not:notification[@enabled = 'true']">
-	
-	<xslt:template match="not:notification">
-		<input id="notification.subject" type="hidden" name="notification.subject"
-			value="{not:message/not:subject}"/>
-		<div class="lenya-box">
-			<div class="lenya-box-title">Notification</div>
-			<div class="lenya-box-body">
-			<table class="lenya-table-noborder">
-				<tr>
-					<td class="lenya-entry-caption">Recipient(s):</td>
-					<td>
-						<xslt:apply-templates/>
-					</td>
-				</tr>
-				<tr>
-					<td class="lenya-entry-caption">Comment:</td>
-					<td>
-						<textarea id="notification.message" name="notification.message" class="lenya-form-element">
-							<xsl:text/>
-							<xsl:apply-templates select="not:message/not:body"/>
-							<xsl:text>&#160;</xsl:text>
-						</textarea>
-					</td>
-				</tr>
-			</table>	
-			</div>
-		</div>
-	</xslt:template>
-	
-	
-	<xslt:template match="not:select">
-		<select name="notification.tolist" class="lenya-form-element">
-		  <option value="">[no notification]</option>
-			<xslt:for-each select="not:users/not:user">
-				<option>
-					<xslt:attribute name="value"><xslt:value-of select="@email"/></xslt:attribute>
-					<xslt:value-of select="@id"/>
-					<xslt:if test="@name != ''">&#160;(<xslt:value-of select="@name"/>)</xslt:if>
-				</option>
-			</xslt:for-each>
-		</select>
-	</xslt:template>
-	
-	
-	<xslt:template match="not:textarea">
-		<textarea id="notification.tolist" name="notification.tolist" class="lenya-form-element">&#160;</textarea>
-	</xslt:template>
-	
-	
-	<xslt:template match="not:preset">
-		<xslt:variable name="user" select="not:users/not:user"/>
-		<input type="hidden" name="notification.tolist">
-			<xslt:attribute name="value"><xslt:value-of select="$user/@email"/></xslt:attribute>
-		</input> 
-		<span style="white-space: nobreak">
-			<xslt:value-of select="$user/@id"/>
-			<xslt:if test="@name != ''">&#160;(<xslt:value-of select="$user/@name"/>)</xslt:if>
-		</span>
-	</xslt:template>
-	
-	
-	<xslt:template match="@*|node()">
-		<xslt:copy><xslt:apply-templates select="@*|node()"/></xslt:copy>
-	</xslt:template>
- 
-</xsl:template>
-
-
-<xsl:template match="not:body">
-	<xsl:apply-templates select="node()"/>
-</xsl:template>
-
-<xsl:template match="not:body/text()"><xsl:value-of select="."/></xsl:template>
-
-<xsl:template match="not:document-url">
-	<xsl:value-of select="$server-uri"/><xsl:value-of select="$document-url"/>
-</xsl:template>
-	
-
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/xslt/notification/notification2message.xsl b/src/webapp/lenya/xslt/notification/notification2message.xsl
deleted file mode 100644
index 8e408e5..0000000
--- a/src/webapp/lenya/xslt/notification/notification2message.xsl
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: notification2message.xsl,v 1.2 2004/03/13 12:42:18 gregor Exp $ -->
-
-<!--
-	This stylesheet filters the messages in notification.xconf.
-	Only the message of the specified usecase is forwarded.
--->
-
-<xsl:stylesheet version="1.0"
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:not="http://apache.org/cocoon/lenya/notification/1.0"
-    >
-    
-<xsl:param name="usecase"/>
-
-<xsl:template match="not:message[@usecase != $usecase]"/>
-
-<xsl:template match="@*|node()">
-	<xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy>
-</xsl:template>
- 
-</xsl:stylesheet>  
diff --git a/src/webapp/lenya/xslt/rc/rco-exception.xsl b/src/webapp/lenya/xslt/rc/rco-exception.xsl
deleted file mode 100644
index b19448d..0000000
--- a/src/webapp/lenya/xslt/rc/rco-exception.xsl
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:rc="http://apache.org/cocoon/lenya/rc/1.0"
-  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
-  >
-  <xsl:import href="../util/page-util.xsl"/>
-  
-  <xsl:template match="/">
-    <xsl:apply-templates/>
-  </xsl:template>
-
-  <xsl:template match="rc:exception">
-          <xsl:apply-templates/>
-  </xsl:template>
-
-  <xsl:template match="rc:file-reserved-checkout-exception">
-    <page:page>
-      <page:title><i18n:text>lenya.rc.nocheckout</i18n:text></page:title>
-      <page:body>
- 	    <div class="lenya-box">
-    	  <div class="lenya-box-title"><i18n:text>lenya.rc.nocheckout</i18n:text></div>
-	      <div class="lenya-box-body">
-	        <p><i18n:text>lenya.rc.checkedoutalready</i18n:text></p>
-            <table>
-              <tr><td><i18n:text>User</i18n:text>:</td><td><xsl:value-of select="rc:user"/></td></tr>
-              <tr><td><i18n:text>Date</i18n:text>:</td><td><xsl:value-of select="rc:date"/></td></tr>
-              <tr><td><i18n:text>Filename</i18n:text>:</td><td><xsl:value-of select="rc:filename"/></td></tr>
-            </table>
-            <form>
-              <input type="button" value="OK" onClick="history.go(-1)"/>
-            </form>		
-  	      </div>
-  	    </div>
-      </page:body>
-    </page:page>
-  </xsl:template>
-  
-  <xsl:template match="rc:file-reserved-checkin-exception">
-    <page:page>
-      <page:title><i18n:text>lenya.rc.nocheckin</i18n:text></page:title>
-      <page:body>
- 	    <div class="lenya-box">
-          <div class="lenya-box-title"><i18n:text>lenya.rc.nocheckin</i18n:text></div>
-    	  <div class="lenya-box-body">
-	        <p><i18n:text>lenya.rc.checkedoutalready</i18n:text></p>
-            <table>
-              <tr><td><i18n:text>User</i18n:text>:</td><td><xsl:value-of select="rc:user"/></td></tr>
-              <tr><td><i18n:text>Date</i18n:text>:</td><td><xsl:value-of select="rc:date"/></td></tr>
-              <tr><td><i18n:text>Filename</i18n:text>:</td><td><xsl:value-of select="rc:filename"/></td></tr>
-            </table>
-            <form>
-              <input type="button" value="OK" onClick="history.go(-1)"/>
-            </form>		
-  	      </div>
-  	    </div>
-      </page:body>
-    </page:page>
-  </xsl:template>
-
-
-  <xsl:template match="rc:generic-exception">
-    <page:page>
-      <page:title><i18n:text>Generic Exception</i18n:text></page:title>
-      <page:body>
- 	    <div class="lenya-box">
-	    <div class="lenya-box-title"><i18n:text>Generic Exception</i18n:text></div>
-	      <div class="lenya-box-body">
-            <p><i18n:text>Reason</i18n:text>: <xsl:value-of select="rc:message"/><br />
-            <i18n:text>Check the log files.</i18n:text>
-            </p>
-            <table>
-              <tr><td><i18n:text>Filename</i18n:text>:</td><td><xsl:value-of select="rc:filename"/></td></tr>
-            </table>
-            <form>
-              <input type="button" value="OK" onClick="history.go(-1)"/>
-            </form>		
-       	  </div>
-  	    </div>
-      </page:body>
-    </page:page>
-  </xsl:template>
-
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/xslt/rc/toDoc.xsl b/src/webapp/lenya/xslt/rc/toDoc.xsl
deleted file mode 100644
index dd3614a..0000000
--- a/src/webapp/lenya/xslt/rc/toDoc.xsl
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: toDoc.xsl,v 1.3 2004/03/24 13:21:24 edith Exp $ -->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
-                xmlns:rc="http://apache.org/cocoon/lenya/rc/1.0" >
-
-
-
-<xsl:template match="rc:backup">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="* | @*">
- <xsl:copy>
-    <xsl:copy-of select="@*"/>
-    <xsl:apply-templates/>
-  </xsl:copy>
-</xsl:template>
-                                                                                                                                            
-</xsl:stylesheet>
-
diff --git a/src/webapp/lenya/xslt/search/admin.xsl b/src/webapp/lenya/xslt/search/admin.xsl
deleted file mode 100644
index f30f877..0000000
--- a/src/webapp/lenya/xslt/search/admin.xsl
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: admin.xsl,v 1.3 2004/04/24 21:04:38 gregor Exp $ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:dir="http://apache.org/cocoon/directory/2.0"
->
-
-<xsl:template match="dir:directory">
-  <xsl:apply-templates select="dir:file/dir:xpath"/>
-</xsl:template>
-
-<xsl:template match="dir:xpath">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="crawler">
-<h3>Crawler</h3>
-Filename: <em><xsl:value-of select="../../@name"/></em>
-<br/>
-User-Agent: <em><xsl:value-of select="user-agent"/></em>
-<br/>
-Start crawling at: <em><xsl:value-of select="base-url/@href"/></em>
-<br/>
-Scope of crawling: <em><xsl:value-of select="scope-url/@href"/></em>
-<br/>
-Directory where documents will be dumped: <em><xsl:value-of select="htdocs-dump-dir/@src"/></em>
-<br/>
-List of all crawled URLs: <em><xsl:value-of select="uri-list/@src"/></em>
-</xsl:template>
-
-<xsl:template match="lucene">
-<h3>Lucene</h3>
-Filename: <em><xsl:value-of select="../../@name"/></em>
-<br/>
-Type of index update: <em><xsl:value-of select="update-index/@type"/></em>
-<br/>
-Directory of Documents to be indexed: <em><xsl:value-of select="htdocs-dump-dir/@src"/></em>
-<br/>
-Directory of Search Index: <em><xsl:value-of select="index-dir/@src"/></em>
-<br/>
-Indexer class: <em><xsl:value-of select="indexer/@class"/></em>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/xslt/search/search-and-results.xsl b/src/webapp/lenya/xslt/search/search-and-results.xsl
deleted file mode 100644
index 03b98e8..0000000
--- a/src/webapp/lenya/xslt/search/search-and-results.xsl
+++ /dev/null
@@ -1,240 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: search-and-results.xsl,v 1.32 2004/05/26 22:23:37 gregor Exp $ -->
-
-<xsl:stylesheet version="1.0" 
-    xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" 
-    xmlns:session="http://www.apache.org/xsp/session/2.0" 
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
-    
-    <xsl:variable name="uriName">lucene</xsl:variable>
-    <xsl:param name="area" select="'live'"/>
-    <xsl:param name="contextprefix"/>
-    
-    <xsl:template match="search-and-results">
-        <page:page>
-            <page:title>Search <xsl:value-of 
-                select="search/publication-name"/></page:title>
-            <page:body>
-                <div class="lenya-box">
-                    <div class="lenya-box-title">Search <xsl:value-of select="search/publication-name"/></div>
-                    <div class="lenya-box-body">
-                        <form>
-                            <table class="lenya-table-noborder">
-                                <tr>
-                                    <td>Search</td>
-                                    <td>
-                                        <input type="text" name="queryString" size="60" class="lenya-form-element">
-                                            <xsl:attribute name="value">
-                                                <xsl:value-of select="search/query-string"/>
-                                            </xsl:attribute>
-                                        </input>
-                                    </td>
-                                </tr>
-                                <xsl:apply-templates select="configuration"/>
-                                <tr>
-                                    <td>Sort by</td>
-                                    <td>
-                                        <select name="sortBy" class="lenya-form-element">
-                                            <option value="score"> <xsl:if test="search/sort-by='score'"> 
-                                                <xsl:attribute name="selected">selected</xsl:attribute> 
-                                                </xsl:if> Score </option>
-                                            <option value="title"> <xsl:if 
-                                                test="search/sort-by='title'"> 
-                                                <xsl:attribute 
-                                                name="selected">selected</xsl:attribute> 
-                                                </xsl:if> Title </option>
-                                        </select>
-                                    </td>
-                                </tr>
-                                <tr>
-                                    <td colspan="2" align="right">
-                                        <input type="submit" name="find" 
-                                            value="Search"/>
-                                    </td>
-                                </tr>
-                            </table>
-                        </form>
-                        <xsl:apply-templates select="search/exception"/>
-                        <xsl:apply-templates select="results"/>
-                    </div>
-                </div>
-            </page:body>
-        </page:page>
-    </xsl:template>
-    
-    <xsl:template match="configuration">
-        <xsl:for-each select="publication">
-            <tr>
-                <td>Publications</td>
-                <td>
-                    <xsl:choose>
-                        <xsl:when test="@pid = ../@checked-pid">
-                            <input type="radio" name="publication-id">
-                                <xsl:attribute name="value">
-                                    <xsl:value-of select="@pid"/>
-                                </xsl:attribute>
-                                <xsl:attribute name="checked"/>
-                            </input>
-                            <xsl:value-of select="name"/>
-                        </xsl:when>
-                        <xsl:otherwise>
-                            <input type="radio" name="publication-id">
-                                <xsl:attribute name="value">
-                                    <xsl:value-of select="@pid"/>
-                                </xsl:attribute>
-                            </input>
-                            <xsl:value-of select="name"/>
-                        </xsl:otherwise>
-                    </xsl:choose>
-                </td>
-            </tr>
-            <tr>
-                <td>Fields</td>
-                <td>
-                    <select name="dummy-index-id.fields" class="lenya-form-element">
-                    <!-- TODO: ... -->
-                    <!--<select name="{@pid}.fields" class="lenya-form-element">-->
-                        <xsl:for-each select="search-fields/field">
-                            <option value="{.}">
-                                <xsl:if 
-                                    test="/search-and-results/search/fields/field = .">
-                                    <xsl:attribute name="selected">
-                                        selected</xsl:attribute>
-                                </xsl:if>
-                                <xsl:value-of select="."/>
-                            </option>
-                        </xsl:for-each>
-                    </select>
-                </td>
-            </tr>
-        </xsl:for-each>
-    </xsl:template>
-    
-    <xsl:template match="results">
-        <h3>Results for <xsl:value-of select="../search/publication-name"/></h3>
-        <xsl:choose>
-            <xsl:when test="hits">
-                <p> Documents <xsl:value-of 
-                    select="pages/page[@type='current']/@start"/> - 
-                    <xsl:value-of select="pages/page[@type='current']/@end"/> 
-                    of <xsl:value-of select="@total-hits"/> matches </p>
-                <!--
-      <p>Total Hits: <xsl:value-of select="@total-hits"/></p>
--->
-                <table width="90%" cellpadding="4" class="lenya-table">
-                    <tr>
-                        <td>&#160;</td>
-                        <td>Score</td>
-                        <td>Document</td>
-                    </tr>
-                    <xsl:apply-templates select="hits/hit"/>
-                </table>
-            </xsl:when>
-            <xsl:otherwise>
-                <p><strong>No results</strong> found.</p>
-            </xsl:otherwise>
-        </xsl:choose>
-        <xsl:apply-templates select="pages"/>
-    </xsl:template>
-    
-    <xsl:template match="hit">
-        <tr>
-            <td valign="top">
-                <xsl:value-of select="@pos"/>
-            </td>
-            <!--
-  <td><xsl:value-of select="position()"/></td>
--->
-            <td valign="top"><xsl:value-of select="score/@percent"/>%</td>
-            <xsl:choose>
-                <xsl:when test="path">
-                    <td>Document: <xsl:value-of select="path"/></td>
-                </xsl:when>
-                <xsl:when test="uri">
-                    <td> <strong><a><xsl:attribute name="href"><xsl:value-of 
-                        select="$contextprefix"/>/<xsl:value-of 
-                        select="/search-and-results/configuration/publication/@pid"/>/<xsl:value-of 
-                        select="$area"/><xsl:value-of 
-                        select="normalize-space(uri)"/></xsl:attribute><xsl:apply-templates 
-                        select="title"/></a></strong> <br />
-                        <xsl:apply-templates 
-                        select="excerpt"/><xsl:apply-templates 
-                        select="no-excerpt"/></td>
-                </xsl:when>
-                <xsl:otherwise>
-                    <td>Neither PATH nor URL</td>
-                </xsl:otherwise>
-            </xsl:choose>
-        </tr>
-    </xsl:template>
-    
-    <xsl:template match="title">
-        <xsl:value-of select="."/>
-    </xsl:template>
-    <xsl:template match="no-title"> (No Title.) </xsl:template>
-    <xsl:template match="excerpt"> ...&#160;<xsl:apply-templates/>&#160;... 
-        </xsl:template>
-    <xsl:template match="word">
-        <strong>
-            <xsl:value-of select="."/>
-        </strong>
-    </xsl:template>
-    
-    <xsl:template match="no-excerpt"> No excerpt available: <xsl:value-of 
-        select="file/@src"/> </xsl:template>
-    
-    <xsl:template match="mime-type">
-        <xsl:value-of select="."/>
-    </xsl:template>
-    
-    <xsl:template match="no-mime-type"> No mime-type! </xsl:template>
-
-    <xsl:template match="exception">
-        <p>
-            <font color="red">
-                <xsl:value-of select="."/>
-            </font>
-        </p>
-    </xsl:template>
-
-    <xsl:template match="pages">
-        <p> Result Pages <xsl:apply-templates select="page[@type='previous']" 
-            mode="previous"/> <xsl:for-each select="page"> <xsl:choose> 
-            <xsl:when test="@type='current'"> <xsl:value-of 
-            select="position()"/> </xsl:when> <xsl:otherwise> <a 
-            href="{$uriName}?publication-id={../../../search/publication-id}&amp;queryString={../../../search/query-string}&amp;sortBy={../../../search/sort-by}&amp;start={@start}&amp;end={@end}"><xsl:value-of 
-            select="position()"/></a> </xsl:otherwise> </xsl:choose> <xsl:text> 
-            </xsl:text> </xsl:for-each> <xsl:apply-templates 
-            select="page[@type='next']" mode="next"/> </p>
-    </xsl:template>
-
-    <xsl:template match="page" mode="next"> [<a 
-        href="{$uriName}?publication-id={../../../search/publication-id}&amp;queryString={../../../search/query-string}&amp;sortBy={../../../search/sort-by}&amp;start={@start}&amp;end={@end}">Next</a>&gt;&gt;] 
-        </xsl:template>
-
-    <xsl:template match="page" mode="previous"> [&lt;&lt;<a 
-        href="{$uriName}?publication-id={../../../search/publication-id}&amp;queryString={../../../search/query-string}&amp;sortBy={../../../search/sort-by}&amp;start={@start}&amp;end={@end}">Previous</a>] 
-        </xsl:template>
-
-    <xsl:template match="@*|node()">
-        <xsl:copy>
-            <xsl:apply-templates select="@*|node()"/>
-        </xsl:copy>
-    </xsl:template>
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/xslt/search/sort.xsl b/src/webapp/lenya/xslt/search/sort.xsl
deleted file mode 100644
index 2e6bfc1..0000000
--- a/src/webapp/lenya/xslt/search/sort.xsl
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: sort.xsl,v 1.3 2004/03/13 12:42:20 gregor Exp $ -->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-  <xsl:template match="hits">
-    <hits total-hits="{../@total-hits}">
-      <xsl:choose>
-        <xsl:when test="../../search/sort-by='score'">
-          <xsl:for-each select="hit">
-            <xsl:sort data-type="number" order="descending" select="score"/>
-            <xsl:apply-templates select="."/>
-          </xsl:for-each>
-        </xsl:when>
-        <xsl:when test="../../search/sort-by='title'">
-          <xsl:for-each select="hit">
-            <xsl:sort data-type="text" order="ascending" select="title"/>
-            <xsl:apply-templates select="."/>
-          </xsl:for-each>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:for-each select="hit">
-            <xsl:apply-templates select="."/>
-          </xsl:for-each>
-        </xsl:otherwise>
-      </xsl:choose>
-    </hits>
-  </xsl:template>
-
-  <xsl:template match="* | @*">
-    <xsl:copy>
-      <xsl:copy-of select="@*"/>
-      <xsl:apply-templates/>
-    </xsl:copy>
-  </xsl:template>
-
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/xslt/util/generate-insertAsset-xsl.xsl b/src/webapp/lenya/xslt/util/generate-insertAsset-xsl.xsl
deleted file mode 100644
index d414310..0000000
--- a/src/webapp/lenya/xslt/util/generate-insertAsset-xsl.xsl
+++ /dev/null
@@ -1,96 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: generate-insertAsset-xsl.xsl,v 1.5 2004/03/13 12:42:09 gregor Exp $ -->
-
-<!-- This is a meta xsl which generates another xsl, based on two -->
-<!-- params and an xml. The generated xsl is used to insert asset tags -->
-<!-- in a document. These asset tags can be very different, i.e. for -->
-<!-- images or for pdfs. Hence the generated xsl takes an -->
-<!-- configuration xml into account where the inserted tag can be -->
-<!-- defined. --> 
-
-<!-- See also O'Reilly's XSLT Cookbook  page 442, "Generating XSLT -->
-<!-- from XSLT" --> 
-
-<xsl:stylesheet version="1.0" 
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:xso="http://apache.org/cocoon/lenya/xslt/1.0" exclude-result-prefixes="xso">
-  
-  <!-- Let the processor do the formatting via indent = yes -->
-  <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
-  <xsl:strip-space elements="*"/>
-  <xsl:preserve-space elements="xsl:text"/>
-  
-  <!--We use xso as a alias when we need to output literal xslt elements -->
-  <xsl:namespace-alias stylesheet-prefix="xso" result-prefix="xsl"/>
-  
-  <xsl:param name="assetXPath"/>
-  <xsl:param name="insertWhere"/>
-  <xsl:param name="insertReplace"/>
-
-  <xsl:template match="/">
-    <xso:stylesheet version="1.0" xmlns="http://www.w3.org/1999/xhtml" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:unizh="http://unizh.ch/doctypes/common/1.0" exclude-result-prefixes="unizh">
-
-      <xsl:apply-templates select="//param"/>
-      <xsl:apply-templates select="//template"/>
-	
-	<!-- Identity transformation -->
-	<xso:template match="@*|*">
-	  <xso:copy>
-	    <xso:apply-templates select="@*|node()"/>
-	  </xso:copy>
-	</xso:template>  
-	
-    </xso:stylesheet>
-  </xsl:template>	
-
-  <xsl:template match="template">
-    <!-- Create a template that matches the assetXPath -->
-    <xso:template match="{$assetXPath}">
-      <xsl:choose>
-	<xsl:when test="$insertWhere = 'before'">
-	  <xsl:copy-of select="*"/>
-	  <xsl:if test="$insertReplace != 'true'">
-	    <xso:copy-of select="."/>
-	  </xsl:if>
-	</xsl:when>
-	<xsl:when test="$insertWhere = 'after'">
-	  <xsl:if test="$insertReplace != 'true'">
-	    <xso:copy-of select="."/>
-	  </xsl:if>
-	  <xsl:copy-of select="*"/>
-	</xsl:when>
-	<xsl:when test="$insertWhere = 'inside'">
-	  <xso:copy>
-	    <xsl:if test="$insertReplace != 'true'">
-	      <xso:copy-of select="@*|node()"/>
-	    </xsl:if>
-	    <xsl:copy-of select="*"/>
-	  </xso:copy>
-	</xsl:when>
-      </xsl:choose>
-    </xso:template>
-  </xsl:template>	
-  
-  <xsl:template match="param">
-    <xso:param>
-      <xsl:copy-of select="@*"/>
-    </xso:param>
-  </xsl:template>	
-  
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/xslt/util/linkRewrite.xsl b/src/webapp/lenya/xslt/util/linkRewrite.xsl
deleted file mode 100644
index 0eeb750..0000000
--- a/src/webapp/lenya/xslt/util/linkRewrite.xsl
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: linkRewrite.xsl,v 1.2 2004/03/13 12:42:09 gregor Exp $ -->
-
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:xhtml="http://www.w3.org/1999/xhtml"
-  exclude-result-prefixes="xhtml"
-  >
-
-  <xsl:param name="idbefore"/>
-  <xsl:param name="idafter"/>
-  
-  <xsl:template match="xhtml:a">
-    <xsl:variable name="href">
-      <xsl:choose>
-	<xsl:when test="@href=$idbefore">
-	  <xsl:value-of select="$idafter"/>
-	</xsl:when>
-	<xsl:otherwise>
-	  <xsl:value-of select="@href"/>
-	</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <a href="{$href}">
-      <xsl:apply-templates select="@*[not(local-name()='href')]|node()"/>
-    </a>
-  </xsl:template>
-
-  <xsl:template match="@*|node()" priority="-1">
-    <xsl:copy>
-      <xsl:apply-templates select="@*|node()"/>
-    </xsl:copy>
-  </xsl:template>
-
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/xslt/util/page-util.xsl b/src/webapp/lenya/xslt/util/page-util.xsl
deleted file mode 100644
index acc7a69..0000000
--- a/src/webapp/lenya/xslt/util/page-util.xsl
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: page-util.xsl,v 1.10 2004/03/13 12:42:09 gregor Exp $ -->
-
-<xsl:stylesheet version="1.0"
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    >
-
-<!-- includes the default CSS stylesheet -->
-<xsl:template name="include-css">
-  <xsl:param name="contextprefix"/>
-  <link rel="stylesheet" type="text/css" href="{$contextprefix}/lenya/css/default.css" media="screen"/>
-</xsl:template>
-    
-<!-- prints a list of $separator-separated strings -->
-<xsl:template name="print-list">
-  <xsl:param name="list-string"/>
-  <xsl:param name="separator" select="','"/>
-  <xsl:choose>
-    <xsl:when test="contains($list-string, $separator)">
-      <li><xsl:value-of select="substring-before($list-string, $separator)"/></li>
-      <xsl:call-template name="print-list">
-        <xsl:with-param name="list-string" select="substring-after($list-string, $separator)"/>
-        <xsl:with-param name="separator" select="$separator"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <li><xsl:value-of select="$list-string"/></li>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<!-- prints a list of $separator-separated strings -->
-<xsl:template name="print-list-simple">
-  <xsl:param name="list-string"/>
-  <xsl:param name="separator" select="','"/>
-
-  <xsl:choose>
-    <xsl:when test="contains($list-string, $separator)">
-      <xsl:value-of select="substring-before($list-string, $separator)"/><br />
-      <xsl:call-template name="print-list-simple">
-        <xsl:with-param name="list-string" select="substring-after($list-string, $separator)"/>
-        <xsl:with-param name="separator" select="$separator"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$list-string"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/xslt/util/page2xhtml.xsl b/src/webapp/lenya/xslt/util/page2xhtml.xsl
deleted file mode 100644
index 0a99b04..0000000
--- a/src/webapp/lenya/xslt/util/page2xhtml.xsl
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns="http://www.w3.org/1999/xhtml"
-    xmlns:xhtml="http://www.w3.org/1999/xhtml"
-    xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-    xmlns:i18n="http://apache.org/cocoon/i18n/2.1"    
-    exclude-result-prefixes="page xhtml i18n"
-    >
-
-<xsl:param name="contextprefix"/>
-
-<xsl:template match="page:page">
-  <html>
-    <head>
-      <title><xsl:value-of select="page:title"/></title>
-      <link rel="stylesheet" type="text/css" href="{$contextprefix}/lenya/css/default.css" title="default css"/>
-      <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8"/>
-<xsl:if test="count(xhtml:script) &gt; 0">
- <script><xsl:value-of select="xhtml:script" /> </script>
-</xsl:if>
-      <xsl:copy-of select="page:head/*"/>
-    </head>
-    <body>
-      <xsl:copy-of select="page:body/@*"/>
-    
-      <xsl:apply-templates select="page:title"/>
-      <table class="lenya-body" border="0" cellpadding="0" cellspacing="0">
-        <tr>
-          <xsl:if test="//xhtml:div[@class = 'lenya-sidebar']">
-            <td class="lenya-sidebar">
-              <xsl:copy-of select="//xhtml:div[@class = 'lenya-sidebar']/node()"/>
-            </td>
-          </xsl:if>
-          <td class="lenya-content">
-            <xsl:copy-of select="page:body/node()[local-name() != 'div' or not(@class = 'lenya-sidebar')]"/>
-          </td>
-        </tr>
-      </table>
-    </body>
-  </html>
-</xsl:template>
-
-
-<xsl:template match="page:title">
-  <table width="100%" border="0" cellpadding="10" cellspacing="0">
-    <tr>
-      <td class="lenya-header">
-        <h1><xsl:value-of select="."/></h1>
-      </td>
-      <td class="lenya-project-logo">
-        <img src="{$contextprefix}/lenya/images/project-logo-small.png" alt="Apache Lenya Project Logo"/>
-      </td>
-    </tr>
-  </table>
-  <div class="lenya-page-subtitle">
-    Open Source Content Management System
-  </div>
-</xsl:template>
-
-
-<xsl:template match="@*|node()">
-  <xsl:copy>
-    <xsl:apply-templates select="@*|node()"/>
-  </xsl:copy>
-</xsl:template>
-
-
-</xsl:stylesheet> 
diff --git a/src/webapp/lenya/xslt/util/page2xslt.xsl b/src/webapp/lenya/xslt/util/page2xslt.xsl
deleted file mode 100644
index b8e6bc9..0000000
--- a/src/webapp/lenya/xslt/util/page2xslt.xsl
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:xhtml="http://www.w3.org/1999/xhtml"
-    xmlns:xso="http://apache.org/cocoon/lenya/xslt/1.0"
-    xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
-    >
-
-<xsl:param name="contextprefix"/>
-
-<xsl:namespace-alias stylesheet-prefix="xso" result-prefix="xsl"/>
-
-
-<xsl:template match="xsl:stylesheet">
-  <xso:stylesheet version="1.0" xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0">
-    <xsl:copy-of select="@*"/>
-    <xsl:apply-templates/>
-  </xso:stylesheet>
-</xsl:template>
-
-
-<xsl:template match="xsl:param[@name='contextprefix']">
-  <xso:param name="contextprefix" select="'{$contextprefix}'"/>
-</xsl:template>
-
-
-<xsl:template match="@*|node()">
-  <xsl:copy>
-    <xsl:apply-templates select="@*|node()"/>
-  </xsl:copy>
-</xsl:template>
-
-
-</xsl:stylesheet> 
diff --git a/src/webapp/lenya/xslt/util/propfind.xsl b/src/webapp/lenya/xslt/util/propfind.xsl
deleted file mode 100644
index 4c61120..0000000
--- a/src/webapp/lenya/xslt/util/propfind.xsl
+++ /dev/null
@@ -1,145 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: propfind.xsl,v 1.6 2004/03/13 12:42:09 gregor Exp $ -->
-    
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dir="http://apache.org/cocoon/directory/2.0">
-  
-  <xsl:param name="depth"/>
-  <xsl:param name="href"/>
-  
-  <xsl:template match="/">
-    <D:multistatus xmlns:D="DAV:">
-      <xsl:choose>
-        <xsl:when test="$depth='0'">
-          <xsl:apply-templates select="dir:directory"/>
-        </xsl:when>
-        <xsl:when test="$depth='1'">
-          <xsl:apply-templates select="dir:directory/dir:directory"/>
-          <xsl:apply-templates select="dir:directory/dir:file"/>
-        </xsl:when>
-        <xsl:when test="$depth='infinity'"> Depth "infinity" not implemented yet!</xsl:when>
-        <xsl:otherwise> No such Depth implemented: <xsl:value-of select="$depth"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </D:multistatus>
-  </xsl:template>
-  
-  
-  <xsl:template match="dir:directory">
-    <D:response xmlns:D="DAV:" xmlns:lp1="DAV:" xmlns:lp2="http://apache.org/dav/props/">
-      <xsl:if test="$depth='0'">
-        <D:href>
-          <xsl:value-of select="$href"/>
-        </D:href>
-      </xsl:if>
-      <xsl:if test="$depth='1'">
-        <D:href>
-          <xsl:value-of select="$href"/>
-          <xsl:value-of select="@name"/>/</D:href>
-      </xsl:if>
-      <D:propstat>
-        <D:prop>
-          <lp1:resourcetype>
-            <D:collection/>
-          </lp1:resourcetype>
-          <lp1:creationdate>2003-07-21T13:03:09Z</lp1:creationdate>
-          <!--
-<lp1:getlastmodified><xsl:value-of select="@date"/>  (<xsl:value-of select="@lastModified"/>)</lp1:getlastmodified>
--->
-          <lp1:getlastmodified>Wed, 27 Aug 2003 12:50:23 GMT</lp1:getlastmodified>
-          <lp1:getetag>"945fd7-4f-5c287d40"</lp1:getetag>
-          <D:supportedlock>
-            <D:lockentry>
-              <D:lockscope>
-                <D:exclusive/>
-              </D:lockscope>
-              <D:locktype>
-                <D:write/>
-              </D:locktype>
-            </D:lockentry>
-            <D:lockentry>
-              <D:lockscope>
-                <D:shared/>
-              </D:lockscope>
-              <D:locktype>
-                <D:write/>
-              </D:locktype>
-            </D:lockentry>
-          </D:supportedlock>
-          <D:lockdiscovery/>
-          <D:getcontenttype>httpd/unix-directory</D:getcontenttype>
-        </D:prop>
-        <D:status>HTTP/1.1 200 OK</D:status>
-      </D:propstat>
-    </D:response>
-  </xsl:template>
-  
-  
-  <xsl:template match="dir:file">
-    <D:response xmlns:D="DAV:" xmlns:lp1="DAV:" xmlns:lp2="http://apache.org/dav/props/">
-      <xsl:if test="$depth='0'">
-        <D:href>
-          <xsl:value-of select="$href"/>
-        </D:href>
-      </xsl:if>
-      <xsl:if test="$depth='1'">
-        <D:href>
-          <xsl:value-of select="$href"/>
-          <xsl:value-of select="@name"/>
-        </D:href>
-      </xsl:if>
-      <D:propstat>
-        <D:prop>
-          <lp1:resourcetype/>
-          <lp1:creationdate>2003-07-21T13:03:09Z</lp1:creationdate>
-          <lp1:getcontentlength>
-            <xsl:value-of select="@size"/>
-          </lp1:getcontentlength>
-          <!--
-<lp1:getlastmodified><xsl:value-of select="@date"/> (<xsl:value-of select="@lastModified"/>)</lp1:getlastmodified>
--->
-          <lp1:getlastmodified>Wed, 27 Aug 2003 08:25:20 GMT</lp1:getlastmodified>
-          <lp1:getetag>"945fd7-4f-5c287d40"</lp1:getetag>
-          <D:supportedlock>
-            <D:lockentry>
-              <D:lockscope>
-                <D:exclusive/>
-              </D:lockscope>
-              <D:locktype>
-                <D:write/>
-              </D:locktype>
-            </D:lockentry>
-            <D:lockentry>
-              <D:lockscope>
-                <D:shared/>
-              </D:lockscope>
-              <D:locktype>
-                <D:write/>
-              </D:locktype>
-            </D:lockentry>
-          </D:supportedlock>
-          <D:lockdiscovery/>
-          <D:getcontenttype>text/xml</D:getcontenttype>
-        </D:prop>
-        <D:status>HTTP/1.1 200 OK</D:status>
-      </D:propstat>
-    </D:response>
-  </xsl:template>
-  
-  
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/xslt/util/publication.xsl b/src/webapp/lenya/xslt/util/publication.xsl
deleted file mode 100644
index 20def00..0000000
--- a/src/webapp/lenya/xslt/util/publication.xsl
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
-    xmlns:lenya="http://apache.org/cocoon/lenya/publication/1.0"
-    xmlns="http://www.w3.org/1999/xhtml"
-    xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
->
-
-<xsl:template match="/">
-  <xsl:apply-templates select="/lenya:publication"/>
-</xsl:template>
-
-<xsl:template match="lenya:publication">
-<page:page>
-  <page:title>Lenya CMS Publication: <xsl:value-of select="lenya:name"/></page:title>
-  <page:body>
-
-<div class="lenya-sidebar">
-<div class="lenya-sidebar-heading">This&#160;Publication</div>
-<ul>
-  <li><a href="authoring/">Login&#160;as&#160;Editor</a></li>
-</ul>
-<div class="lenya-publication-item"><a href="../index.html">Other&#160;Publications</a></div>
-<div class="lenya-publication-item"><a href="http://lenya.apache.org/docs/index.html">Documentation</a></div>
-<div class="lenya-publication-item"><a href="http://wiki.apache.org/lenya">Wiki</a></div>
-</div>
-
-<div class="lenya-frontpage">
-<xsl:apply-templates select="lenya:description"/>
-<xsl:apply-templates select="lenya:tests"/>
-</div>
-
-</page:body>
-</page:page>
-</xsl:template>
-
-<xsl:template match="lenya:description">
-<h2><xsl:value-of select="../lenya:name"/></h2>
-<xsl:apply-templates select="../lenya:pub-version"/>
-(Based on
-<xsl:apply-templates select="../lenya:lenya-version"/>
-<xsl:apply-templates select="../lenya:cocoon-version"/>
-)
-<p>
-<h3>About</h3>
-  <xsl:apply-templates />
-  <br/><br/>
-  <xsl:apply-templates select="../lenya:readme"/>
-</p>
-</xsl:template>
-
-<xsl:template match="lenya:readme">
-<h3>Readme</h3>
-  <xsl:apply-templates />
-</xsl:template>
-
-<xsl:template match="lenya:version|lenya:lenya-version">
-Lenya <strong><xsl:value-of select="."/></strong>
-</xsl:template>
-
-<xsl:template match="lenya:cocoon-version">
-,&#160;Cocoon <strong><xsl:value-of select="."/></strong>
-</xsl:template>
-
-<xsl:template match="lenya:pub-version">
-Version: <strong><xsl:value-of select="."/></strong><br/>
-</xsl:template>
-
-<xsl:template match="lenya:tests">
-<a name="lenya:tests" />
-<h3>Tests</h3>
-<ol>
-  <xsl:apply-templates select="lenya:test"/>
-</ol>
-</xsl:template>
-
-<xsl:template match="lenya:test">
-  <li><xsl:apply-templates /></li>
-</xsl:template>
-
-<xsl:template match="@*|node()">
-  <xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/xslt/util/sitetree2navigation.xsl b/src/webapp/lenya/xslt/util/sitetree2navigation.xsl
deleted file mode 100644
index 30122c4..0000000
--- a/src/webapp/lenya/xslt/util/sitetree2navigation.xsl
+++ /dev/null
@@ -1,111 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: sitetree2navigation.xsl,v 1.2 2004/03/13 12:42:09 gregor Exp $ -->
-
-<xsl:stylesheet
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
-  xmlns:lenya="http://www.wyona.org/2003/"
-  version="1.0">
-
-
-  <xsl:output indent="yes"/>
-
-  <xsl:param name="nav_id"/>
-
-
-  <!-- the idea is to use the xsl:key function -->
-  <!-- xsl:key name="nav_id_key" match="//node" use="@id"/ -->
-
-
-<xsl:template match="sitetree">
-  <navigation xmlns:lenya="http://www.wyona.org/2003/">
-    <nav_id><xsl:value-of select="$nav_id"/></nav_id>
-    <xsl:apply-templates select="block"/>
-  </navigation>
-</xsl:template>
-
-
-
-<xsl:template match="block">
-    <xsl:if test="@id='main'">
-      <main-navigation>
-        <xsl:apply-templates select="node"/>
-      </main-navigation>
-    </xsl:if>
-
-
-    <xsl:if test="@id='top'">
-      <top-navigation>
-        <xsl:apply-templates select="node"/>
-      </top-navigation>
-    </xsl:if>
-    <xsl:if test="@id='left'">
-      <navigation>
-        <xsl:apply-templates select="node"/>
-      </navigation>
-    </xsl:if>
-</xsl:template>
-
-
-
-<xsl:template match="node">
-    <xsl:param name="level" select="1"/>
-
-    <xsl:variable name="target">
-      <xsl:choose>
-        <xsl:when test="@id=$nav_id">
-          <xsl:value-of select="'file'"/>
-        </xsl:when>
-        <xsl:when test="descendant::node[@id=$nav_id]">
-          <!-- the idea is to use the xsl:key function -->
-          <!-- xsl:when test="key( 'nav_id_key', $nav_id )" -->
-          <xsl:value-of select="'dir'"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="''"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-
-    <item nav_id="{@id}">
-      <xsl:attribute name="level"><xsl:value-of select="$level"/></xsl:attribute>
-      <xsl:if test="$target != ''">
-        <xsl:attribute name="target"><xsl:value-of select="$target"/></xsl:attribute>
-      </xsl:if>
-      <xsl:if test="@link">
-        <xsl:attribute name="href"><xsl:value-of select="@link"/></xsl:attribute>
-      </xsl:if>
-
-      <xsl:apply-templates select="name"/>
-
-      <xsl:if test="$target = 'dir' ">
-        <xsl:apply-templates select="node">
-          <xsl:with-param name="level" select="$level + 1"/>
-        </xsl:apply-templates>
-      </xsl:if>
-
-    </item>
-</xsl:template>
-
-
-
-<xsl:template match="name">
-    <name><xsl:apply-templates/></name>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/xslt/util/string-functions.xsl b/src/webapp/lenya/xslt/util/string-functions.xsl
deleted file mode 100644
index 0b068df..0000000
--- a/src/webapp/lenya/xslt/util/string-functions.xsl
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-<!-- search and replace from XSLT cookbook -->
-<xsl:template name="search-and-replace">
-  <xsl:param name="input"/>
-  <xsl:param name="search-string"/>
-  <xsl:param name="replace-string"/>
-  
-  <xsl:choose>
-    <!-- See if the input contains the search string -->
-    <xsl:when test="$search-string and contains($input, $search-string)">
-      <!-- If so, then concatenate the substring before the search
-      string to the replacement string and to the result of
-      recursively applying this template to the remaining substring.
-      -->
-      <xsl:value-of select="substring-before($input, $search-string)"/>
-      <xsl:value-of select="$replace-string"/>
-      <xsl:call-template name="search-and-replace">
-        <xsl:with-param name="input" select="substring-after($input, $search-string)"/>
-        <xsl:with-param name="search-string" select="$search-string"/>
-        <xsl:with-param name="replace-string" select="$replace-string"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <!-- There are no more occurences of the search string so
-      just return the current input string -->
-      <xsl:value-of select="$input"/>
-    </xsl:otherwise>
-  </xsl:choose>
-  
-</xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/src/webapp/lenya/xslt/util/strip_namespaces.xsl b/src/webapp/lenya/xslt/util/strip_namespaces.xsl
deleted file mode 100644
index 3dc02b3..0000000
--- a/src/webapp/lenya/xslt/util/strip_namespaces.xsl
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2005 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!--
-The XHTML namespace is declared as the default namespace
-to cause the stylesheet to output XHTML using the empty string
-as namespace prefix (<html> instead of <xhtml:html>).
--->
-
-<!-- $Id$ -->
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns="http://www.w3.org/1999/xhtml">
-  
-  <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
-  
-  <xsl:template match="*">
-    <xsl:element name="{local-name()}" namespace="{namespace-uri()}">
-      <xsl:copy-of select="@*"/>
-      <xsl:apply-templates/>
-    </xsl:element>
-  </xsl:template>
-
-  <!--
-    Workaround to prevent the serializer from collapsing these
-    elements, since browsers currently can not handle things like
-      <textarea/>
-    The XHTML serializer currently used by Lenya can not be
-    configured to avoid this collapsing; as long as that is the case
-    this workaround is needed.
-    -->  
-  <xsl:template match="textarea|script|style">
-   <xsl:element name="{local-name()}">
-      <xsl:copy-of select="@*"/>
-      <xsl:apply-templates/>
-	  <xsl:if test="string-length(.) = 0"><xsl:text> </xsl:text></xsl:if>
-    </xsl:element>
-  </xsl:template>
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/xslt/util/upper2lower_case.xsl b/src/webapp/lenya/xslt/util/upper2lower_case.xsl
deleted file mode 100644
index e788c70..0000000
--- a/src/webapp/lenya/xslt/util/upper2lower_case.xsl
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: upper2lower_case.xsl,v 1.2 2004/03/13 12:42:09 gregor Exp $ -->
-    
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-<xsl:output method="xml"/>
-
-<xsl:template match="*"> <!-- "*" = all elements-->
-   <xsl:element name="{translate(name(), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 
-'abcdefghijklmnopqrstuvwxyz')}">
-   <xsl:apply-templates select="node()|@*"/>
-    </xsl:element>
-</xsl:template>
-
-<xsl:template match="@*"> <!-- "*" = all attributes of elements-->
-   <xsl:attribute  name="{translate(name(), 
-'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')}">
-     <xsl:value-of select="."/>
-   </xsl:attribute>
-</xsl:template>
-
-<xsl:template match="node()" priority="-1">
-	<xsl:copy>
-		<xsl:apply-templates select="node()|@*"/>
-	</xsl:copy>
-</xsl:template>
-
-
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/xslt/util/welcome.xsl b/src/webapp/lenya/xslt/util/welcome.xsl
deleted file mode 100644
index cc2d0f3..0000000
--- a/src/webapp/lenya/xslt/util/welcome.xsl
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:lenya="http://apache.org/cocoon/lenya/publication/1.0"
-    xmlns="http://www.w3.org/1999/xhtml"
-    xmlns:xhtml="http://www.w3.org/1999/xhtml"
-    xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-    >
-
-<xsl:template match="lenya:lenya">
-  <page:page>
-    
-  <page:title>Apache Lenya - Content Management System</page:title>
-  <page:body>
-    <xsl:apply-templates select="xhtml:div[@class = 'lenya-frontpage']"/>
-    <xsl:apply-templates select="lenya:publications"/>
-  </page:body>
-  </page:page>
-</xsl:template>
-
-<xsl:template match="lenya:publications">
-<div class="lenya-sidebar">
-<div class="lenya-sidebar-heading">Publications</div>
-  <div class="lenya-publication-item">
-    <strong><a href="index.html?lenya.usecase=publication.createPublicationFromTemplate">New publication</a></strong>
-  </div>
-<xsl:for-each select="lenya:publication">
-  <xsl:choose>
-    <xsl:when test="lenya:publication/@lenya:show = 'false'">
-      <!-- do not list this publication. Might be a "template" publication -->
-    </xsl:when>
-    <xsl:otherwise>
-      <div class="lenya-publication-item">
-        <a href="{@pid}/introduction.html">
-        <xsl:value-of select="lenya:publication/lenya:name|lenya:publication/lenya:name/@name"/></a>
-      </div>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:for-each>
-</div>
-</xsl:template>
-
-<xsl:template match="@*|node()">
-  <xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/xslt/util/xinclude.xsl b/src/webapp/lenya/xslt/util/xinclude.xsl
deleted file mode 100644
index 6a2b0dc..0000000
--- a/src/webapp/lenya/xslt/util/xinclude.xsl
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet version="1.0"
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:xi="http://www.w3.org/2001/XInclude"
-    xmlns:lenya="http://apache.org/cocoon/lenya/publication/1.0"
-    xmlns:dir="http://apache.org/cocoon/directory/2.0"
-    >
-
-<xsl:template match="/">
-  <xsl:apply-templates select="dir:directory"/>
-</xsl:template>                                                                                                                             
-<xsl:template match="dir:directory" >
-<lenya:publications>
-  <xsl:for-each select="dir:directory">
-    <lenya:publication pid="{@name}">
-        <xi:include href="lenya/pubs/{@name}/publication.xml">
-          <xi:fallback>
-            <lenya:name name="{@name}"/>
-          </xi:fallback>
-        </xi:include>
-    </lenya:publication>
-  </xsl:for-each>
-</lenya:publications>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/xslt/xopus/response.xsl b/src/webapp/lenya/xslt/xopus/response.xsl
deleted file mode 100644
index 11cfc18..0000000
--- a/src/webapp/lenya/xslt/xopus/response.xsl
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: response.xsl,v 1.2 2004/03/13 12:42:14 gregor Exp $ -->
-    
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-  <xsl:template match="/">
-    <response id="$reqId"
-              status="ok"
-              type="$reqType">
-      <data id="$reqFile"
-            type="$fileType">
-        <xsl:copy-of select="."/>
-      </data>
-    </response>          
-  </xsl:template>
-</xsl:stylesheet>
diff --git a/src/webapp/lenya/xslt/xopus/root.xsl b/src/webapp/lenya/xslt/xopus/root.xsl
deleted file mode 100644
index 686d229..0000000
--- a/src/webapp/lenya/xslt/xopus/root.xsl
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id: root.xsl,v 1.6 2004/03/13 12:42:14 gregor Exp $ -->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
- 
-<xsl:output version="1.0" indent="yes" encoding="ISO-8859-1"/>
-
-<xsl:include href="xopus.xsl"/>
-
-<xsl:template match="/">
-  <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:variable name="context_prefix" select="/lenya/menu/context_prefix"/>
-
-<xsl:template match="lenya">
-  <html>
-    <xsl:call-template name="xopus_html_attribute"/>
-    <xsl:call-template name="xopus_top"/>
-    <head>
-      <xsl:call-template name="xopus_head"/>
-      <title>Authoring</title>
-    <style type="text/css">
-      <xsl:comment>
-        .alenya {
-            color: #0066FF;
-            text-decoration: none;
-        }
-
-        .alenya:visited {
-            <!--color: #669999;-->
-            color: #0066FF;
-            text-decoration: none;
-        }
-      </xsl:comment>
-    </style>
-    </head>
-    <body bgcolor="#ffffff">
-      <xsl:call-template name="xopus_body"/>
-
-      <xsl:apply-templates select="cmsbody"/>
-    </body>
-  </html>
-</xsl:template>
-
-<xsl:template match="xopus" mode="top">
-  <xsl:call-template name="xopus_top"/>
-</xsl:template>
-
-<xsl:template match="xopus" mode="head">
-  <xsl:call-template name="xopus_head"/>
-</xsl:template>
-
-<xsl:template match="xopus" mode="body">
-  <xsl:call-template name="xopus_body"/>
-</xsl:template>
-
-<xsl:template match="xopus" mode="html_attribute">
-  <xsl:call-template name="xopus_html_attribute"/>
-</xsl:template>
- 
-</xsl:stylesheet>  
diff --git a/src/webapp/lenya/xslt/xopus/xopus.xsl b/src/webapp/lenya/xslt/xopus/xopus.xsl
deleted file mode 100644
index 8c0e9ec..0000000
--- a/src/webapp/lenya/xslt/xopus/xopus.xsl
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-
-<!-- $Id$ -->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:t="http://www.q42.nl/t">
-
-<xsl:output version="1.0" indent="yes"/>
-
-<xsl:variable name="xopus_path">/xopus2</xsl:variable>
-
-<xsl:template name="xopus_html_attribute">
-</xsl:template>
-
-
-<xsl:template name="xopus_top">
-</xsl:template>
-
-<xsl:template name="xopus_head">
-	<script language="javascript" src="/lenya/xopus/xopus/xopus.js">;</script>
-	<script language="javascript">
-		//xopus_globs.LENYA_CMS_URL="<xsl:value-of select="$context_prefix" />";
- 
-                // Xopus 2.0.0.1
-		//xopus_consts.LENYA_CMS_URL="<xsl:value-of select="$context_prefix" />/xopus/XopusInterface";
-
-                // Xopus 2.0.0.8
-		xopus_globs.WYONA_CMS_URL="<xsl:value-of select="$context_prefix" />/xopus/XopusInterface";
-		xopus_globs.WYONA_CMS_EXIT_URL="<xsl:value-of select="substring-before(/lenya/menu/request_uri,'/xopus2')" /><xsl:value-of select="substring-after(/lenya/menu/request_uri,'/xopus2')"/>";
-	</script>
-</xsl:template>
-
-
-
-<xsl:template name="xopus_body">
-</xsl:template>
-
-
-
-
-
-</xsl:stylesheet>
-
diff --git a/tools/anttasks/BulkCopyTask.java b/tools/anttasks/BulkCopyTask.java
deleted file mode 100644
index 8a3ac56..0000000
--- a/tools/anttasks/BulkCopyTask.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.ant;
-
-import java.io.File;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.taskdefs.Copy;
-import org.apache.tools.ant.types.FileSet;
-import org.apache.tools.ant.types.Path;
-
-/**
- * Copies all files matching filename or a all specififed filesets from each source directory.
- * <br/><br/>
- * Usage:
- * &lt;bulkCopy 
- *     sourcedirs="dirOne:dirTwo" 
- *     todir="WEB-INF/" 
- *     flatten="true">
- *     &lt;fileset includes="java/lib/*"/&gt;
- * &lt;/bulkCopy&gt;
- * <br/><br/>
- * The above sample copies <em>dirOne/java/lib/*</em> and <em>dirTwo/java/lib/*</em>
- * to <em>WEB-INF/lib</em>.  
- */
-public class BulkCopyTask extends Copy {
-    
-    private Path sourceDirs;
-    
-    /** 
-     * @see org.apache.tools.ant.taskdefs.Copy#execute()
-     */
-    public void execute() throws BuildException {
-                
-        final StringTokenizer sourceDirTokens = new StringTokenizer(this.sourceDirs.toString(), File.pathSeparator);
-            
-        while (sourceDirTokens.hasMoreTokens()) {
-            final String sourceDir = sourceDirTokens.nextToken();
-            
-            for(int i=0; i<getFileSets().size(); i++)
-                ((FileSet) getFileSets().get(i)).setDir(new File(sourceDir));
-            
-            super.execute();
-        }
-    }
-
-    /**
-     * @param _sourceDirs Colon seperated list of source directories
-     */
-    public void setSourceDirs(Path _sourceDirs) {
-        this.sourceDirs = _sourceDirs;
-    }
-    
-    /**
-     * @return Returns the fileSet.
-     */
-    private List getFileSets() {
-        return super.filesets;
-    }    
-}
diff --git a/tools/anttasks/CopyJavaSourcesTask.java b/tools/anttasks/CopyJavaSourcesTask.java
deleted file mode 100644
index c5041f4..0000000
--- a/tools/anttasks/CopyJavaSourcesTask.java
+++ /dev/null
@@ -1,242 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.ant;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.StringTokenizer;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.types.Path;
-
-/**
- * Task to copy java sources.
- */
-public class CopyJavaSourcesTask extends Task {
-
-    private Path pubsRootDirs;
-    private String javaDir;
-    private String buildDir;
-
-    /**
-     * @see org.apache.tools.ant.Task#execute()
-     */
-    public void execute() throws BuildException {
-        int numberOfDirectoriesCreated = 0;
-        int numberOfFilesCopied = 0;
-        TwoTuple twoTuple = new TwoTuple(numberOfDirectoriesCreated, numberOfFilesCopied);
-
-        String translatedBuildDir = Project.translatePath(this.buildDir);
-        File absoluteBuildDir = null;
-        if (translatedBuildDir != null && translatedBuildDir.startsWith(File.separator)) {
-            absoluteBuildDir = new File(translatedBuildDir);
-        } else {
-	    absoluteBuildDir = new File(getProject().getBaseDir(), 
-                    translatedBuildDir);
-        }
-       
-        StringTokenizer st = new StringTokenizer(this.pubsRootDirs.toString(), File.pathSeparator);
-
-        while (st.hasMoreTokens()) {
-            String pubsRootDir = st.nextToken();
-
-            File path = new File(pubsRootDir);
-
-            if (path.isDirectory()) {
-                if (new File(path, "publication.xml").isFile()) {
-                    copyContentOfDir(new File(path, this.javaDir), absoluteBuildDir, twoTuple,
-                            new JavaFilenameFilter(), this);
-                } else {
-                    // FIXME: Look for publications defined by the file "publication.xml"
-                    String[] pubs = path.list();
-
-                    for (int i = 0; i < pubs.length; i++) {
-                        File pubJavaDir = new File(path, new File(pubs[i], this.javaDir).toString());
-
-                        copyContentOfDir(pubJavaDir, absoluteBuildDir, twoTuple,
-                                new JavaFilenameFilter(), this);
-                    }
-                }
-            } else {
-                throw new BuildException("No such directory: " + path);
-            }
-        }
-
-        numberOfDirectoriesCreated = twoTuple.x;
-        numberOfFilesCopied = twoTuple.y;
-        log("Copying " + numberOfDirectoriesCreated + " directories to " + absoluteBuildDir,
-                Project.MSG_INFO);
-        log("Copying " + numberOfFilesCopied + " files to " + absoluteBuildDir, Project.MSG_INFO);
-    }
-
-    /**
-     * Copies the directory "source" into the directory "destination"
-     * @param source The source directory
-     * @param destination The destination directory
-     * @param twoTuple The twoTuple to use
-     * @param filenameFilter The filename filter to apply
-     * @param client The client task
-     */
-    public static void copyDir(File source, File destination, TwoTuple twoTuple,
-            FilenameFilter filenameFilter, Task client) {
-        File actualDestination = new File(destination, source.getName());
-        actualDestination.mkdirs();
-        copyContentOfDir(source, actualDestination, twoTuple, filenameFilter, client);
-    }
-
-    /**
-     * Copies the content of a directory into another directory
-     * @param source The source directory
-     * @param destination The destination directory
-     * @param twoTuple The twoTuple to use
-     * @param filenameFilter The filename filter to use
-     * @param client The client task
-     */
-    public static void copyContentOfDir(File source, File destination, TwoTuple twoTuple,
-            FilenameFilter filenameFilter, Task client) {
-        if (source.isDirectory()) {
-            String[] files;
-
-            if (filenameFilter != null) {
-                files = source.list(filenameFilter);
-            } else {
-                files = source.list();
-            }
-
-            for (int i = 0; i < files.length; i++) {
-                File file = new File(source, files[i]);
-
-                if (file.isFile()) {
-                    copyFile(file, new File(destination, files[i]), twoTuple, client);
-                } else if (file.isDirectory()) {
-                    copyContentOfDir(file, new File(destination, files[i]), twoTuple,
-                            filenameFilter, client);
-                } else {
-                    client.log(
-                            "CopyJavaSourcesTask.copyContentOfDir(): Neither file nor directory: "
-                                    + file, Project.MSG_ERR);
-                }
-            }
-        } 
-    }
-
-    /**
-     * Copies the content of a file into another file
-     * @param source The source file (not a directory!)
-     * @param destination File (not a directory!)
-     * @param twoTuple The twoTuple to use
-     * @param client The client task
-     */
-    public static void copyFile(File source, File destination, TwoTuple twoTuple, Task client) {
-        if (source.isFile()) {
-            File parentDest = new File(destination.getParent());
-
-            if (!parentDest.exists()) {
-                parentDest.mkdirs();
-
-                int numberOfDirectoriesCreated = twoTuple.x;
-                numberOfDirectoriesCreated++;
-                twoTuple.x = numberOfDirectoriesCreated;
-            }
-
-            if (destination.isFile()) {
-                if (destination.lastModified() > source.lastModified()) {
-                    return;
-                }
-            }
-
-            byte[] buffer = new byte[1024];
-            int bytesRead = -1;
-            InputStream in = null;
-            OutputStream out = null;
-
-            try {
-                in = new FileInputStream(source);
-                out = new FileOutputStream(destination);
-
-                while ((bytesRead = in.read(buffer)) >= 0) {
-                    out.write(buffer, 0, bytesRead);
-                }
-            } catch (final FileNotFoundException e) {
-                StringWriter writer = new StringWriter();
-                e.printStackTrace(new PrintWriter(writer));
-                client.log("Exception caught: " + writer.toString());
-            } catch (final IOException e) {
-                StringWriter writer = new StringWriter();
-                e.printStackTrace(new PrintWriter(writer));
-                client.log("Exception caught: " + writer.toString());
-            } finally {
-                try {
-                    if (out != null) {
-                        out.close();
-                    }
-                    if (in != null) {
-                        in.close();
-                    }
-                } catch (final IOException e1) {
-                    StringWriter writer = new StringWriter();
-                    e1.printStackTrace(new PrintWriter(writer));
-                    client.log("Exception closing stream: " + writer.toString());
-                }
-            }
-
-            int numberOfFilesCopied = twoTuple.y;
-            numberOfFilesCopied++;
-            twoTuple.y = numberOfFilesCopied;
-
-        } else {
-            client.log("No such file: " + source, Project.MSG_ERR);
-        }
-    }
-
-    /**
-     * Set the root publication root directories
-     * @param _pubsRootDirs The root directories
-     */
-    public void setPubsRootDirs(Path _pubsRootDirs) {
-        this.pubsRootDirs = _pubsRootDirs;
-    }
-
-    /**
-     * Set the java directory
-     * @param _javaDir The java directory
-     */
-    public void setJavaDir(String _javaDir) {
-        this.javaDir = _javaDir;
-    }
-
-    /**
-     * Set the build directory
-     * @param _buildDir The build directory
-     */
-    public void setBuildDir(String _buildDir) {
-        this.buildDir = _buildDir;
-    }
-}
\ No newline at end of file
diff --git a/tools/anttasks/CopyTask.java b/tools/anttasks/CopyTask.java
deleted file mode 100644
index e03e863..0000000
--- a/tools/anttasks/CopyTask.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.ant;
-
-import java.io.File;
-import java.io.FilenameFilter;
-import java.util.StringTokenizer;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.types.Path;
-
-
-/**
- * Task to copy files
- */
-public class CopyTask extends Task {
-    private Path pubsRootDirs;
-    private Path toDir;
-    private String excludes;
-
-	/** (non-Javadoc)
-	 * @see org.apache.tools.ant.Task#execute()
-	 */
-    public void execute() throws BuildException {
-        int numberOfDirectoriesCreated = 0;
-        int numberOfFilesCopied = 0;
-        TwoTuple twoTuple = new TwoTuple(numberOfDirectoriesCreated, numberOfFilesCopied);
-
-        StringTokenizer st = new StringTokenizer(this.pubsRootDirs.toString(), File.pathSeparator);
-
-        log("Excludes " + this.excludes);
-        FilenameFilter filter = new SCMFilenameFilter(this.excludes);
-
-        while (st.hasMoreTokens()) {
-            String pubsRootDir = st.nextToken();
-
-            if (new File(pubsRootDir, "publication.xml").isFile()) {
-                CopyJavaSourcesTask.copyDir(new File(pubsRootDir), new File(this.toDir.toString()),
-                    twoTuple, filter, this);
-            } else {
-                // FIXME: Look for publications defined by the file "publication.xml"
-                CopyJavaSourcesTask.copyContentOfDir(new File(pubsRootDir),
-                    new File(this.toDir.toString()), twoTuple, filter, this);
-            }
-        }
-
-        numberOfDirectoriesCreated = twoTuple.x;
-        numberOfFilesCopied = twoTuple.y;
-        log("Copying " + numberOfDirectoriesCreated + " directories to " + this.toDir);
-        log("Copying " + numberOfFilesCopied + " files to " + this.toDir);
-    }
-
-    /**
-     * Where the publications are located
-     * 
-     * @param _pubsRootDirs
-     */
-    public void setPubsRootDirs(Path _pubsRootDirs) {
-        this.pubsRootDirs = _pubsRootDirs;
-    }
-
-    /**
-     * Where the publications shall be copied to
-     * 
-     * @param _toDir
-     */
-    public void setToDir(Path _toDir) {
-        this.toDir = _toDir;
-    }
-
-    /**
-     * Which filenames shall be excluded
-     *
-     * @param _excludes
-     */
-    public void setExcludes(String _excludes) {
-        this.excludes = _excludes;
-    }
-}
diff --git a/tools/anttasks/JavaFilenameFilter.java b/tools/anttasks/JavaFilenameFilter.java
deleted file mode 100644
index 129c614..0000000
--- a/tools/anttasks/JavaFilenameFilter.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.ant;
-
-import java.io.File;
-import java.io.FilenameFilter;
-import java.util.Arrays;
-import java.util.StringTokenizer;
-
-/**
- * A filename filter for .java, .properties, .xml and .xsl files
- * FIXME this class is named badly
- */
-public class JavaFilenameFilter implements FilenameFilter {
-    
-    private static final String[] SUFFIXES = { "java", "properties", "xml", "xsl" };
-
-	/**
-	 * @see java.io.FilenameFilter#accept(java.io.File, java.lang.String)
-	 */
-    public boolean accept(File dir, String name) {
-        boolean accept = true;
-        if (new File(dir, name).isFile()) {
-            String suffix = getExtension(name);
-            if (!Arrays.asList(SUFFIXES).contains(suffix)) {
-                accept = false;
-            }
-        }
-        return accept;
-    }
-
-	/**
-	 * Get the extension
-	 * @param filename the file name from which the extension is extracted
-	 * @return the extension
-	 */
-    static public String getExtension(String filename) {
-        StringTokenizer st = new StringTokenizer(filename, ".");
-        st.nextToken();
-
-        String extension = "";
-
-        while (st.hasMoreTokens()) {
-            extension = st.nextToken();
-        }
-
-        return extension;
-    }
-}
diff --git a/tools/anttasks/SCMFilenameFilter.java b/tools/anttasks/SCMFilenameFilter.java
deleted file mode 100644
index e533e40..0000000
--- a/tools/anttasks/SCMFilenameFilter.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.ant;
-
-import java.io.File;
-import java.io.FilenameFilter;
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * Filter to exclude SCM files, such as CVS and .svn.
- * A set of filenames (provided as comma-separated list) is excluded.
- */
-public class SCMFilenameFilter implements FilenameFilter {
-    
-    private List excludes;
-
-    /**
-     * Ctor.
-     * @param _excludes A comma-separated list of file names, e.g. CVS,.svn
-     */
-    public SCMFilenameFilter(String _excludes) {
-        this.excludes = Arrays.asList(_excludes.split(","));
-    }
-
-    /**
-     * @see java.io.FilenameFilter#accept(java.io.File, java.lang.String)
-     */
-    public boolean accept(File dir, String name) {
-        return !this.excludes.contains(name);
-    }
-}
diff --git a/tools/anttasks/TwoTuple.java b/tools/anttasks/TwoTuple.java
deleted file mode 100644
index 60a0976..0000000
--- a/tools/anttasks/TwoTuple.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright  1999-2004 The Apache Software Foundation
- *
- *  Licensed 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.
- *
- */
-
-/* $Id$  */
-
-package org.apache.lenya.cms.ant;
-
-/**
- * Helper class to hold two values.
- */
-public class TwoTuple {
-    /**
-     * <code>x</code> The x value
-     */
-    public int x;
-    /**
-     * <code>y</code> The y value
-     */
-    public int y;
-
-    /**
-     * Constructor
-     * @param _x The x value
-     * @param _y The y value
-     * 
-     */
-    public TwoTuple(int _x, int _y) {
-        this.x = _x;
-        this.y = _y;
-    }
-}
diff --git a/tools/anttasks/org/apache/lenya/cms/ant/BulkCopyTask.class b/tools/anttasks/org/apache/lenya/cms/ant/BulkCopyTask.class
deleted file mode 100644
index 4d91c45..0000000
--- a/tools/anttasks/org/apache/lenya/cms/ant/BulkCopyTask.class
+++ /dev/null
Binary files differ
diff --git a/tools/anttasks/org/apache/lenya/cms/ant/CopyJavaSourcesTask.class b/tools/anttasks/org/apache/lenya/cms/ant/CopyJavaSourcesTask.class
deleted file mode 100644
index e708c59..0000000
--- a/tools/anttasks/org/apache/lenya/cms/ant/CopyJavaSourcesTask.class
+++ /dev/null
Binary files differ
diff --git a/tools/anttasks/org/apache/lenya/cms/ant/CopyTask.class b/tools/anttasks/org/apache/lenya/cms/ant/CopyTask.class
deleted file mode 100644
index 8092a3e..0000000
--- a/tools/anttasks/org/apache/lenya/cms/ant/CopyTask.class
+++ /dev/null
Binary files differ
diff --git a/tools/anttasks/org/apache/lenya/cms/ant/JavaFilenameFilter.class b/tools/anttasks/org/apache/lenya/cms/ant/JavaFilenameFilter.class
deleted file mode 100644
index 9776488..0000000
--- a/tools/anttasks/org/apache/lenya/cms/ant/JavaFilenameFilter.class
+++ /dev/null
Binary files differ
diff --git a/tools/anttasks/org/apache/lenya/cms/ant/SCMFilenameFilter.class b/tools/anttasks/org/apache/lenya/cms/ant/SCMFilenameFilter.class
deleted file mode 100644
index 51486bb..0000000
--- a/tools/anttasks/org/apache/lenya/cms/ant/SCMFilenameFilter.class
+++ /dev/null
Binary files differ
diff --git a/tools/anttasks/org/apache/lenya/cms/ant/TwoTuple.class b/tools/anttasks/org/apache/lenya/cms/ant/TwoTuple.class
deleted file mode 100644
index 90d6fd0..0000000
--- a/tools/anttasks/org/apache/lenya/cms/ant/TwoTuple.class
+++ /dev/null
Binary files differ
diff --git a/tools/bin/ant b/tools/bin/ant
deleted file mode 100755
index cf336db..0000000
--- a/tools/bin/ant
+++ /dev/null
@@ -1,299 +0,0 @@
-#! /bin/sh
-
-#   Copyright 2001-2005 The Apache Software Foundation
-#
-#   Licensed 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.
-
-# Extract launch and ant arguments, (see details below).
-ant_exec_args=
-no_config=false
-use_jikes_default=false
-ant_exec_debug=false
-show_help=false
-for arg in "$@" ; do
-  if [ "$arg" = "--noconfig" ] ; then
-    no_config=true
-  elif [ "$arg" = "--usejikes" ] ; then
-    use_jikes_default=true
-  elif [ "$arg" = "--execdebug" ] ; then
-    ant_exec_debug=true
-  elif [ my"$arg" = my"--h"  -o my"$arg" = my"--help"  ] ; then
-    show_help=true
-    ant_exec_args="$ant_exec_args -h"
-  else
-    if [  my"$arg" = my"-h"  -o  my"$arg" = my"-help" ] ; then
-      show_help=true
-    fi
-    ant_exec_args="$ant_exec_args \"$arg\""
-  fi
-done
-
-# Source/default ant configuration
-if $no_config ; then
-  rpm_mode=false
-  usejikes=$use_jikes_default
-else
-  # load system-wide ant configuration
-  if [ -f "/etc/ant.conf" ] ; then
-    . /etc/ant.conf
-  fi
-
-  # load user ant configuration
-  if [ -f "$HOME/.ant/ant.conf" ] ; then
-    . $HOME/.ant/ant.conf
-  fi
-  if [ -f "$HOME/.antrc" ] ; then
-    . "$HOME/.antrc"
-  fi
-
-  # provide default configuration values
-  if [ -z "$rpm_mode" ] ; then
-    rpm_mode=false
-  fi
-  if [ -z "$usejikes" ] ; then
-    usejikes=$use_jikes_default
-  fi
-fi
-
-# Setup Java environment in rpm mode
-if $rpm_mode ; then
-  if [ -f /usr/share/java-utils/java-functions ] ; then
-    . /usr/share/java-utils/java-functions
-    set_jvm
-    set_javacmd
-  fi
-fi
-
-# OS specific support.  $var _must_ be set to either true or false.
-cygwin=false;
-darwin=false;
-case "`uname`" in
-  CYGWIN*) cygwin=true ;;
-  Darwin*) darwin=true
-           if [ -z "$JAVA_HOME" ] ; then
-             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
-           fi
-           ;;
-esac
-
-if [ -z "$ANT_HOME" -o ! -d "$ANT_HOME" ] ; then
-  ## resolve links - $0 may be a link to ant's home
-  PRG="$0"
-  progname=`basename "$0"`
-
-  # need this for relative symlinks
-  while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-    PRG="$link"
-    else
-    PRG=`dirname "$PRG"`"/$link"
-    fi
-  done
-
-  ANT_HOME=`dirname "$PRG"`/..
-
-  # make it fully qualified
-  ANT_HOME=`cd "$ANT_HOME" && pwd`
-fi
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched
-if $cygwin ; then
-  [ -n "$ANT_HOME" ] &&
-    ANT_HOME=`cygpath --unix "$ANT_HOME"`
-  [ -n "$JAVA_HOME" ] &&
-    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
-# set ANT_LIB location
-ANT_LIB="${ANT_HOME}/lib"
-
-if [ -z "$JAVACMD" ] ; then
-  if [ -n "$JAVA_HOME"  ] ; then
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-      # IBM's JDK on AIX uses strange locations for the executables
-      JAVACMD="$JAVA_HOME/jre/sh/java"
-    else
-      JAVACMD="$JAVA_HOME/bin/java"
-    fi
-  else
-    JAVACMD=`which java 2> /dev/null `
-    if [ -z "$JAVACMD" ] ; then
-        JAVACMD=java
-    fi
-  fi
-fi
-
-if [ ! -x "$JAVACMD" ] ; then
-  echo "Error: JAVA_HOME is not defined correctly."
-  echo "  We cannot execute $JAVACMD"
-  exit 1
-fi
-
-# Build local classpath using just the launcher in non-rpm mode or
-# use the Jpackage helper in rpm mode with basic and default jars
-# specified in the ant.conf configuration. Because the launcher is
-# used, libraries linked in ANT_HOME will also be include, but this
-# is discouraged as it is not java-version safe. A user should
-# request optional jars and their dependencies via the OPT_JAR_LIST
-# variable
-if $rpm_mode && [ -f /usr/bin/build-classpath ] ; then
-  LOCALCLASSPATH="$(/usr/bin/build-classpath ant ant-launcher jaxp_parser_impl xml-commons-apis)"
-  # If the user requested to try to add some other jars to the classpath
-  if [ -n "$OPT_JAR_LIST" ] ; then
-    _OPTCLASSPATH="$(/usr/bin/build-classpath $OPT_JAR_LIST 2> /dev/null)"
-    if [ -n "$_OPTCLASSPATH" ] ; then 
-      LOCALCLASSPATH="$LOCALCLASSPATH:$_OPTCLASSPATH"
-    fi
-  fi
-
-  # Explicitly add javac path to classpath, assume JAVA_HOME set
-  # properly in rpm mode
-  if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then
-    LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar"
-  fi
-  if [ -f "$JAVA_HOME/lib/classes.zip" ] ; then
-    LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip"
-  fi
-
-  # if CLASSPATH_OVERRIDE env var is set, LOCALCLASSPATH will be
-  # user CLASSPATH first and ant-found jars after.
-  # In that case, the user CLASSPATH will override ant-found jars
-  #
-  # if CLASSPATH_OVERRIDE is not set, we'll have the normal behaviour
-  # with ant-found jars first and user CLASSPATH after
-  if [ -n "$CLASSPATH" ] ; then
-    # merge local and specified classpath 
-    if [ -z "$LOCALCLASSPATH" ] ; then 
-      LOCALCLASSPATH="$CLASSPATH"
-    elif [ -n "$CLASSPATH_OVERRIDE" ] ; then
-      LOCALCLASSPATH="$CLASSPATH:$LOCALCLASSPATH"
-    else
-      LOCALCLASSPATH="$LOCALCLASSPATH:$CLASSPATH"
-    fi
-
-    # remove class path from launcher -cp option
-    CLASSPATH=""
-  fi
-else
-  # not using rpm_mode; use launcher to determine classpaths
-  if [ -z "$LOCALCLASSPATH" ] ; then
-      LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar
-  else
-      LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar:$LOCALCLASSPATH
-  fi
-fi
-
-if [ -n "$JAVA_HOME" ] ; then
-  # OSX hack to make Ant work with jikes
-  if $darwin ; then
-    OSXHACK="${JAVA_HOME}/../Classes"
-    if [ -d "${OSXHACK}" ] ; then
-      for i in "${OSXHACK}"/*.jar
-      do
-        JIKESPATH="$JIKESPATH:$i"
-      done
-    fi
-  fi
-fi
-
-# Allow Jikes support (off by default)
-if $usejikes; then
-  ANT_OPTS="$ANT_OPTS -Dbuild.compiler=jikes"
-fi
-
-# For Cygwin, switch paths to appropriate format before running java
-# For PATHs convert to unix format first, then to windows format to ensure
-# both formats are supported. Probably this will fail on directories with ;
-# in the name in the path. Let's assume that paths containing ; are more
-# rare than windows style paths on cygwin.
-if $cygwin; then
-  if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
-    format=mixed
-  else
-    format=windows
-  fi
-  ANT_HOME=`cygpath --$format "$ANT_HOME"`
-  ANT_LIB=`cygpath --$format "$ANT_LIB"`
-  JAVA_HOME=`cygpath --$format "$JAVA_HOME"`
-  LCP_TEMP=`cygpath --path --unix "$LOCALCLASSPATH"`
-  LOCALCLASSPATH=`cygpath --path --$format "$LCP_TEMP"`
-  if [ -n "$CLASSPATH" ] ; then
-    CP_TEMP=`cygpath --path --unix "$CLASSPATH"`
-    CLASSPATH=`cygpath --path --$format "$CP_TEMP"`
-  fi
-  CYGHOME=`cygpath --$format "$HOME"`
-fi
-
-# Show script help if requested
-if $show_help ; then
-  echo $0 '[script options] [options] [target [target2 [target3] ..]]'
-  echo 'Script Options:'
-  echo '  --help, --h            print this message and ant help'
-  echo '  --noconfig             suppress sourcing of /etc/ant.conf,'
-  echo '                         $HOME/.ant/ant.conf, and $HOME/.antrc'
-  echo '                         configuration files'
-  echo '  --usejikes             enable use of jikes by default, unless'
-  echo '                         set explicitly in configuration files'
-  echo '  --execdebug            print ant exec line generated by this'
-  echo '                         launch script'
-  echo '  '
-fi
-# add a second backslash to variables terminated by a backslash under cygwin
-if $cygwin; then
-  case "$ANT_HOME" in
-    *\\ )
-    ANT_HOME="$ANT_HOME\\"
-    ;;
-  esac
-  case "$CYGHOME" in
-    *\\ )
-    CYGHOME="$CYGHOME\\"
-    ;;
-  esac
-  case "$JIKESPATH" in
-    *\\ )
-    JIKESPATH="$JIKESPATH\\"
-    ;;
-  esac
-  case "$LOCALCLASSPATH" in
-    *\\ )
-    LOCALCLASSPATH="$LOCALCLASSPATH\\"
-    ;;
-  esac
-  case "$CLASSPATH" in
-    *\\ )
-    CLASSPATH="$CLASSPATH\\"
-    ;;
-  esac
-fi
-# Execute ant using eval/exec to preserve spaces in paths,
-# java options, and ant args
-ant_sys_opts=
-if [ -n "$CYGHOME" ]; then
-  if [ -n "$JIKESPATH" ]; then
-    ant_sys_opts="-Djikes.class.path=\"$JIKESPATH\" -Dcygwin.user.home=\"$CYGHOME\""
-  else
-    ant_sys_opts="-Dcygwin.user.home=\"$CYGHOME\""
-  fi
-else
-  if [ -n "$JIKESPATH" ]; then
-    ant_sys_opts="-Djikes.class.path=\"$JIKESPATH\""
-  fi
-fi
-ant_exec_command="exec \"$JAVACMD\" $ANT_OPTS -classpath \"$LOCALCLASSPATH\" -Dant.home=\"$ANT_HOME\" -Dant.library.dir=\"$ANT_LIB\" $ant_sys_opts org.apache.tools.ant.launch.Launcher $ANT_ARGS -cp \"$CLASSPATH\" $ant_exec_args"
-if $ant_exec_debug ; then
-    echo $ant_exec_command
-fi
-eval $ant_exec_command
diff --git a/tools/bin/ant.bat b/tools/bin/ant.bat
deleted file mode 100644
index 55df281..0000000
--- a/tools/bin/ant.bat
+++ /dev/null
@@ -1,126 +0,0 @@
-@echo off

-

-REM  Copyright 2001,2004-2005 The Apache Software Foundation

-REM

-REM  Licensed under the Apache License, Version 2.0 (the "License");

-REM  you may not use this file except in compliance with the License.

-REM  You may obtain a copy of the License at

-REM

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

-REM

-REM  Unless required by applicable law or agreed to in writing, software

-REM  distributed under the License is distributed on an "AS IS" BASIS,

-REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-REM  See the License for the specific language governing permissions and

-REM  limitations under the License.

-

-if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat"

-

-if "%OS%"=="Windows_NT" @setlocal

-if "%OS%"=="WINNT" @setlocal

-

-rem %~dp0 is expanded pathname of the current script under NT

-set DEFAULT_ANT_HOME=%~dp0..

-

-if "%ANT_HOME%"=="" set ANT_HOME=%DEFAULT_ANT_HOME%

-set DEFAULT_ANT_HOME=

-

-set _USE_CLASSPATH=yes

-

-rem Slurp the command line arguments. This loop allows for an unlimited number

-rem of arguments (up to the command line limit, anyway).

-set ANT_CMD_LINE_ARGS=%1

-if ""%1""=="""" goto doneStart

-shift

-:setupArgs

-if ""%1""=="""" goto doneStart

-if ""%1""==""-noclasspath"" goto clearclasspath

-set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1

-shift

-goto setupArgs

-

-rem here is there is a -noclasspath in the options

-:clearclasspath

-set _USE_CLASSPATH=no

-shift

-goto setupArgs

-

-rem This label provides a place for the argument list loop to break out

-rem and for NT handling to skip to.

-

-:doneStart

-rem find ANT_HOME if it does not exist due to either an invalid value passed

-rem by the user or the %0 problem on Windows 9x

-if exist "%ANT_HOME%\lib\ant.jar" goto checkJava

-

-rem check for ant in Program Files

-if not exist "%ProgramFiles%\ant" goto checkSystemDrive

-set ANT_HOME=%ProgramFiles%\ant

-goto checkJava

-

-:checkSystemDrive

-rem check for ant in root directory of system drive

-if not exist %SystemDrive%\ant\lib\ant.jar goto checkCDrive

-set ANT_HOME=%SystemDrive%\ant

-goto checkJava

-

-:checkCDrive

-rem check for ant in C:\ant for Win9X users

-if not exist C:\ant\lib\ant.jar goto noAntHome

-set ANT_HOME=C:\ant

-goto checkJava

-

-:noAntHome

-echo ANT_HOME is set incorrectly or ant could not be located. Please set ANT_HOME.

-goto end

-

-:checkJava

-set _JAVACMD=%JAVACMD%

-

-if "%JAVA_HOME%" == "" goto noJavaHome

-if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome

-if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe

-goto checkJikes

-

-:noJavaHome

-if "%_JAVACMD%" == "" set _JAVACMD=java.exe

-

-:checkJikes

-if not "%JIKESPATH%"=="" goto runAntWithJikes

-

-:runAnt

-if "%_USE_CLASSPATH%"=="no" goto runAntNoClasspath

-if not "%CLASSPATH%"=="" goto runAntWithClasspath

-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%

-goto end

-

-:runAntNoClasspath

-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%

-goto end

-

-:runAntWithClasspath

-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%

-goto end

-

-:runAntWithJikes

-if "%_USE_CLASSPATH%"=="no" goto runAntWithJikesNoClasspath

-if not "%CLASSPATH%"=="" goto runAntWithJikesAndClasspath

-

-:runAntWithJikesNoClasspath

-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%

-goto end

-

-:runAntWithJikesAndClasspath

-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS%  -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%

-goto end

-

-:end

-set _JAVACMD=

-set ANT_CMD_LINE_ARGS=

-

-if "%OS%"=="Windows_NT" @endlocal

-if "%OS%"=="WINNT" @endlocal

-

-:mainEnd

-if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat"

-

diff --git a/tools/bin/ant.cmd b/tools/bin/ant.cmd
deleted file mode 100644
index 94b5a45..0000000
--- a/tools/bin/ant.cmd
+++ /dev/null
@@ -1,92 +0,0 @@
-/* 

-    Copyright 2003-2004 The Apache Software Foundation

-  

-    Licensed 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.

- 

-    Run ant

-*/

-

-'@echo off'

-parse arg mode envarg '::' antarg

-

-if mode\='.' & mode\='..' & mode\='/' then do

-  envarg = mode envarg

-  mode = ''

-end

-

-if antarg = '' then do

-  antarg = envarg

-  envarg = ''

-end

-

-x = setlocal()

-

-env="OS2ENVIRONMENT"

-antenv = _getenv_('antenv')

-if _testenv_() = 0 then interpret 'call "' || antenv || '"' '"' || envarg || '"'

-

-if mode = '' then mode = _getenv_('ANT_MODE' '..')

-if mode \= '/' then do

-  runrc = _getenv_('runrc')

-  antrc = _getenv_('antrc' 'antrc.cmd')

-  if mode = '..' then mode = '-r'

-  else mode = ''

-  interpret 'call "' || runrc || '"' antrc '"' || mode || '"'

-end

-

-if _testenv_() = 0 then do

-  say 'Ant environment is not set properly'

-  x = endlocal()

-  exit 16

-end

-

-settings = '-Dant.home=' || ANT_HOME '-Djava.home=' || JAVA_HOME

-

-java = _getenv_('javacmd' 'java')

-opts = value('ANT_OPTS',,env)

-args = value('ANT_ARGS',,env)

-lcp = value('LOCALCLASSPATH',,env)

-cp = value('CLASSPATH',,env)

-if value('ANT_USE_CP',,env) \= '' then do

-  if lcp \= '' & right(lcp, 1) \= ';' then lcp = lcp || ';'

-  lcp = lcp || cp

-  'SET CLASSPATH='

-end

-if lcp\='' then lcp = '-classpath' lcp

-

-cmd = java opts lcp '-jar' ANT_HOME ||'\lib\ant-launcher.jar' settings args antarg

-launcher = stream(ANT_HOME ||'\lib\ant-launcher.jar', 'C', 'query exists')

-if launcher = '' then entry = 'org.apache.tools.ant.Main'

-else entry = 'org.apache.tools.ant.launch.Launcher'

-java opts lcp entry settings args antarg

-

-x = endlocal()

-

-return rc

-

-_testenv_: procedure expose env ANT_HOME JAVA_HOME

-ANT_HOME = value('ANT_HOME',,env)

-if ANT_HOME = '' then return 0

-JAVA_HOME = value('JAVA_HOME',,env)

-if JAVA_HOME = '' then return 0

-cp = translate(value('CLASSPATH',,env))

-if pos(translate(ANT_HOME), cp) = 0 then return 0

-if pos(translate(JAVA_HOME), cp) = 0 then return 0

-return 1

-

-_getenv_: procedure expose env

-parse arg envar default

-if default = '' then default = envar

-var = value(translate(envar),,env)

-if var = '' then var = default

-return var

diff --git a/tools/bin/antRun b/tools/bin/antRun
deleted file mode 100755
index baddd71..0000000
--- a/tools/bin/antRun
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-#
-#  Copyright  2001-2002,2004 The Apache Software Foundation
-# 
-#   Licensed 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.
-# 
-#
-
-# Args: DIR command
-cd "$1"
-CMD="$2"
-shift
-shift
-
-exec "$CMD" "$@"
diff --git a/tools/bin/antRun.bat b/tools/bin/antRun.bat
deleted file mode 100644
index aae98cc..0000000
--- a/tools/bin/antRun.bat
+++ /dev/null
@@ -1,47 +0,0 @@
-@echo off

-

-REM

-REM Copyright  2001-2002,2004-2005 The Apache Software Foundation

-REM

-REM  Licensed under the Apache License, Version 2.0 (the "License");

-REM  you may not use this file except in compliance with the License.

-REM  You may obtain a copy of the License at

-REM

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

-REM

-REM  Unless required by applicable law or agreed to in writing, software

-REM  distributed under the License is distributed on an "AS IS" BASIS,

-REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-REM  See the License for the specific language governing permissions and

-REM  limitations under the License.

-REM

-REM

-

-if "%OS%"=="Windows_NT" @setlocal

-if "%OS%"=="WINNT" @setlocal

-

-if ""%1""=="""" goto runCommand

-

-rem Change drive and directory to %1

-if "%OS%"=="Windows_NT" cd /d ""%1""

-if not "%OS%"=="Windows_NT" cd ""%1""

-shift

-

-rem Slurp the command line arguments. This loop allows for an unlimited number

-rem of agruments (up to the command line limit, anyway).

-set ANT_RUN_CMD=%1

-if ""%1""=="""" goto runCommand

-shift

-:loop

-if ""%1""=="""" goto runCommand

-set ANT_RUN_CMD=%ANT_RUN_CMD% %1

-shift

-goto loop

-

-:runCommand

-rem echo %ANT_RUN_CMD%

-%ANT_RUN_CMD%

-

-if "%OS%"=="Windows_NT" @endlocal

-if "%OS%"=="WINNT" @endlocal

-

diff --git a/tools/bin/antRun.pl b/tools/bin/antRun.pl
deleted file mode 100644
index 7cdd868..0000000
--- a/tools/bin/antRun.pl
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/usr/bin/perl
-#
-# Copyright 2001,2003-2004 The Apache Software Foundation
-#
-#  Licensed 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.
-#
-#######################################################################
-#
-# antRun.pl
-#
-# wrapper script for invoking commands on a platform with Perl installed
-# this is akin to antRun.bat, and antRun the SH script 
-#
-# created:         2001-10-18
-# author:          Jeff Tulley jtulley@novell.com 
-#######################################################################
-#be fussy about variables
-use strict;
-
-#turn warnings on during dev; generates a few spurious uninitialised var access warnings
-#use warnings;
-
-#and set $debug to 1 to turn on trace info (currently unused)
-my $debug=1;
-
-#######################################################################
-# change drive and directory to "%1"
-my $ANT_RUN_CMD = @ARGV[0];
-
-# assign current run command to "%2"
-chdir (@ARGV[0]) || die "Can't cd to $ARGV[0]: $!\n";
-if ($^O eq "NetWare") {
-    # There is a bug in Perl 5 on NetWare, where chdir does not
-    # do anything.  On NetWare, the following path-prefixed form should 
-    # always work. (afaict)
-    $ANT_RUN_CMD .= "/".@ARGV[1];
-}
-else {
-    $ANT_RUN_CMD = @ARGV[1];
-}
-
-# dispose of the first two arguments, leaving only the command's args.
-shift;
-shift;
-
-# run the command
-my $returnValue = system $ANT_RUN_CMD, @ARGV;
-if ($returnValue eq 0) {
-    exit 0;
-}
-else {
-    # only 0 and 1 are widely recognized as exit values
-    # so change the exit value to 1
-    exit 1;
-}
diff --git a/tools/bin/antenv.cmd b/tools/bin/antenv.cmd
deleted file mode 100644
index 05efa85..0000000
--- a/tools/bin/antenv.cmd
+++ /dev/null
@@ -1,99 +0,0 @@
-/* 

-    Copyright 2003-2004 The Apache Software Foundation

-  

-    Licensed 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.

-

-    Ant environment

-*/

-

-'@echo off'

-call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs"

-call SysLoadFuncs

-

-/* Prepare the parameters for later use */

-parse arg argv

-mode = ''

-args = ''

-opts = ''

-cp = ''

-lcp = ''

-

-do i = 1 to words(argv)

-  param = word(argv, i)

-  select

-    when param='-lcp' then mode = 'l'

-    when param='-cp' | param='-classpath' then mode = 'c'

-    when abbrev('-opts', param, 4) then mode = 'o'

-    when abbrev('-args', param, 4) then mode = 'a'

-  otherwise

-    select

-      when mode = 'a' then args = space(args param, 1)

-      when mode = 'c' then cp = space(cp param, 1)

-      when mode = 'l' then lcp = space(lcp param, 1)

-      when mode = 'o' then opts = space(opts param, 1)

-    otherwise

-      say 'Option' param 'ignored'

-    end

-  end

-end

-

-env="OS2ENVIRONMENT"

-antconf = _getenv_('antconf' 'antconf.cmd')

-runrc = _getenv_('runrc')

-interpret 'call "' || runrc || '"' '"' || antconf || '"' 'ETC'

-ANT_HOME = value('ANT_HOME',,env)

-JAVA_HOME = value('JAVA_HOME',,env)

-classpath = value('CLASSPATH',,env)

-classes = stream(JAVA_HOME || "\lib\classes.zip", "C", "QUERY EXISTS")

-if classes \= '' then classpath = prepend(classpath classes)

-classes = stream(JAVA_HOME || "\lib\tools.jar", "C", "QUERY EXISTS")

-if classes \= '' then classpath = prepend(classpath classes)

-

-classpath = prepend(classpath ANT_HOME || '\lib\ant-launcher.jar')

-'SET CLASSPATH=' || classpath

-

-/* Setting classpathes, options and arguments */

-envset = _getenv_('envset')

-if cp\=''   then interpret 'call "' || envset || '"' '"; CLASSPATH"' '"' || cp || '"'

-if lcp\=''  then interpret 'call "' || envset || '"' '"; LOCALCLASSPATH"' '"' || lcp || '"'

-if opts\='' then interpret 'call "' || envset || '"' '"-D ANT_OPTS"' '"' || opts || '"'

-if args\='' then interpret 'call "' || envset || '"' '"ANT_ARGS"' '"' || args || '"'

-

-exit 0

-

-addpath: procedure

-parse arg path elem

-if elem = '' then do

-  if path\='' & right(path, 1)\=';' then path = path || ';'

-  return path

-end

-if substr(path, length(path)) = ';' then glue = ''

-else glue = ';'

-if pos(translate(elem), translate(path)) = 0 then path = path || glue || elem || ';'

-return path

-

-prepend: procedure

-parse arg path elem

-if elem = '' then do

-  if path\='' & right(path, 1)\=';' then path = path || ';'

-  return path

-end

-if pos(translate(elem), translate(path)) = 0 then path = elem || ';' || path

-return path

-

-_getenv_: procedure expose env

-parse arg envar default

-if default = '' then default = envar

-var = value(translate(envar),,env)

-if var = '' then var = default

-return var

diff --git a/tools/bin/appendcp.bat b/tools/bin/appendcp.bat
deleted file mode 100644
index 910bdc4..0000000
--- a/tools/bin/appendcp.bat
+++ /dev/null
@@ -1,16 +0,0 @@
-rem  Copyright 1999-2004 The Apache Software Foundation

-rem

-rem  Licensed under the Apache License, Version 2.0 (the "License");

-rem  you may not use this file except in compliance with the License.

-rem  You may obtain a copy of the License at

-rem

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

-rem

-rem  Unless required by applicable law or agreed to in writing, software

-rem  distributed under the License is distributed on an "AS IS" BASIS,

-rem  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-rem  See the License for the specific language governing permissions and

-rem  limitations under the License.

-

-set CLASSPATH=%CLASSPATH%;%1

-

diff --git a/tools/bin/complete-ant-cmd.pl b/tools/bin/complete-ant-cmd.pl
deleted file mode 100644
index 20dd476..0000000
--- a/tools/bin/complete-ant-cmd.pl
+++ /dev/null
@@ -1,113 +0,0 @@
-#!/usr/bin/perl
-#
-# Copyright 2001,2004 The Apache Software Foundation
-#
-#  Licensed 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.
-#
-# A script to allow Bash or Z-Shell to complete an Ant command-line.  
-#
-# To install for Bash 2.0 or better, add the following to ~/.bashrc:
-# 
-#     $ complete -C complete-ant-cmd ant build.sh
-#
-# To install for Z-Shell 2.5 or better, add the following to ~/.zshrc:
-#
-#     function ant_complete () {
-#         local args_line args
-#         read -l args_line
-#         set -A args $args_line
-#         set -A reply $(COMP_LINE=$args_line complete-ant-cmd ${args[1]} $1)
-#     }
-#     compctl -K ant_complete ant build.sh
-#     
-# @author Mike Williams <mikew@cortexebusiness.com.au>
-
-my $cmdLine = $ENV{'COMP_LINE'};
-my $antCmd = $ARGV[0];
-my $word = $ARGV[1];
-
-my @completions;
-if ($word =~ /^-/) {
-    list( restrict( $word, getArguments() ));
-} elsif ($cmdLine =~ /-(f|buildfile)\s+\S*$/) {
-    list( getBuildFiles($word) );
-} else {
-    list( restrict( $word, getTargets() ));
-}
-
-exit(0);
-
-sub list {
-    for (@_) {
-        print "$_\n";
-    }
-}
-
-sub restrict {
-    my ($word, @completions) = @_;
-    grep( /^\Q$word\E/, @completions );
-}
-
-sub getArguments {
-    qw(-buildfile -debug -emacs -f -find -help -listener -logfile 
-       -logger -projecthelp -quiet -verbose -version); 
-}
-
-
-sub getBuildFiles {
-    my ($word) = @_;
-    grep( /\.xml$/, glob( "$word*" ));
-}
-
-sub getTargets {
-
-    # Look for build-file
-    my $buildFile = 'build.xml';
-    if ($cmdLine =~ /-(f|buildfile)\s+(\S+)/) {
-        $buildFile = $2;
-    }
-    return () unless (-f $buildFile);
-
-    # Run "ant -projecthelp" to list targets.  Keep a cache of results in a
-    # cache-file.
-    my $cacheFile = $buildFile;
-    $cacheFile =~ s|(.*/)?(.*)|${1}.ant-targets-${2}|;
-    if ((!-e $cacheFile) || (-M $buildFile) < (-M $cacheFile)) {
-        open( CACHE, '>'.$cacheFile ) || die "can\'t write $cacheFile: $!\n";
-        open( HELP, "$antCmd -projecthelp -f '$buildFile'|" ) || return(); 
-        my %targets;
-        while( <HELP> ) {
-            if (/^\s+(\S+)/) {
-                $targets{$1}++;
-            }
-        }
-        my @targets = sort keys %targets;
-        for (@targets) { print CACHE "$_\n"; }
-        return @targets;
-    }
-    
-    # Read the target-cache
-    open( CACHE, $cacheFile ) || die "can\'t read $cacheFile: $!\n";
-    my @targets;
-    while (<CACHE>) {
-        chop;
-        s/\r$//;  # for Cygwin
-        push( @targets, $_ );
-    }
-    close( CACHE );
-    @targets;
-
-}
-
-
-
diff --git a/tools/bin/create-repository-jars.sh b/tools/bin/create-repository-jars.sh
deleted file mode 100755
index 4f63a50..0000000
--- a/tools/bin/create-repository-jars.sh
+++ /dev/null
@@ -1,292 +0,0 @@
-#!/bin/sh -x

-

-# Copyright 2004 The Apache Software Foundation

-#

-#  Licensed 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.

-

-# $Id: create-repository-jars.sh 30946 2004-07-29 20:44:21Z vgritsenko $

-

-# This script will do the following:

-#   - checkout/update a cocoon-2.1 repository

-#   - make a local.build.properties, that excludes all documentation stuff

-#   - build all jars and the war file

-#   - copy all jars and the war to the appropriate locations (repository structure)

-

-# The cvs repository name

-if [ "$REPOSITORY_NAME" = "" ]; then

-  REPOSITORY_NAME=cocoon-2.1

-fi

-

-# What is the default revision/branch/tag to use

-# In case of a HEAD revision a SNAPSHOT version will be created and

-# any old snapshots will be removed to save some space

-if [ "$REVISION" = "" ]; then

-  REVISION="" # it's a HEAD

-fi

-

-# What is the default CVSROOT to be used for checkout

-if [ "$CVSROOT" = "" ]; then

-  CVSROOT=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"

-fi

-

-# Where is the local cocoon cvs repository we use to maintain.

-# If this directory doesn't exists it will do a 

-#   'cvs -d $CVSROOT co -Pd $LOCAL_REPOSITORY -r $REVISION $REPOSITORY_NAME'

-#   to create it.

-#   

-# If it exists it will do a 

-#   'cvs upd -dPACr $REVISION'

-#   in there to update to the requested revision (see REVISION below)

-if [ "$LOCAL_REPOSITORY" = "" ]; then

-  LOCAL_REPOSITORY=$HOME/cvs/cocoon-2.1

-fi

-

-# On which host should the artifacts be published

-if [ "$REMOTEHOST" = "" ]; then

-  REMOTEHOST=www.apache.org

-fi

-

-# Where is the path on the remote host the repository is located at

-if [ "$REMOTEPATH" = "" ]; then

-  REMOTEPATH=/www/www.apache.org/dist/java-repository/cocoon

-fi

-

-# Where is the md5sum command to be used

-if [ "$MD5SUM" = "" ]; then

-  MD5SUM=/sbin/md5

-fi

-

-# ------- NO NEED TO CHANGE ANYTHING BELOW HERE ----------

-

-if [ "$JAVA_HOME" = "" ]; then

-  echo "You need to set the JAVA_HOME environment variable to the installed JDK 1.3"

-  exit 1

-fi

-

-$JAVA_HOME/bin/java -version

-

-# parse for options

-NOCVS=0

-NOBUILD=0

-NOCLEAN=0

-NOJARS=0

-NOWAR=0

-BUILD_SRC_DIST=0

-while getopts ":BCdhJkW" option

-do

-  case $option in

-    B) NOBUILD=1;;

-    C) NOCVS=1;;

-    d) BUILD_SRC_DIST=1;;

-    h) echo "Usage: `basename $0` [-B] [-C] [-d] [-J] [-h] [-k] [-W] [RELEASE-TAG]"

-       echo "       -B          don't do a build"

-       echo "       -C          don't do a cvs update"

-       echo "       -d          build a src dist"

-       echo "       -h          this usage note"

-       echo "       -J          don't deploy the jar files"

-       echo "       -k          keep the build tree (don't do a clean-dist)"

-       echo "       -W          don't deploy the war file"

-       echo "       RELEASE-TAG the tag to do a cvs update for"

-       echo "                   if the RELEASE-TAG is HEAD a snapshot version"

-       echo "                   will be produced"

-       exit 0

-       ;;

-    J) NOJARS=1;;

-    k) NOCLEAN=1;;

-    W) NOWAR=1;;

-    *     ) echo "Unimplemented option $option chosen.";;

-  esac

-done

-

-shift $(($OPTIND - 1))

-if [ "$1" != "" -a "$1" != "HEAD" ]; then

-  REVISION=$1

-fi

-

-# check if the local repository exists and do a checkout/update accordingly

-if [ -d "$LOCAL_REPOSITORY" ]; then

-  cd $LOCAL_REPOSITORY

-  if [ $NOCVS = 0 ]; then

-    echo

-    echo "updating the local repository at $LOCAL_REPOSITORY with"

-    if [ "$REVISION" = "" ]; then

-      echo "    cvs up -dPAC"

-      echo

-      cvs up -dPAC

-    else

-      echo "    cvs up -dPACr $REVISION"

-      echo

-      cvs up -dPACr $REVISION

-    fi

-  fi

-else

-  DIRNAME=`dirname $LOCAL_REPOSITORY`

-  BASENAME=`basename $LOCAL_REPOSITORY`

-  if [ ! -d $DIRNAME ]; then

-    mkdir -p $DIRNAME 2>/dev/null >/dev/null

-  fi

-  cd $DIRNAME 

-  echo

-  echo "checking out into the local repository at $LOCAL_REPOSITORY with "

-  if [ "$REVISION" = "" ]; then

-    echo "    cvs -d $CVSROOT co -Pd $LOCAL_REPOSITORY $REPOSITORY_NAME"

-    echo

-    cvs -d $CVSROOT co -Pd $BASENAME $REPOSITORY_NAME

-  else

-    echo "    cvs -d $CVSROOT co -Pd $LOCAL_REPOSITORY -r $REVISION $REPOSITORY_NAME"

-    echo

-    cvs -d $CVSROOT co -Pd $BASENAME -r $REVISION $REPOSITORY_NAME

-  fi

-  cd $LOCAL_REPOSITORY

-fi

-

-# cleanup the repository, prepare and do a build if not suppressed by command line option

-RC=0 # set in advace in case we don't do a build

-if [ $NOBUILD = 0 ]; then

-  # build the local.blocks.properties file

-  echo

-  echo "generating local.blocks.properties file"

-  echo

-  cat blocks.properties \

-    >local.blocks.properties

-

-  # build the local.build.properties file

-  echo

-  echo "generating local.build.properties file"

-  echo

-  cat build.properties \

-    | sed 's/#exclude.webapp.documentation/exclude.webapp.documentation/' \

-    | sed 's/#exclude.webapp.javadocs/exclude.webapp.javadocs/' \

-    | sed 's/#exclude.webapp.samples/exclude.webapp.samples/' \

-    | sed 's/#exclude.documentation/exclude.documentation/' \

-    | sed 's/#exclude.javadocs/exclude.javadocs/' \

-    | sed 's/#exclude.validate.xdocs/exclude.validate.xdocs/' \

-    | sed 's/#config.allow-reloads/config.allow-reloads/' \

-    | sed 's/#config.enable-uploads/config.enable-uploads/' >local.build.properties

-

-  # build everything

-  echo

-  if [ $NOCLEAN = 0 ]; then

-    echo "clean the local repository, build the webapp, and the war files"

-    CLEAN=clean-dist

-  else

-    echo "build the webapp, and the war files"

-    CLEAN=""

-  fi

-  echo

-  ./build.sh $CLEAN webapp war | tee $LOCAL_REPOSITORY/build.log

-  # The build script dosn't report on failures so we have to do that by hand

-  tail -10 $LOCAL_REPOSITORY/build.log|grep "BUILD SUCCESSFUL"

-  if [ $? = 0 ]; then

-    RC=0

-  else

-    RC=1

-  fi

-fi

-

-if [ $RC -ne 0 ]; then

-  echo "The build has failed"

-  exit $RC

-fi

-

-# copy all the jars produced over to the remote repository space

-VERSION=`ls build | grep cocoon | sed s/cocoon-//`

-if [ "$REVISION" = "" ]; then 

-  TVERSION=`date "+%Y%m%d.%H%M%S"` 

-else

-  TVERSION=$VERSION

-fi

-

-if [ $NOJARS = 0 ]; then

-  # create the target directory if they do not exists and make them group writable

-  ssh $REMOTEHOST "mkdir -p $REMOTEPATH/jars 2>/dev/null >/dev/null; \

-                 chmod -R g+w $REMOTEPATHi/jars"

-  JARS=`find build/cocoon-$VERSION -name "*.jar"`

-  for i in $JARS; do

-    FILE=`echo $i | sed 's/.*[/]//' | sed s/[.]jar//`

-    isBlock=`echo $FILE|grep block`

-    if [ ! -z "$isBlock" ]; then

-      BLOCKPART="-`echo $FILE | sed 's/-block//'`"

-    else

-      BLOCKPART=`echo $FILE | sed 's/cocoon//'`

-    fi

-    if [ "$REVISION" = "" ]; then

-      # remove all snapshots in the remote repository

-      SNAPSHOT=`ssh $REMOTEHOST "ls $REMOTEPATH/jars/cocoon$BLOCKPART-????????.??????.jar 2>/dev/null"` 

-    fi

-    scp $i $REMOTEHOST:$REMOTEPATH/jars/cocoon$BLOCKPART-$TVERSION.jar

-    if [ "$REVISION" = "" ]; then

-      if [ ! -z "$SNAPSHOT" ]; then

-        RM="rm $SNAPSHOT;"

-      else

-        RM=""

-      fi

-      CMD="$RM \

-           cd $REMOTEPATH/jars; \

-           ln -fs cocoon$BLOCKPART-$TVERSION.jar cocoon$BLOCKPART-SNAPSHOT.jar; \

-           echo $TVERSION >cocoon$BLOCKPART-snapshot.version;"

-    else

-      CMD=""

-    fi

-    ssh $REMOTEHOST "$CMD \

-                     $MD5SUM <$REMOTEPATH/jars/cocoon$BLOCKPART-$TVERSION.jar | \

-                       sed 's/ .*$//' >$REMOTEPATH/jars/cocoon$BLOCKPART-$TVERSION.jar.md5; \

-                     chmod g+w $REMOTEPATH/jars/cocoon$BLOCKPART-$TVERSION.*"

-  done

-fi

-

-# copy the war file to the web space

-if [ "$NOWAR" = "0" ]; then

-  # create the target directory if they do not exists and make them group writable

-  ssh $REMOTEHOST "mkdir -p $REMOTEPATH/wars 2>/dev/null >/dev/null; \

-                   chmod -R g+w $REMOTEPATH/wars"

-  WAR=build/cocoon-$VERSION/cocoon.war

-  if [ "$REVISION" = "" ]; then

-    SNAPSHOT=`ssh $REMOTEHOST "ls $REMOTEPATH/wars/cocoon-war-????????.??????.war 2>/dev/null"` 

-  fi

-  scp $WAR $REMOTEHOST:$REMOTEPATH/wars/cocoon-war-$TVERSION.war

-  if [ "$REVISION" = "" ]; then

-    if [ ! -z "$SNAPSHOT" ]; then

-      RM="rm $SNAPSHOT;"

-    else

-      RM=""

-    fi

-    CMD="$RM \

-         cd $REMOTEPATH/wars; \

-         ln -fs cocoon-war-$TVERSION.war cocoon-war-SNAPSHOT.war; \

-         echo $TVERSION >cocoon-war-snapshot.version;"

-  else

-    CMD=""

-  fi

-  ssh $REMOTEHOST "$CMD \

-                   $MD5SUM <$REMOTEPATH/wars/cocoon-war-$TVERSION.war | \

-                     sed 's/ .*$//' >$REMOTEPATH/jars/cocoon-war-$TVERSION.jar.md5; \

-                   chmod g+w $REMOTEPATH/jars/cocoon-war-$TVERSION.*"

-fi

-

-# create a distribution

-if [ "$BUILD_SRC_DIST" = "1" ]; then

-  # create the target directory if they do not exists and make them group writable

-  ssh $REMOTEHOST "mkdir -p $REMOTEPATH/distributions 2>/dev/null >/dev/null; \

-                   chmod -R g+w $REMOTEPATH/distributions"

-  ./build.sh clean-dist

-  cd ..

-  if [ "$REVISION" = "" ]; then

-    TVERSION=SNAPSHOT

-  fi

-  ln -sf $REPOSITORY_NAME cocoon-src-$TVERSION

-  zip -r cocoon-src-$TVERSION.zip cocoon-src-$TVERSION

-  rm cocoon-src-$TVERSION

-  scp cocoon-src-$TVERSION.zip $REMOTEHOST:$REMOTEPATH/distributions/cocoon-src-$TVERSION.zip

-  rm cocoon-src-$TVERSION.zip

-fi

diff --git a/tools/bin/envset.cmd b/tools/bin/envset.cmd
deleted file mode 100644
index 8fbd4dd..0000000
--- a/tools/bin/envset.cmd
+++ /dev/null
@@ -1,130 +0,0 @@
-/*

-

-    Copyright 2003-2004 The Apache Software Foundation

-  

-    Licensed 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.

-

-SET environment variables

-First optional parameter:

-   ;     parameters are considered parts of a path variable, semicolons are

-         appended to each element if not already present

-   -D    parameters are properties for Java or Makefile etc., -D will be

-         prepended and the parameters will be separated by a space

-   =D    the same as above but equal sign is not required

-   ,     parameters should be comma separated in the environment variable

-   -     parameters should be separated by the next parameter

-   Other values mean that the first parameter is missing and the environment

-   variable will be set to the space separated parameters

-

-Second parameter: name of the environment variable

-

-Next parameters: values

-; implies that the equal sign is considered a part of the parameter and is

-not interpreted

-

--D requires parameters in the form name=value. If the equal sign is not found,

-the parameters are changed to name=expanded_name

-

-Other options have optional equal sign. If it is found, only the part after

-the equal sign will be oprionally expanded.

-

-If the parameter is the minus sign, the next parameter will not be expanded.

-If the parameter is a single dot, it will be replaced with the value of the

-environment variable as it existed before envset was invoked.

-

-For other parameters the batch looks for the environment variable with the

-same name (in uppercase). If it is found, it forms the expanded_name. If

-the environment variable with such a name does not exist, the expanded_name

-will hold the parameter name without case conversion.

-*/

-

-parse arg mode envar args

-

-equal = 0

-sep = ' '

-

-/* Parse command line parameters */

-select

-  when mode='-' then do

-    sep = envar

-    parse var args envar args

-  end

-  when mode=';' then do

-    sep = ''

-    equal = -1

-  end

-  when mode='-D' then equal = 1

-  when mode='=D' then mode = '-D'

-  when mode=',' then sep = ','

-otherwise

-  args = envar args

-  envar = mode

-  mode = ''

-end

-

-env = 'OS2ENVIRONMENT'

-envar = translate(envar)

-orig = value(envar,,env)

-newval = ''

-expand = 1

-

-/* for each parameter... */

-do i = 1 to words(args)

-  if expand > 0 & word(args, i) = '-' then expand = 0

-  else call addval word(args, i)

-end

-

-/* Optionally enclose path variable by quotes */

-if mode = ';' & pos(' ', newval) > 0 then newval = '"' || newval || '"'

-

-/* Set the new value, 'SET' cannot be used since it does not allow '=' */

-x = value(envar, newval, env)

-exit 0

-

-addval: procedure expose sep equal orig expand newval mode env

-parse arg var

-

-if var = '.' then expvar = orig

-else do

-  if equal >= 0 then do

-    parse var var name '=' val

-    if val = '' then var = name

-    else var = val

-  end

-  if expand = 0 then expvar = var

-  else expvar = value(translate(var),,env)

-  if expvar = '' then expvar = var

-  if equal >= 0 then do

-    if val = '' then do

-      parse var expvar key '=' val

-      if val <> '' then name = key

-      else do

-        if equal > 0 then val = key

-        else name = key

-      end

-    end

-    else val = expvar

-    if pos(' ', val) > 0 | pos('=', val) > 0 then val = '"' || val || '"'

-    if val = '' then expvar = name

-    else expvar = name || '=' || val

-  end

-  if mode = '-D' then expvar = '-D' || expvar

-  if mode = ';' then do

-    if right(expvar, 1) <> ';' then expvar = expvar || ';'

-  end

-end

-

-if newval = '' then newval = expvar

-else newval = newval || sep || expvar

-expand = 1

-return

diff --git a/tools/bin/lcp.bat b/tools/bin/lcp.bat
deleted file mode 100644
index 6a1f679..0000000
--- a/tools/bin/lcp.bat
+++ /dev/null
@@ -1,30 +0,0 @@
-REM

-REM Copyright  2001-2004 The Apache Software Foundation

-REM

-REM  Licensed under the Apache License, Version 2.0 (the "License");

-REM  you may not use this file except in compliance with the License.

-REM  You may obtain a copy of the License at

-REM

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

-REM

-REM  Unless required by applicable law or agreed to in writing, software

-REM  distributed under the License is distributed on an "AS IS" BASIS,

-REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-REM  See the License for the specific language governing permissions and

-REM  limitations under the License.

-REM

-REM

-

-set _CLASSPATHCOMPONENT=%1

-if ""%1""=="""" goto gotAllArgs

-shift

-

-:argCheck

-if ""%1""=="""" goto gotAllArgs

-set _CLASSPATHCOMPONENT=%_CLASSPATHCOMPONENT% %1

-shift

-goto argCheck

-

-:gotAllArgs

-set LOCALCLASSPATH=%_CLASSPATHCOMPONENT%;%LOCALCLASSPATH%

-

diff --git a/tools/bin/runant.pl b/tools/bin/runant.pl
deleted file mode 100644
index eca4708..0000000
--- a/tools/bin/runant.pl
+++ /dev/null
@@ -1,152 +0,0 @@
-#!/usr/bin/perl
-#
-# Copyright 2000-2004 The Apache Software Foundation
-#
-#  Licensed 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.
-#
-#######################################################################
-#
-# runant.pl
-#
-# wrapper script for invoking ant in a platform with Perl installed
-# this may include cgi-bin invocation, which is considered somewhat daft.
-# (slo: that should be a separate file which can be derived from this
-# and returns the XML formatted output)
-#
-# the code is not totally portable due to classpath and directory splitting
-# issues. oops. (NB, use File::Spec::Functions  will help and the code is
-# structured for the catfile() call, but because of perl version funnies
-# the code is not included. 
-#
-# created:         2000-8-24
-# author:          Steve Loughran steve_l@sourceforge.net
-#######################################################################
-#
-# Assumptions:
-#
-# - the "java" executable/script is on the command path
-# - ANT_HOME has been set
-# - target platform uses ":" as classpath separator or perl indicates it is dos/win32
-# - target platform uses "/" as directory separator.
-
-#be fussy about variables
-use strict;
-
-#platform specifics (disabled)
-#use File::Spec::Functions;
-
-#turn warnings on during dev; generates a few spurious uninitialised var access warnings
-#use warnings;
-
-#and set $debug to 1 to turn on trace info
-my $debug=1;
-
-#######################################################################
-#
-# check to make sure environment is setup
-#
-
-my $HOME = $ENV{ANT_HOME};
-if ($HOME eq "")
-        {
-    die "\n\nANT_HOME *MUST* be set!\n\n";
-        }
-
-my $JAVACMD = $ENV{JAVACMD};
-$JAVACMD = "java" if $JAVACMD eq "";
-
-my $onnetware = 0;
-if ($^O eq "NetWare")
-{
-  $onnetware = 1;
-}
-
-my $oncygwin = ($^O eq "cygwin");
-
-#ISSUE: what java wants to split up classpath varies from platform to platform 
-#and perl is not too hot at hinting which box it is on.
-#here I assume ":" 'cept on win32, dos, and netware. Add extra tests here as needed.
-my $s=":";
-if(($^O eq "MSWin32") || ($^O eq "dos") || ($^O eq "cygwin") ||
-   ($onnetware == 1))
-        {
-        $s=";";
-        }
-
-#build up standard classpath
-my $localpath = "$HOME/lib/ant-launcher.jar";
-#set JVM options and Ant arguments, if any
-my @ANT_OPTS=split(" ", $ENV{ANT_OPTS});
-my @ANT_ARGS=split(" ", $ENV{ANT_ARGS});
-
-#jikes
-if($ENV{JIKESPATH} ne "")
-        {
-        push @ANT_OPTS, "-Djikes.class.path=$ENV{JIKESPATH}";
-        }
-
-#construct arguments to java
-my @ARGS;
-push @ARGS, @ANT_OPTS;
-
-my $CYGHOME = "";
-
-my $classpath=$ENV{CLASSPATH};
-if ($oncygwin == 1) {
-  $localpath = `cygpath --path --windows $localpath`;
-  chomp ($localpath);
-  if (! $classpath eq "")
-  {
-    $classpath = `cygpath --path --windows "$classpath"`;
-    chomp ($classpath);
-  }
-  $HOME = `cygpath --path --windows $HOME`;
-  chomp ($HOME);
-  $CYGHOME = `cygpath --path --windows $ENV{HOME}`;
-  chomp ($CYGHOME);
-}
-push @ARGS, "-classpath", "$localpath";
-push @ARGS, "-Dant.home=$HOME";
-if ( ! $CYGHOME eq "" )
-{
-  push @ARGS, "-Dcygwin.user.home=\"$CYGHOME\""
-}
-push @ARGS, "org.apache.tools.ant.launch.Launcher", @ANT_ARGS;
-push @ARGS, @ARGV;
-if (! $classpath eq "")
-{
-  if ($onnetware == 1)
-  {
-    # make classpath literally $CLASSPATH
-    # this is to avoid pushing us over the 512 character limit
-    # even skip the ; - that is already in $localpath
-    push @ARGS, "-lib", "\$CLASSPATH";
-  }
-  else
-  {
-    push @ARGS, "-lib", "$classpath";
-  }
-}
-print "\n $JAVACMD @ARGS\n\n" if ($debug);
-
-my $returnValue = system $JAVACMD, @ARGS;
-if ($returnValue eq 0)
-        {
-        exit 0;
-        }
-else
-        {
-        # only 0 and 1 are widely recognized as exit values
-        # so change the exit value to 1
-        exit 1;
-        }
diff --git a/tools/bin/runant.py b/tools/bin/runant.py
deleted file mode 100644
index c7b53b6..0000000
--- a/tools/bin/runant.py
+++ /dev/null
@@ -1,100 +0,0 @@
-#!/usr/bin/python
-# Copyright 2001,2003-2004 The Apache Software Foundation
-#
-#  Licensed 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.
-#
-
-"""
-
- runant.py
-
-    This script is a translation of the runant.pl written by Steve Loughran.
-    It runs ant with/out arguments, it should be quite portable (thanks to
-    the python os library)
-    This script has been tested with Python2.0/Win2K
-
- created:         2001-04-11
- author:          Pierre Dittgen pierre.dittgen@criltelecom.com
-
- Assumptions:
-
- - the "java" executable/script is on the command path
-"""
-import os, os.path, string, sys
-
-# Change it to 1 to get extra debug information
-debug = 0
-
-#######################################################################
-
-# If ANT_HOME is not set default to script's parent directory
-if os.environ.has_key('ANT_HOME'):
-    ANT_HOME = os.environ['ANT_HOME']
-else:
-    ANT_HOME = os.path.dirname(os.path.dirname(os.path.abspath(sys.argv[0])))
-
-# set ANT_LIB location
-ANT_LIB = os.path.join(ANT_HOME, 'lib')
-
-# set JAVACMD (check variables JAVACMD and JAVA_HOME)
-JAVACMD = None
-if not os.environ.has_key('JAVACMD'):
-    if os.environ.has_key('JAVA_HOME'):
-        if not os.path.exists(os.environ['JAVA_HOME']):
-            print "Warning: JAVA_HOME is not defined correctly."
-        else:
-            JAVACMD = os.path.join(os.environ['JAVA_HOME'], 'bin', 'java')
-    else:
-        print "Warning: JAVA_HOME not set."
-else:
-    JAVACMD = os.environ['JAVACMD']
-if not JAVACMD:
-    JAVACMD = 'java'
-
-launcher_jar = os.path.join(ANT_LIB, 'ant-launcher.jar')
-if not os.path.exists(launcher_jar):
-    print 'Unable to locate ant-launcher.jar. Expected to find it in %s' % \
-        ANT_LIB
-
-# Build up standard classpath (LOCALCLASSPATH)
-LOCALCLASSPATH = launcher_jar
-if os.environ.has_key('LOCALCLASSPATH'):
-    LOCALCLASSPATH += os.pathsep + os.environ['LOCALCLASSPATH']
-
-ANT_OPTS = ""
-if os.environ.has_key('ANT_OPTS'):
-    ANT_OPTS = os.environ['ANT_OPTS']
-
-OPTS = ""
-if os.environ.has_key('JIKESPATH'):
-    OPTS = '-Djikes.class.path=\"%s\"' % os.environ['JIKESPATH']
-
-ANT_ARGS = ""
-if os.environ.has_key('ANT_ARGS'):
-    ANT_ARGS = os.environ['ANT_ARGS']
-
-CLASSPATH = ""
-if os.environ.has_key('CLASSPATH'):
-    CLASSPATH = os.environ['CLASSPATH']
-
-# Builds the commandline
-cmdline = ('%s %s -classpath %s -Dant.home=%s %s ' + \
-    'org.apache.tools.ant.launch.Launcher %s -lib %s %s') \
-     % (JAVACMD, ANT_OPTS, LOCALCLASSPATH, ANT_HOME, OPTS, ANT_ARGS, \
-        CLASSPATH, string.join(sys.argv[1:], ' '))
-
-if debug:
-    print '\n%s\n\n' % (cmdline)
-
-# Run the biniou!
-os.system(cmdline)
diff --git a/tools/bin/runrc.cmd b/tools/bin/runrc.cmd
deleted file mode 100644
index acdf724..0000000
--- a/tools/bin/runrc.cmd
+++ /dev/null
@@ -1,59 +0,0 @@
-/* 

-    Copyright 2003-2004 The Apache Software Foundation

-  

-    Licensed 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.

-

-    Run RC file, name is in the first arg, second arg is either PATH

-    ENV  or -r or nothing 

-*/

-

-parse arg name path rest

-

-if name = '' then do

-  say 'RC file name is missing'

-  exit 1

-end

-

-if rest \= '' then do

-  say 'Too many parameters'

-  exit 1

-end

-

-call runit name path

-exit 0

-

-runit: procedure

-parse arg name path dir

-

-if path \= '' & path \= '-r' then do

-  dir = value(translate(path),,'OS2ENVIRONMENT')

-  if dir = '' then return

-  dir = translate(dir, '\', '/') /* change UNIX-like path to OS/2 */

-end

-

-if dir = '' then dir = directory()

-

-if path = '-r' then do /* recursive call */

-  subdir = filespec('path', dir)

-  if subdir \= '\' then do

-    subdir = left(subdir, length(subdir)-1)

-    call runit name path filespec('drive', dir) || subdir

-  end

-end

-

-/* Look for the file and run it */

-if right(dir, 1) \= '\' then dir = dir || '\'

-rcfile = stream(dir || name, 'c', 'query exists')

-if rcfile \= '' then interpret 'call "' || rcfile || '"'

-

-return

diff --git a/tools/jetty/conf/admin.xml b/tools/jetty/conf/admin.xml
deleted file mode 100644
index 3650458..0000000
--- a/tools/jetty/conf/admin.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0"  encoding="ISO-8859-1"?>
-<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure 1.2//EN" "http://jetty.mortbay.org/configure_1_2.dtd">
-
-<!-- =============================================================== -->
-<!-- Configure the Jetty Server for the Administration Interface     -->
-<!-- =============================================================== -->
-
-<Configure class="org.mortbay.jetty.Server">
-
-  <!-- =============================================================== -->
-  <!-- Configure the Request Listeners                                 -->
-  <!-- =============================================================== -->
-
-  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-  <!-- Add and configure a HTTP listener to port 8081                    -->
-  <!-- The default port can be changed using: java -Djetty.admin.port=80 -->
-  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-  <Call name="addListener">
-    <Arg>
-      <New class="org.mortbay.http.SocketListener">
-        <Set name="Host">127.0.0.1</Set>
-        <Set name="Port"><SystemProperty name="jetty.admin.port" default="8081"/></Set>
-        <Set name="MinThreads">5</Set>
-        <Set name="MaxThreads">100</Set>
-        <Set name="MaxIdleTimeMs">30000</Set>
-        <Set name="LowResourcePersistTimeMs">5000</Set>
-      </New>
-    </Arg>
-  </Call>
-
-  <!-- =============================================================== -->
-  <!-- Configure the Contexts                                          -->
-  <!-- =============================================================== -->
-
-  <Call name="addContext">
-    <Arg>/</Arg>   
-
-    <Call name="addServlet">
-      <Arg>Admin</Arg>
-      <Arg>/</Arg>
-      <Arg>org.mortbay.servlet.AdminServlet</Arg>
-    </Call>
-    <Call name="setAttribute">
-      <Arg>org.mortbay.http.HttpServer</Arg>
-      <Arg><Call name="getHttpServer"/></Arg>
-    </Call>
-  </Call>
-
-</Configure>
-
-
-
-
diff --git a/tools/jetty/conf/main.xml b/tools/jetty/conf/main.xml
deleted file mode 100644
index 60ea802..0000000
--- a/tools/jetty/conf/main.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0"  encoding="ISO-8859-1"?>
-<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure 1.2//EN" "http://jetty.mortbay.org/configure_1_2.dtd">
-
-<!-- =============================================================== -->
-<!-- Configure the Jetty Server                                      -->
-<!-- =============================================================== -->
-
-<Configure class="org.mortbay.jetty.Server">
-
-  <!-- =============================================================== -->
-  <!-- Configure the Request Listeners                                 -->
-  <!-- =============================================================== -->
-
-  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-  <!-- Add and configure a HTTP listener to port 8888                  -->
-  <!-- The default port can be changed using: java -Djetty.port=80     -->
-  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-  <Call name="addListener">
-    <Arg>
-      <New class="org.mortbay.http.SocketListener">
-        <Set name="Port"><SystemProperty name="jetty.port" default="8888"/></Set>
-        <Set name="MinThreads">5</Set>
-        <Set name="MaxThreads">100</Set>
-        <Set name="MaxIdleTimeMs">30000</Set>
-        <Set name="LowResourcePersistTimeMs">5000</Set>
-      </New>
-    </Arg>
-  </Call>
-
-  <!-- =============================================================== -->
-  <!-- Configure the Contexts                                          -->
-  <!-- =============================================================== -->
-
-  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-  <!-- Add root context web applications.                              -->
-  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-  
-  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-  <!-- Add a all web application within the webapps directory.         -->
-  <!-- + No virtual host specified                                     -->
-  <!-- + Look in the webapps directory relative to jetty.home or .     -->
-  <!-- + Use the webdefault.xml resource for the defaults descriptor   -->
-  <!-- + Upack the war file                                            -->
-  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-  <Call name="addWebApplication">
-    <Arg>/</Arg>
-    <Arg><SystemProperty name="webapp" default="."/></Arg>
-    <Set name="defaultsDescriptor"><SystemProperty name="home" default="."/>/tools/jetty/conf/webdefaults.xml</Set>
-  </Call>
-
-</Configure>
diff --git a/tools/jetty/conf/webdefaults.xml b/tools/jetty/conf/webdefaults.xml
deleted file mode 100644
index 55d40e6..0000000
--- a/tools/jetty/conf/webdefaults.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">   
-
-<!-- ===================================================================== -->
-<web-app>
-  <description>
-    This file is applied to a Web application before it's own WEB-INF/web.xml file
-  </description>
-
-  <!-- ==================================================================== -->
-  <!-- Context params to control Session Cookies                            -->
-  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
-  <!-- UNCOMMENT TO ACTIVATE
-  <context-param>
-    <param-name>org.mortbay.jetty.servlet.SessionDomain</param-name>
-    <param-value>127.0.0.1</param-value>
-  </context-param>
-
-  <context-param>
-    <param-name>org.mortbay.jetty.servlet.SessionPath</param-name>
-    <param-value>/</param-value>
-  </context-param>
-
-  <context-param>
-    <param-name>org.mortbay.jetty.servlet.MaxAge</param-name>
-    <param-value>-1</param-value>
-  </context-param>
-  -->
-
-  <!-- ==================================================================== -->
-  <session-config>
-    <session-timeout>30</session-timeout>
-  </session-config>
-
-</web-app>
-
diff --git a/tools/jetty/lib/jetty-4.2.23.jar b/tools/jetty/lib/jetty-4.2.23.jar
deleted file mode 100644
index 8bd99f2..0000000
--- a/tools/jetty/lib/jetty-4.2.23.jar
+++ /dev/null
Binary files differ
diff --git a/tools/jetty/lib/servlet-2.3.jar b/tools/jetty/lib/servlet-2.3.jar
deleted file mode 100644
index 36bec0f..0000000
--- a/tools/jetty/lib/servlet-2.3.jar
+++ /dev/null
Binary files differ
diff --git a/tools/lib/ant-contrib-0.6.jar b/tools/lib/ant-contrib-0.6.jar
deleted file mode 100644
index db90b0a..0000000
--- a/tools/lib/ant-contrib-0.6.jar
+++ /dev/null
Binary files differ
diff --git a/tools/lib/ant-junit.jar b/tools/lib/ant-junit.jar
deleted file mode 100644
index 5ee4f7f..0000000
--- a/tools/lib/ant-junit.jar
+++ /dev/null
Binary files differ
diff --git a/tools/lib/ant-launcher.jar b/tools/lib/ant-launcher.jar
deleted file mode 100644
index 1a71612..0000000
--- a/tools/lib/ant-launcher.jar
+++ /dev/null
Binary files differ
diff --git a/tools/lib/ant-trax.jar b/tools/lib/ant-trax.jar
deleted file mode 100644
index f4e1540..0000000
--- a/tools/lib/ant-trax.jar
+++ /dev/null
Binary files differ
diff --git a/tools/lib/ant.jar b/tools/lib/ant.jar
deleted file mode 100644
index 3beb3b8..0000000
--- a/tools/lib/ant.jar
+++ /dev/null
Binary files differ
diff --git a/tools/loader/Loader$RepositoryClassLoader.class b/tools/loader/Loader$RepositoryClassLoader.class
deleted file mode 100644
index e068a25..0000000
--- a/tools/loader/Loader$RepositoryClassLoader.class
+++ /dev/null
Binary files differ
diff --git a/tools/loader/Loader.class b/tools/loader/Loader.class
deleted file mode 100644
index cf652fa..0000000
--- a/tools/loader/Loader.class
+++ /dev/null
Binary files differ
diff --git a/xslt/page2xhtml-xdocs.xsl b/xslt/page2xhtml-xdocs.xsl
new file mode 100644
index 0000000..97c2368
--- /dev/null
+++ b/xslt/page2xhtml-xdocs.xsl
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<!-- $Id: page2xhtml.xsl 386695 2006-03-17 19:21:59Z thorsten $ -->
+
+<xsl:stylesheet version="1.0"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns="http://www.w3.org/1999/xhtml"
+    xmlns:xhtml="http://www.w3.org/1999/xhtml"
+    xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
+    xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0" 
+    xmlns:dc="http://purl.org/dc/elements/1.1/"
+    exclude-result-prefixes="page xhtml dc lenya"
+    >
+     
+    
+<!-- {context-prefix}/{publication-id}/{area} -->
+<xsl:param name="root"/>
+
+<!-- i.e. doctypes/xhtml-document -->
+<xsl:param name="document-type"/>
+
+<xsl:param name="document-id"/>
+
+<!-- The request url i.e. /lenya/doctypes/xhtml-document_en.html -->
+<xsl:param name="url"/>
+<xsl:param name="language"/>
+<xsl:param name="title"/>
+
+<xsl:template match="cmsbody">
+  <html>
+    <head>
+      <link rel="stylesheet" href="{$root}/css/page.css" type="text/css"/>
+      <!-- Load doctype-specific CSS -->
+      <xsl:choose>
+        <xsl:when test="$document-type">
+            <link rel="stylesheet" href="{$root}/css/{$document-type}.css" type="text/css"/>
+        </xsl:when>
+        <xsl:otherwise>
+            <!-- do nothing -->
+        </xsl:otherwise>
+      </xsl:choose>
+      <meta content="Apache Lenya" name="generator"/>
+      <title><xsl:value-of select="$title"/></title>
+      <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8"/>
+    </head>	
+    <body>
+      <div id="page">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td id="publication-title">
+            <xsl:choose>
+              <xsl:when test="$language = 'de'">
+                Willkommen zur DOCO Publikation!
+              </xsl:when>
+              <xsl:otherwise>
+                Welcome to the DOCO Publication!
+              </xsl:otherwise>
+            </xsl:choose>
+          </td>
+          <td id="project-logo"><img src="{$root}/images/project-logo.png" alt="project logo"/></td>
+        </tr>
+      </table>
+      <xsl:apply-templates select="xhtml:div[@id = 'tabs']"/>
+      <table width="100%" border="0" cellpadding="0" cellspacing="0">
+        <tr>
+          <td valign="top" style="width: 230px">
+            <xsl:apply-templates select="xhtml:div[@id = 'menu']"/>
+          </td>
+          <td valign="top">
+            <div id="main">
+              <xsl:apply-templates select="xhtml:div[@id = 'breadcrumb']"/>
+              <xsl:apply-templates select="xhtml:div[@id = 'search']"/>
+              <xsl:apply-templates select="*[@id = 'forrest-doc']"/>
+              <!--<xsl:copy-of select="//*[local-name()='document']"/>-->
+              <!--<xsl:apply-templates select="//*[local-name()='document']"/>-->
+            </div>
+          </td>
+        </tr>
+      </table>
+      </div>
+    </body>
+  </html>
+</xsl:template>
+  <!--<xsl:template match="*[local-name()='document']">
+    <div>
+      <xsl:attribute name="bxe_xpath">//*[local-name()='document']</xsl:attribute>
+      <xsl:copy-of select="@*"/>
+      <xsl:copy-of select="./*|text()"/>
+    </div>
+  </xsl:template>-->
+  <xsl:template match="*[@id = 'forrest-doc']">
+    <div>
+      <xsl:attribute name="bxe_xpath">//*[local-name()='document']</xsl:attribute>
+      <!--<xsl:copy-of select="@*"/>-->
+       <xsl:apply-templates/>
+      <!--<xsl:copy-of select="./*|text()"/>-->
+    </div>
+  </xsl:template>
+<xsl:template match="@*|node()" priority="-1">
+  <xsl:copy>
+    <xsl:apply-templates select="@*|node()"/>
+  </xsl:copy>
+</xsl:template>
+
+
+</xsl:stylesheet> 
diff --git a/xslt/page2xhtml.xsl b/xslt/page2xhtml.xsl
new file mode 100644
index 0000000..9a5c2bf
--- /dev/null
+++ b/xslt/page2xhtml.xsl
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<!-- $Id$ -->
+
+<xsl:stylesheet version="1.0"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns="http://www.w3.org/1999/xhtml"
+    xmlns:xhtml="http://www.w3.org/1999/xhtml"
+    xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
+    xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0" 
+    xmlns:dc="http://purl.org/dc/elements/1.1/"
+    exclude-result-prefixes="page xhtml dc lenya"
+    >
+     
+    
+<!-- {context-prefix}/{publication-id}/{area} -->
+<xsl:param name="root"/>
+
+<!-- i.e. doctypes/xhtml-document -->
+<xsl:param name="document-type"/>
+
+<xsl:param name="document-id"/>
+
+<!-- The request url i.e. /lenya/doctypes/xhtml-document_en.html -->
+<xsl:param name="url"/>
+<xsl:param name="language"/>
+<xsl:param name="title"/>
+
+<xsl:template match="cmsbody">
+  <html>
+    <head>
+      <link rel="stylesheet" href="{$root}/css/page.css" type="text/css"/>
+      <!-- Load doctype-specific CSS -->
+      <xsl:choose>
+        <xsl:when test="$document-type">
+            <link rel="stylesheet" href="{$root}/css/{$document-type}.css" type="text/css"/>
+        </xsl:when>
+        <xsl:otherwise>
+            <!-- do nothing -->
+        </xsl:otherwise>
+      </xsl:choose>
+      <meta content="Apache Lenya" name="generator"/>
+      <title><xsl:value-of select="$title"/></title>
+      <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8"/>
+    </head>	
+    <body>
+      <div id="page">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td id="publication-title">
+            <xsl:choose>
+              <xsl:when test="$language = 'de'">
+                Willkommen zur DOCO Publikation!
+              </xsl:when>
+              <xsl:otherwise>
+                Welcome to the DOCO Publication!
+              </xsl:otherwise>
+            </xsl:choose>
+          </td>
+          <td id="project-logo"><img src="{$root}/images/project-logo.png" alt="project logo"/></td>
+        </tr>
+      </table>
+      <xsl:apply-templates select="xhtml:div[@id = 'tabs']"/>
+      <table width="100%" border="0" cellpadding="0" cellspacing="0">
+        <tr>
+          <td valign="top" style="width: 230px">
+            <xsl:apply-templates select="xhtml:div[@id = 'menu']"/>
+          </td>
+          <td valign="top">
+            <div id="main">
+              <xsl:apply-templates select="xhtml:div[@id = 'breadcrumb']"/>
+              <xsl:apply-templates select="xhtml:div[@id = 'search']"/>
+              <xsl:apply-templates select="xhtml:div[@id = 'body']"/>
+            </div>
+          </td>
+        </tr>
+      </table>
+      </div>
+    </body>
+  </html>
+</xsl:template>
+
+<xsl:template match="@*|node()" priority="-1">
+  <xsl:copy>
+    <xsl:apply-templates select="@*|node()"/>
+  </xsl:copy>
+</xsl:template>
+
+
+</xsl:stylesheet>