blob: 9ba7626e5749c1efbce3bcaac23e63b02cec1927 [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.
-->
<!--+
| $Id$
+-->
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<!-- ========================== Components =============================== -->
<map:components>
<map:generators default="file">
<!--+
| JSPGenerator is used to get output of a JSP page
| and parse as XML SAX events.
+-->
<map:generator name="jsp"
label="content"
logger="sitemap.generator.jsp"
src="org.apache.cocoon.generation.JSPGenerator"/>
</map:generators>
<map:readers default="resource">
<!--+
| JSPReader is used to send output of a JSP page
| directly into the response stream. Note, that JSP
| can produce non XML, or even binary, result.
+-->
<map:reader name="jsp"
logger="sitemap.reader.jsp"
src="org.apache.cocoon.reading.JSPReader">
<!--+
| The configuration for the JSPReader with its default values:
<buffer-size>8192</buffer-size>
<output-encoding>UTF-8</output-encoding>
+-->
</map:reader>
</map:readers>
</map:components>
<!-- =========================== Views =================================== -->
<map:views>
<map:view from-label="content" name="content">
<map:serialize type="xml"/>
</map:view>
<map:view from-label="content" name="pretty-content">
<map:transform src="context://stylesheets/system/xml2html.xslt"/>
<map:serialize type="html"/>
</map:view>
<map:view from-position="last" name="links">
<map:serialize type="links"/>
</map:view>
</map:views>
<!-- ========================== Pipelines ================================ -->
<map:pipelines>
<map:pipeline>
<map:match pattern="">
<map:redirect-to uri="welcome"/>
</map:match>
<map:match pattern="welcome">
<map:generate src="samples.xml"/>
<map:transform src="context://samples/common/style/xsl/html/simple-samples2html.xsl">
<map:parameter name="contextPath" value="{request:contextPath}"/>
</map:transform>
<map:serialize/>
</map:match>
<map:match pattern="*.htm">
<map:read type="jsp" src="{1}.jsp" mime-type="text/html"/>
</map:match>
<!-- Use this to debug your JSPs -->
<map:match pattern="*.xml">
<map:generate type="jsp" src="{1}.jsp"/>
<map:serialize type="xml" mime-type="text/xml"/>
</map:match>
<map:match pattern="*.jsp">
<map:generate type="jsp" src="{1}.jsp"/>
<map:transform src="context://samples/stylesheets/dynamic-page2html.xsl">
<map:parameter name="servletPath" value="{request:servletPath}"/>
<map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
<map:parameter name="contextPath" value="{request:contextPath}"/>
<map:parameter name="file" value=".jsp"/>
</map:transform>
<map:serialize type="html"/>
</map:match>
</map:pipeline>
</map:pipelines>
</map:sitemap>