blob: c116cc4259aeb20b9378d90c417f651b92d25190 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<map:flow language="javascript">
<map:script src="shape/corner.js"/>
<map:script src="shape/tab.js"/>
</map:flow>
<map:pipelines>
<map:pipeline>
<!-- enable client side caching of resources -->
<map:parameter name="expires" value="{global:pipeline-expiration}"/>
<!--
Views for shape flowscripts.
-->
<map:match pattern="view/*">
<map:generate type="jx" src="shape/{1}.jx"/>
<map:serialize type="xml"/>
</map:match>
<!--
Internal pipeline to generate shape SVGs.
shape/{type}-{where}-{radius}-{backgroundColor}-{lineColor}
example: shape/corner-topLeft-5-FF0000-000000
-->
<map:match pattern="shape/*-*-*-*-*.svg">
<map:call function="{1}">
<map:parameter name="where" value="{2}"/>
<map:parameter name="radius" value="{3}"/>
<map:parameter name="backgroundColor" value="#{4}"/>
<map:parameter name="lineColor" value="#{5}"/>
</map:call>
</map:match>
<!--
This matches a shape URL.
{type}-{where}-{radius}-{backgroundColor}-{lineColor}
example: corner-topLeft-5-FF0000-000000
-->
<map:match pattern="*-*-*-*-*.png">
<map:generate src="cocoon:/shape/{1}-{2}-{3}-{4}-{5}.svg"/>
<map:serialize type="svg2png"/>
</map:match>
</map:pipeline>
<map:pipeline type="noncaching">
<!--
image resizing pipelines
-->
<!-- {pubId}/{area}/{path}.{extension} -->
<map:match pattern="*/*/**.*">
<map:match type="regexp" pattern="(.*\.)(gif|GIF|Gif)$">
<map:act type="resource-exists-enhanced">
<map:parameter name="url" value="fallback://resources/{../2}/{../3}.{../4}"/>
<map:parameter name="type" value="file"/>
<map:read src="fallback://resources/{../../2}/{../../3}.{../../4}" mime-type="image/gif" />
</map:act>
<map:act type="resource-exists-enhanced">
<map:parameter name="url" value="fallback://resources/shared/{../3}.{../4}"/>
<map:parameter name="type" value="file"/>
<map:read src="fallback://resources/shared/{../../3}.{../../4}" mime-type="image/gif" />
</map:act>
<map:act type="language-exists">
<map:read src="lenya-document:{page-envelope:document-uuid},lang={page-envelope:document-language}" mime-type="image/gif"/>
</map:act>
</map:match>
<map:generate src="dummy.xml"/>
<map:act type="resource-exists">
<map:parameter name="url" value="lenya-document:{page-envelope:document-uuid},lang={page-envelope:document-language},pub={1},area={2}"/>
<map:transform src="xslt/scale.xsl">
<map:parameter name="url" value="lenya-document:{page-envelope:document-uuid},lang={page-envelope:document-language},pub={../1},area={../2}{link:rev}"/>
<map:parameter name="width" value="{request-param:width}"/>
<map:parameter name="height" value="{request-param:height}"/>
</map:transform>
</map:act>
<map:act type="resource-exists-enhanced">
<map:parameter name="url" value="fallback://resources/shared/{3}.{4}"/>
<map:parameter name="type" value="file"/>
<map:transform src="xslt/scale.xsl">
<map:parameter name="url" value="{fallback:resources/shared/{../3}.{../4}}"/>
<map:parameter name="revision" value="{request-param:lenya.revision}"/>
<map:parameter name="width" value="{request-param:width}"/>
<map:parameter name="height" value="{request-param:height}"/>
</map:transform>
</map:act>
<map:match type="regexp" pattern="(.*\.)(jpg|JPG|Jpg|jpeg|Jpeg|JPEG)$">
<map:serialize type="svg2jpeg"/>
</map:match>
<map:match type="regexp" pattern="(.*\.)(png|PNG|Png)$">
<map:serialize type="svg2png"/>
</map:match>
<map:match type="regexp" pattern="(.*\.)(tif|TIF|Tif)$">
<map:serialize type="svg2tiff"/>
</map:match>
</map:match>
</map:pipeline>
</map:pipelines>
</map:sitemap>