Overview

Allows the combination of multiple XML documents. An individual aggregator contains one or more parts. Each part is a document fragment, these become children of a new document root, whose element name is defined by an attribute on the aggregator.

E.g.

<map:aggregate element="site"> 
  <map:part src="cocoon:/book-{1}.xml"/>
  <map:part src="cocoon:/body-{1}.xml"/>
</map:aggregate>

Will create a site document element, whose children are the contents of the two other documents.

Aggregators can be used as alternatives to Generator.

Aggregate Element

<map:aggregate> accepts following attributes:

Part Element

Each <map:part> element inside <map:aggregate> specifies an xml document to be aggregated.

<map:part> accepts following attributes:

The src attribute for a part can be any of the following:

Question:
Given that the src attribute can access pipelines, why oh why not just let it access generators directly so you can trivially merge the contents of two or more generators without having to set up special pipelines for them ??

I second this motion. (See CocoonFeatureRequests.)


See also