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: Sort Problem


This is a FAQ, and has been addressed very recently on this list, take a
look at the archives.

You can't use attribute value templates in the select attribute of xsl:sort,
or in any other attribute that expects an XPath expression.

For a limited range of requirements, the classic solution is
select="*[name()=$sortBy]"

Mike Kay

> I am trying to pass this parameter
> <xsl:param name="sortBy" select="default"/>
> to the sort command
> <xsl:apply-templates select="Supplier">
>   <xsl:sort data-type="number" select="{$sortBy}"/>
> </xsl:apply-templates>

> 


 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]