sandygao 2003/02/07 07:27:21
Modified: java/src/org/apache/xerces/impl/dv/xs XSSimpleTypeDecl.java
Log:
Bug: it's an error if fractionDigits > base.totalDigits.
Revision Changes Path
1.31 +9 -1
xml-xerces/java/src/org/apache/xerces/impl/dv/xs/XSSimpleTypeDecl.java
Index: XSSimpleTypeDecl.java
===================================================================
RCS file:
/home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/xs/XSSimpleTypeDecl.java,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- XSSimpleTypeDecl.java 28 Jan 2003 14:00:11 -0000 1.30
+++ XSSimpleTypeDecl.java 7 Feb 2003 15:27:21 -0000 1.31
@@ -1165,6 +1165,14 @@
}
}
+ // check 4.3.12.c1 must: fractionDigits <= base.totalDigits
+ if ((fFacetsDefined & FACET_FRACTIONDIGITS) != 0) {
+ if ((fBase.fFacetsDefined & FACET_TOTALDIGITS) != 0) {
+ if (fFractionDigits > fBase.fTotalDigits)
+ reportError( "fractionDigits-totalDigits", new
Object[]{Integer.toString(fFractionDigits), Integer.toString(fTotalDigits)});
+ }
+ }
+
// check fixed value for fractionDigits
if (((fFacetsDefined & FACET_FRACTIONDIGITS) != 0)) {
if ((( fBase.fFacetsDefined & FACET_FRACTIONDIGITS) != 0)) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]