You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2003/01/29 23:27:21 UTC

DO NOT REPLY [Bug 16570] New: - Derived types with a fractionDigit larger than their totalDigit

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16570>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16570

Derived types with a fractionDigit larger than their totalDigit

           Summary: Derived types with a fractionDigit larger than their
                    totalDigit
           Product: Xerces2-J
           Version: 2.2.1
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: XML Schema datatypes
        AssignedTo: xerces-j-dev@xml.apache.org
        ReportedBy: nmehrega@ca.ibm.com
                CC: nddelima@ca.ibm.com


Xerces2-J accepts user-defined types that have their 'fractionDigits' 
constraint set to a number that's larger than their 'totalDigits'.  Consider 
the following schema code:

	<xsd:simpleType id="good01" name="simpleTypeA">
		<xsd:restriction base="xsd:decimal">
			<xsd:totalDigits value="2"/>
		</xsd:restriction>
	</xsd:simpleType>

	<xsd:simpleType id="bad01" name="simpleTypeB">
		<xsd:restriction base="simpleTypeA">
			<xsd:fractionDigits value="3"/>
		</xsd:restriction>
	</xsd:simpleType>

'simpleTypeB' has a total of 3 fraction digits and a total number of 2 digits!! 
This is obviously invalid, but it goes undetected in Xerces2-J.

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org