On 24/01/2011 14:39, Szabo, Patrick (LNG-VIE) wrote:
round-half-to-even(text(), 2)
That doesn't look like a good idea to me. The content of the text node
will be converted to a double under the standard function calling rules,
and this may involve a loss of precision because not all decimal numbers
can be represented exactly as doubles. The semantics of
round-half-to-even then require the double to be converted to a decimal,
which might not be the number you first thought of.
Instead, try
round-half-to-even(xs:decimal(.), 2)
Michael Kay
Saxonica
--~------------------------------------------------------------------
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>
--~--