[xsl] How can I sort values that have been calculated dynamically?

Subject: [xsl] How can I sort values that have been calculated dynamically?
From: Bryan Tulloch <b.tulloch@xxxxxxxxxxxxx>
Date: Fri, 13 Jul 2001 11:18:11 +0100

This is connected to my earlier thread (Sorting a Nodeset contained within a
Variable), but as I haven't got that working I will try a more general
approach. Here goes:

My XML is a series of User elements structured as follows:


There may be a number of such entries with the same User_Name and a number
of those may have the same Case_Code and Case_Title. 

The desired output:
I am outputting a table with a series of columns, each of which has a
heading which, when clicked, will sort the table data according to the
heading clicked. 

Where I am at present:
Some of the columns contain data contained in the source XML (eg there are a
User_Name column and a Case_Code column); when these are clicked they are
sorting the data as required.

The problem:
Some of the columns contain data that is not directly in the source XML but
is computed from it (eg there is a column containing the total number of
unique Case_Code elements for each unique User_Name).  I have a template
matching each unique User_Name, and within this the data is being output
into the table using this code:

	<xsl:variable name="ThisUser" select="." />
de)])" />

 however, I have not been able to code the column heading so that it sorts
by this column when clicked.

Any suggestions as to how to go about this?


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread