RE: [xsl] dynamic sorting

Subject: RE: [xsl] dynamic sorting
From: Danny Guindi <Danny.Guindi@xxxxxxx>
Date: Sun, 4 Nov 2001 16:35:24 -0600
Thanks Max and Joerg for your replies.  I do, however, have a couple more

Max, the URLs you sent me show exactly what I want to do, but it doesn't
allow me to view the source, so I can see how JavaScript is called to
perform the sort.

Joerg, I still don't understand how parameters are passed between XML and
XSL?  Here is my simple test code, but I don't know how to make it sort.


<?xml version="1.0"?>

        <country>great britain</country>
        <city>new york</city>
        <country>united states</country>


<?xml version="1.0"?>
<xsl:stylesheet version="1.0"

<xsl:param name="sort">name</xsl:param>

<xsl:template match="root">
	<table border='1'>
	    <xsl:apply-templates select="row">
    	    <xsl:sort select="*[name() = $sort]"/>

<xsl:template match="row">
    	<td><xsl:value-of select="name"/></td>
    	<td><xsl:value-of select="age"/></td>
    	<td><xsl:value-of select="city"/></td>
    	<td><xsl:value-of select="country"/></td>


Thanks again,


 XSL-List info and archive:

Current Thread