• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

XSL to display XML output in multiple pages

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
reply
    Bookmark Topic Watch Topic
  • New Topic