[xsl] Generating table cells and rows

Subject: [xsl] Generating table cells and rows
From: Aaron Johnson <artpunx@xxxxxxxxx>
Date: Mon, 1 Aug 2005 11:08:33 +0100
Hello...

I have a stylesheet that outputs a series of photographs from an xml list.

<xsl:template name="displayPhotos">
		<xsl:param name="currentNodes"/>
		<xsl:for-each select="$currentNodes">
		<img src="{$photo_server}/?studentId={id}"/><br /> Name:
<xsl:value-of select="name"/>
		<xsl:if test="position() mod 5 =0"><br/></xsl:if>
		</xsl:for-each>
</xsl:template>

The template adds a line break for eack 5 images.

I would like to know if there is a way to do this with a table? Is it
possible to output 5 table cells and add another <tr> tag if required
for a second row of images?

Any ideas would be most appreciated.

Aaron

Current Thread