stephan 2003/05/08 04:24:03
Modified: src/webapp/samples samples.xml sitemap.xmap src/webapp/samples/errorhandling sitemap.xmap src/webapp/samples/errorhandling/exception sitemap.xmap Added: src/webapp/samples/errorhandling main.xml src/webapp/samples/errorhandling/exception error-giving-page.xml Removed: src/webapp/samples error-giving-page.xml src/webapp/samples/errorhandling main.htm Log: Take the error-giving-page into the error handling section. Revision Changes Path 1.16 +1 -4 cocoon-2.1/src/webapp/samples/samples.xml Index: samples.xml =================================================================== RCS file: /home/cvs/cocoon-2.1/src/webapp/samples/samples.xml,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- samples.xml 8 May 2003 08:19:16 -0000 1.15 +++ samples.xml 8 May 2003 11:24:02 -0000 1.16 @@ -137,9 +137,6 @@ <sample name="Request Page" href="request.html"> This example shows the usage of the RequestGenerator. </sample> - <sample name="Error Page" href="generror.html"> - This example shows what happens if an error is triggered in the pipeline. - </sample> <sample name="Error handling" href="errorhandling/main"> An example page producing exceptions and handling them. Demonstrates the handler hierarchy and the exception selectors. 1.13 +1 -6 cocoon-2.1/src/webapp/samples/sitemap.xmap Index: sitemap.xmap =================================================================== RCS file: /home/cvs/cocoon-2.1/src/webapp/samples/sitemap.xmap,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- sitemap.xmap 8 May 2003 00:05:05 -0000 1.12 +++ sitemap.xmap 8 May 2003 11:24:02 -0000 1.13 @@ -148,11 +148,6 @@ <map:serialize/> </map:match> - <map:match pattern="generror.html"> - <map:generate src="error-giving-page.xml"/> - <map:serialize/> - </map:match> - <!-- ======================== Automount =============================== --> <map:match pattern="*/**"> 1.4 +8 -3 cocoon-2.1/src/webapp/samples/errorhandling/sitemap.xmap Index: sitemap.xmap =================================================================== RCS file: /home/cvs/cocoon-2.1/src/webapp/samples/errorhandling/sitemap.xmap,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- sitemap.xmap 8 May 2003 10:13:02 -0000 1.3 +++ sitemap.xmap 8 May 2003 11:24:03 -0000 1.4 @@ -19,7 +19,10 @@ <map:pipelines> <map:pipeline> <map:match pattern="main"> - <map:generate src="main.htm"/> + <map:generate src="main.xml"/> + <map:transform src="context://samples/common/style/xsl/html/complex-page2html.xsl"> + <map:parameter name="contextPath" value="{request:contextPath}"/> + </map:transform> <map:serialize/> </map:match> </map:pipeline> @@ -39,8 +42,10 @@ </map:pipeline> <map:handle-errors> - <map:generate src="generalerror.htm"/> - <map:serialize/> + <map:generate type="notifying"/> + <map:transform src="context://stylesheets/system/error2html.xslt"> + <map:parameter name="contextPath" value="{request:contextPath}"/> + </map:transform> </map:handle-errors> </map:pipelines> 1.1 cocoon-2.1/src/webapp/samples/errorhandling/main.xml Index: main.xml =================================================================== <document> <header> <title>Error handling</title> </header> <body> <p>Please choose an exception:</p> <form action="exception/generror"> <input type="submit" value="Syntax error in a page"/> </form> <form action="exception/exception"> <input type="hidden" name="exception" value="validation"/> <input type="submit" value="ValidationException"/> </form> <form action="exception/exception"> <input type="hidden" name="exception" value="application"/> <input type="hidden" name="code" value="1"/> <input type="submit" value="ApplicationException (1)"/> </form> <form action="exception/exception"> <input type="hidden" name="exception" value="application"/> <input type="hidden" name="code" value="2"/> <input type="submit" value="ApplicationException (2)"/> </form> <form action="exception/exception"> <input type="hidden" name="exception" value="application"/> <input type="hidden" name="code" value="3"/> <input type="submit" value="ApplicationException (3)"/> </form> <form action="exception/exception"> <input type="hidden" name="exception" value="resourceNotFound"/> <input type="submit" value="ResourceNotFoundException"/> </form> <form action="exception/exception"> <input type="hidden" name="exception" value="nullPointer"/> <input type="submit" value="NullPointerException"/> </form> <form action="exception/exception"> <input type="hidden" name="exception" value="error"/> <input type="submit" value="Error"/> </form> <form action="exception/exception"> <input type="submit" value="No exception"/> </form> </body> </document> 1.4 +5 -0 cocoon-2.1/src/webapp/samples/errorhandling/exception/sitemap.xmap Index: sitemap.xmap =================================================================== RCS file: /home/cvs/cocoon-2.1/src/webapp/samples/errorhandling/exception/sitemap.xmap,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- sitemap.xmap 8 May 2003 10:13:02 -0000 1.3 +++ sitemap.xmap 8 May 2003 11:24:03 -0000 1.4 @@ -16,6 +16,11 @@ <map:serialize/> </map:match> + <map:match pattern="generror"> + <map:generate src="error-giving-page.xml"/> + <map:serialize/> + </map:match> + <map:handle-errors> <map:select type="exception"> <map:when test="validation"> 1.1 cocoon-2.1/src/webapp/samples/errorhandling/exception/error-giving-page.xml Index: error-giving-page.xml =================================================================== <?xml version="1.0"?> <!-- CVS $Id: error-giving-page.xml,v 1.1 2003/05/08 11:24:03 stephan Exp $ --> <!DOCTYPE page [ <!ELEMENT page (title?, content)> <!ELEMENT title (#PCDATA)> <!ELEMENT content (para+)> <!ELEMENT para (#PCDATA)> ]> <page> <!-- NOTE: this error is not well-formed intentionally in order to trigger an exception and show how the sitemap error handling works --> <title>Hello<title> <content> <para>This is my first Cocoon page!</para> </content> </page>