Subject: Re: [xsl] sorting numbers From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx> Date: Fri, 15 Feb 2002 09:37:53 +0000 |
Hi Frederic, > In my xml string i get numbers, now if i do a usual sort i'll get > something like 0- 1 - 2 - 21 - 29 - 3 > > etc... nog i'd like to get that sorted as 0 - 1 - 3 - 21 - 29 ... By default with xsl:sort you get alphabetical sort; you want a numerical sort. You can make the XSLT processor sort numerically by setting the data-type attribute on xsl:sort to "number" rather than the default "text". For example: <xsl:sort data-type="number" /> Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] sorting numbers, Frederic Leclercq | Thread | Re: [xsl] sorting numbers, ronald heller |
[xsl] local-name of attribute value, Oliver Becker | Date | Re: [xsl] local-name of attribute v, Jeni Tennison |
Month |