Apache » Cocoon »

  Cocoon Core
      2.2
   homepage

Cocoon Core 2.2

RegexpHeaderSelector

Summary

The RegexpHeaderSelector class defines a selector matching specific headers to configured regular-expression patterns.

Basic information

Component typeSelector
Cocoon blockcore
Java classorg.apache.cocoon.selection.RegexpHeaderSelector
Name in Sitemap
Cacheable

Documentation

The configuration of a  RegexpHeaderSelector follows exactly
what has been outlined in {@link 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.