[ 
https://issues.apache.org/jira/browse/XERCESC-1683?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Bertoni resolved XERCESC-1683.
------------------------------------

    Resolution: Duplicate

This is a duplicate of XERCESC-1546.

> array default values wrongly cause xerces to reject schema
> ----------------------------------------------------------
>
>                 Key: XERCESC-1683
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1683
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: Validating Parser (Schema) (Xerces 1.5 or up only)
>    Affects Versions: 2.7.0
>         Environment: Win32 (occurred), probably all
>            Reporter: Uwe Pachler
>             Fix For: 2.7.0
>
>
> 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. 
> Replacing the restriction of the 'length' faced by restricting 'minLength' 
> and 'maxLength' to 3 has the same result.
> An example schema that causes the trouble:
> <?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> 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to