W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2005

extending xs:anyType (SQC bug)

From: Kasimier Buchcik <K.Buchcik@4commerce.de>
Date: Fri, 28 Oct 2005 11:05:43 +0200
To: ML-xml-schema-dev <xmlschema-dev@w3.org>
Message-Id: <1130490343.1272.13.camel@librax>

Hi,

Potential bug in IBM's SQC: it does not allow the xs:anyType to be
extended. (MSXML 4.0 SP2 does not allow it either, but I think
this is a known problem).

Scenario:

extension-anyType.xsd
---------------------
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<xsd:complexType name="myType">
		<xsd:complexContent>
			<xsd:extension base="xsd:anyType"/>
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:element name="foo" type="myType"/>
</xsd:schema>


ERROR
 file =
file:P:/libxml2-lab/tests/2005-10-28/anyType-ext/extension-anyType.xsd
line 7 column 20
SEVERITY: 1
ERROR TYPE: 2
MESSAGE 
TYPE REFINEMENT ERROR :
The type complexType myType was defined by extension on the type
http://www.w3.org/2001/XMLSchema:anyType. But according to the
definition of type http://www.w3.org/2001/XMLSchema:anyType (in the
final attribute), it cannot be refined using the derivation method,
extension. To fix this problem, either define complexType myType without
reference to http://www.w3.org/2001/XMLSchema:anyType, or remove or
modify the final clause in the definition of
http://www.w3.org/2001/XMLSchema:anyType.

Regards,

Kasimier
Received on Friday, 28 October 2005 09:11:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:51 GMT