[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] paging problem -can't seem to figure it out
Hey guys
Thanks for the help so far!! I was hoping that somebody could help me out as I am really stuck with my paging problem. I have looked back at responses on the list and taken into account previous suggestions but I am still no clearer. I am using the code below to transform the xml document. Nothing is happening. Any suggestions would be really appreciated. Previous suggestions said that I had to use the true XSLT namespace. Have I included the right one?? Thanks in advance Cheers Rach
<HTML> <BODY> <TABLE> <xsl:param name="recordsPerPage" select="10"/> <xsl:param name="pageNumber"/> <xsl:if test="position() >= $recordsPerPage * number($pageNumber) and position() <= number($recordsPerPage * number($pageNumber) + $recordsPerPage)"> <xsl:element name="tr"> <xsl:if test="position() mod 2 = 0"> <xsl:attribute name="bgcolor">#ffffcc</xsl:attribute> </xsl:if> <xsl:element name="td"> <xsl:value-of select="position()"/> </xsl:element> <xsl:element name="td"> <xsl:value-of select="ALL/CATEGORY/title"/> </xsl:element> <xsl:element name="td"> <xsl:value-of select="ALL/CATEGORY/desc"/> </xsl:element> <xsl:element name="td"> <xsl:value-of select="ALL/CATEGORY/href"/> </xsl:element> </xsl:element> </xsl:if>
</TABLE> </BODY> </HTML> </xsl:template> </xsl:stylesheet>Hey guys Thanks for the help so far!! I was hoping that somebody could help me out as I am really stuck with my paging problem. I have looked back at previous stuff on the list and taken into account previous suggestions but I am still no clearer. I am using the code below to transform the xml document. Nothing is happening. Any suggestions would be really appreciated. Previous suggestions said that I had to use the true XSLT namespace. Have I included the right one?? Thanks in advance Cheers Rach
<HTML> <BODY> <TABLE> <xsl:param name="recordsPerPage" select="10"/> <xsl:param name="pageNumber"/> <xsl:if test="position() >= $recordsPerPage * number($pageNumber) and position() <= number($recordsPerPage * number($pageNumber) + $recordsPerPage)"> <xsl:element name="tr"> <xsl:if test="position() mod 2 = 0"> <xsl:attribute name="bgcolor">#ffffcc</xsl:attribute> </xsl:if> <xsl:element name="td"> <xsl:value-of select="position()"/> </xsl:element> <xsl:element name="td"> <xsl:value-of select="ALL/CATEGORY/title"/> </xsl:element> <xsl:element name="td"> <xsl:value-of select="ALL/CATEGORY/desc"/> </xsl:element> <xsl:element name="td"> <xsl:value-of select="ALL/CATEGORY/href"/> </xsl:element> </xsl:element> </xsl:if>
</TABLE> </BODY> </HTML> </xsl:template> </xsl:stylesheet> _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|