[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Setting Sort From Variable

Subject: Setting Sort From Variable
From: "Allistair Crossley" <Allistair.Crossley@xxxxxxx>
Date: Wed, 2 Jul 2003 15:17:12 +0100
xsl sort variable
Hi Again,

I have a looping for-each and need to sort the list. There are 2 values that I would like to sort by and both show the same HTML output so it would be good if I could just set the 

<xsl:sort select={$orderBy}" order="ascending" />

where orderBy variable is set to "@forename" or "@surname".

This does not work. I have also tried within the for-each

<xsl:choose>
  <xsl:when test="$filterOrderBy = 'forename'">
    <xsl:sort select="@forename" order="ascending" />
  </xsl:when>
  <xsl:otherwise>
    <xsl:sort select="@surname" order="ascending" />
  </xsl:otherwise>									
</xsl:choose>

But sort must be a child of for-each I think.

Any ideas?


<FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE> 
-------------------------------------------------------
QAS Ltd.
Developers of QuickAddress Software
<a href="http://www.qas.com">www.qas.com</a>
Registered in England: No 2582055
Registered in Australia: No 082 851 474
-------------------------------------------------------
</FONT>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.