Re: [Fwd: Defining an empty content type]

Ian Stokes-Rees <ian@decisionsoft.com> writes:

> I have a set of elements which I want to define with content="empty",
> for a document where the simple presence of an element contains the
> relevant information.  e.g.:
> 
> <tally>
> <y/>
> <a/>
> <c/>
> <a/>
> <x/>
> <y/>
> </tally>
> 
> The XSD for this is as follows:
> 
> <complexType name="emptyElement" content="empty"/>
> 
> <element name="tally">
> 	<element name="a" minOccurs="0" maxOccurs="unbounded"
> type="emptyElement"/>
> 	...
> 	<element name="z" minOccurs="0" maxOccurs="unbounded"
> type="emptyElement"/>
> </element>
> 
> Is it really the case that elements "a" to "z" are complex types?  I
> think this is revealing the problem with the naming convention of
> "simple" and "complex".  Surely my "emptyElement" type above should be
> classed as "trivialType" rather than "complexType".

It's in the general category 'complex', rather than 'simple', because
it can be extended to have attributes.

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 Tuesday, 5 September 2000 11:11:56 UTC