Login  Register

Generating table cells based on a "columns" attribute

Posted by Ethan Gruber on Oct 26, 2009; 6:40pm
URL: https://discuss.orbeon.com/Generating-table-cells-based-on-a-columns-attribute-tp277051.html

Hi,

I have the following instance for an XML table:

<xforms:instance id="table-template">
                <table xmlns="">
                    <tgroup cols="">
                        <thead></thead>
                        <tbody></tbody>
                    </tgroup>
                </table>
            </xforms:instance>

<thead> and <tbody> can have a <row> attribute.  <row> can have <entry> for each table cell in the row.  Is it possible to lock the number of <entry> elements within <row> based on the number defined in tgroup/@cols?

For example, I would like to create an "Add Row" trigger that inserts a <row> into <tbody>.  If I define @cols as 4, I'd like "Add Row" to insert <row><entry/><entry/><entry/><entry/></row>, with an input for each <entry/>

Or maybe there is a better way of creating a table?

Thanks,
Ethan


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws