Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - XSL and internationalisation [Thread Next] Re: XSL and internationalisationTo: NULL Date: 4/4/2007 8:20:00 AM I think the solution is to use the decimal point in your XML and in an XSLT you can use xsl:decimal-format element and the format-number function. -- Joe Fawcett (MVP - XML) http://joe.fawcett.name "Mike May" <mikemay@b...> wrote in message news:clyQh.30985$_Q.4600@f...... >I am attempting some XSLT processing on a machine with German regional >settings. The attached test case illustrates the problem. German has >commas as decimal separators. Excel and other applications respect comma >as the decimal separator. > > xml data------------- > <?xml version="1.0" encoding="utf-8" ?> > <data> > <item>103,3</item> > <item>104,4</item> > </data> > > xsl script--------------- > <?xml version="1.0" encoding="utf-8" ?> > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > <xsl:output encoding="utf-8" /> > <xsl:template match="/"> > <xsl:value-of select="sum(data/item)" /> > </xsl:template> > </xsl:stylesheet> > > msxsl outputs NaN for the above. > > It behaves correctly outputting 207.7 when I change the decimal separators > to '.'. > > Do I need to stipulate the decimal separator? > > Please help if you can? > > Regards > Mike May > | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
