[xsl] RE: paging to next and previous page (was untitled)

Subject: [xsl] RE: paging to next and previous page (was untitled)
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Sun, 21 Jan 2001 16:30:26 -0000
>  How to automate updating the value of a param for the
> selected outputs
>
> The problem is like this; say, there are 20 lines in the xml
> and  5 lines can be isplayed
> for the given page number. The page number ,pageno, is
> defined using <xsl:param name="pageno" select="1"/>.
> The output is done by calling a named template with the
> pageno named param.

Judging from your attempt so far, it looks as if you are looking for a
client-side solution. You'll find an example of a similar application on
page 608 to 610 of my XSLT Programmers Reference. My solution there is to
have a JavaScript function called refresh() on the HTML page that invokes
the transformation, and to generate the hyperlink in the form of a call to
this JavaScript function, e.g.

<a href="javascript:refresh(23)">next page</a>

The refresh function invokes a new transformation supplying the value 23 as
a parameter.

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread
  • [no subject]
    • SFYang - Sun, 21 Jan 2001 16:41:51 +0800
      • Michael Kay - Sun, 21 Jan 2001 16:30:26 -0000 <=