Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Variable problems

Status
Not open for further replies.
You can use the position() attribute of a for-each loop to start another row after an appropriate number of <td>s, as such:


<table>
<tr>

<xsl:for-each select=&quot;//Root/Category&quot;>

<td><xsl:value-of select=&quot;Data&quot;/></td>

<xsl:if test=&quot;position() mod 2=0&quot;>
<tr/>
</xsl:if>

</xsl:for-each>

</tr>
</table>


This would draw a table 2 cells wide.

Hope this helps!
Nick (Software Developer)


nick@retrographics.fsnet.co.uk
nick.price@myenable.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top