(this document is adapted from the message posted by stefanomazzocchi on the cocoon development mailing list)

Currently, people abuse the map:resource part of the sitemap to create pipeline fragments to call. This was introduced by the TreeProcessor implementation of the sitemap but map:resources were *not* designed to be pipeline fragments but entire pipelines.

It has been identified in several circumstances (but mostly dealing with blocks) that the need to use pipeline fragments is required.

I propose the creation of "virtual pipeline components" by aggregating two or more components into a virtual one. An example is

  <map:components>

   <map:generators>
    <map:generator name="filteredFile">
     <map:generator type="file"/>
     <map:transformer type="xslt" src="namespaceFilter.xsl"/>
    </map:generator>

    <map:transformers>
     <map:transformer type="skin">
      <map:transformer type="xslt" src="fancy-doc2html.xslt"/>
     </map:transformer>
    </map:transformers>

    <map:serializers>
     <map:serializer type="html">
      <map:transformer type="linkTranslator"/>
      <map:serializer type="html"/>
     </map:serializer>
    </map:serializers>

   </map:components>

As you can see from the example, with virtual components, we can:

The virtual compoments can include any other sitemap component but:

and, obviously, the order is important.