RE: extension of an abstract complexType

Hooven,

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
content.

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"/>
</xsd:complexType>


Kind regards,
Harald

-----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



Hello,Harald

>  <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|
<http://www.w3.org/TR/xmlschema-0/#emptyContent>
is interpreted as shorthand for complex content that restricts |anyType|
<http://www.w3.org/TR/xmlschema-0/#emptyContent>)

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


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

**

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