| <?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:components> |
| |
| <map:serializers> |
| <map:serializer name="svg2png" |
| src="org.apache.cocoon.serialization.SVGSerializer" |
| mime-type="image/png" |
| logger="sitemap.serializer.svg2png" |
| /> |
| </map:serializers> |
| |
| </map:components> |
| |
| |
| <map:pipelines> |
| |
| <map:pipeline> |
| |
| <!-- {1} determines the presentation of the language list. it can be either of |
| "abbr": show 2-letter ISO language codes [default] |
| "long": show full language names (must be provided by i18n catalogue) |
| "none": do not show anything (only makes sense with {2}, see below) |
| {2} controls the presentation of language flag symbols. it can be either of |
| "none": do not show flag symbols [default] |
| <n>: show flags with height of n pixels. |
| --> |
| <map:match pattern="text-*/flagsize-*"> |
| <map:generate src="context://lenya/content/util/empty.xml"/> |
| <map:transform src="fallback://lenya/modules/languageselector/xslt/languageselector.xsl"> |
| <map:parameter name="currentLanguage" value="{page-envelope:document-language}"/> |
| <map:parameter name="publication-languages-csv" value="{page-envelope:publication-languages-csv}"/> |
| <map:parameter name="document-languages-csv" value="{page-envelope:document-languages-csv}"/> |
| <map:parameter name="text" value="{1}"/> |
| <map:parameter name="flagsize" value="{2}"/> |
| <map:parameter name="context" value=""/> |
| </map:transform> |
| <map:transform type="i18n"> |
| <map:parameter name="locale" value="{request:locale}"/> |
| </map:transform> |
| <map:serialize type="xml"/> |
| </map:match> |
| |
| </map:pipeline> |
| |
| <map:pipeline> |
| <map:parameter name="expires" value="access plus 2 hours"/> |
| |
| <!-- flag-<language-code>-<height in pixels>.png --> |
| <map:match pattern="flag-*-*.png"> |
| <map:select type="resource-exists"> |
| <map:when test="resources/images/{1}.svg"> |
| <map:generate src="fallback://lenya/modules/languageselector/resources/images/{1}.svg"/> |
| </map:when> |
| <map:otherwise> |
| <map:generate src="fallback://lenya/modules/languageselector/resources/images/default.svg"/> |
| </map:otherwise> |
| </map:select> |
| <map:transform src="xslt/resizesvg.xsl"> |
| <parameter name="height" value="{2}"/> |
| </map:transform> |
| <map:transform src="xslt/stylesvg.xsl"/> |
| <map:serialize type="svg2png"/> |
| </map:match> |
| |
| <!-- currently only for debugging purposes --> |
| <map:match pattern="resources/images/*.svg"> |
| <map:read src="resources/images/{1}.svg"/> |
| </map:match> |
| |
| </map:pipeline> |
| |
| </map:pipelines> |
| |
| </map:sitemap> |