Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Potential flaw in component reference resolution in Xerces-J

From: Kasimier Buchcik <K.Buchcik@---------.-->
To: XML-SCHEMA <xmlschema-dev@--.--->
Date: 9/14/2005 8:52:00 PM
Hi,

this is a pedantic report about a potantial flaw in the
component reference resolution mechanism of Xerces-J 2.7.1.

We have a self-redefining schema itself here, which should
lead to a circularity error. However, Xerces reports a
component resolution error.

redef-group-2.xsd
-----------------
xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	targetNamespace="urn:test:foo"
	xmlns:f="urn:test:foo">

	<xsd:include schemaLocation="redef-group-2.inc.xsd"/>

	<xsd:element name="foo">
		<xsd:complexType>
			<xsd:group ref="f:thisGroup"/>
		</xsd:complexType>
	</xsd:element>

</xsd:schema>

redef-group-2.inc.xsd
---------------------
<xsd:schema
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	targetNamespace="urn:test:foo">

	<xsd:redefine schemaLocation="redef-group-2.inc.xsd">
		<xsd:group name="thisGroup">
			<xsd:sequence>
				<xsd:element name="bar"/>
			</xsd:sequence>
		</xsd:group>
	</xsd:redefine>		

</xsd:schema>

redef-group-2.xml
-----------------
<foo xmlns="urn:test:foo"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="urn:test:foo redef-group-2.xsd"/>

Xerces reports:

redef-group-2.inc.xsd:7,31: (Error) src-resolve: Cannot resolve the name
',thisGroup_fn3dktizrknc9pi_fn3dktizrknc9pi' to a(n) 'group' component.

redef-group-2.inc.xsd:7,31: (Error) src-redefine.6.2.1: No group in the
redefined schema has a name matching 'thisGroup'.

redef-group.xml:4,55: (Error) cvc-complex-type.2.4.b: The content of
element 'foo' is not complete. One of '{bar}' is expected.


Regards,

Kasimier

From u.ende@m... Thu Sep 15 08:25:32 2005
Received: from lisa.w3.org ([128.30.52.41])
	by frink.w3.org w


transparent
Print
Mail
Like It
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