|
Subject: RE: [xsl] XSL month sorting (chronologically) From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx> Date: Thu, 11 Apr 2002 14:08:30 +0100 |
Given the alphabetic month as substring(.,X,Y), you can get a numeric value
for sorting as
string-length(substring-before("JanFebMarApr...", substring(.,X,Y))
Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx
> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of murli bk
> Sent: 11 April 2002 12:21
> To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] XSL month sorting (chronologically)
>
>
> Hi,
> I have an xml file which looks like
>
> <eventlog>
> <event>
> <date>10 Mar 2002</date>
> <data>test2</data>
> </event>
> <event>
> <date>08 Apr 2002</date>
> <data>test3</data>
> </event>
> <event>
> <date>18 Jan 2002</date>
> <data>test1</data>
> </event>
> </eventlog>
>
> I want to sort on the date in chronological order(with the
> month field in
> letters).
> How do i write a xsl script to sort these events and get an
> output like
>
>
> 18 Jan 2002, test1
> 10 Mar 2002, test2
> 08 Apr 2002, test3
>
>
> Thanks,Murali.
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at
http://explorer.msn.com/intl.asp.
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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] XSL month sorting (chrono, Jeni Tennison | Thread | Re: [xsl] XSL month sorting (chrono, murli bk |
| [xsl] XSLT, Chapter 17 of Processig, Elliotte Rusty Harol | Date | Re: [xsl] combine xml files, Ming |
| Month |