This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XSL to display XML output in multiple pages

 
satya pandre
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have 100 records in my XML.
I want to display 10 records in each page when I transform XML to HTML.
Is there anyway to do that in XSL ?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your display name, "satya", is in breach of our naming policy so I'll have to ask you to change it. We require both the first and the last name, although initials may be used in place of the first name.
Thanks.
Ah. I just noticed that Jason asked for the same in another thread. Sorry for the double-spam...
[ October 30, 2003: Message edited by: Lasse Koskela ]
 
Tony Yan
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd recommend the following.
(1) you can run position() function in a for-each node testing, and if the value falls in 1-10, that will be 1st page, 11-20, 2nd page, and so on.
(2) you can also insert some numbering attribute to the records from say 1 to 100. Then output only those fall in the right range for a given page.
(3) the best is to run xslt thru a subset of the XML records, probably at the DB end. This way, the performance is good. Imagine if you later have 10,000 records, grabbing 10 records out of them would be a very costly step.
(4) other inputs from ranchers?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic