|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: cannot assign val to sort key
[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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








