cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r539125 [1/2] - in /cocoon/trunk/blocks: cocoon-lucene/cocoon-lucene-sample/src/main/resources/COB-INF/ cocoon-mail/cocoon-mail-sample/src/main/resources/COB-INF/ cocoon-mail/cocoon-mail-sample/src/main/resources/COB-INF/mail/ cocoon-mail/c...
Date Thu, 17 May 2007 21:37:26 GMT
Author: felixk
Date: Thu May 17 14:37:25 2007
New Revision: 539125

URL: http://svn.apache.org/viewvc?view=rev&rev=539125
Log:
-use servlet services
-reformatted

Modified:
    cocoon/trunk/blocks/cocoon-lucene/cocoon-lucene-sample/src/main/resources/COB-INF/sitemap.xmap
    cocoon/trunk/blocks/cocoon-mail/cocoon-mail-sample/src/main/resources/COB-INF/mail/sitemap.xmap
    cocoon/trunk/blocks/cocoon-mail/cocoon-mail-sample/src/main/resources/COB-INF/sendmail/sitemap.xmap
    cocoon/trunk/blocks/cocoon-mail/cocoon-mail-sample/src/main/resources/COB-INF/sitemap.xmap
    cocoon/trunk/blocks/cocoon-midi/cocoon-midi-sample/src/main/resources/COB-INF/sitemap.xmap
    cocoon/trunk/blocks/cocoon-ojb/cocoon-ojb-sample/src/main/resources/COB-INF/sitemap.xmap
    cocoon/trunk/blocks/cocoon-petstore/cocoon-petstore-sample/src/main/resources/COB-INF/sitemap.xmap
    cocoon/trunk/blocks/cocoon-poi/cocoon-poi-sample/src/main/resources/COB-INF/sitemap.xmap

Modified: cocoon/trunk/blocks/cocoon-lucene/cocoon-lucene-sample/src/main/resources/COB-INF/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-lucene/cocoon-lucene-sample/src/main/resources/COB-INF/sitemap.xmap?view=diff&rev=539125&r1=539124&r2=539125
==============================================================================
--- cocoon/trunk/blocks/cocoon-lucene/cocoon-lucene-sample/src/main/resources/COB-INF/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-lucene/cocoon-lucene-sample/src/main/resources/COB-INF/sitemap.xmap Thu May 17 14:37:25 2007
@@ -18,108 +18,115 @@
 <!-- CVS $Id$ -->
 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
 
-<!-- =========================== Components ================================ -->
+    <!-- =========================== Components ================================ -->
 
- <map:components>
-   <map:generators default="file">
-     <map:generator name="search" logger="sitemap.generator.search" label="content"
-                    src="org.apache.cocoon.generation.SearchGenerator"/>
-   </map:generators>
-   <map:transformers default="xslt">
-     <map:transformer name="index" logger="sitemap.transformer.luceneindextransformer"
-                      src="org.apache.cocoon.transformation.LuceneIndexTransformer"/>
-   </map:transformers>
-
-   <map:actions>
-<!-- FIXME: Has this action moved somewhere else?
-     <map:action name="lang-select" src="org.apache.cocoon.acting.LangSelect"/>
--->
-   </map:actions>
-</map:components>
-
-<!-- =========================== Views =================================== -->
-
-<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="servlet:style-default:/stylesheets/system/xml2html.xslt"/>
-   <map:transform type="servletLinkRewriter" />
-   <map:serialize type="html"/>
-  </map:view>
-
-  <map:view name="links" from-position="last">
-   <map:serialize type="links"/>
-  </map:view>
-
-</map:views>
-
-
-  <map:flow language="javascript">
-    <map:script src="flow.js"/>
-  </map:flow>
-
-<!-- =========================== Pipelines ================================= -->
-
-<map:pipelines>
-  
-  <map:pipeline>
-  	
-    <map:match pattern="">
-      <map:redirect-to uri="welcome"/>
-    </map:match>
-
-    <!-- mount query bean pipelines
-      <map:match pattern="query/**">
-        <map:mount src="query/sitemap.xmap" uri-prefix="query"/>
-      </map:match> 
-    -->
-
-    <map:match pattern="images/*.gif">
-      <map:read src="images/{1}.gif" mime-type="image/gif">
-        <map:parameter name="expires" value="60000"/>
-      </map:read>
-    </map:match>
-
-    <map:match pattern="findIt">
-      <map:generate type="search"/>
-      <map:transform type="log"/>
-      <map:transform src="stylesheets/search2html.xsl"/>
-      <map:transform type="servletLinkRewriter" />
-      <map:serialize/>
-    </map:match>
-
-    <map:match pattern="findIt2">
-      <map:generate type="search">
-        <map:parameter name="index" value="index2"/>
-      </map:generate>
-      <map:transform type="log"/>
-      <map:transform src="stylesheets/search-index2html.xsl"/>
-      <map:transform type="servletLinkRewriter" />
-      <map:serialize/>
-    </map:match>
-
-    <map:match pattern="welcome">
-      <map:generate src="welcome-index.xml"/>
-      <map:transform src="servlet:style-default:/blocks/dynamic-page2html.xsl" />
-      <map:transform type="servletLinkRewriter" />
-      <map:serialize/>
-    </map:match>
-
-    <map:match pattern="create">
-      <map:call function="create"/>
-    </map:match>
-
-    <map:match pattern="create-index.jx">
-      <map:generate type="jx" src="create-index.jx"/>
-      <map:transform src="servlet:style-default:/blocks/dynamic-page2html.xsl" />
-      <map:transform type="servletLinkRewriter" />
-      <map:serialize/>
-    </map:match>
+    <map:components>
 
-  </map:pipeline>
-</map:pipelines>
+        <!-- =========================== Generators ================================ -->
+
+        <map:generators default="file">
+            <map:generator name="search" logger="sitemap.generator.search" label="content" src="org.apache.cocoon.generation.SearchGenerator" />
+        </map:generators>
+        <map:transformers default="xslt">
+            <map:transformer name="index" logger="sitemap.transformer.luceneindextransformer" src="org.apache.cocoon.transformation.LuceneIndexTransformer" />
+        </map:transformers>
+
+        <!-- =========================== Actions ================================ -->
+
+        <map:actions>
+            <!-- FIXME: Has this action moved somewhere else?
+                <map:action name="lang-select" src="org.apache.cocoon.acting.LangSelect"/>
+            -->
+        </map:actions>
+    </map:components>
+
+    <!-- =========================== Views =================================== -->
+
+    <map:views>
+        <map:view name="content" from-label="content">
+            <map:serialize type="xml" />
+        </map:view>
+
+        <map:view from-label="content" name="pretty-content">
+            <!-- Make use of servlet services -->
+            <map:serialize type="servletService">
+                <map:parameter name="service" value="servlet:style-default:/service/system/xml2html" />
+            </map:serialize>
+        </map:view>
+
+        <map:view name="links" from-position="last">
+            <map:serialize type="links" />
+        </map:view>
+
+    </map:views>
+
+
+    <!-- =========================== Flowscripts ================================ -->
+
+    <map:flow language="javascript">
+        <map:script src="flow.js" />
+    </map:flow>
+
+    <!-- =========================== Pipelines ================================= -->
+
+    <map:pipelines>
+        <map:pipeline>
+
+            <map:match pattern="">
+                <map:redirect-to uri="welcome" />
+            </map:match>
+
+            <!-- mount query bean pipelines
+                <map:match pattern="query/**">
+                <map:mount src="query/sitemap.xmap" uri-prefix="query"/>
+                </map:match> 
+            -->
+
+            <map:match pattern="images/*.gif">
+                <map:read src="images/{1}.gif" mime-type="image/gif">
+                    <map:parameter name="expires" value="60000" />
+                </map:read>
+            </map:match>
+
+            <map:match pattern="findIt">
+                <map:generate type="search" />
+                <map:transform type="log" />
+                <map:transform src="stylesheets/search2html.xsl" />
+                <map:transform type="servletLinkRewriter" />
+                <map:serialize />
+            </map:match>
+
+            <map:match pattern="findIt2">
+                <map:generate type="search">
+                    <map:parameter name="index" value="index2" />
+                </map:generate>
+                <map:transform type="log" />
+                <map:transform src="stylesheets/search-index2html.xsl" />
+                <map:transform type="servletLinkRewriter" />
+                <map:serialize />
+            </map:match>
+
+            <map:match pattern="welcome">
+                <map:generate src="welcome-index.xml" />
+                <!-- Make use of servlet services -->
+                <map:serialize type="servletService">
+                    <map:parameter name="service" value="servlet:style-default:/service/blocks/dynamic-page2html" />
+                </map:serialize>
+            </map:match>
+
+            <map:match pattern="create">
+                <map:call function="create" />
+            </map:match>
+
+            <map:match pattern="create-index.jx">
+                <map:generate type="jx" src="create-index.jx" />
+                <!-- Make use of servlet services -->
+                <map:serialize type="servletService">
+                    <map:parameter name="service" value="servlet:style-default:/service/blocks/dynamic-page2html" />
+                </map:serialize>
+            </map:match>
+
+        </map:pipeline>
+    </map:pipelines>
 
 </map:sitemap>

Modified: cocoon/trunk/blocks/cocoon-mail/cocoon-mail-sample/src/main/resources/COB-INF/mail/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-mail/cocoon-mail-sample/src/main/resources/COB-INF/mail/sitemap.xmap?view=diff&rev=539125&r1=539124&r2=539125
==============================================================================
--- cocoon/trunk/blocks/cocoon-mail/cocoon-mail-sample/src/main/resources/COB-INF/mail/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-mail/cocoon-mail-sample/src/main/resources/COB-INF/mail/sitemap.xmap Thu May 17 14:37:25 2007
@@ -23,474 +23,473 @@
 
 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
 
-<!-- =========================== Components ================================ -->
+    <!-- =========================== Components ================================ -->
 
-<map:components>
+    <map:components>
 
-  <!-- ===== selectors ===== -->
-  <map:selectors default="parameter">
-    <map:selector name="request-parameter"
-                  src="org.apache.cocoon.selection.RequestParameterSelector"
-                  logger="sitemap.selector.request-parameter">
-      <parameter-name>cmd</parameter-name>
-    </map:selector>
-    <map:selector name="request-attribute"
-                  src="org.apache.cocoon.selection.RequestAttributeSelector"
-                  logger="sitemap.selector.request-attribute">
-      <parameter-name>cmd</parameter-name>
-    </map:selector>
-    <map:selector name="resource-exists"
-                  src="org.apache.cocoon.selection.ResourceExistsSelector"
-                  logger="sitemap.selector.request-exists">
-    </map:selector>
-  </map:selectors>
-
-  <!-- ===== actions =====
-  -->
-  <map:actions>
-    <map:action name="link-translator-map" src="org.apache.cocoon.acting.LinkTranslatorMapAction"
-      logger="sitemap.action.link-translator-map"/>
-    <map:action name="mail" src="org.apache.cocoon.mail.MailAction"
-      logger="sitemap.action.mail"/>
-  </map:actions>
-
-</map:components>
-
-
-<!-- =========================== Views =================================== -->
-
-<map:views>
-  <map:view name="content" from-label="content">
-   <map:serialize type="xml"/>
-  </map:view>
-
-  <map:view name="links" from-position="last">
-   <map:transform src="stylesheets/filterlinks.xsl"/>
-   <map:serialize type="links"/>
-  </map:view>
-</map:views>
-
-<!-- =========================== Resources =============================== -->
-<map:resources>
-  <!-- generate a page by merging all parts making up a page
-  -->
-  <map:resource name="show-page">
-    <map:aggregate element="site">
-      <map:part src="cocoon:/page-{page}-top-col-1" element="top-col-1" strip-root="true"/>
-      <map:part src="cocoon:/page-{page}-head-col-1" element="head-col-1" strip-root="true"/>
-      <map:part src="cocoon:/page-{page}-mid-col-1" element="mid-col-1" strip-root="true"/>
-      <map:part src="cocoon:/page-{page}-mid-col-2" element="mid-col-2" strip-root="true"/>
-      <map:part src="cocoon:/page-{page}-mid-col-3" element="mid-col-3" strip-root="true"/>
-      <map:part src="cocoon:/page-{page}-bottom-col-1" element="bottom-col-1" strip-root="true"/>
-    </map:aggregate>
-  </map:resource>
-
-  <!-- load a page of a section if page is not available load index page
-    of this section, plain XML
-  -->
-  <map:resource name="load-page">
-    <map:select type="parameter">
-      <map:parameter name="parameter-selector-test" value="{resource-exists}"/>
-      <map:when test="true">
-        <map:generate src="docs/{sect}/{page}.xml"/>
-      </map:when>
-      <map:otherwise>
-        <map:generate src="docs/{sect}/index.xml"/>
-      </map:otherwise>
-    </map:select>
-    <map:serialize type="xml"/>
-  </map:resource>
-
-  <!-- load a page of a section if page is not available load index page
-    of this section, assume XSP
-  -->
-  <map:resource name="load-xsp-page">
-    <map:select type="parameter">
-      <map:parameter name="parameter-selector-test" value="{resource-exists}"/>
-      <map:when test="true">
-        <map:generate type="serverpages" src="docs/{sect}/{page}.xsp"/>
-      </map:when>
-      <map:otherwise>
-        <map:generate type="serverpages" src="docs/{sect}/index.xsp"/>
-      </map:otherwise>
-    </map:select>
-    <map:serialize type="xml"/>
-  </map:resource>
-
-</map:resources>
-
-<!-- =========================== Pipelines ================================= -->
-
-<map:pipelines>
-
-  <!-- mail/ handling, mail/ URI denotes pages of Cocoon Webmail,
-    presenting javamail objects
-  -->
-  <map:pipeline>
-
-    <map:match pattern="page-mail/*-head-col-1">
-      <map:select type="resource-exists">
-        <map:when test="docs/head-col-1/{1}.xsp">
-        <map:call resource="load-xsp-page">
-          <map:parameter name="sect" value="head-col-1"/>
-            <map:parameter name="page" value="{1}"/>
-            <map:parameter name="resource-exists" value="true"/>
-          </map:call>
-        </map:when>
-        <map:otherwise>
-          <map:call resource="load-xsp-page">
-            <map:parameter name="sect" value="head-col-1"/>
-            <map:parameter name="page" value="index"/>
-            <map:parameter name="resource-exists" value="true"/>
-        </map:call>
-        </map:otherwise>
-      </map:select>
-    </map:match>
-
-    <map:match pattern="page-mail/mail-mid-col-1">
-      <map:generate type="serverpages" src="docs/mid-col-1/mail.xsp"/>
-      <map:transform src="stylesheets/mail2document.xsl"/>
-      <map:serialize type="xml"/>
-    </map:match>
-
-    <map:match pattern="page-mail/*-mid-col-1">
-      <map:select type="resource-exists">
-        <map:when test="docs/mid-col-1/{1}.xsp">
-          <map:call resource="load-xsp-page">
-            <map:parameter name="sect" value="mid-col-1"/>
-            <map:parameter name="page" value="{1}"/>
-            <map:parameter name="resource-exists" value="true"/>
-          </map:call>
-        </map:when>
-        <map:otherwise>
-        <map:call resource="load-xsp-page">
-          <map:parameter name="sect" value="mid-col-1"/>
-            <map:parameter name="page" value="index"/>
-            <map:parameter name="resource-exists" value="true"/>
-        </map:call>
-        </map:otherwise>
-      </map:select>
-    </map:match>
-
-    <map:match pattern="page-mail/mail-mid-col-2">
-      <map:generate type="serverpages" src="docs/mid-col-2/mail.xsp"/>
-
-      <!--
-        select stylesheet on the cmd request parameter
-      -->
-      <map:select type="request-attribute">
-        <map:parameter name="attribute-name" value="mail-current-working-command"/>
-
-        <map:when test="cat-folder">
-          <map:transform src="stylesheets/mail-folder2document.xsl"/>
-        </map:when>
-        <map:when test="list-folder-messages">
-          <map:transform src="stylesheets/mail-envelopes2document.xsl"/>
-        </map:when>
-        <map:when test="search-folder-messages">
-          <map:transform src="stylesheets/mail-envelopes2document.xsl"/>
-        </map:when>
-        <map:when test="list-folder">
-          <map:transform src="stylesheets/mail-folder2document.xsl"/>
-        </map:when>
-        <map:when test="list-folder-recursivly">
-          <map:transform src="stylesheets/mail-folderrecursivly2document.xsl"/>
-        </map:when>
-        <map:when test="cat-message-by-uid">
-          <map:transform src="stylesheets/mail-message2document.xsl"/>
-        </map:when>
-        <map:when test="cat-message-by-id">
-          <map:transform src="stylesheets/mail-message2document.xsl"/>
-        </map:when>
-        <map:otherwise>
-          <map:transform src="stylesheets/mail-unknown2document.xsl"/>
-        </map:otherwise>
-      </map:select>
-      <map:serialize type="xml"/>
-    </map:match>
-
-    <map:match pattern="page-mail/*-mid-col-2">
-      <map:select type="resource-exists">
-        <map:when test="docs/mid-col-2/{1}.xsp">
-        <map:call resource="load-xsp-page">
-          <map:parameter name="sect" value="mid-col-2"/>
-            <map:parameter name="page" value="{1}"/>
-          <map:parameter name="resource-exists" value="true"/>
-        </map:call>
-        </map:when>
-        <map:otherwise>
-          <map:call resource="load-xsp-page">
-            <map:parameter name="sect" value="mid-col-2"/>
-            <map:parameter name="page" value="index"/>
-            <map:parameter name="resource-exists" value="true"/>
-          </map:call>
-        </map:otherwise>
-      </map:select>
-    </map:match>
-
-    <map:match pattern="page-mail/*-mid-col-3">
-      <map:select type="resource-exists">
-        <map:when test="docs/mid-col-3/{1}.xml">
-        <map:call resource="load-page">
-          <map:parameter name="sect" value="mid-col-3"/>
-            <map:parameter name="page" value="{1}"/>
-            <map:parameter name="resource-exists" value="true"/>
-          </map:call>
-        </map:when>
-        <map:otherwise>
-          <map:call resource="load-xsp-page">
-            <map:parameter name="sect" value="mid-col-3"/>
-            <map:parameter name="page" value="index"/>
-            <map:parameter name="resource-exists" value="true"/>
-        </map:call>
-        </map:otherwise>
-      </map:select>
-    </map:match>
-
-    <map:match pattern="page-mail/*-top-col-1">
-      <map:select type="resource-exists">
-        <map:when test="docs/top-col-1/{1}.xml">
-          <map:call resource="load-page">
-            <map:parameter name="sect" value="top-col-1"/>
-            <map:parameter name="page" value="{1}"/>
-            <map:parameter name="resource-exists" value="true"/>
-          </map:call>
-        </map:when>
-        <map:otherwise>
-          <map:call resource="load-page">
-            <map:parameter name="sect" value="top-col-1"/>
-            <map:parameter name="page" value="index"/>
-            <map:parameter name="resource-exists" value="true"/>
-          </map:call>
-        </map:otherwise>
-      </map:select>
-    </map:match>
-
-    <map:match pattern="page-mail/*-bottom-col-1">
-      <map:select type="resource-exists">
-        <map:when test="docs/bottom-col-1/{1}.xml">
-          <map:call resource="load-page">
-            <map:parameter name="sect" value="bottom-col-1"/>
-            <map:parameter name="page" value="{1}"/>
-            <map:parameter name="resource-exists" value="true"/>
-          </map:call>
-        </map:when>
-        <map:otherwise>
-          <map:call resource="load-page">
-            <map:parameter name="sect" value="bottom-col-1"/>
-            <map:parameter name="page" value="index"/>
-            <map:parameter name="resource-exists" value="true"/>
-          </map:call>
-        </map:otherwise>
-      </map:select>
-    </map:match>
-
-  </map:pipeline>
-
-  <!-- general page section handling
-  -->
-  <map:pipeline>
-    <!-- pipeline matching a section of a page
-    -->
-
-    <!-- matched by simple URI *.html, eg. index.html becomes page-index-top-col-1
-      and mail/*.html, eg. mail/logout.html becomes page-mail/logout-top-col-1
-    -->
-    <map:match pattern="page-*-top-col-1">
-      <map:select type="resource-exists">
-        <map:when test="docs/top-col-1/{1}.xml">
-        <map:call resource="load-page">
-          <map:parameter name="sect" value="top-col-1"/>
-            <map:parameter name="page" value="{1}"/>
-            <map:parameter name="resource-exists" value="true"/>
-          </map:call>
-        </map:when>
-        <map:otherwise>
-          <map:call resource="load-page">
-            <map:parameter name="sect" value="top-col-1"/>
-            <map:parameter name="page" value="index"/>
-            <map:parameter name="resource-exists" value="true"/>
-        </map:call>
-        </map:otherwise>
-      </map:select>
-    </map:match>
-
-    <map:match pattern="page-*-head-col-1">
-      <map:select type="resource-exists">
-        <map:when test="docs/head-col-1/{1}.xml">
-          <map:call resource="load-page">
-            <map:parameter name="sect" value="head-col-1"/>
-            <map:parameter name="page" value="{1}"/>
-            <map:parameter name="resource-exists" value="true"/>
-          </map:call>
-        </map:when>
-        <map:otherwise>
-        <map:call resource="load-page">
-          <map:parameter name="sect" value="head-col-1"/>
-            <map:parameter name="page" value="index"/>
-            <map:parameter name="resource-exists" value="true"/>
-        </map:call>
-        </map:otherwise>
-      </map:select>
-    </map:match>
-
-    <map:match pattern="page-*-mid-col-1">
-      <map:select type="resource-exists">
-        <map:when test="docs/mid-col-1/{1}.xml">
-        <map:call resource="load-page">
-          <map:parameter name="sect" value="mid-col-1"/>
-            <map:parameter name="page" value="{1}"/>
-            <map:parameter name="resource-exists" value="true"/>
-          </map:call>
-        </map:when>
-        <map:otherwise>
-          <map:call resource="load-page">
-            <map:parameter name="sect" value="mid-col-1"/>
-            <map:parameter name="page" value="index"/>
-            <map:parameter name="resource-exists" value="true"/>
-        </map:call>
-        </map:otherwise>
-      </map:select>
-    </map:match>
-
-    <map:match pattern="page-*-mid-col-2">
-      <map:generate src="docs/mid-col-2/{1}.xml"/>
-      <map:serialize type="xml"/>
-    </map:match>
-
-    <map:match pattern="page-*-mid-col-3">
-      <map:select type="resource-exists">
-        <map:when test="docs/mid-col-3/{1}.xml">
-        <map:call resource="load-page">
-          <map:parameter name="sect" value="mid-col-3"/>
-            <map:parameter name="page" value="{1}"/>
-            <map:parameter name="resource-exists" value="true"/>
-          </map:call>
-        </map:when>
-        <map:otherwise>
-          <map:call resource="load-page">
-            <map:parameter name="sect" value="mid-col-3"/>
-            <map:parameter name="page" value="index"/>
-            <map:parameter name="resource-exists" value="true"/>
-        </map:call>
-        </map:otherwise>
-      </map:select>
-    </map:match>
-
-    <!-- bottom-col matches mail/*, too
-    -->
-    <map:match pattern="page-*-bottom-col-1">
-      <map:select type="resource-exists">
-        <map:when test="docs/bottom-col-1/{1}.xml">
-          <map:call resource="load-page">
-            <map:parameter name="sect" value="bottom-col-1"/>
-            <map:parameter name="page" value="{1}"/>
-            <map:parameter name="resource-exists" value="true"/>
-          </map:call>
-        </map:when>
-        <map:otherwise>
-        <map:call resource="load-page">
-          <map:parameter name="sect" value="bottom-col-1"/>
-            <map:parameter name="page" value="index"/>
-            <map:parameter name="resource-exists" value="true"/>
-        </map:call>
-        </map:otherwise>
-      </map:select>
-    </map:match>
-  </map:pipeline>
-
-  <!-- top level URI matching a page
-  -->
-  <map:pipeline>
-    <!-- handle *.html, and *([0-9]*).html pages
-    -->
-    <map:match pattern="^([^(/)0-9]+)(\(([0-9]+)+\))?\.html$" type="regexp-defaults">
-      <map:parameter name="map-default:2" value="(1)"/>
-      <map:parameter name="map-default:3" value="1"/>
-
-      <!-- setup link rewriting mapping
-      -->
-      <map:act type="link-translator-map" src="{1}.html"/>
-
-      <map:call resource="show-page">
-        <map:parameter name="page" value="{1}"/>
-      </map:call>
-      <map:transform type="paginate" src="pagesheets/htmlpages.xml">
-        <map:parameter name="page" value="{3}"/>
-      </map:transform>
-      <map:transform src="stylesheets/site2html.xsl"/>
-      <map:serialize/>
-    </map:match>
-  </map:pipeline>
-
-  <map:pipeline>
-    <!-- handle mail/*.html, and mail/*([0-9]*).html pages
-    -->
-    <map:match pattern="^mail/([a-z]+)(\(([0-9]+)+\))?\.html$" type="regexp-defaults">
-      <map:parameter name="map-default:2" value="(1)"/>
-      <map:parameter name="map-default:3" value="1"/>
-
-      <!-- setup link rewriting mapping
-      -->
-      <map:act type="link-translator-map">
-        <map:parameter name="url-base" value=""/>
-        <map:parameter name="linkMap:main.css" value="../main.css"/>
-        <map:parameter name="linkMap:built-with-cocoon.gif" value="../built-with-cocoon.gif"/>
-        <map:parameter name="linkMap:powered-by-cocoon.png" value="../powered-by-cocoon.png"/>
-        <map:parameter name="linkMap:favicon.ico" value="../favicon.ico"/>
-      </map:act>
-
-      <!-- create javamail objects
-      -->
-      <map:act type="mail" src="{1}">
-        <!--
-          define the imap store url as urlname template,
+        <!-- =========================== Components ================================ -->
+
+        <map:selectors default="parameter">
+            <map:selector name="request-parameter" src="org.apache.cocoon.selection.RequestParameterSelector" logger="sitemap.selector.request-parameter">
+                <parameter-name>cmd</parameter-name>
+            </map:selector>
+            <map:selector name="request-attribute" src="org.apache.cocoon.selection.RequestAttributeSelector" logger="sitemap.selector.request-attribute">
+                <parameter-name>cmd</parameter-name>
+            </map:selector>
+            <map:selector name="resource-exists" src="org.apache.cocoon.selection.ResourceExistsSelector" logger="sitemap.selector.request-exists"></map:selector>
+        </map:selectors>
+
+        <!-- =========================== Components ================================ -->
+
+        <map:actions>
+            <map:action name="link-translator-map" src="org.apache.cocoon.acting.LinkTranslatorMapAction" logger="sitemap.action.link-translator-map" />
+            <map:action name="mail" src="org.apache.cocoon.mail.MailAction" logger="sitemap.action.mail" />
+        </map:actions>
+
+    </map:components>
+
+
+    <!-- =========================== Views =================================== -->
+
+    <map:views>
+        <map:view name="content" from-label="content">
+            <map:serialize type="xml" />
+        </map:view>
+
+        <map:view from-label="content" name="pretty-content">
+            <!-- Make use of servlet services -->
+            <map:serialize type="servletService">
+                <map:parameter name="service" value="servlet:style-default:/service/system/xml2html" />
+            </map:serialize>
+        </map:view>
+
+        <map:view name="links" from-position="last">
+            <map:transform src="stylesheets/filterlinks.xsl" />
+            <map:serialize type="links" />
+        </map:view>
+    </map:views>
+
+    <!-- =========================== Resources =============================== -->
+
+    <map:resources>
+        <!-- generate a page by merging all parts making up a page
+        -->
+        <map:resource name="show-page">
+            <map:aggregate element="site">
+                <map:part src="cocoon:/page-{page}-top-col-1" element="top-col-1" strip-root="true" />
+                <map:part src="cocoon:/page-{page}-head-col-1" element="head-col-1" strip-root="true" />
+                <map:part src="cocoon:/page-{page}-mid-col-1" element="mid-col-1" strip-root="true" />
+                <map:part src="cocoon:/page-{page}-mid-col-2" element="mid-col-2" strip-root="true" />
+                <map:part src="cocoon:/page-{page}-mid-col-3" element="mid-col-3" strip-root="true" />
+                <map:part src="cocoon:/page-{page}-bottom-col-1" element="bottom-col-1" strip-root="true" />
+            </map:aggregate>
+        </map:resource>
+
+        <!-- load a page of a section if page is not available load index page
+            of this section, plain XML
+        -->
+        <map:resource name="load-page">
+            <map:select type="parameter">
+                <map:parameter name="parameter-selector-test" value="{resource-exists}" />
+                <map:when test="true">
+                    <map:generate src="docs/{sect}/{page}.xml" />
+                </map:when>
+                <map:otherwise>
+                    <map:generate src="docs/{sect}/index.xml" />
+                </map:otherwise>
+            </map:select>
+            <map:serialize type="xml" />
+        </map:resource>
+
+        <!-- load a page of a section if page is not available load index page
+            of this section, assume XSP
+        -->
+        <map:resource name="load-xsp-page">
+            <map:select type="parameter">
+                <map:parameter name="parameter-selector-test" value="{resource-exists}" />
+                <map:when test="true">
+                    <map:generate type="serverpages" src="docs/{sect}/{page}.xsp" />
+                </map:when>
+                <map:otherwise>
+                    <map:generate type="serverpages" src="docs/{sect}/index.xsp" />
+                </map:otherwise>
+            </map:select>
+            <map:serialize type="xml" />
+        </map:resource>
+
+    </map:resources>
+
+    <!-- =========================== Pipelines ================================= -->
+
+    <map:pipelines>
+
+        <!-- mail/ handling, mail/ URI denotes pages of Cocoon Webmail,
+            presenting javamail objects
+        -->
+        <map:pipeline>
+
+            <map:match pattern="page-mail/*-head-col-1">
+                <map:select type="resource-exists">
+                    <map:when test="docs/head-col-1/{1}.xsp">
+                        <map:call resource="load-xsp-page">
+                            <map:parameter name="sect" value="head-col-1" />
+                            <map:parameter name="page" value="{1}" />
+                            <map:parameter name="resource-exists" value="true" />
+                        </map:call>
+                    </map:when>
+                    <map:otherwise>
+                        <map:call resource="load-xsp-page">
+                            <map:parameter name="sect" value="head-col-1" />
+                            <map:parameter name="page" value="index" />
+                            <map:parameter name="resource-exists" value="true" />
+                        </map:call>
+                    </map:otherwise>
+                </map:select>
+            </map:match>
+
+            <map:match pattern="page-mail/mail-mid-col-1">
+                <map:generate type="serverpages" src="docs/mid-col-1/mail.xsp" />
+                <map:transform src="stylesheets/mail2document.xsl" />
+                <map:serialize type="xml" />
+            </map:match>
+
+            <map:match pattern="page-mail/*-mid-col-1">
+                <map:select type="resource-exists">
+                    <map:when test="docs/mid-col-1/{1}.xsp">
+                        <map:call resource="load-xsp-page">
+                            <map:parameter name="sect" value="mid-col-1" />
+                            <map:parameter name="page" value="{1}" />
+                            <map:parameter name="resource-exists" value="true" />
+                        </map:call>
+                    </map:when>
+                    <map:otherwise>
+                        <map:call resource="load-xsp-page">
+                            <map:parameter name="sect" value="mid-col-1" />
+                            <map:parameter name="page" value="index" />
+                            <map:parameter name="resource-exists" value="true" />
+                        </map:call>
+                    </map:otherwise>
+                </map:select>
+            </map:match>
+
+            <map:match pattern="page-mail/mail-mid-col-2">
+                <map:generate type="serverpages" src="docs/mid-col-2/mail.xsp" />
+
+                <!--
+                    select stylesheet on the cmd request parameter
+                -->
+                <map:select type="request-attribute">
+                    <map:parameter name="attribute-name" value="mail-current-working-command" />
+
+                    <map:when test="cat-folder">
+                        <map:transform src="stylesheets/mail-folder2document.xsl" />
+                    </map:when>
+                    <map:when test="list-folder-messages">
+                        <map:transform src="stylesheets/mail-envelopes2document.xsl" />
+                    </map:when>
+                    <map:when test="search-folder-messages">
+                        <map:transform src="stylesheets/mail-envelopes2document.xsl" />
+                    </map:when>
+                    <map:when test="list-folder">
+                        <map:transform src="stylesheets/mail-folder2document.xsl" />
+                    </map:when>
+                    <map:when test="list-folder-recursivly">
+                        <map:transform src="stylesheets/mail-folderrecursivly2document.xsl" />
+                    </map:when>
+                    <map:when test="cat-message-by-uid">
+                        <map:transform src="stylesheets/mail-message2document.xsl" />
+                    </map:when>
+                    <map:when test="cat-message-by-id">
+                        <map:transform src="stylesheets/mail-message2document.xsl" />
+                    </map:when>
+                    <map:otherwise>
+                        <map:transform src="stylesheets/mail-unknown2document.xsl" />
+                    </map:otherwise>
+                </map:select>
+                <map:serialize type="xml" />
+            </map:match>
+
+            <map:match pattern="page-mail/*-mid-col-2">
+                <map:select type="resource-exists">
+                    <map:when test="docs/mid-col-2/{1}.xsp">
+                        <map:call resource="load-xsp-page">
+                            <map:parameter name="sect" value="mid-col-2" />
+                            <map:parameter name="page" value="{1}" />
+                            <map:parameter name="resource-exists" value="true" />
+                        </map:call>
+                    </map:when>
+                    <map:otherwise>
+                        <map:call resource="load-xsp-page">
+                            <map:parameter name="sect" value="mid-col-2" />
+                            <map:parameter name="page" value="index" />
+                            <map:parameter name="resource-exists" value="true" />
+                        </map:call>
+                    </map:otherwise>
+                </map:select>
+            </map:match>
+
+            <map:match pattern="page-mail/*-mid-col-3">
+                <map:select type="resource-exists">
+                    <map:when test="docs/mid-col-3/{1}.xml">
+                        <map:call resource="load-page">
+                            <map:parameter name="sect" value="mid-col-3" />
+                            <map:parameter name="page" value="{1}" />
+                            <map:parameter name="resource-exists" value="true" />
+                        </map:call>
+                    </map:when>
+                    <map:otherwise>
+                        <map:call resource="load-xsp-page">
+                            <map:parameter name="sect" value="mid-col-3" />
+                            <map:parameter name="page" value="index" />
+                            <map:parameter name="resource-exists" value="true" />
+                        </map:call>
+                    </map:otherwise>
+                </map:select>
+            </map:match>
+
+            <map:match pattern="page-mail/*-top-col-1">
+                <map:select type="resource-exists">
+                    <map:when test="docs/top-col-1/{1}.xml">
+                        <map:call resource="load-page">
+                            <map:parameter name="sect" value="top-col-1" />
+                            <map:parameter name="page" value="{1}" />
+                            <map:parameter name="resource-exists" value="true" />
+                        </map:call>
+                    </map:when>
+                    <map:otherwise>
+                        <map:call resource="load-page">
+                            <map:parameter name="sect" value="top-col-1" />
+                            <map:parameter name="page" value="index" />
+                            <map:parameter name="resource-exists" value="true" />
+                        </map:call>
+                    </map:otherwise>
+                </map:select>
+            </map:match>
+
+            <map:match pattern="page-mail/*-bottom-col-1">
+                <map:select type="resource-exists">
+                    <map:when test="docs/bottom-col-1/{1}.xml">
+                        <map:call resource="load-page">
+                            <map:parameter name="sect" value="bottom-col-1" />
+                            <map:parameter name="page" value="{1}" />
+                            <map:parameter name="resource-exists" value="true" />
+                        </map:call>
+                    </map:when>
+                    <map:otherwise>
+                        <map:call resource="load-page">
+                            <map:parameter name="sect" value="bottom-col-1" />
+                            <map:parameter name="page" value="index" />
+                            <map:parameter name="resource-exists" value="true" />
+                        </map:call>
+                    </map:otherwise>
+                </map:select>
+            </map:match>
+
+        </map:pipeline>
+
+        <!-- general page section handling
+        -->
+        <map:pipeline>
+            <!-- pipeline matching a section of a page
+            -->
+
+            <!-- matched by simple URI *.html, eg. index.html becomes page-index-top-col-1
+                and mail/*.html, eg. mail/logout.html becomes page-mail/logout-top-col-1
+            -->
+            <map:match pattern="page-*-top-col-1">
+                <map:select type="resource-exists">
+                    <map:when test="docs/top-col-1/{1}.xml">
+                        <map:call resource="load-page">
+                            <map:parameter name="sect" value="top-col-1" />
+                            <map:parameter name="page" value="{1}" />
+                            <map:parameter name="resource-exists" value="true" />
+                        </map:call>
+                    </map:when>
+                    <map:otherwise>
+                        <map:call resource="load-page">
+                            <map:parameter name="sect" value="top-col-1" />
+                            <map:parameter name="page" value="index" />
+                            <map:parameter name="resource-exists" value="true" />
+                        </map:call>
+                    </map:otherwise>
+                </map:select>
+            </map:match>
+
+            <map:match pattern="page-*-head-col-1">
+                <map:select type="resource-exists">
+                    <map:when test="docs/head-col-1/{1}.xml">
+                        <map:call resource="load-page">
+                            <map:parameter name="sect" value="head-col-1" />
+                            <map:parameter name="page" value="{1}" />
+                            <map:parameter name="resource-exists" value="true" />
+                        </map:call>
+                    </map:when>
+                    <map:otherwise>
+                        <map:call resource="load-page">
+                            <map:parameter name="sect" value="head-col-1" />
+                            <map:parameter name="page" value="index" />
+                            <map:parameter name="resource-exists" value="true" />
+                        </map:call>
+                    </map:otherwise>
+                </map:select>
+            </map:match>
+
+            <map:match pattern="page-*-mid-col-1">
+                <map:select type="resource-exists">
+                    <map:when test="docs/mid-col-1/{1}.xml">
+                        <map:call resource="load-page">
+                            <map:parameter name="sect" value="mid-col-1" />
+                            <map:parameter name="page" value="{1}" />
+                            <map:parameter name="resource-exists" value="true" />
+                        </map:call>
+                    </map:when>
+                    <map:otherwise>
+                        <map:call resource="load-page">
+                            <map:parameter name="sect" value="mid-col-1" />
+                            <map:parameter name="page" value="index" />
+                            <map:parameter name="resource-exists" value="true" />
+                        </map:call>
+                    </map:otherwise>
+                </map:select>
+            </map:match>
+
+            <map:match pattern="page-*-mid-col-2">
+                <map:generate src="docs/mid-col-2/{1}.xml" />
+                <map:serialize type="xml" />
+            </map:match>
+
+            <map:match pattern="page-*-mid-col-3">
+                <map:select type="resource-exists">
+                    <map:when test="docs/mid-col-3/{1}.xml">
+                        <map:call resource="load-page">
+                            <map:parameter name="sect" value="mid-col-3" />
+                            <map:parameter name="page" value="{1}" />
+                            <map:parameter name="resource-exists" value="true" />
+                        </map:call>
+                    </map:when>
+                    <map:otherwise>
+                        <map:call resource="load-page">
+                            <map:parameter name="sect" value="mid-col-3" />
+                            <map:parameter name="page" value="index" />
+                            <map:parameter name="resource-exists" value="true" />
+                        </map:call>
+                    </map:otherwise>
+                </map:select>
+            </map:match>
+
+            <!-- bottom-col matches mail/*, too
+            -->
+            <map:match pattern="page-*-bottom-col-1">
+                <map:select type="resource-exists">
+                    <map:when test="docs/bottom-col-1/{1}.xml">
+                        <map:call resource="load-page">
+                            <map:parameter name="sect" value="bottom-col-1" />
+                            <map:parameter name="page" value="{1}" />
+                            <map:parameter name="resource-exists" value="true" />
+                        </map:call>
+                    </map:when>
+                    <map:otherwise>
+                        <map:call resource="load-page">
+                            <map:parameter name="sect" value="bottom-col-1" />
+                            <map:parameter name="page" value="index" />
+                            <map:parameter name="resource-exists" value="true" />
+                        </map:call>
+                    </map:otherwise>
+                </map:select>
+            </map:match>
+        </map:pipeline>
+
+        <!-- top level URI matching a page
+        -->
+        <map:pipeline>
+            <!-- handle *.html, and *([0-9]*).html pages
+            -->
+            <map:match pattern="^([^(/)0-9]+)(\(([0-9]+)+\))?\.html$" type="regexp-defaults">
+                <map:parameter name="map-default:2" value="(1)" />
+                <map:parameter name="map-default:3" value="1" />
+
+                <!-- setup link rewriting mapping
+                -->
+                <map:act type="link-translator-map" src="{1}.html" />
+
+                <map:call resource="show-page">
+                    <map:parameter name="page" value="{1}" />
+                </map:call>
+                <map:transform type="paginate" src="pagesheets/htmlpages.xml">
+                    <map:parameter name="page" value="{3}" />
+                </map:transform>
+                <map:transform src="stylesheets/site2html.xsl" />
+                <map:serialize />
+            </map:match>
+        </map:pipeline>
+
+        <map:pipeline>
+            <!-- handle mail/*.html, and mail/*([0-9]*).html pages
+            -->
+            <map:match pattern="^mail/([a-z]+)(\(([0-9]+)+\))?\.html$" type="regexp-defaults">
+                <map:parameter name="map-default:2" value="(1)" />
+                <map:parameter name="map-default:3" value="1" />
+
+                <!-- setup link rewriting mapping
+                -->
+                <map:act type="link-translator-map">
+                    <map:parameter name="url-base" value="" />
+                    <map:parameter name="linkMap:main.css" value="../main.css" />
+                    <map:parameter name="linkMap:built-with-cocoon.gif" value="../built-with-cocoon.gif" />
+                    <map:parameter name="linkMap:powered-by-cocoon.png" value="../powered-by-cocoon.png" />
+                    <map:parameter name="linkMap:favicon.ico" value="../favicon.ico" />
+                </map:act>
+
+                <!-- create javamail objects
+                -->
+                <map:act type="mail" src="{1}">
+                    <!--
+                        define the imap store url as urlname template,
+                    -->
+                    <map:parameter name="store-urlname" value="imap://''mail-userid'':''mail-passwd''@imap-server-host-name/" />
+                    <map:parameter name="javax.mail.Session.props:mail.debug" value="true" />
+                </map:act>
+
+                <map:call resource="show-page">
+                    <map:parameter name="page" value="mail/{1}" />
+                </map:call>
+
+                <map:transform type="paginate" src="pagesheets/mailhtmlpages.xml">
+                    <map:parameter name="page" value="{3}" />
+                </map:transform>
+
+                <map:transform src="stylesheets/site2html.xsl" />
+                <map:serialize />
+            </map:match>
+        </map:pipeline>
+
+        <!-- top level URI matching resources of a page
         -->
-        <map:parameter name="store-urlname" value="imap://''mail-userid'':''mail-passwd''@imap-server-host-name/"/>
-        <map:parameter name="javax.mail.Session.props:mail.debug" value="true"/>
-      </map:act>
-
-      <map:call resource="show-page">
-        <map:parameter name="page" value="mail/{1}"/>
-      </map:call>
-
-      <map:transform type="paginate" src="pagesheets/mailhtmlpages.xml">
-        <map:parameter name="page" value="{3}"/>
-      </map:transform>
-
-      <map:transform src="stylesheets/site2html.xsl"/>
-      <map:serialize/>
-    </map:match>
-  </map:pipeline>
-
-  <!-- top level URI matching resources of a page
-  -->
-  <map:pipeline>
-    <map:match pattern="*.css">
-      <map:read mime-type="text/css" src="resources/styles/{1}.css"/>
-    </map:match>
-    <map:match pattern="*.gif">
-      <map:read mime-type="image/gif" src="resources/images/{1}.gif"/>
-    </map:match>
-    <map:match pattern="*.png">
-      <map:read mime-type="image/png" src="resources/images/{1}.png"/>
-    </map:match>
-    <map:match pattern="*.jpg">
-      <map:read mime-type="image/jpeg" src="resources/images/{1}.jpg"/>
-    </map:match>
-    <map:match pattern="favicon.ico">
-      <map:read mime-type="application/ico" src="resources/images/favicon.ico"/>
-    </map:match>
-
-    <!-- handle ascii art, generate SVG from TXT, and serialize SVG as jpeg
-    -->
-    <map:match pattern="asciiart/*.jpg">
-      <map:generate type="asciiart-svg" src="resources/asciiart/{1}.txt">
-      </map:generate>
-      <map:serialize type="svg2jpeg"/>
-    </map:match>
-  </map:pipeline>
-</map:pipelines>
+        <map:pipeline>
+            <map:match pattern="*.css">
+                <map:read mime-type="text/css" src="resources/styles/{1}.css" />
+            </map:match>
+            <map:match pattern="*.gif">
+                <map:read mime-type="image/gif" src="resources/images/{1}.gif" />
+            </map:match>
+            <map:match pattern="*.png">
+                <map:read mime-type="image/png" src="resources/images/{1}.png" />
+            </map:match>
+            <map:match pattern="*.jpg">
+                <map:read mime-type="image/jpeg" src="resources/images/{1}.jpg" />
+            </map:match>
+            <map:match pattern="favicon.ico">
+                <map:read mime-type="application/ico" src="resources/images/favicon.ico" />
+            </map:match>
+
+            <!-- handle ascii art, generate SVG from TXT, and serialize SVG as jpeg
+            -->
+            <map:match pattern="asciiart/*.jpg">
+                <map:generate type="asciiart-svg" src="resources/asciiart/{1}.txt"></map:generate>
+                <map:serialize type="svg2jpeg" />
+            </map:match>
+        </map:pipeline>
+    </map:pipelines>
 
 </map:sitemap>
 

Modified: cocoon/trunk/blocks/cocoon-mail/cocoon-mail-sample/src/main/resources/COB-INF/sendmail/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-mail/cocoon-mail-sample/src/main/resources/COB-INF/sendmail/sitemap.xmap?view=diff&rev=539125&r1=539124&r2=539125
==============================================================================
--- cocoon/trunk/blocks/cocoon-mail/cocoon-mail-sample/src/main/resources/COB-INF/sendmail/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-mail/cocoon-mail-sample/src/main/resources/COB-INF/sendmail/sitemap.xmap Thu May 17 14:37:25 2007
@@ -19,189 +19,192 @@
 
 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
 
-<!-- ========================= Components ================================ -->
+    <!-- ========================= Components ================================ -->
 
-  <map:components>
-    <map:matchers default="wildcard">
-      <map:matcher name="host-matcher"
-                   logger="sitemap.matcher.wildcard"
-                   src="org.apache.cocoon.matching.modular.CachingWildcardMatcher">
-        <input-module name="request"/>
-        <parameter-name>serverName</parameter-name>
-      </map:matcher>
-    </map:matchers>
-
-    <map:selectors default="browser"/>
-    <map:actions>
-      <map:action name="sendmail"
-                  logger="sitemap.action.sendmail"
-                  src="org.apache.cocoon.acting.Sendmail">
-        <!--+
-            | Configuration:
-        <smtp-host>localhost</smtp-host>
-        <smtp-user>john</smtp-user>
-        <smtp-password>john</smtp-password>
-            +-->
-      </map:action>
-
-      <!-- Deprecated -->
-      <map:action name="old-sendmail"
-                  logger="sitemap.action.sendmail"
-                  src="org.apache.cocoon.acting.SendmailAction"/>
-    </map:actions>
-
-    <map:transformers default="xslt">
-      <map:transformer logger="sitemap.transformer.simpleform"
-                       name="simpleform"
-                       pool-max="32"
-                       src="org.apache.cocoon.transformation.SimpleFormTransformer"/>
-    </map:transformers>
-  </map:components>
-
-  <map:resources>
-    <map:resource name="show-page">
-      <map:generate type="serverpages" src="{target}"/>
-      <map:transform src="servlet:style-default:/common/style/xsl/html/simple-page2html.xsl">
-        <map:parameter name="servletPath" value="{request:servletPath}"/>
-        <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
-        <map:parameter name="remove" value="{remove}"/>
-        <map:parameter name="file" value="{target}"/>
-      </map:transform>
-      <map:transform type="simpleform"/>
-      <map:transform type="servletLinkRewriter" />
-      <map:serialize/>
-    </map:resource>
-  </map:resources>
-
-  <map:flow language="javascript">
-    <map:script src="mail.js"/>
-  </map:flow>
-
-<!-- =========================== Pipelines ================================= -->
-
-  <map:pipelines>
-    <map:pipeline>
-
-      <map:match pattern="view/page">
-        <map:call resource="show-page">
-          <map:parameter name="target" value="done.xml"/>
-          <map:parameter name="remove" value="ignored"/>
-        </map:call>
-      </map:match>
-
-      <map:match pattern="*">
-        <map:match type="host-matcher" pattern="localhost">
-
-          <!--+
-              | To avoid creating an open SPAM relay in default
-              | deployments, only allow "localhost" as server name.
-              | -> client accesses this host as localhost => client == server
-              +-->
-
-          <map:act type="req-params">
-            <map:parameter name="parameters" value="use-flow"/>
-            <!--+
-                | Use flow to send mail
-                +-->
-            <map:call function="mail">
-              <map:parameter name="host"     value="{request-param:smtphost}"/>
-              <map:parameter name="user"     value="{request-param:smtpuser}"/>
-              <map:parameter name="password" value="{request-param:smtppassword}"/>
-              <map:parameter name="from"     value="{request-param:from}"/>
-              <map:parameter name="to"       value="{request-param:to}"/>
-              <map:parameter name="subject"  value="{request-param:subject}"/>
-              <map:parameter name="body"     value="{request-param:body}"/>
-              <map:parameter name="cc"       value="{request-param:cc}"/>
-              <map:parameter name="bcc"      value="{request-param:bcc}"/>
-            </map:call>
-          </map:act>
-
-          <map:act type="req-params">
-            <map:parameter name="parameters" value="use-action"/>
-            <!--+
-                | Use action to send mail
-                +-->
-            <map:act type="sendmail">
-              <!--+
-                  | New sendmail action extends the deprecated action with options
-                  | to use CC, BCC, attachments, and more. Incompatibility with
-                  | deprecated action: does not read request parameters. All
-                  | parameters need to be passed explicitly from sitemap.
-                  +-->
-              <map:parameter name="smtp-host"   value="{request-param:smtphost}"/>
-              <map:parameter name="smtp-user"   value="{request-param:smtpuser}"/>
-              <map:parameter name="smtp-password" value="{request-param:smtppassword}"/>
-              <map:parameter name="from"        value="{request-param:from}"/>
-              <map:parameter name="to"          value="{request-param:to}"/>
-              <map:parameter name="subject"     value="{request-param:subject}"/>
-              <map:parameter name="body"        value="{request-param:body}"/>
-              <map:parameter name="cc"          value="{request-param:cc}"/>
-              <map:parameter name="bcc"         value="{request-param:bcc}"/>
-              <map:parameter name="attachments" value="attachment cocoon:/// context://welcome.xml"/>
-
-              <map:call resource="show-page">
-                <map:parameter name="target" value="done.xml"/>
-                <map:parameter name="remove" value="{0}"/>
-              </map:call>
-            </map:act>
-          </map:act>
-
-
-          <map:act type="req-params">
-            <map:parameter name="parameters" value="use-oldaction"/>
-            <!--+
-                | Use (deprecated) action to send mail
-                +-->
-            <map:act type="old-sendmail">
-              <map:parameter name="smtp-host"    value="{request-param:mail.smtphost}"/>
-              <map:parameter name="smtp-user"   value="{request-param:smtpuser}"/>
-              <map:parameter name="smtp-password" value="{request-param:smtppassword}"/>
+    <map:components>
 
+        <!-- ========================= Matchers ================================ -->
+
+        <map:matchers default="wildcard">
+            <map:matcher name="host-matcher" logger="sitemap.matcher.wildcard" src="org.apache.cocoon.matching.modular.CachingWildcardMatcher">
+                <input-module name="request" />
+                <parameter-name>serverName</parameter-name>
+            </map:matcher>
+        </map:matchers>
+
+        <!-- ========================= Selectors ================================ -->
+
+        <map:selectors default="browser" />
+
+        <!-- ========================= Actions ================================ -->
+
+        <map:actions>
+            <map:action name="sendmail" logger="sitemap.action.sendmail" src="org.apache.cocoon.acting.Sendmail">
                 <!--+
-                    | optional: if these parameters are not present, they will be read
-                    | from request
+                    | Configuration:
+                    <smtp-host>localhost</smtp-host>
+                    <smtp-user>john</smtp-user>
+                    <smtp-password>john</smtp-password>
                     +-->
-                <!--
-                <map:parameter name="from"        value="{request-param:mail.from}"/>
-                <map:parameter name="to"          value="{request-param:mail.to}"/>
-                <map:parameter name="subject"     value="{request-param:mail.subject}"/>
-                <map:parameter name="body"        value="{request-param:mail.body}"/>
-                -->
-              <map:call resource="show-page">
-                <map:parameter name="target" value="done.xml"/>
-                <map:parameter name="remove" value="{0}"/>
-              </map:call>
-            </map:act>
-          </map:act>
-
-
-          <map:act type="req-params">
-            <map:parameter name="parameters" value="use-logicsheet"/>
-            <!--+
-                | Use logicsheet from XSP to send mail
-                +-->
-            <map:call resource="show-page">
-              <map:parameter name="target" value="sendmail_xsp.xml"/>
-              <map:parameter name="remove" value="{0}"/>
-            </map:call>
-          </map:act>
-
-        </map:match> <!-- type="host-matcher" pattern="localhost" -->
-
-
-        <!-- default page -->
-        <map:call resource="show-page">
-          <map:parameter name="target" value="form.xml"/>
-          <map:parameter name="remove" value="{0}"/>
-        </map:call>
-      </map:match>
-
-      <map:match pattern="">
-        <map:redirect-to uri="../"/>
-      </map:match>
+            </map:action>
 
-    </map:pipeline>
-  </map:pipelines>
-</map:sitemap>
+            <!-- Deprecated -->
+            <map:action name="old-sendmail" logger="sitemap.action.sendmail" src="org.apache.cocoon.acting.SendmailAction" />
+        </map:actions>
+
+        <!-- ========================= Transformers ================================ -->
+
+        <map:transformers default="xslt">
+            <map:transformer logger="sitemap.transformer.simpleform" name="simpleform" pool-max="32" src="org.apache.cocoon.transformation.SimpleFormTransformer" />
+        </map:transformers>
+    </map:components>
+
+    <!-- ========================= Resources ================================ -->
+
+    <map:resources>
+        <map:resource name="show-page">
+            <map:generate type="serverpages" src="{target}" />
+            <map:transform src="servlet:style-default:/common/style/xsl/html/simple-page2html.xsl">
+                <map:parameter name="servletPath" value="{request:servletPath}" />
+                <map:parameter name="sitemapURI" value="{request:sitemapURI}" />
+                <map:parameter name="remove" value="{remove}" />
+                <map:parameter name="file" value="{target}" />
+            </map:transform>
+            <map:transform type="simpleform" />
+            <map:transform type="servletLinkRewriter" />
+            <map:serialize />
+        </map:resource>
+    </map:resources>
+
+    <!-- ========================= Flowscripts ================================ -->
+
+    <map:flow language="javascript">
+        <map:script src="mail.js" />
+    </map:flow>
+
+    <!-- ========================= Pipelines ================================ -->
+
+    <map:pipelines>
+        <map:pipeline>
+
+            <map:match pattern="view/page">
+                <map:call resource="show-page">
+                    <map:parameter name="target" value="done.xml" />
+                    <map:parameter name="remove" value="ignored" />
+                </map:call>
+            </map:match>
+
+            <map:match pattern="*">
+                <map:match type="host-matcher" pattern="localhost">
+
+                    <!--+
+                        | To avoid creating an open SPAM relay in default
+                        | deployments, only allow "localhost" as server name.
+                        | -> client accesses this host as localhost => client == server
+                        +-->
+
+                    <map:act type="req-params">
+                        <map:parameter name="parameters" value="use-flow" />
+                        <!--+
+                            | Use flow to send mail
+                            +-->
+                        <map:call function="mail">
+                            <map:parameter name="host" value="{request-param:smtphost}" />
+                            <map:parameter name="user" value="{request-param:smtpuser}" />
+                            <map:parameter name="password" value="{request-param:smtppassword}" />
+                            <map:parameter name="from" value="{request-param:from}" />
+                            <map:parameter name="to" value="{request-param:to}" />
+                            <map:parameter name="subject" value="{request-param:subject}" />
+                            <map:parameter name="body" value="{request-param:body}" />
+                            <map:parameter name="cc" value="{request-param:cc}" />
+                            <map:parameter name="bcc" value="{request-param:bcc}" />
+                        </map:call>
+                    </map:act>
+
+                    <map:act type="req-params">
+                        <map:parameter name="parameters" value="use-action" />
+                        <!--+
+                            | Use action to send mail
+                            +-->
+                        <map:act type="sendmail">
+                            <!--+
+                                | New sendmail action extends the deprecated action with options
+                                | to use CC, BCC, attachments, and more. Incompatibility with
+                                | deprecated action: does not read request parameters. All
+                                | parameters need to be passed explicitly from sitemap.
+                                +-->
+                            <map:parameter name="smtp-host" value="{request-param:smtphost}" />
+                            <map:parameter name="smtp-user" value="{request-param:smtpuser}" />
+                            <map:parameter name="smtp-password" value="{request-param:smtppassword}" />
+                            <map:parameter name="from" value="{request-param:from}" />
+                            <map:parameter name="to" value="{request-param:to}" />
+                            <map:parameter name="subject" value="{request-param:subject}" />
+                            <map:parameter name="body" value="{request-param:body}" />
+                            <map:parameter name="cc" value="{request-param:cc}" />
+                            <map:parameter name="bcc" value="{request-param:bcc}" />
+                            <map:parameter name="attachments" value="attachment cocoon:/// context://welcome.xml" />
+
+                            <map:call resource="show-page">
+                                <map:parameter name="target" value="done.xml" />
+                                <map:parameter name="remove" value="{0}" />
+                            </map:call>
+                        </map:act>
+                    </map:act>
+
+
+                    <map:act type="req-params">
+                        <map:parameter name="parameters" value="use-oldaction" />
+                        <!--+
+                            | Use (deprecated) action to send mail
+                            +-->
+                        <map:act type="old-sendmail">
+                            <map:parameter name="smtp-host" value="{request-param:mail.smtphost}" />
+                            <map:parameter name="smtp-user" value="{request-param:smtpuser}" />
+                            <map:parameter name="smtp-password" value="{request-param:smtppassword}" />
+
+                            <!--+
+                                | optional: if these parameters are not present, they will be read
+                                | from request
+                                +-->
+                            <!--
+                                <map:parameter name="from"        value="{request-param:mail.from}"/>
+                                <map:parameter name="to"          value="{request-param:mail.to}"/>
+                                <map:parameter name="subject"     value="{request-param:mail.subject}"/>
+                                <map:parameter name="body"        value="{request-param:mail.body}"/>
+                            -->
+                            <map:call resource="show-page">
+                                <map:parameter name="target" value="done.xml" />
+                                <map:parameter name="remove" value="{0}" />
+                            </map:call>
+                        </map:act>
+                    </map:act>
+
+
+                    <map:act type="req-params">
+                        <map:parameter name="parameters" value="use-logicsheet" />
+                        <!--+
+                            | Use logicsheet from XSP to send mail
+                            +-->
+                        <map:call resource="show-page">
+                            <map:parameter name="target" value="sendmail_xsp.xml" />
+                            <map:parameter name="remove" value="{0}" />
+                        </map:call>
+                    </map:act>
+
+                </map:match><!-- type="host-matcher" pattern="localhost" -->
+
+
+                <!-- default page -->
+                <map:call resource="show-page">
+                    <map:parameter name="target" value="form.xml" />
+                    <map:parameter name="remove" value="{0}" />
+                </map:call>
+            </map:match>
+
+            <map:match pattern="">
+                <map:redirect-to uri="../" />
+            </map:match>
 
-<!-- end of file -->
+        </map:pipeline>
+    </map:pipelines>
+</map:sitemap>

Modified: cocoon/trunk/blocks/cocoon-mail/cocoon-mail-sample/src/main/resources/COB-INF/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-mail/cocoon-mail-sample/src/main/resources/COB-INF/sitemap.xmap?view=diff&rev=539125&r1=539124&r2=539125
==============================================================================
--- cocoon/trunk/blocks/cocoon-mail/cocoon-mail-sample/src/main/resources/COB-INF/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-mail/cocoon-mail-sample/src/main/resources/COB-INF/sitemap.xmap Thu May 17 14:37:25 2007
@@ -17,52 +17,52 @@
 -->
 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
 
-<!-- =========================== Views =================================== -->
+    <!-- =========================== Views =================================== -->
 
-  <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="servlet:style-default:/stylesheets/system/xml2html.xslt"/>
-      <map:transform type="servletLinkRewriter" />
-      <map:serialize type="html"/>
-    </map:view>
-
-    <map:view name="links" from-position="last">
-      <map:serialize type="links"/>
-    </map:view>
-  </map:views>
-
-<!-- =========================== Pipelines ================================= -->
-
-  <map:pipelines>
-    <map:pipeline>
-
-      <map:match pattern="">
-        <map:redirect-to uri="samples"/>
-      </map:match>
-
-      <map:match pattern="welcome">
-        <map:redirect-to uri="samples"/>
-      </map:match>
-
-      <map:match pattern="samples">
-        <map:generate src="samples.xml"/>
-        <map:transform src="servlet:style-default:/common/style/xsl/html/simple-samples2html.xsl" />
-        <map:transform type="servletLinkRewriter" />
-        <map:serialize/>
-      </map:match>
-
-      <!-- samples automount -->
-      <map:match pattern="*/**">
-        <map:mount uri-prefix="{1}" src="{1}/"/>
-      </map:match>
+    <map:views>
+        <map:view name="content" from-label="content">
+            <map:serialize type="xml" />
+        </map:view>
+
+        <map:view from-label="content" name="pretty-content">
+            <!-- Make use of servlet services -->
+            <map:serialize type="servletService">
+                <map:parameter name="service" value="servlet:style-default:/service/system/xml2html" />
+            </map:serialize>
+        </map:view>
+
+        <map:view name="links" from-position="last">
+            <map:serialize type="links" />
+        </map:view>
+    </map:views>
+
+    <!-- =========================== Pipelines ================================= -->
+
+    <map:pipelines>
+        <map:pipeline>
+
+            <map:match pattern="">
+                <map:redirect-to uri="samples" />
+            </map:match>
+
+            <map:match pattern="welcome">
+                <map:redirect-to uri="samples" />
+            </map:match>
+
+            <map:match pattern="samples">
+                <map:generate src="samples.xml" />
+                <!-- Make use of servlet services -->
+                <map:serialize type="servletService">
+                    <map:parameter name="service" value="servlet:style-default:/service/common/simple-samples2html" />
+                </map:serialize>
+            </map:match>
+
+            <!-- samples automount -->
+            <map:match pattern="*/**">
+                <map:mount uri-prefix="{1}" src="{1}/" />
+            </map:match>
 
-    </map:pipeline>
-  </map:pipelines>
+        </map:pipeline>
+    </map:pipelines>
 
 </map:sitemap>
-
-<!-- end of file -->

Modified: cocoon/trunk/blocks/cocoon-midi/cocoon-midi-sample/src/main/resources/COB-INF/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-midi/cocoon-midi-sample/src/main/resources/COB-INF/sitemap.xmap?view=diff&rev=539125&r1=539124&r2=539125
==============================================================================
--- cocoon/trunk/blocks/cocoon-midi/cocoon-midi-sample/src/main/resources/COB-INF/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-midi/cocoon-midi-sample/src/main/resources/COB-INF/sitemap.xmap Thu May 17 14:37:25 2007
@@ -17,73 +17,81 @@
 -->
 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
 
-  <!-- =========================== Components ================================ -->
-  <map:components> 
-    <map:generators default="file">
-      <map:generator name="xmidi" src="org.apache.cocoon.generation.XMidiGenerator" logger="midi.sitemap.generator"/>
-    </map:generators>
-    <map:serializers default="html">
-      <map:serializer name="xmidi" src="org.apache.cocoon.serialization.XMidiSerializer" logger="midi.sitemap.serializer"/>
-    </map:serializers>
-  </map:components>
-
-<!-- =========================== Views =================================== -->
-  <map:views>
-    <map:view name="xmi" from-label="xmi">
-      <map:serialize type="xml"/>
-    </map:view>
-  </map:views>
-
-  <!-- =========================== Pipelines ================================= -->
-  <map:pipelines> 
-  
-    <map:pipeline>
-
-      <map:match pattern="">
-        <map:generate src="samples.xml"/>
-        <map:transform src="servlet:style-default:/common/style/xsl/html/simple-samples2html.xsl" />
-        <map:transform type="servletLinkRewriter" />
-        <map:serialize/>
-      </map:match>
-      
-      <map:match pattern="*.mid">
-      	<map:read src="midi/{1}.mid" mime-type="audio/x-midi"/>
-      </map:match>
-        
-      <map:match pattern="*.xmi">
-      	<map:generate type="xmidi" src="midi/{1}.mid"/>
-      	<map:serialize type="xml"/>
-      </map:match>
-
-      <map:match pattern="xmidi/*.mid">
-      	<map:generate type="xmidi" src="midi/{1}.mid" label="xmi"/>
-      	<map:serialize type="xmidi"/>
-      </map:match>
-
-      <map:match pattern="transposed/*.mid">
-      	<map:generate type="xmidi" src="midi/{1}.mid"/>
-      	<map:transform type="xslt" src="stylesheets/transpose.xsl" label="xmi">
-          <map:parameter name="transposition" value="{request-param:transposition}"/>	
-      	</map:transform>
-      	<map:serialize type="xmidi"/>
-      </map:match>
-            
-      <map:match pattern="inverted/*.mid">
-      	<map:generate type="xmidi" src="midi/{1}.mid"/>
-      	<map:transform type="xslt" src="stylesheets/invert.xsl" label="xmi"/>
-      	<map:serialize type="xmidi"/>
-      </map:match>
-      <!--
-      <map:match pattern="reversed/*.mid">
-      	<map:generate type="xmidi" src="midi/{1}.mid"/>
-      	<map:transform type="xslt" src="stylesheets/retrograde.xsl" label="xmi"/>
-      	<map:serialize type="xmidi"/>
-      </map:match>
-      -->
-    </map:pipeline>
+    <!-- =========================== Components ================================ -->
+
+    <map:components>
+
+        <!-- =========================== Generators ================================ -->
+
+        <map:generators default="file">
+            <map:generator name="xmidi" src="org.apache.cocoon.generation.XMidiGenerator" logger="midi.sitemap.generator" />
+        </map:generators>
+
+        <!-- =========================== Serializers ================================ -->
+
+        <map:serializers default="html">
+            <map:serializer name="xmidi" src="org.apache.cocoon.serialization.XMidiSerializer" logger="midi.sitemap.serializer" />
+        </map:serializers>
+    </map:components>
+
+    <!-- =========================== Views =================================== -->
+
+    <map:views>
+        <map:view name="xmi" from-label="xmi">
+            <map:serialize type="xml" />
+        </map:view>
+    </map:views>
+
+    <!-- =========================== Pipelines ================================= -->
+
+    <map:pipelines>
+        <map:pipeline>
+            <map:match pattern="">
+                <map:generate src="samples.xml" />
+                <!-- Make use of servlet services -->
+                <map:serialize type="servletService">
+                    <map:parameter name="service" value="servlet:style-default:/service/common/simple-samples2html" />
+                </map:serialize>
+            </map:match>
+
+            <map:match pattern="*.mid">
+                <map:read src="midi/{1}.mid" mime-type="audio/x-midi" />
+            </map:match>
+
+            <map:match pattern="*.xmi">
+                <map:generate type="xmidi" src="midi/{1}.mid" />
+                <map:serialize type="xml" />
+            </map:match>
+
+            <map:match pattern="xmidi/*.mid">
+                <map:generate type="xmidi" src="midi/{1}.mid" label="xmi" />
+                <map:serialize type="xmidi" />
+            </map:match>
+
+            <map:match pattern="transposed/*.mid">
+                <map:generate type="xmidi" src="midi/{1}.mid" />
+                <map:transform type="xslt" src="stylesheets/transpose.xsl" label="xmi">
+                    <map:parameter name="transposition" value="{request-param:transposition}" />
+                </map:transform>
+                <map:serialize type="xmidi" />
+            </map:match>
+
+            <map:match pattern="inverted/*.mid">
+                <map:generate type="xmidi" src="midi/{1}.mid" />
+                <map:transform type="xslt" src="stylesheets/invert.xsl" label="xmi" />
+                <map:serialize type="xmidi" />
+            </map:match>
+            <!--
+                <map:match pattern="reversed/*.mid">
+                <map:generate type="xmidi" src="midi/{1}.mid"/>
+                <map:transform type="xslt" src="stylesheets/retrograde.xsl" label="xmi"/>
+                <map:serialize type="xmidi"/>
+                </map:match>
+            -->
+        </map:pipeline>
+
+    </map:pipelines>
 
-  </map:pipelines> 
-  
 </map:sitemap>
 
 

Modified: cocoon/trunk/blocks/cocoon-ojb/cocoon-ojb-sample/src/main/resources/COB-INF/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-ojb/cocoon-ojb-sample/src/main/resources/COB-INF/sitemap.xmap?view=diff&rev=539125&r1=539124&r2=539125
==============================================================================
--- cocoon/trunk/blocks/cocoon-ojb/cocoon-ojb-sample/src/main/resources/COB-INF/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-ojb/cocoon-ojb-sample/src/main/resources/COB-INF/sitemap.xmap Thu May 17 14:37:25 2007
@@ -18,114 +18,112 @@
 
 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
 
-  <map:components>
-    <map:transformers default="xslt">
-      <map:transformer name="i18n" src="org.apache.cocoon.transformation.I18nTransformer">
-        <catalogues default="other">
-          <catalogue id="other" name="OtherMessages" location="servlet:forms:/resource/internal/i18n"/>
-          <catalogue id="forms" name="messages" location="servlet:forms:/resource/internal/i18n" />
-        </catalogues>
-        <cache-at-startup>true</cache-at-startup>
-      </map:transformer>
-    </map:transformers>
-  </map:components>
-
-
-  <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="servlet:style-default:/stylesheets/system/xml2html.xslt"/>
-      <map:transform type="servletLinkRewriter" />
-      <map:serialize type="html"/>
-    </map:view>
-
-    <map:view name="links" from-position="last">
-      <map:serialize type="links"/>
-    </map:view>
-  </map:views>
-
-
-  <!-- indicates what flowscript to attach to this sitemap -->
-  <map:flow language="javascript">
-    <map:script src="forms/employee.js"/>
-  </map:flow>
-
-
-  <map:pipelines>
-    <map:pipeline>
-
-      <map:match pattern="">
-        <map:generate src="welcome.xml"/>
-        <map:transform src="servlet:style-default:/common/style/xsl/html/simple-samples2html.xsl" />
-        <map:transform type="servletLinkRewriter" />
-        <map:serialize/>
-      </map:match>
-
-      <map:match pattern="*/xspdemo">
-        <map:generate src="{1}/xsp/demo1.xsp" type="serverpages"/>
-        <map:transform src="servlet:style-default:/blocks/dynamic-page2html.xsl">
-          <map:parameter name="servletPath" value="{request:servletPath}"/>
-          <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
-          <map:parameter name="file" value="jdo/xsp/xspdemo.xsp"/>
-          <map:parameter name="remove" value="{0}"/>
-        </map:transform>
-        <map:transform type="servletLinkRewriter" />
-        <map:serialize/>
-      </map:match>
-
-      <!--
-         - "Form1" example, demonstrates usage of flow and forms
-         -->
-
-      <map:match pattern="jdo/forms/employee">
-        <map:call function="handleForm">
-          <map:parameter name="function" value="employeeform_jdo"/>
-          <map:parameter name="form-definition" value="forms/employee.xml"/>
-          <map:parameter name="bindingURI" value="forms/employee_bind.xml"/>
-        </map:call>
-      </map:match>
-
-      <map:match pattern="jdo/forms/employee-form-display">
-        <map:generate src="forms/employee_template.xml"/>
-        <map:transform type="forms"/>
-        <map:transform type="i18n">
-          <map:parameter name="locale" value="en-US"/>
-        </map:transform>
-        <map:transform src="resources/forms-samples-styling.xsl">
-          <map:parameter name="dojo-resources" value="{servlet:ajax:/resource/external/dojo}"/>
-          <map:parameter name="forms-resources" value="{servlet:forms:/resource/external/forms}"/>
-        </map:transform>
-        <map:transform src="servlet:style-default:/common/style/xsl/html/simple-page2html.xsl">
-          <map:parameter name="servletPath" value="{request:servletPath}"/>
-          <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
-          <map:parameter name="file" value="forms/employee.xml"/>
-          <map:parameter name="remove" value="{0}"/>
-        </map:transform>
-        <map:transform type="servletLinkRewriter" />
-        <map:serialize/>
-      </map:match>
-
-      <map:match pattern="jdo/forms/employee-form-success">
-        <map:generate type="serverpages" src="forms/success.xsp"/>
-        <map:transform src="servlet:style-default:/common/style/xsl/html/simple-page2html.xsl">
-          <map:parameter name="servletPath" value="{request:servletPath}"/>
-          <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
-          <map:parameter name="file" value="forms/success.xsp"/>
-          <map:parameter name="remove" value="{0}"/>
-        </map:transform>
-        <map:transform type="servletLinkRewriter" />
-        <map:serialize/>
-      </map:match>
-
-      <!-- Manages continuations -->
-      <map:match pattern="jdo/forms/*.continue">
-        <map:call continuation="{1}"/>
-      </map:match>
+    <!-- =========================== Components =================================== -->
 
-    </map:pipeline>
-  </map:pipelines>
+    <map:components>
+
+        <!-- =========================== Transformers =================================== -->
+
+        <map:transformers default="xslt">
+            <map:transformer name="i18n" src="org.apache.cocoon.transformation.I18nTransformer">
+                <catalogues default="other">
+                    <catalogue id="other" name="OtherMessages" location="servlet:forms:/resource/internal/i18n" />
+                    <catalogue id="forms" name="messages" location="servlet:forms:/resource/internal/i18n" />
+                </catalogues>
+                <cache-at-startup>true</cache-at-startup>
+            </map:transformer>
+        </map:transformers>
+
+    </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">
+            <!-- Make use of servlet services -->
+            <map:serialize type="servletService">
+                <map:parameter name="service" value="servlet:style-default:/service/system/xml2html" />
+            </map:serialize>
+        </map:view>
+
+        <map:view from-position="last" name="links">
+            <map:serialize type="links" />
+        </map:view>
+    </map:views>
+
+    <!-- =========================== Flowscripts =================================== -->
+
+    <map:flow language="javascript">
+        <map:script src="forms/employee.js" />
+    </map:flow>
+
+    <!-- =========================== Pipelines =================================== -->
+
+    <map:pipelines>
+        <map:pipeline>
+
+            <map:match pattern="">
+                <map:generate src="welcome.xml" />
+                <!-- Make use of servlet services -->
+                <map:serialize type="servletService" mime-type="text/html">
+                    <map:parameter name="service" value="servlet:style-default:/service/common/simple-samples2html" />
+                </map:serialize>
+            </map:match>
+
+            <map:match pattern="*/xspdemo">
+                <map:generate src="{1}/xsp/demo1.xsp" type="serverpages" />
+                <!-- Make use of servlet services -->
+                <map:serialize type="servletService" mime-type="text/html">
+                    <map:parameter name="service" value="servlet:style-default:/service/blocks/dynamic-page2html" />
+                </map:serialize>
+            </map:match>
+
+            <!--
+                - "Form1" example, demonstrates usage of flow and forms
+            -->
+
+            <map:match pattern="jdo/forms/employee">
+                <map:call function="handleForm">
+                    <map:parameter name="function" value="employeeform_jdo" />
+                    <map:parameter name="form-definition" value="forms/employee.xml" />
+                    <map:parameter name="bindingURI" value="forms/employee_bind.xml" />
+                </map:call>
+            </map:match>
+
+            <map:match pattern="jdo/forms/employee-form-display">
+                <map:generate src="forms/employee_template.xml" />
+                <map:transform type="forms" />
+                <map:transform type="i18n">
+                    <map:parameter name="locale" value="en-US" />
+                </map:transform>
+                <map:transform src="resources/forms-samples-styling.xsl">
+                    <map:parameter name="dojo-resources" value="{servlet:ajax:/resource/external/dojo}" />
+                    <map:parameter name="forms-resources" value="{servlet:forms:/resource/external/forms}" />
+                </map:transform>
+                <!-- Make use of servlet services -->
+                <map:serialize type="servletService" mime-type="text/html">
+                    <map:parameter name="service" value="servlet:style-default:/service/common/simple-page2html" />
+                </map:serialize>
+            </map:match>
+
+            <map:match pattern="jdo/forms/employee-form-success">
+                <map:generate type="serverpages" src="forms/success.xsp" />
+                <!-- Make use of servlet services -->
+                <map:serialize type="servletService" mime-type="text/html">
+                    <map:parameter name="service" value="servlet:style-default:/service/common/simple-page2html" />
+                </map:serialize>
+            </map:match>
+
+            <!-- Manages continuations -->
+            <map:match pattern="jdo/forms/*.continue">
+                <map:call continuation="{1}" />
+            </map:match>
+
+        </map:pipeline>
+    </map:pipelines>
 
 </map:sitemap>



Mime
View raw message