W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > April to June 2001

Re: Extension of Simple Types

From: Michael Zoratti <m.zoratti@nortelnetworks.com>
Date: Thu, 5 Apr 2001 15:52:08 -0400
Message-ID: <CEDFCAE711ADD4118B030008C7E674A41CA51D@nbrwd469.ca.nortel.com>
To: "'ht@cogsci.ed.ac.uk'" <ht@cogsci.ed.ac.uk>
Cc: "'www-xml-schema-comments@w3.org'" <www-xml-schema-comments@w3.org>

 I appreciate you response.  

The definition in the Schema Primer (October 2000) states that 
"Elements in a substitution group must have the same type as the head
or they can have a type that has been derived from the head element's type"

Now I understand that the simpleTypes I define OrderState and 
NewOrderState (in the example in my document) are two separate types.
But they are two simpleTypes both based on strings. The fact that they are
based on strings, can this be a loose example of the definition above.
On a minor note, my schemas do validate using XML SPY 3.5, but then
that could be an oversight by XMLSpy. Bottom line if it violates the
then it should be correct.  Based on my above statements, does it violate

If it violates the Specification, then I could also do something like this:

<element name="BaseState" type="string"/>

<element name="State" type="sa:OrderState"
<element name="NewState" type="sa:NewOrderState"

<simpleType name="OrderState">
   <restriction base="string">
      <enumeration value="open"/>

<simpleType name="NewOrderState">
   <restriction base="string">
       <enumeration value="open"/>
       <enumeration value="closed"/>

Thanks again for your response

Mike Zoratti
Software Architect
Nortel Networks
Received on Thursday, 5 April 2001 15:53:34 UTC

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