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

RE: Fwd: Parameterised Sorts

Subject: RE: Fwd: Parameterised Sorts
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Wed, 10 Dec 2003 12:30:12 -0000
RE:  Fwd: Parameterised Sorts
If you have an element <e att="3"> then the name of the attribute node
(as returned by the local-name() function) is "att", not "@att".

Michael Kay

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> chris@xxxxxxxxxxx
> Sent: 10 December 2003 11:20
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Fwd: Parameterised Sorts
> 
> 
> Hi folks,
> 
> I'm fairly new to xsl but I have looked everywhere to the 
> answer to my problem 
> with no joy.  Perhaps someone can help?
> 
> I have a table that I need to allow the sort order to be 
> changeable on so I 
> have implemented a parameter based sort like so:
> 
> <xsl:apply-templates select="teams/group">
>    <xsl:sort select="*[local-name()=string($sortRequested)]" 
> order="{$sortOrderRequested}"/>
> </xsl:apply-templates>
> 
> If $sortRequested = 'name' and name is a node below group it 
> works OK. If $sortRequested = '@name' and name is an 
> attribute of group it dosn't work.
> 
> What am I doing wrong?
> Thanks for any help.
> Chris
> 
> 
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


 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.