M
metehan
I have below xml document with Kbase element,i doing paging.
paging part is done. Now I need to linking.
I am displaying 5 elements for each page
so How do i write a for loop that displays for the amount of elements
below and writes
1 2 3
i wrote below and no go
<xsl:for-each select="//Kbase">
<xsl:if test="position() > ($Page * $PageSize) + 1">
<xsl:if test="position() < $PageSize + ($PageSize * $Page)">
<a href="JavaScript:changePage(5);">
<xsl:value-of select="position()"/>
</a>
</xsl:if>
</xsl:if>
</xsl:for-each>
<Kbase id="KB709966"/>
<Kbase id="KB709966"/>
<Kbase id="KB709966"/>
<Kbase id="KB709966"/>
<Kbase id="KB709966"/>
<Kbase id="KB709966"/>
<Kbase id="KB709966"/>
<Kbase id="KB709966"/>
<Kbase id="KB709966"/>
<Kbase id="KB709966"/>
<Kbase id="KB709966"/>
paging part is done. Now I need to linking.
I am displaying 5 elements for each page
so How do i write a for loop that displays for the amount of elements
below and writes
1 2 3
i wrote below and no go
<xsl:for-each select="//Kbase">
<xsl:if test="position() > ($Page * $PageSize) + 1">
<xsl:if test="position() < $PageSize + ($PageSize * $Page)">
<a href="JavaScript:changePage(5);">
<xsl:value-of select="position()"/>
</a>
</xsl:if>
</xsl:if>
</xsl:for-each>
<Kbase id="KB709966"/>
<Kbase id="KB709966"/>
<Kbase id="KB709966"/>
<Kbase id="KB709966"/>
<Kbase id="KB709966"/>
<Kbase id="KB709966"/>
<Kbase id="KB709966"/>
<Kbase id="KB709966"/>
<Kbase id="KB709966"/>
<Kbase id="KB709966"/>
<Kbase id="KB709966"/>