jpasswaters
01-15-2009, 09:13 AM
I need to implement paging to display only one item per 'page'. Here is the code that I have:
<xsl:for-each select="Html/root/ProjectStatus">
<tr>
<td width="75" valign="top" align="left">
<xsl:choose>
<xsl:when test="string-length(date/node()) = 10">
<xsl:variable name="date" select="date/node()" />
<xsl:variable name="year" select="substring-before($date,'-')" />
<xsl:variable name="month-temp" select="substring-after($date,'-')" />
<xsl:variable name="month" select="substring-before($month-temp,'-')" />
<xsl:variable name="day" select="substring-after($month-temp,'-')" />
<xsl:value-of select="concat($month,'/', $day,'/', $year)" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="date/node()" />
</xsl:otherwise>
</xsl:choose></td>
<td valign="top" align="left"><xsl:copy-of select="status/node()" /></td>
</tr>
</xsl:for-each>
I have searched the net and see articles on paging, but they really haven't been very helpful. I would either like to implement paging or just not display the other results unless a link is clicked, kind of like a display more feature. Either or would be fine.
Any help is greatly appreciated.
<xsl:for-each select="Html/root/ProjectStatus">
<tr>
<td width="75" valign="top" align="left">
<xsl:choose>
<xsl:when test="string-length(date/node()) = 10">
<xsl:variable name="date" select="date/node()" />
<xsl:variable name="year" select="substring-before($date,'-')" />
<xsl:variable name="month-temp" select="substring-after($date,'-')" />
<xsl:variable name="month" select="substring-before($month-temp,'-')" />
<xsl:variable name="day" select="substring-after($month-temp,'-')" />
<xsl:value-of select="concat($month,'/', $day,'/', $year)" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="date/node()" />
</xsl:otherwise>
</xsl:choose></td>
<td valign="top" align="left"><xsl:copy-of select="status/node()" /></td>
</tr>
</xsl:for-each>
I have searched the net and see articles on paging, but they really haven't been very helpful. I would either like to implement paging or just not display the other results unless a link is clicked, kind of like a display more feature. Either or would be fine.
Any help is greatly appreciated.