The basic structure of a Cocoon Sitemap is as follows:

<map:sitemap
  xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  <map:components>
    <!-- component declarations -->
    <map:generators/>
    <map:readers/>
    <map:transformers/>
    <map:actions/>
    <map:serializers/>
    <map:actions/>
    <map:matchers/>
    <map:selectors/>
  </map:components>
  <map:pipelines>
    <!-- pipeline definitions -->
  </map:pipelines>

</map:sitemap>

You might also want to look at MinimalSitemapConfiguration.

The <map:components> element is essentially the same as the contents of the xconf file [1]; just prefix everything with map:; this means that you can configure components such as input modules as well as pipeline components within your sitemap; these components are only available to the sitemap and child sitemaps, just like configured generator etc. components are:

  <map:sitemap>
    <map:components>
      <map:input-modules>
        <map:component-instance class="com.me.cocoon.components.modules.input.MySpecialInputModule" logger="core.modules.input" name="special">
          <my-config>42</my-config>
        </map:component-instance>
      </map:input-modules>

      <map:generators>...</map:generators>
      <map:transformers>...</map:transfomers>
      ...

    </map:components>

    ...
  </map:sitemap>

SitemapStructure (last edited 2009-09-20 23:41:57 by localhost)