W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2001

Re: Deriving various simpleContent and complexContent types from the same base?

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 21 Feb 2001 16:04:21 +0000
To: Simon Cox <Simon.Cox@dem.csiro.au>
Cc: xmlschema-dev@w3.org
Message-ID: <f5by9v0aupm.fsf@cogsci.ed.ac.uk>
Simon Cox <Simon.Cox@dem.csiro.au> writes:

> 1.  I want to define an abstract element <_Observation>, 
> whose substitutionGroup includes elements such as 
>   <Quantity> which has simple content of type xsd:double
>   <Value> with simple content of type xsd:string
>   <Count> with simple content of type xsd:nonNegativeInteger
> e.g. Can I define an abstract base type with no content 
> (complexType?), or of "anyType" (can this be a simpleType?), 
> and then "restrict" the base to the various simpleTypes?


> 2.  Can I also derive e.g. <TwoQuantity> with complex content 
> - a sequence of <Quantity> elements -  
> by extension from the same base <_Observation> type?

Yes, but by restriction is probably what you want.

> e.g. Is it possible to extend a simpleType by inserting 
> elements as a content model?

No, you can't do _that_.

  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 Wednesday, 21 February 2001 11:04:24 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:51 UTC