You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Ben Pope <be...@REMOVE_MEhotmail.com> on 2004/12/31 16:28:14 UTC

Cforms Repeater Binding Cross-Referenced Data

Hi,

I'll get straight to the point:

I'm having some difficulty in working out how to bind the following data in
both directions:

<project>
   <people>
      <person id="0">
         <name>Me</name>
      </person>
      <person id="1">
         <name>You</name>
      </person>
      <person id="2">
         <name>He</name>
      </person>
   </people>
   <rooms>
      <room id="0">
         <name>Lounge</name>
         <person idref="0"/>
         <person idref="1"/>
      </room>
      <room id="1">
         <name>Kitchen</name>
         <person idref="2"/>
      </room>
   </rooms>
</project>

Hopefully that describes the situation where "Me" and "You" are in the
"Lounge" and "He" is in the "Kitchen".

Now, assume I would like to be able to modify the names of all people in the
"Lounge", and would therefore like to have a repeater that is in some sense
repeating over  /project/rooms/room[@id=0]/person  but modifying a subset of
the data in the  /project/people/person  branch.

Is this possible with just the repeater?

What would be the best way of doing this?

I am willing to extend/modify/create a repeater that can do this (as I think
this is a useful thing), but have not contributed to cocoon so far and would
probably need prodding in the right direction.

Thanks for your time,
Ben.