- From: Costello, Roger L. <costello@mitre.org>
- Date: Thu, 25 Feb 2016 14:41:11 +0000
- To: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
> Give us a clue - what's the error? No idea. Here's the error message that is generated: derivation-ok-restriction.5.4.2: Error for type 'derived'. The particle of the type is not a valid restriction of the particle of the base. Note: the secret sauce that I used to generate the error message was to use minOccurs="0" maxOccurs="unbounded" with the element in the base type and minOccurs="0" with the element in the derived-by-restriction type. Without that, I couldn't generate the error. /Roger -----Original Message----- From: Michael Kay [mailto:mike@saxonica.com] Sent: Thursday, February 25, 2016 9:34 AM To: Costello, Roger L. <costello@mitre.org> Cc: xmlschema-dev@w3.org Subject: Re: Xerces developers - there's a bug in Xerces schema validation Give us a clue - what's the error? > On 25 Feb 2016, at 14:20, Costello, Roger L. <costello@mitre.org> wrote: > > Hi Folks, > > Hopefully there are some Xerces developers on this mailing list (hey Mukul). > > The below schema validates fine in Saxon but Xerces throws an error. /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> >
Received on Thursday, 25 February 2016 14:41:44 UTC