Template for
<xsl:template name="for-loop">
<xsl:param name="i"/>
<xsl:param name="count"/>
<xsl:param name="record"/>
<xsl:variable name="GoRow">
<xsl:value-of select="($i - 1) * $record +1" />
</xsl:variable>
<xsl:if test="$i <= $count">
<a>
<xsl:attribute name="href">javascript: <xsl:value-of select="ddwrt:GenFireServerEvent(concat('dvt_firstrow={',$GoRow,'}'))" />;</xsl:attribute>
<xsl:value-of select="$i" disable-output-escaping = "yes" />
<xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&nbsp;</xsl:text>
</a>
</xsl:if>
<xsl:if test="$i <= $count">
<xsl:call-template name="for-loop">
<xsl:with-param name="i">
<xsl:value-of select="$i + 1"/>
</xsl:with-param>
<xsl:with-param name="count">
<xsl:value-of select="$count"/>
</xsl:with-param>
<xsl:with-param name="record">
<xsl:value-of select="$record" />
</xsl:with-param>
</xsl:call-template>
</xsl:if>
</xsl:template>
call template
<xsl:variable name="TotalPage">
<xsl:value-of select="$dvt_RowCount div $RowLimit" />
</xsl:variable>
<xsl:call-template name="for-loop">
<xsl:with-param name="i">1</xsl:with-param>
<xsl:with-param name="count">
<xsl:value-of select="$TotalPage" />
</xsl:with-param>
<xsl:with-param name="record">
<xsl:value-of select="$RowLimit" />
</xsl:with-param>
</xsl:call-template>