[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] cannot assign val to sort key
Subject: Re: [xsl] cannot assign val to sort key From: "Thomas B. Passin" <tpassin@xxxxxxxxxxxx> Date: Fri, 8 Feb 2002 14:52:42 -0500 |
[alex] > From an asp page I pass values for sort key and sort > order into variables in my xsl: > > <xsl:variable name="sortKey" /> > <xsl:variable name="sortOrder" /> > > I know this part works b/c I've printed out their > values. But I can't seem to assign assign the values > of these variables to my <xsl:sort>. Here's what I'm > doing: > > <xsl:sort select="$sortKey" order="{$sortOrder}" /> > > $sortKey is the variable name, but it doesn't get > picked up... what am I diong wrong? > You don't show what values you are assigning to these variables. In the case of sortOrder, if you were writing it by hand you would have to write <xsl:variable name="sortOrder" select='"descending"'/> Notice that "descending" is in double quotes to make it a string instead of a nodeset. This will work for specifying the sort order (I tested it). I have no idea what values you are trying to assign for sortKey nor what the context is for the sorting loop, so I can't say what's wrong there. I suggest that you get this working in a hand-written stylesheet first, then try to duplicate those results. Cheers, Tom P XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] cannot assign val to sort key, alex | Thread | Re: [xsl] cannot assign val to sort, Joerg Pietschmann |
[xsl] cannot assign val to sort key, alex | Date | Re: [xsl] (consistency in select re, Jeni Tennison |
Month |