Subject: Re: sorting date prob
From: "Joerg Heinicke" <joerg.heinicke@xxxxxx>
Date: Thu, 11 Apr 2002 08:49:29 +0200
|
Hello Jarkko,
you must bring the date to the format yyyymmdd. The best to do this is in
the XML, because the date-formatting is a style-question, so it should be
done in the stylesheet. If this is not possible, you can do it temporarily
in the stylesheet too:
<xsl:sort select="concat(substring(Time,7,2), substring(Time,4,2),
substring(1,2))"/>
Regards,
Joerg
> Hi!
>
> First things first. Thanks a lot Jeni for your advices about
> selecting attribute for link value.
>
> Then another question:
> I should sort the xml file ascending by the given date.
> The xml syntax is like this:
>
> <Information>
> <Time>06/04/02</Time> #format is dd/mm/yy
> <Size>299</Size>
> <Sender>Moilanen Jarkko</Sender>
> <Subject id="00223322334342">Xalan</Subject>
> </Information>
>
> <Information>
> <Time>05/11/02</Time>
> <Size>45</Size>
> <Sender>Moilanen Jarkko</Sender>
> <Subject id="00223322342334342">Atribuutit linkkeina</Subject>
> </Information>
>
> If I try to sort them by xsl:
> <xsl:sort order="ascending" select="Time" />
>
> the result is not the correct one.Is there some solution to this,
> or should the xml file be different concerning the syntax?
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
- RE: '>' or '<' in element xml ?, (continued)
- stevenson - Wed, 10 Apr 2002 03:00:28 -0400 (EDT)
- Jarkko . Moilanen - Wed, 10 Apr 2002 05:14:17 -0400 (EDT)
- Jeni Tennison - Wed, 10 Apr 2002 05:28:06 -0400 (EDT)
- Message not available
- Message not available
- Jarkko . Moilanen - Thu, 11 Apr 2002 02:22:59 -0400 (EDT)
- Joerg Heinicke - Thu, 11 Apr 2002 02:44:39 -0400 (EDT) <=
- Jarkko . Moilanen - Thu, 11 Apr 2002 03:07:15 -0400 (EDT)
- Michael Kay - Thu, 11 Apr 2002 04:34:16 -0400 (EDT)
- Jarkko . Moilanen - Thu, 11 Apr 2002 04:16:17 -0400 (EDT)
- Joerg Heinicke - Thu, 11 Apr 2002 06:20:42 -0400 (EDT)
|
|