Questions
Answers
What is an Aggregator?
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.
In the example below,the XML content of pipelines matching book-*.xml and body-*.xml are aggregated, having a root element called site.
| | |
|
<map:match pattern="*.html">
<map:aggregate element="site">
<map:part src="cocoon:/book-{1}.xml"/>
<map:part src="cocoon:/body-{1}.xml"/>
</map:aggregate>
...
| |
| | |
The aggregated XML content could look like this:
| | |
|
<site>
<menu>
<!-- content of book XML -->
...
</menu>
<document>
<!-- content of body XML -->
...
</document>
</site>
| |
| | |
Where can I learn more about content aggregation?
Learn more about content aggregation by downloading the free chapter, A User's Look at the Cocoon architecture, from Langham and Ziegeler's Cocoon: Building XML Applications available at the New Riders web site.
How can I add my FAQ to this document?
Follow the instructions found in How-To Author an FAQ.
How can I suggest improvements to existing FAQs?
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.
|