> Just use appropriate selector:
> http://xml.apache.org/cocoon/userdocs/selectors/selectors.html
>
I already tried but haven't found a nice way of using them for this purpose.
I can make something like the pipeline below, but i have dozens of similar
cases and it doesn't seem like a good approach. Maybe I haven't understood
selectors well...


--------------------------------------
  <!-- XMLForms pipeline -->
  <map:pipeline>
   <map:match pattern="*">
    <map:select type="parameter">
     <map:parameter name="parameter-selector-test" value="{1}"/>
     <!-- Case #1 -->
     <map:when test="EquipmentType">
      <map:act type="EquipmentTypeAction">
       <!-- 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="{1}/schematron/{1}-validator.xml"/>
       <map:parameter name="xmlform-id" value="form-insert"/>
       <map:parameter name="xmlform-scope" value="session"/>
       <map:parameter name="xmlform-model"
value="net.josema.xmtrader.forms.xmldb.recordings.equipment.{1}Bean"/>
       <!-- original XMLForm document -->
       <map:generate src="{../1}/{page}.xml"/>
       <!-- populating the document with model instance data -->
       <map:transform type="xmlform" label="debug, xml"/>
       <!-- personalizing the look and feel of the form controls  -->
       <map:transform src="styles/wizard2html.xsl"/>
       <!-- Transforming the XMLForm controls to HTML controls -->
       <map:transform src="styles/xmlform2html.xsl"/>
       <!-- sending the HTML back to the browser -->
       <map:serialize type="html"/>
      </map:act>
     </map:when>
     <!-- Case #2, very very similar to the first one, it should be a better
way to choose between both -->
     <map:when test="RecordingType">
      <map:act type="RecordingTypeAction">
       <!-- 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="{1}/schematron/{1}-validator.xml"/>
       <map:parameter name="xmlform-id" value="form-insert"/>
       <map:parameter name="xmlform-scope" value="session"/>
       <map:parameter name="xmlform-model"
value="net.josema.xmtrader.forms.xmldb.recordings.equipment.{1}Bean"/>
       <!-- original XMLForm document -->
       <map:generate src="{../1}/{page}.xml"/>
       <!-- populating the document with model instance data -->
       <map:transform type="xmlform" label="debug, xml"/>
       <!-- personalizing the look and feel of the form controls  -->
       <map:transform src="styles/wizard2html.xsl"/>
       <!-- Transforming the XMLForm controls to HTML controls -->
       <map:transform src="styles/xmlform2html.xsl"/>
       <!-- sending the HTML back to the browser -->
       <map:serialize type="html"/>
      </map:act>
     </map:when>
    </map:select>
   </map:match>
  </map:pipeline>



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to