This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: using parameters in filters?
- To: "Mattias Konradsson" <preacher at fragzone dot se>
- Subject: Re: [xsl] using parameters in filters?
- From: Jeni Tennison <mail at jenitennison dot com>
- Date: Sun, 25 Feb 2001 08:22:33 +0000
- CC: xsl-list at lists dot mulberrytech dot com
- Organization: Jeni Tennison Consulting Ltd
- References: <NABBLNLEFKJBBIBELMLOIENPMKAA.Chris@Bayes.co.uk><00c301c09e62$3329e0a0$01010a0a@BORG1>
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi Mattias,
> ...and of course you couldn't set the order attribute of the sort
> element to a param either, go figure
Actually, you can - you just have to use an attribute value template.
So if you do:
<xsl:sort select="*[local-name() = $sortby]"
order="{$sortDirection}" />
then that should give you what you want. All the attributes on
xsl:sort, aside from 'select', take attribute value templates so that
you can set using parameters/variables.
But yes, until we have an evaluate() function of some sort then it's
fairly difficult to dynamically select *what* the sort sorts on.
I hope that helps,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list