xsd validation issue with base type of boolean not correctly validated when 0
or 1 are used.
--------------------------------------------------------------------------------------------
Key: XERCESJ-1497
URL: https://issues.apache.org/jira/browse/XERCESJ-1497
Project: Xerces2-J
Issue Type: Bug
Components: XML Schema API
Affects Versions: 2.11.0
Environment: Windows
Reporter: [email protected]
The error surfaced in the Eclipse Validator telling me that an .xsd file had an
error,
I validated the file on the W3C site and it validated OK.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=337932
IBM debugged it and replied that it was a bug in Xerces, and suggested I report
the bug to Apache.
The code snippet correctly validates on the w3c site.
The w3c standard defines a boolean to allow 4 values, true, false, 0, and 1
The eclipse xsd validator fails when 0 and 1 are defined in the case below.
http://www.w3.org/TR/xmlschema-2/#boolean
3.2.2 boolean
[Definition:] boolean has the - value space- required to support the
mathematical concept of binary-valued logic: {true, false}.
3.2.2.1 Lexical representation
An instance of a datatype that is defined as - boolean- can have the following
legal literals {true, false, 1, 0}.
The Eclipse Validator fails then the values of 0 and 1 are used, but passes
when true and false are used.
<xs:attribute name="root" default="1" >
<xs:annotation>
<xs:documentation>
'root' can be used to distinguish serialization roots from
other elements that are present in a serialization but are
not roots of a serialized value graph
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base='xs:boolean'>
<xs:pattern value="0|1" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]