XML/XSL - Sort/Param

Hitman
Soldato
Joined
25 Feb 2004
Posts
2,837
Hi,

I've got an XML file with a bunch of data. I'm using XSL to style it and output it - all this works fine. What I'm trying to do now is let the user order the table how they see fit.

I believe we can use the following so that you can use something like file.xml?sortBy=value&orderBy=value:

Code:
<xsl:param sortBy="[..]">
<xsl:param orderBy="[..]">

Then output the value in the sort order:

Code:
<xsl:sort select="[ value of sortBy=value ]" order="[ value of orderBy=value ]" data-type="text" />

Can this be done? From what I've been reading it is, but I can't find a working example for the life of me.
 
Back
Top Bottom