blob: 691ea9af21e41f109b57a1862161bf4ff971abc4 [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.
-->
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<!-- =========================== Components ================================ -->
<map:components>
<map:actions default="request">
<map:action name="request" src="org.apache.cocoon.acting.RequestParamAction"/>
</map:actions>
<map:transformers default="xslt">
<map:transformer name="index2" logger="sitemap.transformer.luceneindextransformer2" src="org.apache.cocoon.transformation.LuceneIndexTransformer2"/>
<map:transformer name="cinclude" src="org.apache.cocoon.transformation.CIncludeTransformer"/>
<map:transformer name="uuid2url" src="org.apache.cocoon.transformation.UuidToUrlTransformer"/>
</map:transformers>
</map:components>
<!-- =========================== Pipelines ================================ -->
<map:pipelines>
<map:pipeline>
<map:match pattern="modules/*/**">
<map:mount uri-prefix="modules/{1}/" src="context://lenya/modules/{1}/sitemap.xmap" check-reload="true" reload-method="synchron"/>
</map:match>
</map:pipeline>
<map:pipeline>
<map:match pattern="opensearch.xml">
<!-- TODO: implement the opensearch results to make the search results available for an external app -->
<map:generate type="search">
<map:parameter name="index" value="{index-path:{page-envelope:publication-id}-{page-envelope:area}}"/>
</map:generate>
<map:transform src="fallback://lenya/modules/lucene/xslt/search2opensearch.xsl">
<map:parameter name="root" value="{base-url:{page-envelope:publication-id}:{page-envelope:area}}"/>
<map:parameter name="document-id" value="{page-envelope:document-id}"/>
<map:parameter name="publication-id" value="{page-envelope:publication-id}"/>
<map:parameter name="document-type" value="{page-envelope:document-type}"/>
<map:parameter name="language" value="{page-envelope:document-language}"/>
<map:parameter name="page-length" value="{pageLength}"/>
</map:transform>
<map:transform type="cinclude"/>
<map:serialize type="xml"/>
</map:match>
<map:match pattern="externalopensearch.xml">
<!-- TODO: the location of the searchengine should be configurable somewhere else -->
<!-- TODO: use the queryString parameter: request action -->
<map:generate src="fallback://lenya/modules/lucene/xslt/opensearch.xml"/>
<map:transform src="fallback://lenya/modules/lucene/xslt/opensearch2html.xsl">
<map:parameter name="url" value="{page-envelope:document-url}"/>
<map:parameter name="area" value="{page-envelope:area}"/>
<map:parameter name="pub" value="{page-envelope:publication-id}"/>
<map:parameter name="root" value="{base-url:{page-envelope:publication-id}:{page-envelope:area}}"/>
<map:parameter name="opensearch" value="opensearch.xml"/>
</map:transform>
<map:transform type="cinclude"/>
<map:transform src="fallback://xslt/page2xhtml-{page-envelope:document-type}.xsl">
<map:parameter name="root" value="{base-url:{page-envelope:publication-id}:{page-envelope:area}}"/>
<map:parameter name="document-id" value="{page-envelope:document-id}"/>
<map:parameter name="document-type" value="{page-envelope:document-type}"/>
<map:parameter name="language" value="{page-envelope:document-language}"/>
<map:parameter name="url" value="{page-envelope:document-url}"/>
</map:transform>
<map:serialize type="xml"/>
</map:match>
<map:match pattern="search/*/*.xml">
<map:generate type="search">
<map:parameter name="index" value="{index-path:{1}-{2}}"/>
</map:generate>
<map:transform type="uuid2url">
<map:parameter name="pubId" value="{1}"/>
<map:parameter name="area" value="{2}"/>
</map:transform>
<map:serialize type="xml"/>
</map:match>
<map:match pattern="search.xml">
<map:generate src="cocoon:/search/{page-envelope:publication-id}/{page-envelope:area}.xml"/>
<map:transform src="fallback://lenya/modules/lucene/xslt/search2html.xsl">
<map:parameter name="url" value="{page-envelope:document-url}"/>
<map:parameter name="area" value="{page-envelope:area}"/>
<map:parameter name="pub" value="{page-envelope:publication-id}"/>
<map:parameter name="root" value="{base-url:{page-envelope:publication-id}:{page-envelope:area}}"/>
<map:parameter name="use-request-parameters" value="true"/>
</map:transform>
<map:transform type="cinclude"/>
<map:transform type="uuid2url"/>
<map:serialize type="xml"/>
</map:match>
<!-- {pub-id}/{area}/{uuid}/{language} -->
<map:match pattern="index-document/*/*/*/*">
<map:generate src="{resource-type:{doc-info:{1}:{2}:{3}:{4}:resourceType}:format-luceneIndex}/{1}/{2}/{3}/{4}"/>
<map:transform src="fallback://lenya/modules/lucene/xslt/index.xsl">
<map:parameter name="index" value="{1}-{2}"/>
<map:parameter name="id" value="{3}:{4}"/>
</map:transform>
<map:transform type="index2"/>
<map:serialize type="xml"/>
</map:match>
<!-- {pub-id}/{area}/{uuid}/{language} -->
<map:match pattern="delete-document/*/*/*/*">
<map:generate src="context://lenya/content/util/empty.xml"/>
<map:transform src="fallback://lenya/modules/lucene/xslt/delete.xsl">
<map:parameter name="index" value="{1}-{2}"/>
<map:parameter name="id" value="{3}:{4}"/>
</map:transform>
<map:transform type="index2"/>
<map:serialize type="xml"/>
</map:match>
</map:pipeline>
</map:pipelines>
</map:sitemap>