itp:row element
<itp:row
id=
columns=
( xforms:repeat-nodeset=
( xforms:repeat-number= )?
( maximum-number= )?
)?
>
( <itp:layout-hint/> )?
( <itp:cell>
( <itp:question/> )?
</itp:cell> )+
</itp:row>
Description
The <itp:row> element defines a row of cells in the table grid. Each row has its own definition. Rowsets are defined as a single row.
Note that the KCM Master Template language currently does not allow cells to span multiple rows and/or columns.
Questions within a recordset are stored in a repeated element of the response XML. The XForms implementation of uses qualified ref= attributes to the XPath of these questions.
Attributes
| Element | Description |
|---|---|
| id | Label that uniquely identifies this row within the table. |
| columns | Declaration of the number of columns in the table.
The value of this attribute currently must match the value of the columns= attribute of the <itp:table> element. |
| xforms:repeat-nodeset | Element used to embed repeated elements in the XForms instance data. |
| xforms:repeat-number | Minimum number of rows that is shown in an interactive client. |
| maximum-number | Maximum number of rows. Clients should not exceed this limit. (Note that XForms 1.0 does not implement such a limitation.) |
Content
| Element | Description |
|---|---|
| <itp:layout-hint> | This optional element specifies a layout hint for the row. It is only generated if the row has an LAYOUT element. |
| <itp:cell> | Contents of the table cell. Cells can either be empty or contain a single question.
The number of <itp:cell> elements must match the number declared with the columns= attribute. |
Example
<xforms:instance>
<response xmlns="">
<question5 />
<question6 />
<question7 />
<recordset1>
<question9>first record</question9>
<question10 />
<question11 />
</recordset1>
<recordset1>
<question9>second record</question9>
<question10 />
<question11 />
</recordset1>
<ITP-interact-step>1</ITP-interact-step>
<ITP-interact-count>6</ITP-interact-count>
<ITP-interact-ID>
0bfed7a006ca685abfd59f549fb02491
</ITP-interact-ID>
</response>
</xforms:instance>
<itp:table id="table1" rows="3" columns="4">
<itp:table-label>Sample</itp:table-label>
<itp:row id="row1" columns="4"/>
<itp:row id="row2" columns="4">
<itp:cell>
<itp:question>
<itp:text>Variables</itp:text>
</itp:question>
</itp:cell>
<itp:cell>
<itp:question>
<xforms:input ref="question5">
<xforms:label>TEXT</xforms:label>
</xforms:input>
</itp:question>
</itp:cell>
<itp:cell>
<itp:question>
<xforms:input ref="question6">
<xforms:label>NUMBER</xforms:label>
</xforms:input>
</itp:question>
</itp:cell>
<itp:cell>
<itp:question>
<xforms:select ref="question7" appearance="full">
<xforms:label>BOOL</xforms:label>
<xforms:item>
<xforms:value>TRUE</xforms:value>
</xforms:item>
</xforms:select>
</itp:question>
</itp:cell>
</itp:row>
<itp:row id="row3" columns="4" xforms:repeat nodeset="recordset1" xforms:repeat number="1" maximum-number="4">
<itp:cell>
<itp:question>
<itp:text>Record set example:</itp:text>
</itp:question>
</itp:cell>
<itp:cell>
<itp:question>
<xforms:input ref="/recordset1/question9">
<xforms:label>TEXT</xforms:label>
</xforms:input>
</itp:question>
</itp:cell>
<itp:cell>
<itp:question>
<xforms:input ref="/recordset1/question10">
<xforms:label>NUMBER</xforms:label>
</xforms:input>
</itp:question>
</itp:cell>
<itp:cell>
<itp:question>
<xforms:select ref="/recordset1/question11" appearance="full">
<xforms:label>BOOL</xforms:label>
<xforms:item>
<xforms:value>TRUE</xforms:value>
</xforms:item>
</xforms:select>
</itp:question>
</itp:cell>
</itp:row>
</itp:table>