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

RE: Rounding a number

Subject: RE: Rounding a number
From: cknell@xxxxxxxxxx
Date: Fri, 15 Sep 2006 12:50:09 -0400
rounding a number
<xsl:value-of select="round(1000*(4 div 3)) div 1000"/>
Charles Knell
cknell@xxxxxxxxxx - email

-----Original Message-----
From:     Sam Carleton <scarleton@xxxxxxxxxxxxxxxx>
Sent:     Fri, 15 Sep 2006 12:43:02 -0400
To:       xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:   Rounding a number

Within the XSLT, I am doing some division, such as

<xsl:value-of select="4 div 3"/>

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

Miltonstreet Photography

Current Thread


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.
First Name
Last Name
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.