Using multiple instances in a single bind expression.

Hi there,

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 actually instance data on, 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="list">
   <full_code xmlns="">
    <category>00</category>
    ...
   </full_code>
  </xforms:instance>
  <xforms:instance src="codes.xml" id="codes" />
  ...
  <!--The bit that I'm having problems with :(-->
  <xforms:bind 
nodeset="instance('codes')/codes/group[@code=//category]/@name" 		 
calculate="instance('codes')/codes/group[@code=//category]/@name" 			 
id="section"/>
			
</xforms:model>

Expect the bind to be wrong, it certainly didn't work. The problem is 
that "//category" comes from the "list" model and the data shown is from 
the "codes" model. Of course I could add the data from the "codes" 
instance but I'd prefer not to do that as it is a bit untidy, especially 
during submit where I would want to remove all that data again.

Thanks for any suggestions,

Gary

Received on Wednesday, 18 May 2005 22:18:08 UTC