W3C home > Mailing lists > Public > public-xml-schema-testsuite@w3.org > July 2010

Complex content derived from simple content - test case particlesZ031

From: Michael Kay <mike@saxonica.com>
Date: Thu, 08 Jul 2010 15:47:49 +0100
Message-ID: <4C35E515.4030708@saxonica.com>
To: public-xml-schema-testsuite@w3.org
The test schema particlesZ031.xsd is deemed valid in XSD 1.0. It looks 
like this:

<xs:schema xmlns="http://cscB2BCIDXSchemas.Schema1" 
xmlns:b="http://schemas.microsoft.com/BizTalk/2003" 
targetNamespace="http://cscB2BCIDXSchemas.Schema1" 
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Root" type="Type1" />
<xs:element name="Record" type="Type2" />
<xs:complexType name="Type1">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="Field1" type="xs:string" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="Type2">
<xs:complexContent>
<xs:extension base="Type1">
<xs:attribute name="Field2" type="xs:string" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>

With my 1.1 processor, it's coming up as invalid:

   The type Type2 has complex content so it cannot be derived by 
extension from the complex
   type Type1 which has simple content

I'm having trouble finding the rule that my processor is enforcing here, 
and because it looks like a backwards incompatibility, I'd just like to 
check that it's a deliberate change that we know about.

Michael Kay
Received on Thursday, 8 July 2010 14:48:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 8 July 2010 14:48:21 GMT