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() <=$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(_at_)yahoo(_dot_)com>
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: XSL List <XSL-List(_at_)lists(_dot_)mulberrytech(_dot_)com>
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
--+------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--
_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today!
http://www.msn.co.uk/messenger