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

empty complexTypes.

From: Jason Diamond <jason@injektilo.org>
Date: Tue, 12 Dec 2000 15:20:26 -0800
To: <xmlschema-dev@w3.org>
Message-ID: <LAEMKGDBDFAKFNKPFEKLIEEKCPAA.jason@injektilo.org>

4.3.3 of the Structures CR says:

"Careful consideration of the above concrete syntax reveals that a type
definition need consist of no more than a name, i.e. that <complexType
name="anyThing"/> is allowed. The result is however not of much use, as it
will have empty {content type} and no allowed attributes."

My careful consideration of the syntax revealed something different, though.

"Content: (annotation? , (simpleContent | complexContent | ((group | all |
choice | sequence)? , ((attribute | attributeGroup)* , anyAttribute?))))"

This looks like there has to be a simpleContent, complexContent, or one of
the particles followed by some attribute declarations.

The complexTypeModel complexType in the Schema for Schemas shows this:

 <group name="complexTypeModel">
      <element ref="simpleContent"/>
      <element ref="complexContent"/>
        <documentation xml:lang="en">
   This branch is short for
   &lt;restriction base="anyType">
       <group ref="typeDefParticle" minOccurs="0"/>
       <group ref="attrDecls"/>

The minOccurs on the choice, element refs, and sequence default to 1, don't

Lastly, the DTD for Schemas shows this:

<!ELEMENT %complexType; ((%annotation;)?,

Am I reading these correctly? Since an empty complexType is essentially
worthless, I don't see any value in allowing it. Was it removed from the
schemas but accidentally left in the text?

Received on Tuesday, 12 December 2000 18:24:11 UTC

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