peiyongz    2003/02/25 09:24:37

  Modified:    c/src/xercesc/validators/datatype
                        DecimalDatatypeValidator.cpp
  Log:
  Schema Errata: E2-44 totalDigits/fractDigits
  
  Revision  Changes    Path
  1.7       +22 -0     
xml-xerces/c/src/xercesc/validators/datatype/DecimalDatatypeValidator.cpp
  
  Index: DecimalDatatypeValidator.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xerces/c/src/xercesc/validators/datatype/DecimalDatatypeValidator.cpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DecimalDatatypeValidator.cpp      30 Jan 2003 21:56:22 -0000      1.6
  +++ DecimalDatatypeValidator.cpp      25 Feb 2003 17:24:37 -0000      1.7
  @@ -56,6 +56,9 @@
   
   /*
    * $Log$
  + * Revision 1.7  2003/02/25 17:24:37  peiyongz
  + * Schema Errata: E2-44 totalDigits/fractDigits
  + *
    * Revision 1.6  2003/01/30 21:56:22  tng
    * Performance: call getRawData instead of toString
    *
  @@ -547,6 +550,25 @@
                                    , value1
                                    , value2);
               }
  +
  +            /***
  +             E2-44 totalDigits
  +
  +             ... by restricting it to numbers that are expressible as i × 10^-n
  +             where i and n are integers such that |i| < 10^totalDigits and 0 <= n 
<= totalDigits.
  +            ***/
  +
  +            if ( theData->getScale() > fTotalDigits )  
  +            {                
  +                XMLString::binToText(theData->getScale(), value1, BUF_LEN, 10);
  +                XMLString::binToText(fTotalDigits, value2, BUF_LEN, 10);
  +                ThrowXML3(InvalidDatatypeFacetException
  +                                 , XMLExcepts::VALUE_exceed_totalDigit
  +                                 , theData->getRawData()
  +                                 , value1
  +                                 , value2);
  +            }
  +        
           }
   
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to