[ http://issues.apache.org/jira/browse/XERCESJ-1056?page=history ]
Michael Glavassevich resolved XERCESJ-1056:
-------------------------------------------
Resolution: Invalid
The attribute declaration for 'root' isn't valid. The canonical lexical
representation [1] of the value of default must be valid with respect to the
type definition for the attribute [2]. The literal '0' maps to false in
boolean's value space. The literal 'false' is the canonical lexical
representation for the value false [3] but the pattern facet in the type
definition excludes it so the default value isn't valid. You could fix this by
deriving the type of 'root' from integer instead of boolean or changing the
pattern facet's value to include 'false'.
[1]
http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes#dt-canonical-representation
[2] http://www.w3.org/TR/xmlschema-1/#a-props-correct
[3] http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#boolean
> Error while validating a simple type with pattern facet and value constraint
> ----------------------------------------------------------------------------
>
> Key: XERCESJ-1056
> URL: http://issues.apache.org/jira/browse/XERCESJ-1056
> Project: Xerces2-J
> Type: Bug
> Components: XML Schema Structures
> Versions: 2.6.2
> Environment: PC, Linux Red Hat 7.1
> Reporter: J�r�me LEMOYNE
>
> the following schema can not be validated by Xerces :
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema targetNamespace="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:attribute name="root" default="0">
> <xs:simpleType>
> <xs:restriction base="xs:boolean">
> <xs:pattern value="0|1"/>
> </xs:restriction>
> </xs:simpleType>
> </xs:attribute>
> </xs:schema>
> Its validation results in the following error messages :
> Error:(file:/bug.xsd:Line.6,Col.41)a-props-correct.2: Invalid value
> constraint value '0' in attribute 'root'.
> Error:(file:/bug.xsd:Line.6,Col.41)cvc-pattern-valid: Value 'false' is not
> facet-valid with respect to pattern '0|1' for type 'null'.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]