[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Deriving various simpleContent and complexContent types

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>
simplecontent complexcontent
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?

Yes.

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

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

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.