|
Subject: RE: [xsl] Conditional xsl:sort From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx> Date: Thu, 13 Jun 2002 16:54:03 +0100 |
> I have the following:
>
> ...
> <xsl:for-each select="Transaction">
> <xsl:sort select="*[local-name() = string($sortby)]"
> data-type="{$datatype}" order="{$order}"/>
>
> <xsl:if test="$sortby = 'Description'">
> <xsl:sort select="Code" data-type="number" order="{$order}"/>
> </xsl:if>
> ...
>
> and I'm getting this:
>
> ...
> Keyword xsl:sort may not be used here.
> ...
>
> for the second, conditional, xsl:sort. Why?
Because <xsl:sort> may not be used inside <xsl:if>. You're trying to
make the language up as you go along.
Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Conditional xsl:sort, Jeni Tennison | Thread | AW: AW: [xsl] Problem parsing cp125, "Braumüller, Hans" |
| AW: AW: AW: [xsl] Problem parsing c, "Braumüller, Hans" | Date | Re: AW: AW: AW: [xsl] Problem parsi, David Carlisle |
| Month |