Generators
A Generator is used to create an XML structure from an input source ( file, directory, stream …)
Different types of generators:
- file generator
- directory generator
- XSP generator
- JSP generator
- Request generator
- …
More generators can be added without modifying Cocoon.
<map:generators default="file">
<map:generator name="file" src="org.apache.cocoon.generation.FileGenerator" label="content"/>
<map:generator name="directory" src="org.apache.cocoon.generation.DirectoryGenerator" label="content"/>
<map:generator name="serverpages" src="org.apache.cocoon.generation.ServerPagesGenerator" label="content"/>
<map:generator name="request" src="org.apache.cocoon.generation.RequestGenerator"/>
<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 generators
A sample generator entries in a pipeline