This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: passing a parameter to select attribute of <xsl:sort>
- To: xsl-list at mulberrytech dot com
- Subject: Re: passing a parameter to select attribute of <xsl:sort>
- From: Nick Browne <NickBrowne at slipstone dot co dot uk>
- Date: Wed, 21 Jun 2000 22:06:29 +0100
- Organization: Slipstone Ltd
- References: <EDEGLAHFDEBGKHHIDLPLOEHOCCAA.rwdaigle@yahoo.com>
- Reply-To: xsl-list at mulberrytech dot com
Ryan, as I understand from the XSLT spec and Mike Kays book (p 119) you cannot do all
that you want to in one go. The select attribute cannot use an attribute value template
though the order attribute can. The reason being that select requires an XPath pattern.
I guess the way round this is with a choose/when/when/.../otherwise construct with each
of the possible sort conditions explicitly stated.
Or is there another way ?
Regards
Nick Browne
Slipstone Ltd
Ryan Daigle wrote:
> I am trying to pass a parameter into a sort element through another
> template as follows:
> ...
> <xsl:apply-templates select="./listItem">
> <xsl:sort order="{$order}" select="$orderingElement"/>
> </xsl:apply-templates>
> </xsl:template>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list