How do I get 2 values from "xforms:select1" control

Hi All,
            I got a bit stuck on this and I was wondering if anyone has seen
any 
examples or knows how to get around it.
 
Say I've got a form with the output XML format instance data , that I'm 
planning on submitting, and some additional data to be displayed as 
output which is effectively just lookup data.
 
In this case I have:
 
<xforms:model>
      <xforms:instance id ="123" src="abc.xml"/>
            <xforms:instance id="abc">
                  <rootElement xmlns="">
                   <Element1s>      
                        <elements attr1="" attr2="" >
                              <element1 id=""/>
                              < element2 id=""/>
                              < element3 id=""/>
                              < element4 id=""></ element4>
                        </elements> 
                   </Element1s>
                  </rootElement>    
            </xforms:instance>
</xforms:model>
 
I use the instance with id=123 as my input xml which will be used to fill
the data's of various controls of Xforms of a page. Now The instance with
id=abc is my output xml's format which I will be submitting it. 
My Problem is mentioned below:
Now for "element4" I need to have the value of attribute "id" as well as the
value of the element by name element4.
The control I use is:
<xforms:select1 ref="element4/@id" appearance="minimal">
      <xforms:label>Example:  </xforms:label>
      <xforms:item>
        <xforms:label></xforms:label>
        <xforms:value>0</xforms:value>
      </xforms:item>
      <xforms:itemset nodeset="instance('123')//ElementNames">  //input xml
is used to display this control's data
         <xforms:label ref="./name" />
         <xforms:value ref="\@id" />      //this id is stored for the
element4 - attribute id. But I need also the name 
                                          //value
      </xforms:itemset>
</xforms:select1> 
 
Now how do I take the name value of whatever I had selected and need to save
that name value as the value for my output xml's element by name element4
value??????? This issue has become a work stopper for me. So Please anyone
can suggest me "How do I set the element4 value.
 
Regards,
Anjali
 

Received on Thursday, 19 May 2005 12:09:12 UTC