cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r539114 [2/2] - in /cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF: ./ aggregate/ captcha/ dreamteam/ forms/ library/ pagination/ sql/ swan/
Date Thu, 17 May 2007 21:04:16 GMT
Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/sitemap.xmap?view=diff&rev=539114&r1=539113&r2=539114
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/sitemap.xmap Thu May 17 14:04:15 2007
@@ -18,612 +18,598 @@
 
 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
 
- <map:components>
-  <map:generators default="file">
-    <!-- use the new implementation of JX -->
-    <map:generator name="jx" src="org.apache.cocoon.template.JXTemplateGenerator"/>
-    <map:generator name="suggestion-list" src="org.apache.cocoon.forms.generation.SuggestionListGenerator"/>
-  </map:generators>
-
-  <map:transformers default="xslt">    
-    <map:transformer name="browser-update" src="org.apache.cocoon.ajax.BrowserUpdateTransformer"/>
-    <map:transformer name="i18n" src="org.apache.cocoon.transformation.I18nTransformer">
-      <catalogues default="other">
-        <catalogue id="other" name="OtherMessages" location="messages"/>
-        <catalogue id="forms" name="messages" location="servlet:forms:/resource/internal/i18n"/>
-        <catalogue id="upload" name="messages" location="servlet:ajax:/resource/internal/i18n"/>
-      </catalogues>
-    </map:transformer>
-  </map:transformers>
-
-  <map:serializers default="html">
-    <map:serializer logger="sitemap.serializer.json" mime-type="text/javascript" name="json" src="org.apache.cocoon.serialization.TextSerializer">
-      <encoding>UTF-8</encoding><!-- JSON responses are expected to be in UTF-8 -->
-    </map:serializer>
-  </map:serializers>
-
-  <map:actions>
-    <map:action name="make-form" src="org.apache.cocoon.forms.acting.MakeFormAction" logger="forms"/>
-    <map:action name="init-form" src="org.apache.cocoon.forms.samples.InitForm1Action" logger="forms"/>
-    <map:action name="handle-form-submit" src="org.apache.cocoon.forms.acting.HandleFormSubmitAction" logger="forms"/>
-  </map:actions>
-  
-  <map:selectors>
-    <map:selector name="ajax-request" src="org.apache.cocoon.ajax.AjaxRequestSelector"/>
-  </map:selectors>
- </map:components>
-
- <map:views>
-  <map:view name="content" from-label="content">
-   <map:serialize type="xml"/>
-  </map:view>
-  
-  <map:view name="content1" from-label="content1">
-   <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:resources>
-   <!-- this will later become a virtual transformer -->
-   <map:resource name="simple-page2html">
-     <map:transform src="servlet:style-default:/common/style/xsl/html/simple-page2html.xsl">
-       <map:parameter name="servletPath" value="{request:servletPath}"/>
-       <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
-       <map:parameter name="file" value="{file}"/>
-       <map:parameter name="remove" value="{../0}"/>
-     </map:transform> 
-   </map:resource>
- </map:resources>
-
-  <!-- indicates what flowscript to attach to this sitemap -->
-  <map:flow language="javascript">
-    <map:script src="flow/forms_flow_example.js"/>
-    <map:script src="flow/binding_example.js"/>
-    <map:script src="flow/upload_example.js"/>
-    <map:script src="flow/registration.js"/>
-    <map:script src="flow/imagemap.js"/>
-    <map:script src="flow/bindings.js"/>
-    <map:script src="flow/form_model_gui.js"/>
-    <map:script src="flow/htmlarea.js"/>
-  </map:flow>
-
- <map:pipelines>
-   <map:pipeline>
-
-     <map:match pattern="">
-      <map:generate src="welcome.xml"/>
-      <map:transform src="servlet:style-default:/common/style/xsl/html/simple-samples2html.xsl" />
-      <map:transform type="servletLinkRewriter"/>
-      <map:serialize/>
-     </map:match>
-
-     <!--
-        | "Form1" example, demonstrates all kinds of features
-        -->
-     <map:match pattern="form1">
-       <!-- Here we use the HTTP method, GET or POST, to make distinction between
-       the initial form display and a form submit. In both cases the same publishing
-       pipeline will be used, which is below the selector. -->
-       <map:select type="request-method">
-         <map:when test="GET">
-           <!-- Here we use an action especially created for the "form1" example
-           which will initialise the form with some data. -->
-           <map:act type="init-form">
-             <map:parameter name="form-definition" value="forms/form1.xml"/>
-             <map:parameter name="attribute-name" value="form1"/>
-           </map:act>
-         </map:when>
-         <map:when test="POST">
-           <map:act type="handle-form-submit">
-             <map:parameter name="form-definition" value="forms/form1.xml"/>
-             <map:parameter name="attribute-name" value="form1"/>
-             <map:parameter name="formhandler" value="org.apache.cocoon.forms.samples.Form1Handler"/>
-
-             <!-- the content of this action is only executed in case validation
-                  succeeded, thus if the form handling is completed -->
-             <map:generate type="jx" src="forms/form1_success_jx.xml"/>
-             <map:call resource="simple-page2html">
-               <map:parameter name="file" value="forms/form1_success_jx.xml"/>
-             </map:call>
-             <map:transform type="servletLinkRewriter"/>
-             <map:serialize/>
-           </map:act>
-         </map:when>
-         <map:otherwise>
-           <!-- todo: do something here -->
-         </map:otherwise>
-       </map:select>
-
-       <!-- pipeline to show the form -->
-       <map:generate src="forms/form1_template_action.xml">
-         <map:parameter name="attribute-name" value="form1"/>           
-       </map:generate>
-<!-- <map:serialize type="xml"/> -->
-       <map:transform type="forms" label="content1">
-         <map:parameter name="attribute-name" value="form1"/>
-       </map:transform>
-       
-       <map:transform type="i18n">
-       </map:transform>
-       <map:call resource="simple-page2html">
-         <map:parameter name="file" value="forms/form1_success.xsp"/>
-       </map:call>
-       <map:transform type="i18n">
-       </map:transform>
-       <map:transform src="resources/forms-samples-styling.xsl">
- 		 <map:parameter name="dojo-resources" value="{servlet:ajax:/resource/external/dojo}"/>
-         <map:parameter name="forms-resources" value="{servlet:forms:/resource/external/forms}"/>
-       </map:transform>
-       <map:transform type="i18n">
-       </map:transform>
-       <map:transform type="servletLinkRewriter"/>
-       <map:serialize/>
-     </map:match>
-        
-    <!-- Flowscript Sample -->
-
-     <map:match pattern="form1.flow">
-       <map:call function="handleForm">
-         <map:parameter name="function" value="form1"/>
-         <map:parameter name="renderMode" value="jx"/>
-         <map:parameter name="definitionURI" value="forms/form1.xml"/>
-       </map:call>
-     </map:match>
-
-     <!-- Start a flowscript scenario -->
-     <map:match pattern="do-*.flow">
-       <map:call function="do_{1}"/>
-     </map:match>
-
-     <!-- Continue a scenario. The continuation id is passed in the URL
-          (typically used for GET requests) -->
-     <map:match pattern="*.continue">
-       <map:call continuation="{1}"/>
-     </map:match>
-
-     <!-- Continue a scenario. The continuation id is passed as a request
-          parameter (typically used for POST request) -->
-     <map:match pattern="continue">
-       <map:call continuation="{request-param:continuation-id}"/>
-     </map:match>
-
-     <!--
-        | Show a suggestion list 
-         -->
-     <map:match pattern="_cocoon/forms/suggest">
-        <map:generate type="suggestion-list"/>
-        <map:transform type="i18n"/>
-        <map:transform src="servlet:forms:/resource/internal/xsl/selection-list2json.xsl"/>
-        <map:serialize type="json"/>
-     </map:match>
-
-     <map:match pattern="_cocoon/forms/suggest/*">
-        <map:call function="{1}Lookup"/>
-     </map:match>
-     <map:match pattern="*.json-combo-data">
-        <map:generate type="jx" src="forms/{1}json.xml"/>
-       <map:transform src="servlet:forms:/resource/internal/xsl/selection-list2json.xsl"/>
-        <map:serialize type="json"/>
-     </map:match>      
-
-     <!--
-        | Show a form, using the forms transformer
-        -->
-     <map:match pattern="*-display-pipeline">
-       <map:generate src="forms/{1}_template.xml"/>
-       <map:transform type="forms" label="content1"/>
-       <map:transform type="i18n">
-         <!--map:parameter name="locale" value="en-US"/-->
-       </map:transform>
-       <map:call resource="simple-page2html">
-         <map:parameter name="file" value="forms/{1}_template.xml"/>
-       </map:call>
-       <map:transform src="resources/forms-samples-styling.xsl">
- 		 <map:parameter name="dojo-resources" value="{servlet:ajax:/resource/external/dojo}"/>
-         <map:parameter name="forms-resources" value="{servlet:forms:/resource/external/forms}"/>
-         <map:parameter name="dojo-locale" value="{flow-attr:locale}"/>
-       </map:transform>
-       <map:transform type="i18n">
-       </map:transform>
-       <map:transform type="servletLinkRewriter"/>
-       <map:serialize/>
-     </map:match>
-
-     <!--
-        | Show a form, using the jx template macros
-        -->
-     <map:match pattern="*-display-pipeline.jx">
-       <map:generate type="jx" src="forms/{1}_template.xml" label="content1">
-         <map:parameter name="locale" value="{flow-attribute:locale}"/>
-       </map:generate>
-       <map:transform type="browser-update"/><!-- AJAX-style form update -->
-       <map:transform type="i18n">
-         <map:parameter name="locale" value="{flow-attribute:locale}"/>
-       </map:transform>
-       <map:call resource="simple-page2html">
-         <map:parameter name="file" value="forms/{1}_template.xml"/>
-       </map:call>
-       <map:transform src="resources/forms-samples-styling.xsl">
- 		 <map:parameter name="dojo-resources" value="{servlet:ajax:/resource/external/dojo}"/>
-         <map:parameter name="forms-resources" value="{servlet:forms:/resource/external/forms}"/>
-         <map:parameter name="dojo-debug" value="true"/><!-- set to true to turn on dojo debugging in the Browser -->
-         <map:parameter name="dojo-locale" value="{flow-attr:locale}"/>
-       </map:transform>
-       <map:transform type="i18n">
-         <map:parameter name="locale" value="{flow-attribute:locale}"/>
-       </map:transform>
-       <map:transform type="servletLinkRewriter"/>
-       <map:select type="ajax-request">
-         <map:when test="true"><!-- sending a partial Browser Update -->
-            <map:select type="request-parameter">
-              <map:parameter name="parameter-name" value="dojo.transport"/>
-              <map:when test="iframe"><!-- sending BU via iFrameIO -->
-                <map:transform src="servlet:forms:/resource/internal/xsl/IframeTransport-bu-styling.xsl"/>
-                <map:serialize type="xhtml"/><!-- this is REALLY important -->
-              </map:when>
-              <map:otherwise><!-- sending BU via XHR -->
-                <map:serialize type="xml"/>
-              </map:otherwise>
-            </map:select>
-         </map:when>
-         <map:otherwise><!-- sending a complete page -->
-           <map:serialize type="html"/>
-         </map:otherwise>
-       </map:select>
-     </map:match>
-
-     <!--
-        | Display a success page using XSP
-        -->
-     <map:match pattern="*-success-pipeline.xsp">
-       <map:generate type="jx" src="forms/{1}_success_jx.xml"/>
-       <map:call resource="simple-page2html">
-         <map:parameter name="file" value="forms/{1}_template_jx.xml"/>
-       </map:call>
-       <map:transform type="servletLinkRewriter"/>
-       <map:serialize/>
-     </map:match>
-
-    <!-- Upload Widget Samples -->
-
-     <map:match pattern="upload">
-       <map:call function="upload"/>
-     </map:match>
-     <map:match pattern="uploadprogress">
-       <map:call function="uploadprogress"/>
-     </map:match>
-
-     <map:match pattern="*.continue">
-       <map:call continuation="{1}"/>
-     </map:match>
-
-
-     <map:match pattern="*-success-pipeline.jx">
-       <map:generate type="jx" src="forms/{1}_success_jx.xml"/>
-       <map:call resource="simple-page2html">
-         <map:parameter name="file" value="forms/{1}_success_jx.xml"/>
-       </map:call>
-       <map:transform type="servletLinkRewriter"/>
-       <map:serialize/>
-     </map:match>
-
-     <!--
-        | Binding form sample, using flowscript
-        -->
-
-     <map:match pattern="form2xml.flow">
-       <map:call function="handleForm">
-         <map:parameter name="function" value="form2xml"/>
-         <map:parameter name="definitionURI" value="forms/form2_model.xml"/>
-         <map:parameter name="documentURI" value="forms/form2_data.xml"/>
-         <map:parameter name="bindingURI" value="forms/form2_bind_xml.xml"/>
-       </map:call>
-     </map:match>
-
-     <map:match pattern="form2simpleXML.flow">
-       <map:call function="handleForm">
-         <map:parameter name="function" value="form2simpleXML"/>
-         <map:parameter name="definitionURI" value="forms/form2_model.xml"/>
-         <map:parameter name="documentURI" value="forms/form2_simple_data.xml"/>
-       </map:call>
-     </map:match>
-
-     <map:match pattern="form2bean.flow">
-       <map:call function="handleForm">
-         <map:parameter name="function" value="form2bean"/>
-         <map:parameter name="definitionURI" value="forms/form2_model.xml"/>
-         <map:parameter name="bindingURI" value="forms/form2_bind_bean.xml"/>
-       </map:call>
-     </map:match>
-
-     <map:match pattern="form2-success-pipeline">
-       <map:generate src="forms/form2_data-result.xml"/>
-       <map:transform type="i18n">
-         <!--map:parameter name="locale" value="en-US"/-->
-       </map:transform>
-       <map:serialize type="xml"/>
-     </map:match>
-
-     <map:match pattern="form2simpleXML-success-pipeline">
-       <map:generate type="jx" src="forms/form2simpleXML_result.xml"/>
-       <map:serialize type="xml"/>
-     </map:match>
-
-     <map:match pattern="form2bean-success-pipeline">
-       <map:generate type="jx" src="forms/form2_jx.xml"/>
-       <map:transform type="i18n">
-         <!--map:parameter name="locale" value="en-US"/-->
-       </map:transform>
-       <map:serialize/>
-     </map:match>
-
-     <!--
-        | Registration form example
-        -->
-
-     <map:match pattern="registration">
-       <map:call function="registration"/>
-     </map:match>
-     
-     <!--
-        | ImageMap form example
-        -->
-
-     <map:match pattern="imagemap">
-       <map:call function="imagemap"/>
-     </map:match>
-    
-     <!--
-         | Car selector sample.
-         -->
-
-     <map:match pattern="cars">
-       <map:generate src="forms/car-db.xml"/>
-       <map:transform src="xsl/carfilter.xsl">
-         <map:parameter name="list" value="makes"/>
-       </map:transform>
-       <map:serialize type="xml"/>
-     </map:match>
-
-     <map:match pattern="cars/*">
-       <map:generate src="forms/car-db.xml"/>
-       <map:transform src="xsl/carfilter.xsl">
-         <map:parameter name="list" value="types"/>
-         <map:parameter name="make" value="{1}"/>
-       </map:transform>
-       <map:serialize type="xml"/>
-     </map:match>
-     
-     <map:match pattern="cars/*/*">
-       <map:generate src="forms/car-db.xml"/>
-       <map:transform src="xsl/carfilter.xsl">
-         <map:parameter name="list" value="models"/>
-         <map:parameter name="make" value="{1}"/>
-         <map:parameter name="type" value="{2}"/>
-       </map:transform>
-       <map:serialize type="xml"/>
-     </map:match>
-
-     <map:match pattern="carselector">
-       <map:call function="selectCar">
-         <map:parameter name="defaultMake" value="Maserati"/>
-       </map:call>
-     </map:match>
-
-     <!--
-         | Car selector sample with XMLHTTPRequest
-         -->
-
-     <map:match pattern="xhr_carselector">
-       <map:select type="request-method">
-         <map:when test="POST">
-           <map:call continuation="{request-param:continuation-id}"/>
-         </map:when>
-         <map:otherwise>
-           <map:call function="xhrSelectCar">
-             <map:parameter name="defaultMake" value="Maserati"/>
-           </map:call>
-         </map:otherwise>
-       </map:select>
-     </map:match>
-
-     <map:match pattern="xhr_cars">
-       <map:generate src="forms/car-db.xml"/>
-       <map:transform src="xsl/xhr_carfilter.xsl">
-         <map:parameter name="list" value="makes"/>
-       </map:transform>
-       <map:serialize type="xml"/>
-     </map:match>
-
-     <map:match pattern="xhr_cars/*">
-       <map:generate src="forms/car-db.xml"/>
-       <map:transform src="xsl/xhr_carfilter.xsl">
-         <map:parameter name="list" value="types"/>
-         <map:parameter name="make" value="{1}"/>
-       </map:transform>
-       <map:serialize type="xml"/>
-     </map:match>
-
-     <map:match pattern="xhr_cars/*/*">
-       <map:generate src="forms/car-db.xml"/>
-       <map:transform src="xsl/xhr_carfilter.xsl">
-         <map:parameter name="list" value="models"/>
-         <map:parameter name="make" value="{1}"/>
-         <map:parameter name="type" value="{2}"/>
-       </map:transform>
-       <map:serialize type="xml"/>
-     </map:match>
-     
-     <!--
-         | Country selector sample.
-         -->
-
-     <map:match pattern="countryselector">
-       <map:select type="request-method">
-         <map:when test="GET">
-           <map:call function="selectCountry"/>
-         </map:when>
-         <map:when test="POST">
-           <map:call continuation="{request-param:continuation-id}"/>
-         </map:when>
-         <map:otherwise>
-           <!-- todo: do something here -->
-         </map:otherwise>
-       </map:select>
-     </map:match>
-     
-     <!--
-        | HTMLArea example
-        -->
-
-     <map:match pattern="htmlarea">
-       <map:call function="htmlarea"/>
-     </map:match>
-
-     <map:match pattern="htmlarea-display-pipeline">
-       <map:generate src="forms/htmlarea_template.xml"/>
-       <map:transform type="forms"/>
-       <map:transform type="i18n">
-         <!--map:parameter name="locale" value="en-US"/-->
-       </map:transform>
-       <map:transform src="servlet:style-default:/common/style/xsl/html/simple-page2html.xsl">
-         <map:parameter name="servletPath" value="{request:servletPath}"/>
-         <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
-         <map:parameter name="file" value="forms/htmlarea_template.xml"/>
-         <map:parameter name="remove" value="{0}"/>
-       </map:transform>
-       <map:transform src="resources/forms-samples-styling.xsl">
-         <map:parameter name="dojo-resources" value="{servlet:ajax:/resource/external/dojo}"/>
-         <map:parameter name="forms-resources" value="{servlet:forms:/resource/external/forms}"/>
-       </map:transform>
-       <map:transform type="servletLinkRewriter"/>
-       <map:serialize/>
-     </map:match>
-
-     <map:match pattern="htmlarea-success-pipeline">
-       <map:generate type="jx" src="forms/htmlarea_success.jx"/>
-       <map:serialize type="xml"/>
-     </map:match>
-     
-     <!--
-        | Sample building a forms-form-gui editor in forms
-        | Doubles as a showcase for class, new, struct, union widgets
-        -->
-
-     <map:match pattern="form_model_gui.flow">
-       <map:call function="handleForm">
-         <map:parameter name="function" value="form_model_gui"/>
-         <map:parameter name="definitionURI" value="forms/form_model_gui_model.xml"/>
-         <map:parameter name="attribute-name" value="form_model_gui"/>
-         <map:parameter name="documentURI" value="forms/form_model_gui_data.xml"/>
-         <map:parameter name="bindingURI" value="forms/form_model_gui_binding.xml"/>
-       </map:call>
-     </map:match>
-     
-     
-     <!--
-        | Group of Binding feature samples...
-        -->
-     
-     <map:match pattern="binding-*-*.flow">
-       <map:call function="bindingSample">
-         <map:parameter name="sample-code" value="{1}" />
-         <map:parameter name="backend-type" value="{2}" />
-       </map:call>
-     </map:match>
-     
-     <map:match pattern="binding-*.flow">
-       <map:redirect-to uri="binding-{1}-JS.flow" />
-     </map:match>
-     
-     <map:match pattern="binding.form.*">
-       <map:select type="resource-exists" >
-         <map:when test="forms/binding/{1}-template.xml">
-           <map:generate type="file" src="forms/binding/{1}-template.xml" />
-           <map:transform type="forms" >
-             <map:parameter name="form-action" value="{flow-continuation:id}.continue" />
-             <map:parameter name="form-method" value="POST" />
-           </map:transform>
-         </map:when>
-         <!-- 
-            | If the template file does not exist, the code below generates the
-            | form, but results in a document fragment rather than a correct HTML
-            | tagged page (i.e. it lacks the HTML, HEAD and BODY tags).
-            |
-            | To simplify the samples, all template files exist and the code
-            | below is not executed.
-            -->
-         <map:otherwise>       
-           <map:generate type="forms">
-             <map:parameter name="form-action" value="{flow-continuation:id}.continue" />
-             <map:parameter name="form-method" value="POST" />
-           </map:generate>
-         </map:otherwise>
-       </map:select>
-       <map:call resource="simple-page2html">
-         <map:parameter name="file" value="forms/{1}_template.xml"/>
-       </map:call>
-       <map:transform src="resources/forms-samples-styling.xsl">
-         <map:parameter name="dojo-resources" value="{servlet:ajax:/resource/external/dojo}"/>
-         <map:parameter name="forms-resources" value="{servlet:forms:/resource/external/forms}"/>
-       </map:transform>
-       <map:transform type="servletLinkRewriter"/>
-       <map:serialize type="html" />
-     </map:match>
-
-     <map:match pattern="binding.done">
-       <map:generate type="jx" src="forms/binding/done.jx"/> <!-- generic dump of flow data via jx? -->
-       <map:call resource="simple-page2html">
-         <map:parameter name="file" value="forms/binding/done.jx"/>
-       </map:call>
-       <map:transform type="servletLinkRewriter"/>
-       <map:serialize />
-     </map:match>
-     
-     <!-- **************************** profiling **************************** -->
-     <map:match pattern="form1-cforms-transformer">
-       <map:act type="init-form">
-         <map:parameter name="form-definition" value="forms/form1.xml"/>
-         <map:parameter name="attribute-name" value="form1"/>
-       </map:act>       
-       <map:generate src="forms/form1_template_action.xml"/>
-       <map:transform type="forms" label="content1">
-         <map:parameter name="attribute-name" value="form1"/>
-       </map:transform>
-       <map:serialize type="xml"/>
-     </map:match>  
-     <map:match pattern="form1-jx-macro">
-       <map:act type="init-form">
-         <map:parameter name="form-definition" value="forms/form1.xml"/>
-         <map:parameter name="attribute-name" value="form1"/>
-       </map:act>       
-       <map:generate src="forms/form1_template_action_jx-macro.xml" type="jx">
-         <map:parameter name="attribute-name" value="form1"/>           
-       </map:generate>
-       <map:serialize type="xml"/>
-     </map:match>     
-     
-     <!-- **************************** mounts **************************** -->     
-
-    <map:match pattern="*">
-        <map:redirect-to uri="{1}/"/>
-    </map:match>
-
-    <map:match pattern="*/**">
-     <map:mount src="{1}/" uri-prefix="{1}"/>
-   </map:match>
+    <!-- =========================== Components =================================== -->
 
-   </map:pipeline>
- </map:pipelines>
+    <map:components>
+
+        <!-- =========================== Generators =================================== -->
+
+        <map:generators default="file">
+            <!-- use the new implementation of JX -->
+            <map:generator name="jx" src="org.apache.cocoon.template.JXTemplateGenerator" />
+            <map:generator name="suggestion-list" src="org.apache.cocoon.forms.generation.SuggestionListGenerator" />
+        </map:generators>
+
+        <!-- =========================== Transformers =================================== -->
+
+        <map:transformers default="xslt">
+            <map:transformer name="browser-update" src="org.apache.cocoon.ajax.BrowserUpdateTransformer" />
+            <map:transformer name="i18n" src="org.apache.cocoon.transformation.I18nTransformer">
+                <catalogues default="other">
+                    <catalogue id="other" name="OtherMessages" location="messages" />
+                    <catalogue id="forms" name="messages" location="servlet:forms:/resource/internal/i18n" />
+                    <catalogue id="upload" name="messages" location="servlet:ajax:/resource/internal/i18n" />
+                </catalogues>
+            </map:transformer>
+        </map:transformers>
+
+        <!-- =========================== Serializers =================================== -->
+
+        <map:serializers default="html">
+            <map:serializer logger="sitemap.serializer.json" mime-type="text/javascript" name="json" src="org.apache.cocoon.serialization.TextSerializer">
+                <encoding>UTF-8</encoding><!-- JSON responses are expected to be in UTF-8 -->
+            </map:serializer>
+        </map:serializers>
+
+        <!-- =========================== Actions =================================== -->
+
+        <map:actions>
+            <map:action name="make-form" src="org.apache.cocoon.forms.acting.MakeFormAction" logger="forms" />
+            <map:action name="init-form" src="org.apache.cocoon.forms.samples.InitForm1Action" logger="forms" />
+            <map:action name="handle-form-submit" src="org.apache.cocoon.forms.acting.HandleFormSubmitAction" logger="forms" />
+        </map:actions>
+
+        <!-- =========================== Selectors =================================== -->
+
+        <map:selectors>
+            <map:selector name="ajax-request" src="org.apache.cocoon.ajax.AjaxRequestSelector" />
+        </map:selectors>
+    </map:components>
+
+    <!-- =========================== Views =================================== -->
+
+    <map:views>
+        <map:view name="content" from-label="content">
+            <map:serialize type="xml" />
+        </map:view>
+
+        <map:view name="content1" from-label="content1">
+            <map:serialize type="xml" />
+        </map:view>
+
+        <map:view from-label="content" name="pretty-content">
+            <!-- Make use of servlet services -->
+            <map:serialize type="servletService">
+                <map:parameter name="service" value="servlet:style-default:/service/system/xml2html" />
+            </map:serialize>
+        </map:view>
+
+        <map:view name="links" from-position="last">
+            <map:serialize type="links" />
+        </map:view>
+    </map:views>
+
+    <!-- =========================== Flowscripts =================================== -->
+
+    <map:flow language="javascript">
+        <map:script src="flow/forms_flow_example.js" />
+        <map:script src="flow/binding_example.js" />
+        <map:script src="flow/upload_example.js" />
+        <map:script src="flow/registration.js" />
+        <map:script src="flow/imagemap.js" />
+        <map:script src="flow/bindings.js" />
+        <map:script src="flow/form_model_gui.js" />
+        <map:script src="flow/htmlarea.js" />
+    </map:flow>
+
+    <!-- =========================== Pipelines =================================== -->
+
+    <map:pipelines>
+        <map:pipeline>
+
+            <map:match pattern="">
+                <map:generate src="welcome.xml" />
+                <!-- Make use of servlet services -->
+                <map:serialize type="servletService">
+                    <map:parameter name="service" value="servlet:style-default:/service/common/simple-samples2html" />
+                </map:serialize>
+            </map:match>
+
+            <!--
+                | "Form1" example, demonstrates all kinds of features
+            -->
+            <map:match pattern="form1">
+                <!-- Here we use the HTTP method, GET or POST, to make distinction between
+                    the initial form display and a form submit. In both cases the same publishing
+                    pipeline will be used, which is below the selector. -->
+                <map:select type="request-method">
+                    <map:when test="GET">
+                        <!-- Here we use an action especially created for the "form1" example
+                            which will initialise the form with some data. -->
+                        <map:act type="init-form">
+                            <map:parameter name="form-definition" value="forms/form1.xml" />
+                            <map:parameter name="attribute-name" value="form1" />
+                        </map:act>
+                    </map:when>
+                    <map:when test="POST">
+                        <map:act type="handle-form-submit">
+                            <map:parameter name="form-definition" value="forms/form1.xml" />
+                            <map:parameter name="attribute-name" value="form1" />
+                            <map:parameter name="formhandler" value="org.apache.cocoon.forms.samples.Form1Handler" />
+
+                            <!-- the content of this action is only executed in case validation
+                                succeeded, thus if the form handling is completed -->
+                            <map:generate type="jx" src="forms/form1_success_jx.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:act>
+                    </map:when>
+                    <map:otherwise>
+                        <!-- todo: do something here -->
+                    </map:otherwise>
+                </map:select>
+
+                <!-- pipeline to show the form -->
+                <map:generate src="forms/form1_template_action.xml">
+                    <map:parameter name="attribute-name" value="form1" />
+                </map:generate>
+                <!-- <map:serialize type="xml"/> -->
+                <map:transform type="forms" label="content1">
+                    <map:parameter name="attribute-name" value="form1" />
+                </map:transform>
+                <map:transform type="i18n"></map:transform>
+                <map:transform src="servlet:style-default:/common/style/xsl/html/simple-page2html.xsl" />
+                <map:transform type="i18n"></map:transform>
+                <map:transform src="resources/forms-samples-styling.xsl">
+                    <map:parameter name="dojo-resources" value="{servlet:ajax:/resource/external/dojo}" />
+                    <map:parameter name="forms-resources" value="{servlet:forms:/resource/external/forms}" />
+                </map:transform>
+                <map:transform type="i18n"></map:transform>
+                <map:transform type="servletLinkRewriter" />
+                <map:serialize />
+            </map:match>
+
+            <!-- Flowscript Sample -->
+
+            <map:match pattern="form1.flow">
+                <map:call function="handleForm">
+                    <map:parameter name="function" value="form1" />
+                    <map:parameter name="renderMode" value="jx" />
+                    <map:parameter name="definitionURI" value="forms/form1.xml" />
+                </map:call>
+            </map:match>
+
+            <!-- Start a flowscript scenario -->
+            <map:match pattern="do-*.flow">
+                <map:call function="do_{1}" />
+            </map:match>
+
+            <!-- Continue a scenario. The continuation id is passed in the URL
+                (typically used for GET requests) -->
+            <map:match pattern="*.continue">
+                <map:call continuation="{1}" />
+            </map:match>
+
+            <!-- Continue a scenario. The continuation id is passed as a request
+                parameter (typically used for POST request) -->
+            <map:match pattern="continue">
+                <map:call continuation="{request-param:continuation-id}" />
+            </map:match>
+
+            <!--
+                | Show a suggestion list 
+            -->
+            <map:match pattern="_cocoon/forms/suggest">
+                <map:generate type="suggestion-list" />
+                <map:transform type="i18n" />
+                <map:transform src="servlet:forms:/resource/internal/xsl/selection-list2json.xsl" />
+                <map:serialize type="json" />
+            </map:match>
+
+            <map:match pattern="_cocoon/forms/suggest/*">
+                <map:call function="{1}Lookup" />
+            </map:match>
+            <map:match pattern="*.json-combo-data">
+                <map:generate type="jx" src="forms/{1}json.xml" />
+                <map:transform src="servlet:forms:/resource/internal/xsl/selection-list2json.xsl" />
+                <map:serialize type="json" />
+            </map:match>
+
+            <!--
+                | Show a form, using the forms transformer
+            -->
+            <map:match pattern="*-display-pipeline">
+                <map:generate src="forms/{1}_template.xml" />
+                <map:transform type="forms" label="content1" />
+                <map:transform type="i18n">
+                    <!--map:parameter name="locale" value="en-US"/-->
+                </map:transform>
+                <map:transform src="servlet:style-default:/common/style/xsl/html/simple-page2html.xsl" />
+                <map:transform src="resources/forms-samples-styling.xsl">
+                    <map:parameter name="dojo-resources" value="{servlet:ajax:/resource/external/dojo}" />
+                    <map:parameter name="forms-resources" value="{servlet:forms:/resource/external/forms}" />
+                    <map:parameter name="dojo-locale" value="{flow-attr:locale}" />
+                </map:transform>
+                <map:transform type="i18n"></map:transform>
+                <map:transform type="servletLinkRewriter" />
+                <map:serialize />
+            </map:match>
+
+            <!--
+                | Show a form, using the jx template macros
+            -->
+            <map:match pattern="*-display-pipeline.jx">
+                <map:generate type="jx" src="forms/{1}_template.xml" label="content1">
+                    <map:parameter name="locale" value="{flow-attribute:locale}" />
+                </map:generate>
+                <map:transform type="browser-update" /><!-- AJAX-style form update -->
+                <map:transform type="i18n">
+                    <map:parameter name="locale" value="{flow-attribute:locale}" />
+                </map:transform>
+                <map:transform src="servlet:style-default:/common/style/xsl/html/simple-page2html.xsl" />
+                <map:transform src="resources/forms-samples-styling.xsl">
+                    <map:parameter name="dojo-resources" value="{servlet:ajax:/resource/external/dojo}" />
+                    <map:parameter name="forms-resources" value="{servlet:forms:/resource/external/forms}" />
+                    <map:parameter name="dojo-debug" value="true" /><!-- set to true to turn on dojo debugging in the Browser -->
+                    <map:parameter name="dojo-locale" value="{flow-attr:locale}" />
+                </map:transform>
+                <map:transform type="i18n">
+                    <map:parameter name="locale" value="{flow-attribute:locale}" />
+                </map:transform>
+                <map:transform type="servletLinkRewriter" />
+                <map:select type="ajax-request">
+                    <map:when test="true"><!-- sending a partial Browser Update -->
+                        <map:select type="request-parameter">
+                            <map:parameter name="parameter-name" value="dojo.transport" />
+                            <map:when test="iframe"><!-- sending BU via iFrameIO -->
+                                <map:transform src="servlet:forms:/resource/internal/xsl/IframeTransport-bu-styling.xsl" />
+                                <map:serialize type="xhtml" /><!-- this is REALLY important -->
+                            </map:when>
+                            <map:otherwise><!-- sending BU via XHR -->
+                                <map:serialize type="xml" />
+                            </map:otherwise>
+                        </map:select>
+                    </map:when>
+                    <map:otherwise><!-- sending a complete page -->
+                        <map:serialize type="html" />
+                    </map:otherwise>
+                </map:select>
+            </map:match>
+
+            <!--
+                | Display a success page using XSP
+            -->
+            <map:match pattern="*-success-pipeline.xsp">
+                <map:generate type="jx" src="forms/{1}_success_jx.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>
+
+            <!-- Upload Widget Samples -->
+
+            <map:match pattern="upload">
+                <map:call function="upload" />
+            </map:match>
+            <map:match pattern="uploadprogress">
+                <map:call function="uploadprogress" />
+            </map:match>
+
+            <map:match pattern="*.continue">
+                <map:call continuation="{1}" />
+            </map:match>
+
+
+            <map:match pattern="*-success-pipeline.jx">
+                <map:generate type="jx" src="forms/{1}_success_jx.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>
+
+            <!--
+                | Binding form sample, using flowscript
+            -->
+
+            <map:match pattern="form2xml.flow">
+                <map:call function="handleForm">
+                    <map:parameter name="function" value="form2xml" />
+                    <map:parameter name="definitionURI" value="forms/form2_model.xml" />
+                    <map:parameter name="documentURI" value="forms/form2_data.xml" />
+                    <map:parameter name="bindingURI" value="forms/form2_bind_xml.xml" />
+                </map:call>
+            </map:match>
+
+            <map:match pattern="form2simpleXML.flow">
+                <map:call function="handleForm">
+                    <map:parameter name="function" value="form2simpleXML" />
+                    <map:parameter name="definitionURI" value="forms/form2_model.xml" />
+                    <map:parameter name="documentURI" value="forms/form2_simple_data.xml" />
+                </map:call>
+            </map:match>
+
+            <map:match pattern="form2bean.flow">
+                <map:call function="handleForm">
+                    <map:parameter name="function" value="form2bean" />
+                    <map:parameter name="definitionURI" value="forms/form2_model.xml" />
+                    <map:parameter name="bindingURI" value="forms/form2_bind_bean.xml" />
+                </map:call>
+            </map:match>
+
+            <map:match pattern="form2-success-pipeline">
+                <map:generate src="forms/form2_data-result.xml" />
+                <map:transform type="i18n">
+                    <!--map:parameter name="locale" value="en-US"/-->
+                </map:transform>
+                <map:serialize type="xml" />
+            </map:match>
+
+            <map:match pattern="form2simpleXML-success-pipeline">
+                <map:generate type="jx" src="forms/form2simpleXML_result.xml" />
+                <map:serialize type="xml" />
+            </map:match>
+
+            <map:match pattern="form2bean-success-pipeline">
+                <map:generate type="jx" src="forms/form2_jx.xml" />
+                <map:transform type="i18n">
+                    <!--map:parameter name="locale" value="en-US"/-->
+                </map:transform>
+                <map:serialize />
+            </map:match>
+
+            <!--
+                | Registration form example
+            -->
+
+            <map:match pattern="registration">
+                <map:call function="registration" />
+            </map:match>
+
+            <!--
+                | ImageMap form example
+            -->
+
+            <map:match pattern="imagemap">
+                <map:call function="imagemap" />
+            </map:match>
+
+            <!--
+                | Car selector sample.
+            -->
+
+            <map:match pattern="cars">
+                <map:generate src="forms/car-db.xml" />
+                <map:transform src="xsl/carfilter.xsl">
+                    <map:parameter name="list" value="makes" />
+                </map:transform>
+                <map:serialize type="xml" />
+            </map:match>
+
+            <map:match pattern="cars/*">
+                <map:generate src="forms/car-db.xml" />
+                <map:transform src="xsl/carfilter.xsl">
+                    <map:parameter name="list" value="types" />
+                    <map:parameter name="make" value="{1}" />
+                </map:transform>
+                <map:serialize type="xml" />
+            </map:match>
+
+            <map:match pattern="cars/*/*">
+                <map:generate src="forms/car-db.xml" />
+                <map:transform src="xsl/carfilter.xsl">
+                    <map:parameter name="list" value="models" />
+                    <map:parameter name="make" value="{1}" />
+                    <map:parameter name="type" value="{2}" />
+                </map:transform>
+                <map:serialize type="xml" />
+            </map:match>
+
+            <map:match pattern="carselector">
+                <map:call function="selectCar">
+                    <map:parameter name="defaultMake" value="Maserati" />
+                </map:call>
+            </map:match>
+
+            <!--
+                | Car selector sample with XMLHTTPRequest
+            -->
+
+            <map:match pattern="xhr_carselector">
+                <map:select type="request-method">
+                    <map:when test="POST">
+                        <map:call continuation="{request-param:continuation-id}" />
+                    </map:when>
+                    <map:otherwise>
+                        <map:call function="xhrSelectCar">
+                            <map:parameter name="defaultMake" value="Maserati" />
+                        </map:call>
+                    </map:otherwise>
+                </map:select>
+            </map:match>
+
+            <map:match pattern="xhr_cars">
+                <map:generate src="forms/car-db.xml" />
+                <map:transform src="xsl/xhr_carfilter.xsl">
+                    <map:parameter name="list" value="makes" />
+                </map:transform>
+                <map:serialize type="xml" />
+            </map:match>
+
+            <map:match pattern="xhr_cars/*">
+                <map:generate src="forms/car-db.xml" />
+                <map:transform src="xsl/xhr_carfilter.xsl">
+                    <map:parameter name="list" value="types" />
+                    <map:parameter name="make" value="{1}" />
+                </map:transform>
+                <map:serialize type="xml" />
+            </map:match>
+
+            <map:match pattern="xhr_cars/*/*">
+                <map:generate src="forms/car-db.xml" />
+                <map:transform src="xsl/xhr_carfilter.xsl">
+                    <map:parameter name="list" value="models" />
+                    <map:parameter name="make" value="{1}" />
+                    <map:parameter name="type" value="{2}" />
+                </map:transform>
+                <map:serialize type="xml" />
+            </map:match>
+
+            <!--
+                | Country selector sample.
+            -->
+
+            <map:match pattern="countryselector">
+                <map:select type="request-method">
+                    <map:when test="GET">
+                        <map:call function="selectCountry" />
+                    </map:when>
+                    <map:when test="POST">
+                        <map:call continuation="{request-param:continuation-id}" />
+                    </map:when>
+                    <map:otherwise>
+                        <!-- todo: do something here -->
+                    </map:otherwise>
+                </map:select>
+            </map:match>
+
+            <!--
+                | HTMLArea example
+            -->
+
+            <map:match pattern="htmlarea">
+                <map:call function="htmlarea" />
+            </map:match>
+
+            <map:match pattern="htmlarea-display-pipeline">
+                <map:generate src="forms/htmlarea_template.xml" />
+                <map:transform type="forms" />
+                <map:transform type="i18n">
+                    <!--map:parameter name="locale" value="en-US"/-->
+                </map:transform>
+                <map:transform src="servlet:style-default:/common/style/xsl/html/simple-page2html.xsl" />
+                <map:transform src="resources/forms-samples-styling.xsl">
+                    <map:parameter name="dojo-resources" value="{servlet:ajax:/resource/external/dojo}" />
+                    <map:parameter name="forms-resources" value="{servlet:forms:/resource/external/forms}" />
+                </map:transform>
+                <map:transform type="servletLinkRewriter" />
+                <map:serialize />
+            </map:match>
+
+            <map:match pattern="htmlarea-success-pipeline">
+                <map:generate type="jx" src="forms/htmlarea_success.jx" />
+                <map:serialize type="xml" />
+            </map:match>
+
+            <!--
+                | Sample building a forms-form-gui editor in forms
+                | Doubles as a showcase for class, new, struct, union widgets
+            -->
+
+            <map:match pattern="form_model_gui.flow">
+                <map:call function="handleForm">
+                    <map:parameter name="function" value="form_model_gui" />
+                    <map:parameter name="definitionURI" value="forms/form_model_gui_model.xml" />
+                    <map:parameter name="attribute-name" value="form_model_gui" />
+                    <map:parameter name="documentURI" value="forms/form_model_gui_data.xml" />
+                    <map:parameter name="bindingURI" value="forms/form_model_gui_binding.xml" />
+                </map:call>
+            </map:match>
+
+
+            <!--
+                | Group of Binding feature samples...
+            -->
+
+            <map:match pattern="binding-*-*.flow">
+                <map:call function="bindingSample">
+                    <map:parameter name="sample-code" value="{1}" />
+                    <map:parameter name="backend-type" value="{2}" />
+                </map:call>
+            </map:match>
+
+            <map:match pattern="binding-*.flow">
+                <map:redirect-to uri="binding-{1}-JS.flow" />
+            </map:match>
+
+            <map:match pattern="binding.form.*">
+                <map:select type="resource-exists">
+                    <map:when test="forms/binding/{1}-template.xml">
+                        <map:generate type="file" src="forms/binding/{1}-template.xml" />
+                        <map:transform type="forms">
+                            <map:parameter name="form-action" value="{flow-continuation:id}.continue" />
+                            <map:parameter name="form-method" value="POST" />
+                        </map:transform>
+                    </map:when>
+                    <!-- 
+                        | If the template file does not exist, the code below generates the
+                        | form, but results in a document fragment rather than a correct HTML
+                        | tagged page (i.e. it lacks the HTML, HEAD and BODY tags).
+                        |
+                        | To simplify the samples, all template files exist and the code
+                        | below is not executed.
+                    -->
+                    <map:otherwise>
+                        <map:generate type="forms">
+                            <map:parameter name="form-action" value="{flow-continuation:id}.continue" />
+                            <map:parameter name="form-method" value="POST" />
+                        </map:generate>
+                    </map:otherwise>
+                </map:select>
+                <map:transform src="servlet:style-default:/common/style/xsl/html/simple-page2html.xsl" />
+                <map:transform src="resources/forms-samples-styling.xsl">
+                    <map:parameter name="dojo-resources" value="{servlet:ajax:/resource/external/dojo}" />
+                    <map:parameter name="forms-resources" value="{servlet:forms:/resource/external/forms}" />
+                </map:transform>
+                <map:transform type="servletLinkRewriter" />
+                <map:serialize type="html" />
+            </map:match>
+
+            <map:match pattern="binding.done">
+                <map:generate type="jx" src="forms/binding/done.jx" /><!-- generic dump of flow data via jx? -->
+                <!-- 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>
+
+            <!-- **************************** profiling **************************** -->
+            <map:match pattern="form1-cforms-transformer">
+                <map:act type="init-form">
+                    <map:parameter name="form-definition" value="forms/form1.xml" />
+                    <map:parameter name="attribute-name" value="form1" />
+                </map:act>
+                <map:generate src="forms/form1_template_action.xml" />
+                <map:transform type="forms" label="content1">
+                    <map:parameter name="attribute-name" value="form1" />
+                </map:transform>
+                <map:serialize type="xml" />
+            </map:match>
+            <map:match pattern="form1-jx-macro">
+                <map:act type="init-form">
+                    <map:parameter name="form-definition" value="forms/form1.xml" />
+                    <map:parameter name="attribute-name" value="form1" />
+                </map:act>
+                <map:generate src="forms/form1_template_action_jx-macro.xml" type="jx">
+                    <map:parameter name="attribute-name" value="form1" />
+                </map:generate>
+                <map:serialize type="xml" />
+            </map:match>
+
+            <!-- **************************** mounts **************************** -->
+
+            <map:match pattern="*">
+                <map:redirect-to uri="{1}/" />
+            </map:match>
+
+            <map:match pattern="*/**">
+                <map:mount src="{1}/" uri-prefix="{1}" />
+            </map:match>
+
+        </map:pipeline>
+    </map:pipelines>
 
 </map:sitemap>

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/sql/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/sql/sitemap.xmap?view=diff&rev=539114&r1=539113&r2=539114
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/sql/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/sql/sitemap.xmap Thu May 17 14:04:15 2007
@@ -21,80 +21,92 @@
     +-->
 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
 
-<map:components>
-  <map:selectors>
-    <map:selector name="ajax-request" src="org.apache.cocoon.ajax.AjaxRequestSelector"/>
-  </map:selectors>
-  <map:transformers default="xslt">
-    <map:transformer name="browser-update" src="org.apache.cocoon.ajax.BrowserUpdateTransformer"/>
-    <map:transformer name="i18n" src="org.apache.cocoon.transformation.I18nTransformer">
-      <catalogues default="forms">
-        <catalogue id="forms" name="messages" location="servlet:forms:/resource/internal/i18n"/>
-      </catalogues>
-    </map:transformer>
-  </map:transformers>
-</map:components>
-
-<map:flow>
-  <map:script src="flow/flow.js"/>
-  <map:script src="flow/jdbi.js"/>
-</map:flow>
-
-<map:pipelines>
-  <!-- Public URLs -->
-  <map:pipeline>
-    <!-- Main page: list employees -->
-    <map:match pattern="">
-      <map:redirect-to uri="do_list_employees"/>
-    </map:match>
-
-    <map:match pattern="do_*">
-      <map:call function="do_{1}"/>
-    </map:match>
-    
-    <map:match pattern="continue">
-      <map:call continuation="{request-param:continuation-id}"/>
-    </map:match>
-
-  </map:pipeline>
-  
-  <!-- Internal URLs -->
-  <map:pipeline internal-only="false">
-    
-    <map:match pattern="selection-list/*">
-      <map:call function="selection_list">
-        <map:parameter name="table" value="{1}"/>
-      </map:call>
-    </map:match>
-    
-    <map:match pattern="*.xml">
-      <map:generate type="jx" src="{1}.xml"/>
-      <map:serialize type="xml"/>
-    </map:match>
-    
-    <map:match pattern="viewform-*.html">
-      <map:generate type="jx" src="pages/{1}.xml"/>
-      <map:transform type="browser-update"/>
-      <map:transform type="i18n"/>
-      <map:transform src="../resources/forms-samples-styling.xsl"/>
-      <map:select type="ajax-request">
-        <map:when test="true">
-          <map:serialize type="xml"/>
-        </map:when>
-        <map:otherwise>
-          <map:transform src="resources/page-styling.xsl"/>
-          <map:serialize type="html"/>
-        </map:otherwise>
-      </map:select>
-    </map:match>
-    
-    <map:match pattern="*.html">
-      <map:generate type="jx" src="pages/{1}.xml"/>
-      <map:transform src="resources/page-styling.xsl"/>
-      <map:serialize type="html"/>
-    </map:match>
-    
-  </map:pipeline>
-</map:pipelines>
+    <!-- =========================== Components =================================== -->
+
+    <map:components>
+
+        <!-- =========================== Selectors =================================== -->
+
+        <map:selectors>
+            <map:selector name="ajax-request" src="org.apache.cocoon.ajax.AjaxRequestSelector" />
+        </map:selectors>
+
+        <!-- =========================== Transformers =================================== -->
+
+        <map:transformers default="xslt">
+            <map:transformer name="browser-update" src="org.apache.cocoon.ajax.BrowserUpdateTransformer" />
+            <map:transformer name="i18n" src="org.apache.cocoon.transformation.I18nTransformer">
+                <catalogues default="forms">
+                    <catalogue id="forms" name="messages" location="servlet:forms:/resource/internal/i18n" />
+                </catalogues>
+            </map:transformer>
+        </map:transformers>
+    </map:components>
+
+    <!-- =========================== Flowscripts =================================== -->
+
+    <map:flow>
+        <map:script src="flow/flow.js" />
+        <map:script src="flow/jdbi.js" />
+    </map:flow>
+
+    <!-- =========================== Pipelines =================================== -->
+
+    <map:pipelines>
+        <!-- Public URLs -->
+        <map:pipeline>
+            <!-- Main page: list employees -->
+            <map:match pattern="">
+                <map:redirect-to uri="do_list_employees" />
+            </map:match>
+
+            <map:match pattern="do_*">
+                <map:call function="do_{1}" />
+            </map:match>
+
+            <map:match pattern="continue">
+                <map:call continuation="{request-param:continuation-id}" />
+            </map:match>
+
+        </map:pipeline>
+
+        <!-- Internal URLs -->
+        <map:pipeline internal-only="false">
+
+            <map:match pattern="selection-list/*">
+                <map:call function="selection_list">
+                    <map:parameter name="table" value="{1}" />
+                </map:call>
+            </map:match>
+
+            <map:match pattern="*.xml">
+                <map:generate type="jx" src="{1}.xml" />
+                <map:serialize type="xml" />
+            </map:match>
+
+            <map:match pattern="viewform-*.html">
+                <map:generate type="jx" src="pages/{1}.xml" />
+                <map:transform type="browser-update" />
+                <map:transform type="i18n" />
+                <map:transform src="../resources/forms-samples-styling.xsl" />
+                <map:select type="ajax-request">
+                    <map:when test="true">
+                        <map:serialize type="xml" />
+                    </map:when>
+                    <map:otherwise>
+                        <map:transform src="resources/page-styling.xsl" />
+                        <map:serialize type="html" />
+                    </map:otherwise>
+                </map:select>
+            </map:match>
+
+            <map:match pattern="*.html">
+                <map:generate type="jx" src="pages/{1}.xml" />
+                <map:transform src="resources/page-styling.xsl" />
+                <map:serialize type="html" />
+            </map:match>
+
+        </map:pipeline>
+    </map:pipelines>
 
 </map:sitemap>

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/swan/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/swan/sitemap.xmap?view=diff&rev=539114&r1=539113&r2=539114
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/swan/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/swan/sitemap.xmap Thu May 17 14:04:15 2007
@@ -18,174 +18,172 @@
 
 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
 
-  <map:components>
+    <!-- =========================== Components =================================== -->
 
-    <map:transformers default="xslt">    
-      <map:transformer name="i18n" src="org.apache.cocoon.transformation.I18nTransformer">
-        <catalogues default="other">
-          <catalogue id="other" name="OtherMessages" location="messages"/>
-          <catalogue id="forms" name="messages" location="servlet:forms:/resource/internal/i18n"/>
-        </catalogues>
-      </map:transformer>
-    </map:transformers>
-
-    <map:actions>
-      <map:action name="make-form" src="org.apache.cocoon.forms.acting.MakeFormAction" logger="forms"/>
-      <map:action name="init-form" src="org.apache.cocoon.forms.samples.InitForm1Action" logger="forms"/>
-      <map:action name="handle-form-submit" src="org.apache.cocoon.forms.acting.HandleFormSubmitAction" logger="forms"/>
-    </map:actions>
-
-    <map:pipes default="caching">
-      <map:pipe name="caching" src="org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline"/>
-      <map:pipe name="noncaching" src="org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline"/>
-    </map:pipes>
-
-  </map:components>
-
-  <map:views>
-    <map:view name="content" from-label="content">
-      <map:serialize type="xml"/>
-    </map:view>
-
-    <map:view from-label="content" name="pretty-content">
-      <map:transform src="servlet:style-default:/stylesheets/system/xml2html.xslt"/>
-      <map:transform type="servletLinkRewriter"/>
-      <map:serialize type="html"/>
-    </map:view>
-
-    <map:view name="links" from-position="last">
-      <map:serialize type="links"/>
-    </map:view>
-  </map:views>
- 
-  <map:resources>
-    <!-- this will later become a virtual transformer -->
-    <map:resource name="simple-page2html">
-      <map:transform src="servlet:style-default:/common/style/xsl/html/simple-page2html.xsl">
-        <map:parameter name="servletPath" value="{request:servletPath}"/>
-        <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
-        <map:parameter name="file" value="{file}"/>
-        <map:parameter name="remove" value="{../0}"/>
-      </map:transform> 
-    </map:resource>
-  </map:resources>
-
-  <!-- indicates what flowscript to attach to this sitemap -->
-  <map:flow language="javascript">
-    <map:script src="flow/swan.js"/>
-  </map:flow>
-
-  <map:pipelines>
-
-    <map:pipeline type="noncaching">
-
-      <map:match pattern="">
-        <map:generate src="index.xml"/>
-        <map:serialize/>
-      </map:match>
- 
-      <map:match pattern="*.continue">
-        <map:call continuation="{1}"/>
-      </map:match>
-
-      <map:match pattern="*-display-pipeline">
-        <!-- pipeline to show the form -->
-        <map:generate src="forms/{1}_template.xml"/>
-        <map:transform type="forms"/>
-        <map:transform type="i18n">
-          <map:parameter name="locale" value="en-US"/>
-        </map:transform>
-        <map:call resource="simple-page2html">
-          <map:parameter name="file" value="forms/{1}_template.xml"/>
-        </map:call>
-        <map:transform src="resources/swan.xsl"/>
-        <map:transform type="servletLinkRewriter" />
-        <map:serialize/>
-      </map:match>
- 
-      <map:match pattern="*-error-pipeline">
-        <map:generate src="error.xml"/>
-        <map:serialize/>
-      </map:match>
- 
-      <map:match pattern="*-success-pipeline.jx">
-        <map:generate type="jx" src="forms/{1}_success_jx.xml"/>
-        <map:call resource="simple-page2html">
-          <map:parameter name="file" value="forms/{1}_success_jx.xml"/>
-        </map:call>
-        <map:transform type="servletLinkRewriter" />
-        <map:serialize/>
-      </map:match>
- 
-      <map:match pattern="swan/resources/**">
-        <map:read src="resources/{1}"/>
-      </map:match>
- 
-      <!--
-         | Sample building a forms-form-gui editor in forms
-         | Doubles as a showcase for class, new, struct, union widgets
-         -->
- 
-      <!-- TODO: Fix edit-any-file security hole! -->
-      <map:match pattern="binding.flow">
-        <map:call function="handleForm">
-          <map:parameter name="function" value="binding_gui"/>
-          <map:parameter name="form-definition" value="forms/binding_model.xml"/>
-          <map:parameter name="attribute-name" value="form_binding_gui"/>
-          <map:parameter name="bindingURI" value="forms/binding_binding.xml"/>
-          <map:parameter name="documentURI" value="{request-param:file}"/>
-        </map:call>
-      </map:match>
- 
-      <map:match pattern="model.flow">
-        <map:call function="handleForm">
-          <map:parameter name="function" value="model_gui"/>
-          <map:parameter name="form-definition" value="forms/model_model.xml"/>
-          <map:parameter name="attribute-name" value="form_model_gui"/>
-          <map:parameter name="bindingURI" value="forms/model_binding.xml"/>
-          <map:parameter name="documentURI" value="{request-param:file}"/>
-        </map:call>
-      </map:match>
-
-      <map:match pattern="sitemap.flow">
-        <map:call function="handleForm">
-          <map:parameter name="function" value="sitemap_gui"/>
-          <map:parameter name="form-definition" value="forms/sitemap_model.xml"/>
-          <map:parameter name="attribute-name" value="form_sitemap_gui"/>
-          <map:parameter name="bindingURI" value="forms/sitemap_binding.xml"/>
-          <map:parameter name="documentURI" value="{request-param:file}"/>
-        </map:call>
-      </map:match>
- 
-      <map:match pattern="template.flow">
-        <map:call function="handleForm">
-          <map:parameter name="function" value="template_gui"/>
-          <map:parameter name="form-definition" value="forms/template_model.xml"/>
-          <map:parameter name="attribute-name" value="form_template_gui"/>
-          <map:parameter name="bindingURI" value="forms/template_binding.xml"/>
-          <map:parameter name="documentURI" value="{request-param:file}"/>
-        </map:call>
-      </map:match>
-
-      <map:match pattern="xreport.flow">
-        <map:call function="handleForm">
-          <map:parameter name="function" value="xreport_gui"/>
-          <map:parameter name="form-definition" value="forms/xreport_model.xml"/>
-          <map:parameter name="attribute-name" value="form_xreport_gui"/>
-          <map:parameter name="bindingURI" value="forms/xreport_binding.xml"/>
-          <map:parameter name="documentURI" value="{request-param:file}"/>
-        </map:call>
-      </map:match>
-
-      <map:match pattern="*">
-        <map:redirect-to uri="{1}/"/>
-      </map:match>
-
-      <map:match pattern="*/**">
-        <map:mount src="{1}/" uri-prefix="{1}"/>
-      </map:match>
+    <map:components>
 
-    </map:pipeline>
-  </map:pipelines>
+        <!-- =========================== Transformers =================================== -->
+
+        <map:transformers default="xslt">
+            <map:transformer name="i18n" src="org.apache.cocoon.transformation.I18nTransformer">
+                <catalogues default="other">
+                    <catalogue id="other" name="OtherMessages" location="messages" />
+                    <catalogue id="forms" name="messages" location="servlet:forms:/resource/internal/i18n" />
+                </catalogues>
+            </map:transformer>
+        </map:transformers>
+
+        <!-- =========================== Actions =================================== -->
+
+        <map:actions>
+            <map:action name="make-form" src="org.apache.cocoon.forms.acting.MakeFormAction" logger="forms" />
+            <map:action name="init-form" src="org.apache.cocoon.forms.samples.InitForm1Action" logger="forms" />
+            <map:action name="handle-form-submit" src="org.apache.cocoon.forms.acting.HandleFormSubmitAction" logger="forms" />
+        </map:actions>
+
+        <!-- =========================== Pipes =================================== -->
+
+        <map:pipes default="caching">
+            <map:pipe name="caching" src="org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline" />
+            <map:pipe name="noncaching" src="org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline" />
+        </map:pipes>
+
+    </map:components>
+
+    <!-- =========================== Views =================================== -->
+
+    <map:views>
+        <map:view from-label="content" name="content">
+            <map:serialize type="xml" />
+        </map:view>
+
+        <map:view from-label="content" name="pretty-content">
+            <!-- Make use of servlet services -->
+            <map:serialize type="servletService">
+                <map:parameter name="service" value="servlet:style-default:/service/system/xml2html" />
+            </map:serialize>
+        </map:view>
+
+        <map:view from-position="last" name="links">
+            <map:serialize type="links" />
+        </map:view>
+    </map:views>
+
+    <!-- =========================== Flowscripts =================================== -->
+
+    <map:flow language="javascript">
+        <map:script src="flow/swan.js" />
+    </map:flow>
+
+    <!-- =========================== Pipelines =================================== -->
+
+    <map:pipelines>
+        <map:pipeline type="noncaching">
+
+            <map:match pattern="">
+                <map:generate src="index.xml" />
+                <map:serialize />
+            </map:match>
+
+            <map:match pattern="*.continue">
+                <map:call continuation="{1}" />
+            </map:match>
+
+            <map:match pattern="*-display-pipeline">
+                <!-- pipeline to show the form -->
+                <map:generate src="forms/{1}_template.xml" />
+                <map:transform type="forms" />
+                <map:transform type="i18n">
+                    <map:parameter name="locale" value="en-US" />
+                </map:transform>
+                <map:transform src="servlet:style-default:/common/style/xsl/html/simple-page2html.xsl" />
+                <map:transform src="resources/swan.xsl" />
+                <map:transform type="servletLinkRewriter" />
+                <map:serialize />
+            </map:match>
+
+            <map:match pattern="*-error-pipeline">
+                <map:generate src="error.xml" />
+                <map:serialize />
+            </map:match>
+
+            <map:match pattern="*-success-pipeline.jx">
+                <map:generate type="jx" src="forms/{1}_success_jx.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:match pattern="swan/resources/**">
+                <map:read src="resources/{1}" />
+            </map:match>
+
+            <!--
+                | Sample building a forms-form-gui editor in forms
+                | Doubles as a showcase for class, new, struct, union widgets
+            -->
+
+            <!-- TODO: Fix edit-any-file security hole! -->
+            <map:match pattern="binding.flow">
+                <map:call function="handleForm">
+                    <map:parameter name="function" value="binding_gui" />
+                    <map:parameter name="form-definition" value="forms/binding_model.xml" />
+                    <map:parameter name="attribute-name" value="form_binding_gui" />
+                    <map:parameter name="bindingURI" value="forms/binding_binding.xml" />
+                    <map:parameter name="documentURI" value="{request-param:file}" />
+                </map:call>
+            </map:match>
+
+            <map:match pattern="model.flow">
+                <map:call function="handleForm">
+                    <map:parameter name="function" value="model_gui" />
+                    <map:parameter name="form-definition" value="forms/model_model.xml" />
+                    <map:parameter name="attribute-name" value="form_model_gui" />
+                    <map:parameter name="bindingURI" value="forms/model_binding.xml" />
+                    <map:parameter name="documentURI" value="{request-param:file}" />
+                </map:call>
+            </map:match>
+
+            <map:match pattern="sitemap.flow">
+                <map:call function="handleForm">
+                    <map:parameter name="function" value="sitemap_gui" />
+                    <map:parameter name="form-definition" value="forms/sitemap_model.xml" />
+                    <map:parameter name="attribute-name" value="form_sitemap_gui" />
+                    <map:parameter name="bindingURI" value="forms/sitemap_binding.xml" />
+                    <map:parameter name="documentURI" value="{request-param:file}" />
+                </map:call>
+            </map:match>
+
+            <map:match pattern="template.flow">
+                <map:call function="handleForm">
+                    <map:parameter name="function" value="template_gui" />
+                    <map:parameter name="form-definition" value="forms/template_model.xml" />
+                    <map:parameter name="attribute-name" value="form_template_gui" />
+                    <map:parameter name="bindingURI" value="forms/template_binding.xml" />
+                    <map:parameter name="documentURI" value="{request-param:file}" />
+                </map:call>
+            </map:match>
+
+            <map:match pattern="xreport.flow">
+                <map:call function="handleForm">
+                    <map:parameter name="function" value="xreport_gui" />
+                    <map:parameter name="form-definition" value="forms/xreport_model.xml" />
+                    <map:parameter name="attribute-name" value="form_xreport_gui" />
+                    <map:parameter name="bindingURI" value="forms/xreport_binding.xml" />
+                    <map:parameter name="documentURI" value="{request-param:file}" />
+                </map:call>
+            </map:match>
+
+            <map:match pattern="*">
+                <map:redirect-to uri="{1}/" />
+            </map:match>
+
+            <map:match pattern="*/**">
+                <map:mount src="{1}/" uri-prefix="{1}" />
+            </map:match>
+
+        </map:pipeline>
+    </map:pipelines>
 
 </map:sitemap>



Mime
View raw message