Re: [xsl] xsl sort on date

Subject: Re: [xsl] xsl sort on date
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Tue, 09 Sep 2008 19:13:46 +0200
Mohit Anchlia wrote:
I am looking at some reference to sort on date in the format that's in
my XML. From below XML I need to sort on filing, then state and then
rxTimestamp. Below are the details:

1. xml file;

<body>
<ns2:getMessages xmlns:ns2="http://www.abc.com/wsdl/v";>
         <ret>
            <Msg>
               <cid>103850015_0_1219420995471</cid>
               <fid>41</fid>
               <filing>IS</filing>
               <State>PENDING</State>
               <rxTimestamp>2008-08-25T16:54:55.839-07:00</rxTimestamp>

With XSLT 1.0 you can sort that date/time format as a string only if all those values have the same time zone info (e.g. -07:00). With XSLT 2.0 you can sort as xs:dateTime easily as that is a supported data type in XSLT 2.0.



--


	Martin Honnen
	http://JavaScript.FAQTs.com/

Current Thread