| <?xml version="1.0"?> |
| <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"> |
| |
| <!-- =========================== Components ================================ --> |
| <map:components> |
| <map:transformers default="xslt"> |
| <map:transformer name="xmlform" logger="xmlform.sitemap.transformer" |
| src="org.apache.cocoon.transformation.XMLFormTransformer"/> |
| </map:transformers> |
| |
| <map:actions> |
| <map:action name="WizardAction" logger="xmlform.sitemap.action.wizard" |
| src="org.apache.cocoon.samples.xmlform.WizardAction"/> |
| <map:action name="UsageFeedbackAction" logger="xmlform.sitemap.action.UsageFeedback" |
| src="org.apache.cocoon.samples.xmlform.UsageFeedbackAction"/> |
| <map:action name="CalculatorAction" logger="xmlform.sitemap.action.Calculator" |
| src="org.apache.cocoon.samples.xmlform.CalculatorAction"/> |
| </map:actions> |
| |
| <map:serializers default="html"/> |
| |
| <map:matchers default="wildcard"/> |
| </map:components> |
| |
| <!-- =========================== Views =================================== --> |
| |
| <!-- |
| The debug view can be used to output an intermediate |
| snapshot of the pipeline. |
| Pass cocoon-view=debug as a URL parameter to see |
| the pipeline output produced by the transofrmer |
| labeled "debug". You can move the label to different |
| transformers to understand each processing |
| stage better. |
| --> |
| <map:views> |
| <map:view name="debug" from-label="debug"> |
| <map:serialize type="xml"/> |
| </map:view> |
| <map:view name="xml" from-label="xml"> |
| <map:serialize type="xml"/> |
| </map:view> |
| </map:views> |
| |
| <!-- =========================== Resources ================================= --> |
| |
| <map:resources> |
| </map:resources> |
| |
| <!-- =========================== Pipelines ================================= --> |
| <!-- |
| <map:flow language="JavaScript"> |
| <map:script src="flow/feedbackWizard.js"/> |
| </map:flow> |
| --> |
| <map:pipelines> |
| |
| <map:pipeline> |
| |
| <map:match pattern=""> |
| <map:redirect-to uri="welcome"/> |
| </map:match> |
| |
| <map:match pattern="welcome"> |
| <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:pipeline> |
| |
| |
| <map:pipeline> |
| |
| <!-- A non-trivial interactive example - Cocoon Usage Feedback Wizard --> |
| <map:match pattern="wizard*"> |
| <map:act type="WizardAction"> |
| |
| <!-- XMLForm parameters for the AbstractXMLFormAction --> |
| <map:parameter name="xmlform-validator-schema-ns" value="http://www.ascc.net/xml/schematron"/> |
| <map:parameter name="xmlform-validator-schema" value="schematron/wizard-xmlform-sch-report.xml"/> |
| <map:parameter name="xmlform-id" value="form-feedback"/> |
| <map:parameter name="xmlform-scope" value="session"/> |
| <map:parameter name="xmlform-model" value="org.apache.cocoon.samples.xmlform.UserBean"/> |
| |
| |
| <!-- original XMLForm document --> |
| <map:generate src="wizard/{page}.xml"/> |
| |
| <!-- populating the document with model instance data --> |
| <map:transform type="xmlform" label="xml"/> |
| |
| <!-- personalizing the look and feel of the form controls --> |
| <map:transform type="xalan" src="stylesheets/wizard2page.xsl"/> |
| <map:transform src="context://samples/common/style/xsl/html/complex-page2html.xsl"> |
| <map:parameter name="contextPath" value="{request:contextPath}"/> |
| </map:transform> |
| |
| <!-- Transforming the XMLForm controls to HTML controls --> |
| <map:transform src="context://stylesheets/system/xmlform2html.xslt"/> |
| |
| <!-- sending the HTML back to the browser --> |
| <map:serialize type="html" label="debug"/> |
| |
| </map:act> |
| </map:match> |
| </map:pipeline> |
| |
| |
| <map:pipeline> |
| |
| <!-- The same application, exposed as a Web Service (REST style) --> |
| |
| <!-- WSDL descriptor --> |
| <map:match pattern="UsageFeedbackService/WSDL"> |
| <map:generate src="webservice/usagefeedback.wsdl"/> |
| <map:serialize type="xml"/> |
| </map:match> |
| |
| |
| <!-- The REST resource (or Web Service) --> |
| <map:match pattern="UsageFeedbackService"> |
| <map:act type="UsageFeedbackAction"> |
| |
| <!-- Parameters for the AbstractXMLFormAction --> |
| <map:parameter name="xmlform-validator-schema-ns" value="http://www.ascc.net/xml/schematron"/> |
| <map:parameter name="xmlform-validator-schema" value="schematron/wizard-xmlform-sch-report.xml"/> |
| <map:parameter name="xmlform-id" value="form-feedback"/> |
| <map:parameter name="xmlform-scope" value="request"/> |
| <map:parameter name="xmlform-model" value="org.apache.cocoon.samples.xmlform.UserBean"/> |
| |
| <!-- Response content and transformation logic --> |
| <map:generate src="webservice/{page}.xml"/> |
| <map:transform type="xmlform" label="debug, xml"/> |
| <map:serialize type="xml"/> |
| </map:act> |
| </map:match> |
| </map:pipeline> |
| |
| <!-- |
| <map:pipeline> |
| - The same application, using the Cocoon Flow Layer |
| <map:match pattern="flow"> |
| <map:call function="xmlForm"> |
| <map:parameter name="xmlform-function" value="feedbackWizard"/> |
| <map:parameter name="xmlform-id" value="form-feedback"/> |
| <map:parameter name="xmlform-validator-schema-ns" value="http://www.ascc.net/xml/schematron"/> |
| <map:parameter name="xmlform-validator-schema" value="schematron/wizard-xmlform-sch-report.xml"/> |
| <map:parameter name="xmlform-scope" value="session"/> |
| </map:call> |
| </map:match> |
| |
| <map:match pattern="flow/*.xml"> |
| - original XMLForm document |
| <map:generate src="flow/{1}.xml"/> |
| |
| - populating the document with model instance data |
| <map:transform type="xmlform" label="xml"/> |
| |
| - personalizing the look and feel of the form controls |
| <map:transform type="xalan" src="stylesheets/wizard2page.xsl"/> |
| <map:transform src="context://samples/common/style/xsl/html/complex-page2html.xsl"> |
| <map:parameter name="contextPath" value="{request:contextPath}"/> |
| </map:transform> |
| |
| - Transforming the XMLForm controls to HTML controls |
| <map:transform src="context://stylesheets/system/xmlform2html.xslt"/> |
| |
| - sending the HTML back to the browser |
| <map:serialize type="html" label="debug"/> |
| </map:match> |
| </map:pipeline> |
| --> |
| |
| |
| <map:pipeline> |
| |
| <map:match pattern="calc"> |
| <map:redirect-to uri="calc/NumberA"/> |
| </map:match> |
| |
| <!-- A example for the AbstractControllerAction, which imitates Struts like behaviour --> |
| <map:match pattern="calc/*"> |
| <map:act type="CalculatorAction" src="calc/controller.xconf"> |
| |
| <!-- original XMLForm document --> |
| <map:generate src="calc/{../1}.xml"/> |
| |
| <!-- populating the document with model instance data --> |
| <map:transform type="xmlform" label="xml"/> |
| |
| <!-- personalizing the look and feel of the form controls --> |
| <map:transform src="context://samples/common/style/xsl/html/complex-page2html.xsl"> |
| <map:parameter name="contextPath" value="{request:contextPath}"/> |
| </map:transform> |
| |
| <!-- Transforming the XMLForm controls to HTML controls --> |
| <map:transform src="context://stylesheets/system/xmlform2html.xslt" /> |
| |
| <!-- sending the HTML back to the browser --> |
| <map:serialize type="html" label="debug"/> |
| |
| </map:act> |
| </map:match> |
| </map:pipeline> |
| |
| </map:pipelines> |
| |
| </map:sitemap> |
| <!-- end of file --> |
| |
| |
| |
| |
| |
| |
| |
| |