Re: [xsl] attribute based sorting

Subject: Re: [xsl] attribute based sorting
From: Anil Kumar Veeramalli <anil.v@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 29 Oct 2009 14:08:05 +0530
Thanks a lot  Michael. Its working as expected..
I have another question, its an extension to that.

<COLUMN NAME="Join_date">28-Oct-1987</COLUMN>

date format will be in DD-MMM-DDDD, what is the good approach to sort this kind of dates.

Thanks, Anil

Michael Kay wrote:
<xsl:sort select="COLUMN[@NAME='SALARY']" data-type="number"/>


Michael Kay

-----Original Message-----
From: Anil Kumar Veeramalli [mailto:anil.v@xxxxxxxxxxxxxxxxxxxxx] Sent: 29 October 2009 06:33
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] attribute based sorting


I wanted to sort based on salary. please suggest me on this.can you give me some sample code.
my sample xml file look like this
with multiple employees.

I want to sort based on Salary attribute. instead of <column name="salary">95000</column> this , <salary>1000</salary> with this I am able to sort it out like this <xsl:sort select="salary" *data-type="number"*/>

Please please help out on this.


Current Thread