[ http://issues.apache.org/jira/browse/XERCESC-1546?page=all ]
     
cargilld resolved XERCESC-1546:
-------------------------------

    Fix Version: Nightly build (please specify the date)
     Resolution: Fixed

Hi,
I just checked in a fix for this bug is in SVN; please verify.

Thanks.
David

> length, maxLength, and minLength facets are applied to item instead of list 
> when value specific via default/fixed
> -----------------------------------------------------------------------------------------------------------------
>
>          Key: XERCESC-1546
>          URL: http://issues.apache.org/jira/browse/XERCESC-1546
>      Project: Xerces-C++
>         Type: Bug
>   Components: Validating Parser (Schema) (Xerces 1.5 or up only)
>     Versions: 2.7.0
>  Environment: any
>     Reporter: Boris Kolpackov
>      Fix For: Nightly build (please specify the date)

>
> Consider the following scheme:
> <?xml version="1.0" encoding="utf-8"?>
> <schema xmlns="http://www.w3.org/2001/XMLSchema";
>         xmlns:t="test"
>         targetNamespace="test"
>         elementFormDefault="qualified">
>   <simpleType name="ListOfInts">
>     <list itemType="int"/>
>   </simpleType>
>   <simpleType name="int3">
>     <restriction base="t:ListOfInts">
>       <minLength value="3"/>
>       <maxLength value="3"/>
>     </restriction>
>   </simpleType>
>   <element name="root" type="t:int3" default="0 0 0"/>
> </schema>
> and instance:
> <?xml version="1.0"?>
> <root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>       xsi:schemaLocation="test test.xsd" 
>       xmlns="test">0 0 0</root>
> Processing with dom_count results in the following error:
> $ ./dom_count -v=always -n -s test.xml 
> Error at file /tmp/test.xsd, line 22, char 53
>   Message: Value '0' with length '1' is not equal to length facet of '3'
> Seems like the validator applies minLength and maxLength facets to individual 
> list items instead of to the list as a whole. This is also the case for the 
> length facet and the fixed attribute instead of default. Interestingly, if we 
> remove the default attribute from the schema everyhting works fine, even 
> though the instance contains exactly the same value as the default attribute.

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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

Reply via email to