Defining an empty content type

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

Perhaps this indicates a greater problem with the naming of "simple" and
"complex".  It is clear that the real distiction is between type that
can ONLY be applied to elements, and types which can be applied to
attributes and elements.  Here are some names which provide better
options:

elementOnlyType commonType -- clear distinction

basicType   advancedType  -- by definition basic can be used "anywhere"
(element and attribute), while "advanced" can only be used on elements.

eltOnlyType attrOnlyType  -- excludes the notion of assigning
attrOnlyType to an element

elementType attributeType -- lacks clarity that attributeTypes can be
assigned to elements

Regards,

Ian Stokes-Rees

-- 
ian.stokes-rees@decisionsoft.com          tel: +1865 203 192
DecisionSoft Ltd.                         fax: +1865 203 194
www.decisionsoft.com                      Oxford, UK, OX2 OEA

Received on Monday, 4 September 2000 11:36:22 UTC