This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: [XSL] How to order numeric data containing commas?
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re:[xsl] [XSL] How to order numeric data containing commas?
- From: ingoschi at web dot de
- Date: Mon, 7 May 2001 20:57:01 +0200
- Organization: WiredMinds Informationssysteme GmbH
- References: <200105071620.MAA08170@biglist.com>
- Reply-To: xsl-list at lists dot mulberrytech dot com
>Date: Mon, 7 May 2001 10:35:05 -0400
>From: Peter Tsantes <PTsantes@Tradescape.com>
>Subject: [xsl] [XSL] How to order numeric data containing commas?
>
>I am having a problem ordering numbers that contain commas. I'm using XSL;
>so I can't define the data type in <sort>.
>I tried to use the namespace
>
>xmlns:dt="urn:schemas-microsoft-com:datatypes"
>xmlns="urn:schemas-microsoft-com:xml-data"
>
>and choose datatypes that allow punctuation, but no luck.
>
>Does anyone know how to get a numbers that contain commas to order properly
>in XSL.
Hi,
sort them as if they would contain points:
<xsl:apply-templates select= .. the nodes containing the numbers ..>
<xsl:sort select="translate(., ',', '.')" data-type="number"/>
</xsl:apply-templates>
Ciao, Ingo
Ingo Schildmann ingoschi@web.de
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list