Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Duplicate
-
2.6.2
-
None
-
None
-
Win2K,
Description
If I call
getLexicalFacetValue(XSSimpleTypeDefinition.FACET_TOTALDIGITS)
on the integer type and types derivated from integer, I always get "0".
Getting the total digit facet via getFacets() returns undefined as expected.
It seems that in class XSSimpleTypeDecl in method getLexicalFacetValue, the test for validationDV == DV_INTEGER was by mistake placed in the case FACET_TOTALDIGITS instead of the case FACET_FRACTIONDIGITS.
Index: XSSimpleTypeDecl.java
===================================================================
RCS file: /home/cvspublic/xml-xerces/java/src/org/apache/xerces/impl/dv/xs/XSSimpleTypeDecl.java,v
retrieving revision 1.68
diff -u -r1.68 XSSimpleTypeDecl.java
— XSSimpleTypeDecl.java 7 Apr 2005 17:37:07 -0000 1.68
+++ XSSimpleTypeDecl.java 28 Apr 2005 07:17:31 -0000
@@ -2067,10 +2067,10 @@
case FACET_MININCLUSIVE:
return (fMinInclusive == null)?null:fMinInclusive.toString();
case FACET_TOTALDIGITS:
- if (fValidationDV == DV_INTEGER)
- return "0";
return (fTotalDigits == -1)?null:Integer.toString(fTotalDigits);
case FACET_FRACTIONDIGITS:
+ if (fValidationDV == DV_INTEGER)
+ return "0";
return (fFractionDigits == -1)?null:Integer.toString(fFractionDigits);
}
return null;