A generator is the starting point of an xml pipeline. It generates XML content as SAX events and initializes pipeline processing. Every pipeline match containing a generator must be terminated by a serializer.

In the sitemap file, each generator has a unique name which is mapped to a java class. One generator name must be declared as the default generator. Each generator may have additional configuration information specified in child elements.

For conceptual information on generators see the user's guide document The Sitemap. For detailed descriptions about all of the available Cocoon generators, see the user's guide document Generators in Cocoon. You may also wish to consult the Cocoon API documentation.

Adding <map:act type="request"> and
<map:parameter name="parameters" value="true"/> makes it
possible to get the page request attribute.
Then, you can define the src attribute by using the value of the page attribute
like this: <map:generate src="{page}"/>.

Given the rapid pace of change with Cocoon, many individual FAQs quickly become out-of-date and confusing to new users. If you have the relevant knowledge, please consider updating other FAQs on this page for technical errors. If you see a few typos, please consider fixing them too. Follow the instructions found in How-To Author an FAQ.