Timothy Larson wrote:

An unwrapped row is when the field elements of the row are not wrapped by a common row element. This can make it difficult to create the xpaths to output the field values and <on-insert/> output to the correct location in the xml file, especially if the rows are not unique. Note the implied addition of an <on-insert/> binding configuration element to the value binding. I think most (all) bindings will need this to work with the new "union" binding and strict xml file mapping.

This can be solved by implementing a virtual row element which is not output itself, but instead is set as the context element to collect the field values and <on-insert/> output and then append its contents to the containing context element.

Another alternative is to pre and post process the bound xml document on load and save to temporarily add and remove row wrapping elements. This would allow complex identification of row contents using STX or XSL, but might increase processing time as the xml is handled an additional time in each direction. In some cases, the pre-processor would have to decode widget values to determine how to match following rows. This could get complicated.

Which solution (or both or another alternative) sounds better?



Do you mean that the contents of a repeater are bound to several different collections (or parent elements) in the application data?


I encountered this need, and simply wrote several bindings for the repeater, one for each collection, holding the bindings of the relevant children of the repeater.

Don't understand if it solves your problem, though.

Sylvain

--
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com




Reply via email to