Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Redefining model group definitions (XSV crash)

From: Kasimier Buchcik <K.Buchcik@---------.-->
To: XML-SCHEMA <xmlschema-dev@--.--->
Date: 9/14/2005 4:28:00 PM
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





From K.Buchcik@4... Wed Sep 14 16:52:11 2005
Received: from lisa.w3.org ([128.30.52.41])
	by frink.w3.org with esmtp (E


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent