I am experimenting with XForms in Mozilla Firefox.
I have a how-to question.  Is this the correct forum for such questions?  If not, please advise me on where I should direct my question.
I have one structure
<foos>
  <foo pos="1"/>
  <foo pos="4"/>
  <foo pos="4"/>
</foos>
That I would like to bind into another structure
<bars>
  <bar count="0"/>
  <bar count="0"/>
  <bar count="0"/>
  <bar count="0"/>
</bars>
I would like to set a binding on bars/bar/@count to contain the count of all foo's pointing to a bar.
I am able to accomplish this by explicitly setting a binding on each instance of bar.
bars/bar[1]/@count --> count(foos/foo/@pos=1)
bars/bar[2]/@count --> count(foos/foo/@pos=2)
bars/bar[3]/@count --> count(foos/foo/@pos=3)
bars/bar[4]/@count --> count(foos/foo/@pos=4)
But, I would like to set the formula generically for bars/bar/@count.
What is the correct way to accomplish this?
I am using O'Reilly's XForms Essentials as a reference.  Can you recommend a better reference for me?
Thanks,
Terry Brady


Yahoo! DSL Something to write home about. Just $16.99/mo. or less