<xsl:template name="persons-table">
<xsl:param name="start" />
<xsl:param name="count" />
<xsl:param name="max" />
<tr>
<xsl:for-each select="person[position() >= $start and position() <= $start+$count]">
<td><xsl:value-of select="." /></td>
</xsl:for-each>
</tr>
<xsl:if test="$start+$count < $max">
<xsl:call-template name="persons-table">
<xsl:with-param name="start" select="$start+$count" />
<xsl:with-param name="count" select="$count" />
<xsl:with-param name="max" select="$max" />
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:call-template name="persons-table">
<xsl:with-param name="start" select="0" />
<xsl:with-param name="count" select="5" />
<xsl:with-param name="max" select="count(person)" />
</xsl:call-template>