Copyright 1999-2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE faqs PUBLIC "-//APACHE//DTD FAQ V1.0//EN" "faq-v10.dtd">
<faqs title="Cocoon Sitemap Generator FAQs">
<faq>
<question>
What is a generator?
</question>
<answer>
<p>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.
</p>
<p>
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.
</p>
<p>
For conceptual information on generators see the user's guide document <link href="../userdocs/concepts/sitemap.html">The Sitemap</link>. For detailed descriptions about all of the available Cocoon generators, see the user's guide document <link href="../userdocs/concepts/sitemap.html">Generators in Cocoon</link>. You may also wish to consult the Cocoon API documentation.
</p>
</answer>
</faq>
<faq>
<question>
How can I write my own generator?
</question>
<answer>
<p>See the tutorial <link href="../tutorial/tutorial-rmi-generator.html">Writing a Cocoon 2 generator</link>.
</p>
</answer>
</faq>
<faq>
<question>
How can I dynamically specify the source for my generator?
</question>
<answer>
<p>For example, I want the <generate>'s src attribute to be defined based on a request.
</p>
<p>
Here are two solutions (depending on your version of Cocoon):