> 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
|