Apache » Cocoon »

  Cocoon Core
      2.2
   homepage

Cocoon Core 2.2

ParameterSelector

Summary

A Selector that matches a string in the parameters object passed to it.

Basic information

Component typeSelector
Cocoon blockcore
Java classorg.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.