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

RE: extension of an abstract complexType

From: hooven <huw@dragontec.com.cn>
Date: Fri, 17 Oct 2003 11:11:31 +0800
Message-ID: <3F8F5DE3.50403@dragontec.com.cn>
To: xmlschema-dev@w3.org


>  <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,
(I'm a beginner to xml schema, pardon me for my errors! Thanks!)

Received on Thursday, 16 October 2003 23:16:27 UTC

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