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/02/28 15:28:13 UTC
DO NOT REPLY [Bug 17529] New: -
totalDigits constraint can be set to zero
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=17529>.
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=17529
totalDigits constraint can be set to zero
Summary: totalDigits constraint can be set to zero
Product: Xerces2-J
Version: 2.3.0
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
According to section 4.3.11 of Datatypes: "The value of totalDigits must be a
positiveInteger."
Where a positiveInteger in section 3.3.25 is defined as: "The infinite set
{1,2,3...}" (It doesn't contain zero)
The following schema code goes undetected in Xerces2-J:
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.example.com"
xmlns:target="http://www.example.com" elementFormDefault="qualified">
<simpleType name="badType">
<restriction base="decimal">
<totalDigits value="0"/>
</restriction>
</simpleType>
<element name="root">
<complexType>
<sequence>
<element name="elem" type="target:badType" minOccurs="0"/>
</sequence>
</complexType>
</element>
</schema>
----------------------------------
The instance document corresponding to the schema above:
<root xmlns="http://www.example.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.example.com totaldigits.xsd">
</root>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org