Hi,
I am trying to generate a table in which I want to put data, radio buttons) into different columns. These rows should be put in different columns every seven rows. The error msg i get is this:
The 'xsl:text' start tag on line '687' doesn't match the end tag of 'td' in file...
Which is concerned with this line: </td><td>
Code:
<xsl:template name="radiobuttongroup">
<xsl:for-each select="radiobuttongroup">
<xsl:variable name="parent_id"><xsl:value-of select="@id"/></xsl:variable>
<xsl:call-template name="label"/>
<table border="1">
<tr>
<td>
<xsl:for-each select="radio">
<xsl:if test = "index mod 7 = 0 ">
</td><td>
</xsl:if>
<xsl:call-template name="foo"/>
</xsl:for-each>
</td>
</tr>
</table>
<xsl:if test="required"><span class="required_field">*</span></xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template name="foo">
<xsl:variable name="parent_id"><xsl:value-of select="@id"/></xsl:variable>
<div style="padding-left:3em;">
<!--
<xsl:if test = "index mod 7 = 0 ">
<xsl:call-template name="radiobuttongroup"/>
</xsl:if> -->
<input value="1" type="radio">
<xsl:attribute name="name">ctrl_<xsl:value-of select="../@id"/></xsl:attribute>
<xsl:attribute name="id">ctrl_<xsl:value-of select="@id"/></xsl:attribute>
<xsl:attribute name="value"><xsl:value-of select="hidden-text"/></xsl:attribute>
<xsl:if test = "//values/value[@ctrlid = $parent_id] = label/text">
<xsl:attribute name="checked">checked</xsl:attribute>
</xsl:if>
<xsl:if test="$disable_input">
<xsl:attribute name="disabled">disabled</xsl:attribute>
</xsl:if>
<xsl:call-template name="label"/>
</input>
</div>
</xsl:template>
Can I achieve the same thing using a different technique?? Any ideas?
Thanx in advance!