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 Grégoire Pau <gp...@acland.fr> on 2001/01/30 15:55:00 UTC

XML Schema CR validation error with this little example ?

Hi,

I cannot validate the following example with the most recent CVS Xerces-J
version with SAXCount with validation. (although it is correctly validated
with XMLSpy35 and it is with respect of XML-Schema Oct CR)
In fact, SAXCount enters in an infinite loop while building the content
model, the
org.apache.xerces.validators.common.Grammar.buildSyntaxTree() function seems
to call
itself, repeatly.
The complexContent model seems to be the cause.

Maybe I missed something ?


test.xml
--------
<A id="test" xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="schema.xsd">
  <C>bouh </C>
  <D>toto </D>
</A>

schema.xsd
----------
<xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema">

<xsd:complexType name="B" abstract="true">
<xsd:attribute name="id" type="xsd:string" use="optional"/>
</xsd:complexType>

<xsd:element name="A">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="B">
<xsd:sequence>
<xsd:element name="C" type="xsd:string"/>
<xsd:element name="D" type="xsd:string"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>

</xsd:schema>