Community
Participate
Working Groups
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 xld 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> -- Configuration Details -- Product: Eclipse 1.3.0.20100617-0521 (org.eclipse.epp.package.jee.product) Installed Features: org.eclipse.wst.xml_ui.feature 3.2.0.v201005241510-7H7AFUIDxumQGOb7ocjUR2Pvz-28
This error comes from Xerces which is used by the WTP XML Schema validator. You can pursue this issue further at Apache, perhaps starting with a bug report here http://xerces.apache.org/xerces2-j/jira.html.
I opened up the issue with Apache. https://issues.apache.org/jira/browse/XERCESJ-1497 Thanks, Peter