I don't get this error with latest Xerces-J codebase on SVN xml-schema-1.1-dev branch. I suspect you're using our previously released xerces-j 2.11.0 beta, which may have issues with this feature. You also need to make sure, XSD 1.1 validation is enabled when you use your schema document.
On Thu, Aug 1, 2013 at 12:31 AM, Patricia <patricia.matsum...@gmail.com> wrote: > Hi, > > I am trying to use xs:override with xerces-j 2.11.0, but I keep receiving > the "Element 'override' is invalid, misplaced, or occurs too often" error. > > I am trying to use the example below. > > Could you please help me find what might be wrong? > > A.xsd > > > > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> > <xs:complexType name="personName"> > <xs:sequence> > <xs:element name="firstName"/> > <xs:element name="lastName"/> > </xs:sequence> > </xs:complexType> > <xs:element name="phone" type="xs:string"/> > </xs:schema> > > > > B.xsd > > > > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> > <xs:override schemaLocation="A.xsd"> > <xs:complexType name="personName"> > <xs:sequence> > <xs:element name="givenName"/> > <xs:element name="surname"/> > </xs:sequence> > </xs:complexType> > </xs:override> > </xs:schema> > > > > Thank you very much -- Regards, Mukul Gandhi --------------------------------------------------------------------- To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org For additional commands, e-mail: j-users-h...@xerces.apache.org