blob: 7dbcb7a02a3c8c01bd9fb25cbd79bbb7337754c3 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE faqs PUBLIC "-//APACHE//DTD FAQ V1.0//EN" "../dtd/faq-v10.dtd">
<faqs title="Aggregator FAQs">
<faq>
<question>
What is an Aggregator?
</question>
<answer>
<p>
An aggregator produces XML content. It is composed of one or more parts, each of which defined by an XML source. During pipeline processing, all parts of an aggregator are merged.
The name of the parent element which contains the merged XML content from each part is defined by the value of the map:aggregate's attribute called element.
</p>
<p>
In the example below,the XML content of pipelines matching <code>book-*.xml</code> and <code>body-*.xml</code> are aggregated, having a root element called site.
</p>
<source><![CDATA[
<map:match pattern="*.html">
<map:aggregate element="site">
<map:part src="cocoon:/book-{1}.xml"/>
<map:part src="cocoon:/body-{1}.xml"/>
</map:aggregate>
...
]]></source>
<p>
The aggregated XML content could look like this:
</p>
<source><![CDATA[
<site>
<menu>
<!-- content of book XML -->
...
</menu>
<document>
<!-- content of body XML -->
...
</document>
</site>
]]></source>
</answer>
</faq>
<faq>
<question>
Where can I learn more about content aggregation?
</question>
<answer>
<p>
Learn more about content aggregation by downloading the free chapter, <link href="http://www.newriders.com/books/product.asp?product_id={C3C05052-BE3B-4E06-A60A-13FB40AF58F6}" >A User's Look at the Cocoon architecture,</link> from Langham and Ziegeler's <em>Cocoon: Building XML Applications</em> available at the New Riders web site.
</p>
</answer>
</faq>
</faqs>