This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Dynamic sort order..
- To: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Dynamic sort order..
- From: Kay Michael <Michael dot Kay at icl dot com>
- Date: Sat, 23 Dec 2000 00:24:13 -0000
- Reply-To: xsl-list at lists dot mulberrytech dot com
> <xsl:for-each ...>
> <xsl:if test="$level != '0'"/><xsl:sort order="descending"
> .../></xsl:if>
> <xsl:if test="$level = '0'"/><xsl:sort order="ascending"
> .../></xsl:if>
> ...
> </xsl:for-each>
>
> The above approach is invalid..is there some way to do this?
Try something like:
<xsl:sort order="{substring("ascending descending", boolean($level)*10+1,
10)}"/>
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list