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 [29/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/requestparameter-selector.html
URL: http://svn.apache.org/viewvc/cocoon/site/site/2.0/userdocs/selectors/requestparameter-selector.html?rev=573901&r1=573900&r2=573901&view=diff
==============================================================================
--- cocoon/site/site/2.0/userdocs/selectors/requestparameter-selector.html (original)
+++ cocoon/site/site/2.0/userdocs/selectors/requestparameter-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>RequestParameter-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">RequestParameter-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"><span class="menuselected">Request Parameter Selector</span></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"><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">RequestParameterSelector</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">RequestParameterSelector</font></code> component is used to
- select appropriate sitemap processing depending on a request parameter
- 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.RequestParameterSelector</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">RequestParameterSelector</font></code> tests the value of request parameter
- 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">RequestParameterSelector</font></code> allows to control the
- sitemap processing depending on a request parameter.
- </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">RequestParameterSelector</font></code> named <code><font face="courier, monospaced">request-parameter</font></code>.
- It tests the value of request parameter 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>
-<map:select type="request-parameter">
- <map:parameter name="parameter-name" value="command"/>
- <map:when test="list">
- ....
- </map:when>
- <map:when test="create">
- ...
- </map:when>
- ...
- <map:otherwise>
- ...
- </map:otherwise>
-</map:select>
- </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">RequestParameterSelector</font></code>
- defining to use the request parameter <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>
-<map:selectors...
- <map:selector name="request-parameter"
- src="org.apache.cocoon.selection.RequestParameterSelector"
- logger="sitemap.selector.requestparameter">
-
- <parameter-name>command</parameter-name>
- </map:selectors>
-...
-</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">RequestParameterSelector</font></code> specifies
- the default name of the request parameter, 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">RequestParameterSelector</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 parameter-name setting in the configuration section.
- </font>
-</li>
-
-<li>
-<font face="verdana, helvetica, sans serif">choosing the <code><font face="courier, monospaced"><map:when></font></code> test expressions, and a
- optional <code><font face="courier, monospaced"><map:otherwise></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"><map:when></font></code> clause shall match
- the value of the request parameter.
- If no test value matches, or the request parameter is not defined at all,
- the <code><font face="courier, monospaced"><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">RequestParameterSelector</font></code> has no side effects on the object model, or
- any sitemap parameters.
- </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 © 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>RequestParameter-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">RequestParameter-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"><span class="menuselected">Request Parameter Selector</span></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"><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">RequestParameterSelector</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">RequestParameterSelector</font></code> component is used to
+ select appropriate sitemap processing depending on a request parameter
+ 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.RequestParameterSelector</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">RequestParameterSelector</font></code> tests the value of request parameter
+ 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">RequestParameterSelector</font></code> allows to control the
+ sitemap processing depending on a request parameter.
+ </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">RequestParameterSelector</font></code> named <code><font face="courier, monospaced">request-parameter</font></code>.
+ It tests the value of request parameter 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>
+<map:select type="request-parameter">
+ <map:parameter name="parameter-name" value="command"/>
+ <map:when test="list">
+ ....
+ </map:when>
+ <map:when test="create">
+ ...
+ </map:when>
+ ...
+ <map:otherwise>
+ ...
+ </map:otherwise>
+</map:select>
+ </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">RequestParameterSelector</font></code>
+ defining to use the request parameter <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>
+<map:selectors...
+ <map:selector name="request-parameter"
+ src="org.apache.cocoon.selection.RequestParameterSelector"
+ logger="sitemap.selector.requestparameter">
+
+ <parameter-name>command</parameter-name>
+ </map:selectors>
+...
+</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">RequestParameterSelector</font></code> specifies
+ the default name of the request parameter, 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">RequestParameterSelector</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 parameter-name setting in the configuration section.
+ </font>
+</li>
+
+<li>
+<font face="verdana, helvetica, sans serif">choosing the <code><font face="courier, monospaced"><map:when></font></code> test expressions, and a
+ optional <code><font face="courier, monospaced"><map:otherwise></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"><map:when></font></code> clause shall match
+ the value of the request parameter.
+ If no test value matches, or the request parameter is not defined at all,
+ the <code><font face="courier, monospaced"><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">RequestParameterSelector</font></code> has no side effects on the object model, or
+ any sitemap parameters.
+ </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 © 1999-2002 The Apache Software Foundation. All Rights Reserved.</i></font></td>
+</tr>
+</table>
+</body>
+</html>
Modified: cocoon/site/site/2.0/userdocs/selectors/selectors.html
URL: http://svn.apache.org/viewvc/cocoon/site/site/2.0/userdocs/selectors/selectors.html?rev=573901&r1=573900&r2=573901&view=diff
==============================================================================
--- cocoon/site/site/2.0/userdocs/selectors/selectors.html (original)
+++ cocoon/site/site/2.0/userdocs/selectors/selectors.html Sat Sep 8 13:17:41 2007
@@ -1,286 +1,286 @@
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>Selectors</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">Selectors</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"><span class="menuselected">Overview</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">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"><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">Goal</font>
-<hr style="color: #0086b2" size="1">
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
- This document lists all of the available selectors of Apache Cocoon and
- describes their purpose.
- You may also wish to read
- <a href="../concepts/matchers_selectors.html">Using and Implementing
- Matchers and Selectors</a>.
- </font>
-</p>
-
-
-<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Overview</font>
-<hr style="color: #0086b2" size="1">
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
- Selectors in Apache Cocoon have a role similar to matchers
- with additional flexibility. If you haven't learned about
- matchers yet, read about them <a href="../matchers/matchers.html">here</a>
- before continuing. Selectors are designed to evaluate a
- generally simple boolean expression regarding some
- part of the environment (request URI, headers, or cookies, for example).
- The result of this evaluation determines which pipeline fragments
- should be combined within a given pipeline. Unlike matchers,
- selectors can be active decision-driving components.
- For example, a matcher makes only simple
- "yes/no" decisions. If a match is successful, a
- pipeline is executed. If not, it is ignored.
- Selectors go further by allowing more complex, multiple-choice
- use cases. In short, consider matchers to be simple "if"
- statements. By extension, consider selectors to have all
- the power of an "if-else if-else" or "switch-case" constructs.
- The selector syntax should be familiar to anyone who
- uses XSLT's <code><font face="courier, monospaced"><xsl:test></font></code> statement.
- </font>
-</p>
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
- As an example, consider the typical scenario in which a page should
- be rendered differently based on the client browser.
- Given the large number and diversity of available browsers,
- it would be awkward and counterintuitive to address this need
- with a set of matchers. The BrowserSelector tests a given parameter
- against the user-agent request header. Using this single selector,
- we can deploy a consistent and readable setup.
- </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>
-
-<map:match pattern="docs/*.html">
- <map:generate src="xdocs/{1}.xml"/>
-
- <map:select type="browser">
- <map:when test="netscape">
- <map:transform src="stylesheets/netscape.xsl" />
- </map:when>
- <map:when test="explorer">
- <map:transform src="stylesheets/ie.xsl" />
- </map:when>
- <map:when test="lynx">
- <map:transform src="stylesheets/text-based.xsl" />
- </map:when>
- <map:otherwise>
- <map:transform src="stylesheets/html.xsl" />
- </map:otherwise>
- </map:select>
-
- <map:serialize/>
-</map:match>
-
-</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="+2" color="#0086b2">The Selectors in Cocoon</font>
-<hr style="color: #0086b2" size="1">
-
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
- Available Selectors in Cocoon include the following:
- </font>
-</p>
-
-<blockquote>
-<ul>
-
-<li>
-<font face="verdana, helvetica, sans serif"><b>BrowserSelector</b>: matches the value of the "test"
- parameter against the HTTP User-Agent header, allowing it to
- recognize the browser issuing the request;</font>
-</li>
-
-
-<li>
-<font face="verdana, helvetica, sans serif"><b>CodeSelector</b>: matches a snippet of Java code
- given as the "test" parameter against the environment;</font>
-</li>
-
-
-<li>
-<font face="verdana, helvetica, sans serif"><b>HostSelector</b>: matches the "test" parameter value
- against the Host request header</font>
-</li>
-
-
-<li>
-<font face="verdana, helvetica, sans serif"><a href="parameter-selector.html">ParameterSelector</a>: matches the string specified
- in the "test" parameter against a specified Cocoon internal
- (e.g. sitemap) parameter;</font>
-</li>
-
-
-<li>
-<font face="verdana, helvetica, sans serif"><b>HeaderSelector</b>: same as the Parameter selector,
- but matches against the request headers;</font>
-</li>
-
-
-<li>
-<font face="verdana, helvetica, sans serif"><b>RequestSelector</b>: again, same as the Parameter selector,
- but matches against the Request parameters;</font>
-</li>
-
-
-<li>
-<font face="verdana, helvetica, sans serif"><b>SessionSelector</b>: finally, this selector is used as
- the Parameter selector to match against an arbitrary session
- attribute;</font>
-</li>
-
-
-</ul>
-</blockquote>
-
-
-
-</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 © 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>Selectors</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">Selectors</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"><span class="menuselected">Overview</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">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"><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">Goal</font>
+<hr style="color: #0086b2" size="1">
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+ This document lists all of the available selectors of Apache Cocoon and
+ describes their purpose.
+ You may also wish to read
+ <a href="../concepts/matchers_selectors.html">Using and Implementing
+ Matchers and Selectors</a>.
+ </font>
+</p>
+
+
+<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Overview</font>
+<hr style="color: #0086b2" size="1">
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+ Selectors in Apache Cocoon have a role similar to matchers
+ with additional flexibility. If you haven't learned about
+ matchers yet, read about them <a href="../matchers/matchers.html">here</a>
+ before continuing. Selectors are designed to evaluate a
+ generally simple boolean expression regarding some
+ part of the environment (request URI, headers, or cookies, for example).
+ The result of this evaluation determines which pipeline fragments
+ should be combined within a given pipeline. Unlike matchers,
+ selectors can be active decision-driving components.
+ For example, a matcher makes only simple
+ "yes/no" decisions. If a match is successful, a
+ pipeline is executed. If not, it is ignored.
+ Selectors go further by allowing more complex, multiple-choice
+ use cases. In short, consider matchers to be simple "if"
+ statements. By extension, consider selectors to have all
+ the power of an "if-else if-else" or "switch-case" constructs.
+ The selector syntax should be familiar to anyone who
+ uses XSLT's <code><font face="courier, monospaced"><xsl:test></font></code> statement.
+ </font>
+</p>
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+ As an example, consider the typical scenario in which a page should
+ be rendered differently based on the client browser.
+ Given the large number and diversity of available browsers,
+ it would be awkward and counterintuitive to address this need
+ with a set of matchers. The BrowserSelector tests a given parameter
+ against the user-agent request header. Using this single selector,
+ we can deploy a consistent and readable setup.
+ </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>
+
+<map:match pattern="docs/*.html">
+ <map:generate src="xdocs/{1}.xml"/>
+
+ <map:select type="browser">
+ <map:when test="netscape">
+ <map:transform src="stylesheets/netscape.xsl" />
+ </map:when>
+ <map:when test="explorer">
+ <map:transform src="stylesheets/ie.xsl" />
+ </map:when>
+ <map:when test="lynx">
+ <map:transform src="stylesheets/text-based.xsl" />
+ </map:when>
+ <map:otherwise>
+ <map:transform src="stylesheets/html.xsl" />
+ </map:otherwise>
+ </map:select>
+
+ <map:serialize/>
+</map:match>
+
+</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="+2" color="#0086b2">The Selectors in Cocoon</font>
+<hr style="color: #0086b2" size="1">
+
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+ Available Selectors in Cocoon include the following:
+ </font>
+</p>
+
+<blockquote>
+<ul>
+
+<li>
+<font face="verdana, helvetica, sans serif"><b>BrowserSelector</b>: matches the value of the "test"
+ parameter against the HTTP User-Agent header, allowing it to
+ recognize the browser issuing the request;</font>
+</li>
+
+
+<li>
+<font face="verdana, helvetica, sans serif"><b>CodeSelector</b>: matches a snippet of Java code
+ given as the "test" parameter against the environment;</font>
+</li>
+
+
+<li>
+<font face="verdana, helvetica, sans serif"><b>HostSelector</b>: matches the "test" parameter value
+ against the Host request header</font>
+</li>
+
+
+<li>
+<font face="verdana, helvetica, sans serif"><a href="parameter-selector.html">ParameterSelector</a>: matches the string specified
+ in the "test" parameter against a specified Cocoon internal
+ (e.g. sitemap) parameter;</font>
+</li>
+
+
+<li>
+<font face="verdana, helvetica, sans serif"><b>HeaderSelector</b>: same as the Parameter selector,
+ but matches against the request headers;</font>
+</li>
+
+
+<li>
+<font face="verdana, helvetica, sans serif"><b>RequestSelector</b>: again, same as the Parameter selector,
+ but matches against the Request parameters;</font>
+</li>
+
+
+<li>
+<font face="verdana, helvetica, sans serif"><b>SessionSelector</b>: finally, this selector is used as
+ the Parameter selector to match against an arbitrary session
+ attribute;</font>
+</li>
+
+
+</ul>
+</blockquote>
+
+
+
+</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 © 1999-2002 The Apache Software Foundation. All Rights Reserved.</i></font></td>
+</tr>
+</table>
+</body>
+</html>