Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.5.0, 2.6.2, 2.7.1
-
None
-
None
-
IBM JDK 1.4.2_01
Eclipse 3.0.2
Windows XP
Description
<xs:restriction> incorrectly validates the <xs:minInclusive> value against the lexical space as constrained by <xs:pattern> instead of the value space. This issue is very similar to XERCESJ-962.
Schema fragment:
<xs:simpleType name="CurrencyType">
<xs:restriction base="xs:decimal">
<xs:minInclusive value="0"/>
<xs:fractionDigits value="2"/>
<xs:pattern value="(([1-9][0-9]*)|0?)\.[0-9]
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="AmountType">
<xs:restriction base="CurrencyType"/>
</xs:simpleType>
<xs:element name="grossAmount" type="AmountType"/>
Input element:
<grossAmount>0.11</grossAmount>
Result:
Caused by: [TIAFSchemaValidationException: error = Schema validation error: Error on line 150 of document jcp:com/msdw/taxwith/ecr/validation/revolver.xsd: cvc-pattern-valid: Value '0' is not facet-valid with respect to pattern '(([1-9][0-9]*)|0?)\.[0-9]{2}
' for type 'CurrencyType'.]
Library TIAF uses Xerces to validate an XML document against the schema, revolver.xsd.
To workaround this problem, I've changed 'minInclusive' from '0' to '0.00'.