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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top