Transformers
A Transformer is used to map an input XML structure into another XML structure.
Different types of transformers:
- XSLT Transformer
- Log Transformer
- SQL Transformer
- I18N Transformer
- …
Log Transformer is a good debugging tool.
More transformers can be added without modifying Cocoon.
<map:transformers default="xslt">
<map:transformer name="xslt" src="org.apache.cocoon.transformation.TraxTransformer">
<use-store map:value="true"/>
<use-request-parameters map:value="false"/>
<use-browser-capabilities-db map:value="false"/>
<map:transformer name="log" src="org.apache.cocoon.transformation.LogTransformer"/>
<map:match pattern="hello.html">
<map:generate src="docs/samples/hello-page.xml"/>
<map:transform src="stylesheets/page/simple-page2html.xsl"/>
<map:serialize type="html"/>
Sitemap entries for different types of transformers
A sample transformer entry in a pipeline