[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: limit number of row return by xslt

Subject: RE: limit number of row return by xslt
From: "Vasu Chakkera" <vasucv@xxxxxxxxxxx>
Date: Sun, 22 Aug 2004 13:32:28 +0000
xpath limit
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:  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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.