[Home] [By Thread] [By Date] [Recent Entries]
Hi Michael,
You've got a grouping problem - which is easier to solve in XSLT 2.0. You can use something like this: <table>
<xsl:for-each-group select="word" group-by="position() mod 4">
<tr>
<xsl:for-each select="current-group()">
<td><xsl:value-of select="."/></td>
</xsl:for-each>
</tr>
</xsl:for-each-group>
</table>John Michael Tracey Zellmann wrote: I have a list of words, possibly 3500 to 7000 in length, in alphabetical order. I need to display them in an HTML page in a table of four columns. The first quarter of the words should be in the first column, the second quarter in the second column, etc. Since the total may not be divisible by four, the final column may be incomplete. Let's say the input is of the form: <wordList> <word>aaron</word> <word>abated</word> <word>abatement</word> .. </wordList> -- John Snelson, Oracle Corporation http://snelson.org.uk/john Berkeley DB XML: http://www.oracle.com/database/berkeley-db/xml XQilla: http://xqilla.sourceforge.net
|

Cart



