cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r539087 - in /cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF: flow/jxcalc/sitemap.xmap flow/sitemap.xmap hello-world/sitemap.xmap i18n/sitemap.xmap sitemap.xmap system/sitemap.xmap
Date Thu, 17 May 2007 19:29:45 GMT
Author: felixk
Date: Thu May 17 12:29:44 2007
New Revision: 539087

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

Modified:
    cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/flow/jxcalc/sitemap.xmap
    cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/flow/sitemap.xmap
    cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/hello-world/sitemap.xmap
    cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/i18n/sitemap.xmap
    cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sitemap.xmap
    cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/system/sitemap.xmap

Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/flow/jxcalc/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/flow/jxcalc/sitemap.xmap?view=diff&rev=539087&r1=539086&r2=539087
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/flow/jxcalc/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/flow/jxcalc/sitemap.xmap Thu May 17 12:29:44 2007
@@ -18,74 +18,74 @@
 
 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
 
-  <!-- indicates what flowscript to attach to this sitemap -->
-  <map:flow language="javascript">
-    <map:script src="calc.js"/>
-  </map:flow>
-
-  <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:pipelines>
-    <map:pipeline>
-      <!--+
-          | produces the screens called by the flowscript
-          +-->     
-      <map:match pattern="page/*">
-        <map:generate type="jx" src="screens/{1}.xml"/>
-        <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="contextPath" value="{request:contextPath}"/>
-          <map:parameter name="file" value="servlet:/flow/jxcalc/screens/{1}.xml"/>
-          <map:parameter name="remove" value="{0}"/>
-        </map:transform>
-        <map:transform type="servletLinkRewriter" />
-        <map:serialize/>
-      </map:match>
-    </map:pipeline>
-
-    <map:pipeline>
-      <!--+
-          | matches the page with the continuation ID and calls the flowscript
-          | associated to this sitemap with the given continuation ID. The flow
-          | engine will then look into the continuation store, retrieve
-          | the correct continuation and resume execution of the flowscript
-          | with that continuation. This guarantees transparent state 
-          | resumption between requests without the need for anything else
-          | (cookies or URL-encoded session IDs)
-          +-->
-      <map:match pattern="continue.*">
-        <map:call continuation="{1}"/>
-      </map:match>
-
-      <!--+
-          | matches the call to the beginning of the flow and calls the flow
-          | from its entry point which, in this case is the 'calculator()'
-          | javascript function.
-          +-->
-      <map:match pattern="">
-        <map:call function="calculator"/>
-      </map:match>
-      
-      <!-- Make screens available to be used by other (sample-)blocks -->
-      <map:match pattern="screens/**">
-        <map:read src="screens/{1}" />
-      </map:match>
+    <!-- =========================== Flowscripts =================================== -->
 
-    </map:pipeline>
-  </map:pipelines>
+    <map:flow language="javascript">
+        <map:script src="calc.js" />
+    </map:flow>
+
+    <!-- =========================== 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>
+
+    <!-- =========================== Pipelines ================================= -->
+    <map:pipelines>
+        <map:pipeline>
+            <!--+
+                | produces the screens called by the flowscript
+                +-->
+            <map:match pattern="page/*">
+                <map:generate type="jx" src="screens/{1}.xml" />
+                <!-- Make use of servlet services -->
+                <map:serialize type="servletService">
+                    <map:parameter name="service" value="servlet:style-default:/service/common/simple-page2html" />
+                </map:serialize>
+            </map:match>
+        </map:pipeline>
+
+        <map:pipeline>
+            <!--+
+                | matches the page with the continuation ID and calls the flowscript
+                | associated to this sitemap with the given continuation ID. The flow
+                | engine will then look into the continuation store, retrieve
+                | the correct continuation and resume execution of the flowscript
+                | with that continuation. This guarantees transparent state 
+                | resumption between requests without the need for anything else
+                | (cookies or URL-encoded session IDs)
+                +-->
+            <map:match pattern="continue.*">
+                <map:call continuation="{1}" />
+            </map:match>
+
+            <!--+
+                | matches the call to the beginning of the flow and calls the flow
+                | from its entry point which, in this case is the 'calculator()'
+                | javascript function.
+                +-->
+            <map:match pattern="">
+                <map:call function="calculator" />
+            </map:match>
+
+            <!-- Make screens available to be used by other (sample-)blocks -->
+            <map:match pattern="screens/**">
+                <map:read src="screens/{1}" />
+            </map:match>
+
+        </map:pipeline>
+    </map:pipelines>
 </map:sitemap>

Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/flow/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/flow/sitemap.xmap?view=diff&rev=539087&r1=539086&r2=539087
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/flow/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/flow/sitemap.xmap Thu May 17 12:29:44 2007
@@ -20,45 +20,47 @@
 
 <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="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:pipelines>
-    <map:pipeline>
-      
-      <map:match pattern="j">
-        <map:generate src="samples.xml" type="jx"/>
-        <map:serialize type="xml"/>
-      </map:match>
-
-      <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="*">
-        <map:redirect-to uri="{1}/"/>
-      </map:match>
-
-      <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>
+
+    <map:pipelines>
+        <map:pipeline>
+
+            <map:match pattern="j">
+                <map:generate src="samples.xml" type="jx" />
+                <map:serialize type="xml" />
+            </map:match>
+
+            <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="*">
+                <map:redirect-to uri="{1}/" />
+            </map:match>
+
+            <map:match pattern="*/**">
+                <map:mount uri-prefix="{1}" src="{1}/" />
+            </map:match>
 
-    </map:pipeline>
-  </map:pipelines>
+        </map:pipeline>
+    </map:pipelines>
 </map:sitemap>

Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/hello-world/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/hello-world/sitemap.xmap?view=diff&rev=539087&r1=539086&r2=539087
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/hello-world/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/hello-world/sitemap.xmap Thu May 17 12:29:44 2007
@@ -20,143 +20,154 @@
 
 <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: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="hello.xml">
-    <map:generate src="content/hello.xml"/>
-    <map:serialize type="xml"/>
-   </map:match>
-
-   <map:match pattern="hello.html">
-    <map:generate src="content/hello.xml"/>
-    <map:transform src="style/xsl/page2html.xsl"/>
-    <map:serialize type="html"/>
-   </map:match>
-
-   <map:match pattern="hello.xhtml">
-    <map:generate src="content/hello.xml"/>
-    <map:transform src="style/xsl/page2html.xsl"/>
-    <map:serialize type="xhtml"/>
-   </map:match>
-
-   <map:match pattern="hello.txt">
-    <map:generate src="content/hello.xml"/>
-    <map:serialize type="text"/>
-   </map:match>
-
-   <map:match pattern="hello.wml">
-    <map:generate src="content/hello.xml"/>
-    <map:transform src="style/xsl/page2wml.xsl"/>
-    <map:serialize type="wml"/>
-   </map:match>
-
-   <map:match pattern="hello.chtml">
-    <map:generate src="content/hello.xml"/>
-    <map:transform src="style/xsl/page2chtml.xsl"/>
-    <map:serialize type="chtml"/>
-   </map:match>
-
-   <map:match pattern="hello.vml">
-    <map:generate src="content/hello.xml"/>
-    <map:transform src="style/xsl/page2vml.xsl"/>
-    <map:serialize type="xml"/>
-   </map:match>
-
-   <map:match pattern="hello.svg">
-    <map:generate src="content/hello.xml"/>
-    <map:transform src="style/xsl/page2svg.xsl"/>
-    <map:serialize type="svgxml"/>
-   </map:match>
-
-   <map:match pattern="hello.swf">
-    <map:read src="style/swf/hello.swf"/>
-   </map:match>
-
-   <map:match pattern="hello.wrl">
-    <map:generate src="content/hello.xml"/>
-    <map:transform src="style/xsl/page2vrml.xsl"/>
-    <map:serialize type="vrml"/>
-   </map:match>
-
-   <map:match pattern="hello.service">
-    <map:generate src="content/hello.xml"/>
-    <map:transform src="style/xsl/page2html.xsl"/>
-    <map:serialize type="xml"/>
-   </map:match>
-
-   <map:match pattern="hello.service/WSDL">
-    <map:generate src="webservice/HelloWorld.wsdl"/>
-    <map:serialize type="xml"/>
-   </map:match>
-
-   <map:match pattern="hello.sxw">
-    <map:generate src="content/hello.xml"/>
-    <map:transform src="style/xsl/page2sxw.xsl"/>
-    <map:serialize type="sxw"/>
-   </map:match>
-
-   <map:match pattern="hello.sxc">
-    <map:generate src="content/hello.xml"/>
-    <map:transform src="style/xsl/page2sxc.xsl"/>
-    <map:serialize type="sxc"/>
-   </map:match>
-
-   <map:match pattern="hello.sxi">
-    <map:generate src="content/hello.xml"/>
-    <!-- FIXME: XSLTC fails on this stylesheet -->
-    <map:transform type="xalan" src="style/xsl/page2sxi.xsl"/>
-    <map:serialize type="sxi"/>
-   </map:match>
-
-   <map:match pattern="hello.sxd">
-    <map:generate src="content/hello.xml"/>
-    <map:transform src="style/xsl/page2sxd.xsl"/>
-    <map:serialize type="sxd"/>
-   </map:match>
-
-   <map:match pattern="hello-worldml.doc">
-    <map:generate src="content/hello.xml"/>
-    <map:transform src="style/xsl/page2wordml.xsl"/>
-    <map:serialize type="xml"/>
-   </map:match>
-
-   <map:match pattern="hello.zip">
-    <map:generate src="content/hello_zip.xml"/>
-    <map:serialize type="zip"/>
-   </map:match>
-   
-   <!-- Make styles available to be used by other (sample-)blocks -->
-   <map:match pattern="style/**.xsl">
-     <map:read src="style/{1}.xsl" />
-   </map:match>
-  </map:pipeline>
- </map:pipelines>
+    <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 id="service-resource">
+            <!-- 
+                All matcher in this pipeline are intended to be called
+                when making use of servlet services from other blocks 
+            -->
+        </map:pipeline>
+
+        <map:pipeline id="internal">
+            <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="hello.xml">
+                <map:generate src="content/hello.xml" />
+                <map:serialize type="xml" />
+            </map:match>
+
+            <map:match pattern="hello.html">
+                <map:generate src="content/hello.xml" />
+                <map:transform src="style/xsl/page2html.xsl" />
+                <map:serialize type="html" />
+            </map:match>
+
+            <map:match pattern="hello.xhtml">
+                <map:generate src="content/hello.xml" />
+                <map:transform src="style/xsl/page2html.xsl" />
+                <map:serialize type="xhtml" />
+            </map:match>
+
+            <map:match pattern="hello.txt">
+                <map:generate src="content/hello.xml" />
+                <map:serialize type="text" />
+            </map:match>
+
+            <map:match pattern="hello.wml">
+                <map:generate src="content/hello.xml" />
+                <map:transform src="style/xsl/page2wml.xsl" />
+                <map:serialize type="wml" />
+            </map:match>
+
+            <map:match pattern="hello.chtml">
+                <map:generate src="content/hello.xml" />
+                <map:transform src="style/xsl/page2chtml.xsl" />
+                <map:serialize type="chtml" />
+            </map:match>
+
+            <map:match pattern="hello.vml">
+                <map:generate src="content/hello.xml" />
+                <map:transform src="style/xsl/page2vml.xsl" />
+                <map:serialize type="xml" />
+            </map:match>
+
+            <map:match pattern="hello.svg">
+                <map:generate src="content/hello.xml" />
+                <map:transform src="style/xsl/page2svg.xsl" />
+                <map:serialize type="svgxml" />
+            </map:match>
+
+            <map:match pattern="hello.swf">
+                <map:read src="style/swf/hello.swf" />
+            </map:match>
+
+            <map:match pattern="hello.wrl">
+                <map:generate src="content/hello.xml" />
+                <map:transform src="style/xsl/page2vrml.xsl" />
+                <map:serialize type="vrml" />
+            </map:match>
+
+            <map:match pattern="hello.service">
+                <map:generate src="content/hello.xml" />
+                <map:transform src="style/xsl/page2html.xsl" />
+                <map:serialize type="xml" />
+            </map:match>
+
+            <map:match pattern="hello.service/WSDL">
+                <map:generate src="webservice/HelloWorld.wsdl" />
+                <map:serialize type="xml" />
+            </map:match>
+
+            <map:match pattern="hello.sxw">
+                <map:generate src="content/hello.xml" />
+                <map:transform src="style/xsl/page2sxw.xsl" />
+                <map:serialize type="sxw" />
+            </map:match>
+
+            <map:match pattern="hello.sxc">
+                <map:generate src="content/hello.xml" />
+                <map:transform src="style/xsl/page2sxc.xsl" />
+                <map:serialize type="sxc" />
+            </map:match>
+
+            <map:match pattern="hello.sxi">
+                <map:generate src="content/hello.xml" />
+                <!-- FIXME: XSLTC fails on this stylesheet -->
+                <map:transform type="xalan" src="style/xsl/page2sxi.xsl" />
+                <map:serialize type="sxi" />
+            </map:match>
+
+            <map:match pattern="hello.sxd">
+                <map:generate src="content/hello.xml" />
+                <map:transform src="style/xsl/page2sxd.xsl" />
+                <map:serialize type="sxd" />
+            </map:match>
+
+            <map:match pattern="hello-worldml.doc">
+                <map:generate src="content/hello.xml" />
+                <map:transform src="style/xsl/page2wordml.xsl" />
+                <map:serialize type="xml" />
+            </map:match>
+
+            <map:match pattern="hello.zip">
+                <map:generate src="content/hello_zip.xml" />
+                <map:serialize type="zip" />
+            </map:match>
+        </map:pipeline>
+
+        <map:pipeline id="external">
+            <!-- Make styles available to be used by other (sample-)blocks -->
+            <map:match pattern="style/**.xsl">
+                <map:read src="style/{1}.xsl" />
+            </map:match>
+        </map:pipeline>
+    </map:pipelines>
 </map:sitemap>

Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/i18n/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/i18n/sitemap.xmap?view=diff&rev=539087&r1=539086&r2=539087
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/i18n/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/i18n/sitemap.xmap Thu May 17 12:29:44 2007
@@ -24,185 +24,184 @@
 
 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
 
-  <!-- =========================== Components ================================ -->
-  <map:components>
-    <map:generators default="file">
-      <!--+
-          | Redefine generators to remove their labels (otherwise aggregated parts also go through views)
-          +-->
-      <map:generator name="file"
-                     logger="sitemap.generator.file"
-                     src="org.apache.cocoon.generation.FileGenerator"/>
-      <map:generator name="serverpages"
-                     logger="sitemap.generator.serverpages"
-                     src="org.apache.cocoon.generation.ServerPagesGenerator"/>
-    </map:generators>
-
-    <map:transformers default="xslt">
-      <!--+
-          | Configure i18n transformer with message catalogues
-          +-->
-      <map:transformer name="i18n"
-                       logger="sitemap.transformer.i18n"
-                       src="org.apache.cocoon.transformation.I18nTransformer">
-        <catalogues default="messages">
-          <catalogue id="messages" name="messages" location="translations"/>
-          <catalogue id="menu" name="menu" location="translations"/>
-          <catalogue id="tiered" name="messages">
-            <location>translations/tiered</location>
-            <location>translations</location>
-          </catalogue>
-        </catalogues>
-      </map:transformer>
-    </map:transformers>
-
-    <map:actions>
-      <!--+
-          | Locale action is used to set/get current user locale.
-          | See Javadocs for details.
-          +-->
-      <map:action name="locale" logger="sitemap.action.locale" src="org.apache.cocoon.acting.LocaleAction">
-        <!-- Creates a new session if needed. Used with 'store-in-session' param -->
-        <create-session>true</create-session>
-        <!--+
-            | Stores locale information in session. A session should be created before,
-            | otherwise 'create-session' should be true.
-            +-->
-        <store-in-session>true</store-in-session>
-        <!-- Stores locale information in request attributes -->
-        <store-in-request>true</store-in-request>
-        <!-- Stores locale information in a client cookie -->
-        <store-in-cookie>false</store-in-cookie>
-        <!--+
-            | Uncomment to override default:
-        <locale-attribute>locale</locale-attribute>
-        <use-locale>true</use-locale>
-        <default-locale language="en" country="US"/>
-            +-->
-      </map:action>
-    </map:actions>
-  </map:components>
-
-  <!-- =========================== Resources =============================== -->
-  <map:resources>
-    <!--+
-        | This resource is used to create a composite page from menu and content
-        +-->
-    <map:resource name="composite">
-      <map:aggregate element="root">
-        <map:part src="cocoon:/menu/{../0}"/>
-        <map:part src="cocoon:/content/{../0}" label="content"/>
-      </map:aggregate>
-      <map:transform src="simple2page.xsl">
-        <map:parameter name="page" value="{../0}"/>
-        <map:parameter name="locale" value="{../../locale}"/>
-      </map:transform>
-      <map:transform src="servlet:style-default:/common/style/xsl/html/complex-page2html.xsl" />
-      <map:transform type="servletLinkRewriter" />
-      <map:serialize type="html"/>
-    </map:resource>
-  </map:resources>
-
-  <!-- =========================== Views =================================== -->
-  <map:views>
-    <map:view name="content" from-label="content">
-      <map:serialize type="xml"/>
-    </map:view>
-
-    <map:view name="pretty-content" from-label="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>
-      <!-- Default pipeline -->
-      <map:match pattern="">
-        <map:redirect-to uri="simple.xml"/>
-      </map:match>
+    <!-- =========================== Components ================================ -->
+
+    <map:components>
+        <map:generators default="file">
+            <!--+
+                | Redefine generators to remove their labels (otherwise aggregated parts also go through views)
+                +-->
+            <map:generator name="file" logger="sitemap.generator.file" src="org.apache.cocoon.generation.FileGenerator" />
+            <map:generator name="serverpages" logger="sitemap.generator.serverpages" src="org.apache.cocoon.generation.ServerPagesGenerator" />
+        </map:generators>
+
+        <map:transformers default="xslt">
+            <!--+
+                | Configure i18n transformer with message catalogues
+                +-->
+            <map:transformer name="i18n" logger="sitemap.transformer.i18n" src="org.apache.cocoon.transformation.I18nTransformer">
+                <catalogues default="messages">
+                    <catalogue id="messages" name="messages" location="translations" />
+                    <catalogue id="menu" name="menu" location="translations" />
+                    <catalogue id="tiered" name="messages">
+                        <location>translations/tiered</location>
+                        <location>translations</location>
+                    </catalogue>
+                </catalogues>
+            </map:transformer>
+        </map:transformers>
+
+        <map:actions>
+            <!--+
+                | Locale action is used to set/get current user locale.
+                | See Javadocs for details.
+                +-->
+            <map:action name="locale" logger="sitemap.action.locale" src="org.apache.cocoon.acting.LocaleAction">
+                <!-- Creates a new session if needed. Used with 'store-in-session' param -->
+                <create-session>true</create-session>
+                <!--+
+                    | Stores locale information in session. A session should be created before,
+                    | otherwise 'create-session' should be true.
+                    +-->
+                <store-in-session>true</store-in-session>
+                <!-- Stores locale information in request attributes -->
+                <store-in-request>true</store-in-request>
+                <!-- Stores locale information in a client cookie -->
+                <store-in-cookie>false</store-in-cookie>
+                <!--+
+                    | Uncomment to override default:
+                    <locale-attribute>locale</locale-attribute>
+                    <use-locale>true</use-locale>
+                    <default-locale language="en" country="US"/>
+                    +-->
+            </map:action>
+        </map:actions>
+    </map:components>
 
-      <map:act type="locale">
+    <!-- =========================== Resources =============================== -->
+    <map:resources>
         <!--+
-            | Locale aware content generation pipeline
+            | This resource is used to create a composite page from menu and content
             +-->
+        <map:resource name="composite">
+            <map:aggregate element="root">
+                <map:part src="cocoon:/menu/{../0}" />
+                <map:part src="cocoon:/content/{../0}" label="content" />
+            </map:aggregate>
+            <map:transform src="simple2page.xsl">
+                <map:parameter name="page" value="{../0}" />
+                <map:parameter name="locale" value="{../../locale}" />
+            </map:transform>
+            <map:transform src="servlet:style-default:/common/style/xsl/html/complex-page2html.xsl" />
+            <map:transform type="servletLinkRewriter" />
+            <map:serialize type="html" />
+        </map:resource>
+    </map:resources>
+
+    <!-- =========================== 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>
+
+    <!-- =========================== Pipelines ================================= -->
+
+    <map:pipelines>
+        <map:pipeline>
+            <!-- Default pipeline -->
+            <map:match pattern="">
+                <map:redirect-to uri="simple.xml" />
+            </map:match>
+
+            <map:act type="locale">
+                <!--+
+                    | Locale aware content generation pipeline
+                    +-->
+
+                <!-- Generate static output (simple.xml) -->
+                <map:match pattern="*.xml">
+                    <map:call resource="composite" />
+                </map:match>
+
+                <!-- Generate dynamic output (simple.xsp) -->
+                <map:match pattern="*.xsp">
+                    <map:call resource="composite" />
+                </map:match>
+
+                <!-- A helper matcher for static content translation and generation -->
+                <map:match pattern="content/tiered.xml">
+                    <map:generate src="tiered.xml" />
+                    <map:transform type="i18n">
+                        <map:parameter name="default-catalogue-id" value="tiered" />
+                        <map:parameter name="locale" value="{../locale}" />
+                    </map:transform>
+                    <map:serialize />
+                </map:match>
+
+                <!-- A helper matcher for static content translation and generation -->
+                <map:match pattern="content/*.xml">
+                    <map:generate src="{1}.xml" />
+                    <map:transform type="i18n">
+                        <map:parameter name="locale" value="{../locale}" />
+                    </map:transform>
+                    <map:serialize />
+                </map:match>
+
+                <!-- A helper matcher for dynamic content translation and generation -->
+                <map:match pattern="content/*.xsp">
+                    <map:generate type="serverpages" src="{1}.xsp" />
+                    <map:transform type="i18n">
+                        <map:parameter name="locale" value="{../locale}" />
+                    </map:transform>
+                    <map:serialize />
+                </map:match>
+
+                <!-- Menu generation -->
+                <map:match pattern="menu/*">
+                    <map:generate src="menu.xml" />
+                    <map:transform type="i18n">
+                        <!-- Override default catalogue for this pipeline -->
+                        <map:parameter name="default-catalogue-id" value="menu" />
+                        <map:parameter name="locale" value="{../locale}" />
+                    </map:transform>
+                    <map:serialize />
+                </map:match>
+            </map:act>
+
+            <!--+
+                | Locale agnostic pipeline part below
+                +-->
+
+            <!-- Display this sitemap source -->
+            <map:match pattern="sitemap.xmap">
+                <map:generate src="sitemap.xmap" />
+                <!-- Make use of servlet services -->
+                <map:serialize type="servletService">
+                    <map:parameter name="service" value="servlet:style-default:/service/system/xml2html" />
+                </map:serialize>
+            </map:match>
+
+            <map:match pattern="*.css">
+                <map:read src="{1}.css" mime-type="text/css" />
+            </map:match>
+
+            <map:match pattern="images/*.gif">
+                <map:read src="images/{1}.gif" mime-type="image/gif" />
+            </map:match>
 
-        <!-- Generate static output (simple.xml) -->
-        <map:match pattern="*.xml">
-          <map:call resource="composite"/>
-        </map:match>
-
-        <!-- Generate dynamic output (simple.xsp) -->
-        <map:match pattern="*.xsp">
-          <map:call resource="composite"/>
-        </map:match>
-
-        <!-- A helper matcher for static content translation and generation -->
-        <map:match pattern="content/tiered.xml">
-          <map:generate src="tiered.xml"/>
-          <map:transform type="i18n">
-            <map:parameter name="default-catalogue-id" value="tiered"/>
-            <map:parameter name="locale" value="{../locale}"/>
-          </map:transform>
-          <map:serialize/>
-        </map:match>
-
-        <!-- A helper matcher for static content translation and generation -->
-        <map:match pattern="content/*.xml">
-          <map:generate src="{1}.xml"/>
-          <map:transform type="i18n">
-            <map:parameter name="locale" value="{../locale}"/>
-          </map:transform>
-          <map:serialize/>
-        </map:match>
-
-        <!-- A helper matcher for dynamic content translation and generation -->
-        <map:match pattern="content/*.xsp">
-          <map:generate type="serverpages" src="{1}.xsp"/>
-          <map:transform type="i18n">
-            <map:parameter name="locale" value="{../locale}"/>
-          </map:transform>
-          <map:serialize/>
-        </map:match>
-
-        <!-- Menu generation -->
-        <map:match pattern="menu/*">
-          <map:generate src="menu.xml"/>
-          <map:transform type="i18n">
-            <!-- Override default catalogue for this pipeline -->
-            <map:parameter name="default-catalogue-id" value="menu"/>
-            <map:parameter name="locale" value="{../locale}"/>
-          </map:transform>
-          <map:serialize/>
-        </map:match>
-      </map:act>
-
-      <!--+
-          | Locale agnostic pipeline part below
-          +-->
-
-      <!-- Display this sitemap source -->
-      <map:match pattern="sitemap.xmap">
-        <map:generate src="sitemap.xmap"/>
-        <map:transform src="servlet:style-default:/stylesheets/system/xml2html.xslt"/>
-        <map:transform type="servletLinkRewriter" />
-        <map:serialize/>
-      </map:match>
-
-      <map:match pattern="*.css">
-        <map:read src="{1}.css" mime-type="text/css"/>
-      </map:match>
-
-      <map:match pattern="images/*.gif">
-        <map:read src="images/{1}.gif" mime-type="image/gif"/>
-      </map:match>
-
-    </map:pipeline>
-  </map:pipelines>
+        </map:pipeline>
+    </map:pipelines>
 </map:sitemap>

Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sitemap.xmap?view=diff&rev=539087&r1=539086&r2=539087
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sitemap.xmap Thu May 17 12:29:44 2007
@@ -27,40 +27,42 @@
 
 <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: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>
-
-      <!-- ========================= Mount sub-sitemaps ============================= -->
-      <map:match pattern="*/**">
-        <map:mount uri-prefix="{1}" src="{1}/"/>
-      </map:match>
-    </map:pipeline>
+    <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: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>
+
+            <!-- ========================= Mount sub-sitemaps ============================= -->
+            <map:match pattern="*/**">
+                <map:mount uri-prefix="{1}" src="{1}/" />
+            </map:match>
+        </map:pipeline>
 
-  </map:pipelines>
+    </map:pipelines>
 </map:sitemap>

Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/system/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/system/sitemap.xmap?view=diff&rev=539087&r1=539086&r2=539087
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/system/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/system/sitemap.xmap Thu May 17 12:29:44 2007
@@ -24,85 +24,92 @@
 
 <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: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="status.html">
-        <map:generate type="status"/>
-        <map:transform src="servlet:style-default:/stylesheets/system/status2html.xslt" />
-        <map:transform type="servletLinkRewriter" />
-        <map:serialize/>
-      </map:match>
-
-      <map:match pattern="status-with-continuations.xml">
-        <map:generate type="status">
-          <map:parameter name="show-cont" value="true"/>
-        </map:generate>
-        <map:serialize type="xml"/>
-      </map:match>     
-      
-      <map:match pattern="status-with-continuations.html">
-        <map:generate src="cocoon:/status-with-continuations.xml"/>
-        <map:transform src="servlet:style-default:/stylesheets/system/status2html.xslt" />
-        <map:transform type="servletLinkRewriter" />
-        <map:serialize/>
-      </map:match>      
-
-      <map:match pattern="clearcache.html">
-        <map:act type="clear-cache">
-          <map:generate src="status" type="status"/>
-          <map:transform src="servlet:style-default:/stylesheets/system/status2html.xslt" />
-          <map:transform type="servletLinkRewriter" />
-          <map:serialize/>
-        </map:act>
-      </map:match>
-
-      <map:match pattern="clearpersistentstore.html">
-        <map:act type="clear-persistent-store">
-          <map:generate src="status" type="status"/>
-          <map:transform src="servlet:style-default:/stylesheets/system/status2html.xslt" />
-          <map:transform type="servletLinkRewriter" />
-          <map:serialize/>
-        </map:act>
-        <map:generate src="no-persistent-store.xml"/>
-        <map:transform src="servlet:style-default:/stylesheets/system/xml2html.xslt"/>
-        <map:transform type="servletLinkRewriter" />
-        <map:serialize type="html"/>
-      </map:match>
-
-      <map:match pattern="request.html">
-        <map:generate type="request"/>
-        <map:transform src="servlet:style-default:/stylesheets/system/xml2html.xslt"/>
-        <map:transform type="servletLinkRewriter" />
-        <map:serialize/>
-      </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: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="status.html">
+                <map:generate type="status" />
+                <!-- Make use of servlet services -->
+                <map:serialize type="servletService">
+                    <map:parameter name="service" value="servlet:style-default:/service/system/status2html" />
+                </map:serialize>
+            </map:match>
+
+            <map:match pattern="status-with-continuations.xml">
+                <map:generate type="status">
+                    <map:parameter name="show-cont" value="true" />
+                </map:generate>
+                <map:serialize type="xml" />
+            </map:match>
+
+            <map:match pattern="status-with-continuations.html">
+                <map:generate src="cocoon:/status-with-continuations.xml" />
+                <!-- Make use of servlet services -->
+                <map:serialize type="servletService">
+                    <map:parameter name="service" value="servlet:style-default:/service/system/status2html" />
+                </map:serialize>
+            </map:match>
+
+            <map:match pattern="clearcache.html">
+                <map:act type="clear-cache">
+                    <map:generate src="status" type="status" />
+                    <!-- Make use of servlet services -->
+                    <map:serialize type="servletService">
+                        <map:parameter name="service" value="servlet:style-default:/service/system/status2html" />
+                    </map:serialize>
+                </map:act>
+            </map:match>
+
+            <map:match pattern="clearpersistentstore.html">
+                <map:act type="clear-persistent-store">
+                    <map:generate src="status" type="status" />
+                    <!-- Make use of servlet services -->
+                    <map:serialize type="servletService">
+                        <map:parameter name="service" value="servlet:style-default:/service/system/status2html" />
+                    </map:serialize>
+                </map:act>
+                <map:generate src="no-persistent-store.xml" />
+                <!-- Make use of servlet services -->
+                <map:serialize type="servletService">
+                    <map:parameter name="service" value="servlet:style-default:/service/system/xml2html" />
+                </map:serialize>
+            </map:match>
+
+            <map:match pattern="request.html">
+                <map:generate type="request" />
+                <!-- Make use of servlet services -->
+                <map:serialize type="servletService">
+                    <map:parameter name="service" value="servlet:style-default:/service/system/xml2html" />
+                </map:serialize>
+            </map:match>
 
-    </map:pipeline>
-  </map:pipelines>
+        </map:pipeline>
+    </map:pipelines>
 </map:sitemap>



Mime
View raw message