This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: <xsl:sort> using param (I've read the old thread, thisisn't the same thing, I promise :P)
- From: "J.Pietschmann" <j3322ptm at yahoo dot de>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Sat, 08 Jun 2002 21:01:01 +0200
- Subject: Re: [xsl] <xsl:sort> using param (I've read the old thread, thisisn't the same thing, I promise :P)
- References: <03a201c20e78$693b8d10$1d13b5cc@jofu.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Jonathan Furrer wrote:
I'm using a <xsl:param> element globally to dynamically sort based on
elements. This is working well, the problem is along with the sort by
element I alos have other params to identify the data-type and order
attributes of <xsl:sort> the params I'm using for those don't seem to be
getting passed as everything comes ascending, the sort by element is passing
just fine, but the order and data-type aren't...any advice.
...
<xsl:sort select="*[name()=$sortby]" data-type="$sortdatatype"
order="$sortorder"/>
The attributes data-type and order are string values which take AVTs.
You can't supply a XPath expression directly, use
<xsl:sort select="*[name()=$sortby]" data-type="{$sortdatatype}"
order="{$sortorder}"/>
instead.
J.Pietschmann
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list