This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Xalan Rounding


Agreed. I thought the value of presenting this approach is that it is
adaptable to whatever rounding (or other) math you might require, e.g.,
use floor() or ceiling(), round to the nearest 100, etc.

And it provides a workaround until Xalan fixes the defect <sm;)ey/>

Cheers,
Stuart

-----Original Message-----
From: owner-xsl-list@lists.mulberrytech.com
[mailto:owner-xsl-list@lists.mulberrytech.com] On Behalf Of Jeff Kenton
 
..Perform whatever rounding math you desire explicitly before passing
the
..value to format-number:
..
..  format-number( round(//value), '##')

This will work, and solve his problem, but the spec is clear that 
format-number() should do that for him.  The XSLT 2.0 spec has the gory 
details, as does the Java spec referenced in the XSLT 1.0 spec.

Jeff Kenton



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]