| <?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:transformers default="xslt"> |
| <map:transformer name="linkrewriter" |
| src="org.apache.cocoon.transformation.LinkRewriterTransformer"> |
| <input-module name="book-raw"> |
| <file src="cocoon://samples/linkrewriter/bookdemo/linkmap" reloadable="true"/> |
| </input-module> |
| <input-module name="book"> |
| <input-module name="book-raw"> |
| <file src="{src}" reloadable="true"/> |
| </input-module> |
| <prefix>//*[@label='</prefix> |
| <suffix>']/@href</suffix> |
| </input-module> |
| </map:transformer> |
| </map:transformers> |
| </map:components> |
| |
| <!-- =========================== Pipelines ================================= --> |
| |
| <map:pipelines> |
| <map:pipeline> |
| |
| <map:match pattern=""> |
| <map:redirect-to uri="index.html"/> |
| </map:match> |
| |
| <map:match pattern="*.html"> |
| <map:generate src="docs/{1}.html"/> |
| <map:transform type="linkrewriter" src="cocoon:/linkmap"> |
| <!-- |
| <map:parameter name="prefix" value="//*[@label='"/> |
| <map:parameter name="suffix" value="']/@href"/> |
| --> |
| </map:transform> |
| <!-- For the pages that have a non empty default namespace --> |
| <map:transform type="linkrewriter" src="cocoon:/linkmap"> |
| <map:parameter name="namespace-uri" value="http://www.w3.org/1999/xhtml"/> |
| </map:transform> |
| <map:serialize/> |
| <map:serialize type="xml"/> |
| </map:match> |
| |
| <map:match pattern="**/*.html"> |
| <map:generate src="docs/{1}/{2}.html"/> |
| <map:transform type="linkrewriter" src="cocoon:/{1}/linkmap"/> |
| <map:serialize/> |
| <map:serialize type="xml"/> |
| </map:match> |
| |
| <map:match pattern="**linkmap"> |
| <map:generate src="docs/book.xml"/> |
| <map:transform src="../stylesheets/absolutize-linkmap.xsl"/> |
| <map:transform src="../stylesheets/relativize-linkmap.xsl"> |
| <map:parameter name="path" value="{0}"/> |
| </map:transform> |
| <map:serialize type="xml"/> |
| </map:match> |
| |
| </map:pipeline> |
| </map:pipelines> |
| |
| </map:sitemap> |