cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r539084 [2/3] - in /cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources: COB-INF/ COB-INF/aggregation/ COB-INF/catalog/ COB-INF/errorhandling/ COB-INF/filter/ COB-INF/imagereader/ COB-INF/modules/ COB-INF...
Date Thu, 17 May 2007 19:17:02 GMT
Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/protected/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/protected/sitemap.xmap?view=diff&rev=539084&r1=539083&r2=539084
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/protected/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/protected/sitemap.xmap Thu May 17 12:17:01 2007
@@ -20,114 +20,118 @@
 
 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
 
-  <!-- ========================= Components ============================== -->
-  <map:components>
-    <map:actions>
-      <map:action name="db-authenticator"
-                  src="org.apache.cocoon.acting.DatabaseAuthenticatorAction"/>
-    </map:actions>
-  </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="context://stylesheets/system/xml2html.xslt"/>
-      <map:serialize type="html"/>
-    </map:view>
-
-    <map:view name="links" from-position="last">
-      <map:serialize type="links"/>
-    </map:view>
-  </map:views>
-
-  <!-- ======================= Pipelines ================================= -->
-  <map:pipelines>
-    <map:pipeline>
-
-      <map:match pattern="descriptors/*.xml">
-        <map:generate src="{0}"/>
-        <map:serialize type="xml"/>
-      </map:match>
-
-      <map:match pattern="">
-        <map:redirect-to uri="page"/>
-      </map:match>
-
-      <!-- ================= -->
-      <!-- Simple login page -->
-      <!-- ================= -->
-      <map:match pattern="login">
-        <map:generate src="docs/login.xml"/>
-        <map:transform src="stylesheets/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="docs/login.xml"/>
-          <map:parameter name="remove" value="{0}"/>
-        </map:transform>
-        <map:serialize/>
-      </map:match>
-
-      <!-- ========================================= -->
-      <!-- Form target which performs auth service   -->
-      <!-- ========================================= -->
-      <map:match pattern="do-login">
-        <!-- first validate whether submitted values are ok -->
-        <map:act type="form-validator">
-          <map:parameter name="descriptor" value="descriptors/params.xml"/>
-          <map:parameter name="validate" value="username"/>
-          <!-- now try to log in -->
-          <map:act type="db-authenticator">
-            <map:parameter name="descriptor" value="descriptors/auth.xml"/>
-            <!-- now go to protected area -->
-            <map:redirect-to uri="page"/>
-          </map:act>
-        </map:act>
-        <!-- something was wrong, try it again -->
-        <map:redirect-to uri="login"/>
-      </map:match>
-
-      <!-- ================ -->
-      <!-- Protected area   -->
-      <!-- ================ -->
-      <map:match pattern="page">
-        <!-- first validate whether user has logged in -->
-        <map:act type="session-validator">
-          <map:parameter name="descriptor" value="descriptors/params.xml"/>
-          <map:parameter name="validate" value="username,department_id,theme"/>
-          <!-- generate protected content -->
-          <map:generate type="jx" src="docs/protected.xml">
-            <map:parameter name="username" value="{session-attr:username}"/>
-            <map:parameter name="department_id" value="{session-attr:department_id}"/>
-            <map:parameter name="theme" value="{session-attr:theme}"/>
-          </map:generate>
-          <map:transform src="stylesheets/{theme}-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="docs/protected.xsp"/>
-            <map:parameter name="remove" value="{../0}"/>
-          </map:transform>
-          <map:serialize/>
-        </map:act>
-        <!-- something was wrong, redirect to login page -->
-        <map:redirect-to uri="login"/>
-      </map:match>
-
-      <!-- ========================================= -->
-      <!-- Logout link which invalidates the session -->
-      <!-- ========================================= -->
-      <map:match pattern="do-logout">
-        <map:act type="session-invalidator">
-          <map:redirect-to uri="login"/>
-        </map:act>
-      </map:match>
- 
-    </map:pipeline>
-  </map:pipelines>
+    <!-- ========================= Components ============================== -->
+    <map:components>
+        <map:actions>
+            <map:action name="db-authenticator" src="org.apache.cocoon.acting.DatabaseAuthenticatorAction" />
+        </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>
+
+    <!-- ======================= Pipelines ================================= -->
+
+    <map:pipelines>
+        <map:pipeline>
+
+            <map:match pattern="descriptors/*.xml">
+                <map:generate src="{0}" />
+                <map:serialize type="xml" />
+            </map:match>
+
+            <map:match pattern="">
+                <map:redirect-to uri="page" />
+            </map:match>
+
+            <!-- ================= -->
+            <!-- Simple login page -->
+            <!-- ================= -->
+            <map:match pattern="login">
+                <map:generate src="docs/login.xml" />
+                <map:transform src="stylesheets/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="docs/login.xml" />
+                    <map:parameter name="remove" value="{0}" />
+                </map:transform>
+                <map:serialize />
+            </map:match>
+
+            <!-- ========================================= -->
+            <!-- Form target which performs auth service   -->
+            <!-- ========================================= -->
+            <map:match pattern="do-login">
+                <!-- first validate whether submitted values are ok -->
+                <map:act type="form-validator">
+                    <map:parameter name="descriptor" value="descriptors/params.xml" />
+                    <map:parameter name="validate" value="username" />
+                    <!-- now try to log in -->
+                    <map:act type="db-authenticator">
+                        <map:parameter name="descriptor" value="descriptors/auth.xml" />
+                        <!-- now go to protected area -->
+                        <map:redirect-to uri="page" />
+                    </map:act>
+                </map:act>
+                <!-- something was wrong, try it again -->
+                <map:redirect-to uri="login" />
+            </map:match>
+
+            <!-- ================ -->
+            <!-- Protected area   -->
+            <!-- ================ -->
+            <map:match pattern="page">
+                <!-- first validate whether user has logged in -->
+                <map:act type="session-validator">
+                    <map:parameter name="descriptor" value="descriptors/params.xml" />
+                    <map:parameter name="validate" value="username,department_id,theme" />
+                    <!-- generate protected content -->
+                    <map:generate type="jx" src="docs/protected.xml">
+                        <map:parameter name="username" value="{session-attr:username}" />
+                        <map:parameter name="department_id" value="{session-attr:department_id}" />
+                        <map:parameter name="theme" value="{session-attr:theme}" />
+                    </map:generate>
+                    <map:transform src="stylesheets/{theme}-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="docs/protected.xsp" />
+                        <map:parameter name="remove" value="{../0}" />
+                    </map:transform>
+                    <map:serialize />
+                </map:act>
+                <!-- something was wrong, redirect to login page -->
+                <map:redirect-to uri="login" />
+            </map:match>
+
+            <!-- ========================================= -->
+            <!-- Logout link which invalidates the session -->
+            <!-- ========================================= -->
+            <map:match pattern="do-logout">
+                <map:act type="session-invalidator">
+                    <map:redirect-to uri="login" />
+                </map:act>
+            </map:match>
+
+        </map:pipeline>
+    </map:pipelines>
 </map:sitemap>
 
 <!-- end of file -->

Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/protected/stylesheets/simple-page2html.xsl
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/protected/stylesheets/simple-page2html.xsl?view=diff&rev=539084&r1=539083&r2=539084
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/protected/stylesheets/simple-page2html.xsl (original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/protected/stylesheets/simple-page2html.xsl Thu May 17 12:17:01 2007
@@ -20,7 +20,7 @@
 
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
-  <xsl:include href="context://samples/common/style/xsl/html/simple-page2html.xsl"/>
+  <xsl:include href="servlet:style-default:/common/style/xsl/html/simple-page2html.xsl"/>
  
   <xsl:template match="linkbar">
     <div>

Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/simpleform/four/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/simpleform/four/sitemap.xmap?view=diff&rev=539084&r1=539083&r2=539084
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/simpleform/four/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/simpleform/four/sitemap.xmap Thu May 17 12:17:01 2007
@@ -17,194 +17,179 @@
 -->
 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
 
- <map:components>
+    <!-- =========================== Components =================================== -->
 
-  <map:transformers default="xslt">
+    <map:components>
 
-   <!--+ 
-       | the SimpleFormTransformer acts upon HTML4 form element tags and 
-       | replaces their value attribute or their content in case of the 
-       | textarea element with data obtained from an input module attribute 
-       | with the same name. In addition, it checks the result of the 
-       | FormValidatorAction when it encounters <error/> tags and includes
-       | / excludes them depending on the result. 
-       |
-       +-->
-   <map:transformer name="simpleform" 
-                    logger="sitemap.transformer.simpleform" 
-                    src="org.apache.cocoon.transformation.SimpleFormTransformer">
-      <input-module name="request-param"/>
-   </map:transformer>
-   
-   <!--+ 
-       | This transformer is used to extract the form instance data from the
-       | xml document. See the javadocs of this class for more information on
-       | the default configuration and  configuration options.
-       |
-       | Here, the instance data is nested inside the form element. The
-       | transformer can be configured to look for it at other places.
-       |
-       | The instance data is stored as an attribute with the same name as the 
-       | form using an output module. Here we decide to use the RequestAttributeMap
-       |  module. This would allows
-       | a) to store instances for several forms and 
-       | b) to access a particular instance and value using JXPath syntax.
-       |
-       | Per default, the map key is the name of the form as is the root node 
-       | of the new Document.
-       |
-       +-->
-   <map:transformer name="simpleform-instance-extraction"
-                    logger="sitemap.transformer.simpleform-request" 
-                    src="org.apache.cocoon.transformation.SimpleFormInstanceExtractionTransformer">
-     <output name="request-attr-map"/>
-   </map:transformer>
-
-   <!--+ 
-       | This is the other transformer to read and insert the instance data. 
-       | It will be applied first in the pipeline so that the user submitted 
-       | data can override the default data. 
-       |
-       | Only one of the two transformers needs to check for validation errors, 
-       | this instance has been instructed to ignore validation results because 
-       | looking up the instance data requires to augment the element name with
-       | the form name and thus differ from the validation result names.
-       |
-       | The instance extractor places the form instances into a map with the 
-       | form name as key. Furthermore, it has been instructed to create a root
-       |  element wrapping the instance data with the same name as the form. 
-       | Hence we need to included the form's name twice in the element name 
-       | used for the lookup.
-       |
-       | In addition, we may want to be able to select from a XSP if the form 
-       | data should be replaced with values from the instance or from the 
-       | request. Therefore, a different attribute is used to protect element 
-       | values.
-       |
-       +-->
-   <map:transformer name="simpleform-instance" 
-                    logger="sitemap.transformer.simpleform-instance" 
-                    src="org.apache.cocoon.transformation.SimpleFormTransformer">
-     <fixed-attribute>this-is-never-used</fixed-attribute>
-     <use-form-name-twice>true</use-form-name-twice>
-     <ignore-validation>true</ignore-validation>
-     <input-module name="jxpath">
-       <!--+
-           | "jxpath" does not pass the attribute name to the module it
-           | obtains the value to act from. Thus an additional attribute
-           | name needs to be injected. 
-           +-->
-       <from-parameter>org.apache.cocoon.components.modules.output.OutputModule</from-parameter>
-       <input-module name="request-attr"/>
-     </input-module>
-    </map:transformer>
-
-  </map:transformers>
-  
- </map:components>
-
-<!--+
-    | This is a standard resource for rendering a XSP page.
-    +-->
- <map:resources>
-  <map:resource name="static-page">
-      <map:transform src="context://samples/common/style/xsl/html/simple-page2html.xsl">
-         <map:parameter name="servletPath" value="{request:servletPath}"/>
-         <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
-         <map:parameter name="contextPath" value="{request:contextPath}"/>
-         <map:parameter name="remove" value="{/0}"/>
-         <map:parameter name="file" value="{file}.xml"/>
-      </map:transform>
-      <map:serialize/>
-  </map:resource>
- </map:resources>
-
-<!--+
-    | These views provide different 'standard' views to the samples.
-    |
-    +-->
-
- <map:views>
-  <map:view name="content" from-label="content">
-   <map:serialize type="xml"/>
-  </map:view>
-
-  <map:view from-label="content" name="pretty-content">
-    <map:transform src="context://stylesheets/system/xml2html.xslt"/>
-    <map:serialize type="html"/>
-  </map:view>
-  
-  <map:view name="links" from-position="last">
-   <map:serialize type="links"/>
-  </map:view>
-
- </map:views>
-
-<!--+
-    | Pipelines
-    |
-    +-->
-
- <map:pipelines>
-
-  <map:pipeline>
-
-   <!-- some redirections -->
-   <map:match pattern="">
-     <map:redirect-to uri="index"/>
-   </map:match>
-   
-
-
-   <map:match pattern="index">
-    <!--+
-        | Only validate when data was submitted
-        +-->
-    <map:select type="simple">
-       <map:parameter name="value" value="{request:method}"/>
-       <map:when test="POST">
-           <!--+
-               | Check the request parameters using the FormValidatorAction 
-               +-->
-           <map:act type="form-validator">
-             <map:parameter name="descriptor" value="descriptor.xml"/>
-             <map:parameter name="constraint-set" value="car-reservation"/>
-             <!--+
-                 | this is the success case
-                 |
-                 +-->
-             <map:generate src="success.xml"/>
-             <map:transform type="simpleform"/>
-        <map:call resource="static-page">
-          <map:parameter name="file" value="success"/>
-        </map:call>
-             <!-- because of the resource above the "success" pipeline ends here. -->
-           </map:act>
-       </map:when>
-     </map:select>
-     <!--+
-         | this branch contains the failed validation.
-         | Since the "success" pipeline ends with a resource, the following is only 
-         | applied if validation has not been successful.
-         +-->
-    <map:generate type="file" src="form.xml"/>    
-    <!-- extract the instance data -->
-    <map:transform type="simpleform-instance-extraction"/>
-    <!-- fill in the instance data -->
-    <map:transform type="simpleform-instance"/>
-    <!-- fill in the request parameters, and error tags -->
-    <map:transform type="simpleform"/>
-    <map:call resource="static-page">
-      <map:parameter name="file" value="form"/>
-    </map:call>
-   </map:match>
-
-   <!-- some redirections -->
-   <map:match pattern="*">
-     <map:redirect-to uri="index"/>
-   </map:match>
+        <!-- =========================== Transformers =================================== -->
 
-  </map:pipeline>
- </map:pipelines>
+        <map:transformers default="xslt">
+
+            <!--+ 
+                | the SimpleFormTransformer acts upon HTML4 form element tags and 
+                | replaces their value attribute or their content in case of the 
+                | textarea element with data obtained from an input module attribute 
+                | with the same name. In addition, it checks the result of the 
+                | FormValidatorAction when it encounters <error/> tags and includes
+                | / excludes them depending on the result. 
+                |
+                +-->
+            <map:transformer name="simpleform" logger="sitemap.transformer.simpleform" src="org.apache.cocoon.transformation.SimpleFormTransformer">
+                <input-module name="request-param" />
+            </map:transformer>
+
+            <!--+ 
+                | This transformer is used to extract the form instance data from the
+                | xml document. See the javadocs of this class for more information on
+                | the default configuration and  configuration options.
+                |
+                | Here, the instance data is nested inside the form element. The
+                | transformer can be configured to look for it at other places.
+                |
+                | The instance data is stored as an attribute with the same name as the 
+                | form using an output module. Here we decide to use the RequestAttributeMap
+                |  module. This would allows
+                | a) to store instances for several forms and 
+                | b) to access a particular instance and value using JXPath syntax.
+                |
+                | Per default, the map key is the name of the form as is the root node 
+                | of the new Document.
+                |
+                +-->
+            <map:transformer name="simpleform-instance-extraction" logger="sitemap.transformer.simpleform-request" src="org.apache.cocoon.transformation.SimpleFormInstanceExtractionTransformer">
+                <output name="request-attr-map" />
+            </map:transformer>
+
+            <!--+ 
+                | This is the other transformer to read and insert the instance data. 
+                | It will be applied first in the pipeline so that the user submitted 
+                | data can override the default data. 
+                |
+                | Only one of the two transformers needs to check for validation errors, 
+                | this instance has been instructed to ignore validation results because 
+                | looking up the instance data requires to augment the element name with
+                | the form name and thus differ from the validation result names.
+                |
+                | The instance extractor places the form instances into a map with the 
+                | form name as key. Furthermore, it has been instructed to create a root
+                |  element wrapping the instance data with the same name as the form. 
+                | Hence we need to included the form's name twice in the element name 
+                | used for the lookup.
+                |
+                | In addition, we may want to be able to select from a XSP if the form 
+                | data should be replaced with values from the instance or from the 
+                | request. Therefore, a different attribute is used to protect element 
+                | values.
+                |
+                +-->
+            <map:transformer name="simpleform-instance" logger="sitemap.transformer.simpleform-instance" src="org.apache.cocoon.transformation.SimpleFormTransformer">
+                <fixed-attribute>this-is-never-used</fixed-attribute>
+                <use-form-name-twice>true</use-form-name-twice>
+                <ignore-validation>true</ignore-validation>
+                <input-module name="jxpath">
+                    <!--+
+                        | "jxpath" does not pass the attribute name to the module it
+                        | obtains the value to act from. Thus an additional attribute
+                        | name needs to be injected. 
+                        +-->
+                    <from-parameter>org.apache.cocoon.components.modules.output.OutputModule</from-parameter>
+                    <input-module name="request-attr" />
+                </input-module>
+            </map:transformer>
+
+        </map:transformers>
+
+    </map:components>
+
+    <!-- =========================== Resources =================================== -->
+
+    <map:resources>
+        <map:resource name="static-page">
+            <!-- Make use of servlet services -->
+            <map:serialize type="servletService">
+                <map:parameter name="service" value="servlet:style-default:/service/common/simple-page2html" />
+            </map:serialize>
+        </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>
+
+            <!-- some redirections -->
+            <map:match pattern="">
+                <map:redirect-to uri="index" />
+            </map:match>
+
+            <map:match pattern="index">
+                <!--+
+                    | Only validate when data was submitted
+                    +-->
+                <map:select type="simple">
+                    <map:parameter name="value" value="{request:method}" />
+                    <map:when test="POST">
+                        <!--+
+                            | Check the request parameters using the FormValidatorAction 
+                            +-->
+                        <map:act type="form-validator">
+                            <map:parameter name="descriptor" value="descriptor.xml" />
+                            <map:parameter name="constraint-set" value="car-reservation" />
+                            <!--+
+                                | this is the success case
+                                |
+                                +-->
+                            <map:generate src="success.xml" />
+                            <map:transform type="simpleform" />
+                            <map:call resource="static-page">
+                                <map:parameter name="file" value="success" />
+                            </map:call>
+                            <!-- because of the resource above the "success" pipeline ends here. -->
+                        </map:act>
+                    </map:when>
+                </map:select>
+                <!--+
+                    | this branch contains the failed validation.
+                    | Since the "success" pipeline ends with a resource, the following is only 
+                    | applied if validation has not been successful.
+                    +-->
+                <map:generate type="file" src="form.xml" />
+                <!-- extract the instance data -->
+                <map:transform type="simpleform-instance-extraction" />
+                <!-- fill in the instance data -->
+                <map:transform type="simpleform-instance" />
+                <!-- fill in the request parameters, and error tags -->
+                <map:transform type="simpleform" />
+                <map:call resource="static-page">
+                    <map:parameter name="file" value="form" />
+                </map:call>
+            </map:match>
+
+            <!-- some redirections -->
+            <map:match pattern="*">
+                <map:redirect-to uri="index" />
+            </map:match>
+
+        </map:pipeline>
+    </map:pipelines>
 
 </map:sitemap>

Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/simpleform/one/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/simpleform/one/sitemap.xmap?view=diff&rev=539084&r1=539083&r2=539084
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/simpleform/one/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/simpleform/one/sitemap.xmap Thu May 17 12:17:01 2007
@@ -17,99 +17,82 @@
 -->
 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
 
-<!--+
-    | This is a standard resource for rendering a XSP page.
-    +-->
-
- <map:resources>
-  <map:resource name="dynamic-page">
-     <map:generate src="{target}.xsp" type="serverpages"/>
-     <map:transform src="context://samples/common/style/xsl/html/simple-page2html.xsl">
-        <map:parameter name="servletPath" value="{request:servletPath}"/>
-        <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
-        <map:parameter name="contextPath" value="{request:contextPath}"/>
-        <map:parameter name="file" value="{target}.xsp"/>
-        <map:parameter name="remove" value="{remove}"/>
-     </map:transform>
-     <map:serialize/>
-  </map:resource>
- </map:resources>
-
-<!--+
-    | These views provide different 'standard' views to the samples.
-    |
-    +-->
-
- <map:views>
-  <map:view name="content" from-label="content">
-   <map:serialize type="xml"/>
-  </map:view>
-
-  <map:view from-label="content" name="pretty-content">
-    <map:transform src="context://stylesheets/system/xml2html.xslt"/>
-    <map:serialize type="html"/>
-  </map:view>
-  
-  <map:view name="links" from-position="last">
-   <map:serialize type="links"/>
-  </map:view>
-
- </map:views>
-
-
-<!--+
-    | Pipelines
-    |
-    +-->
-
- <map:pipelines>
-
-  <map:pipeline>
-
-   <!-- some redirections -->
-   <map:match pattern="">
-     <map:redirect-to uri="index"/>
-   </map:match>
-   
-
-
-   <map:match pattern="index">
-     <map:act type="form-validator">
-        <map:parameter name="descriptor" value="descriptor.xml"/>
-        <map:parameter name="constraint-set" value="car-reservation"/>
-        <!--+
-            | this is the success case
-            +-->
-        <map:call resource="dynamic-page">
-           <map:parameter name="target" value="OK"/>
-           <map:parameter name="remove" value="{../0}"/>
-        </map:call>
-     </map:act>
-     <!--+
-         | this branch contains the failed validation.
-         | Since the "success" pipeline ends with a serializer, the following is only 
-         | applied if validation has not been successful.
-         |
-         +-->
-     <map:call resource="dynamic-page">
-        <map:parameter name="target" value="ERROR"/>
-        <map:parameter name="remove" value="{0}"/>
-     </map:call>
-   </map:match>
-
-   <map:match pattern="descriptor.xml">
-     <map:generate src="{0}"/>
-     <map:serialize type="xml"/>
-   </map:match>
-
-   <!-- some redirections -->
-   <map:match pattern="*">
-     <map:redirect-to uri="index"/>
-   </map:match>
-        
-  </map:pipeline>
- </map:pipelines>
+    <!-- =========================== Resources =================================== -->
 
-</map:sitemap>
+    <map:resources>
+        <map:resource name="dynamic-page">
+            <map:generate src="{target}.xsp" type="serverpages" />
+            <!-- Make use of servlet services -->
+            <map:serialize type="servletService">
+                <map:parameter name="service" value="servlet:style-default:/service/common/simple-page2html" />
+            </map:serialize>
+        </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>
+
+            <!-- some redirections -->
+            <map:match pattern="">
+                <map:redirect-to uri="index" />
+            </map:match>
+
+            <map:match pattern="index">
+                <map:act type="form-validator">
+                    <map:parameter name="descriptor" value="descriptor.xml" />
+                    <map:parameter name="constraint-set" value="car-reservation" />
+                    <!--+
+                        | this is the success case
+                        +-->
+                    <map:call resource="dynamic-page">
+                        <map:parameter name="target" value="OK" />
+                        <map:parameter name="remove" value="{../0}" />
+                    </map:call>
+                </map:act>
+                <!--+
+                    | this branch contains the failed validation.
+                    | Since the "success" pipeline ends with a serializer, the following is only 
+                    | applied if validation has not been successful.
+                    |
+                    +-->
+                <map:call resource="dynamic-page">
+                    <map:parameter name="target" value="ERROR" />
+                    <map:parameter name="remove" value="{0}" />
+                </map:call>
+            </map:match>
+
+            <map:match pattern="descriptor.xml">
+                <map:generate src="{0}" />
+                <map:serialize type="xml" />
+            </map:match>
+
+            <!-- some redirections -->
+            <map:match pattern="*">
+                <map:redirect-to uri="index" />
+            </map:match>
+
+        </map:pipeline>
+    </map:pipelines>
 
-<!-- end of file -->
+</map:sitemap>

Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/simpleform/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/simpleform/sitemap.xmap?view=diff&rev=539084&r1=539083&r2=539084
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/simpleform/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/simpleform/sitemap.xmap Thu May 17 12:17:01 2007
@@ -18,50 +18,50 @@
 <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="context://stylesheets/system/xml2html.xslt"/>
-    <map:serialize type="html"/>
-  </map:view>
-  
-  <map:view name="links" from-position="last">
-   <map:serialize type="links"/>
-  </map:view>
-
- </map:views>
-
-<!-- =========================== Pipelines ================================= -->
-
- <map:pipelines>
-
-  <map:pipeline>
-
-   <map:match pattern="">
-     <map:redirect-to uri="samples"/>
-   </map:match>
-
-   <map:match pattern="samples">
-    <map:generate src="samples.xml"/>
-    <map:transform src="context://samples/common/style/xsl/html/simple-samples2html.xsl">
-       <map:parameter name="contextPath" value="{request:contextPath}"/>
-    </map:transform>
-    <map:serialize/>
-   </map:match>
-
-   <!-- samples automount -->  
-   <map:match pattern="*/**">
-     <map:mount uri-prefix="{1}" src="{1}/"/>
-   </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>
+
+            <map:match pattern="">
+                <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-page2html" />
+                </map:serialize>
+            </map:match>
+
+            <!-- samples automount -->
+            <map:match pattern="*/**">
+                <map:mount uri-prefix="{1}" src="{1}/" />
+            </map:match>
 
-</map:sitemap>
+        </map:pipeline>
+    </map:pipelines>
 
-<!-- end of file -->
+</map:sitemap>

Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/simpleform/three/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/simpleform/three/sitemap.xmap?view=diff&rev=539084&r1=539083&r2=539084
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/simpleform/three/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/simpleform/three/sitemap.xmap Thu May 17 12:17:01 2007
@@ -17,137 +17,131 @@
 -->
 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
 
- <map:components>
+    <!-- =========================== Components =================================== -->
 
-  <map:transformers default="xslt">
-   <!--+ 
-       | This transformer is used to extract the form instance data from the
-       | xml document. See the javadocs of this class for more information on
-       | the default configuration and  configuration options.
-       |
-       | Here, the instance data is nested inside the form element. The
-       | transformer can be configured to look for it at other places.
-       |
-       | The instance data is stored as an attribute with the same name as the 
-       | form using an output module. Here we decide to use the RequestAttributeMap
-       | module. This allows
-       | a) to store instances for several forms and 
-       | b) to access a particular instance and value using JXPath syntax.
-       |
-       | Per default, the map key is the name of the form as is the root node 
-       | of the new Document.
-       |
-       +-->
-   <map:transformer name="simpleform-instance-extraction" 
-                    logger="sitemap.transformer.simpleform-request" 
-                    src="org.apache.cocoon.transformation.SimpleFormInstanceExtractionTransformer">
-     <output name="request-attr-map"/>
-   </map:transformer>
-
-   <!--+ 
-       | This is the other transformer to read and insert the instance data. 
-       | It will be applied first in the pipeline so that the user submitted 
-       | data can override the default data. 
-       |
-       | Only one of the two transformers needs to check for validation errors, 
-       | this instance has been instructed to ignore validation results because 
-       | looking up the instance data requires to augment the element name with
-       | the form name and thus differ from the validation result names.
-       |
-       | The instance extractor places the form instances into a map with the 
-       | form name as key. Furthermore, it has been instructed to create a root
-       | element wrapping the instance data with the same name as the form. 
-       | Hence we need to included the form's name twice in the element name 
-       | used for the lookup.
-       |
-       | In addition, we may want to be able to select from a XSP if the form 
-       | data should be replaced with values from the instance or from the 
-       | request. Therefore, a different attribute is used to protect element 
-       | values.
-       |
-       +-->
-   <map:transformer name="simpleform-instance" 
-                    logger="sitemap.transformer.simpleform-instance" 
-                    src="org.apache.cocoon.transformation.SimpleFormTransformer">
-     <fixed-attribute>this-is-never-used</fixed-attribute>
-     <use-form-name-twice>true</use-form-name-twice>
-     <ignore-validation>true</ignore-validation>
-     <input-module name="jxpath">
-       <!--+
-           | "jxpath" does not pass the attribute name to the module it
-           | obtains the value to act from. Thus an additional attribute
-           | name needs to be injected. 
-           +-->
-       <from-parameter>org.apache.cocoon.components.modules.output.OutputModule</from-parameter>
-       <input-module name="request-attr"/>
-     </input-module>
-   </map:transformer>
-   
-  </map:transformers>
-  
- </map:components>
-
-<!--+
-    | This is a standard resource for rendering a XSP page.
-    +-->
- <map:resources>
-  <map:resource name="static-page">
-      <map:transform src="context://samples/common/style/xsl/html/simple-page2html.xsl">
-         <map:parameter name="servletPath" value="{request:servletPath}"/>
-         <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
-         <map:parameter name="contextPath" value="{request:contextPath}"/>
-         <map:parameter name="remove" value="{/0}"/>
-         <map:parameter name="file" value="{file}.xml"/>
-      </map:transform>
-      <map:serialize/>
-  </map:resource>
- </map:resources>
-
-<!--+
-    | These views provide different 'standard' views to the samples.
-    +-->
- <map:views>
-  <map:view name="content" from-label="content">
-   <map:serialize type="xml"/>
-  </map:view>
-
-  <map:view from-label="content" name="pretty-content">
-    <map:transform src="context://stylesheets/system/xml2html.xslt"/>
-    <map:serialize type="html"/>
-  </map:view>
-  
-  <map:view name="links" from-position="last">
-   <map:serialize type="links"/>
-  </map:view>
-
- </map:views>
-
-<!--+
-    | Pipelines
-    +-->
- <map:pipelines>
-  <map:pipeline>
-   <!-- some redirections -->
-   <map:match pattern="">
-     <map:redirect-to uri="index"/>
-   </map:match>
-
-   <map:match pattern="index">
-    <map:generate type="file" src="form.xml"/>    
-    <!-- extract the instance data -->
-    <map:transform type="simpleform-instance-extraction"/>
-    <!-- fill in the instance data -->
-    <map:transform type="simpleform-instance"/>
-    <map:call resource="static-page">
-      <map:parameter name="file" value="form"/>
-    </map:call>
-   </map:match>
-
-   <!-- some redirections -->
-   <map:match pattern="*">
-     <map:redirect-to uri="index"/>
-   </map:match>
+    <map:components>
 
-  </map:pipeline>
- </map:pipelines>
+        <!-- =========================== Transformers =================================== -->
+
+        <map:transformers default="xslt">
+            <!--+ 
+                | This transformer is used to extract the form instance data from the
+                | xml document. See the javadocs of this class for more information on
+                | the default configuration and  configuration options.
+                |
+                | Here, the instance data is nested inside the form element. The
+                | transformer can be configured to look for it at other places.
+                |
+                | The instance data is stored as an attribute with the same name as the 
+                | form using an output module. Here we decide to use the RequestAttributeMap
+                | module. This allows
+                | a) to store instances for several forms and 
+                | b) to access a particular instance and value using JXPath syntax.
+                |
+                | Per default, the map key is the name of the form as is the root node 
+                | of the new Document.
+                |
+                +-->
+            <map:transformer name="simpleform-instance-extraction" logger="sitemap.transformer.simpleform-request" src="org.apache.cocoon.transformation.SimpleFormInstanceExtractionTransformer">
+                <output name="request-attr-map" />
+            </map:transformer>
+
+            <!--+ 
+                | This is the other transformer to read and insert the instance data. 
+                | It will be applied first in the pipeline so that the user submitted 
+                | data can override the default data. 
+                |
+                | Only one of the two transformers needs to check for validation errors, 
+                | this instance has been instructed to ignore validation results because 
+                | looking up the instance data requires to augment the element name with
+                | the form name and thus differ from the validation result names.
+                |
+                | The instance extractor places the form instances into a map with the 
+                | form name as key. Furthermore, it has been instructed to create a root
+                | element wrapping the instance data with the same name as the form. 
+                | Hence we need to included the form's name twice in the element name 
+                | used for the lookup.
+                |
+                | In addition, we may want to be able to select from a XSP if the form 
+                | data should be replaced with values from the instance or from the 
+                | request. Therefore, a different attribute is used to protect element 
+                | values.
+                |
+                +-->
+            <map:transformer name="simpleform-instance" logger="sitemap.transformer.simpleform-instance" src="org.apache.cocoon.transformation.SimpleFormTransformer">
+                <fixed-attribute>this-is-never-used</fixed-attribute>
+                <use-form-name-twice>true</use-form-name-twice>
+                <ignore-validation>true</ignore-validation>
+                <input-module name="jxpath">
+                    <!--+
+                        | "jxpath" does not pass the attribute name to the module it
+                        | obtains the value to act from. Thus an additional attribute
+                        | name needs to be injected. 
+                        +-->
+                    <from-parameter>org.apache.cocoon.components.modules.output.OutputModule</from-parameter>
+                    <input-module name="request-attr" />
+                </input-module>
+            </map:transformer>
+
+        </map:transformers>
+
+    </map:components>
+
+    <!-- =========================== Resources =================================== -->
+
+    <map:resources>
+        <map:resource name="static-page">
+            <!-- Make use of servlet services -->
+            <map:serialize type="servletService">
+                <map:parameter name="service" value="servlet:style-default:/service/common/html/simple-page2html" />
+            </map:serialize>
+        </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>
+            <!-- some redirections -->
+            <map:match pattern="">
+                <map:redirect-to uri="index" />
+            </map:match>
+
+            <map:match pattern="index">
+                <map:generate type="file" src="form.xml" />
+                <!-- extract the instance data -->
+                <map:transform type="simpleform-instance-extraction" />
+                <!-- fill in the instance data -->
+                <map:transform type="simpleform-instance" />
+                <map:call resource="static-page">
+                    <map:parameter name="file" value="form" />
+                </map:call>
+            </map:match>
+
+            <!-- some redirections -->
+            <map:match pattern="*">
+                <map:redirect-to uri="index" />
+            </map:match>
+
+        </map:pipeline>
+    </map:pipelines>
 </map:sitemap>

Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/simpleform/two/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/simpleform/two/sitemap.xmap?view=diff&rev=539084&r1=539083&r2=539084
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/simpleform/two/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/simpleform/two/sitemap.xmap Thu May 17 12:17:01 2007
@@ -17,126 +17,117 @@
 -->
 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
 
-  <map:components>
+    <!-- ======================= Components ================================= -->
 
-  <!--+ the SimpleFormTransformer acts upon HTML4 form element tags and replaces their
-      | value attribute or their content in case of the textarea element with data obtained
-      | from an input module attribute with the same name. In addition, it checks the result 
-      | of the FormValidatorAction when it encounters <error/> tags and includes / excludes
-      | them depending on the result. 
-      |
-      +-->
-  <map:transformers default="xslt">
-   <map:transformer name="simpleform" 
-                    logger="sitemap.transformer.simpleform" 
-                    src="org.apache.cocoon.transformation.SimpleFormTransformer">
-      <input-module name="request-param"/>
-   </map:transformer>
-   
-  </map:transformers>
-  
- </map:components>
-
-<!--+
-    | This is a standard resource for rendering a XSP page.
-    +-->
- <map:resources>
-  <map:resource name="static-page">
-      <map:transform src="context://samples/common/style/xsl/html/simple-page2html.xsl">
-         <map:parameter name="servletPath" value="{request:servletPath}"/>
-         <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
-         <map:parameter name="contextPath" value="{request:contextPath}"/>
-         <map:parameter name="remove" value="{/0}"/>
-         <map:parameter name="file" value="{file}.xml"/>
-      </map:transform>
-      <map:serialize/>
-  </map:resource>
- </map:resources>
-
-<!--+
-    | These views provide different 'standard' views to the samples.
-    |
-    +-->
-
- <map:views>
-  <map:view name="content" from-label="content">
-   <map:serialize type="xml"/>
-  </map:view>
-
-  <map:view from-label="content" name="pretty-content">
-    <map:transform src="context://stylesheets/system/xml2html.xslt"/>
-    <map:serialize type="html"/>
-  </map:view>
-  
-  <map:view name="links" from-position="last">
-   <map:serialize type="links"/>
-  </map:view>
-
- </map:views>
-
-
-<!--+
-    | Pipelines
-    |
-    +-->
-
- <map:pipelines>
-
-  <map:pipeline>
-
-   <!-- some redirections -->
-   <map:match pattern="">
-     <map:redirect-to uri="index"/>
-   </map:match>
-
-   <map:match pattern="index">
-    <!--+
-        | Only validate when data was submitted
-        +-->
-     <map:select type="simple">
-       <map:parameter name="value" value="{request:method}"/>
-       <map:when test="POST">
-           <!--+
-               | Check the request parameters using the FormValidatorAction 
-               +-->
-           <map:act type="form-validator">
-             <map:parameter name="descriptor" value="descriptor.xml"/>
-             <map:parameter name="constraint-set" value="car-reservation"/>
-             <!--+
-                 | this is the success case
-                 |
-                 +-->
-             <map:generate src="success.xml"/>
-             <map:transform type="simpleform"/>
-             <map:call resource="static-page">
-              <map:parameter name="file" value="success"/>
-             </map:call>
-             <!-- because of the resource above the "success" pipeline ends here. -->
-           </map:act>
-        </map:when>
-     </map:select>
-     <!--+
-         | this branch contains the failed validation.
-         | Since the "success" pipeline ends with a resource, the following is only 
-         | applied if validation has not been successful.
-         |
-         +-->
-    <map:generate type="file" src="form.xml"/>    
-    <!--+
-        | fill in the request parameters, and error tags 
-        +-->
-    <map:transform type="simpleform"/>
-    <map:call resource="static-page">
-      <map:parameter name="file" value="form"/>
-    </map:call>
-   </map:match>
-
-   <!-- some redirections -->
-   <map:match pattern="*">
-     <map:redirect-to uri="index"/>
-   </map:match>
-        
-  </map:pipeline>
- </map:pipelines>
+    <map:components>
+
+        <!-- ======================= Transformers ================================= -->
+
+        <!--+ the SimpleFormTransformer acts upon HTML4 form element tags and replaces their
+            | value attribute or their content in case of the textarea element with data obtained
+            | from an input module attribute with the same name. In addition, it checks the result 
+            | of the FormValidatorAction when it encounters <error/> tags and includes / excludes
+            | them depending on the result. 
+            |
+            +-->
+        <map:transformers default="xslt">
+            <map:transformer name="simpleform" logger="sitemap.transformer.simpleform" src="org.apache.cocoon.transformation.SimpleFormTransformer">
+                <input-module name="request-param" />
+            </map:transformer>
+
+        </map:transformers>
+
+    </map:components>
+
+    <!-- =========================== Resources =================================== -->
+
+    <map:resources>
+        <map:resource name="static-page">
+            <!-- Make use of servlet services -->
+            <map:serialize type="servletService">
+                <map:parameter name="service" value="servlet:style-default:/service/common/html/simple-page2html" />
+            </map:serialize>
+        </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>
+
+            <!-- some redirections -->
+            <map:match pattern="">
+                <map:redirect-to uri="index" />
+            </map:match>
+
+            <map:match pattern="index">
+                <!--+
+                    | Only validate when data was submitted
+                    +-->
+                <map:select type="simple">
+                    <map:parameter name="value" value="{request:method}" />
+                    <map:when test="POST">
+                        <!--+
+                            | Check the request parameters using the FormValidatorAction 
+                            +-->
+                        <map:act type="form-validator">
+                            <map:parameter name="descriptor" value="descriptor.xml" />
+                            <map:parameter name="constraint-set" value="car-reservation" />
+                            <!--+
+                                | this is the success case
+                                |
+                                +-->
+                            <map:generate src="success.xml" />
+                            <map:transform type="simpleform" />
+                            <map:call resource="static-page">
+                                <map:parameter name="file" value="success" />
+                            </map:call>
+                            <!-- because of the resource above the "success" pipeline ends here. -->
+                        </map:act>
+                    </map:when>
+                </map:select>
+                <!--+
+                    | this branch contains the failed validation.
+                    | Since the "success" pipeline ends with a resource, the following is only 
+                    | applied if validation has not been successful.
+                    |
+                    +-->
+                <map:generate type="file" src="form.xml" />
+                <!--+
+                    | fill in the request parameters, and error tags 
+                    +-->
+                <map:transform type="simpleform" />
+                <map:call resource="static-page">
+                    <map:parameter name="file" value="form" />
+                </map:call>
+            </map:match>
+
+            <!-- some redirections -->
+            <map:match pattern="*">
+                <map:redirect-to uri="index" />
+            </map:match>
+
+        </map:pipeline>
+    </map:pipelines>
 
 </map:sitemap>

Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/sitemap.xmap?view=diff&rev=539084&r1=539083&r2=539084
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/sitemap.xmap Thu May 17 12:17:01 2007
@@ -20,204 +20,215 @@
 
 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
 
-  <!-- ========================= Components ================================ -->
+    <!-- ========================= Components ================================ -->
 
-  <map:components>
-    <map:include-properties dir="properties"/>
-    <map:generators default="file">
-      <map:generator name="linkstatus" src="org.apache.cocoon.generation.LinkStatusGenerator"/>
-      <map:generator name="calendar" src="org.apache.cocoon.generation.CalendarGenerator"/>
-    </map:generators>
-    <map:transformers default="xslt">
-      <!-- Configure i18n transformer -->
-      <map:transformer name="i18n" logger="sitemap.transformer.i18n" src="org.apache.cocoon.transformation.I18nTransformer">
-         <catalogues default="messages">
-            <catalogue id="messages" name="messages" location="resources/i18n"/>
-         </catalogues>
-         <cache-at-startup>true</cache-at-startup>
-      </map:transformer>
-    </map:transformers>
-  </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="context://stylesheets/system/xml2html.xslt"/>
-      <map:serialize type="html"/>
-    </map:view>
-
-    <map:view name="links" from-position="last">
-      <map:serialize type="links"/>
-    </map:view>
-  </map:views>
-
-  <!-- ========================== Pipelines ================================ -->
-
-  <map:pipelines>
-    <map:pipeline>
-<!--
-      <map:match pattern="v">
-        <map:generate type="virtual"/>
-        <map:serialize type="xhtml"/>
-      </map:match>
--->
-      <map:match pattern="">
-        <map:generate src="samples.xml"/>
-        <map:transform src="context://samples/common/style/xsl/html/simple-samples2html.xsl">
-          <map:parameter name="contextPath" value="{request:contextPath}"/>
-        </map:transform>
-        <map:serialize/>
-      </map:match>
-
-      <!-- ========================= Stream ================================ -->
-
-      <map:match pattern="order">
-        <map:generate src="stream/OrderPage.xml"/>
-        <map:transform src="context://samples/blocks/dynamic-page2html.xsl">
-          <map:parameter name="servletPath" value="{request:servletPath}"/>
-          <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
-          <map:parameter name="contextPath" value="{request:contextPath}"/>
-          <map:parameter name="file" value=".xsp"/>
-        </map:transform>
-        <map:serialize type="html"/>
-      </map:match>
-
-      <map:match pattern="process-order">
-        <map:generate type="stream">
-          <map:parameter name="form-name" value="Foo"/>
-        </map:generate>
-        <map:transform src="context://stylesheets/system/xml2html.xslt"/>
-        <map:serialize type="html"/>
-      </map:match>
-
-      <!-- ======================= Other Samples =========================== -->
-
-      <map:match pattern="components">
-        <map:generate src="components-samples.xml"/>
-        <map:transform src="context://samples/common/style/xsl/html/simple-samples2html.xsl">
-          <map:parameter name="contextPath" value="{request:contextPath}"/>
-        </map:transform>
-        <map:serialize/>
-      </map:match>
-
-      <map:match pattern="misc">
-        <map:generate src="misc-samples.xml"/>
-        <map:transform src="context://samples/common/style/xsl/html/simple-samples2html.xsl">
-          <map:parameter name="contextPath" value="{request:contextPath}"/>
-        </map:transform>
-        <map:serialize/>
-      </map:match>
-
-      <map:match pattern="request.html">
-        <map:generate type="request"/>
-        <map:transform src="context://stylesheets/system/xml2html.xslt"/>
-        <map:serialize/>
-      </map:match>
-
-      <map:match pattern="source-write.xml">
-        <map:generate src="components/source-writing-transformer.xml"/>
-        <map:transform type="write-source"/>
-        <map:serialize type="xml"/>
-      </map:match>
-
-      <map:match pattern="cal">
-        <map:generate type="calendar" label="content">
-          <!-- Uncomment and set a value for the desired month and year
-          <map:parameter name="month" value="6"/>
-          <map:parameter name="year" value="1998"/>
-          -->
-          <!-- Uncomment the line below to set a fixed date format -->
-          <!--
-          <map:parameter name="dateFormat" value="EEEE, MMMM d yyyy"/>
-          -->
-          <map:parameter name="lang" value="{request-param:lang}"/>
-          <map:parameter name="country" value="{request-param:country}"/>
-        </map:generate>
-        <map:transform src="stylesheets/calendar2html.xslt"/>
-        <!-- to localize the column headers, remove the comments below -->
-        <!--
-        <map:transform type="i18n">
-           <map:parameter name="default-catalogue-id" value="messages"/>
-           <map:parameter name="locale" value="{request-param:lang}"/>
-        </map:transform> 
-        -->
-        <map:serialize/>
-      </map:match>
-
-      <!-- ======================== Utilities ============================== -->
-
-      <map:match pattern="**sitemap.xmap">
-        <map:generate src="{0}"/>
-        <map:serialize type="xml"/>
-      </map:match>
-
-      <map:match pattern="linkstatus">
-        <map:redirect-to uri="linkstatus/localhost/8888/docs/index.html"/>
-      </map:match>
-
-      <map:match pattern="linkstatus/*/*/**">
-        <map:generate type="linkstatus" src="http://{1}:{2}/{3}"/>
-        <map:transform src="context://stylesheets/system/linkstatus2html.xslt"/>
-        <map:serialize/>
-      </map:match>
-
-      <map:match pattern="status.html">
-        <map:generate type="status"/>
-        <map:transform src="context://stylesheets/system/status2html.xslt">
-          <map:parameter name="contextPath" value="{request:contextPath}"/>
-        </map:transform>
-        <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="context://stylesheets/system/status2html.xslt">
-          <map:parameter name="contextPath" value="{request:contextPath}"/>
-        </map:transform>
-        <map:serialize/>
-      </map:match>      
-
-      <map:match pattern="clearcache.html">
-        <map:act type="clear-cache">
-          <map:generate src="status" type="status"/>
-          <map:transform src="context://stylesheets/system/status2html.xslt">
-            <map:parameter name="contextPath" value="{request:contextPath}"/>
-          </map:transform>
-          <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="context://stylesheets/system/status2html.xslt">
-            <map:parameter name="contextPath" value="{request:contextPath}"/>
-          </map:transform>
-          <map:serialize/>
-        </map:act>
-        <map:generate src="no-persistent-store.xml"/>
-        <map:transform src="context://stylesheets/system/xml2html.xslt"/>
-        <map:serialize type="html"/>
-      </map:match>
-
-      <!-- ========================= Automount ============================= -->
-
-      <map:match pattern="*/**">
-        <map:mount uri-prefix="{1}" src="{1}/"/>
-      </map:match>
-    </map:pipeline>
+    <map:components>
+        <map:include-properties dir="properties" />
+        <map:generators default="file">
+            <map:generator name="linkstatus" src="org.apache.cocoon.generation.LinkStatusGenerator" />
+            <map:generator name="calendar" src="org.apache.cocoon.generation.CalendarGenerator" />
+        </map:generators>
+        <map:transformers default="xslt">
+            <!-- Configure i18n transformer -->
+            <map:transformer name="i18n" logger="sitemap.transformer.i18n" src="org.apache.cocoon.transformation.I18nTransformer">
+                <catalogues default="messages">
+                    <catalogue id="messages" name="messages" location="resources/i18n" />
+                </catalogues>
+                <cache-at-startup>true</cache-at-startup>
+            </map:transformer>
+        </map:transformers>
+    </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>
+
+    <!-- ========================== Pipelines ================================ -->
+
+    <map:pipelines>
+        <map:pipeline>
+            <!--
+                <map:match pattern="v">
+                <map:generate type="virtual"/>
+                <map:serialize type="xhtml"/>
+                </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="sitemap.xmap">
+                <map:read src="sitemap.xmap" mime-type="text/xml" />
+            </map:match>
+
+            <!-- ========================= Stream ================================ -->
+
+            <map:match pattern="order">
+                <map:generate src="stream/OrderPage.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="process-order">
+                <map:generate type="stream">
+                    <map:parameter name="form-name" value="Foo" />
+                </map:generate>
+                <!-- Make use of servlet services -->
+                <map:serialize type="servletService">
+                    <map:parameter name="service" value="servlet:style-default:/service/system/xml2html" />
+                </map:serialize>
+            </map:match>
+
+            <!-- ======================= Other Samples =========================== -->
+
+            <map:match pattern="components">
+                <map:generate src="components-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="misc">
+                <map:generate src="misc-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="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:match pattern="source-write.xml">
+                <map:generate src="components/source-writing-transformer.xml" />
+                <map:transform type="write-source" />
+                <map:serialize type="xml" />
+            </map:match>
+
+            <map:match pattern="cal">
+                <map:generate type="calendar" label="content">
+                    <!-- Uncomment and set a value for the desired month and year
+                        <map:parameter name="month" value="6"/>
+                        <map:parameter name="year" value="1998"/>
+                    -->
+                    <!-- Uncomment the line below to set a fixed date format -->
+                    <!--
+                        <map:parameter name="dateFormat" value="EEEE, MMMM d yyyy"/>
+                    -->
+                    <map:parameter name="lang" value="{request-param:lang}" />
+                    <map:parameter name="country" value="{request-param:country}" />
+                </map:generate>
+                <map:transform src="stylesheets/calendar2html.xslt" />
+                <!-- to localize the column headers, remove the comments below -->
+                <!--
+                    <map:transform type="i18n">
+                    <map:parameter name="default-catalogue-id" value="messages"/>
+                    <map:parameter name="locale" value="{request-param:lang}"/>
+                    </map:transform> 
+                -->
+                <map:serialize />
+            </map:match>
+
+            <!-- ======================== Utilities ============================== -->
+
+            <map:match pattern="**sitemap.xmap">
+                <map:generate src="{0}" />
+                <map:serialize type="xml" />
+            </map:match>
+
+            <map:match pattern="linkstatus">
+                <map:redirect-to uri="linkstatus/localhost/8888/docs/index.html" />
+            </map:match>
+
+            <map:match pattern="linkstatus/*/*/**">
+                <map:generate type="linkstatus" src="http://{1}:{2}/{3}" />
+                <!-- Make use of servlet services -->
+                <map:serialize type="servletService">
+                    <map:parameter name="service" value="servlet:style-default:/service/system/linkstatus2html" />
+                </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>
+
+            <!-- ========================= Automount ============================= -->
+
+            <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-additional-sample/src/main/resources/COB-INF/sites/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/sites/sitemap.xmap?view=diff&rev=539084&r1=539083&r2=539084
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/sites/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-additional-sample/src/main/resources/COB-INF/sites/sitemap.xmap Thu May 17 12:17:01 2007
@@ -20,50 +20,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="context://stylesheets/system/xml2html.xslt"/>
-      <map:serialize type="html"/>
-    </map:view>
-
-    <map:view name="links" from-position="last">
-      <map:serialize type="links"/>
-    </map:view>
-  </map:views>
-
-<!-- =========================== Pipelines ================================= -->
-
-  <map:pipelines>
-     <map:pipeline>
-
-       <map:match pattern="">
-         <map:generate src="samples.xml"/>
-         <map:transform src="context://samples/common/style/xsl/html/simple-samples2html.xsl">
-           <map:parameter name="contextPath" value="{request:contextPath}"/>
-         </map:transform>
-         <map:serialize/>
-       </map:match>
-
-       <map:match pattern="*.apache.org/">
-          <map:generate src="{1}.apache.org/content.xml"/>
-          <map:transform src="{1}.apache.org/stylesheet.xsl"/>
-          <map:serialize/>
-        </map:match>
-
-        <map:match pattern="*.apache.org/*.gif">
-          <map:read mime-type="image/gif" src="{1}.apache.org/{2}.gif"/>
-        </map:match>
-
-        <map:match pattern="*.apache.org/*.css">
-          <map:read mime-type="text/css" src="{1}.apache.org/{2}.css"/>
-        </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" />
+                <!-- 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="*.apache.org/">
+                <map:generate src="{1}.apache.org/content.xml" />
+                <map:transform src="{1}.apache.org/stylesheet.xsl" />
+                <map:serialize />
+            </map:match>
+
+            <map:match pattern="*.apache.org/*.gif">
+                <map:read mime-type="image/gif" src="{1}.apache.org/{2}.gif" />
+            </map:match>
+
+            <map:match pattern="*.apache.org/*.css">
+                <map:read mime-type="text/css" src="{1}.apache.org/{2}.css" />
+            </map:match>
 
-     </map:pipeline>                
-  </map:pipelines>
+        </map:pipeline>
+    </map:pipelines>
 </map:sitemap>



Mime
View raw message