Click here to Skip to main content
Click here to Skip to main content

XML paging using XML + XSL + CSS

, 27 Jan 2004
Rate this:
Please Sign up or sign in to vote.
Send params to an XSL file


Hello again, I decided to take a break from graphics and do some XML. I created an XML Pager, what it does is read an XML file and apply an XSL translation and send params to it to create a paged document.

Important, you need to have ASP.NET 1.1 running on your server! ASP.NET 1.0 had a bug in the XSL module. If you have 1.0 and try to run this, Windows will report a call to a nonexistent function.

How it's done

All you have to do is create a new XmlDocument object and an XslTransform object. Load them with data and call the Transform method. Below is a sample:

Dim xmlDoc As New XmlDocument
Dim xslDoc As New XslTransform 


xslDoc.Transform(xmlDoc, nothing, Response.OutputStream, Nothing)

Sending Params to the XSL

Everything is exactly the same as the above example except that you create another object called XsltArgumentList.

Dim xmlDoc As New XmlDocument
Dim xslDoc As New XslTransform 
Dim xslArgs as new XsltArgumentList


xsltParams.AddParam("start", "", 1)
xsltParams.AddParam("end", "", 5)
xslDoc.Transform(xmlDoc, xsltParams, Response.OutputStream, Nothing)

The XSL File

<xsl:stylesheet version="1.0" xmlns:xsl="<A href=""></A>">

You specify the params at the top of the file and then just use them like regular vars.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Matthew Hazlett
Web Developer
United States United States
I started programming for fun when I was about 10 on an Franklin Ace 1000.
I still do it just for fun but it has gotten me a few jobs over the years. More then I can say for my Microsoft Certifications. Smile | :)
The way I learned was by example, now its time to give back to the next generation of coders.

Comments and Discussions

Questionhi Pinmemberpriya_chauhan0912-Oct-11 20:03 
GeneralExcellent man Pinmemberi_islamian10-Nov-09 23:16 2 Pinmemberimperialx15-Jun-07 3:30 
GeneralSorry, the link is fixed... Pinmemberhazlema29-Jan-04 10:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150327.1 | Last Updated 28 Jan 2004
Article Copyright 2004 by Matthew Hazlett
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid