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 "Michael Glavassevich (JIRA)" <xe...@xml.apache.org> on 2011/03/03 06:51:36 UTC
[jira] Updated: (XERCESJ-1497) xsd validation issue with base type
of boolean not correctly validated when 0 or 1 are used.
[ https://issues.apache.org/jira/browse/XERCESJ-1497?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Glavassevich updated XERCESJ-1497:
------------------------------------------
Component/s: (was: XML Schema API)
XML Schema 1.0 Structures
> 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 1.0 Structures
> Affects Versions: 2.11.0
> Environment: Windows
> Reporter: Peter_Lenahan@ibi.com
>
> 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: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org