Subject:iterate in a for-each element Author:marla marla Date:07 Jul 2005 08:26 AM Originally Posted: 07 Jul 2005 08:21 AM
Hi, I understand you can't assign variables. I wonder how you can iterate with an index in a for loop, and to make it even more complex i need this index so i can change the name of the input according to the iterator, such that each row will have a name concated with an incremented number
The following of course does NOT work:
<CODE>
<xsl:variable name="iLineNumber" select="1"/>
<xsl:for-each select="table/line">
<tr>
<td>
<xsl:copy-of select="$strLength"/>
<input type="hidden" name=concat("line","$iLineNumber") value="10"/>
<input type="text" name=concat("tbRemark","$iLineNumber") size="50" />
</td>
</tr>
[some sort of: $iLineNumber++]
</xsl:for-each>
</CODE>
Any ideas on how I can achieve some this stuff?
Thanks,
Marla.