peiyongz 2002/11/28 12:39:27 Modified: c/src/xercesc/util XMLDateTime.cpp Log: Schema Errata: E2-23 seconds part shall have at least one digit after the dot if it appears. Revision Changes Path 1.4 +21 -1 xml-xerces/c/src/xercesc/util/XMLDateTime.cpp Index: XMLDateTime.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/XMLDateTime.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- XMLDateTime.cpp 6 Nov 2002 22:22:21 -0000 1.3 +++ XMLDateTime.cpp 28 Nov 2002 20:39:27 -0000 1.4 @@ -57,6 +57,10 @@ /* * $Id$ * $Log$ + * Revision 1.4 2002/11/28 20:39:27 peiyongz + * Schema Errata: E2-23 seconds part shall have at least one digit after the dot + * if it appears. + * * Revision 1.3 2002/11/06 22:22:21 peiyongz * Schema-Errata: E2-12: gMonth * @@ -859,8 +863,25 @@ { //scan seconds int mlsec = indexOf (fStart, end, MILISECOND_SEPARATOR); + + /*** + * Schema Errata: E2-23 + * at least one digit must follow the decimal point if it appears. + * That is, the value of the seconds component must conform + * to the following pattern: [0-9]+(.[0-9]+)? + */ if ( mlsec != NOT_FOUND ) { + /*** + * make usure there is something after the '.' and before the end. + */ + if ( mlsec+1 == end ) + { + ThrowXML1(SchemaDateTimeException + , XMLExcepts::DateTime_dur_inv_seconds + ,fBuffer); + } + fValue[Second] = negate * parseInt(fStart, mlsec); fValue[MiliSecond] = negate * parseInt(mlsec+1, end); }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]