[prev in list] [next in list] [prev in thread] [next in thread]
List: xalan-cvs
Subject: cvs commit: xml-xalan/c/src/xalanc/XSLT ElemNumber.cpp
From: dbertoni () apache ! org
Date: 2004-09-20 5:28:31
Message-ID: 20040920052831.99593.qmail () minotaur ! apache ! org
[Download RAW message or body]
dbertoni 2004/09/19 22:28:31
Modified: c/src/xalanc/XSLT ElemNumber.cpp
Log:
Fix for XSLT erratum E24.
Revision Changes Path
1.13 +17 -10 xml-xalan/c/src/xalanc/XSLT/ElemNumber.cpp
Index: ElemNumber.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/ElemNumber.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- ElemNumber.cpp 11 Aug 2004 15:20:05 -0000 1.12
+++ ElemNumber.cpp 20 Sep 2004 05:28:31 -0000 1.13
@@ -496,18 +496,25 @@
m_valueExpr->execute(*this, executionContext, theValue);
- CountType theNumber = 0;
-
- if (DoubleSupport::isNaN(theValue) == false)
+ if (DoubleSupport::isNaN(theValue) == true)
+ {
+ DoubleToDOMString(theValue, theResult);
+ }
+ else if (DoubleSupport::lessThan(theValue, 0.5) == true)
+ {
+ DoubleToDOMString(DoubleSupport::getNaN(), theResult);
+ }
+ else
{
- theNumber = CountType(DoubleSupport::round(theValue));
- }
+ CountType theNumber =
+ CountType(DoubleSupport::round(theValue));
- formatNumberList(
- executionContext,
- &theNumber,
- 1,
- theResult);
+ formatNumberList(
+ executionContext,
+ &theNumber,
+ 1,
+ theResult);
+ }
}
else
{
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic