You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2009/02/05 22:26:38 UTC

svn commit: r741298 - in /lenya/trunk: org.apache.lenya.core.api/ org.apache.lenya.core.api/src/main/resources/ org.apache.lenya.core.api/src/main/resources/META-INF/ org.apache.lenya.core.api/src/main/resources/META-INF/cocoon/ org.apache.lenya.core.a...

Author: andreas
Date: Thu Feb  5 21:26:37 2009
New Revision: 741298

URL: http://svn.apache.org/viewvc?rev=741298&view=rev
Log:
Adding sitemap component declarations and dependencies for global sitemap.

Added:
    lenya/trunk/org.apache.lenya.core.api/src/main/resources/
    lenya/trunk/org.apache.lenya.core.api/src/main/resources/META-INF/
    lenya/trunk/org.apache.lenya.core.api/src/main/resources/META-INF/cocoon/
    lenya/trunk/org.apache.lenya.core.api/src/main/resources/META-INF/cocoon/avalon/
    lenya/trunk/org.apache.lenya.core.api/src/main/resources/META-INF/cocoon/avalon/lenya-core-sitemap.xconf
    lenya/trunk/org.apache.lenya.module.svg/src/main/resources/
    lenya/trunk/org.apache.lenya.module.svg/src/main/resources/META-INF/
    lenya/trunk/org.apache.lenya.module.svg/src/main/resources/META-INF/cocoon/
    lenya/trunk/org.apache.lenya.module.svg/src/main/resources/META-INF/cocoon/avalon/
    lenya/trunk/org.apache.lenya.module.svg/src/main/resources/META-INF/cocoon/avalon/lenya-module-svg-sitemap.xconf
    lenya/trunk/org.apache.lenya.welcome/src/main/resources/COB-INF/global-sitemap.xmap
Modified:
    lenya/trunk/org.apache.lenya.core.api/pom.xml
    lenya/trunk/org.apache.lenya.core.usecase/src/main/resources/META-INF/cocoon/avalon/lenya-core-usecase-sitemap.xconf
    lenya/trunk/org.apache.lenya.parent/pom.xml
    lenya/trunk/org.apache.lenya.webapp/   (props changed)
    lenya/trunk/org.apache.lenya.webapp/pom.xml
    lenya/trunk/org.apache.lenya.welcome/   (props changed)
    lenya/trunk/org.apache.lenya.welcome/pom.xml
    lenya/trunk/org.apache.lenya.welcome/src/main/resources/COB-INF/sitemap.xmap

Modified: lenya/trunk/org.apache.lenya.core.api/pom.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.core.api/pom.xml?rev=741298&r1=741297&r2=741298&view=diff
==============================================================================
--- lenya/trunk/org.apache.lenya.core.api/pom.xml (original)
+++ lenya/trunk/org.apache.lenya.core.api/pom.xml Thu Feb  5 21:26:37 2009
@@ -31,7 +31,6 @@
     <dependency>
       <groupId>org.apache.cocoon</groupId>
       <artifactId>cocoon-flowscript-impl</artifactId>
-      <version>1.0.0</version>
     </dependency>
     <dependency>
       <groupId>commons-validator</groupId>
@@ -40,7 +39,10 @@
     <dependency>
       <groupId>org.apache.cocoon</groupId>
       <artifactId>cocoon-validation-impl</artifactId>
-      <version>1.0.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.cocoon</groupId>
+      <artifactId>cocoon-serializers-impl</artifactId>
     </dependency>
   </dependencies>
 </project>

Added: lenya/trunk/org.apache.lenya.core.api/src/main/resources/META-INF/cocoon/avalon/lenya-core-sitemap.xconf
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.core.api/src/main/resources/META-INF/cocoon/avalon/lenya-core-sitemap.xconf?rev=741298&view=auto
==============================================================================
--- lenya/trunk/org.apache.lenya.core.api/src/main/resources/META-INF/cocoon/avalon/lenya-core-sitemap.xconf (added)
+++ lenya/trunk/org.apache.lenya.core.api/src/main/resources/META-INF/cocoon/avalon/lenya-core-sitemap.xconf Thu Feb  5 21:26:37 2009
@@ -0,0 +1,118 @@
+<?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<map:components xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+
+  <!-- Generators -->
+  <map:generators>
+    <map:generator label="content" logger="sitemap.generator.sessionattr" name="session-attr"
+      pool-max="16" src="org.apache.cocoon.generation.SessionAttributeGenerator"/>
+  </map:generators>
+
+
+  <!-- Serializers -->
+  <map:serializers>
+    <!-- this declaration is just to test if the patch has already been applied -->
+    <map:serializer name="patch-test" src="org.apache.cocoon.components.serializers.HTMLSerializer"/>
+
+    <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">
+      <doctype-default>loose</doctype-default>
+      <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.components.serializers.XHTMLSerializer"
+      mime-type="text/html; charset=utf-8" logger="sitemap.serializer.xhtml" pool-grow="2"
+      pool-max="64" pool-min="2">
+      <doctype-default>strict</doctype-default>
+      <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="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="text" logger="sitemap.serializer.text" mime-type="text/plain"
+      src="org.apache.cocoon.serialization.TextSerializer">
+      <encoding>UTF-8</encoding>
+    </map:serializer>
+
+  </map:serializers>
+
+  <!-- Matchers -->
+  <map:matchers>
+    <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:matchers>
+
+  <!-- Actions -->
+  <map:actions>
+    <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="session-propagator" logger="sitemap.action.session-propagator"
+      src="org.apache.cocoon.acting.SessionPropagatorAction"/>
+  </map:actions>
+
+</map:components>

Modified: lenya/trunk/org.apache.lenya.core.usecase/src/main/resources/META-INF/cocoon/avalon/lenya-core-usecase-sitemap.xconf
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.core.usecase/src/main/resources/META-INF/cocoon/avalon/lenya-core-usecase-sitemap.xconf?rev=741298&r1=741297&r2=741298&view=diff
==============================================================================
--- lenya/trunk/org.apache.lenya.core.usecase/src/main/resources/META-INF/cocoon/avalon/lenya-core-usecase-sitemap.xconf (original)
+++ lenya/trunk/org.apache.lenya.core.usecase/src/main/resources/META-INF/cocoon/avalon/lenya-core-usecase-sitemap.xconf Thu Feb  5 21:26:37 2009
@@ -20,5 +20,7 @@
     <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="registered-usecase" logger="sitemap.matcher.registered-usecase"
+      src="org.apache.lenya.cms.cocoon.matching.UsecaseRegistrationMatcher"/>
   </map:matchers>
 </map:components>

Added: lenya/trunk/org.apache.lenya.module.svg/src/main/resources/META-INF/cocoon/avalon/lenya-module-svg-sitemap.xconf
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.module.svg/src/main/resources/META-INF/cocoon/avalon/lenya-module-svg-sitemap.xconf?rev=741298&view=auto
==============================================================================
--- lenya/trunk/org.apache.lenya.module.svg/src/main/resources/META-INF/cocoon/avalon/lenya-module-svg-sitemap.xconf (added)
+++ lenya/trunk/org.apache.lenya.module.svg/src/main/resources/META-INF/cocoon/avalon/lenya-module-svg-sitemap.xconf Thu Feb  5 21:26:37 2009
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<map:components xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+  <map:serializers>
+    <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:serializer name="svg2tiff" logger="sitemap.serializer.svg2tiff" mime-type="image/tiff" src="org.apache.cocoon.serialization.SVGSerializer"/>
+  </map:serializers>
+</map:components>
\ No newline at end of file

Modified: lenya/trunk/org.apache.lenya.parent/pom.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.parent/pom.xml?rev=741298&r1=741297&r2=741298&view=diff
==============================================================================
--- lenya/trunk/org.apache.lenya.parent/pom.xml (original)
+++ lenya/trunk/org.apache.lenya.parent/pom.xml Thu Feb  5 21:26:37 2009
@@ -32,7 +32,10 @@
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-war-plugin</artifactId>
+          <version>2.0.2</version>
+          <!--
           <version>2.1-alpha-2</version>
+          -->
         </plugin>
         <!--
         <plugin>
@@ -227,6 +230,11 @@
       </dependency>
       <dependency>
         <groupId>org.apache.cocoon</groupId>
+        <artifactId>cocoon-serializers-impl</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.cocoon</groupId>
         <artifactId>cocoon-sitemap-impl</artifactId>
         <version>1.1.0-SNAPSHOT</version>
       </dependency>
@@ -235,6 +243,11 @@
         <artifactId>cocoon-samples-style-default</artifactId>
         <version>1.0.0-SNAPSHOT</version>
       </dependency>
+      <dependency>
+        <groupId>org.apache.cocoon</groupId>
+        <artifactId>cocoon-validation-impl</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+      </dependency>
       
       <!-- Lenya -->
       <dependency>

Propchange: lenya/trunk/org.apache.lenya.webapp/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Feb  5 21:26:37 2009
@@ -0,0 +1,7 @@
+target
+.project
+.classpath
+.settings
+profiles.xml
+bin
+

Modified: lenya/trunk/org.apache.lenya.webapp/pom.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.webapp/pom.xml?rev=741298&r1=741297&r2=741298&view=diff
==============================================================================
--- lenya/trunk/org.apache.lenya.webapp/pom.xml (original)
+++ lenya/trunk/org.apache.lenya.webapp/pom.xml Thu Feb  5 21:26:37 2009
@@ -28,7 +28,7 @@
   <artifactId>lenya-webapp</artifactId>
   <version>2.2.0-SNAPSHOT</version>
   <packaging>war</packaging>
-  <name>Lenya Webapp</name>
+  <name>Apache Lenya Webapp</name>
 
   <build>
     <plugins>
@@ -52,6 +52,7 @@
   </build>
 
   <dependencies>
+    
     <!-- Cocoon Core -->
     <dependency>
       <groupId>org.apache.cocoon</groupId>

Propchange: lenya/trunk/org.apache.lenya.welcome/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Feb  5 21:26:37 2009
@@ -0,0 +1,6 @@
+target
+.project
+.classpath
+.settings
+profiles.xml
+bin

Modified: lenya/trunk/org.apache.lenya.welcome/pom.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.welcome/pom.xml?rev=741298&r1=741297&r2=741298&view=diff
==============================================================================
--- lenya/trunk/org.apache.lenya.welcome/pom.xml (original)
+++ lenya/trunk/org.apache.lenya.welcome/pom.xml Thu Feb  5 21:26:37 2009
@@ -30,7 +30,7 @@
   </parent>
   <artifactId>lenya-welcome</artifactId>
   <version>2.2.0-SNAPSHOT</version>  
-  <name>Lenya Welcome Page</name>
+  <name>Apache Lenya Welcome Page</name>
   
   <build>
     <plugins>
@@ -64,5 +64,9 @@
       <groupId>org.apache.cocoon</groupId>
       <artifactId>cocoon-samples-style-default</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.apache.lenya</groupId>
+      <artifactId>lenya-core-api</artifactId>
+    </dependency>
   </dependencies>
 </project>

Added: lenya/trunk/org.apache.lenya.welcome/src/main/resources/COB-INF/global-sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.welcome/src/main/resources/COB-INF/global-sitemap.xmap?rev=741298&view=auto
==============================================================================
--- lenya/trunk/org.apache.lenya.welcome/src/main/resources/COB-INF/global-sitemap.xmap (added)
+++ lenya/trunk/org.apache.lenya.welcome/src/main/resources/COB-INF/global-sitemap.xmap Thu Feb  5 21:26:37 2009
@@ -0,0 +1,349 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+    
+<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:transform type="proxy"/>
+      <map:transform src="context://lenya/xslt/util/strip_namespaces.xsl"/>
+      <map:transform src="fallback://lenya/modules/prettyprinting/xslt/xml2nicexml.xsl"/>
+    </map:resource>  
+
+    <map:resource name="i18n">
+      <map:transform type="i18n">
+        <map:parameter name="locale" value="{request:locale}"/>
+      </map:transform>
+    </map:resource>
+
+    <!-- do proxy transformation on css files for url('') links -->
+    <map:resource name="proxy-css">
+      <map:act type="resource-exists"
+        src="{url}.xml">
+        <map:generate src="{../url}.xml"/>
+        <map:transform src="fallback://lenya/resources/css/css.xsl">
+          <map:parameter name="root" value="/{page-envelope:publication-id}/{page-envelope:area}"/>
+        </map:transform>
+        <map:call resource="prepare-proxy-css"/>
+      </map:act>
+      <map:generate type="text" src="{url}.css"/>
+      <map:call resource="prepare-proxy-css"/>
+    </map:resource>
+
+    <!-- 
+      chaperon magic: parse css files, convert url('') links into xml snippets, feed them
+      to the standard proxy transformer, then convert the intermediate xml back to valid css.
+    -->
+    <map:resource name="prepare-proxy-css">
+      <map:transform type="pattern"
+        src="fallback://lenya/chaperon/grammars/link.xlex"/>
+      <map:transform
+        src="fallback://lenya/chaperon/stylesheets/pattern-to-link.xsl"/>
+      <map:transform type="proxy"/>
+      <map:transform
+        src="fallback://lenya/chaperon/stylesheets/a-to-txt.xsl"/>
+      <map:serialize type="text" mime-type="text/css"/>
+    </map:resource>
+
+  </map:resources>
+
+
+
+  <map:pipelines>
+  
+    <map:component-configurations>
+      <global-variables>
+        <!-- 
+          pipeline expiration time (governs the setting of "expires" headers for browser-side
+          caching), see http://cocoon.apache.org/2.1/userdocs/concepts/caching.html
+        -->
+        <pipeline-expiration>now</pipeline-expiration>
+      </global-variables>
+    </map:component-configurations>
+  
+    <!-- create a list of publications for the global welcome page: -->  
+    <map:pipeline>
+      <map:match pattern="aggregate-publications">
+        <map:generate type="directory" src="lenya/pubs"/>
+        <map:transform src="lenya/xslt/util/aggregate-publications.xsl"/>
+        <map:transform type="xinclude"/>
+        <map:serialize type="xml"/>
+      </map:match>
+    </map:pipeline>
+
+    <!-- FIXME: this should go into a cforms support module -->
+
+    <map:pipeline>
+      <map:match pattern="cforms/ajax/**">
+        <map:read src="resource://org/apache/cocoon/ajax/resources/{1}"/>
+      </map:match>
+    </map:pipeline>   
+    <map:pipeline>
+      <map:match pattern="cforms/dojo/**">
+        <map:read src="resource://org/apache/cocoon/dojo/resources/{1}"/>
+      </map:match>
+    </map:pipeline> 
+    <map:pipeline>
+      <map:match pattern="cforms/forms/**">
+        <map:read src="resource://org/apache/cocoon/forms/resources/{1}"/>
+      </map:match>
+    </map:pipeline>
+
+
+    <map:pipeline>
+      <!-- serve "lenya/" resources (GUI and utilities) -->
+      <map:match pattern="lenya/**">
+        <map:mount uri-prefix="lenya" src="lenya/lenya.xmap" check-reload="true" reload-method="synchron" pass-through="true"/>
+      </map:match>
+    </map:pipeline>
+
+    <!-- Menu generation: -->
+    <map:pipeline internal-only="true">
+
+      <!-- Generate a meta-stylesheet that adds the Lenya GUI menu to pages -->
+      <!-- lenya-page/{publication-id}/{area}/... -->
+      <map:match pattern="lenya-page/*/*/**">
+        <map:generate src="cocoon://modules/menubar/{1}/{2}/lenyaGui.xsl"/>
+        <map:serialize type="xml"/>
+      </map:match>
+      
+      <!-- FIXME: this is currently unused -->
+      <!-- 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" pass-through="true"/>
+      </map:match>
+-->
+    </map:pipeline>
+
+
+    <!-- Module requests -->
+    
+    <!-- an extra handler for internal module requests to avoid the resource-exists check 
+         in the external requests matcher
+         FIXME: is the overhead reduction worth the extra complication?
+         FIXME: doesn't this mean that internal requests aren't served statically (see below) and
+         resources might not even be available to internal requests if the module sitemap doesn't
+         handle them?
+    -->
+    <map:pipeline internal-only="true">
+      <map:match pattern="modules/*/**">
+        <map:mount uri-prefix="modules/{1}/" src="{fallback:lenya/modules/{1}/sitemap.xmap}" check-reload="true" reload-method="synchron"/>
+      </map:match>
+      <map:match pattern="*/modules/*/**">
+        <map:mount uri-prefix="{1}/modules/{2}/" src="{fallback:lenya/modules/{2}/sitemap.xmap}" check-reload="true" reload-method="synchron"/>
+      </map:match>
+    </map:pipeline>
+
+
+    <map:pipeline>
+
+      <map:match pattern="modules/*/**">
+        <map:select type="resource-exists">
+          <!-- resource exists - serve statically -->
+          <map:when test="fallback://lenya/modules/{1}/resources/{2}">
+            <map:mount uri-prefix="modules/" src="{fallback:lenya/module-resources.xmap}" check-reload="true" reload-method="synchron" pass-through="true"/>
+          </map:when>
+        </map:select>
+        <!-- resource doesn't exist or not handled by lenya/module-resources.xmap 
+             - delegate to module -->
+        <map:mount uri-prefix="modules/{1}/" src="{fallback:lenya/modules/{1}/sitemap.xmap}" check-reload="true" reload-method="synchron"/>
+      </map:match>
+
+      <!-- Publication specific Module requests -->
+      <!-- NOTE: the use of publication-specific modules is discouraged, since all modules are actually in one global scope.. -->
+      <!-- {publication-id}/modules/{module-id}/... -->
+      <map:match pattern="*/modules/*/**">
+        <map:select type="resource-exists">
+          <!-- resource exists - serve statically -->
+          <map:when test="fallback://lenya/modules/{2}/resources/{3}">
+            <map:mount uri-prefix="{1}/modules/" src="{fallback:lenya/module-resources.xmap}" check-reload="true" reload-method="synchron" pass-through="true"/>
+          </map:when>
+        </map:select>
+        <!-- resource doesn't exist or not handled by lenya/module-resources.xmap 
+             - delegate to module -->
+        <map:mount uri-prefix="{1}/modules/{2}/" src="{fallback:lenya/modules/{2}/sitemap.xmap}" check-reload="true" reload-method="synchron"/>
+      </map:match>
+
+    </map:pipeline>
+
+    <!-- Internal usecases -->
+    <!-- 
+       We match internal requests to the publication sitemap early to avoid the
+       time-consuming resource-exists operations in the subsequent pipelines
+       before the final publication matcher is reached.
+    -->
+    <map:pipeline internal-only="true">
+      <map:match pattern="*/**">
+        <map:mount uri-prefix="{1}" src="{fallback:sitemap.xmap}" check-reload="true" reload-method="synchron"/>
+      </map:match>
+    </map:pipeline>
+
+    <map:pipeline>
+
+      <!-- enter a module via request parameter -->
+      <map:match type="request-parameter" pattern="lenya.module">
+        <map:mount uri-prefix="" src="{fallback:lenya/modules/{1}/sitemap.xmap}" check-reload="true" reload-method="synchron"/>
+      </map:match>
+
+      <!-- delegate usecases to the usecase sitemap -->
+      <map:match type="usecase" pattern="*">
+        <map:mount uri-prefix="" src="lenya/usecase.xmap" check-reload="true" reload-method="synchron"/>
+      </map:match>
+
+    </map:pipeline>
+
+    <map:pipeline>
+
+      <!-- the Lenya welcome page with a list of available publications -->
+      <map:match pattern="index.html">
+        <map:aggregate element="aggregation-wrapper" label="aggregate">
+          <map:part src="cocoon:/aggregate-publications"/>
+          <map:part src="lenya/content/welcome.xml"/>
+          <map:part src="readme.xml"/>
+        </map:aggregate>
+        <map:transform src="lenya/xslt/util/welcome.xsl"/>
+        <map:call resource="style-cms-page"/>
+        <map:serialize />
+      </map:match>
+
+      <!-- any root-level request is directed to the welcome page -->
+      <map:match pattern="*">
+        <map:redirect-to uri="{proxy:/index.html}"/>
+      </map:match>
+
+      <!-- FIXME: this is apparently WebDAV-related. Does it have to be here, and what does it do? -->
+      <map:match pattern="*">
+        <map:select type="request-method">
+          <map:when test="PROPFIND">
+            <map:generate type="file" src="context://lenya/content/util/empty.xml"/>
+            <map:transform src="fallback://lenya/modules/webdav/xslt/init.xsl">
+              <map:parameter name="pubid" value="{page-envelope:publication-id}"/>
+              <map:parameter name="context" value="{request:contextPath}"/>
+            </map:transform>
+            <map:serialize type="xml" status-code="207"/>
+          </map:when>
+          <map:when test="OPTIONS">
+            <map:mount uri-prefix="" src="{fallback:lenya/modules/webdav/sitemap.xmap}" check-reload="true" reload-method="synchron"/>
+          </map:when>
+        </map:select>
+      </map:match> 
+      <map:match pattern="{page-envelope:publication-id}/">
+        <map:select type="request-method">
+          <map:when test="PROPFIND">
+           <map:generate type="file" src="context://lenya/content/util/empty.xml"/>
+            <map:transform src="fallback://lenya/modules/webdav/xslt/init.xsl">
+              <map:parameter name="pubid" value="{page-envelope:publication-id}"/>
+              <map:parameter name="context" value="{request:contextPath}"/>            
+            </map:transform>
+            <map:serialize type="xml" status-code="207"/>
+          </map:when>
+          <map:when test="OPTIONS">
+            <map:mount uri-prefix="" src="{fallback:lenya/modules/webdav/sitemap.xmap}" check-reload="true" reload-method="synchron"/>
+          </map:when>
+        </map:select>
+      </map:match>
+
+      <!-- redirect publication root requests to the publication's welcome page -->
+      <map:match pattern="*/">
+        <map:redirect-to uri="{proxy:/introduction.html}"/>
+      </map:match>
+      <map:match pattern="*/index.html">
+        <map:redirect-to uri="{proxy:/introduction.html}"/>
+      </map:match>
+
+      <!-- generate welcome pages for each publication with an aggregation of relevant READMEs -->
+      <map:match pattern="*/introduction.html">
+        <map:aggregate element="aggregation-wrapper">
+          <map:part src="aggregate-fallback://readme.xml"/>
+          <map:part src="lenya/pubs/{1}/config/publication.xml"/>
+        </map:aggregate>
+        <map:transform src="lenya/xslt/util/introduction.xsl"/>
+        <map:call resource="style-cms-page"/>
+        <map:serialize />
+      </map:match>
+     
+    </map:pipeline>
+  
+    <!-- an extra handler for internal publication requests to avoid the resource-exists check 
+         in the external requests matcher -->
+    <!-- FIXME: see comments for internal module request matcher above. -->
+    <map:pipeline internal-only="true">
+      <map:match pattern="*/**">
+        <map:mount uri-prefix="{1}" src="{fallback:sitemap.xmap}" check-reload="true" reload-method="synchron"/>
+      </map:match>
+    </map:pipeline>
+
+    <map:pipeline>
+
+      <!-- Resources -->
+      <!-- FIXME: doesn't this create a hefty overhead for all publication documents? -->
+      <!-- {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="{fallback:lenya/resources.xmap}" check-reload="true" reload-method="synchron"/>
+        </map:act>
+        <!-- FIXME: please document the "shared" resources concept. Or maybe we can ditch it? -->
+        <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="{fallback:lenya/resources-shared.xmap}" check-reload="true" reload-method="synchron"/>
+        </map:act>
+        <!-- Ancestors resources, css, js, etc... -->
+        <!-- {publication-id}/{area}/{filename}.inherited.{extention} -->
+        <!-- FIXME: what is this mechanism used for? please document or provide a pointer to existing docs -->
+        <map:match pattern="*/*/**.inherited.*">
+          <map:act type="resource-exists-enhanced">
+            <map:parameter name="url" value="template-fallback://resources/shared/{3}.{4}"/>
+            <map:parameter name="type" value="file"/>
+            <map:mount uri-prefix="" src="{fallback:lenya/resources-shared.xmap}" check-reload="true" reload-method="synchron"/>
+          </map:act>
+        </map:match>
+      </map:match>
+
+     <!-- delegate publication requests to the publication sitemap -->
+     <map:match pattern="*/**">
+       <map:select type="parameter">
+         <map:parameter name="parameter-selector-test" value="{page-envelope:publication-id}"/>
+         <map:when test="">
+           <map:generate type="jx" src="lenya/content/exception/publication-does-not-exist.jx">
+             <map:parameter name="publicationId" value="{1}"/>
+           </map:generate>
+           <map:transform type="i18n">
+             <map:parameter name="locale" value="{request:locale}"></map:parameter>
+           </map:transform>
+           <map:call resource="style-cms-page"/>
+           <map:serialize status-code="404" />
+         </map:when>
+         <map:otherwise>
+           <map:mount uri-prefix="{1}" src="{fallback:sitemap.xmap}" check-reload="true" reload-method="synchron"/>
+         </map:otherwise>
+       </map:select>
+     </map:match>
+   </map:pipeline>
+
+</map:pipelines>
+
+</map:sitemap>

Modified: lenya/trunk/org.apache.lenya.welcome/src/main/resources/COB-INF/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.welcome/src/main/resources/COB-INF/sitemap.xmap?rev=741298&r1=741297&r2=741298&view=diff
==============================================================================
--- lenya/trunk/org.apache.lenya.welcome/src/main/resources/COB-INF/sitemap.xmap (original)
+++ lenya/trunk/org.apache.lenya.welcome/src/main/resources/COB-INF/sitemap.xmap Thu Feb  5 21:26:37 2009
@@ -15,314 +15,102 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-
-<!--+
-    | This is the 'heart' of Cocoon. The sitemap maps URI space to
-    | resources. It consists basicaly of two parts: components and
-    | pipelines. Pipelines are made out of components. There is such a
-    | vast number of components available that it would be impossible to
-    | describe them here, please refer to the accompanying
-    | documentation. For specific components, have a look also at the
-    | javadocs for them. Most pipelines are present to demonstrate some
-    | feature or technique, often they are explained in more detail in
-    | the accompanying documentation. The sitemaps which come with each
-    | sample and each block will help to explain.
-    |
-    | $Id: sitemap.xmap 606325 2007-12-21 21:33:51Z vgritsenko $
-    +-->
+    
 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
-
-  <!-- =========================== Components =========================== -->
-
-  <map:components>
-
-   <!--+
-       | All needed components are inherited from the parent container
-       | configured in META-INF/cocoon/avalon/*.xconf and
-       | META-INF/cocoon/spring/*.xml files (if using default configuration).
-       +-->
-
-  </map:components>
-
-
-  <!-- =========================== Views ================================ -->
-
-  <!--+
-      | Views provide different, well, views to resources. Views are
-      | orthogonal to pipelines. Please refer to the docs.
-      |
-      | It would be wise to disable any unneeded views in a
-      | production environment in order to avoid exposing data
-      | that you may not necessarily wish to.
-      +-->
-  <map:views>
-    <map:view from-label="content" name="content">
-      <map:serialize type="xml"/>
-    </map:view>
-
-    <map:view from-label="content" name="pretty-content">
-      <!--+
-          | Use servlet service serializer from the named block 'style'.
-          | Name 'style' is mapped to the 'cocoon-samples-style-default' block
-          | in the META-INF/cocoon/spring/lenya-welcome-blockServlet.xml file.
-          +-->
-      <map:serialize type="servletService">
-        <map:parameter name="service" value="servlet:style:/service/system/xml2html"/>
-      </map:serialize>
-    </map:view>
-
-    <map:view from-position="last" name="links">
-      <map:serialize type="links"/>
-    </map:view>
-  </map:views>
-
-
-  <!-- =========================== 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="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:transform type="proxy"/>
+      <map:transform src="context://lenya/xslt/util/strip_namespaces.xsl"/>
+    </map:resource>
   </map:resources>
-
-
-  <!-- =========================== Action sets ========================== -->
-
-  <!--+
-      | Action sets group actions together. If some actions are often used
-      | together in pipeline fragments, it's easier to group them and refer
-      | to the group. For more info, please see the docs.
-      +-->
-  <map:action-sets>
-  </map:action-sets>
-
-
-  <!-- =========================== 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>
-    <!-- main pipeline -->
-    <map:pipeline>
-
-      <!--
-        - Match current sitemap URI against specified pattern.
-        - Here we are using empty pattern, "". If URI matches
-        - (if it is empty), nested instructions are exectuted,
-        - thus assembling the welcome page.  
-        -->
-      <map:match pattern="">
-
-        <!--+
-            | Start generating SAX events inside the pipeline. In this case,
-            | since no "type" attribute is specified, the default generator
-            | is used and this is a regular XML parser that reads the
-            | given file from the URL included in the "src" attribute and
-            | sends the events produced by the parser down the pipeline to
-            | be processed by the next stage.
-            +-->
-        <map:generate src="welcome.xml" label="content, pretty-content"/>
-
-        <!--+
-            | The serializer concludes the SAX events journey into the pipeline
-            | since it serializes the events it receives into a representation
-            | depending on the serializer type.
-            +-->
-        <map:serialize type="servletService">
-          <map:parameter name="service" value="servlet:style:/service/common/simple-page2html"/>
-        </map:serialize>
-      </map:match>
-
-      <!--+
-          | Show this sitemap.xmap file.
-          +-->
-      <map:match pattern="sitemap.xmap">
-        <map:read src="sitemap.xmap" mime-type="text/xml"/>
-      </map:match>
-
-      <!--+
-          | The default matching is also capable of matching more than a
-          | single request by the use of 'wildcards'. There are two kinds of
-          | wildcards:
-          |
-          |  "*" means "anything that does not contain a path separator"
-          |  "**" means "anything including path separators"
-          |
-          | The tokens matched by the wildcards are passed over as sitemap
-          | variables. Those variables can be accessed using the '{...}' syntax
-          | inside the attributes. The URI-matching tokens are associated to
-          | numbered variables, as shown in the following match that processes all
-          | the GIF images that are located in the 'images/' URL space but
-          | not in any deeper levels. Note how requesting "images/logo.gif"
-          | triggers the matcher to create the token {1} = 'logo' which is later
-          | expanded into the src="" attribute of the reader, indicating
-          | what file it has to read.
-          +-->
-
-      <!--+
-          | Mount user directories.
-          |
-          | The location of user directories depends heavily on the operating
-          | system used. Here we try to detect if we are running on one of 3
-          | most used platforms and mount appropriate home directory.
-          |
-          | NOTE: You might want to comment out this entire section in a
-          |       production environment.
-          +-->
-      <map:match pattern="~*/**">
-        <map:select type="resource-exists">
-          <!-- macosx -->
-          <map:when test="/Users/">
-            <map:mount src="/Users/{1}/Sites/" uri-prefix="~{1}"/>
-          </map:when>
-          <!-- unix -->
-          <map:when test="/home/">
-            <map:mount src="/home/{1}/public_html/" uri-prefix="~{1}"/>
-          </map:when>
-          <!-- win32 -->
-          <map:when test="/Documents and Settings/">
-            <map:mount src="/Documents and Settings/{1}/My Documents/My Website/" uri-prefix="~{1}"/>
-          </map:when>
-        </map:select>
-      </map:match>
-
-      <!--+
-          | Redirect to the user directory if the ending slash is missing
-          | Cocoon doesn't do automatic translation of URLs because we consider it
-          | a bad practice. http://blah/something/ and http://blah/something
-          | effectively locate different web resources and the act of mapping
-          | them to the same system resources is your concern, not Cocoon's.
-          | Note that some stupid browsers (IE, for example) believe the opposite
-          | and will drop the ending slash when you bookmark a web resource
-          | so be aware of this issue and plan your URL-space carefully.
-          +-->
-      <map:match pattern="~*">
-        <map:redirect-to uri="{0}/"/>
+    
+    <map:pipeline internal-only="true">
+      
+      <!-- Lenya GUI screen -->
+      <map:match pattern="lenya-screen.xsl">
+        <map:generate src="fallback://lenya/xslt/util/page2xhtml.xsl"/>
+        <map:serialize type="xml"/>
+      </map:match>
+      
+      <map:match pattern="**">
+        <map:mount check-reload="true" reload-method="synchron" src="global-sitemap.xmap" uri-prefix=""/>
       </map:match>
-
-      <!--+
-          | Find a match in the "mount-table.xml" file, if present. It allows to mount other
-          | directories without touching this main sitemap (and thus loosing changes on rebuild).
-          |
-          | Note that other mount-tables can be added here using the xpatch ant task
-          | (see src/confpatch/mount-table.xmap)
-          +-->
-      <!--
-        Disabled while working on OSGI stuff, this wouldn't work anyway
-        (due to the ../) and it causes an NPE in the MountTableMatcher
-      <map:match type="mount-table" pattern="../../mount-table.xml">
-        <map:mount src="{src}" uri-prefix="{uri-prefix}"/>
-      </map:match>
-      -->
-
-      <!--+
-          | Cocoon-provided client-side resources.
-          | Some block's jar files (e.g. Ajax & Forms) include client-side resources
-          | such as JavaScript, CSS and images. The system-level pattern below
-          | fetches these resources, while allowing them to be overridden if needed
-          | in the webapp's "resources" directory.
-          |
-          | Defining this pattern in the root sitemap avoids duplicating it in subsitemaps,
-          | which reduces copy/pasting in application code and allows better client-side
-          | caching by giving each resource a single URL.
-          |
-          | Furthermore, some Cocoon code such as the Forms-provided XSLs assume that
-          | resources are available at that URL.
-          |
-          | The absolute path for these resources is "{request:contextPath}/_cocoon/resources"
-          +-->
-      <map:match pattern="_cocoon/resources/*/**">
-        <map:select type="resource-exists">
-          <map:when test="resources/{1}/{2}">
-            <map:read src="resources/{1}/{2}"/>
-          </map:when>
-          <!-- For Cocoon development, read directly from source directories
-          <map:when test="../../src/blocks/{1}/java/org/apache/cocoon/{1}/resources/{2}">
-            <map:read src="../../src/blocks/{1}/java/org/apache/cocoon/{1}/resources/{2}"/>
-	        </map:when>
-		      -->
-          <map:otherwise>
-            <map:read src="resource://org/apache/cocoon/{1}/resources/{2}"/>
-          </map:otherwise>
-        </map:select>
-      </map:match>
-
-      <!--+
-          | Mount everything else by calling the sitemap.xmap file located
-          | in the requested folder.
-          +-->
-      <map:match pattern="*/**">
-        <map:mount src="{1}/" uri-prefix="{1}"/>
+      
+    </map:pipeline>
+    
+    <map:pipeline>
+      
+      <map:match pattern="ac.login" type="usecase">
+        <map:mount check-reload="yes" reload-method="synchron" src="{fallback:lenya/modules/usecase/usecase.xmap}" uri-prefix=""/>
+      </map:match>
+      <map:match pattern="ac.logout" type="usecase">
+        <map:mount check-reload="yes" reload-method="synchron" src="{fallback:lenya/modules/usecase/usecase.xmap}" uri-prefix=""/>
+      </map:match>
+      
+      <!-- favicon -->
+      <map:match pattern="favicon.ico">
+        <map:read mime-type="image/x-icon" src="lenya/resources/images/lenya.ico"/>
       </map:match>
-
-      <!--+
-          | In every pipeline, you can catch the errors triggered
-          | by the pipeline execution. The error handler is an internal sitemap
-          | component that, when triggered by an error, takes over the normal
-          | pipeline execution.
-          | You can here use the "exception" generator that produces an XML
-          | representation of the error and further manipulate this document
-          | for presentation on screen.
-          | You can also use any other generator if you don't want the
-          | error to be displayed on screen. The "exception" selector can help
-          | you to define different screens for different error types.
-          +-->
-      <map:handle-errors>
-        <map:select type="exception">
-
-          <map:when test="not-found">
-            <map:generate type="exception"/>
-            <map:transform src="servlet:style:/stylesheets/system/exception2html.xslt">
-              <map:parameter name="realPath" value="{realpath:}"/>
-              <map:parameter name="pageTitle" value="Resource not found"/>
-            </map:transform>
-            <map:serialize status-code="404"/>
-          </map:when>
-
-          <map:when test="invalid-continuation">
-            <map:generate type="exception"/>
-            <map:transform src="servlet:style:/stylesheets/system/exception2html.xslt">
-              <map:parameter name="realPath" value="{realpath:}"/>
-              <map:parameter name="pageTitle" value="Invalid Continuation"/>
-            </map:transform>
-            <map:serialize status-code="404"/>
-          </map:when>
-
-          <map:otherwise>
-            <map:generate type="exception"/>
-            <map:transform src="servlet:style:/stylesheets/system/exception2html.xslt">
-              <map:parameter name="realPath" value="{realpath:}"/>
+    </map:pipeline>
+    
+    <map:pipeline>
+      
+      <map:match pattern="**">
+        
+        <!-- redirect to SSL if the policy requires this -->
+        <map:act type="ssl-redirect">
+          <map:redirect-to uri="{redirectUri}" session="true"/>
+        </map:act>
+        
+        <map:match pattern="*/webdav**">
+          <map:act type="authorizer">
+            <map:mount check-reload="true" reload-method="synchron" src="global-sitemap.xmap" uri-prefix=""/> 
+          </map:act>
+          <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 src="context://lenya/content/util/empty.xml" />
+              <map:transform src="fallback://lenya/xslt/exception/forbidden.xsl">
+                <map:parameter name="documentid" value="{page-envelope:document-uuid}"/>
+                <map:parameter name="documenturl" value="{page-envelope:document-url}"/>
+                <map:parameter name="area" value="{page-envelope:area}"/>
+              </map:transform>
+              <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 src="context://lenya/content/util/empty.xml" />
+            <map:transform src="fallback://lenya/xslt/exception/forbidden.xsl">
+              <map:parameter name="documentid" value="{page-envelope:document-uuid}"/>
+              <map:parameter name="documenturl" value="{page-envelope:document-url}"/>
+              <map:parameter name="area" value="{page-envelope:area}"/>
             </map:transform>
-            <map:serialize status-code="500"/>
-          </map:otherwise>
-        </map:select>
-
-      </map:handle-errors>
+            <map:serialize type="xhtml" status-code="401"/>
+          </map:act>
+        </map:match>
+        <map:act type="authorizer">
+          <map:mount uri-prefix="" src="global-sitemap.xmap" check-reload="true" reload-method="synchron"/>
+        </map:act>
+        <map:redirect-to session="true" uri="{proxy:/{1}}?lenya.usecase=ac.login&amp;referrerQueryString={url-encode:{request:queryString}}"/>        
+      </map:match>
+      
     </map:pipeline>
+    
+    <!-- this is the default error handler -->
+    <map:handle-errors>
+      <map:mount src="{fallback:error.xmap}" check-reload="true" reload-method="synchron" uri-prefix=""/>
+    </map:handle-errors>    
+    
   </map:pipelines>
-
 </map:sitemap>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org