RE: [xsl] limit number of row return by xslt

Subject: RE: [xsl] limit number of row return by xslt
From: "Vasu Chakkera" <vasucv@xxxxxxxxxxx>
Date: Sun, 22 Aug 2004 13:32:28 +0000
This is a kind of generalised way you can solve this.
You must some how have in the XML of the page, the pageid of the current page.
like page-id = 1
or page-id = 2..


now.
Decide how many results go into each page.. based on your favourite algorithm..or may be a standard value.
so you have tha max results per page. and you have the start index which is 1.



now run a for-each select = "results[position() >=$start-index and position() &lt;=$max-per-page]">


this will limit your search results...

now continue doing this for the nextpage and so on.. where the start-index and max-per page keep changing based on the page id.

Hope this helps
Vasu


From: Tham Tinh <khautinh@xxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: XSL List <XSL-List@xxxxxxxxxxxxxxxxxxxxxx>
Subject: [xsl] limit number of row return by xslt
Date: Fri, 20 Aug 2004 15:15:01 -0700 (PDT)

Hi all,
Thanks for all previous helps and answers.  Now I
would like to ask how to limit number of row return
with xslt.
Ex:
My return data will be 100 rows, I'd like to return
just 20 rows per page and have an option for user to
click to view next 20 rows.  Please help me again!
Thanks

=====
"It is essential to know that to be a happy person, a happy family, a happy society, it is very crucial to have a good heart, that is very crucial,"
Dalai Lama





__________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail


_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger


Current Thread