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

Re: Extension of Simple Types

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 06 Apr 2001 10:10:23 +0100
To: "Michael Zoratti" <m.zoratti@nortelnetworks.com>
Cc: "'www-xml-schema-comments@w3.org'" <www-xml-schema-comments@w3.org>
Message-ID: <f5b7l0yqtq8.fsf@cogsci.ed.ac.uk>
"Michael Zoratti" <m.zoratti@nortelnetworks.com> writes:

>  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 element,
> 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
> both
> based on strings, can this be a loose example of the definition above.

No, sorry.

> 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
> Specification, then it should be incorrect.  Based on my above
> statements, does it violate the Specification.


> If it violates the Specification, then I could also do something like this:
> <element name="BaseState" type="string"/>
> <element name="State" type="sa:OrderState" substitutionGroup="sa:BaseState"/>
> <element name="NewState" type="sa:NewOrderState"
> substitutionGroup="sa:BaseState"/>

Yes, that will work.

  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
Received on Friday, 6 April 2001 05:10:22 UTC

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