home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-cocoon-addon-1.4.9-installer.exe / xsp.xmap < prev    next >
Encoding:
Extensible Markup Language  |  2004-07-12  |  3.9 KB  |  107 lines

  1. <?xml version="1.0"?>
  2. <!--
  3.   Copyright 1999-2004 The Apache Software Foundation
  4.  
  5.   Licensed under the Apache License, Version 2.0 (the "License");
  6.   you may not use this file except in compliance with the License.
  7.   You may obtain a copy of the License at
  8.  
  9.       http://www.apache.org/licenses/LICENSE-2.0
  10.  
  11.   Unless required by applicable law or agreed to in writing, software
  12.   distributed under the License is distributed on an "AS IS" BASIS,
  13.   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.   See the License for the specific language governing permissions and
  15.   limitations under the License.
  16. -->
  17.  
  18. <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  19.  
  20.  <map:views>
  21.   <map:view name="content" from-label="content">
  22.    <map:serialize type="xml"/>
  23.   </map:view>
  24.   <map:view from-label="content" name="pretty-content">
  25.     <map:transform src="context://stylesheets/system/xml2html.xslt"/>
  26.     <map:serialize type="html"/>
  27.   </map:view>
  28.   <map:view name="links" from-position="last">
  29.    <map:serialize type="links"/>
  30.   </map:view>
  31.  </map:views>
  32.  
  33.  <map:pipelines>
  34.   <map:pipeline>
  35.    
  36.    <!-- Generate XSL source dynamically using XSP page. -->
  37.    <map:match pattern="xsl-dynamic-source">
  38.     <map:generate type="serverpages" src="style/simple-page2html.xsp"/>
  39.     <map:serialize type="xml"/>
  40.    </map:match>
  41.  
  42.    <!-- All Dynamic. Beware: Very slow! -->
  43.    <map:match pattern="all-dynamic">
  44.     <map:generate type="serverpages" src="cocoon:/dynamic-source"/>
  45.     <map:transform src="cocoon:/xsl-dynamic-source">
  46.      <map:parameter name="servletPath" value="{request:servletPath}"/>
  47.      <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
  48.      <map:parameter name="contextPath" value="{request:contextPath}"/>
  49.      <map:parameter name="remove" value="{0}"/>
  50.      <map:parameter name="file" value="content/simple.xsp"/>
  51.     </map:transform>
  52.     <map:serialize/>
  53.    </map:match>
  54.    
  55.    <map:match pattern="**">
  56.     <!-- XSP obtained from the local file, and executed -->
  57.     <map:match pattern="file">
  58.      <map:generate type="serverpages" src="content/simple.xsp"/>
  59.     </map:match>
  60.  
  61.     <!-- Generate XSP source from local file -->
  62.     <map:match pattern="source">
  63.      <map:generate src="content/simple.xsp"/>
  64.      <map:serialize type="xml"/>
  65.     </map:match>
  66.  
  67.     <!-- XSP obtained from the matcher 'xsp-source', right above, and executed -->
  68.     <map:match pattern="cocoon">
  69.      <map:generate type="serverpages" src="cocoon:/source"/>
  70.     </map:match>
  71.  
  72.     <!-- XSP obtained from the matcher 'xsp-source', absolute reference, and executed -->
  73.     <map:match pattern="cocoon-root">
  74.      <map:generate type="serverpages" src="cocoon://samples/sources/xsp/source"/>
  75.     </map:match>
  76.  
  77.     <!-- XSP obtained from the external HTTP server, and executed -->
  78.     <map:match pattern="http">
  79.      <map:generate type="serverpages" src="http://{request:serverName}:{request:serverPort}/{request:contextPath}/samples/sources/xsp/source"/>
  80.     </map:match>
  81.  
  82.     <!-- Generate XSP source dynamically. -->
  83.     <map:match pattern="dynamic-source">
  84.      <map:generate type="serverpages" src="content/dynamic.xsp"/>
  85.      <map:transform src="style/dynamic-xsp2xsp.xsl"/>
  86.      <map:serialize type="xml"/>
  87.     </map:match>
  88.  
  89.     <!-- XSP obtained from the matcher 'xsp-dynamic-source'. Beware: Very slow! -->
  90.     <map:match pattern="dynamic">
  91.      <map:generate type="serverpages" src="cocoon:/dynamic-source"/>
  92.     </map:match>
  93.  
  94.     <map:transform src="context://samples/common/style/xsl/html/simple-page2html.xsl">
  95.      <map:parameter name="servletPath" value="{request:servletPath}"/>
  96.      <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
  97.      <map:parameter name="contextPath" value="{request:contextPath}"/>
  98.      <map:parameter name="remove" value="{0}"/>
  99.      <map:parameter name="file" value="content/simple.xsp"/>
  100.     </map:transform>
  101.     <map:serialize/>
  102.     
  103.    </map:match>
  104.    
  105.   </map:pipeline>
  106.  </map:pipelines>
  107. </map:sitemap>