You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by as...@apache.org on 2007/09/08 22:17:47 UTC

svn commit: r573901 [28/44] - in /cocoon/site: site/ site/2.0/ site/2.0/developing/ site/2.0/faq/ site/2.0/howto/chaperon/ site/2.0/installing/ site/2.0/plan/ site/2.0/snippet/ site/2.0/tutorial/ site/2.0/userdocs/ site/2.0/userdocs/actions/ site/2.0/u...

Modified: cocoon/site/site/2.0/userdocs/selectors/parameter-selector.html
URL: http://svn.apache.org/viewvc/cocoon/site/site/2.0/userdocs/selectors/parameter-selector.html?rev=573901&r1=573900&r2=573901&view=diff
==============================================================================
--- cocoon/site/site/2.0/userdocs/selectors/parameter-selector.html (original)
+++ cocoon/site/site/2.0/userdocs/selectors/parameter-selector.html Sat Sep  8 13:17:41 2007
@@ -1,371 +1,371 @@
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>Parameter Selector</title>
-<STYLE type="text/css">
-a.menu {
-	color: #FFFFFF;
-    text-align:left;               
-    font-size:12px;
-    font-family: Verdana, Arial, Helvetica, sans-serif;
-    font-weight:plain;
-    text-decoration:none;
-    padding-left: 14px
-}
-
-A.menu:hover {
-	color: #FFCC00
-}
-
-
-.menutitle {
-	color: #000000;
-    text-align:left;               
-    font-size:10px;
-    font-family: Verdana, Arial, Helvetica, sans-serif;
-    font-weight:bold;
-    padding-left: 8px
-}
-.menuselected {
-	color: #FFCC00;
-    text-align:left;               
-    font-size:12px;
-    font-family: Verdana, Arial, Helvetica, sans-serif;
-    font-weight:bold;
-    padding-left: 14px
-}
-</STYLE>
-</head>
-<body bgcolor="#ffffff" marginheight="4" marginwidth="4" leftmargin="4" topmargin="4" alink="#cc0000" vlink="#0086b2" link="#039acc" text="#000000">
-<table border="0" cellpadding="0" cellspacing="0" width="100%">
-<tr>
-<td align="left" valign="top" rowspan="3" height="60" width="135"><img border="0" vspace="0" hspace="0" src="images/logo.gif" height="60" width="135"></td><td background="images/line.gif" rowspan="1" colSpan="2" align="left" valign="top" height="0" width="100%"></td><td align="left" valign="top" rowspan="3" height="60" width="29"><img border="0" vspace="0" hspace="0" src="images/right.gif" height="60" width="29"></td>
-</tr>
-<tr>
-<td bgcolor="#0086b2" colspan="2" align="right" valign="top" height="35" width="100%"><font color="#ffffff" face="Verdana, Arial, Helvetica, sans-serif" size="5">Parameter Selector</font></td>
-</tr>
-<tr>
-<td background="images/bottom.gif" colspan="2" width="100%" valign="top" height="20" bgcolor="#0086b2" align="right">
-<table width="288" cellspacing="0" cellpadding="0" border="0">
-<tr>
-<td align="left" valign="top" height="20" width="96"><a target="new" href="http://xml.apache.org/"><img border="0" vspace="0" hspace="0" name="xml" src="images/button-xml-lo.gif" height="20" width="96" alt="http://xml.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.apache.org/"><img border="0" vspace="0" hspace="0" name="asf" src="images/button-asf-lo.gif" height="20" width="96" alt="http://www.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.w3.org/"><img border="0" vspace="0" hspace="0" name="w3c" src="images/button-w3c-lo.gif" height="20" width="96" alt="http://www.w3.org/"></a></td>
-</tr>
-</table>
-</td>
-</tr>
-</table>
-<table width="100%" cellspacing="0" cellpadding="0" border="0">
-<tr width="100%">
-<td align="left" valign="top" width="120">
-<table width="120" cellspacing="0" cellpadding="0" border="0" bgcolor="#a0a0a0">
-<tr>
-<td valign="top" align="left"><img width="120" vspace="0" src="images/join.gif" hspace="0" height="14" border="0"><br>
-</td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="../../index.html">Main</a></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="../index.html">User Documentation</a></td>
-</tr>
-<tr>
-<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
-<span class="menutitle">Selectors</span></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="selectors.html">Overview</a></td>
-</tr>
-<tr>
-<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
-<span class="menutitle">Default</span></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="browser-selector.html">Browser Selector</a></td>
-</tr>
-<tr>
-<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
-<span class="menutitle">Core</span></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="host-selector.html">Host Selector</a></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="requestparameter-selector.html">Request Parameter Selector</a></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="requestattribute-selector.html">Request Attribute Selector</a></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><span class="menuselected">Parameter</span></td>
-</tr>
-<tr>
-<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
-<span class="menutitle">Optional</span></td>
-</tr>
-<tr>
-<td align="left" valign="top"><img width="120" vspace="0" src="images/close.gif" hspace="0" height="14" border="0"><br>
-</td>
-</tr>
-</table>
-</td><td>
-<table cellspacing="15" cellpadding="0" border="0">
-<tr>
-<td>
- 
- 
-  <font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Parameter Selector</font>
-<hr style="color: #0086b2" size="1">
-   
-   
-<blockquote>
-<ul>
-    
-<li>
-<font face="verdana, helvetica, sans serif">Name : ParameterSelector</font>
-</li>
-    
-<li>
-<font face="verdana, helvetica, sans serif">Class: org.apache.cocoon.selection.ParameterSelector</font>
-</li>
-    
-<li>
-<font face="verdana, helvetica, sans serif">Cacheable: not applicable</font>
-</li>
-   
-</ul>
-</blockquote>
-   
-   
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-    This Selector matches a string, in the Parameters object passed to the 
-    selector, against a specified Cocoon internal parameter.  It performs a 
-    case-sensitive string comparison between the value of the 
-    'parameter-selector-test' parameter and the value of the 'test' 
-    attribute of the <code><font face="courier, monospaced">&lt;map:when ...&gt;</font></code> element.
-   </font>
-</p>
-   
-   
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-   This internal parameter could be:
-   </font>
-</p>
-   
-<blockquote>
-<ul>
-    
-<li>
-<font face="verdana, helvetica, sans serif">A sitemap parameter from the <code><font face="courier, monospaced">&lt;map:match ...&gt;</font></code> portion of the pipeline</font>
-</li>
-    
-<li>
-<font face="verdana, helvetica, sans serif">A sitemap parameter set by an action</font>
-</li>
-   
-</ul>
-</blockquote>
-   
-   
-   
-   
-<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Reasons to use ParameterSelector</font>
-<hr style="color: #0086b2" size="1">
-   
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-   One purpose of this selector is to choose between different components 
-   of a pipeline based on sitemap parameters set by an action.  This would 
-   allow the action to control the logic required to set one or more parameters, 
-   which can then be used by this selector to control pipeline processing.  
-   Thus, complex decision-making logic can be contained in actions, while the 
-   sitemap simply uses the results of the actions (the parameters) to determine 
-   pipeline processing.
-   </font>
-</p>
-   
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-   Parameter Selector can also be used to select on the value of 'keys' 
-   (such as {1} or {../2} ) from the wildcard matcher.  Information in the 
-   URI, such as part of a filename, can then be used to determine pipeline 
-   processing.   
-   </font>
-</p>
-   
-   
-   
-<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Examples</font>
-<hr style="color: #0086b2" size="1">
-   
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-   Add the component to your sitemap.xmap:
-   </font>
-</p>
-   
-<div align="center">
-<table border="0" cellpadding="0" cellspacing="4">
-<tr>
-<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-<tr>
-<td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
-<pre>
-   &lt;map:components&gt;
-    ...
-    &lt;map:selectors&gt;
-     ...
-     &lt;map:selector
-	    name="parameter"
-      	logger="sitemap.selector.parameter"
-      	src="org.apache.cocoon.selection.ParameterSelector"/&gt;
-     ...</pre>
-</td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-<tr>
-<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-</table>
-</div>
-   
-   
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-   Use a parameter set by an action:
-   </font>
-</p>
-   
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-    Assume there is an action (named MyAction) that sets a parameter 
-    (named MyRegion) to several possible values.  For more information on actions, 
-    including a simple example of an action that creates a sitemap parameter, see
-    <a href="../concepts/actions.html">Creating and Using Actions</a>.
-   </font>
-</p>
-   
-<div align="center">
-<table border="0" cellpadding="0" cellspacing="4">
-<tr>
-<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-<tr>
-<td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
-<pre>
-   &lt;map:match pattern="*.xml"&gt;
-    &lt;map:act type="MyAction"&gt;
-      &lt;map:generate src="{../1}.xml"/&gt;
-
-      &lt;map:select type="parameter"&gt;
-        &lt;map:parameter name="parameter-selector-test" value="{MyRegion}"/&gt;
-      
-        &lt;!-- executes iff the value of MyRegion equals 
-             "United States" (without quotes) --&gt;
-        &lt;map:when test="United States"&gt;
-          &lt;map:transform src="stylesheets/us.xsl"/&gt;
-        &lt;/map:when&gt;
-      
-        &lt;map:when test="South_America"&gt;
-          &lt;map:transform src="stylesheets/southamerica.xsl"/&gt;
-        &lt;/map:when&gt;
-
-        &lt;map:when test="Europe"&gt;
-          &lt;map:transform src="stylesheets/europe.xsl"/&gt;
-        &lt;/map:when&gt;
-
-        &lt;map:otherwise&gt;
-          &lt;map:transform src="all_others.xsl"
-        &lt;/map:otherwise&gt;
-
-      &lt;/map:select&gt;
-    &lt;/map:act&gt;
-    &lt;map:serialize/&gt;
-  &lt;/map:match&gt;</pre>
-</td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-<tr>
-<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-</table>
-</div>
-   
-   
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-   Use values from the URI:
-   </font>
-</p>
-   
-<div align="center">
-<table border="0" cellpadding="0" cellspacing="4">
-<tr>
-<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-<tr>
-<td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
-<pre>
-   &lt;map:pipeline&gt;
-     &lt;!-- {1}/{2}/myfile.xml --&gt;
-     &lt;map:match pattern="**/*/myfile.xml"&gt; 
-   
-       &lt;!-- Use ParameterSelector --&gt;
-       &lt;map:select type="parameter"&gt;
-        &lt;map:parameter name="parameter-selector-test" value="{2}"/&gt;
-
-        &lt;!-- executes iff the value of {2} equals 
-             "basic" (without quotes); the requested URI
-              could be **/basic/myfile.xml --&gt;
-        &lt;map:when test="basic"&gt;
-            &lt;map:generate src="{1}/myfile.xml"/&gt;
-            &lt;map:transform src="stylesheets/basic.xsl"&gt;
-                &lt;map:parameter name="use-request-parameters" value="true"/&gt;
-                &lt;map:parameter name="resource" value="{2}.html"/&gt;
-            &lt;/map:transform&gt;
-            &lt;map:serialize/&gt;
-        &lt;/map:when&gt;
-
-        &lt;map:when test="aggregate"&gt;
-            &lt;map:aggregate element="site"&gt;
-        	&lt;map:part src="cocoon:/{1}/sidebar-{1}/{2}.xml"/&gt;
-        	&lt;map:part src="cocoon:/body-{1}/{2}.xsp"/&gt;
-            &lt;/map:aggregate&gt;
-            &lt;map:transform src="stylesheets/aggregate2xhtml.xsl"/&gt;
-            &lt;map:serialize/&gt;
-        &lt;/map:when&gt;
-
-        &lt;map:otherwise&gt;
-            &lt;map:redirect-to uri="other_URI"/&gt;
-        &lt;/map:otherwise&gt;
-
-      &lt;/map:select&gt;
-    &lt;/map:match&gt; 
-    ...</pre>
-</td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-<tr>
-<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-</table>
-</div>
-   
-   
- 
-
-</td>
-</tr>
-</table>
-</td>
-</tr>
-</table>
-<table width="100%" cellspacing="0" cellpadding="0" border="0">
-<tr>
-<td bgcolor="#0086b2"><img width="1" src="images/dot.gif" height="1"></td>
-</tr>
-<tr>
-<td align="center"><font size="-1" face="arial,helvetica,sanserif" color="#0086b2"><i>Copyright &copy; 1999-2002 The Apache Software Foundation. All Rights Reserved.</i></font></td>
-</tr>
-</table>
-</body>
-</html>
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Parameter Selector</title>
+<STYLE type="text/css">
+a.menu {
+	color: #FFFFFF;
+    text-align:left;               
+    font-size:12px;
+    font-family: Verdana, Arial, Helvetica, sans-serif;
+    font-weight:plain;
+    text-decoration:none;
+    padding-left: 14px
+}
+
+A.menu:hover {
+	color: #FFCC00
+}
+
+
+.menutitle {
+	color: #000000;
+    text-align:left;               
+    font-size:10px;
+    font-family: Verdana, Arial, Helvetica, sans-serif;
+    font-weight:bold;
+    padding-left: 8px
+}
+.menuselected {
+	color: #FFCC00;
+    text-align:left;               
+    font-size:12px;
+    font-family: Verdana, Arial, Helvetica, sans-serif;
+    font-weight:bold;
+    padding-left: 14px
+}
+</STYLE>
+</head>
+<body bgcolor="#ffffff" marginheight="4" marginwidth="4" leftmargin="4" topmargin="4" alink="#cc0000" vlink="#0086b2" link="#039acc" text="#000000">
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+<tr>
+<td align="left" valign="top" rowspan="3" height="60" width="135"><img border="0" vspace="0" hspace="0" src="images/logo.gif" height="60" width="135"></td><td background="images/line.gif" rowspan="1" colSpan="2" align="left" valign="top" height="0" width="100%"></td><td align="left" valign="top" rowspan="3" height="60" width="29"><img border="0" vspace="0" hspace="0" src="images/right.gif" height="60" width="29"></td>
+</tr>
+<tr>
+<td bgcolor="#0086b2" colspan="2" align="right" valign="top" height="35" width="100%"><font color="#ffffff" face="Verdana, Arial, Helvetica, sans-serif" size="5">Parameter Selector</font></td>
+</tr>
+<tr>
+<td background="images/bottom.gif" colspan="2" width="100%" valign="top" height="20" bgcolor="#0086b2" align="right">
+<table width="288" cellspacing="0" cellpadding="0" border="0">
+<tr>
+<td align="left" valign="top" height="20" width="96"><a target="new" href="http://xml.apache.org/"><img border="0" vspace="0" hspace="0" name="xml" src="images/button-xml-lo.gif" height="20" width="96" alt="http://xml.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.apache.org/"><img border="0" vspace="0" hspace="0" name="asf" src="images/button-asf-lo.gif" height="20" width="96" alt="http://www.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.w3.org/"><img border="0" vspace="0" hspace="0" name="w3c" src="images/button-w3c-lo.gif" height="20" width="96" alt="http://www.w3.org/"></a></td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+<table width="100%" cellspacing="0" cellpadding="0" border="0">
+<tr width="100%">
+<td align="left" valign="top" width="120">
+<table width="120" cellspacing="0" cellpadding="0" border="0" bgcolor="#a0a0a0">
+<tr>
+<td valign="top" align="left"><img width="120" vspace="0" src="images/join.gif" hspace="0" height="14" border="0"><br>
+</td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="../../index.html">Main</a></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="../index.html">User Documentation</a></td>
+</tr>
+<tr>
+<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
+<span class="menutitle">Selectors</span></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="selectors.html">Overview</a></td>
+</tr>
+<tr>
+<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
+<span class="menutitle">Default</span></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="browser-selector.html">Browser Selector</a></td>
+</tr>
+<tr>
+<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
+<span class="menutitle">Core</span></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="host-selector.html">Host Selector</a></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="requestparameter-selector.html">Request Parameter Selector</a></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="requestattribute-selector.html">Request Attribute Selector</a></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><span class="menuselected">Parameter</span></td>
+</tr>
+<tr>
+<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
+<span class="menutitle">Optional</span></td>
+</tr>
+<tr>
+<td align="left" valign="top"><img width="120" vspace="0" src="images/close.gif" hspace="0" height="14" border="0"><br>
+</td>
+</tr>
+</table>
+</td><td>
+<table cellspacing="15" cellpadding="0" border="0">
+<tr>
+<td>
+ 
+ 
+  <font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Parameter Selector</font>
+<hr style="color: #0086b2" size="1">
+   
+   
+<blockquote>
+<ul>
+    
+<li>
+<font face="verdana, helvetica, sans serif">Name : ParameterSelector</font>
+</li>
+    
+<li>
+<font face="verdana, helvetica, sans serif">Class: org.apache.cocoon.selection.ParameterSelector</font>
+</li>
+    
+<li>
+<font face="verdana, helvetica, sans serif">Cacheable: not applicable</font>
+</li>
+   
+</ul>
+</blockquote>
+   
+   
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+    This Selector matches a string, in the Parameters object passed to the 
+    selector, against a specified Cocoon internal parameter.  It performs a 
+    case-sensitive string comparison between the value of the 
+    'parameter-selector-test' parameter and the value of the 'test' 
+    attribute of the <code><font face="courier, monospaced">&lt;map:when ...&gt;</font></code> element.
+   </font>
+</p>
+   
+   
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+   This internal parameter could be:
+   </font>
+</p>
+   
+<blockquote>
+<ul>
+    
+<li>
+<font face="verdana, helvetica, sans serif">A sitemap parameter from the <code><font face="courier, monospaced">&lt;map:match ...&gt;</font></code> portion of the pipeline</font>
+</li>
+    
+<li>
+<font face="verdana, helvetica, sans serif">A sitemap parameter set by an action</font>
+</li>
+   
+</ul>
+</blockquote>
+   
+   
+   
+   
+<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Reasons to use ParameterSelector</font>
+<hr style="color: #0086b2" size="1">
+   
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+   One purpose of this selector is to choose between different components 
+   of a pipeline based on sitemap parameters set by an action.  This would 
+   allow the action to control the logic required to set one or more parameters, 
+   which can then be used by this selector to control pipeline processing.  
+   Thus, complex decision-making logic can be contained in actions, while the 
+   sitemap simply uses the results of the actions (the parameters) to determine 
+   pipeline processing.
+   </font>
+</p>
+   
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+   Parameter Selector can also be used to select on the value of 'keys' 
+   (such as {1} or {../2} ) from the wildcard matcher.  Information in the 
+   URI, such as part of a filename, can then be used to determine pipeline 
+   processing.   
+   </font>
+</p>
+   
+   
+   
+<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Examples</font>
+<hr style="color: #0086b2" size="1">
+   
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+   Add the component to your sitemap.xmap:
+   </font>
+</p>
+   
+<div align="center">
+<table border="0" cellpadding="0" cellspacing="4">
+<tr>
+<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+<tr>
+<td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
+<pre>
+   &lt;map:components&gt;
+    ...
+    &lt;map:selectors&gt;
+     ...
+     &lt;map:selector
+	    name="parameter"
+      	logger="sitemap.selector.parameter"
+      	src="org.apache.cocoon.selection.ParameterSelector"/&gt;
+     ...</pre>
+</td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+<tr>
+<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+</table>
+</div>
+   
+   
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+   Use a parameter set by an action:
+   </font>
+</p>
+   
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+    Assume there is an action (named MyAction) that sets a parameter 
+    (named MyRegion) to several possible values.  For more information on actions, 
+    including a simple example of an action that creates a sitemap parameter, see
+    <a href="../concepts/actions.html">Creating and Using Actions</a>.
+   </font>
+</p>
+   
+<div align="center">
+<table border="0" cellpadding="0" cellspacing="4">
+<tr>
+<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+<tr>
+<td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
+<pre>
+   &lt;map:match pattern="*.xml"&gt;
+    &lt;map:act type="MyAction"&gt;
+      &lt;map:generate src="{../1}.xml"/&gt;
+
+      &lt;map:select type="parameter"&gt;
+        &lt;map:parameter name="parameter-selector-test" value="{MyRegion}"/&gt;
+      
+        &lt;!-- executes iff the value of MyRegion equals 
+             "United States" (without quotes) --&gt;
+        &lt;map:when test="United States"&gt;
+          &lt;map:transform src="stylesheets/us.xsl"/&gt;
+        &lt;/map:when&gt;
+      
+        &lt;map:when test="South_America"&gt;
+          &lt;map:transform src="stylesheets/southamerica.xsl"/&gt;
+        &lt;/map:when&gt;
+
+        &lt;map:when test="Europe"&gt;
+          &lt;map:transform src="stylesheets/europe.xsl"/&gt;
+        &lt;/map:when&gt;
+
+        &lt;map:otherwise&gt;
+          &lt;map:transform src="all_others.xsl"
+        &lt;/map:otherwise&gt;
+
+      &lt;/map:select&gt;
+    &lt;/map:act&gt;
+    &lt;map:serialize/&gt;
+  &lt;/map:match&gt;</pre>
+</td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+<tr>
+<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+</table>
+</div>
+   
+   
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+   Use values from the URI:
+   </font>
+</p>
+   
+<div align="center">
+<table border="0" cellpadding="0" cellspacing="4">
+<tr>
+<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+<tr>
+<td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
+<pre>
+   &lt;map:pipeline&gt;
+     &lt;!-- {1}/{2}/myfile.xml --&gt;
+     &lt;map:match pattern="**/*/myfile.xml"&gt; 
+   
+       &lt;!-- Use ParameterSelector --&gt;
+       &lt;map:select type="parameter"&gt;
+        &lt;map:parameter name="parameter-selector-test" value="{2}"/&gt;
+
+        &lt;!-- executes iff the value of {2} equals 
+             "basic" (without quotes); the requested URI
+              could be **/basic/myfile.xml --&gt;
+        &lt;map:when test="basic"&gt;
+            &lt;map:generate src="{1}/myfile.xml"/&gt;
+            &lt;map:transform src="stylesheets/basic.xsl"&gt;
+                &lt;map:parameter name="use-request-parameters" value="true"/&gt;
+                &lt;map:parameter name="resource" value="{2}.html"/&gt;
+            &lt;/map:transform&gt;
+            &lt;map:serialize/&gt;
+        &lt;/map:when&gt;
+
+        &lt;map:when test="aggregate"&gt;
+            &lt;map:aggregate element="site"&gt;
+        	&lt;map:part src="cocoon:/{1}/sidebar-{1}/{2}.xml"/&gt;
+        	&lt;map:part src="cocoon:/body-{1}/{2}.xsp"/&gt;
+            &lt;/map:aggregate&gt;
+            &lt;map:transform src="stylesheets/aggregate2xhtml.xsl"/&gt;
+            &lt;map:serialize/&gt;
+        &lt;/map:when&gt;
+
+        &lt;map:otherwise&gt;
+            &lt;map:redirect-to uri="other_URI"/&gt;
+        &lt;/map:otherwise&gt;
+
+      &lt;/map:select&gt;
+    &lt;/map:match&gt; 
+    ...</pre>
+</td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+<tr>
+<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+</table>
+</div>
+   
+   
+ 
+
+</td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+<table width="100%" cellspacing="0" cellpadding="0" border="0">
+<tr>
+<td bgcolor="#0086b2"><img width="1" src="images/dot.gif" height="1"></td>
+</tr>
+<tr>
+<td align="center"><font size="-1" face="arial,helvetica,sanserif" color="#0086b2"><i>Copyright &copy; 1999-2002 The Apache Software Foundation. All Rights Reserved.</i></font></td>
+</tr>
+</table>
+</body>
+</html>

Modified: cocoon/site/site/2.0/userdocs/selectors/requestattribute-selector.html
URL: http://svn.apache.org/viewvc/cocoon/site/site/2.0/userdocs/selectors/requestattribute-selector.html?rev=573901&r1=573900&r2=573901&view=diff
==============================================================================
--- cocoon/site/site/2.0/userdocs/selectors/requestattribute-selector.html (original)
+++ cocoon/site/site/2.0/userdocs/selectors/requestattribute-selector.html Sat Sep  8 13:17:41 2007
@@ -1,389 +1,389 @@
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>RequestAttribute-Selector in Cocoon</title>
-<STYLE type="text/css">
-a.menu {
-	color: #FFFFFF;
-    text-align:left;               
-    font-size:12px;
-    font-family: Verdana, Arial, Helvetica, sans-serif;
-    font-weight:plain;
-    text-decoration:none;
-    padding-left: 14px
-}
-
-A.menu:hover {
-	color: #FFCC00
-}
-
-
-.menutitle {
-	color: #000000;
-    text-align:left;               
-    font-size:10px;
-    font-family: Verdana, Arial, Helvetica, sans-serif;
-    font-weight:bold;
-    padding-left: 8px
-}
-.menuselected {
-	color: #FFCC00;
-    text-align:left;               
-    font-size:12px;
-    font-family: Verdana, Arial, Helvetica, sans-serif;
-    font-weight:bold;
-    padding-left: 14px
-}
-</STYLE>
-</head>
-<body bgcolor="#ffffff" marginheight="4" marginwidth="4" leftmargin="4" topmargin="4" alink="#cc0000" vlink="#0086b2" link="#039acc" text="#000000">
-<table border="0" cellpadding="0" cellspacing="0" width="100%">
-<tr>
-<td align="left" valign="top" rowspan="3" height="60" width="135"><img border="0" vspace="0" hspace="0" src="images/logo.gif" height="60" width="135"></td><td background="images/line.gif" rowspan="1" colSpan="2" align="left" valign="top" height="0" width="100%"></td><td align="left" valign="top" rowspan="3" height="60" width="29"><img border="0" vspace="0" hspace="0" src="images/right.gif" height="60" width="29"></td>
-</tr>
-<tr>
-<td bgcolor="#0086b2" colspan="2" align="right" valign="top" height="35" width="100%"><font color="#ffffff" face="Verdana, Arial, Helvetica, sans-serif" size="5">RequestAttribute-Selector in Cocoon</font></td>
-</tr>
-<tr>
-<td background="images/bottom.gif" colspan="2" width="100%" valign="top" height="20" bgcolor="#0086b2" align="right">
-<table width="288" cellspacing="0" cellpadding="0" border="0">
-<tr>
-<td align="left" valign="top" height="20" width="96"><a target="new" href="http://xml.apache.org/"><img border="0" vspace="0" hspace="0" name="xml" src="images/button-xml-lo.gif" height="20" width="96" alt="http://xml.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.apache.org/"><img border="0" vspace="0" hspace="0" name="asf" src="images/button-asf-lo.gif" height="20" width="96" alt="http://www.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.w3.org/"><img border="0" vspace="0" hspace="0" name="w3c" src="images/button-w3c-lo.gif" height="20" width="96" alt="http://www.w3.org/"></a></td>
-</tr>
-</table>
-</td>
-</tr>
-</table>
-<table width="100%" cellspacing="0" cellpadding="0" border="0">
-<tr width="100%">
-<td align="left" valign="top" width="120">
-<table width="120" cellspacing="0" cellpadding="0" border="0" bgcolor="#a0a0a0">
-<tr>
-<td valign="top" align="left"><img width="120" vspace="0" src="images/join.gif" hspace="0" height="14" border="0"><br>
-</td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="../../index.html">Main</a></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="../index.html">User Documentation</a></td>
-</tr>
-<tr>
-<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
-<span class="menutitle">Selectors</span></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="selectors.html">Overview</a></td>
-</tr>
-<tr>
-<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
-<span class="menutitle">Default</span></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="browser-selector.html">Browser Selector</a></td>
-</tr>
-<tr>
-<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
-<span class="menutitle">Core</span></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="host-selector.html">Host Selector</a></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="requestparameter-selector.html">Request Parameter Selector</a></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><span class="menuselected">Request Attribute Selector</span></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="parameter-selector.html">Parameter</a></td>
-</tr>
-<tr>
-<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
-<span class="menutitle">Optional</span></td>
-</tr>
-<tr>
-<td align="left" valign="top"><img width="120" vspace="0" src="images/close.gif" hspace="0" height="14" border="0"><br>
-</td>
-</tr>
-</table>
-</td><td>
-<table cellspacing="15" cellpadding="0" border="0">
-<tr>
-<td>
-  
-  
-    <font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">RequestAttributeSelector</font>
-<hr style="color: #0086b2" size="1">
-      
-<table cellpadding="2" cellspacing="2" border="0" width="100%">
-<caption>
-<font face="verdana,helvetica,sanserif"></font>
-</caption>
-        
-<tr>
-          
-<td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">NAME</font></td><td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">host</font></td>
-        
-</tr>
-        
-<tr>
-          
-<td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">WHAT</font></td><td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">The <code><font face="courier, monospaced">RequestAttributeSelector</font></code> component is used to
-            select appropriate sitemap processing depending on a request attribute
-            value.
-          </font></td>
-        
-</tr>
-        
-<tr>
-          
-<td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">TYPE</font></td><td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">Selector, Sitemap Component</font></td>
-        
-</tr>
-        
-<tr>
-          
-          
-<td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">BLOCK</font></td><td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">Core</font></td>
-        
-</tr>
-        
-<tr>
-          
-<td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">CLASS</font></td><td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">org.apache.cocoon.selection.RequestAttributeSelector</font></td>
-        
-</tr>
-        
-        
-        
-<tr>
-          
-<td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">SINCE</font></td><td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">Cocoon 2.0</font></td>
-        
-</tr>
-        
-<tr>
-          
-<td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">CACHEABLE</font></td><td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">not applicable</font></td>
-        
-</tr>
-      
-</table>
-    
-    
-<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Description</font>
-<hr style="color: #0086b2" size="1">
-      
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-        The <code><font face="courier, monospaced">RequestAttributeSelector</font></code> tests the value of request attribute
-        against the test attribute of the selector's when clause.
-      </font>
-</p>
-    
-    
-<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Usage</font>
-<hr style="color: #0086b2" size="1">
-      
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-        The <code><font face="courier, monospaced">RequestAttributeSelector</font></code> allows to control the 
-        sitemap processing depending on a request attribute.
-      </font>
-</p>
-      
-<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Sitemap pipeline examples</b></font>
-        
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-          The snippet below uses a <code><font face="courier, monospaced">RequestAttributeSelector</font></code> named <code><font face="courier, monospaced">request-attribute</font></code>.
-          It tests the value of request attribute named <code><font face="courier, monospaced">command</font></code> against
-          <code><font face="courier, monospaced">list</font></code>, <code><font face="courier, monospaced">create</font></code>; finally it has a <code><font face="courier, monospaced">otherwise</font></code> clause.
-        </font>
-</p>
-        
-<div align="center">
-<table border="0" cellpadding="0" cellspacing="4">
-<tr>
-<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-<tr>
-<td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
-<pre>
-&lt;map:select type="request-attribute"&gt;
-  &lt;map:parameter name="attribute-name" value="command"/&gt;
-  &lt;map:when test="list"&gt;
-  ....
-  &lt;/map:when&gt;
-  &lt;map:when test="create"&gt;
-  ...
-  &lt;/map:when&gt;
-  ...
-  &lt;map:otherwise&gt;
-  ...
-  &lt;/map:otherwise&gt;
-&lt;/map:select&gt;
-        </pre>
-</td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-<tr>
-<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-</table>
-</div>
-      
-      
-      
-<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Sitemap component configuration example</b></font>
-        
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-          The snippet below declares a <code><font face="courier, monospaced">RequestAttributeSelector</font></code>
-          defining to use the request attribute <code><font face="courier, monospaced">cmd</font></code>.
-        </font>
-</p>
-        
-<div align="center">
-<table border="0" cellpadding="0" cellspacing="4">
-<tr>
-<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-<tr>
-<td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
-<pre>
-&lt;map:selectors...
-  &lt;map:selector name="request-attribute" 
-    src="org.apache.cocoon.selection.RequestAttributeSelector"
-    logger="sitemap.selector.requestattribute"&gt;
-    
-    &lt;attribute-name&gt;command&lt;/attribute-name&gt;
-  &lt;/map:selectors&gt;
-...
-</pre>
-</td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-<tr>
-<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-</table>
-</div>
-      
-      
-<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Configuration</b></font>
-        
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-          
-          The configuration section of <code><font face="courier, monospaced">RequestAttributeSelector</font></code> specifies
-          the default name of the request attribute, used for testing.
-        </font>
-</p>
-      
-      
-<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Setup</b></font>
-        
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-          
-          Setting up a <code><font face="courier, monospaced">RequestAttributeSelector</font></code> includes
-        </font>
-</p>
-        
-<blockquote>
-<ul>
-          
-<li>
-<font face="verdana, helvetica, sans serif">Defining an optional sitemap paramter named <code><font face="courier, monospaced">request-name</font></code>, it overrides
-            the attribute-name setting in the configuration section.
-          </font>
-</li>
-          
-<li>
-<font face="verdana, helvetica, sans serif">choosing the <code><font face="courier, monospaced">&lt;map:when&gt;</font></code> test expressions, and a 
-          optional <code><font face="courier, monospaced">&lt;map:otherwise&gt;</font></code> clause.
-          </font>
-</li>
-        
-</ul>
-</blockquote>
-        
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-          The test attribute of the <code><font face="courier, monospaced">&lt;map:when&gt;</font></code> clause shall match
-          the value of the request attribute.
-          If no test value matches, or the request attribute is not defined at all,
-          the <code><font face="courier, monospaced">&lt;map:otherwise</font></code> clause is selected.
-        </font>
-</p>
-      
-      
-<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Effect on Object Model and Sitemap Parameters</b></font>
-        
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-          The <code><font face="courier, monospaced">RequestAttributeSelector</font></code> has no side effects on the object model, or 
-          any sitemap attributes. 
-        </font>
-</p>
-      
-    
-    
-<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Bugs/Caveats</font>
-<hr style="color: #0086b2" size="1">
-      
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-      </font>
-</p>
-    
-    
-<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">History</font>
-<hr style="color: #0086b2" size="1">
-      
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-        28-12-02: initial creation
-      </font>
-</p>
-    
-    
-<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Copyright</font>
-<hr style="color: #0086b2" size="1">
-      
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-        Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-      </font>
-</p>
-    
-    
-<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">See also</font>
-<hr style="color: #0086b2" size="1">
-      
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-        
-        A general documentation about selectors is available at
-        <a href="../concepts/matchers_selectors.html">Matchers and Selectors</a>.
-      </font>
-</p>
-    
-  
-
-</td>
-</tr>
-</table>
-</td>
-</tr>
-</table>
-<table width="100%" cellspacing="0" cellpadding="0" border="0">
-<tr>
-<td bgcolor="#0086b2"><img width="1" src="images/dot.gif" height="1"></td>
-</tr>
-<tr>
-<td align="center"><font size="-1" face="arial,helvetica,sanserif" color="#0086b2"><i>Copyright &copy; 1999-2002 The Apache Software Foundation. All Rights Reserved.</i></font></td>
-</tr>
-</table>
-</body>
-</html>
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>RequestAttribute-Selector in Cocoon</title>
+<STYLE type="text/css">
+a.menu {
+	color: #FFFFFF;
+    text-align:left;               
+    font-size:12px;
+    font-family: Verdana, Arial, Helvetica, sans-serif;
+    font-weight:plain;
+    text-decoration:none;
+    padding-left: 14px
+}
+
+A.menu:hover {
+	color: #FFCC00
+}
+
+
+.menutitle {
+	color: #000000;
+    text-align:left;               
+    font-size:10px;
+    font-family: Verdana, Arial, Helvetica, sans-serif;
+    font-weight:bold;
+    padding-left: 8px
+}
+.menuselected {
+	color: #FFCC00;
+    text-align:left;               
+    font-size:12px;
+    font-family: Verdana, Arial, Helvetica, sans-serif;
+    font-weight:bold;
+    padding-left: 14px
+}
+</STYLE>
+</head>
+<body bgcolor="#ffffff" marginheight="4" marginwidth="4" leftmargin="4" topmargin="4" alink="#cc0000" vlink="#0086b2" link="#039acc" text="#000000">
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+<tr>
+<td align="left" valign="top" rowspan="3" height="60" width="135"><img border="0" vspace="0" hspace="0" src="images/logo.gif" height="60" width="135"></td><td background="images/line.gif" rowspan="1" colSpan="2" align="left" valign="top" height="0" width="100%"></td><td align="left" valign="top" rowspan="3" height="60" width="29"><img border="0" vspace="0" hspace="0" src="images/right.gif" height="60" width="29"></td>
+</tr>
+<tr>
+<td bgcolor="#0086b2" colspan="2" align="right" valign="top" height="35" width="100%"><font color="#ffffff" face="Verdana, Arial, Helvetica, sans-serif" size="5">RequestAttribute-Selector in Cocoon</font></td>
+</tr>
+<tr>
+<td background="images/bottom.gif" colspan="2" width="100%" valign="top" height="20" bgcolor="#0086b2" align="right">
+<table width="288" cellspacing="0" cellpadding="0" border="0">
+<tr>
+<td align="left" valign="top" height="20" width="96"><a target="new" href="http://xml.apache.org/"><img border="0" vspace="0" hspace="0" name="xml" src="images/button-xml-lo.gif" height="20" width="96" alt="http://xml.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.apache.org/"><img border="0" vspace="0" hspace="0" name="asf" src="images/button-asf-lo.gif" height="20" width="96" alt="http://www.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.w3.org/"><img border="0" vspace="0" hspace="0" name="w3c" src="images/button-w3c-lo.gif" height="20" width="96" alt="http://www.w3.org/"></a></td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+<table width="100%" cellspacing="0" cellpadding="0" border="0">
+<tr width="100%">
+<td align="left" valign="top" width="120">
+<table width="120" cellspacing="0" cellpadding="0" border="0" bgcolor="#a0a0a0">
+<tr>
+<td valign="top" align="left"><img width="120" vspace="0" src="images/join.gif" hspace="0" height="14" border="0"><br>
+</td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="../../index.html">Main</a></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="../index.html">User Documentation</a></td>
+</tr>
+<tr>
+<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
+<span class="menutitle">Selectors</span></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="selectors.html">Overview</a></td>
+</tr>
+<tr>
+<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
+<span class="menutitle">Default</span></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="browser-selector.html">Browser Selector</a></td>
+</tr>
+<tr>
+<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
+<span class="menutitle">Core</span></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="host-selector.html">Host Selector</a></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="requestparameter-selector.html">Request Parameter Selector</a></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><span class="menuselected">Request Attribute Selector</span></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="parameter-selector.html">Parameter</a></td>
+</tr>
+<tr>
+<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
+<span class="menutitle">Optional</span></td>
+</tr>
+<tr>
+<td align="left" valign="top"><img width="120" vspace="0" src="images/close.gif" hspace="0" height="14" border="0"><br>
+</td>
+</tr>
+</table>
+</td><td>
+<table cellspacing="15" cellpadding="0" border="0">
+<tr>
+<td>
+  
+  
+    <font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">RequestAttributeSelector</font>
+<hr style="color: #0086b2" size="1">
+      
+<table cellpadding="2" cellspacing="2" border="0" width="100%">
+<caption>
+<font face="verdana,helvetica,sanserif"></font>
+</caption>
+        
+<tr>
+          
+<td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">NAME</font></td><td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">host</font></td>
+        
+</tr>
+        
+<tr>
+          
+<td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">WHAT</font></td><td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">The <code><font face="courier, monospaced">RequestAttributeSelector</font></code> component is used to
+            select appropriate sitemap processing depending on a request attribute
+            value.
+          </font></td>
+        
+</tr>
+        
+<tr>
+          
+<td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">TYPE</font></td><td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">Selector, Sitemap Component</font></td>
+        
+</tr>
+        
+<tr>
+          
+          
+<td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">BLOCK</font></td><td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">Core</font></td>
+        
+</tr>
+        
+<tr>
+          
+<td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">CLASS</font></td><td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">org.apache.cocoon.selection.RequestAttributeSelector</font></td>
+        
+</tr>
+        
+        
+        
+<tr>
+          
+<td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">SINCE</font></td><td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">Cocoon 2.0</font></td>
+        
+</tr>
+        
+<tr>
+          
+<td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">CACHEABLE</font></td><td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">not applicable</font></td>
+        
+</tr>
+      
+</table>
+    
+    
+<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Description</font>
+<hr style="color: #0086b2" size="1">
+      
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+        The <code><font face="courier, monospaced">RequestAttributeSelector</font></code> tests the value of request attribute
+        against the test attribute of the selector's when clause.
+      </font>
+</p>
+    
+    
+<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Usage</font>
+<hr style="color: #0086b2" size="1">
+      
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+        The <code><font face="courier, monospaced">RequestAttributeSelector</font></code> allows to control the 
+        sitemap processing depending on a request attribute.
+      </font>
+</p>
+      
+<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Sitemap pipeline examples</b></font>
+        
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+          The snippet below uses a <code><font face="courier, monospaced">RequestAttributeSelector</font></code> named <code><font face="courier, monospaced">request-attribute</font></code>.
+          It tests the value of request attribute named <code><font face="courier, monospaced">command</font></code> against
+          <code><font face="courier, monospaced">list</font></code>, <code><font face="courier, monospaced">create</font></code>; finally it has a <code><font face="courier, monospaced">otherwise</font></code> clause.
+        </font>
+</p>
+        
+<div align="center">
+<table border="0" cellpadding="0" cellspacing="4">
+<tr>
+<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+<tr>
+<td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
+<pre>
+&lt;map:select type="request-attribute"&gt;
+  &lt;map:parameter name="attribute-name" value="command"/&gt;
+  &lt;map:when test="list"&gt;
+  ....
+  &lt;/map:when&gt;
+  &lt;map:when test="create"&gt;
+  ...
+  &lt;/map:when&gt;
+  ...
+  &lt;map:otherwise&gt;
+  ...
+  &lt;/map:otherwise&gt;
+&lt;/map:select&gt;
+        </pre>
+</td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+<tr>
+<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+</table>
+</div>
+      
+      
+      
+<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Sitemap component configuration example</b></font>
+        
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+          The snippet below declares a <code><font face="courier, monospaced">RequestAttributeSelector</font></code>
+          defining to use the request attribute <code><font face="courier, monospaced">cmd</font></code>.
+        </font>
+</p>
+        
+<div align="center">
+<table border="0" cellpadding="0" cellspacing="4">
+<tr>
+<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+<tr>
+<td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
+<pre>
+&lt;map:selectors...
+  &lt;map:selector name="request-attribute" 
+    src="org.apache.cocoon.selection.RequestAttributeSelector"
+    logger="sitemap.selector.requestattribute"&gt;
+    
+    &lt;attribute-name&gt;command&lt;/attribute-name&gt;
+  &lt;/map:selectors&gt;
+...
+</pre>
+</td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+<tr>
+<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+</table>
+</div>
+      
+      
+<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Configuration</b></font>
+        
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+          
+          The configuration section of <code><font face="courier, monospaced">RequestAttributeSelector</font></code> specifies
+          the default name of the request attribute, used for testing.
+        </font>
+</p>
+      
+      
+<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Setup</b></font>
+        
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+          
+          Setting up a <code><font face="courier, monospaced">RequestAttributeSelector</font></code> includes
+        </font>
+</p>
+        
+<blockquote>
+<ul>
+          
+<li>
+<font face="verdana, helvetica, sans serif">Defining an optional sitemap paramter named <code><font face="courier, monospaced">request-name</font></code>, it overrides
+            the attribute-name setting in the configuration section.
+          </font>
+</li>
+          
+<li>
+<font face="verdana, helvetica, sans serif">choosing the <code><font face="courier, monospaced">&lt;map:when&gt;</font></code> test expressions, and a 
+          optional <code><font face="courier, monospaced">&lt;map:otherwise&gt;</font></code> clause.
+          </font>
+</li>
+        
+</ul>
+</blockquote>
+        
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+          The test attribute of the <code><font face="courier, monospaced">&lt;map:when&gt;</font></code> clause shall match
+          the value of the request attribute.
+          If no test value matches, or the request attribute is not defined at all,
+          the <code><font face="courier, monospaced">&lt;map:otherwise</font></code> clause is selected.
+        </font>
+</p>
+      
+      
+<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Effect on Object Model and Sitemap Parameters</b></font>
+        
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+          The <code><font face="courier, monospaced">RequestAttributeSelector</font></code> has no side effects on the object model, or 
+          any sitemap attributes. 
+        </font>
+</p>
+      
+    
+    
+<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Bugs/Caveats</font>
+<hr style="color: #0086b2" size="1">
+      
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+      </font>
+</p>
+    
+    
+<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">History</font>
+<hr style="color: #0086b2" size="1">
+      
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+        28-12-02: initial creation
+      </font>
+</p>
+    
+    
+<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Copyright</font>
+<hr style="color: #0086b2" size="1">
+      
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+        Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+      </font>
+</p>
+    
+    
+<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">See also</font>
+<hr style="color: #0086b2" size="1">
+      
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+        
+        A general documentation about selectors is available at
+        <a href="../concepts/matchers_selectors.html">Matchers and Selectors</a>.
+      </font>
+</p>
+    
+  
+
+</td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+<table width="100%" cellspacing="0" cellpadding="0" border="0">
+<tr>
+<td bgcolor="#0086b2"><img width="1" src="images/dot.gif" height="1"></td>
+</tr>
+<tr>
+<td align="center"><font size="-1" face="arial,helvetica,sanserif" color="#0086b2"><i>Copyright &copy; 1999-2002 The Apache Software Foundation. All Rights Reserved.</i></font></td>
+</tr>
+</table>
+</body>
+</html>