You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by il...@apache.org on 2012/04/24 14:40:02 UTC
svn commit: r1329677 [6/27] - in /cocoon/site/site/2.2/core-modules: ./
core/ core/2.2/ core/2.2/css/ core/2.2/images/ core/2.2/js/ core/css/
core/images/ core/images/logos/ core/js/ css/ images/ js/
Modified: cocoon/site/site/2.2/core-modules/core/2.2/1374_1_1.html
URL: http://svn.apache.org/viewvc/cocoon/site/site/2.2/core-modules/core/2.2/1374_1_1.html?rev=1329677&r1=1329676&r2=1329677&view=diff
==============================================================================
--- cocoon/site/site/2.2/core-modules/core/2.2/1374_1_1.html (original)
+++ cocoon/site/site/2.2/core-modules/core/2.2/1374_1_1.html Tue Apr 24 12:39:52 2012
@@ -29,17 +29,13 @@
<head>
<title> Cocoon Core - Views
</title>
- <style type="text/css" media="all">
- @import url("./css/maven-base.css");
- @import url("./css/maven-theme.css");
- @import url("./css/site.css");
- </style>
+ <link rel="stylesheet" href="./css/apache-cocoon-thien-maven-skin.min.css" />
<link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
- <script src="./js/getBlank.js" language="javascript" type="text/javascript"></script>
- <meta name="author" content="The Cocoon Community" />
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+ <script src="./js/apache-cocoon-thien-maven-skin.min.js" language="javascript" type="text/javascript"></script>
+ <meta name="author" content="Apache Cocoon Documentation Team" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
- <body>
+ <body onload="javascript:prettyPrint();">
<div id="breadtrail">
<p><a href="http://www.apache.org">Apache</a> » <a href="../../../../">Cocoon</a> »</p>
</div>
@@ -77,7 +73,7 @@
<li><a href="../../../../2.2/core-modules/">Core <span class="pl-version-small">2.2</span></a></li>
<li><a href="../../../../2.2/blocks/">Blocks <span class="pl-version-small">2.2</span></a></li>
<li><a href="../../../../2.2/maven-plugins/">Maven Plugins <span class="pl-version-small">2.2</span></a></li>
- <li><strong><a href="../../../..//3.0/">Cocoon 3.0 <span class="pl-version-small">[alpha]</span></a></em></strong></li>
+ <li><strong><a href="../../../..//3.0/">Cocoon 3.0</a></em></strong></li>
<li><strong><a href="../../../../subprojects/">Subprojects</a></strong></li>
</ul>
</div>
@@ -92,7 +88,7 @@
<ul>
<li >
- <a href="1270_1_1.html">Introduction</a>
+ <a href="index.html">Introduction</a>
</li>
</ul>
</li>
@@ -279,8 +275,6 @@
-
-
<li class='menuCollapse'>
<a href="842_1_1.html">Reference</a>
@@ -568,7 +562,7 @@
</li>
<li >
- <a href="1380_1_1.html">Using Control Flow</a>
+ <a href="1380_1_1.html">Using Control Flow</a>
</li>
</ul>
</li>
@@ -602,11 +596,11 @@
</li>
<li >
- <a href="1399_1_1.html">Logging configuration</a>
+ <a href="1399_1_1.html">Logging Configuration</a>
</li>
<li >
- <a href="1259_1_1.html">Component Configurations</a>
+ <a href="1259_1_1.html">Component Configuration</a>
</li>
<li >
@@ -615,42 +609,36 @@
</ul>
</li>
<li>
- Project Documentation
+ Project Reports
<ul>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <li class='menuCollapse'>
- <a href="project-info.html">Project Information</a>
- </li>
+ <li >
+ <a href="changes-report.html">Changes Report</a>
+ </li>
-
-
-
-
-
-
-
-
- <li class='menuCollapse'>
- <a href="project-reports.html">Project Reports</a>
- </li>
+ <li >
+ <a href="apidocs/">JavaDocs</a>
+ </li>
</ul>
</li>
</ul>
<div class="main">
+ <!-- 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. -->
<div id="contentBody"><div id="bodyText"><h1 class="docTitle">Views</h1><p>Apache Cocoon provides "views" to a resource. Defining a pipeline in a
sitemap specifies the different stages of processing a resource. A view defines
an exit point in the pipeline processing.</p><p>Views are yet another sitemap component. Unlike the rest, they are not
@@ -661,7 +649,7 @@ about pipelines the said is valid for re
whenever a particular view is requested. The processing continues with the
definitions in the requested view. The advantage over selectors that could
achieve the same is, that these exit points are not necessarily declared for
-each pipeline individually, but once per sitemap.</p><h1 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">Motivation</h1><p>Implementing a semantic search feature is the main motivation to offer views
+each pipeline individually, but once per sitemap.</p><h1>Motivation</h1><p>Implementing a semantic search feature is the main motivation to offer views
in Apache Cocoon.</p><p>A sitemap defines the URI space of a Cocoon application. Apache Cocoon offers
a fairly sophisticated URI space mapping mechanism. Defining pipelines in a
sitemap you define this mapping. It's generally a mistake to map a file system
@@ -676,7 +664,7 @@ the aggregation with navigation controls
the text inside a logo, if you are given the SVG content that generated the
raster image. You can index the PDF content without having to implement a PDF
parser since you request the "content" view of the resource obtaining an easily
-parsable XML file.</p><h1 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">Defining A View</h1><p>You declare a view in the sitemap. The definition of a view may define
+parsable XML file.</p><h1>Defining A View</h1><p>You declare a view in the sitemap. The definition of a view may define
further processing steps. You are not allowed to define a generator step for a
view, as the content of a view is the xml content from a view's exit point. The
most simple view just serializes the xml content to xml.</p><p>A view element is identified by its name, and its label. You specify the name
@@ -693,28 +681,28 @@ processing stage. The special label &quo
before the serializer processing stage. The labels "first", and "last" are set
by the sitemanager automatically.</li>
</ul>The following example is a simple resource view, just serializing the xml
-content of the view's exit point.<pre><map:views>
+content of the view's exit point.<div><pre><map:views>
<map:view name="content" from-label="content">
<map:serialize type="xml"/>
</map:view>
</map:views>
-</pre>The next example performs an xslt transformation before serializing to xml.
-<pre><map:views>
+</pre></div>The next example performs an xslt transformation before serializing to xml.
+<div><pre><map:views>
<map:view name="dublin-core" from-label="dublin-core">
<map:transform src="stylesheets/document2dublin-core.xsl"/>
<map:serialize type="xml"/>
</map:view>
</map:views>
-</pre>The last example defines a view specifying the position-from attribute
-"last", and serializing to pdf, for a pdf-aware only indexer, or archiver.<pre><map:views>
+</pre></div>The last example defines a view specifying the position-from attribute
+"last", and serializing to pdf, for a pdf-aware only indexer, or archiver.<div><pre><map:views>
<map:view name="full-document-content" from-position="last">
<map:transform src="stylesheets/document2fo.xsl"/>
<map:serialize type="fo2pdf"/>
</map:view>
</map:views>
-</pre><h1 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">Placing Labels</h1><p>You place labels to define a pipeline exit point. A pipeline exit point may
+</pre></div><h1>Placing Labels</h1><p>You place labels to define a pipeline exit point. A pipeline exit point may
be shared by more than a single view.</p><p>Defining a pipeline exit point you have to add an attribute "label" to a
-sitemap element. The following sitemap elements are label aware:</p><table class="bodyTable">
+sitemap element. The following sitemap elements are label aware:</p><table border="0" class="bodyTable">
<tbody>
<tr class="a">
<th>
@@ -790,35 +778,35 @@ produced by the part only is passed to t
</tr>
</tbody>
</table><p>A label attribute may hold 1 or more label names, separated by comma or
-blank, eg. <tt><map:generate src="foo" label="label1, label2"/></tt>.</p><h1 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">Placing Labels Summary</h1><p>As described above you have a wide range of choice for placing labels. You
+blank, eg. <tt><map:generate src="foo" label="label1, label2"/></tt>.</p><h1>Placing Labels Summary</h1><p>As described above you have a wide range of choice for placing labels. You
may even place labels to part elements, and to pipelines being the source of a
labelled part element. The following paragraphs summarize some of the hot
features.</p><p>You can use more that one label-value (label="content,link rdf") separated by
comma or blank.</p><p>The aggregate element can have a label attribute which acts as on a
generator, or transformer (all part elements are collected).</p><p>Part elements can have a label attribute. In this case only those parts are
collected which corresponds to the requested view.</p><p>If you refer to sources via the cocoon:/ protocol the requested view will be
-propagated.</p><div class="note"><div><strong>Note: </strong>The element label is deprecated, and being not supported
+propagated.</p><div class="note"><div><b>Note: </b>The element label is deprecated, and being not supported
anymore. Thus you have to rewrite your sitemap if you are using
-<tt xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher"><map:label name="foobar"/></tt>.</div></div><p>Rewrite your sitemap if you were using label elements, moving the label name
-up to the previous xml producer. For example rewrite your sitemap:</p><pre>...
+<tt><map:label name="foobar"/></tt>.</div></div><p>Rewrite your sitemap if you were using label elements, moving the label name
+up to the previous xml producer. For example rewrite your sitemap:</p><div><pre>...
<map:generate src="foo"/>
<map:transform type="bar"/>
<map:label name="mylabel"/>
<map:serialize/>
-...</pre><p>...to this sitemap:</p><pre>...
+...</pre></div><p>...to this sitemap:</p><div><pre>...
<map:generate src="foo"/>
<map:transform type="bar" label="mylabel"/>
<map:serialize/>
-...</pre><h1 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">View Processing</h1><p>The samples sitemap contains two view definitions. One of them looks like the
-excerpt below.</p><pre><map:views>
+...</pre></div><h1>View Processing</h1><p>The samples sitemap contains two view definitions. One of them looks like the
+excerpt below.</p><div><pre><map:views>
<map:view name="content" from-label="content">
<map:serialize type="xml"/>
</map:view>
</map:views>
-</pre><p>It only defines what processing steps should be taken, after some exit point
+</pre></div><p>It only defines what processing steps should be taken, after some exit point
labelled "content" is reached. In all this case just a serializer is used to
-further process the document.</p><h1 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">Exit Points</h1><p>A look at the pipelines reveals no label "content". But a closer look at the
-defined components show this:</p><pre><map:components>
+further process the document.</p><h1>Exit Points</h1><p>A look at the pipelines reveals no label "content". But a closer look at the
+defined components show this:</p><div><pre><map:components>
<map:generators default="file">
<map:generator name="file"
src="org.apache.cocoon.generation.FileGenerator"
@@ -829,34 +817,38 @@ defined components show this:</p><pre>&l
<map:generator name="serverpages"
src="org.apache.cocoon.generation.ServerPagesGenerator"
label="content"/>
- ...</pre><p>Here a number of generators are declared, each one has a label attribute.
+ ...</pre></div><p>Here a number of generators are declared, each one has a label attribute.
Now, everytime one of these generators is used in a pipeline, an exit point
"content" is generated, just after the generator has been executed.</p><p>This is not limited to generators - every sitemap component can be augmented
with a view label.</p><p>Two special labels exist: "first" and "last". These are automatically
declared for every pipeline, after the first component and after the last
-respectively. This is used by the second view in the samples sitemap.</p><pre><map:view name="links" from-position="last">
+respectively. This is used by the second view in the samples sitemap.</p><div><pre><map:view name="links" from-position="last">
<map:serialize type="links"/>
-</map:view></pre><h1 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">Requesting A View</h1><p>The current way for Cocoon to access views is fixed as a special URI query
-parameter <tt>cocoon-view</tt>.</p><p>For example querying the view <tt>content</tt> of the page:</p><pre>http://localhost:8080/cocoon/documents/index.html</pre><p>You use following URL:</p><pre>http://localhost:8080/cocoon/documents/index.html?cocoon-view=content</pre><p>Suggestions for further accessing views are:</p><ul>
+</map:view></pre></div><h1>Requesting A View</h1><p>The current way for Cocoon to access views is fixed as a special URI query
+parameter <tt>cocoon-view</tt>.</p><p>For example querying the view <tt>content</tt> of the page:</p><div><pre>http://localhost:8080/cocoon/documents/index.html</pre></div><p>You use following URL:</p><div><pre>http://localhost:8080/cocoon/documents/index.html?cocoon-view=content</pre></div><p>Suggestions for further accessing views are:</p><ul>
<li>React on a "variant" HTTP header (nothing cocoon specific since the concept
could be impelemented later on by other publishing frameworks).</li>
<li>React on URI extension: for example <tt>http://host/path/file.view</tt>,
that is something that can be done by configuring the sitemaps manually. (where
<tt>http://host/path/index</tt> is the default resource, and
<tt>index.content</tt> is the XML view of the content).</li>
-</ul><div class="note"><div><strong>Note: </strong>Since views are orthogonal to pipelines, keep in mind to remove
-any unwanted view from a deployed application.</div></div></div><div class="editUrl"><div><em>Errors and Improvements?</em> If you see any errors or potential improvements in this document please help
- us: <a href="http://cocoon.zones.apache.org/daisy/cdocs/1374?branch=1&language=1">View, Edit or comment</a> on the latest development version (registration required).
- </div></div></div>
+</ul><div class="note"><div><b>Note: </b>Since views are orthogonal to pipelines, keep in mind to remove
+any unwanted view from a deployed application.</div></div></div></div>
+
</div>
</div>
<!-- end of content -->
<div id="footer">
- <p>©
- 1999-2008
+ <p>Copyright ©
+ 1999-2012
The Apache Software Foundation
+ All Rights Reserved.</p>
+
+ <p>
+ Apache Cocoon, Apache, the Apache feather logo, and the Apache Cocoon project logos are trademarks of The Apache Software Foundation.
+ All other marks mentioned may be trademarks or registered trademarks of their respective owners.
</p>
</div>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
Modified: cocoon/site/site/2.2/core-modules/core/2.2/1375_1_1.html
URL: http://svn.apache.org/viewvc/cocoon/site/site/2.2/core-modules/core/2.2/1375_1_1.html?rev=1329677&r1=1329676&r2=1329677&view=diff
==============================================================================
--- cocoon/site/site/2.2/core-modules/core/2.2/1375_1_1.html (original)
+++ cocoon/site/site/2.2/core-modules/core/2.2/1375_1_1.html Tue Apr 24 12:39:52 2012
@@ -29,17 +29,13 @@
<head>
<title> Cocoon Core - Actions
</title>
- <style type="text/css" media="all">
- @import url("./css/maven-base.css");
- @import url("./css/maven-theme.css");
- @import url("./css/site.css");
- </style>
+ <link rel="stylesheet" href="./css/apache-cocoon-thien-maven-skin.min.css" />
<link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
- <script src="./js/getBlank.js" language="javascript" type="text/javascript"></script>
- <meta name="author" content="The Cocoon Community" />
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+ <script src="./js/apache-cocoon-thien-maven-skin.min.js" language="javascript" type="text/javascript"></script>
+ <meta name="author" content="Apache Cocoon Documentation Team" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
- <body>
+ <body onload="javascript:prettyPrint();">
<div id="breadtrail">
<p><a href="http://www.apache.org">Apache</a> » <a href="../../../../">Cocoon</a> »</p>
</div>
@@ -77,7 +73,7 @@
<li><a href="../../../../2.2/core-modules/">Core <span class="pl-version-small">2.2</span></a></li>
<li><a href="../../../../2.2/blocks/">Blocks <span class="pl-version-small">2.2</span></a></li>
<li><a href="../../../../2.2/maven-plugins/">Maven Plugins <span class="pl-version-small">2.2</span></a></li>
- <li><strong><a href="../../../..//3.0/">Cocoon 3.0 <span class="pl-version-small">[alpha]</span></a></em></strong></li>
+ <li><strong><a href="../../../..//3.0/">Cocoon 3.0</a></em></strong></li>
<li><strong><a href="../../../../subprojects/">Subprojects</a></strong></li>
</ul>
</div>
@@ -92,7 +88,7 @@
<ul>
<li >
- <a href="1270_1_1.html">Introduction</a>
+ <a href="index.html">Introduction</a>
</li>
</ul>
</li>
@@ -279,8 +275,6 @@
-
-
<li class='menuCollapse'>
<a href="842_1_1.html">Reference</a>
@@ -568,7 +562,7 @@
</li>
<li >
- <a href="1380_1_1.html">Using Control Flow</a>
+ <a href="1380_1_1.html">Using Control Flow</a>
</li>
</ul>
</li>
@@ -602,11 +596,11 @@
</li>
<li >
- <a href="1399_1_1.html">Logging configuration</a>
+ <a href="1399_1_1.html">Logging Configuration</a>
</li>
<li >
- <a href="1259_1_1.html">Component Configurations</a>
+ <a href="1259_1_1.html">Component Configuration</a>
</li>
<li >
@@ -615,43 +609,37 @@
</ul>
</li>
<li>
- Project Documentation
+ Project Reports
<ul>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <li class='menuCollapse'>
- <a href="project-info.html">Project Information</a>
- </li>
+ <li >
+ <a href="changes-report.html">Changes Report</a>
+ </li>
-
-
-
-
-
-
-
-
- <li class='menuCollapse'>
- <a href="project-reports.html">Project Reports</a>
- </li>
+ <li >
+ <a href="apidocs/">JavaDocs</a>
+ </li>
</ul>
</li>
</ul>
<div class="main">
- <div id="contentBody"><div id="bodyText"><h1 class="docTitle">Actions</h1><h1 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">What is an Action?</h1><p>Apache Cocoon has a rich set of tools for publishing web documents, and while
+ <!-- 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. -->
+ <div id="contentBody"><div id="bodyText"><h1 class="docTitle">Actions</h1><h1>What is an Action?</h1><p>Apache Cocoon has a rich set of tools for publishing web documents, and while
XSP and Generators provide alot of functionality, they still mix content and
logic to a certain degree. The Action was created to fill that gap. Because the
Cocoon Sitemap provides a mechanism to select the pipeline at run time, we
@@ -664,16 +652,16 @@ and even dynamic navigation. The Action
components (Generator, Transformer, Serializer and Reader) primarily by the fact
that it does not produce any display data. <a href="NO_LINK">actions.txt</a>
contains excerpts from discussions on the cocoon-dev mailing list regarding
-Actions.</p><h1 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">When to use an Action instead of Control Flow (e.g. Flowscript)</h1><p>TBD</p><h1 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">Actions at Work</h1><p>Actions are components that allow two way communication between the Sitemap
+Actions.</p><h1>When to use an Action instead of Control Flow (e.g. Flowscript)</h1><p>TBD</p><h1>Actions at Work</h1><p>Actions are components that allow two way communication between the Sitemap
and the Action. This section describes how to define them in the sitemap and
create one in real life. We are going to write an Action that is our version of
"Hello World".</p><p>The problem domain is this: we "need" a component that will create an HTTP
request parameter named "hello" with a value of "world" and it will create a
sitemap parameter named "world" with a value of "hello". Why? So we can show you
the two manners in which the Action can be used and let your imagination go from
-there.</p><h2 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">Creating the Action</h2><p>There is nothing like a little sample code to get your feet wet. We are
+there.</p><div class="section" style="background:none;padding:0;"><h2 style="background:none;padding:0;">Creating the Action<a name="Creating_the_Action"></a></h2></div><p>There is nothing like a little sample code to get your feet wet. We are
performing something very simple here, but you can get more complex examples
-from the Cocoon code-base.</p><pre>package test;
+from the Cocoon code-base.</p><div><pre>package test;
import org.apache.avalon.framework.parameters.Parameters;
import org.apache.cocoon.acting.AbstractAction;
@@ -701,24 +689,24 @@ public class HelloWorldAction extends Ab
return sitemapParams;
}
}
-</pre><h2 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">Using the Action</h2><p>In order to use the Action we just created, we need to define it in the
-sitemap. After it has been defined, we must use it in the sitemap.</p><h3 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">Defining the Action</h3><pre><map:actions>
+</pre></div><div class="section" style="background:none;padding:0;"><h2 style="background:none;padding:0;">Using the Action<a name="Using_the_Action"></a></h2></div><p>In order to use the Action we just created, we need to define it in the
+sitemap. After it has been defined, we must use it in the sitemap.</p><div class="section"><h3>Defining the Action<a name="Defining_the_Action"></a></h3><div><pre><map:actions>
<map:action name="hello-world" src="test.HelloWorldAction"/>
</map:actions>
-</pre><h3 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">Using the Action</h3><pre><map:match pattern="file">
+</pre></div></div><div class="section"><h3>Using the Action<a name="Using_the_Action"></a></h3><div><pre><map:match pattern="file">
<map:act type="hello-world">
<map:generate type="serverpages" src="{world}_world.xsp"/>
</map:act>
<map:serialize/>
</map:match>
-</pre><p>Using this approach, we will generate the file named <tt>hello_world.xsp</tt>
+</pre></div><p>Using this approach, we will generate the file named <tt>hello_world.xsp</tt>
because the value of the Sitemap parameter <tt>{world}</tt> is <tt>hello</tt>.
Also, the file <tt>hello_world.xsp</tt> can use the request attribute
-<tt>hello</tt> to produce the value <tt>world</tt>.</p><pre><para>Hello <xsp-request:get-attribute name="hello"/>.</para>
-</pre><h2 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">Communication between Sitemap and Action</h2><p>As stated previously there is a two way communication between the Sitemap and
+<tt>hello</tt> to produce the value <tt>world</tt>.</p><div><pre><para>Hello <xsp-request:get-attribute name="hello"/>.</para>
+</pre></div></div><div class="section" style="background:none;padding:0;"><h2 style="background:none;padding:0;">Communication between Sitemap and Action<a name="Communication_between_Sitemap_and_Action"></a></h2></div><p>As stated previously there is a two way communication between the Sitemap and
the Action. The Sitemap can pass the parameters and the source attribute to the
Action and the Action can return a Map object with new values which can be used
-in the sitemap.</p><pre><map:match pattern="file">
+in the sitemap.</p><div><pre><map:match pattern="file">
<map:act type="hello-world" src="optional src">
<!-- and here come the parameters: -->
<map:parameter name="first parameter" value="test"/>
@@ -727,35 +715,35 @@ in the sitemap.</p><pre><map:match pa
</map:act>
<map:serialize/>
</map:match>
-</pre><p>This Map object does not replace the previous Map object, but is stacked on
+</pre></div><p>This Map object does not replace the previous Map object, but is stacked on
top of it. The other Map objects are still accessible through a path expression.
-</p><pre><map:match pattern="*">
+</p><div><pre><map:match pattern="*">
<map:act type="validate-session">
<map:generate type="serverpages" src="{../1}.xsp"/>
</map:act>
<map:serialize/>
</map:match>
-</pre><p>The above example shows how to access the next to last map by prefixing the
-key with <tt>../</tt>.</p><h2 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">Flow Control</h2><p>In addition to delivering values to the Sitemap, the Action can also control
+</pre></div><p>The above example shows how to access the next to last map by prefixing the
+key with <tt>../</tt>.</p><div class="section" style="background:none;padding:0;"><h2 style="background:none;padding:0;">Flow Control<a name="Flow_Control"></a></h2></div><p>In addition to delivering values to the Sitemap, the Action can also control
the flow. If the action returns <tt>null</tt> all statements inside the
<tt>map:act</tt> element are not executed. So, if in the example above the hello
world action would return <tt>null</tt> the server page generator would not be
activated.</p><p>In other words: The statements within the <tt>map:act</tt> element are
-<em>only</em> executed if the action returns at least an empty Map object.</p><h1 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">Action Sets</h1><p>You can arrange actions in an action set. The sitemap calls the act method of
+<i>only</i> executed if the action returns at least an empty Map object.</p><h1>Action Sets</h1><p>You can arrange actions in an action set. The sitemap calls the act method of
those actions in the sequence they are defined in the action set. It is possible
to signal to the sitemap to call an action only if the Environment's
<tt>getAction</tt> method returns a String identical to the value supplied with
an action attribute. In the current implementation of the HttpEnvironment the
value returned by the getAction method is determined by a http request
parameter. The Environment looks for a request parameter with a prefix
-"cocoon-action-" followed by an action name.</p><pre><input type="submit" name="cocoon-action-ACTIONNAME" value="click here to do something">
-</pre><div class="note"><div><strong>Note: </strong>The orginal "cocoon-action" syntax is deprecated but still
+"cocoon-action-" followed by an action name.</p><div><pre><input type="submit" name="cocoon-action-ACTIONNAME" value="click here to do something">
+</pre></div><div class="note"><div><b>Note: </b>The orginal "cocoon-action" syntax is deprecated but still
supported!</div></div><p>Above we have seen that a successfully executed action returns a Map object
that can be used to communicate with the sitemap. In case of an action set this
is similar. With action sets all returned Map objects are merged into a single
Map. Of course a Map can contain only one value per key so that if multiple
actions within an action set use the same key to communicate to the sitemap,
-only the last one "survives".</p><p>So far let's have a look at at possible action set definition:</p><pre><map:action-sets>
+only the last one "survives".</p><p>So far let's have a look at at possible action set definition:</p><div><pre><map:action-sets>
<map:action-set name="shop-actions">
<map:act type="session-invalidator" action="logoff"/>
<map:act type="session-validator"/>
@@ -768,14 +756,14 @@ only the last one "survives".<
<map:act type="screen-navigator" src="{1}"/>
</map:action-set>
</map:action-sets>
-</pre><p>And this is a possible pipeline snipped which uses this action set:</p><pre> <map:match pattern="*">
+</pre></div><p>And this is a possible pipeline snipped which uses this action set:</p><div><pre> <map:match pattern="*">
<map:act set="shop-actions"> <--- HERE -->
<map:generate type="serverpages" src="docs/xsp/{nextpage}.xsp"/>
<map:transform src="stylesheets/page2html.xsl"/>
<map:serialize type="html"/>
</map:act>
</map:match>
-</pre><p>Let me explain some of those actions in the set first.</p><p>The "session-invalidator" action gets called when an action of logoff is
+</pre></div><p>Let me explain some of those actions in the set first.</p><p>The "session-invalidator" action gets called when an action of logoff is
requested (ie. a html submit button named "cocoon-action-logoff" was pressed).
</p><p>The "session-validator" action is called on every request. It assures that an
http session is created and available to the other sitemap components (other
@@ -790,18 +778,22 @@ the screen-navigation action sets up a M
with the value of the page that produces the next "view".</p><p>However, one is not limited to specify distinct values at the action
attribute. It is possible and I think useful to mark several actions with the
same action attribute value which will then be called in sequence. This allows
-you to choose a granularity of your actions at will.</p></div><div class="editUrl"><div><em>Errors and Improvements?</em> If you see any errors or potential improvements in this document please help
- us: <a href="http://cocoon.zones.apache.org/daisy/cdocs/1375?branch=1&language=1">View, Edit or comment</a> on the latest development version (registration required).
- </div></div></div>
+you to choose a granularity of your actions at will.</p></div></div>
+
</div>
</div>
<!-- end of content -->
<div id="footer">
- <p>©
- 1999-2008
+ <p>Copyright ©
+ 1999-2012
The Apache Software Foundation
+ All Rights Reserved.</p>
+
+ <p>
+ Apache Cocoon, Apache, the Apache feather logo, and the Apache Cocoon project logos are trademarks of The Apache Software Foundation.
+ All other marks mentioned may be trademarks or registered trademarks of their respective owners.
</p>
</div>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
Modified: cocoon/site/site/2.2/core-modules/core/2.2/1376_1_1.html
URL: http://svn.apache.org/viewvc/cocoon/site/site/2.2/core-modules/core/2.2/1376_1_1.html?rev=1329677&r1=1329676&r2=1329677&view=diff
==============================================================================
--- cocoon/site/site/2.2/core-modules/core/2.2/1376_1_1.html (original)
+++ cocoon/site/site/2.2/core-modules/core/2.2/1376_1_1.html Tue Apr 24 12:39:52 2012
@@ -29,17 +29,13 @@
<head>
<title> Cocoon Core - Matchers and Selectors
</title>
- <style type="text/css" media="all">
- @import url("./css/maven-base.css");
- @import url("./css/maven-theme.css");
- @import url("./css/site.css");
- </style>
+ <link rel="stylesheet" href="./css/apache-cocoon-thien-maven-skin.min.css" />
<link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
- <script src="./js/getBlank.js" language="javascript" type="text/javascript"></script>
- <meta name="author" content="The Cocoon Community" />
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+ <script src="./js/apache-cocoon-thien-maven-skin.min.js" language="javascript" type="text/javascript"></script>
+ <meta name="author" content="Apache Cocoon Documentation Team" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
- <body>
+ <body onload="javascript:prettyPrint();">
<div id="breadtrail">
<p><a href="http://www.apache.org">Apache</a> » <a href="../../../../">Cocoon</a> »</p>
</div>
@@ -77,7 +73,7 @@
<li><a href="../../../../2.2/core-modules/">Core <span class="pl-version-small">2.2</span></a></li>
<li><a href="../../../../2.2/blocks/">Blocks <span class="pl-version-small">2.2</span></a></li>
<li><a href="../../../../2.2/maven-plugins/">Maven Plugins <span class="pl-version-small">2.2</span></a></li>
- <li><strong><a href="../../../..//3.0/">Cocoon 3.0 <span class="pl-version-small">[alpha]</span></a></em></strong></li>
+ <li><strong><a href="../../../..//3.0/">Cocoon 3.0</a></em></strong></li>
<li><strong><a href="../../../../subprojects/">Subprojects</a></strong></li>
</ul>
</div>
@@ -92,7 +88,7 @@
<ul>
<li >
- <a href="1270_1_1.html">Introduction</a>
+ <a href="index.html">Introduction</a>
</li>
</ul>
</li>
@@ -279,8 +275,6 @@
-
-
<li class='menuCollapse'>
<a href="842_1_1.html">Reference</a>
@@ -568,7 +562,7 @@
</li>
<li >
- <a href="1380_1_1.html">Using Control Flow</a>
+ <a href="1380_1_1.html">Using Control Flow</a>
</li>
</ul>
</li>
@@ -602,11 +596,11 @@
</li>
<li >
- <a href="1399_1_1.html">Logging configuration</a>
+ <a href="1399_1_1.html">Logging Configuration</a>
</li>
<li >
- <a href="1259_1_1.html">Component Configurations</a>
+ <a href="1259_1_1.html">Component Configuration</a>
</li>
<li >
@@ -615,43 +609,37 @@
</ul>
</li>
<li>
- Project Documentation
+ Project Reports
<ul>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <li class='menuCollapse'>
- <a href="project-info.html">Project Information</a>
- </li>
+ <li >
+ <a href="changes-report.html">Changes Report</a>
+ </li>
-
-
-
-
-
-
-
-
- <li class='menuCollapse'>
- <a href="project-reports.html">Project Reports</a>
- </li>
+ <li >
+ <a href="apidocs/">JavaDocs</a>
+ </li>
</ul>
</li>
</ul>
<div class="main">
- <div id="contentBody"><div id="bodyText"><h1 class="docTitle">Matchers and Selectors</h1><h1 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">Introduction</h1><p>Matchers and selectors are sitemap components. They are used to determine the
+ <!-- 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. -->
+ <div id="contentBody"><div id="bodyText"><h1 class="docTitle">Matchers and Selectors</h1><h1>Introduction</h1><p>Matchers and selectors are sitemap components. They are used to determine the
flow, the other components involved and their ordering of the request
processing. One particular matcher you're probably familiar with, is the
WildcardURIMatcher. That is the one that determines the (sub-)pipeline in the
@@ -662,7 +650,7 @@ generally simple boolean expression and
things as matchers would. There is a selector on the client's hostname, on the
client's browser etc.</p><p>To make things even more complicated, actions have very similar properties.
You can nest other sitemap elements in an action and those are included in the
-processing only if the action completes successfully.</p><h1 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">So what are the differences?</h1><p>The basic structure of a selector is that of a case, switch or
+processing only if the action completes successfully.</p><h1>So what are the differences?</h1><p>The basic structure of a selector is that of a case, switch or
if-elseif-...-elseif-else statement in programming languages while matchers and
actions compare more to a if statement. In addition selectors don't communicate
the basis for their decision to the embedded elements, just select the next
@@ -678,7 +666,7 @@ pattern="*/*/*/*/report.html"&
<tt>2</tt>, <tt>3</tt>, and <tt>4</tt> being defined, corresponding to the
<tt>*</tt>s in the pattern.</p><p>BTW you cannot access those maps from your XSP. Use parameters to the
generator to explicitly send them. On your XSP you can access them through an
-object called <tt>parameters</tt>. Example</p><pre><map:match pattern="*/*/*/*/report.html">
+object called <tt>parameters</tt>. Example</p><div><pre><map:match pattern="*/*/*/*/report.html">
<map:generate type="serverpages" src="docs/getPostcodeData.xsp">
<parameter name="postcode" value="{1}{2} {3}{4}"/>
</map:generate>
@@ -686,20 +674,20 @@ object called <tt>parameters</tt>. Examp
<map:serialize/>
</map:match>
-</pre><p>On your XSP do</p><pre><xsp:expr>parameters.getParameter("postcode")</xsp:expr>
+</pre></div><p>On your XSP do</p><div><pre><xsp:expr>parameters.getParameter("postcode")</xsp:expr>
-</pre><p>Generally, one could say that selectors are better suited if the decisions
+</pre></div><p>Generally, one could say that selectors are better suited if the decisions
has few easily distinguishable cases, the map feature is not needed and the
decision occurs later in the pipeline. Their implementation should be
lightweight and so is their integration in the compiled sitemap.</p><p>Matchers are often the very first element in a pipeline. They direct the
processing based on more complex decision process. They are general purpose but
-more costly than selectors.</p><p>Actions should be used to <em>"do"</em> something, not to chose between
+more costly than selectors.</p><p>Actions should be used to <i>"do"</i> something, not to chose between
different sub pipelines. That should be done only, if an error occurred and you
cannot continue the regular pipeline. Of course this is a fuzzy criterion and
using an action to choose between exactly two sub pipelines is a very common
task i.e. for authentication. Also, often actions have no nested elements and
-the further processing is not affected by the result of the action.</p><h1 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">Using Matchers</h1><p>Like every other sitemap component, matchers need to be declared in the
-sitemap:</p><pre><map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+the further processing is not affected by the result of the action.</p><h1>Using Matchers</h1><p>Like every other sitemap component, matchers need to be declared in the
+sitemap:</p><div><pre><map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<map:components>
...
@@ -718,11 +706,11 @@ sitemap:</p><pre><map:sitemap xmlns:m
</map:sitemap>
-</pre><p>Matchers are given a short name (e.g, "wildcard") and of course the name of
+</pre></div><p>Matchers are given a short name (e.g, "wildcard") and of course the name of
the JAVA class that implements the matcher. In addition, parameters can be
defined as well.</p><p>One matcher may be defined as default matcher, so whenever a matcher appears
in the sitemap without explicit type specification it will be assumed that it is
-of the default type.</p><p>In a pipeline use the matcher like this</p><p>Matchers can be nested:</p><pre><map:match type="sessionstate" pattern="edit*">
+of the default type.</p><p>In a pipeline use the matcher like this</p><p>Matchers can be nested:</p><div><pre><map:match type="sessionstate" pattern="edit*">
<!-- here you could insert parameters for the above matcher -->
<map:parameter name="attribute-name" value="__sessionstate"/>
@@ -736,8 +724,8 @@ of the default type.</p><p>In a pipeline
</map:match>
</map:match>
-</pre><h1 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">Using Selectors</h1><p>As said above, selectors are very similar to matchers. Again, you need to
-declare selectors in the sitemap.xmap</p><pre><map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+</pre></div><h1>Using Selectors</h1><p>As said above, selectors are very similar to matchers. Again, you need to
+declare selectors in the sitemap.xmap</p><div><pre><map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<map:components>
...
<map:selectors default="browser">
@@ -757,8 +745,8 @@ declare selectors in the sitemap.xmap</p
</map:sitemap>
-</pre><p>Their use is a bit different to matchers, though:</p><p>Obviously, this could have been done with matchers as well. Decide on
-yourself, what appears clearer to you in a specific situation.</p><h1 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">Write Your Own Matchers and Selectors</h1><h2 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">Matchers</h2><p>Since the basic structure and the assumptions are very similar, we look first
+</pre></div><p>Their use is a bit different to matchers, though:</p><p>Obviously, this could have been done with matchers as well. Decide on
+yourself, what appears clearer to you in a specific situation.</p><h1>Write Your Own Matchers and Selectors</h1><div class="section" style="background:none;padding:0;"><h2 style="background:none;padding:0;">Matchers<a name="Matchers"></a></h2></div><p>Since the basic structure and the assumptions are very similar, we look first
at matchers and point out the differences to selectors at the end.</p><p>Matchers need to implement the <tt>org.apache.cocoon.matching.Matcher</tt>
interface. See javadocs for more details, see also example matchers included in
the distribution.</p><p>If you would like to do global configuration for your matcher, it has to
@@ -768,23 +756,27 @@ read and used with the generated matcher
pipeline is executed. Components in sub pipeline can access the matching result
through the returned map.</p><p>The easiest way to write your own matcher would be to base it upon
org.apache.cocoon.matching.WildcardURIMatcher and override the getMatchString
-method with your own.</p><h2 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">Selectors</h2><p>Selectors and selector factories differ from their matcher counter parts only
+method with your own.</p><div class="section" style="background:none;padding:0;"><h2 style="background:none;padding:0;">Selectors<a name="Selectors"></a></h2></div><p>Selectors and selector factories differ from their matcher counter parts only
in the fact that selectors return boolean values rather than maps. Thus when a
selector returns <tt>true</tt> the nested elements will be included in the
processing, otherwise they are not included. Since no map is returned, no
additional information may be passed to those elements.</p><p>For selectors, the last argument reads <tt>param</tt> instead of
-<tt>parameters</tt>.</p></div><div class="editUrl"><div><em>Errors and Improvements?</em> If you see any errors or potential improvements in this document please help
- us: <a href="http://cocoon.zones.apache.org/daisy/cdocs/1376?branch=1&language=1">View, Edit or comment</a> on the latest development version (registration required).
- </div></div></div>
+<tt>parameters</tt>.</p></div></div>
+
</div>
</div>
<!-- end of content -->
<div id="footer">
- <p>©
- 1999-2008
+ <p>Copyright ©
+ 1999-2012
The Apache Software Foundation
+ All Rights Reserved.</p>
+
+ <p>
+ Apache Cocoon, Apache, the Apache feather logo, and the Apache Cocoon project logos are trademarks of The Apache Software Foundation.
+ All other marks mentioned may be trademarks or registered trademarks of their respective owners.
</p>
</div>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
Modified: cocoon/site/site/2.2/core-modules/core/2.2/1377_1_1.html
URL: http://svn.apache.org/viewvc/cocoon/site/site/2.2/core-modules/core/2.2/1377_1_1.html?rev=1329677&r1=1329676&r2=1329677&view=diff
==============================================================================
--- cocoon/site/site/2.2/core-modules/core/2.2/1377_1_1.html (original)
+++ cocoon/site/site/2.2/core-modules/core/2.2/1377_1_1.html Tue Apr 24 12:39:52 2012
@@ -29,17 +29,13 @@
<head>
<title> Cocoon Core - Modules
</title>
- <style type="text/css" media="all">
- @import url("./css/maven-base.css");
- @import url("./css/maven-theme.css");
- @import url("./css/site.css");
- </style>
+ <link rel="stylesheet" href="./css/apache-cocoon-thien-maven-skin.min.css" />
<link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
- <script src="./js/getBlank.js" language="javascript" type="text/javascript"></script>
- <meta name="author" content="The Cocoon Community" />
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+ <script src="./js/apache-cocoon-thien-maven-skin.min.js" language="javascript" type="text/javascript"></script>
+ <meta name="author" content="Apache Cocoon Documentation Team" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
- <body>
+ <body onload="javascript:prettyPrint();">
<div id="breadtrail">
<p><a href="http://www.apache.org">Apache</a> » <a href="../../../../">Cocoon</a> »</p>
</div>
@@ -77,7 +73,7 @@
<li><a href="../../../../2.2/core-modules/">Core <span class="pl-version-small">2.2</span></a></li>
<li><a href="../../../../2.2/blocks/">Blocks <span class="pl-version-small">2.2</span></a></li>
<li><a href="../../../../2.2/maven-plugins/">Maven Plugins <span class="pl-version-small">2.2</span></a></li>
- <li><strong><a href="../../../..//3.0/">Cocoon 3.0 <span class="pl-version-small">[alpha]</span></a></em></strong></li>
+ <li><strong><a href="../../../..//3.0/">Cocoon 3.0</a></em></strong></li>
<li><strong><a href="../../../../subprojects/">Subprojects</a></strong></li>
</ul>
</div>
@@ -92,7 +88,7 @@
<ul>
<li >
- <a href="1270_1_1.html">Introduction</a>
+ <a href="index.html">Introduction</a>
</li>
</ul>
</li>
@@ -279,8 +275,6 @@
-
-
<li class='menuCollapse'>
<a href="842_1_1.html">Reference</a>
@@ -568,7 +562,7 @@
</li>
<li >
- <a href="1380_1_1.html">Using Control Flow</a>
+ <a href="1380_1_1.html">Using Control Flow</a>
</li>
</ul>
</li>
@@ -602,11 +596,11 @@
</li>
<li >
- <a href="1399_1_1.html">Logging configuration</a>
+ <a href="1399_1_1.html">Logging Configuration</a>
</li>
<li >
- <a href="1259_1_1.html">Component Configurations</a>
+ <a href="1259_1_1.html">Component Configuration</a>
</li>
<li >
@@ -615,54 +609,52 @@
</ul>
</li>
<li>
- Project Documentation
+ Project Reports
<ul>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <li class='menuCollapse'>
- <a href="project-info.html">Project Information</a>
- </li>
+ <li >
+ <a href="changes-report.html">Changes Report</a>
+ </li>
-
-
-
-
-
-
-
-
- <li class='menuCollapse'>
- <a href="project-reports.html">Project Reports</a>
- </li>
+ <li >
+ <a href="apidocs/">JavaDocs</a>
+ </li>
</ul>
</li>
</ul>
<div class="main">
- <div id="contentBody"><div id="bodyText"><h1 class="docTitle">Modules</h1><p>TBD</p></div><div class="editUrl"><div><em>Errors and Improvements?</em> If you see any errors or potential improvements in this document please help
- us: <a href="http://cocoon.zones.apache.org/daisy/cdocs/1377?branch=1&language=1">View, Edit or comment</a> on the latest development version (registration required).
- </div></div></div>
+ <!-- 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. -->
+ <div id="contentBody"><div id="bodyText"><h1 class="docTitle">Modules</h1><p>TBD</p></div></div>
+
</div>
</div>
<!-- end of content -->
<div id="footer">
- <p>©
- 1999-2008
+ <p>Copyright ©
+ 1999-2012
The Apache Software Foundation
+ All Rights Reserved.</p>
+
+ <p>
+ Apache Cocoon, Apache, the Apache feather logo, and the Apache Cocoon project logos are trademarks of The Apache Software Foundation.
+ All other marks mentioned may be trademarks or registered trademarks of their respective owners.
</p>
</div>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
Modified: cocoon/site/site/2.2/core-modules/core/2.2/1378_1_1.html
URL: http://svn.apache.org/viewvc/cocoon/site/site/2.2/core-modules/core/2.2/1378_1_1.html?rev=1329677&r1=1329676&r2=1329677&view=diff
==============================================================================
--- cocoon/site/site/2.2/core-modules/core/2.2/1378_1_1.html (original)
+++ cocoon/site/site/2.2/core-modules/core/2.2/1378_1_1.html Tue Apr 24 12:39:52 2012
@@ -29,17 +29,13 @@
<head>
<title> Cocoon Core - Redirection
</title>
- <style type="text/css" media="all">
- @import url("./css/maven-base.css");
- @import url("./css/maven-theme.css");
- @import url("./css/site.css");
- </style>
+ <link rel="stylesheet" href="./css/apache-cocoon-thien-maven-skin.min.css" />
<link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
- <script src="./js/getBlank.js" language="javascript" type="text/javascript"></script>
- <meta name="author" content="The Cocoon Community" />
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+ <script src="./js/apache-cocoon-thien-maven-skin.min.js" language="javascript" type="text/javascript"></script>
+ <meta name="author" content="Apache Cocoon Documentation Team" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
- <body>
+ <body onload="javascript:prettyPrint();">
<div id="breadtrail">
<p><a href="http://www.apache.org">Apache</a> » <a href="../../../../">Cocoon</a> »</p>
</div>
@@ -77,7 +73,7 @@
<li><a href="../../../../2.2/core-modules/">Core <span class="pl-version-small">2.2</span></a></li>
<li><a href="../../../../2.2/blocks/">Blocks <span class="pl-version-small">2.2</span></a></li>
<li><a href="../../../../2.2/maven-plugins/">Maven Plugins <span class="pl-version-small">2.2</span></a></li>
- <li><strong><a href="../../../..//3.0/">Cocoon 3.0 <span class="pl-version-small">[alpha]</span></a></em></strong></li>
+ <li><strong><a href="../../../..//3.0/">Cocoon 3.0</a></em></strong></li>
<li><strong><a href="../../../../subprojects/">Subprojects</a></strong></li>
</ul>
</div>
@@ -92,7 +88,7 @@
<ul>
<li >
- <a href="1270_1_1.html">Introduction</a>
+ <a href="index.html">Introduction</a>
</li>
</ul>
</li>
@@ -279,8 +275,6 @@
-
-
<li class='menuCollapse'>
<a href="842_1_1.html">Reference</a>
@@ -568,7 +562,7 @@
</li>
<li >
- <a href="1380_1_1.html">Using Control Flow</a>
+ <a href="1380_1_1.html">Using Control Flow</a>
</li>
</ul>
</li>
@@ -602,11 +596,11 @@
</li>
<li >
- <a href="1399_1_1.html">Logging configuration</a>
+ <a href="1399_1_1.html">Logging Configuration</a>
</li>
<li >
- <a href="1259_1_1.html">Component Configurations</a>
+ <a href="1259_1_1.html">Component Configuration</a>
</li>
<li >
@@ -615,88 +609,82 @@
</ul>
</li>
<li>
- Project Documentation
+ Project Reports
<ul>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <li class='menuCollapse'>
- <a href="project-info.html">Project Information</a>
- </li>
+ <li >
+ <a href="changes-report.html">Changes Report</a>
+ </li>
-
-
-
-
-
-
-
-
- <li class='menuCollapse'>
- <a href="project-reports.html">Project Reports</a>
- </li>
+ <li >
+ <a href="apidocs/">JavaDocs</a>
+ </li>
</ul>
</li>
</ul>
<div class="main">
- <div id="contentBody"><div id="bodyText"><h1 class="docTitle">Redirection</h1><h1 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">Introduction</h1><p>A Redirector allows the sitemap to pass a request for one URI on to another,
+ <!-- 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. -->
+ <div id="contentBody"><div id="bodyText"><h1 class="docTitle">Redirection</h1><h1>Introduction</h1><p>A Redirector allows the sitemap to pass a request for one URI on to another,
whether that other URI is handled by Cocoon or not.</p><p>To redirect from <tt>page1.html</tt> to <tt>page2.html</tt>, you can use the
-following:</p><pre> <map:match pattern="page1.html">
+following:</p><div><pre> <map:match pattern="page1.html">
<map:redirect-to uri="page2.html"/>
</map:match>
- </pre><h1 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">HTTP redirects and how they work</h1><p>If the URI specified does not use the Cocoon: protocol, then an HTTP redirect
+ </pre></div><h1>HTTP redirects and how they work</h1><p>If the URI specified does not use the Cocoon: protocol, then an HTTP redirect
will occur. The new URI is sent back to the client, which will then request the
page from this new location.</p><p>Therefore, directory handling in redirect URIs works differently from other
sitemap components.</p><p>If the new URI is relative, then it will be relative to the directory of the
page that called it, not relative to the URI of the sitemap containing it. Thus,
-the following is incorrect:</p><pre> <map:match pattern="folder/page1.html">
+the following is incorrect:</p><div><pre> <map:match pattern="folder/page1.html">
<map:redirect-to uri="folder/page2.html"/>
</map:match>
-</pre><p>This will in fact redirect the user to folder/folder/page2.html, which is
-probably not intended. The correct version is:</p><pre> <map:match pattern="folder/page1.html">
+</pre></div><p>This will in fact redirect the user to folder/folder/page2.html, which is
+probably not intended. The correct version is:</p><div><pre> <map:match pattern="folder/page1.html">
<map:redirect-to uri="page2.html"/>
</map:match>
-</pre><h1 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">Internal Redirects Using the Cocoon Protocol</h1><p>A redirection URI can make use of the <tt>cocoon:</tt> protocol to return
+</pre></div><h1>Internal Redirects Using the Cocoon Protocol</h1><p>A redirection URI can make use of the <tt>cocoon:</tt> protocol to return
content from another Cocoon pipeline. In this case, the redirection happens
internally. The content from the redirected URI is returned to the client as if
it came from the original URI.</p><p>Directory handling is the same here as for other sitemap components. So that:
-</p><pre> <map:match pattern="folder/page1.html">
+</p><div><pre> <map:match pattern="folder/page1.html">
<map:redirect-to uri="cocoon:/folder/page2.html"/>
</map:match>
-</pre><p>will return the content of <tt>page2.html</tt> to the client in response to
+</pre></div><p>will return the content of <tt>page2.html</tt> to the client in response to
the request for <tt>page1.html</tt>.</p><p>Note: when the <tt>cocoon:</tt> protocol is used, an HTTP redirect is not
-used.</p><h1 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">Session Management with Redirects</h1><p>By setting the <tt>session</tt> attribute to <tt>yes</tt>, the current
-session will be maintained during the redirect.</p><h1 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">Temporary and Permanent Redirects</h1><p>By default, an HTTP redirect sends a code of <tt>SC_MOVED_TEMPORARILY</tt>,
+used.</p><h1>Session Management with Redirects</h1><p>By setting the <tt>session</tt> attribute to <tt>yes</tt>, the current
+session will be maintained during the redirect.</p><h1>Temporary and Permanent Redirects</h1><p>By default, an HTTP redirect sends a code of <tt>SC_MOVED_TEMPORARILY</tt>,
(<tt>302</tt>). This instructs the user agent to use the new URI, but not to
cache the resulting page, as it may well soon revert back to the old URI.</p><p>This can be a problem for pages that have been moved permanently, as the new
page will never be cached, placing additional load on both the browser and on
the server.</p><p>This can be avoided using a permanent redirect, using a code of
<tt>SC_MOVED_PERMANENTLY</tt> (<tt>301</tt>). A permanent redirect can be
-specified as:</p><pre> <map:match pattern="page1.html">
+specified as:</p><div><pre> <map:match pattern="page1.html">
<map:redirect-to uri="page2.html" permanent="yes"/>
</map:match>
- </pre><p>This results in the user agent caching the redirected page, and thus saves
-resources both on the server and for the client's browser.</p><h1 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">Redirects in Pipelines</h1><p>A redirect must stand alone in a pipeline - it cannot occur after a
+ </pre></div><p>This results in the user agent caching the redirected page, and thus saves
+resources both on the server and for the client's browser.</p><h1>Redirects in Pipelines</h1><p>A redirect must stand alone in a pipeline - it cannot occur after a
generator. If a redirect needs to be generated conditionally by a pipeline, then
a <tt><meta></tt> tag redirect should be added into the
-<tt><head></tt> of the HTML page. The syntax for this is:</p><pre>
+<tt><head></tt> of the HTML page. The syntax for this is:</p><div><pre>
<html>
<head>
<meta http-equiv="refresh" content="0;URL=page2.html"/>
@@ -705,23 +693,27 @@ a <tt><meta></tt> tag redirect sho
...
</html>
- </pre><h1 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">Global Redirects</h1><p>When an aggregator accesses a source that includes a redirection, it will
+ </pre></div><h1>Global Redirects</h1><p>When an aggregator accesses a source that includes a redirection, it will
aggregate the document specified by the redirection URI.</p><p>Alternatively, if a redirection that has the <tt>global</tt> attribute is set
(to <tt>yes</tt> or <tt>true</tt>) occurs within an aggregation, the aggregation
-is cancelled and the redirect is sent back to the client.</p><h1 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">Redirecting to Resources</h1><p>Specifiying a <tt>resource</tt> attribute allows the redirection to a sitemap
+is cancelled and the redirect is sent back to the client.</p><h1>Redirecting to Resources</h1><p>Specifiying a <tt>resource</tt> attribute allows the redirection to a sitemap
resource. This usage has been deprecated. <tt>map:call</tt> should be used
-instead.</p></div><div class="editUrl"><div><em>Errors and Improvements?</em> If you see any errors or potential improvements in this document please help
- us: <a href="http://cocoon.zones.apache.org/daisy/cdocs/1378?branch=1&language=1">View, Edit or comment</a> on the latest development version (registration required).
- </div></div></div>
+instead.</p></div></div>
+
</div>
</div>
<!-- end of content -->
<div id="footer">
- <p>©
- 1999-2008
+ <p>Copyright ©
+ 1999-2012
The Apache Software Foundation
+ All Rights Reserved.</p>
+
+ <p>
+ Apache Cocoon, Apache, the Apache feather logo, and the Apache Cocoon project logos are trademarks of The Apache Software Foundation.
+ All other marks mentioned may be trademarks or registered trademarks of their respective owners.
</p>
</div>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
Modified: cocoon/site/site/2.2/core-modules/core/2.2/1379_1_1.html
URL: http://svn.apache.org/viewvc/cocoon/site/site/2.2/core-modules/core/2.2/1379_1_1.html?rev=1329677&r1=1329676&r2=1329677&view=diff
==============================================================================
--- cocoon/site/site/2.2/core-modules/core/2.2/1379_1_1.html (original)
+++ cocoon/site/site/2.2/core-modules/core/2.2/1379_1_1.html Tue Apr 24 12:39:52 2012
@@ -29,17 +29,13 @@
<head>
<title> Cocoon Core - Error Handling
</title>
- <style type="text/css" media="all">
- @import url("./css/maven-base.css");
- @import url("./css/maven-theme.css");
- @import url("./css/site.css");
- </style>
+ <link rel="stylesheet" href="./css/apache-cocoon-thien-maven-skin.min.css" />
<link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
- <script src="./js/getBlank.js" language="javascript" type="text/javascript"></script>
- <meta name="author" content="The Cocoon Community" />
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+ <script src="./js/apache-cocoon-thien-maven-skin.min.js" language="javascript" type="text/javascript"></script>
+ <meta name="author" content="Apache Cocoon Documentation Team" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
- <body>
+ <body onload="javascript:prettyPrint();">
<div id="breadtrail">
<p><a href="http://www.apache.org">Apache</a> » <a href="../../../../">Cocoon</a> »</p>
</div>
@@ -77,7 +73,7 @@
<li><a href="../../../../2.2/core-modules/">Core <span class="pl-version-small">2.2</span></a></li>
<li><a href="../../../../2.2/blocks/">Blocks <span class="pl-version-small">2.2</span></a></li>
<li><a href="../../../../2.2/maven-plugins/">Maven Plugins <span class="pl-version-small">2.2</span></a></li>
- <li><strong><a href="../../../..//3.0/">Cocoon 3.0 <span class="pl-version-small">[alpha]</span></a></em></strong></li>
+ <li><strong><a href="../../../..//3.0/">Cocoon 3.0</a></em></strong></li>
<li><strong><a href="../../../../subprojects/">Subprojects</a></strong></li>
</ul>
</div>
@@ -92,7 +88,7 @@
<ul>
<li >
- <a href="1270_1_1.html">Introduction</a>
+ <a href="index.html">Introduction</a>
</li>
</ul>
</li>
@@ -279,8 +275,6 @@
-
-
<li class='menuCollapse'>
<a href="842_1_1.html">Reference</a>
@@ -568,7 +562,7 @@
</li>
<li >
- <a href="1380_1_1.html">Using Control Flow</a>
+ <a href="1380_1_1.html">Using Control Flow</a>
</li>
</ul>
</li>
@@ -602,11 +596,11 @@
</li>
<li >
- <a href="1399_1_1.html">Logging configuration</a>
+ <a href="1399_1_1.html">Logging Configuration</a>
</li>
<li >
- <a href="1259_1_1.html">Component Configurations</a>
+ <a href="1259_1_1.html">Component Configuration</a>
</li>
<li >
@@ -615,56 +609,50 @@
</ul>
</li>
<li>
- Project Documentation
+ Project Reports
<ul>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <li class='menuCollapse'>
- <a href="project-info.html">Project Information</a>
- </li>
+ <li >
+ <a href="changes-report.html">Changes Report</a>
+ </li>
-
-
-
-
-
-
-
-
- <li class='menuCollapse'>
- <a href="project-reports.html">Project Reports</a>
- </li>
+ <li >
+ <a href="apidocs/">JavaDocs</a>
+ </li>
</ul>
</li>
</ul>
<div class="main">
- <div id="contentBody"><div id="bodyText"><h1 class="docTitle">Error Handling</h1><h1 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">Error Handling</h1><p>During the execution of a Cocoon pipeline exceptions may occur within the
+ <!-- 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. -->
+ <div id="contentBody"><div id="bodyText"><h1 class="docTitle">Error Handling</h1><h1>Error Handling</h1><p>During the execution of a Cocoon pipeline exceptions may occur within the
involved components like generators, transformers etc. There are two
possibilities to deal with them: The one would be not to handle them explicitly
in the sitemap, which causes them to be logged and a default Cocoon error page
to be displayed in the browser. The second is to define an error handling by
using the sitemap tag <map:handle-errors>. Therein you are able to define
any pipeline, that is executed in case of an exception occurred and displays an
-appropriate page.</p><h2 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">ExceptionSelector</h2><p>The ExceptionSelector allows to realize conditional error handling within
+appropriate page.</p><div class="section" style="background:none;padding:0;"><h2 style="background:none;padding:0;">ExceptionSelector<a name="ExceptionSelector"></a></h2></div><p>The ExceptionSelector allows to realize conditional error handling within
<map:handle-errors>-tags depending on the type of the occurred exception.
Each exception is configured centrally at the selector in the sitemap by
associating a symbolic name to its class.</p><p>Furthermore it is possible to define, what exceptions are to be "unrolled".
This means, that if an exception has been rethrown embedded in another
exception, this original exception can be considered for choosing the correct
-error handling.</p><p>Example:</p><pre>
+error handling.</p><p>Example:</p><div><pre>
<map:selector name="exception" src="org.apache.cocoon.selection.ExceptionSelector">
<exception name="processing" class="ProcessingException" unroll="true"/>
<exception name="sax" class="SAXException"/>
@@ -684,7 +672,7 @@ error handling.</p><p>Example:</p><pre>
</map:handle-errors>
</map:pipeline>
- </pre><p>Let's consider the following nested exceptions to occur:</p><ol type="1">
+ </pre></div><p>Let's consider the following nested exceptions to occur:</p><ol style="list-style-type: decimal">
<li>ProcessingException ( ApplicationException ): The ProcessingException is
unrolled, so the error pipeline for "application" will be executed.</li>
<li>ProcessingException ( ValidationException ): Since ValidationException is
@@ -696,12 +684,12 @@ SAXException, so the pipeline for "
</ol>Please notice that the selector configuration is processed from top to bottom
and stops at the first matching exception. Therefore the most specific classes
must be configured first. This behaviour is the same as with Java catch
-statements.<h2 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">XPathExceptionSelector</h2>The XPathExceptionSelector is an extension to the standard selector described
+statements.<div class="section" style="background:none;padding:0;"><h2 style="background:none;padding:0;">XPathExceptionSelector<a name="XPathExceptionSelector"></a></h2></div>The XPathExceptionSelector is an extension to the standard selector described
above. It adds the possibility to configure additional conditions for each
exception type by using JXPath expressions, that operate on the exception
object. This configuration is also done centrally at the selector in the
sitemap, where symbolic names are defined for all specific error situations.
-Example:<pre>
+Example:<div><pre>
<map:selector name="exception" src="org.apache.cocoon.selection.XPathExceptionSelector">
<exception name="Denied" class="AuthenticationFailure">
<xpath name="PasswordWrong" test="authCode=10"/>
@@ -725,7 +713,7 @@ Example:<pre>
</map:handle-errors>
</map:pipeline>
- </pre><p>In this example the exception AuthenticationFailure is configured under name
+ </pre></div><p>In this example the exception AuthenticationFailure is configured under name
"Denied". Additionally three further conditions "PasswordWrong",
"PasswordExpired" and "AccessForbidden" are defined by using JXPath expressions.
Therefore instances of AuthenticationFailure are expected to have methods
@@ -736,7 +724,7 @@ error pipeline is executed. If the error
is executed, if it is greater that 11 the third one and all other
AuthenticationFailure errors are handled by the fourth one. In any other error
situation the fifth branch would be chosen.</p><p>Please notice that the selector stops when it finds the first JXPath
-expression in the configuration that matches:</p><p>Example:</p><pre>
+expression in the configuration that matches:</p><p>Example:</p><div><pre>
<map:selector name="exception" src="org.apache.cocoon.selection.XPathExceptionSelector">
<exception name="application" class="ApplicationException">
<xpath name="error3" test="errorCode&gt;3"/>
@@ -756,14 +744,14 @@ expression in the configuration that mat
</map:handle-errors>
</map:pipeline>
- </pre><p>If an ApplicationException with error code 9 occurs, handler 2 is executed
+ </pre></div><p>If an ApplicationException with error code 9 occurs, handler 2 is executed
since error situation "error3" is configured before "error6" at the selector
-even if the expression for "error6" also evaluates to "true".</p><h2 xmlns:ns="http://outerx.org/daisy/1.0" xmlns:p="http://outerx.org/daisy/1.0#publisher">Error Handler Hierarchy</h2><p>The tag <map:handle-errors> may be attached to any <map:pipeline>
+even if the expression for "error6" also evaluates to "true".</p><div class="section" style="background:none;padding:0;"><h2 style="background:none;padding:0;">Error Handler Hierarchy<a name="Error_Handler_Hierarchy"></a></h2></div><p>The tag <map:handle-errors> may be attached to any <map:pipeline>
or the <map:pipelines> tag of the root sitemap or a subsitemap. Therefore
it is possible to define two kinds of error handlers: A default handler may be
defined within <map:pipelines> for applying to all resources of a sitemap.
Alternatively individual handlers may be configured for sets of resources within
-<map:pipeline>.</p><p>Example:</p><pre>
+<map:pipeline>.</p><p>Example:</p><div><pre>
<map:pipelines>
<map:pipeline name="pipe1">
<map:match pattern="res1">
@@ -788,7 +776,7 @@ Alternatively individual handlers may be
</map:handle-errors>
</map:pipelines>
- </pre><p>In conjunction with the ExceptionSelector resp. the XPathExceptionSelector it
+ </pre></div><p>In conjunction with the ExceptionSelector resp. the XPathExceptionSelector it
is possible to define a hierarchy of error handlers for an application. The
behaviour then is the following: If an error occurs within a pipeline, Cocoon at
first checks if an individual handler for this pipeline is defined. If so and it
@@ -800,7 +788,7 @@ the pipeline where the subsitemap is mou
handler of the root sitemap has been considered. If an error could not be
handled at all, it is processed by the Cocoon engine in the end.</p><p>Please notice that a <map:otherwise> breaks the hierarchy since all
errors will be handled on this level. Therefore all levels above will be called
-never.</p><p>Example:</p><pre>
+never.</p><p>Example:</p><div><pre>
Root sitemap:
<map:pipelines>
<map:pipeline>
@@ -836,7 +824,7 @@ Subsitemap:
</map:handle-errors>
</map:pipelines>
- </pre><p>Let's consider four situations concerning the above example:</p><ol type="1">
+ </pre></div><p>Let's consider four situations concerning the above example:</p><ol style="list-style-type: decimal">
<li>A ValidationException occurs, because for instance the user entered an
invalid value: The defined pipeline's handler is called. Since it has a matching
<map:when>-section it is able to handle such an exception and therefore
@@ -855,7 +843,7 @@ the application: All handlers are not co
the root sitemaps default handler will apply to it showing a general error page.
</li>
</ol>When handling exceptions in error handlers one has to take care about
-recursion when working with redirects. Consider the following sitemap:Example:<pre>
+recursion when working with redirects. Consider the following sitemap:Example:<div><pre>
<map:pipelines>
<map:pipeline>
<map:match pattern="resource">
@@ -878,7 +866,7 @@ recursion when working with redirects. C
</map:pipeline>
</map:pipelines>
- </pre>This configuration may lead to an infinite loop: Imagine to call "resource"
+ </pre></div>This configuration may lead to an infinite loop: Imagine to call "resource"
where the FooTransformer throws a ConnectionException, because the connection to
a backend system has broken. The defined error handler will handle it and the
used action internally redirects to resource "error". This resource itself uses
@@ -890,18 +878,22 @@ which redirects to another resource, whi
When defining error handlers for an application such situation must be
avoided. An easy rule would be: An error handling routine must never redirect to
a resource for which the routine itself is responsible and which might produce
-the same error as just handled.</div><div class="editUrl"><div><em>Errors and Improvements?</em> If you see any errors or potential improvements in this document please help
- us: <a href="http://cocoon.zones.apache.org/daisy/cdocs/1379?branch=1&language=1">View, Edit or comment</a> on the latest development version (registration required).
- </div></div></div>
+the same error as just handled.</div></div>
+
</div>
</div>
<!-- end of content -->
<div id="footer">
- <p>©
- 1999-2008
+ <p>Copyright ©
+ 1999-2012
The Apache Software Foundation
+ All Rights Reserved.</p>
+
+ <p>
+ Apache Cocoon, Apache, the Apache feather logo, and the Apache Cocoon project logos are trademarks of The Apache Software Foundation.
+ All other marks mentioned may be trademarks or registered trademarks of their respective owners.
</p>
</div>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">