[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
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??
<HTML>
<BODY>
<TABLE>
<xsl:param name="recordsPerPage" select="10"/>
<xsl:param name="pageNumber"/>
</TABLE>
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??
<HTML>
<BODY>
<TABLE>
<xsl:param name="recordsPerPage" select="10"/>
<xsl:param name="pageNumber"/>
</TABLE>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
[xsl] paging problem -can't seem to figure it out
Subject: [xsl] paging problem -can't seem to figure it out From: "Rachel Doolan" <racheldoolan@xxxxxxxxxxx> Date: Sun, 18 Mar 2001 23:20:00 |
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
---------------------XSL file <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"> <xsl:template match="/">
<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>
<xsl:if test="$pageNumber > 0"> <xsl:element name="a"> <xsl:attribute name="href">?page=myxmlpage&sort=<xsl:value-of select='$sortField'/>&pagenumber=<xsl:value-of select="number($pageNumber)-1"/></xsl:attribute> << Previous Page </xsl:element>         </xsl:if>
<xsl:if test="($timekeeperCount - ((1+number($pageNumber)) * $recordsPerPage)) > 0"> <xsl:element name="a"> <xsl:attribute name="href">?page=myxmlpage&sort=<xsl:value-of select='$sortField'/>&pagenumber=<xsl:value-of select="number($pageNumber)+1"/></xsl:attribute> Next page >> </xsl:element> </xsl:if> </center>
</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
---------------------XSL file <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"> <xsl:template match="/">
<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>
<xsl:if test="$pageNumber > 0"> <xsl:element name="a"> <xsl:attribute name="href">?page=myxmlpage&sort=<xsl:value-of select='$sortField'/>&pagenumber=<xsl:value-of select="number($pageNumber)-1"/></xsl:attribute> << Previous Page </xsl:element>         </xsl:if>
<xsl:if test="($timekeeperCount - ((1+number($pageNumber)) * $recordsPerPage)) > 0"> <xsl:element name="a"> <xsl:attribute name="href">?page=myxmlpage&sort=<xsl:value-of select='$sortField'/>&pagenumber=<xsl:value-of select="number($pageNumber)+1"/></xsl:attribute> Next page >> </xsl:element> </xsl:if> </center>
</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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] xsl: Changing the order o, David Carlisle | Thread | RE: [xsl] paging problem -can't see, Michael Kay |
RE: [xsl] paging problem -can't see, Michael Kay | Date | [xsl] [ANN] Universal Turing Machin, Robert C. Lyons |
Month |