Altova Mailing List Archives


Re: [xsl] sorting date prob

From: Jarkko.Moilanen@------
To:
Date: 4/10/2002 11:07:00 PM
Yes. It is correct to be in the format yymmdd, because that is the ISO 
standard. And yes, everyone does not care about standards, but I have to.
So I will chance the format in the database, since it is possible 
for us at the moment. 

> 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))"/>

Yes, thank U. If it was not possible for us to chance the format in DB, this 
would be a marvelous solution. 

> 
> 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
> 
> 



*******************************************************************
Jarkko Moilanen         *You are wise, witty, and wonderful,      *
Research/ ITCM          *but you spend too much time              *
jarkko.moilanen@xxxxxx  *reading this sort of trash.              *
www.uta.fi/~jm60697     *                                         *
GSM: +358 50 3766 927   *                                         *
*******************************************************************

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.