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

Re: XSL/XPath Dynamic sort key

Subject: Re: XSL/XPath Dynamic sort key
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 10 Jul 2003 22:55:48 +0100
xpath sort
} <xsl:sort
}    select="*[name()=$sort_select_lvl_1]\*[name()=$sort_select_lvl_2]" 


\ isn't Xpath: you want /
As it is you should get a syntax error.

>  If I remove the "\" i get a number expected error
yes because * is multiplication.

> xsl:sort select="concat('author','/','last_name')" />
> is not the same as
> <xsl:sort select="author/last_name" />

No, concat produces a string, so it's the same as
<xsl:sort select="'author/last_name'" />
which is a legal expression, but not what you want.

<xsl:sort select="*[name()=$sort_select]|author/*[name()=$sort_select]" 
data-type="{$sort_data_type}" order="{$sort_order}" />

and just set the sort_select param to be 'uid' or 'last_name' or whatever
you want. In each case one branch of the | will return nothing, but
that's OK.

David

 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.