Subject: Re: [xsl] round-half-to-even problem.|
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Mon, 24 Jan 2011 15:26:10 +0000
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.
Michael Kay Saxonica