You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Jim Puccio <ch...@earthlink.net> on 2000/10/24 02:19:51 UTC

Re: Bug in Schema validator (Xerces 1.2.1)

I just downloaded & tested this bug against Xerces 1.2.1.  It's still there.


>I've localized a bug from a large recursive schema into the following test
>case.  I'm sure you will find it interesting.  If the test is run through
>Xerces 1.2.0 in the form given, it will complain that the content of
element
>type "buggy" must match "((buggy|##any),removeMe+)", which it plainly does.
>On the other hand, if you comment out the <removeMe/> tag and its
associated
>line in the schema, everything is hunky-dory.  Similarly, if you move the
><removeMe/> tag before the <anything/>, and make the corresponding
>adjustment in the schema, it also validates properly.  BTW, I'm using the
>DOM Parser.
>
>Here's the XML file:
>
><?xml version="1.0" encoding="UTF-8"?>
>
><outer
> xmlns:xsi = "http://www.w3.org/1999/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation = "bug.xsd">
>
> <buggy> <anything/> <removeMe/> </buggy>
>
></outer>
>
>And here's its schema:
>
><?xml version="1.0" encoding="UTF-8"?>
>
><xsd:schema
> xmlns:xsd = "http://www.w3.org/1999/XMLSchema"
> xmlns:xsi = "http://www.w3.org/1999/XMLSchema-instance">
>
> <xsd:element name = "outer">
>  <xsd:complexType content = "elementOnly">
>   <xsd:group ref = "choices"/>
>  </xsd:complexType>
> </xsd:element>
>
> <xsd:group name = "choices">
>  <xsd:choice>
>   <xsd:element ref = "buggy"/>
>   <xsd:any processContents = "lax"/>
>  </xsd:choice>
> </xsd:group>
>
> <xsd:element name = "buggy">
>  <xsd:complexType content = "elementOnly">
>   <xsd:sequence>
>    <xsd:group ref = "choices"/>
>    <xsd:element name = "removeMe" maxOccurs = "unbounded"/>
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:element>
>
></xsd:schema>

-- Jim Puccio



Re: Bug in Schema validator (Xerces 1.2.1)

Posted by Eric Ye <er...@locus.apache.org>.
This bug is really very sticky, I know Lisa Martin is working on it.
Basically it is originated form the content model validation engine.
_____


Eric Ye * IBM, JTC - Silicon Valley * ericye@locus.apache.org

----- Original Message -----
From: "Jim Puccio" <ch...@earthlink.net>
To: <xe...@xml.apache.org>
Sent: Monday, October 23, 2000 5:19 PM
Subject: Re: Bug in Schema validator (Xerces 1.2.1)


> I just downloaded & tested this bug against Xerces 1.2.1.  It's still
there.
>
>
> >I've localized a bug from a large recursive schema into the following
test
> >case.  I'm sure you will find it interesting.  If the test is run through
> >Xerces 1.2.0 in the form given, it will complain that the content of
> element
> >type "buggy" must match "((buggy|##any),removeMe+)", which it plainly
does.
> >On the other hand, if you comment out the <removeMe/> tag and its
> associated
> >line in the schema, everything is hunky-dory.  Similarly, if you move the
> ><removeMe/> tag before the <anything/>, and make the corresponding
> >adjustment in the schema, it also validates properly.  BTW, I'm using the
> >DOM Parser.
> >
> >Here's the XML file:
> >
> ><?xml version="1.0" encoding="UTF-8"?>
> >
> ><outer
> > xmlns:xsi = "http://www.w3.org/1999/XMLSchema-instance"
> > xsi:noNamespaceSchemaLocation = "bug.xsd">
> >
> > <buggy> <anything/> <removeMe/> </buggy>
> >
> ></outer>
> >
> >And here's its schema:
> >
> ><?xml version="1.0" encoding="UTF-8"?>
> >
> ><xsd:schema
> > xmlns:xsd = "http://www.w3.org/1999/XMLSchema"
> > xmlns:xsi = "http://www.w3.org/1999/XMLSchema-instance">
> >
> > <xsd:element name = "outer">
> >  <xsd:complexType content = "elementOnly">
> >   <xsd:group ref = "choices"/>
> >  </xsd:complexType>
> > </xsd:element>
> >
> > <xsd:group name = "choices">
> >  <xsd:choice>
> >   <xsd:element ref = "buggy"/>
> >   <xsd:any processContents = "lax"/>
> >  </xsd:choice>
> > </xsd:group>
> >
> > <xsd:element name = "buggy">
> >  <xsd:complexType content = "elementOnly">
> >   <xsd:sequence>
> >    <xsd:group ref = "choices"/>
> >    <xsd:element name = "removeMe" maxOccurs = "unbounded"/>
> >   </xsd:sequence>
> >  </xsd:complexType>
> > </xsd:element>
> >
> ></xsd:schema>
>
> -- Jim Puccio
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
>
>