blob: 97cd4f67ebe871447e8b0594002517241e878bc7 [file] [log] [blame]
<?xml version="1.0"?>
<!-- minimal sitemap for Cocoon 2 -->
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<!-- ======= Components ======= -->
<map:components>
<map:generators default="file"/>
<map:transformers default="xslt"/>
<map:readers default="resource"/>
<map:matchers default="wildcard"/>
<map:selectors default="browser">
<map:selector name="resource-exists"
logger="sitemap.selector.resource-exists"
src="org.apache.cocoon.selection.ResourceExistsSelector" />
</map:selectors>
<map:actions>
<map:action logger="sitemap.action.request" name="request" src="org.apache.cocoon.acting.RequestParamAction"/>
<map:action name="simple-resource-exists" src="org.apache.cocoon.acting.ResourceExistsAction"
logger="sitemap.action.simple-resource-exists"/>
<map:action name="resource-exists" src="org.apache.cocoon.acting.ExtendedResourceExistsAction"
logger="sitemap.action.resource-exists"/>
</map:actions>
<map:pipes default="caching"/>
<map:serializers default="html">
<map:serializer name="xhtml-transitional" src="org.apache.cocoon.serialization.XMLSerializer" mime-type="text/html" logger="sitemap.serializer.xhtml"
pool-grow="2" pool-max="64" pool-min="2">
<doctype-public>-//W3C//DTD XHTML 1.0 Transitional//EN</doctype-public>
<doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</doctype-system>
<encoding>UTF-8</encoding>
</map:serializer>
</map:serializers>
</map:components>
<!-- =========================== Resources =============================== -->
<map:resources>
<map:resource name="show-sitemap">
<map:aggregate element="sitemapandfiles">
<map:part src="cocoon:/{filename}.descr?location={location}"/>
<map:part src="cocoon:/allfiles-list?location={location}"/>
</map:aggregate>
<map:transform src="transforms/sitemapdescr2html.xsl">
<!-- change showsources to 0 if you don't want the link to the sources (secure) or to 1
if you want to show the sources (unsecure) -->
<map:parameter name="showsources" value="{showsources}"/>
</map:transform>
<map:select type="browser">
<map:when test="explorer">
</map:when>
<map:when test="mozilla5">
</map:when>
<map:otherwise>
<map:transform src="transforms/kill-dynamic.xsl"/>
</map:otherwise>
</map:select>
<map:serialize/>
</map:resource>
<!-- load a page of a section if page is not available load default page/image
of this section
-->
<map:resource name="load-page">
<map:select type="parameter">
<map:parameter name="parameter-selector-test" value="{resource-exists}"/>
<map:when test="true">
<map:read src="{sect}/{page}" mime-type="{mime-type}" />
</map:when>
<map:otherwise>
<map:read src="{sect}/{default}" mime-type="{mime-type}" />
</map:otherwise>
</map:select>
<map:serialize type="xml"/>
</map:resource>
</map:resources>
<map:views>
<map:view name="aggregate" from-label="aggregate">
<map:serialize type="xml"/>
</map:view>
</map:views>
<!-- ======= Pipelines ======= -->
<map:pipelines>
<map:pipeline>
<map:match pattern="">
<map:redirect-to uri="index.html"/>
</map:match>
</map:pipeline>
<!--
If you set the internal-only value to "no", you'll get the unsecure version of the viewer,
set it to "yes" to make it secure. -->
<map:pipeline internal-only="yes" label="srcviewing">
<map:match pattern="src/**">
<map:mount uri-prefix="src" check-reload="no" src="unsecure.xmap"/>
</map:match>
<map:match pattern="*._xmap">
<map:act type="request">
<map:parameter name="parameters" value="true"/>
<map:call resource="show-sitemap">
<map:parameter name="filename" value="{../1}"/>
<map:parameter name="location" value="{location}"/>
<map:parameter name="showsources" value="1"/>
</map:call>
</map:act>
</map:match>
</map:pipeline>
<map:pipeline internal-only="no">
<map:match pattern="*._xmap">
<map:act type="request">
<map:parameter name="parameters" value="true"/>
<map:call resource="show-sitemap">
<map:parameter name="filename" value="{../1}"/>
<map:parameter name="location" value="{location}"/>
<map:parameter name="showsources" value="0"/>
</map:call>
</map:act>
</map:match>
</map:pipeline>
<map:pipeline internal-only="no">
<map:match pattern="*.descr01">
<map:act type="request">
<map:parameter name="parameters" value="true"/>
<map:generate src="../{location}/{../1}.xmap"/>
<map:transform src="transforms/sitemap2descr01.xsl">
<map:parameter name="location" value="{location}"/>
<map:parameter name="filename" value="{../1}.xmap"/>
</map:transform>
<map:serialize type="xml"/>
</map:act>
</map:match>
<map:match pattern="*.descr">
<map:act type="request">
<map:parameter name="parameters" value="true"/>
<map:generate src="cocoon:/{../1}.descr01?location={location}"/>
<map:transform src="transforms/sitemap2descr02.xsl"/>
<map:serialize type="xml"/>
</map:act>
</map:match>
</map:pipeline>
<map:pipeline>
<map:match pattern="src/**._xmap">
<map:act type="request">
<map:parameter name="parameters" value="true"/>
<map:redirect-to uri="../disabled.html"/>
</map:act>
</map:match>
<map:match pattern="**/src/**._xmap">
<map:act type="request">
<map:parameter name="parameters" value="true"/>
<map:redirect-to uri="../../src/{../2}._xmap?location={location}"/>
</map:act>
</map:match>
</map:pipeline>
<map:pipeline internal-only="yes">
</map:pipeline>
<map:pipeline internal-only="yes">
<map:match pattern="allfiles-list">
<map:act type="request">
<map:parameter name="parameters" value="true"/>
<map:generate type="directory" src="../{location}">
<map:parameter name="depth" value="20"/>
</map:generate>
<map:transform src="transforms/dirlist2filelist.xsl"/>
<map:serialize type="xml"/>
</map:act>
</map:match>
</map:pipeline>
<map:pipeline>
<map:match pattern="*_*.gif">
<map:act type="resource-exists" src="images/{1}_{2}.gif">
<map:call resource="load-page">
<map:parameter name="sect" value="images"/>
<map:parameter name="page" value="{../1}_{../2}.gif"/>
<map:parameter name="default" value="default_{../2}.gif"/>
<map:parameter name="mime-type" value="image/gif"/>
<map:parameter name="resource-exists" value="{resource-exists}"/>
</map:call>
</map:act>
</map:match>
<map:match pattern="*.gif">
<map:act type="resource-exists" src="images/{1}.gif">
<map:call resource="load-page">
<map:parameter name="sect" value="images"/>
<map:parameter name="page" value="{../1}.gif"/>
<map:parameter name="default" value="default.gif"/>
<map:parameter name="mime-type" value="image/gif"/>
<map:parameter name="resource-exists" value="{resource-exists}"/>
</map:call>
</map:act>
</map:match>
<map:match pattern="*.js">
<map:read mime-type="text/txt" src="scripts/{1}.javascript"/>
</map:match>
<map:match pattern="*.css">
<map:read mime-type="text/css" src="styles/{1}.css"/>
</map:match>
<map:match pattern="dirlinks.xml">
<map:generate type="directory" src="..">
<map:parameter name="depth" value="20"/>
</map:generate>
<map:transform src="transforms/sitemaplinks.xsl"/>
<map:serialize type="xml"/>
</map:match>
<map:match pattern="index.html">
<map:generate src="html/intro.xml" />
<map:transform src="transforms/sitemaplist2index.xsl"/>
<map:serialize type="html"/>
</map:match>
<map:match pattern="index-list.html">
<map:aggregate element="index">
<map:part element="files" src="cocoon:/dirlinks.xml"/>
<map:part element="introhtml" src="html/intro.xml" strip-root="yes"/>
</map:aggregate>
<map:transform src="transforms/sitemaplist2index.xsl"/>
<map:serialize type="html"/>
</map:match>
<map:match pattern="**/sitemap-list.html">
<map:redirect-to uri="../sitemap-list.html"/>
</map:match>
<map:match pattern="sitemap-list.html">
<map:generate src="cocoon:/dirlinks.xml"/>
<map:transform src="transforms/sitemaplist2index.xsl"/>
<map:serialize type="html"/>
</map:match>
<map:match pattern="*.html">
<map:aggregate element="html">
<map:part element="head" src="html/head.xml" strip-root="yes"/>
<map:part element="body" src="html/{1}.xml" strip-root="yes"/>
</map:aggregate>
<map:serialize type="html"/>
</map:match>
<map:match pattern="dir.xml">
<map:generate type="directory" src="..">
<map:parameter name="depth" value="20"/>
</map:generate>
<map:serialize type="xml"/>
</map:match>
<map:pipeline>
</map:pipeline>
<map:match pattern="**">
<map:generate src="cocoon:/{1}._xmap"/>
<map:serialize type="html"/>
</map:match>
</map:pipeline>
</map:pipelines>
</map:sitemap>