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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to