xsl-list
[Top] [All Lists]

RE: [xsl] Rounding a number

2006-09-15 09:53:45

Of course the problem is that I get "1.3333333333333332"  I 
need to round that down to three decimals.  What is the best 
approach in XSLT 1.0?

You can use format-number($x, '#0.000'), but be aware that in XSLT 1.0 the
rounding algorithm isn't specified.

Michael Kay
http://www.saxonica.com/


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>