[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: [XSL] How to order numeric data containing commas?
>Date: Mon, 7 May 2001 10:35:05 -0400 >From: Peter Tsantes <PTsantes@xxxxxxxxxxxxxx> >Subject: [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@xxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|