Sort by variable

Discussion in 'XML' started by Dan Demidoff, Jan 26, 2004.

  1. Dan Demidoff

    Dan Demidoff Guest

    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
     
    Dan Demidoff, Jan 26, 2004
    #1
    1. Advertising

  2. 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" />
    ?

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Jan 26, 2004
    #2
    1. Advertising

  3. Dan Demidoff

    Dan Demidoff Guest

    Martin Honnen <> wrote in message news:<40152df6$>...

    > 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.

    --
    dannis
     
    Dan Demidoff, Jan 27, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. nobody
    Replies:
    0
    Views:
    538
    nobody
    Jun 1, 2004
  2. JerryJ
    Replies:
    11
    Views:
    1,406
    Dave Moore
    Apr 28, 2004
  3. Replies:
    2
    Views:
    9,277
    Martin Honnen
    Sep 5, 2006
  4. S?ren Gammelmark
    Replies:
    1
    Views:
    1,892
    Eric Sosman
    Jan 7, 2005
  5. Navin
    Replies:
    1
    Views:
    699
    Ken Schaefer
    Sep 9, 2003
Loading...

Share This Page