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

RE: extension of an abstract complexType

From: Lemmin, Harald <Harald.Lemmin@softwareag.com>
Date: Fri, 17 Oct 2003 08:15:37 +0200
Message-ID: <DFF2AC9E3583D511A21F0008C7E6210606E34D45@daemsg02.software-ag.de>
To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>

please see this
http://lists.w3.org/Archives/Public/xmlschema-dev/2002Jan/0082.html thread
for derivation between the simple content parts of complex type simple

And in the same way the complex type / complex content is restricted to be a
complex type simple content, i.e. it looses its complex content, but keeps
its attributes.

Please see: http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#coss-ct :
Derivation Valid (Restriction, Complex):
5.1: If the {content type} of the complex type definition is a simple type
definition, then one of the following must be true
5.1.2 The {base type definition} must be mixed and have a particle which is
ˇ¤emptiableˇ¤ as defined in Particle Emptiable (ˇě3.9.6)

Thus the abstract complex type has to be mixed for the restriction to work:
<xsd:complexType name="timePoint" abstract="true" mixed="true">
 <xsd:attribute name="closed" use="required" type="xsd:boolean"/>

Kind regards,

-----Original Message-----
From: hooven [mailto:huw@dragontec.com.cn]
Sent: Freitag, 17. Oktober 2003 05:17
To: xmlschema-dev@w3.org
Subject: RE: extension of an abstract complexType


>  <xs:complexType name = "integerTimePoint">
>    <xs:simpleContent>
>      <xs:restriction base = "timePoint">
>        <xs:simpleType>
>          <xs:restriction base = "xs:integer"></xs:restriction>
>        </xs:simpleType>
>      </xs:restriction>
>    </xs:simpleContent>
>  </xs:complexType>

*>  <xsd:complexType name="timePoint" abstract="true">
>   <xsd:attribute name="closed" use="required" type="xsd:boolean"/>
>  </xsd:complexType>*

I don't think your "integerTimePoint" complexType is workable.
Because in your definition, the simpleContent of "integerTimePoint" is 
restricted to type "timePoint", but the type "timePoint" in Koen's 
definition is a complexType and it take a default complexContent as 
its content.
(a complex type defined without any |simpleContent| or |complexContent|
is interpreted as shorthand for complex content that restricts |anyType|

In other words, this simpleContent is restricted to a complexType and the 
complexType has a coplexContent, is this valid ?

Kind regards,
(I'm a beginner to xml schema, pardon me for my errors! Thanks!)

Received on Friday, 17 October 2003 02:18:12 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:03 UTC