|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Avoid rounding up/down in format-number function
> > is there a way to avoid rounding up/down in the > format-number() function? > format-number() is obliged to fit the number in the the space provided: if your picture is "0.00##" then you will have at least two and at most four digits after the decimal point. That leaves the question of how the rounding is done. XSLT 1.0 specifies the function in terms of the JDK 1.1 specification of DecimalFormat, and the JDK 1.1 spec is notoriously vague. Later versions of the JDK have specified that the rounding is "half-even" (i.e. 0.35 rounds to 0.4, while 0.25 rounds to 0.2), but XSLT 1.0 processors are not obliged to respect that. Michael Kay 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
|

Cart








