This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: unable to dynamically set sort order



Use <xsl:choose> to conditionally select the sort order:

<xsl:choose>
	<xsl:when test="$sortOrder = 'ascending'>
	  <xsl:sort select="$sortColumn" order="ascending" />
	</xsl:when> etc.......

should work

gavin corfield

> Hello All:
>           I am trying to dynamically set sort order and sort column in my
> XSLT. It seems that I can not use an expression for "order".
> 
> <xsl:apply-templates select="Uow">
>    <xsl:sort select="$sortColumn" order="$sortOrder"/>
>    <xsl:with-param name="from" select="$startRow"/>
>    <xsl:with-param name="to" select="$endRow"/>
> </xsl:apply-templates>
> 
> ** $sortColumn and $sortOrder are variables here
> 
> Is there any other way I can solve this issue? The reason I need to do this
> is to keep track of users preference between requests when they are
> sorting..
> 
> Any ideas or help is really appreciated..
> 
> Thanks
> --bharat
> 
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]