[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: formatting
Hi Devan, > How do I format numbers ?? > > I thought that it was done as per the following : > > <xsl:template match="test"> > <xsl:value-of select="format-number(.,'#,###,###,##0.00')"/> > </xsl:template> That's correct, given that the test element has a numerical value (although format-number(., '#,##0.00') would do exactly the same thing). > but that doesn't seem to work. > any ideas why that is ?? It's hard to say without being told in what way it isn't working (does it raise an error, produce a string formatted in a different way, produce nothing at all?). It would also help to see more of your stylesheet, your source document and know what XSLT processor you're using. Possible problems are: * using WD-xsl rather than XSLT * not applying templates to the test element in your document * having a default decimal format that doesn't recognise ,s and .s as you've used them * having a non-numeric value for the test element We should be able to work out which it is if you give us more information. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ 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
|