[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: cannot assign val to sort key

Subject: Re: cannot assign val to sort key
From: "Thomas B. Passin" <tpassin@xxxxxxxxxxxx>
Date: Fri, 8 Feb 2002 14:52:42 -0500
passin info to asp page
[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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.