W3C home > Mailing lists > Public > xmlschema-dev@w3.org > June 2011

Re: What is this simpleType's "base" type?

From: Denis Zawada <deno@deno.pl>
Date: Sat, 18 Jun 2011 14:50:00 +0200
To: xmlschema-dev@w3.org
Message-Id: <201106181450.00970.deno@deno.pl>
On Saturday 18 of June 2011 13:35:59 Costello, Roger L. wrote:
> Hi Folks,
> Perhaps "parent" simpleType is the appropriate term?
> In my LotteryNumbers example, would it be appropriate to say that the
> OneToNintyNine simpleType is the "parent" simpleType of LotteryNumbers?
> /Roger

OneToNinetyNine restricts http://www.w3.org/2001/XMLSchema#positiveInteger

LotteryNumbers = List<OneToNinetyNine>


  LotteryNumbers = List<OneToNinetyNine>
    LotteryNumbers (anonymous restriction)

LotteryNumbers is a restriction for a container, but the container itself does 
not subclass its items.

To illustrate, lets define each step explicitly:

<xs:simpleType name="LotteryNumbers">
    <xs:list itemType="OneToNinetyNine"/>

<xs:simpleType name="LuckyLotteryNumbers">
  <xs:restriction base="LotteryNumbers">
    <xs:length value="6" />

Then you can clearly see that the inheritance chain is as follows:

  LotteryNumbers = List<OneToNinetyNine>

This has also practical implications. For example in LuckyLotteryNumbers 
restriction you only can restrict properties that you inherit from a ‘list’, 
however you can't redefine any properties that are inherent to 

Hope this helps,
Denis Zawada
Received on Sunday, 19 June 2011 00:11:21 UTC

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