You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by gr...@apache.org on 2004/03/19 11:21:36 UTC
cvs commit: cocoon-lenya/src/webapp/lenya/pubs/default sitemap.xmap usecase-bxeng.xmap publication-sitemap.xmap
gregor 2004/03/19 02:21:36
Modified: src/webapp/lenya/pubs/oscom sitemap.xmap xopus.xmap
src/webapp/lenya/pubs/blog atomapi.xmap webdav.xmap
sitemap.xmap
src/webapp/lenya xopus.xmap lucene.xmap info.xmap lenya.xmap
usecase.xmap
src/webapp global-sitemap.xmap sitemap.xmap
src/webapp/lenya/pubs/default sitemap.xmap
usecase-bxeng.xmap publication-sitemap.xmap
Log:
we now use nice error screens.
converted from deprecated type=500 error handling to new handling with exception selector
this means you should never ever get ugly stack traces again.
Revision Changes Path
1.49 +4 -4 cocoon-lenya/src/webapp/lenya/pubs/oscom/sitemap.xmap
Index: sitemap.xmap
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/pubs/oscom/sitemap.xmap,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- sitemap.xmap 13 Mar 2004 12:42:06 -0000 1.48
+++ sitemap.xmap 19 Mar 2004 10:21:35 -0000 1.49
@@ -204,9 +204,9 @@
<map:serialize type="html"/>
</map:match>
- <map:handle-errors type="500">
- <map:transform src="xslt/404-redirect-to.xsl">
- <map:parameter name="requestURI" value="{request:requestURI}"/>
+ <map:handle-errors>
+ <map:generate type="notifying"/>
+ <map:transform src="../../../stylesheets/system/error2html.xslt">
<map:parameter name="contextPath" value="{request:contextPath}"/>
</map:transform>
<map:serialize type="html"/>
1.18 +4 -3 cocoon-lenya/src/webapp/lenya/pubs/oscom/xopus.xmap
Index: xopus.xmap
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/pubs/oscom/xopus.xmap,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- xopus.xmap 13 Mar 2004 12:42:06 -0000 1.17
+++ xopus.xmap 19 Mar 2004 10:21:35 -0000 1.18
@@ -92,8 +92,9 @@
<!-- Error handling -->
<map:handle-errors>
- <map:transform src="context://stylesheets/system/error2html.xsl"/>
- <map:serialize status-code="500"/>
+ <map:generate type="notifying"/>
+ <map:transform src="context://stylesheets/system/error2html.xslt"/>
+ <map:serialize/>
</map:handle-errors>
</map:pipeline>
1.9 +22 -4 cocoon-lenya/src/webapp/lenya/pubs/blog/atomapi.xmap
Index: atomapi.xmap
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/pubs/blog/atomapi.xmap,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- atomapi.xmap 13 Mar 2004 12:31:32 -0000 1.8
+++ atomapi.xmap 19 Mar 2004 10:21:35 -0000 1.9
@@ -38,7 +38,13 @@
<map:generate src="content/introspection.xml"/>
<map:serialize type="xml"/>
</map:match>
- <map:handle-errors type="500"/>
+ <map:handle-errors>
+ <map:generate type="notifying"/>
+ <map:transform src="../../../stylesheets/system/error2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ <map:serialize type="html"/>
+ </map:handle-errors>
</map:pipeline>
<!-- search-entries -->
@@ -75,7 +81,13 @@
</map:otherwise>
</map:select>
</map:match>
- <map:handle-errors type="500"/>
+ <map:handle-errors>
+ <map:generate type="notifying"/>
+ <map:transform src="../../../stylesheets/system/error2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ <map:serialize type="html"/>
+ </map:handle-errors>
</map:pipeline>
<!-- Get entry -->
@@ -96,7 +108,13 @@
</map:otherwise>
</map:select>
</map:match>
- <map:handle-errors type="500"/>
+ <map:handle-errors>
+ <map:generate type="notifying"/>
+ <map:transform src="../../../stylesheets/system/error2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ <map:serialize type="html"/>
+ </map:handle-errors>
</map:pipeline>
</map:pipelines>
1.7 +43 -3 cocoon-lenya/src/webapp/lenya/pubs/blog/webdav.xmap
Index: webdav.xmap
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/pubs/blog/webdav.xmap,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- webdav.xmap 13 Mar 2004 12:31:32 -0000 1.6
+++ webdav.xmap 19 Mar 2004 10:21:35 -0000 1.7
@@ -56,7 +56,27 @@
</map:otherwise>
</map:select>
</map:match>
- <map:handle-errors type="500"/>
+ <map:handle-errors>
+ <map:select type="exception">
+ <map:when test="resourcenotfound">
+ <map:generate src="../../content/util/empty.xml" />
+ <map:transform src="../../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="../../../stylesheets/system/error2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ </map:otherwise>
+ </map:select>
+ <map:serialize type="html"/>
+ </map:handle-errors>
</map:pipeline>
<map:pipeline type="noncaching">
@@ -76,7 +96,27 @@
</map:otherwise>
</map:select>
</map:match>
- <map:handle-errors type="500"/>
+ <map:handle-errors>
+ <map:select type="exception">
+ <map:when test="resourcenotfound">
+ <map:generate src="../../content/util/empty.xml" />
+ <map:transform src="../../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="../../../stylesheets/system/error2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ </map:otherwise>
+ </map:select>
+ <map:serialize type="html"/>
+ </map:handle-errors>
</map:pipeline>
</map:pipelines>
1.53 +77 -12 cocoon-lenya/src/webapp/lenya/pubs/blog/sitemap.xmap
Index: sitemap.xmap
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/pubs/blog/sitemap.xmap,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- sitemap.xmap 13 Mar 2004 12:31:32 -0000 1.52
+++ sitemap.xmap 19 Mar 2004 10:21:35 -0000 1.53
@@ -21,7 +21,14 @@
<map:components/>
- <map:resources/>
+ <map:resources>
+ <map:resource name="style-cms-page">
+ <map:transform src="../../xslt/util/page2xhtml.xsl">
+ <map:parameter name="contextprefix" value="{request:contextPath}"/>
+ </map:transform>
+ <map:serialize/>
+ </map:resource>
+ </map:resources>
<map:pipelines>
<!-- WebDAV -->
@@ -111,10 +118,22 @@
<map:transform src="cocoon://lenya-page/{page-envelope:publication-id}/{1}/entry.xml"/>
<map:serialize type="html"/>
</map:match>
- <map:handle-errors type="500">
- <!-- FIXME: can also contain other errors than "not published yet" -->
- <map:transform src="../../xslt/exception/not-published-yet.xsl"/>
- <map:transform src="../../xslt/util/page2xhtml.xsl"/>
+ <map:handle-errors>
+ <map:select type="exception">
+ <map:when test="resourcenotfound">
+ <map:generate src="../../content/util/empty.xml" />
+ <map:transform src="../../xslt/exception/document-does-not-exist.xsl"/>
+ <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="../../../stylesheets/system/error2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ </map:otherwise>
+ </map:select>
<map:serialize type="html"/>
</map:handle-errors>
</map:pipeline>
@@ -164,7 +183,24 @@
<map:generate src="config/doctypes/schemas/entry.rng"/>
<map:serialize type="xml"/>
</map:match>
- <map:handle-errors type="500"/>
+ <map:handle-errors>
+ <map:select type="exception">
+ <map:when test="resourcenotfound">
+ <map:generate src="../../content/util/empty.xml" />
+ <map:transform src="../../xslt/exception/document-does-not-exist.xsl"/>
+ <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="../../../stylesheets/system/error2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ </map:otherwise>
+ </map:select>
+ <map:serialize type="html"/>
+ </map:handle-errors>
</map:pipeline>
<!-- /BX Editor: Entries -->
@@ -212,10 +248,22 @@
<map:transform src="cocoon://lenya-page/{page-envelope:publication-id}/{1}/feed.xml"/>
<map:serialize type="html"/>
</map:match>
- <map:handle-errors type="500">
- <!-- FIXME: can also contain other errors than "not published yet" -->
- <map:transform src="../../xslt/exception/not-published-yet.xsl"/>
- <map:transform src="../../xslt/util/page2xhtml.xsl"/>
+ <map:handle-errors>
+ <map:select type="exception">
+ <map:when test="resourcenotfound">
+ <map:generate src="../../content/util/empty.xml" />
+ <map:transform src="../../xslt/exception/document-does-not-exist.xsl"/>
+ <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="../../../stylesheets/system/error2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ </map:otherwise>
+ </map:select>
<map:serialize type="html"/>
</map:handle-errors>
</map:pipeline>
@@ -251,7 +299,24 @@
<map:transform src="cocoon://lenya-page/{page-envelope:publication-id}/{1}/archive.xml"/>
<map:serialize type="html"/>
</map:match>
- <map:handle-errors type="500"/>
+ <map:handle-errors>
+ <map:select type="exception">
+ <map:when test="resourcenotfound">
+ <map:generate src="../../content/util/empty.xml" />
+ <map:transform src="../../xslt/exception/document-does-not-exist.xsl"/>
+ <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="../../../stylesheets/system/error2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ </map:otherwise>
+ </map:select>
+ <map:serialize type="html"/>
+ </map:handle-errors>
</map:pipeline>
</map:pipelines>
1.7 +141 -16 cocoon-lenya/src/webapp/lenya/xopus.xmap
Index: xopus.xmap
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/xopus.xmap,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- xopus.xmap 13 Mar 2004 12:57:53 -0000 1.6
+++ xopus.xmap 19 Mar 2004 10:21:35 -0000 1.7
@@ -51,8 +51,26 @@
<map:match pattern="**.js">
<map:read src="{global:xopus-resources}{1}.js" mime-type="text/javascript"/>
</map:match>
- <map:handle-errors type="500">
- <map:serialize type="xml"/>
+ <map:handle-errors>
+ <map:select type="exception">
+ <map:when test="resourcenotfound">
+ <map:generate src="../../content/util/empty.xml" />
+ <map:transform src="../../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="../../../stylesheets/system/error2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ </map:otherwise>
+ </map:select>
+ <map:serialize type="html"/>
</map:handle-errors>
</map:pipeline>
@@ -60,8 +78,26 @@
<map:match pattern="**.html">
<map:read src="{global:xopus-resources}{1}.html" mime-type="text/html"/>
</map:match>
- <map:handle-errors type="500">
- <map:serialize type="xml"/>
+ <map:handle-errors>
+ <map:select type="exception">
+ <map:when test="resourcenotfound">
+ <map:generate src="../../content/util/empty.xml" />
+ <map:transform src="../../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="../../../stylesheets/system/error2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ </map:otherwise>
+ </map:select>
+ <map:serialize type="html"/>
</map:handle-errors>
</map:pipeline>
@@ -70,8 +106,26 @@
<map:generate src="{global:xopus-resources}{1}.xml"/>
<map:serialize type="xml"/>
</map:match>
- <map:handle-errors type="500">
- <map:serialize type="xml"/>
+ <map:handle-errors>
+ <map:select type="exception">
+ <map:when test="resourcenotfound">
+ <map:generate src="../../content/util/empty.xml" />
+ <map:transform src="../../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="../../../stylesheets/system/error2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ </map:otherwise>
+ </map:select>
+ <map:serialize type="html"/>
</map:handle-errors>
</map:pipeline>
@@ -80,8 +134,26 @@
<map:generate src="{global:xopus-resources}{1}.xsl"/>
<map:serialize type="xml"/>
</map:match>
- <map:handle-errors type="500">
- <map:serialize type="xml"/>
+ <map:handle-errors>
+ <map:select type="exception">
+ <map:when test="resourcenotfound">
+ <map:generate src="../../content/util/empty.xml" />
+ <map:transform src="../../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="../../../stylesheets/system/error2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ </map:otherwise>
+ </map:select>
+ <map:serialize type="html"/>
</map:handle-errors>
</map:pipeline>
@@ -89,8 +161,26 @@
<map:match pattern="**.gif">
<map:read src="{global:xopus-resources}{1}.gif" mime-type="images/gif"/>
</map:match>
- <map:handle-errors type="500">
- <map:serialize type="xml"/>
+ <map:handle-errors>
+ <map:select type="exception">
+ <map:when test="resourcenotfound">
+ <map:generate src="../../content/util/empty.xml" />
+ <map:transform src="../../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="../../../stylesheets/system/error2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ </map:otherwise>
+ </map:select>
+ <map:serialize type="html"/>
</map:handle-errors>
</map:pipeline>
@@ -98,8 +188,26 @@
<map:match pattern="**.css">
<map:read src="{global:xopus-resources}{1}.css" mime-type="text/css"/>
</map:match>
- <map:handle-errors type="500">
- <map:serialize type="xml"/>
+ <map:handle-errors>
+ <map:select type="exception">
+ <map:when test="resourcenotfound">
+ <map:generate src="../../content/util/empty.xml" />
+ <map:transform src="../../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="../../../stylesheets/system/error2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ </map:otherwise>
+ </map:select>
+ <map:serialize type="html"/>
</map:handle-errors>
</map:pipeline>
@@ -119,11 +227,28 @@
<map:generate src="content/xopus/error.xml"/>
<map:serialize type="xml"/>
</map:match>
- <map:handle-errors type="500">
- <map:serialize type="xml"/>
+ <map:handle-errors>
+ <map:select type="exception">
+ <map:when test="resourcenotfound">
+ <map:generate src="../../content/util/empty.xml" />
+ <map:transform src="../../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="../../../stylesheets/system/error2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ </map:otherwise>
+ </map:select>
+ <map:serialize type="html"/>
</map:handle-errors>
</map:pipeline>
-
</map:pipelines>
</map:sitemap>
1.19 +13 -7 cocoon-lenya/src/webapp/lenya/lucene.xmap
Index: lucene.xmap
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/lucene.xmap,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- lucene.xmap 18 Mar 2004 16:52:27 -0000 1.18
+++ lucene.xmap 19 Mar 2004 10:21:35 -0000 1.19
@@ -64,8 +64,12 @@
</map:match>
- <map:handle-errors type="500">
- <map:serialize type="xml"/>
+ <map:handle-errors>
+ <map:generate type="notifying"/>
+ <map:transform src="../stylesheets/system/error2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ <map:serialize type="html"/>
</map:handle-errors>
</map:pipeline>
@@ -88,10 +92,12 @@
</map:transform>
<map:call resource="style-cms-page"/>
</map:match>
-
-
- <map:handle-errors type="500">
- <map:serialize type="xml"/>
+ <map:handle-errors>
+ <map:generate type="notifying"/>
+ <map:transform src="../stylesheets/system/error2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ <map:serialize type="html"/>
</map:handle-errors>
</map:pipeline>
1.56 +9 -2 cocoon-lenya/src/webapp/lenya/info.xmap
Index: info.xmap
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/info.xmap,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- info.xmap 13 Mar 2004 14:28:33 -0000 1.55
+++ info.xmap 19 Mar 2004 10:21:35 -0000 1.56
@@ -314,9 +314,10 @@
</map:match>
- <map:handle-errors type="500">
+ <map:handle-errors>
<map:select type="exception">
<map:when test="document-does-not-exist">
+ <map:generate src="content/util/empty.xml" />
<map:transform src="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}"/>
@@ -325,6 +326,12 @@
<map:parameter name="statusCode" value="404"/>
</map:call>
</map:when>
+ <map:otherwise>
+ <map:generate type="notifying"/>
+ <map:transform src="../stylesheets/system/error2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ </map:otherwise>
</map:select>
<map:serialize type="html"/>
</map:handle-errors>
1.11 +31 -7 cocoon-lenya/src/webapp/lenya/lenya.xmap
Index: lenya.xmap
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/lenya.xmap,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- lenya.xmap 13 Mar 2004 12:57:53 -0000 1.10
+++ lenya.xmap 19 Mar 2004 10:21:35 -0000 1.11
@@ -31,18 +31,25 @@
</map:components>
<!-- =========================== Pipelines ================================ -->
+ <map:resources>
+ <map:resource name="style-cms-page">
+ <map:transform src="xslt/admin/page2xhtml.xsl">
+ <map:parameter name="contextprefix" value="{request:contextPath}"/>
+ </map:transform>
+ <map:serialize type="xhtml"/>
+ </map:resource>
+ </map:resources>
+
<map:pipelines>
<map:pipeline>
<map:match pattern="menu/**">
<map:read src="resources/misc/menu/{1}"/>
</map:match>
- </map:pipeline>
- <map:pipeline>
+
<map:match pattern="images/**">
<map:read src="resources/images/{1}"/>
</map:match>
- </map:pipeline>
- <map:pipeline>
+
<map:match pattern="css/**.css">
<map:act type="resource-exists" src="resources/css/{1}.xml">
<map:generate src="resources/css/{../1}.xml"/>
@@ -51,11 +58,28 @@
</map:transform>
<map:serialize type="text" mime-type="text/css"/>
</map:act>
- <map:read src="resources/css/{1}.css" mime-type="text/css"/>
+ <map:read src="resources/css/{1}.css" mime-type="text/css"/>
</map:match>
+
<map:handle-errors>
- <map:serialize type="xml"/>
+ <map:select type="exception">
+ <map:when test="resourcenotfound">
+ <map:generate src="content/util/empty.xml" />
+ <map:transform src="xslt/exception/document-does-not-exist.xsl"/>
+ <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="../stylesheets/system/error2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ </map:otherwise>
+ </map:select>
+ <map:serialize type="html"/>
</map:handle-errors>
+
</map:pipeline>
</map:pipelines>
</map:sitemap>
1.197 +11 -4 cocoon-lenya/src/webapp/lenya/usecase.xmap
Index: usecase.xmap
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/usecase.xmap,v
retrieving revision 1.196
retrieving revision 1.197
diff -u -r1.196 -r1.197
--- usecase.xmap 14 Mar 2004 18:06:39 -0000 1.196
+++ usecase.xmap 19 Mar 2004 10:21:35 -0000 1.197
@@ -531,7 +531,7 @@
<map:generate type="stream">
<map:parameter name="form-name" value="content"/>
</map:generate>
- <map:act type="validate">
+ <map:act type="validate">
<map:parameter name="file" value="pubs/{1}/work/editor/authoring/{page-envelope:document-path}"/>
<map:parameter name="schema" value="pubs/{1}/config/doctypes/schemas/{page-envelope:document-type}.rng"/>
<map:transform src="xslt/authoring/edit/oneform.xsl">
@@ -1209,14 +1209,21 @@
</map:match>
- <map:handle-errors type="500">
+ <map:handle-errors>
<map:select type="exception">
<map:when test="parent-node-not-found">
+ <map:generate src="content/util/empty.xml"/>
<map:transform src="xslt/exception/parent-node-not-found.xsl"/>
<map:call resource="style-cms-page"/>
</map:when>
+ <map:otherwise>
+ <map:generate type="notifying"/>
+ <map:transform src="../stylesheets/system/error2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ </map:otherwise>
</map:select>
- <map:serialize type="html"/>
+ <map:serialize type="html"/>
</map:handle-errors>
</map:pipeline>
1.56 +55 -18 cocoon-lenya/src/webapp/global-sitemap.xmap
Index: global-sitemap.xmap
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/global-sitemap.xmap,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- global-sitemap.xmap 18 Mar 2004 16:06:18 -0000 1.55
+++ global-sitemap.xmap 19 Mar 2004 10:21:36 -0000 1.56
@@ -582,7 +582,26 @@
<map:generate src="lenya/content/about.xml"/>
<map:call resource="style-cms-page"/>
</map:match>
- </map:pipeline>
+
+ <map:handle-errors>
+ <map:select type="exception">
+ <map:when test="resourcenotfound">
+ <map:generate src="lenya/content/util/empty.xml" />
+ <map:transform src="lenya/xslt/exception/document-does-not-exist.xsl"/>
+ <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="stylesheets/system/error2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ </map:otherwise>
+ </map:select>
+ <map:serialize type="html"/>
+ </map:handle-errors>
+ </map:pipeline>
<!-- Search with Lucene -->
<map:pipeline>
@@ -590,12 +609,23 @@
<map:mount uri-prefix="" src="lenya/{fallback:lucene.xmap}" check-reload="true" reload-method="synchron"/>
</map:match>
<map:handle-errors>
+ <map:select type="exception">
+ <map:when test="resourcenotfound">
+ <map:generate src="lenya/content/util/empty.xml" />
+ <map:transform src="lenya/xslt/exception/document-does-not-exist.xsl"/>
+ <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="../../../stylesheets/system/error2html.xslt">
+ <map:transform src="stylesheets/system/error2html.xslt">
<map:parameter name="contextPath" value="{request:contextPath}"/>
</map:transform>
+ </map:otherwise>
+ </map:select>
<map:serialize type="html"/>
- </map:handle-errors>
+ </map:handle-errors>
</map:pipeline>
<!-- /Search with Lucene -->
@@ -698,25 +728,19 @@
</map:match>
<!-- Access Control Policies -->
- <map:pipeline>
<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>
- </map:pipeline>
<!-- Scheduler -->
- <map:pipeline>
<map:match pattern="scheduler/**">
<map:mount uri-prefix="scheduler/" src="lenya/scheduler.xmap" check-reload="true" reload-method="synchron"/>
</map:match>
- </map:pipeline>
<!-- Info usecases -->
- <map:pipeline>
<map:match type="usecase" pattern="info-*">
<map:mount uri-prefix="" src="lenya/info.xmap" check-reload="true" reload-method="synchron"/>
</map:match>
- </map:pipeline>
<!-- Internal usecases -->
<map:pipeline internal-only="true">
@@ -728,22 +752,17 @@
</map:pipeline>
<!-- Usecases -->
- <map:pipeline>
<map:match type="usecase" pattern="*">
<map:mount uri-prefix="" src="lenya/usecase.xmap" check-reload="true" reload-method="synchron"/>
</map:match>
- </map:pipeline>
<!-- Info area -->
- <map:pipeline>
<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>
-
<!-- Publications -->
<map:match pattern="*/">
@@ -796,16 +815,34 @@
</map:match>
<!-- Admin Area -->
- <map:pipeline>
<map:match pattern="*/admin/**">
<map:mount uri-prefix="{1}/admin" src="lenya/admin.xmap" check-reload="true" reload-method="synchron"/>
</map:match>
- </map:pipeline>
-
+
<!-- Enter the actual publication -->
<map:match pattern="*/**">
<map:mount uri-prefix="{1}" src="lenya/pubs/{1}/sitemap.xmap" check-reload="true" reload-method="synchron"/>
</map:match>
+
+ <map:handle-errors>
+ <map:select type="exception">
+ <map:when test="resourcenotfound">
+ <map:generate src="lenya/content/util/empty.xml" />
+ <map:transform src="lenya/xslt/exception/document-does-not-exist.xsl"/>
+ <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="stylesheets/system/error2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ </map:otherwise>
+ </map:select>
+ <map:serialize type="html"/>
+ </map:handle-errors>
+
</map:pipeline>
</map:pipelines>
1.124 +64 -2 cocoon-lenya/src/webapp/sitemap.xmap
Index: sitemap.xmap
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/sitemap.xmap,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -r1.123 -r1.124
--- sitemap.xmap 13 Mar 2004 14:34:20 -0000 1.123
+++ sitemap.xmap 19 Mar 2004 10:21:36 -0000 1.124
@@ -30,7 +30,8 @@
<map:generator label="content" logger="sitemap.generator.wsproxy" name="wsproxy" src="org.apache.cocoon.generation.WebServiceProxyGenerator"/>
<!-- FIXME: What is the difference to wsproxy? -->
<map:generator label="content" logger="sitemap.generator.proxy" name="proxy" src="org.apache.cocoon.generation.HttpProxyGenerator"/>
-<!-- =========================== Lenya CMS ================================= -->
+ <map:generator name="notifying" src="org.apache.cocoon.sitemap.NotifyingGenerator"/>
+ <!-- =========================== Lenya CMS ================================= -->
<map:generator name="servletproxy" src="org.apache.lenya.cms.cocoon.generation.ProxyGenerator"/>
</map:generators>
@@ -125,6 +126,12 @@
</map:selector>
<map:selector logger="sitemap.selector.resource-exists" name="resource-exists" src="org.apache.cocoon.selection.ResourceExistsSelector"/>
+ <map:selector logger="sitemap.selector.exception" name="exception" src="org.apache.cocoon.selection.ExceptionSelector">
+ <exception name="sax" class="org.xml.sax.SAXException" unroll="true"/>
+ <exception name="resourcenotfound" class="org.apache.cocoon.ResourceNotFoundException" unroll="true"/>
+ <exception class="org.apache.cocoon.ProcessingException" unroll="true"/>
+ <exception name="document-does-not-exist" class="org.apache.lenya.cms.publication.DocumentDoesNotExistException"/>
+ </map:selector>
</map:selectors>
<map:actions>
@@ -250,6 +257,15 @@
<map:transform type="xinclude"/>
<map:serialize/>
</map:match>
+
+ <map:handle-errors>
+ <map:generate type="notifying"/>
+ <map:transform src="stylesheets/system/error2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ <map:serialize type="html"/>
+ </map:handle-errors>
+
</map:pipeline>
@@ -283,12 +299,49 @@
<map:call resource="style-cms-page"/>
</map:match>
+ <!-- images -->
+ <map:match pattern="images/*.gif">
+ <map:read mime-type="images/gif" src="resources/images/{1}.gif"/>
+ </map:match>
+
+ <!-- CSS stylesheets -->
+ <map:match pattern="styles/*.css">
+ <map:read mime-type="text/css" src="resources/styles/{1}.css"/>
+ </map:match>
+
+ <!-- JavaScript scripts -->
+ <map:match pattern="scripts/*.js">
+ <map:read mime-type="text/javascript" src="resources/scripts/{1}.js"/>
+ </map:match>
+
+ <!-- favicon -->
+ <map:match pattern="**favicon.ico">
+ <map:read mime-type="image/x-icon" src="resources/icons/cocoon.ico"/>
+ </map:match>
+
+ <map:handle-errors>
+ <map:generate type="notifying"/>
+ <map:transform src="stylesheets/system/error2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ <map:serialize type="html"/>
+ </map:handle-errors>
+
</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:handle-errors>
+ <map:generate type="notifying"/>
+ <map:transform src="stylesheets/system/error2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ <map:serialize type="html"/>
+ </map:handle-errors>
+
</map:pipeline>
<map:pipeline>
@@ -298,6 +351,15 @@
</map:act>
<map:redirect-to uri="{request:requestURI}?lenya.usecase=login&lenya.step=showscreen" session="true"/>
</map:match>
+
+ <map:handle-errors>
+ <map:generate type="notifying"/>
+ <map:transform src="stylesheets/system/error2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ <map:serialize type="html"/>
+ </map:handle-errors>
+
</map:pipeline>
</map:pipelines>
1.21 +38 -3 cocoon-lenya/src/webapp/lenya/pubs/default/sitemap.xmap
Index: sitemap.xmap
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/pubs/default/sitemap.xmap,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- sitemap.xmap 13 Mar 2004 12:47:21 -0000 1.20
+++ sitemap.xmap 19 Mar 2004 10:21:36 -0000 1.21
@@ -28,6 +28,23 @@
<map:actions/>
</map:components>
+ <map:resources>
+ <map:resource name="style-cms-page">
+ <map:transform src="../../xslt/util/page2xhtml.xsl">
+ <map:parameter name="contextprefix" value="{request:contextPath}"/>
+ </map:transform>
+ <map:select type="parameter">
+ <map:parameter name="statusCode" value="{statusCode}"/>
+ <map:when test="">
+ <map:serialize/>
+ </map:when>
+ <map:otherwise>
+ <map:serialize status-code="{statusCode}"/>
+ </map:otherwise>
+ </map:select>
+ </map:resource>
+ </map:resources>
+
<map:pipelines>
<map:pipeline>
@@ -35,8 +52,26 @@
<map:mount uri-prefix="" src="publication-sitemap.xmap"/>
</map:match>
- <map:handle-errors type="500">
- <map:serialize type="xml"/>
+ <map:handle-errors>
+ <map:select type="exception">
+ <map:when test="resourcenotfound">
+ <map:generate src="../../content/util/empty.xml" />
+ <map:transform src="../../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="../../../stylesheets/system/error2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ </map:otherwise>
+ </map:select>
+ <map:serialize type="html"/>
</map:handle-errors>
</map:pipeline>
1.9 +22 -2 cocoon-lenya/src/webapp/lenya/pubs/default/usecase-bxeng.xmap
Index: usecase-bxeng.xmap
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/pubs/default/usecase-bxeng.xmap,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- usecase-bxeng.xmap 13 Mar 2004 12:47:21 -0000 1.8
+++ usecase-bxeng.xmap 19 Mar 2004 10:21:36 -0000 1.9
@@ -262,7 +262,27 @@
</map:match> <!-- usecase -->
- <map:handle-errors type="500"/>
+ <map:handle-errors>
+ <map:select type="exception">
+ <map:when test="resourcenotfound">
+ <map:generate src="../../content/util/empty.xml" />
+ <map:transform src="../../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="../../../stylesheets/system/error2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ </map:otherwise>
+ </map:select>
+ <map:serialize type="html"/>
+ </map:handle-errors>
</map:pipeline>
1.70 +41 -4 cocoon-lenya/src/webapp/lenya/pubs/default/publication-sitemap.xmap
Index: publication-sitemap.xmap
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/pubs/default/publication-sitemap.xmap,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- publication-sitemap.xmap 13 Mar 2004 14:43:21 -0000 1.69
+++ publication-sitemap.xmap 19 Mar 2004 10:21:36 -0000 1.70
@@ -83,8 +83,28 @@
<map:read mime-type="text/css" src="resources/misc/bxeng/{2}-bxeng.css"/>
</map:match>
- <map:handle-errors type="500"/>
- </map:pipeline>
+ <map:handle-errors>
+ <map:select type="exception">
+ <map:when test="resourcenotfound">
+ <map:generate src="../../content/util/empty.xml" />
+ <map:transform src="../../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="../../../stylesheets/system/error2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ </map:otherwise>
+ </map:select>
+ <map:serialize type="html"/>
+ </map:handle-errors>
+ </map:pipeline>
<!-- /BX Editor: RNG Schema -->
@@ -142,9 +162,20 @@
</map:match>
- <map:handle-errors type="500">
+ <map:handle-errors>
<map:select type="exception">
<map:when test="document-does-not-exist">
+ <map:generate src="../../content/util/empty.xml"/>
+ <map:transform src="../../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="resourcenotfound">
+ <map:generate src="../../content/util/empty.xml" />
<map:transform src="../../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}"/>
@@ -153,6 +184,12 @@
<map:parameter name="statusCode" value="404"/>
</map:call>
</map:when>
+ <map:otherwise>
+ <map:generate type="notifying"/>
+ <map:transform src="../../../stylesheets/system/error2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
+ </map:otherwise>
</map:select>
<map:serialize type="html"/>
</map:handle-errors>
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org