How to set dynamically the value of attribute case on element toggle within an itemset

Is there a mechanism to dynamically set the attribute case on the toggle element within an itemset.

This is some sample code:

<!-- list to populate a select1 -->
<f:instance id="dimensionlist">
    <dimensions>
       <dimension class="afmeting">
         <name>hoogte</name>
       </dimension>
       <dimension class="afmeting">
         <name>lengte</name>
       </dimension>
       <dimension class="gewicht">
         <name>gewicht</name>
       </dimension>
    </dimensions>
</f:instance>

<!-- list to be subsetted based on a selection in previous one -->
<f:instance id="unitlist">
   <units>
     <unit dimension="afmeting">
        <name>millimeter</name>
        <value>mm</value>
     </unit>
     <unit dimension="afmeting">
        <name>centimeter</name>
        <value>cm</value>
     </unit>
     <unit dimension="afmeting">
        <name>meter</name>
        <value>m</value>
     </unit>
     <unit dimension="gewicht">
        <name>gram</name>
        <value>g</value>
     </unit>
     <unit dimension="gewicht">
        <name>kilogram</name>
        <value>kg</value>
    </unit>
 </units>
</f:instance>

 <f:select1 ref="dimension" appearance="single">
   <f:itemset nodeset="instance('dimensionlist')/dimension">
      <f:label ref="name"/>
      <f:value ref="name"/>
<!-- -------------------------------------------------------------------------- -->
<f:toggle ev:event="xforms-select" case="HOW_TO_SET_DYNAMICALLY"/>

If selected dimension has @class='afmeting', case="afstand"
If selected dimension has @class='gewicht', case="gewicht"

<!-- -------------------------------------------------------------------------- -->
   </f:itemset>
<f:select1>

 <f:switch>
   <f:case id="afstand">
   <f:select1 ref="unit" appearance="single">
     <f:itemset nodeset="instance('unitlist')/unit[@dimension='afmeting']">
       <f:label ref="name"/>
       <f:value ref="value"/>
    </f:itemset>
   </f:select1>
   </f:case>
   <f:case id="gewicht">  
   <f:select1 ref="unit" appearance="single">
     <f:itemset nodeset="instance('unitlist')/unit[@dimension='gewicht']">
       <f:label ref="name"/>
       <f:value ref="value"/>
    </f:itemset>
   </f:select1>
</f:case>
</f:switch>

Received on Thursday, 26 October 2006 16:50:19 UTC