| <?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. |
| --> |
| |
| <!-- $Id: i18n.xmap 595134 2007-11-14 23:35:21Z andreas $ --> |
| |
| <!-- |
| This sitemaps provides fallback message catalogues and catalogue merging. |
| The reason for the existence of this sitemap is mainly to avoid endless loops caused by mounts |
| in sitemap.xmap and global-sitemap.xmap. |
| --> |
| |
| <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"> |
| |
| <map:pipelines> |
| <map:pipeline id="service"> |
| |
| <map:match pattern="translation"> |
| <map:generate src="service-consumer:" /> |
| <map:transform type="i18n"> |
| <map:parameter name="locale" value="{request:locale}" /> |
| </map:transform> |
| <map:serialize type="xml" /> |
| |
| </map:match> |
| |
| </map:pipeline> |
| |
| <map:pipeline type="noncaching"> |
| |
| <!-- This pipeline is decoupled from the one below because the page-envelope input module |
| call prevents it from being cached. --> |
| <!-- catalogue/{1:catalogue} --> |
| <map:match pattern="catalogue/*"> |
| <map:select type="resource-exists"> |
| <map:when test="fallback://lenya/resources/i18n/{1}"> |
| <map:select type="parameter"> |
| <map:parameter name="parameter-selector-test" value="{page-envelope:is-publication}"/> |
| <map:when test="true"> |
| <map:generate src="cocoon:/pubCatalogue/{page-envelope:publication-id}/{1}"/> |
| </map:when> |
| <map:otherwise> |
| <map:generate src="context://lenya/resources/i18n/{1}"/> |
| </map:otherwise> |
| </map:select> |
| <map:serialize type="xml"/> |
| </map:when> |
| </map:select> |
| </map:match> |
| |
| <!-- This pipeline generates the catalogue for each publication. The result is cached. --> |
| <!-- {1:pub}/{2:catalogue} --> |
| <map:match pattern="pubCatalogue/*/*"> |
| <map:generate src="aggregate-fallback://config/publication.xml"/> |
| <map:transform src="xslt/modules2include.xsl"> |
| <map:parameter name="pub" value="{1}"/> |
| <map:parameter name="catalogue" value="{2}"/> |
| </map:transform> |
| <map:transform type="include"/> |
| <map:serialize type="xml"/> |
| </map:match> |
| |
| <!-- Generate module i18n catalogues. We use the selector instead of direct inclusion |
| because otherwise the result wouldn't be cached when catalogues are missing. --> |
| <!-- modules/{1:module}/{2:catalogue} --> |
| <map:match pattern="modules/*/*"> |
| <map:select type="resource-exists"> |
| <map:when test="aggregate-fallback://lenya/modules/{1}/resources/i18n/{2}"> |
| <map:generate src="aggregate-fallback://lenya/modules/{1}/resources/i18n/{2}"/> |
| <map:serialize type="xml"/> |
| </map:when> |
| <map:otherwise> |
| <map:generate src="xslt/emptyCatalogue.xml"/> |
| <map:serialize type="xml"/> |
| </map:otherwise> |
| </map:select> |
| </map:match> |
| |
| </map:pipeline> |
| </map:pipelines> |
| |
| </map:sitemap> |