Sort by variable

D

Dan Demidoff

Hi All.

Is it way to sort output tree by variable?

The xsl:

<xsl:variable name="Sales" select="Volume * Price"/>
<xsl:sort select="$Sales"/>

Parser reports: "Variable $Sales is not defined" and it is right

But how to solve the problem if it's possible?

Thanx.
 
M

Martin Honnen

Dan Demidoff wrote:

Is it way to sort output tree by variable?

The xsl:

<xsl:variable name="Sales" select="Volume * Price"/>
<xsl:sort select="$Sales"/>

Parser reports: "Variable $Sales is not defined" and it is right

But how to solve the problem if it's possible?

Why do you need a variable, can't you simply use
<xsl:sort select="Volume * Price" />
?
 
D

Dan Demidoff

Martin Honnen said:
Why do you need a variable, can't you simply use
<xsl:sort select="Volume * Price" />
?

I can't because Volume and Price are average values calculated with
grouping by several fields.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,538
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top