This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: paging to next and previous page (was untitled)
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: [xsl] RE: paging to next and previous page (was untitled)
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Sun, 21 Jan 2001 16:30:26 -0000
- Reply-To: xsl-list at lists dot mulberrytech dot com
> 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