extending xs:anyType (SQC bug)

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 UTC