Sort by variable

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dan Demidoff

    #1

    Sort by variable

    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.

    --
    dannis
  • Martin Honnen

    #2
    Re: Sort by variable



    Dan Demidoff wrote:

    [color=blue]
    > 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?[/color]

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

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/

    Comment

    • Dan Demidoff

      #3
      Re: Sort by variable

      Martin Honnen <mahotrash@yaho o.de> wrote in message news:<40152df6$ 1@olaf.komtel.n et>...
      [color=blue]
      > Why do you need a variable, can't you simply use
      > <xsl:sort select="Volume * Price" />
      > ?[/color]

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

      --
      dannis

      Comment

      Working...