This example is based on the MinimalSitemapConfiguration and shows what is needed to declare the cinclude transformer component in the sitemap and add it to the basic pipeline.

<?xml version="1.0" encoding="iso-8859-1"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">

    <!-- use the standard components -->
    <map:components>
        <map:generators default="file"/>
<!-- changed, added cinclude definition -->
        <map:transformers default="xslt">
               <map:transformer name="cinclude"
                src="org.apache.cocoon.transformation.CIncludeTransformer"/>
        </map:transformers>
<!-- end change -->
        <map:readers default="resource"/>
        <map:serializers default="html"/>
        <map:selectors default="browser"/>
        <map:matchers default="wildcard"/>
    </map:components>
      
    <!-- let cocoon know how to process requests -->
    <map:pipelines>
        <map:pipeline>
            <!-- respond to *.html requests with 
                 our docs processed by doc2html.xsl -->
            <map:match pattern="*.html">
                <map:generate src="{1}.xml"/>
<!-- changed, added a cinclude transformation step -->
                <map:transform type="cinclude"/>
<!-- end change -->
                <map:transform src="doc2html.xsl"/>
                <map:serialize type="html"/>
            </map:match>
            
        </map:pipeline>
    </map:pipelines>
</map:sitemap>

See Also

AddCIncludeToMinimalSitemap (last edited 2009-09-20 23:41:03 by localhost)