You can use CInclude to include dynamic content to your pages.

Assumed you have two files:

  • source.xml with your data and
  • transform.xslt with a transformation to the needed format.

Then you can put following CInclude-Element into your xml-file:

<cinclude:include
  src="cocoon:/GenTransSer?GenSrc=source.xml&amp;TransSrc=transform.xslt"
/>

You only have to add this internal pipeline to your sitemap:

<map:pipeline internal-only="true">
  <map:match pattern="GenTransSer">
    <!-- Generate/Transform/Serialize -->
    <map:generate src="{request-param:GenSrc}"/>
    <map:transform src="{request-param:TransSrc}"/>
    <map:serialize type="xml"/>
  </map:match>
</map:pipeline>
  • No labels