Grr - of course the name should be "rowdisplay"
<xsl:template name="rowdisplay">
<xsl:param name="pos" />
<xsl:param name="width" />
<xsl:choose>
<xsl:when test="(position()+$width) < last()">
<xsl:for-each select="IMAGES/IMAGE[position() >= $pos and
position() <($pos+$width)">
<td>...put your image...</td>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="left"><xsl:value-of select="$width- (last()
-
(position()))" /></xsl:variable>
<xsl:for-each select="IMAGES/IMAGE[position() >= $pos and
position() <($pos+$width)">
<td>...put your image...</td>
</xsl:for-each>
<td colspan="$left"></td>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
Sorry about that - maybe I'm a little too tired already... ;-)
Juggy
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list