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

RE: param value in xsl:sort

Subject: RE: param value in xsl:sort
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Mon, 25 Sep 2000 13:48:58 -0400 (EST)
xslt param value
> I'm trying to use the value of a parameter as the select value of an
> xsl:sort element.

You can't (this is a FAQ). <xsl:sort select="$param"/> means "sort by the
value of the parameter", which, since the parameter has the same value for
every member of the node-set, is the same as saying don't sort at all. There
is no way in standard XSLT of saying "sort by the value of the XPath
expression represented by the string value of $param". You can do this in
Saxon by writing <xsl:sort select="saxon:evaluate($param)"/>. If $param is
always an element name, and if you are careful about namespaces, you can do
it in standard XSLT by writing <xsl:sort select="*[name()=$param]"/>

Mike Kay 
> 




 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.