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

Re: The minimum valid anonymous complex type declaration

From: Jeni Tennison <jeni@jenitennison.com>
Date: Wed, 5 Dec 2001 21:47:40 +0000
Message-ID: <167113493965.20011205214740@jenitennison.com>
To: Stanley Guan <Stanley.Guan@oracle.com>
CC: Schema XML <xmlschema-dev@w3.org>
Hi Stanley,

> What's the minimum valid anonymous complex type declaration embedded
> in a valid element declaration?
> Is it like this:
>      <xs:element name="name1">
>          <xs:complexType/>
>      </xs:element>


> and what does it mean?

It means that the element is empty, with no attributes. An
xs:complexType element with no xs:complexContent or xs:simpleContent
child is equivalent to:

      <xs:restriction base="xs:anyType" />

Restrictions with no content don't allow any element children. There's
no mixed attribute, so no text content is allowed either. Since no
attributes are declared or referenced, the element can't take any


Jeni Tennison
Received on Wednesday, 5 December 2001 17:03:14 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:56 UTC