Re: Xerces developers - there's a bug in Xerces schema validation

Hi Roger,

On 26 February 2016 at 17:25, Costello, Roger L. <costello@mitre.org> wrote:

>
> 5. We have an interoperability problem: when validating the exact same
> schema, system 1 using Xerces gets a different result than system 2 using
> Saxon.
>

I have just checked with .NET's XML Schema 1.0 validator, and it gives a
similar error what Xerces XML Schema 1.0 validator has reported for your
example. Therefore, we now have two XML Schema 1.0 validators in favor of
an error and Saxon not in favor of error in this case. But this is not to
say that, Saxon's algorithm (I think derived from an algorithm cited by
George) is less trust worthy. Your example is perhaps an unfortunate edge
case.

Btw, I have just also read George's explanation about how, logically a ref
to A can internally be expanded as a choice between A and its substitution
group members, which seems ok to me.



>
> Thoughts?
>
> /Roger
>
> ----------------------------------------------------------------------------------
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
>
>     <xs:element name="A" type="xs:double" />
>     <xs:element name="B" substitutionGroup="A" type="xs:double" />
>
>     <xs:complexType name="base">
>         <xs:sequence>
>             <xs:element ref="A" minOccurs="0" maxOccurs="unbounded" />
>         </xs:sequence>
>     </xs:complexType>
>
>     <xs:complexType name="derived">
>         <xs:complexContent>
>             <xs:restriction base="base">
>                 <xs:sequence>
>                     <xs:element ref="B" minOccurs="0" />
>                 </xs:sequence>
>             </xs:restriction>
>         </xs:complexContent>
>     </xs:complexType>
> </xs:schema>
>
>


-- 
Regards,
Mukul Gandhi

Received on Friday, 26 February 2016 13:57:52 UTC