Subject: RE: [xsl] paging problem -can't seem to figure it out From: "Michael Kay" <mhkay@xxxxxxxxxxxx> Date: Sun, 18 Mar 2001 23:36:11 -0000 |
> <xsl:template match="/"> > <HTML> > <BODY> > <TABLE> > <xsl:param name="recordsPerPage" select="10"/> > > <xsl:param name="pageNumber"/> There's something wrong here: the root template is called automatically by the system, so it never has any parameters. These should almost certainly be global parameters, outside the <xsl:template>. > > <xsl:if test="position() >= $recordsPerPage * > number($pageNumber) and > position() <= number($recordsPerPage * number($pageNumber) + > $recordsPerPage)"> There's something wrong here, too. The position() function returns the position of the context node in the list of nodes being processed, so in the case of the root template it will always return 1. I haven't tried to understand your logic to work out what you're expecting it to be, but there's clearly an error here. Mike Kay Software AG XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] paging problem -can't seem to, Rachel Doolan | Thread | [xsl] [ANN] Universal Turing Machin, Robert C. Lyons |
RE: [xsl] implement for loop with X, Michael Kay | Date | [xsl] paging problem -can't seem to, Rachel Doolan |
Month |