- Introduction
-
Sitemap
- Sitemap Evaluation
- Writing your own components
- Concepts
- Reference
-
Sitemap Components
- Action
- Generator
- Matcher
- Pipe
- Reader
-
Selector
- BrowserSelector
- CookieSelector
- ExceptionSelector
- HeaderSelector
- HostSelector
- ParameterSelector
- RegexpHeaderSelector
- RegexpRequestParameterSelector
- RequestAttributeSelector
- RequestMethodSelector
- RequestParameterSelector
- ResourceExistsSelector
- SessionAttributeSelector
- SimpleSelector
- XPathExceptionSelector
- Serializer
- Transformer
- Control Flow
- Modularization (Blocks)
- Configuration & Initialization
- Project Reports
ParameterSelector
Summary
A Selector that matches a string in the parameters object passed to it.
Basic information
Component type | Selector |
---|---|
Cocoon block | core |
Java class | org.apache.cocoon.selection.ParameterSelector |
Name in Sitemap | |
Cacheable |
Documentation
<map:selector name="parameter" factory="org.apache.cocoon.selection.ParameterSelector"/>
<map:select type="parameter">
<map:parameter name="parameter-selector-test"
value="{mySitemapParameter}"/>
<map:when test="myParameterValue">
<!-- executes iff {mySitemapParameter} == "myParameterValue" -->
<map:transform src="stylesheets/page/uk.xsl"/>
</map:when>
<map:otherwise>
<map:transform src="stylesheets/page/us.xsl"/>
</map:otherwise>
</map:select>
The purpose of this selector is to allow an action to set parameters
and to be able to select between different pipeline configurations
depending on those parameters.