View Full Version : XSL for each split data in groups

08 Feb 2012, 09:31 PM
say I have an xml file like this:

<desc>Picture 1</desc>
<desc>Picture 2</desc>
<desc>Picture 3</desc>

And so on with several pictures upwards of 50 or so.

and I want to use an xsl stylesheet to pull the data into a table. The output should be something like this:


I know how to

<xsl:for-each select="data/img">
<td><xsl:value-of select="name"/></td>

but how do I get it to split the data into the table row every 3 or so images?