[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: formatting

Subject: Re: formatting
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Thu, 19 Jul 2001 14:11:40 +0100
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.