The
RegexpHeaderSelector class defines a selector matching
specific headers to configured regular-expression patterns.
The configuration of an
RegexpHeaderSelector follows exactly
what has been outlined in
AbstractRegexpSelector regarding regular
expression patterns, and additionally it requires an extra configuration element
specifying the header whose value needs to be matched:
<map:components>
...
<map:selectors default="...">
<map:selector name="..." src="org.apache.cocoon.selection....">
<pattern name="empty">^$</pattern>
<pattern name="number">^[0-9]+$</pattern>
<pattern name="string">^.+$</pattern>
<header-name>...</header-name>
</map:selector>
</map:selectors>
</map:components>
If not configured, or if it needs to be overriddent, the header name can
also be specified as a <map:parameter .../> inside the
pipeline itself.
version: CVS $Id: RegexpHeaderSelector.java 433543 2006-08-22 06:22:54Z crossley $ |