Re: [xsl] Recursive teplate (sort)

Subject: Re: [xsl] Recursive teplate (sort)
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Mon, 9 Oct 2006 10:38:14 +0100
On 10/9/06, Giancarlo Rossi <giancarlo_rossi@xxxxxxxxxx> wrote:

I have just this situation :



<xsl:template match="/"> <xsl:for-each select="/root" > <xsl:for-each select="my_node" > <xsl:for-each select="my_node_parallel" >

Why not use?


select="/root/my_node/my_node_parallel">

<!--I Create Variable and calculate value for totale_finale-->
<--!I need to order using totale_finale value -->

<xsl:value-of select="format-number($totale_finale,'#.##')" />

You will to use the same expression in the sort as in the variable, eg:


<xsl:for-each select="/root/my_node/my_node_parallel">
 <xsl:sort select="... same as the select for $totale_finale...."/>
 <xsl:variable name="total_finale" select="..........."/>

It would be nice if xsl:variable was allowed before xsl:sort, but its not.

cheers
andrew

Current Thread