- From: Kasimier Buchcik <K.Buchcik@4commerce.de>
- Date: Wed, 14 Sep 2005 14:28:12 +0200
- To: XML-SCHEMA <xmlschema-dev@w3.org>
Hi,
XSV 2.10 crashes in the following scenario:
redef-group.xsd
---------------
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:test:foo"
xmlns:f="urn:test:foo">
<xsd:redefine schemaLocation="redef-group.inc.xsd">
<xsd:group name="thisGroup">
<xsd:sequence>
<xsd:group ref="f:otherGroup"/>
</xsd:sequence>
</xsd:group>
</xsd:redefine>
<xsd:group name="otherGroup">
<xsd:sequence>
<xsd:group ref="f:thisGroup"/>
</xsd:sequence>
</xsd:group>
<xsd:element name="foo">
<xsd:complexType>
<xsd:group ref="f:thisGroup"/>
</xsd:complexType>
</xsd:element>
</xsd:schema>
redef-group.inc.xsd
-------------------
<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:test:foo">
<xsd:group name="thisGroup">
<xsd:sequence>
<xsd:element name="bar" type="xsd:string"/>
</xsd:sequence>
</xsd:group>
</xsd:schema>
redef-group.xml
---------------
<foo xmlns="urn:test:foo"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:test:foo redef-group.xsd"/>
XSV reports:
<xsv xmlns="http://www.w3.org/2000/05/xsv" crash="true"
docElt="{urn:test:foo}foo" instanceAssessed="true"
instanceErrors="0"
rootType="[Anonymous]" schemaErrors="0"
schemaLocs="urn:test:foo -> redef-group.xsd"
target="file:///p:/libxml2-lab/tests/2005-09-14/redef-group.xml"
validation="strict" version="XSV 2.10-1 of 2005/04/22 13:10:49">
...
<bug>validator crash during validation</bug>
while Xerces-J 2.7.1 reports:
redef-group.xsd:16,34: (Error) mg-props-correct.2: Circular definitions
detected for group 'f:thisGroup'. Recursively following the {term}
values of the particles leads to a particle whose {term} is the group
itself.
redef-group.xsd:7,31: (Error) cos-particle-restrict.a: Derived particle
is empty, and base is not emptiable.
redef-group.xsd:7,31: (Error) src-redefine.6.2.2: Group 'thisGroup' does
not properly restrict the group it redefines; constraint violated:
'cos-particle-restrict.a'.
Regards,
Kasimier
Received on Wednesday, 14 September 2005 12:28:35 UTC