[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
On 24/01/2011 14:39, Szabo, Patrick (LNG-VIE) wrote:
Instead, try
round-half-to-even(xs:decimal(.), 2)
Re: [xsl] round-half-to-even problem.
Subject: Re: [xsl] round-half-to-even problem. From: Michael Kay <mike@xxxxxxxxxxxx> Date: Mon, 24 Jan 2011 15:26:10 +0000 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] round-half-to-even proble, David Carlisle | Thread | [xsl] Re: XPath related query, Vineet Chaoji |
AW: [xsl] round-half-to-even proble, Szabo, Patrick \(LNG | Date | Re: [xsl] Text based stage play scr, Liam R E Quin |
Month |