This is a limitation (or feature) of the XMLSchema spec. There should be a one to one mapping between particles in a base type and a restricted type.
Here you have a particle in the base: <xs:any namespace="##any"...> and two particles in the restricted type: "bar" and "bar2" If this is not done you will need full polymorphic typechecking for your schemas and they are not intended to be as powerful as programming languages. You can read the discussion on the W3c website. To make this example work: Add another partice: <xs:any namespace="##any" ...> in the base or some such though this may not be what you want. Hope this helps. -Nikhil On Thu, 15 Jul 2004, Usorov, Evgeny wrote: > Hi, > > why this example is wrong, and i get Xerces 2.6.2 error-messages ? > > <xs:complexType name="basis_test_typ"> > <xs:sequence> > <xs:element name="foo"/> > <xs:any namespace="##any" minOccurs="0" > maxOccurs="unbounded" /> > </xs:sequence> > </xs:complexType> > > <xs:complexType name="derived_test_typ"> > <xs:complexContent> > <xs:restriction base="basis_test_typ"> > <xs:sequence> > <xs:element name="foo"/> > <xs:element name="bar"/> > <xs:element name="bar2"/> > </xs:sequence> > </xs:restriction> > </xs:complexContent> > </xs:complexType> > > [Error] test.xsd:148:42: rcase-Recurse.2: There is not a complete functional > mapping between the particles. > [Error] test.xsd:148:42: derivation-ok-restriction.5.4.2: Error for type > 'derived_test_typ'. The particle of the type is not a valid restriction of > the particle of the base. > > > Thanks in advance > Evgeny > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]