Hello everyone,
I've got a problem with default values specified in a schema that are
arrays.
Xerces 2.7.0 fails to load the Schema grammar below at the
'defaultIntArray3Element' element with the message:
"Value '4' with length '1' is not equal to length facet of '3'"
Well, err, the specified default value is "4 3 2", which is an array of
length 3.
So is the bug in my schema or in Xerces C? I also tried to replace the
restriction of the 'length' faced by restricting 'minLength' and
'maxLength' to 3, with the same result
Cheers,
Uwe
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema
xmlns="http://foo/test34"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://foo/test34"
>
<!--
Test34 tests default value handling
-->
<xs:simpleType name="intArray">
<xs:list itemType="xs:int"/>
</xs:simpleType>
<xs:simpleType name="intArray3">
<xs:restriction base="intArray">
<xs:length value="3"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="Test34">
<xs:sequence>
<xs:element name="defaultIntArray3Element" type="intArray3"
default="4 3 2"/>
</xs:sequence>
<attribute name="defaultIntArray3" type="intArray3" default="3 2
1"/>
</xs:complexType>
<!-- root element -->
<xs:element name="test34" type="Test34"/>
</xs:schema>