cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From un...@apache.org
Subject cvs commit: cocoon-2.1/src/webapp/samples/sources xsp.xmap sitemap.xmap samples.xml
Date Tue, 18 May 2004 10:31:56 GMT
unico       2004/05/18 03:31:56

  Modified:    src/webapp/samples/sources sitemap.xmap samples.xml
  Added:       src/webapp/samples/sources xsp.xmap
  Log:
  factor xsp pipelines into separate sitemap so that samples page will load when XSP is not
present 
  and add notice for xsp dependency
  
  Revision  Changes    Path
  1.5       +5 -74     cocoon-2.1/src/webapp/samples/sources/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/webapp/samples/sources/sitemap.xmap,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- sitemap.xmap	6 Mar 2004 02:25:48 -0000	1.4
  +++ sitemap.xmap	18 May 2004 10:31:56 -0000	1.5
  @@ -44,8 +44,7 @@
       </map:transform>
       <map:serialize/>
      </map:match>
  -
  -
  +   
      <!-- All Static. -->
      <map:match pattern="all-static">
       <map:generate src="content/simple.xml"/>
  @@ -59,59 +58,10 @@
       <map:serialize/>
      </map:match>
   
  -
  -   <!-- These samples show ways how XSP could be obtained and executed -->
  -   <map:match pattern="xsp-*">
  -
  -    <!-- XSP obtained from the local file, and executed -->
  -    <map:match pattern="xsp-file">
  -     <map:generate type="serverpages" src="content/simple.xsp"/>
  -    </map:match>
  -
  -    <!-- Generate XSP source from local file -->
  -    <map:match pattern="xsp-source">
  -     <map:generate src="content/simple.xsp"/>
  -     <map:serialize type="xml"/>
  -    </map:match>
  -
  -    <!-- XSP obtained from the matcher 'xsp-source', right above, and executed -->
  -    <map:match pattern="xsp-cocoon">
  -     <map:generate type="serverpages" src="cocoon:/xsp-source"/>
  -    </map:match>
  -
  -    <!-- XSP obtained from the matcher 'xsp-source', absolute reference, and executed
-->
  -    <map:match pattern="xsp-cocoon-root">
  -     <map:generate type="serverpages" src="cocoon://samples/sources/xsp-source"/>
  -    </map:match>
  -
  -    <!-- XSP obtained from the external HTTP server, and executed -->
  -    <map:match pattern="xsp-http">
  -     <map:generate type="serverpages" src="http://{request:serverName}:{request:serverPort}/{request:contextPath}/samples/sources/xsp-source"/>
  -    </map:match>
  -
  -    <!-- Generate XSP source dynamically. -->
  -    <map:match pattern="xsp-dynamic-source">
  -     <map:generate type="serverpages" src="content/dynamic.xsp"/>
  -     <map:transform src="style/dynamic-xsp2xsp.xsl"/>
  -     <map:serialize type="xml"/>
  -    </map:match>
  -
  -    <!-- XSP obtained from the matcher 'xsp-dynamic-source'. Beware: Very slow! -->
  -    <map:match pattern="xsp-dynamic">
  -     <map:generate type="serverpages" src="cocoon:/xsp-dynamic-source"/>
  -    </map:match>
  -
  -    <map:transform src="context://samples/common/style/xsl/html/simple-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="remove" value="{0}"/>
  -     <map:parameter name="file" value="content/simple.xsp"/>
  -    </map:transform>
  -    <map:serialize/>
  +   <map:match pattern="xsp/**">
  +     <map:mount uri-prefix="xsp" src="xsp.xmap" />
      </map:match>
  -
  -
  +   
      <!-- These samples show ways how XSL could be obtained and applied -->
      <map:match pattern="xsl-*">
   
  @@ -173,16 +123,10 @@
        <map:serialize/>
       </map:match>
   
  -    <!-- Generate XSL source dynamically using XSP page. -->
  -    <map:match pattern="xsl-dynamic-source">
  -     <map:generate type="serverpages" src="style/simple-page2html.xsp"/>
  -     <map:serialize type="xml"/>
  -    </map:match>
  -
       <!-- XSL obtained from the matcher 'xsl-dynamic-source'. Beware: Slow! -->
       <map:match pattern="xsl-dynamic">
        <map:generate src="content/simple.xml"/>
  -     <map:transform src="cocoon:/xsl-dynamic-source">
  +     <map:transform src="cocoon:/xsp/xsl-dynamic-source">
         <map:parameter name="servletPath" value="{request:servletPath}"/>
         <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
         <map:parameter name="contextPath" value="{request:contextPath}"/>
  @@ -193,19 +137,6 @@
       </map:match>
      </map:match>
   
  -
  -   <!-- All Dynamic. Beware: Very slow! -->
  -   <map:match pattern="all-dynamic">
  -    <map:generate type="serverpages" src="cocoon:/xsp-dynamic-source"/>
  -    <map:transform src="cocoon:/xsl-dynamic-source">
  -     <map:parameter name="servletPath" value="{request:servletPath}"/>
  -     <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
  -     <map:parameter name="contextPath" value="{request:contextPath}"/>
  -     <map:parameter name="remove" value="{0}"/>
  -     <map:parameter name="file" value="content/simple.xsp"/>
  -    </map:transform>
  -    <map:serialize/>
  -   </map:match>
      
      <!-- Uploaded xml as source. Beware: Very cool! -->
      <map:match pattern="xml-upload">
  
  
  
  1.6       +19 -13    cocoon-2.1/src/webapp/samples/sources/samples.xml
  
  Index: samples.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/webapp/samples/sources/samples.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- samples.xml	5 Apr 2004 12:34:24 -0000	1.5
  +++ samples.xml	18 May 2004 10:31:56 -0000	1.6
  @@ -25,6 +25,12 @@
      </sample>
     </group>
   
  +  <group name="Note">
  +   <note>
  +     Some of these samples require XSP to be present in order to work.
  +   </note>
  +  </group>
  +   
     <group name="Static XML With Static XSL">
      <sample name="All Static" href="all-static">
       This is the simpliest sample, similar to the "Hello World!".
  @@ -32,24 +38,24 @@
     </group>
   
     <group name="Obtaining XSP Source">
  -   <sample name="Plain XSP" href="xsp-file">
  +   <sample name="Plain XSP" href="xsp/file">
       Source is obtained from local file
      </sample>
   
  -   <sample name="This sitemap XSP" href="xsp-cocoon">
  -    Source is obtained via cocoon:/xsp-source
  +   <sample name="This sitemap XSP" href="xsp/cocoon">
  +    Source is obtained via cocoon:/source
      </sample>
   
  -   <sample name="Root sitemap XSP" href="xsp-cocoon-root">
  -    Source is obtained via cocoon://sub/xsp-source
  +   <sample name="Root sitemap XSP" href="xsp/cocoon-root">
  +    Source is obtained via cocoon://sub/source
      </sample>
   
  -   <sample name="External XSP" href="xsp-http">
  -    Source is obtained via http://&lt;serverName&gt;[:&lt;serverPort&gt;][/&lt;contextPath&gt;]/samples/sources/xsp-source
  +   <sample name="External XSP" href="xsp/http">
  +    Source is obtained via http://&lt;serverName&gt;[:&lt;serverPort&gt;][/&lt;contextPath&gt;]/samples/sources/xsp/source
      </sample>
   
  -   <sample name="Dynamic XSP" href="xsp-dynamic">
  -    Source is generated dynamically and obtained as Cocoon source cocoon:/xsp-dynamic-source
  +   <sample name="Dynamic XSP" href="xsp/dynamic">
  +    Source is generated dynamically and obtained as Cocoon source cocoon:/dynamic-source
      </sample>
     </group>
   
  @@ -63,7 +69,7 @@
      </sample>
   
      <sample name="Root sitemap XSL" href="xsl-cocoon-root">
  -    XSL is obtained via cocoon://sub/xsp-source, processed by root sitemap.
  +    XSL is obtained via cocoon://sub/xsl-source, processed by root sitemap.
      </sample>
   
      <sample name="External XSL" href="xsl-http">
  @@ -76,9 +82,9 @@
     </group>
   
     <group name="Dynamic XSP With Dynamic XSL">
  -   <sample name="All Dynamic" href="all-dynamic">
  +   <sample name="All Dynamic" href="xsp/all-dynamic">
       Combines last XSP sample with last XSL sample: XSP is obtained via Cocoon 
  -    source cocoon:/xsp-dynamic-source, and processed by XSL obtained via Cocoon
  +    source cocoon:/dynamic-source, and processed by XSL obtained via Cocoon
       source cocoon:/xsl-dynamic-source.
      </sample>
     </group>
  
  
  
  1.1                  cocoon-2.1/src/webapp/samples/sources/xsp.xmap
  
  Index: xsp.xmap
  ===================================================================
  <?xml version="1.0"?>
  <!--
    Copyright 1999-2004 The Apache Software Foundation
  
    Licensed 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:views>
    <map:view name="content" from-label="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 name="links" from-position="last">
     <map:serialize type="links"/>
    </map:view>
   </map:views>
   
   <map:pipelines>
    <map:pipeline>
     
     <!-- Generate XSL source dynamically using XSP page. -->
     <map:match pattern="xsl-dynamic-source">
      <map:generate type="serverpages" src="style/simple-page2html.xsp"/>
      <map:serialize type="xml"/>
     </map:match>
  
     <!-- All Dynamic. Beware: Very slow! -->
     <map:match pattern="all-dynamic">
      <map:generate type="serverpages" src="cocoon:/dynamic-source"/>
      <map:transform src="cocoon:/xsl-dynamic-source">
       <map:parameter name="servletPath" value="{request:servletPath}"/>
       <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
       <map:parameter name="contextPath" value="{request:contextPath}"/>
       <map:parameter name="remove" value="{0}"/>
       <map:parameter name="file" value="content/simple.xsp"/>
      </map:transform>
      <map:serialize/>
     </map:match>
     
     <map:match pattern="**">
      <!-- XSP obtained from the local file, and executed -->
      <map:match pattern="file">
       <map:generate type="serverpages" src="content/simple.xsp"/>
      </map:match>
  
      <!-- Generate XSP source from local file -->
      <map:match pattern="source">
       <map:generate src="content/simple.xsp"/>
       <map:serialize type="xml"/>
      </map:match>
  
      <!-- XSP obtained from the matcher 'xsp-source', right above, and executed -->
      <map:match pattern="cocoon">
       <map:generate type="serverpages" src="cocoon:/source"/>
      </map:match>
  
      <!-- XSP obtained from the matcher 'xsp-source', absolute reference, and executed
-->
      <map:match pattern="cocoon-root">
       <map:generate type="serverpages" src="cocoon://samples/sources/xsp/source"/>
      </map:match>
  
      <!-- XSP obtained from the external HTTP server, and executed -->
      <map:match pattern="http">
       <map:generate type="serverpages" src="http://{request:serverName}:{request:serverPort}/{request:contextPath}/samples/sources/xsp/source"/>
      </map:match>
  
      <!-- Generate XSP source dynamically. -->
      <map:match pattern="dynamic-source">
       <map:generate type="serverpages" src="content/dynamic.xsp"/>
       <map:transform src="style/dynamic-xsp2xsp.xsl"/>
       <map:serialize type="xml"/>
      </map:match>
  
      <!-- XSP obtained from the matcher 'xsp-dynamic-source'. Beware: Very slow! -->
      <map:match pattern="dynamic">
       <map:generate type="serverpages" src="cocoon:/dynamic-source"/>
      </map:match>
  
      <map:transform src="context://samples/common/style/xsl/html/simple-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="remove" value="{0}"/>
       <map:parameter name="file" value="content/simple.xsp"/>
      </map:transform>
      <map:serialize/>
      
     </map:match>
     
    </map:pipeline>
   </map:pipelines>
  </map:sitemap>
  
  

Mime
View raw message