You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Sy...@swisscom.com on 2003/05/07 11:30:32 UTC

XMLForm and sitemap problem

Hello,

I have a problem with XMLForm and the sub-sitemap of the XMLForm application (Cocoon2.1-dev, last snapshot):

You can see below the sub-sitemap for the XMLForm wizard sample, it works fine:

**----sitemap----**
<?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" src="org.apache.cocoon.transformation.XMLFormTransformer" logger="xmlform.sitemap.transformer"/>
    </map:transformers>
    <map:actions>
      <map:action name="WizardAction" src="org.apache.cocoon.samples.xmlform.WizardAction"  logger="xmlform.sitemap.action.wizard"/>
      <map:action name="UsageFeedbackAction" src="org.apache.cocoon.samples.xmlform.UsageFeedbackAction"  logger="xmlform.sitemap.action.UsageFeedback"/>
      <map:action name="AddWorkstationWizardAction" src="org.apache.cocoon.woc.xmlform.workstation.AddWorkstationWizardAction" logger="xmlform.sitemap.action.AddWorkstation"/>
    </map:actions>
    <map:flow-interpreters default="JavaScript"/>
    <map:serializers default="html"/>
    <map:matchers default="wildcard"/>
  </map:components>

  <!-- =========================== Pipelines ================================= -->
    <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/wizard2html.xsl" />
	
	      <!-- 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>  
etc...
**----sitemap----**


=> NOW I add the code below for my own XMLForm application in this sub-sitemap:

**----sitemap----**
      <map:match pattern="addworkstation.html">
	<map:act type="AddWorkstationWizardAction">

	  
	  <map:parameter name="xmlform-validator-schema-ns" value="http://www.ascc.net/xml/schematron"/>
	  <map:parameter name="xmlform-validator-schema" value="workstation/addWorkstation/schematron/addworkstation-sch-report.xml"/>
	  <map:parameter name="xmlform-id" value="add-workstation"/>
	  <map:parameter name="xmlform-scope" value="session"/>
	  <map:parameter name="xmlform-model" value="org.apache.cocoon.woc.xmlform.workstation.AddWorkstationBean"/>

	  
	  <map:generate src="workstation/addWorkstation/{page}.xml"/>
	  <map:transform type="xmlform" label="xml"/>
	  <map:transform type ="xalan" src="stylesheets/wizard2html.xsl"/>
	  <map:transform src="context://stylesheets/system/xmlform2html.xslt" />
	  <map:serialize type="html" label="debug"/>
	</map:act>
      </map:match>  
**----sitemap----**

=> the result is that the wizard sample doesn't work anymore!! It returns a blank page. All class and file paths are correct.

I don't understand why!!

Any suggestions will be greatly appreciated

Thanks
Sylvain

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: XMLForm and sitemap problem

Posted by e nio <en...@yahoo.com>.
        It was not clear to me if you have added a subdirectory
workstation/ under your xmlform/  ?  Comparing your wizard
sample set-up to mine, it is the same and you're saying after
you added your own application the sample does not work anymore?
just trying to get clarifications.

enio

--- Sylvain.Thevoz@swisscom.com wrote:
> Hello,
> 
> I have a problem with XMLForm and the sub-sitemap of the
> XMLForm application (Cocoon2.1-dev, last snapshot):
> 
> You can see below the sub-sitemap for the XMLForm wizard
> sample, it works fine:
> 
> **----sitemap----**
> <?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"
> src="org.apache.cocoon.transformation.XMLFormTransformer"
> logger="xmlform.sitemap.transformer"/>
>     </map:transformers>
>     <map:actions>
>       <map:action name="WizardAction"
> src="org.apache.cocoon.samples.xmlform.WizardAction" 
> logger="xmlform.sitemap.action.wizard"/>
>       <map:action name="UsageFeedbackAction"
> src="org.apache.cocoon.samples.xmlform.UsageFeedbackAction" 
> logger="xmlform.sitemap.action.UsageFeedback"/>
>       <map:action name="AddWorkstationWizardAction"
>
src="org.apache.cocoon.woc.xmlform.workstation.AddWorkstationWizardAction"
> logger="xmlform.sitemap.action.AddWorkstation"/>
>     </map:actions>
>     <map:flow-interpreters default="JavaScript"/>
>     <map:serializers default="html"/>
>     <map:matchers default="wildcard"/>
>   </map:components>
> 
>   <!-- =========================== Pipelines
> ================================= -->
>     <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/wizard2html.xsl" />
> 	
> 	      <!-- 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>  
> etc...
> **----sitemap----**
> 
> 
> => NOW I add the code below for my own XMLForm application in
> this sub-sitemap:
> 
> **----sitemap----**
>       <map:match pattern="addworkstation.html">
> 	<map:act type="AddWorkstationWizardAction">
> 
> 	  
> 	  <map:parameter name="xmlform-validator-schema-ns"
> value="http://www.ascc.net/xml/schematron"/>
> 	  <map:parameter name="xmlform-validator-schema"
>
value="workstation/addWorkstation/schematron/addworkstation-sch-report.xml"/>
> 	  <map:parameter name="xmlform-id" value="add-workstation"/>
> 	  <map:parameter name="xmlform-scope" value="session"/>
> 	  <map:parameter name="xmlform-model"
>
value="org.apache.cocoon.woc.xmlform.workstation.AddWorkstationBean"/>
> 
> 	  
> 	  <map:generate src="workstation/addWorkstation/{page}.xml"/>
> 	  <map:transform type="xmlform" label="xml"/>
> 	  <map:transform type ="xalan"
> src="stylesheets/wizard2html.xsl"/>
> 	  <map:transform
> src="context://stylesheets/system/xmlform2html.xslt" />
> 	  <map:serialize type="html" label="debug"/>
> 	</map:act>
>       </map:match>  
> **----sitemap----**
> 
> => the result is that the wizard sample doesn't work anymore!!
> It returns a blank page. All class and file paths are correct.
> 
> I don't understand why!!
> 
> Any suggestions will be greatly appreciated
> 
> Thanks
> Sylvain
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail:
> cocoon-users-help@xml.apache.org
> 


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org