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
- MinimalSitemapConfiguration - the basic example that this is based on
- CInclude - Explains how to use the CInclude transformer in your actual XML/XSLT
- UsingCInclude - How to use CInclude to include dynamic content to your pages.
- Official Documentation - from the Cocoon Website