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

Re: attribute based sorting

Subject: Re: attribute based sorting
From: Anil Kumar Veeramalli <anil.v@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 29 Oct 2009 13:43:10 +0530
Re:  attribute based sorting
Let me explain my problem

My XML format will look like this.
<employee> <COLUMN NAME="SALARY">95000</COLUMN> <COLUMN NAME="NAME">ANIL</COLUMN> </employee>
<employee> <COLUMN NAME="SALARY">92000</COLUMN> <COLUMN NAME="NAME">Kumar</COLUMN></employee> .....


I wanted to sort this based on SALARY.

Approaches I tried
1) <xsl:for-each select="employee"> <xsl:sort select="COLUMN/SALARY" data-type="number"/>
<xsl:for-each select="COLUMN"> <xsl:if test="@NAME='SALARY'"> <xsl:variable select="."></xsl:variable> </xsl:if>
</xsl:for-each>
with this I am not able to sort


with the above code, sort is not happening.


Thanks, Anil


Michael M|ller-Hillebrand wrote:
Am 29.10.2009 um 09:00 schrieb Anil Kumar Veeramalli:

thanks Michael,

I tried that option too,......its not working.

Anil, apparently you gave us not enough information. "not working" is not useful. What is your input, how does your XSL look like so far (all stripped down to the absolute minimum), what is the expected output, what output do you get.


As mentioned previously, preparing such a test case for many users (myself included) solves the problem.

Best regards,

- Michael


-- _______________________________________________________________ Michael M|ller-Hillebrand: Dokumentations-Technologie Adobe Certified Expert, FrameMaker Lvsungen und Training, FrameScript, XML/XSL, Unicode Blog: http://cap-studio.de/ - Tel. +49 (9131) 28747

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-2011 All Rights Reserved.