number formatting according to locale
----- Original Message ----- From: "Russ Holmes" <rholmes@xxxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxx> Sent: Thursday, August 31, 2000 10:29 AM Subject: number formatting according to locale > I need to format numbers in an xml file according to the locale of the web > server. > > E.g. XML; > > <ANumber>1234.56</ANumber> > > Output from US server; > > 1,234.56 > > ..from French Server; > > 1.234,56 > > I need one XSL style sheet which will do the transformation on the Client, > so using the regional settings of the client machine wouldn't work, I've > thought of maybe passing the locale of the server in the XML, which the XSL > would then use to determine the formatting.. > > e.g..In XML > > ... > <Locale>US</Locale> > .. > > or > > <Locale>FR</Locale> > > ..but then I don't know how I'd use that to do the formatting. > > Guess I could create templates for each possible locale, but the seems a bit > clunky... > > I've tried sending the bstrFormat for the formatnumber method in the xml. > > > e.g.. > > <Format>###,###,###0.00</Format> > > ..but the commas and points only indicate the presence of a thousands > divider and a decimal divider, the actual character is determined by the > regional settings of the machine on which the transformation is taking > place. > > Any help greatly appreciated. > > Russ > > > > > > > > > > > > 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