Re: [Chiba-users] nested repeats error
Creators discontinued Chiba & founded betterFORM http://betterform.de
Brought to you by:
chibaxforms,
windauer
From: Lars W. <lar...@dr...> - 2008-02-07 16:30:15
|
Dear Paul, > Below is a simple nested repeat that says "do a <tr> for each moo and a <td> for each foo". Should work, eh? But I get the following error in eXist log: > > 2008-02-03 17:35:07,645 [P1-9] ERROR (XFormsFilter.java [renderXForm]:526) - org.chiba.xml.xforms.exception.XFormsException: net.sf.saxon.trans.DynamicError: A sequence of more than one item is not allowed as the first argument of string() (@id, @id) > > Something in the xsl? > Half half.. first of all there is an error in your form. <xforms:input ref="foo"/> must be changed to <xforms:input ref="."/>. The bad news is that stylesheet has indeed an error and renders one input to much. I added a new ticket for this (https://www.chibaxforms.org/cgi-bin/trac.cgi/ticket/429). If you need a table within a repeat you usually use appearance="compact" on the repeat. Possibly this works for you: <?xml version="1.0" encoding="UTF-8"?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xforms="http://www.w3.org/2002/xforms"> <head> <title>Nested Returns Test</title> <xforms:model> <xforms:instance id="test-doc"> <boo xmlns=""> <moo> <foo>goo1</foo> <foo>goo2</foo> </moo> <moo> <foo>goo3</foo> <foo>goo4</foo> </moo> </boo> </xforms:instance> </xforms:model> </head> <body> <xforms:repeat appearance="compact" nodeset="moo"> <xforms:repeat appearance="minimal" nodeset="foo"> <xforms:input ref="."/> </xforms:repeat> </xforms:repeat> </body> </html> hth Lars |