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 2001/03/20 18:22:47 UTC
[Bug 1052] New - The parser does not raise an error for an invalid enumeration values
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1052
*** shadow/1052 Tue Mar 20 09:22:47 2001
--- shadow/1052.tmp.16449 Tue Mar 20 09:22:47 2001
***************
*** 0 ****
--- 1,46 ----
+ +============================================================================+
+ | The parser does not raise an error for an invalid enumeration values |
+ +----------------------------------------------------------------------------+
+ | Bug #: 1052 Product: Xerces-J |
+ | Status: NEW Version: 1.3.0 |
+ | Resolution: Platform: PC |
+ | Severity: Normal OS/Version: |
+ | Priority: Medium Component: Schema-Datatypes |
+ +----------------------------------------------------------------------------+
+ | Assigned To: xerces-j-dev@xml.apache.org |
+ | Reported By: nddelima@ca.ibm.com |
+ | CC list: Cc: |
+ +----------------------------------------------------------------------------+
+ | URL: |
+ +============================================================================+
+ | DESCRIPTION |
+ The value of an enumeration is supposed to be set of values from the value
+ space of the base datatype. For a simpleType derived by restriction from the
+ following derived datatypes; long, int, short, byte, nonNegativeInteger,
+ unsignedLong, unsignedInt, unsignedShort, unsignedByte, positiveInteger, if an
+ enumeration item has a value that is invalid or out of bounds with reference
+ to the base type, the parser doesn't raise an error. A section of code from a
+ sample schema that does not raise an error is as below:
+
+ Note that short has a range 32767 to -32768
+ <simpleType name="myshort">
+ <restriction base="short">
+ <enumeration value="111"/>
+ <enumeration value="222"/>
+ <enumeration value="-32769"/>
+ </restriction>
+ </simpleType>
+
+ <element name="root">
+ <complexType>
+ <sequence>
+ <element name="myshort_1" type="si01:myshort"
+ minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ Reference:
+ IBM Schema invalid tests ibmd3_3_14si06, ibmd3_3_15si06, ibmd3_3_16si06,
+ ibmd3_3_17si06, ibmd3_3_18si05, ibmd3_3_19si05, ibmd3_3_20si05, ibmd3_3_21si05,
+ ibmd3_3_22si05, ibmd3_3_23si05
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org