blob: fe40f17eb91a0bcad606d6f2814719f6e7198ed2 [file] [log] [blame]
<?xml version="1.0"?>
<!--
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.
-->
<!-- ============================================================ -->
<!-- OpenOffice.org Plugin -->
<!-- This plugin allows OpenOffice.org application files to be -->
<!-- uded in a Forrest site -->
<!-- ============================================================ -->
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<map:resources>
<map:resource name="file-resolver">
<map:select type="exists">
<map:when test="{lm:project.{uri}.sxw}">
<map:match type="regexp" pattern="^(.*?)([^/]*).xml$">
<!-- FIXME: use the OOo generator as seen in the resume plugin -->
<map:generate src="{lm:OOo.bootstrap}"/>
<map:transform src="{lm:OOo.transform.xsl.aggregates/openoffice-document}">
<map:parameter name="src" value="{lm:project.{1}{2}.sxw}"/>
</map:transform>
<map:transform type="cinclude"/>
<map:transform src="{lm:OOo.transform.openoffice-writer.forrest}">
<map:parameter name="filename" value="{2}" />
<map:parameter name="extension" value="sxw" />
</map:transform>
<map:serialize type="xml-document"/>
</map:match>
</map:when>
<map:when test="{lm:project.{uri}.sxi}">
<map:match type="regexp" pattern="^(.*?)([^/]*).xml$">
<!-- FIXME: use the OOo generator as seen in the resume plugin -->
<map:generate src="{lm:OOo.bootstrap}"/>
<map:transform src="{lm:OOo.transform.xsl.aggregates/openoffice-document}">
<map:parameter name="src" value="{lm:project.{1}{2}.sxi}"/>
</map:transform>
<map:transform type="cinclude"/>
<map:transform src="{lm:OOo.transform.openoffice-impress.forrest}">
<map:parameter name="filename" value="{2}" />
<map:parameter name="extension" value="sxi" />
</map:transform>
<map:serialize type="xml-document"/>
</map:match>
</map:when>
</map:select>
</map:resource>
</map:resources>
<map:pipelines>
<map:pipeline internal="true">
<map:match pattern="**.xml">
<map:call resource="file-resolver">
<map:parameter name="uri" value="{1}"/>
</map:call>
</map:match>
</map:pipeline>
</map:pipelines>
</map:sitemap>