Re: Extension of Simple Types

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

Yes.

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

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