BizTalk Utilities CV ,   Jobs ,   Code library
 
Home Page


Add/Edit your code items
Search the code library
Browse for the code library


XSLT
Repeated search and replace in XSLT
Combinations of k out of n numbers
Permutations of the values of N nodes
DVC Algorithms in XSLT
Another way of avoiding XSLT processor crash
Re: DVC Algorithms in XSLT
trig functions in xslt
XSLT string Replace function
A Slide-In Menu made with XML/XSLT
What is SVG?
Family Tree maker
Alternative Ordering - ""Women and Children to the lifeboats first""
Restructuring flat delimited XML
Hex and Binary Conversions in XSLT - with Boolean math functions
Using XSLT to produce SVG (1)
Using XSLT to produce SVG (2)
Performance Tuning XSLT - Part 1
Performance Tuning XSLT - Part 2
Performance Tuning XSLT - Part 3
Performance Tuning XSLT - Part 4


 
 

<< XQuery.NET and XML >>


By Steven Kienle
First Posted 10/30/2001
Times viewed 173

Displaying XML data in Pages


Summary It is normal to display a long list of items in pages of 20, for example, items at a time. This snippet describes how to go about segmenting the XML data for Page X and only that data.

The easiest way to page is to have a style sheet parameter with which your external code sends the desired page number into the style sheet. Then you work with the position() and ceiling XPath functions to segment the data based on that page number.

The XSTL provided here does the pagination of the XML provided.  The page-num parameter defaults to page 1; and the page-size variable can be changed to modify how many rows are included on each page.

Obviously this doesn't put out great HTML, but it gives you the idea. Also, it is required that the thispage.htm really be a server side script which calls the XSLT processor of your choice to translate the input XML with setting the parameter with the passed in page query value. Since setting parameters is engine dependent, I'll leave that to your engine's documentation.

Additional information

Further additional information


Rate this article on a scale of 1 to 10 (0 votes, average 0)

Your vote :  

<< XQuery.NET and XML >>





Leave a comment for this article
Your name
Your email (optional)
Your comment
Optional: Upload an attachment
Enter the code shown:

 
 

    Email TopXML