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 2007/10/29 22:47:40 UTC

svn commit: r589872 - in /lenya/trunk/src/webapp/lenya: config/sitemap/pipelines.xmap error.xmap xslt/exception/generic.xsl

Author: andreas
Date: Mon Oct 29 14:47:39 2007
New Revision: 589872

URL: http://svn.apache.org/viewvc?rev=589872&view=rev
Log:
Using separate sitemap for error handling, cleaned up exception XSLT

Added:
    lenya/trunk/src/webapp/lenya/error.xmap
Modified:
    lenya/trunk/src/webapp/lenya/config/sitemap/pipelines.xmap
    lenya/trunk/src/webapp/lenya/xslt/exception/generic.xsl

Modified: lenya/trunk/src/webapp/lenya/config/sitemap/pipelines.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/config/sitemap/pipelines.xmap?rev=589872&r1=589871&r2=589872&view=diff
==============================================================================
--- lenya/trunk/src/webapp/lenya/config/sitemap/pipelines.xmap (original)
+++ lenya/trunk/src/webapp/lenya/config/sitemap/pipelines.xmap Mon Oct 29 14:47:39 2007
@@ -108,16 +108,8 @@
     </map:pipeline>
 
     <!-- this is the default error handler -->
-    <map:handle-errors>
-      <map:generate type="notifying"/>
-      <map:transform src="fallback://lenya/xslt/exception/generic.xsl">
-        <map:parameter name="documentid" value="{page-envelope:document-uuid}"/>
-        <map:parameter name="documenturl" value="{page-envelope:document-url}"/>
-      </map:transform>
-      <map:call resource="style-cms-page" />
-      <map:serialize status-code="500" />
-      <map:transform src="fallback://lenya/xslt/util/strip_namespaces.xsl"/>
-      <map:serialize type="xhtml"/>
+    <map:handle-errors>
+      <map:mount src="fallback://lenya/error.xmap" check-reload="true" reload-method="synchron" uri-prefix=""/>
     </map:handle-errors>    
     
   </map:pipelines></xmap>

Added: lenya/trunk/src/webapp/lenya/error.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/error.xmap?rev=589872&view=auto
==============================================================================
--- lenya/trunk/src/webapp/lenya/error.xmap (added)
+++ lenya/trunk/src/webapp/lenya/error.xmap Mon Oct 29 14:47:39 2007
@@ -0,0 +1,44 @@
+<?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: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:resource>
+  </map:resources>
+  
+  <map:pipelines>
+    <map:pipeline>
+      <map:match pattern="**">
+        <map:generate type="notifying"/>
+        <map:transform src="fallback://lenya/xslt/exception/generic.xsl"/>
+        <map:call resource="style-cms-page" />
+        <map:transform src="fallback://lenya/xslt/util/strip_namespaces.xsl"/>
+        <map:serialize type="xhtml" status-code="500" />
+      </map:match>
+    </map:pipeline>
+  </map:pipelines>
+  
+</map:sitemap>

Modified: lenya/trunk/src/webapp/lenya/xslt/exception/generic.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/xslt/exception/generic.xsl?rev=589872&r1=589871&r2=589872&view=diff
==============================================================================
--- lenya/trunk/src/webapp/lenya/xslt/exception/generic.xsl (original)
+++ lenya/trunk/src/webapp/lenya/xslt/exception/generic.xsl Mon Oct 29 14:47:39 2007
@@ -25,12 +25,8 @@
   xmlns="http://www.w3.org/1999/xhtml"
   xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
   
-  <xsl:import href="../util/page-util.xsl"/>
-  <xsl:import href="../util/toggle.xsl"/>
-  
-  <xsl:param name="documentid"/>
-  <xsl:param name="documenturl"/>
-  <xsl:param name="contextPath"/>
+  <xsl:import href="fallback://lenya/xslt/util/page-util.xsl"/>
+  <xsl:import href="fallback://lenya/xslt/util/toggle.xsl"/>
 
   <xsl:template match="error:notify">
     



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