xsl-list
[Top] [All Lists]

Re: [xsl] xsl sort on date

2008-09-09 13:27:39
so If I put xsl:sort inside for-each does it get applied to the output
of entire for-each?

On Tue, Sep 9, 2008 at 10:13 AM, Martin Honnen 
<Martin(_dot_)Honnen(_at_)gmx(_dot_)de> wrote:
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/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>