W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > October to December 2001

question about content type EMPTY

From: <lmartin@ca.ibm.com>
Date: Mon, 15 Oct 2001 17:06:34 -0400
To: www-xml-schema-comments@w3.org
Message-ID: <OF9F24687C.B817BE9A-ON85256AE6.006F0B9E@torolab.ibm.com>
If a complexType does not have a simpleContent or complexContent child,
then the case is considered a short-hand for complexContent restricting the
"ur-type".   Given this, the following are the rules for determining
{content type} in such a case:

   1 If the restriction alternative is chosen  ...
     1.1 If one of the following is true
        1.1.1 There is no <group>, <all>, <choice> or <sequence> among the
        1.1.2 There is an <all> or <sequence> among the [children] with no
        [children] of its own excluding <annotation>
        1.1.3 There is a <choice> among the [children] with no [children]
        of its own excluding <annotation> whose minOccurs [attribute] has
        the actual value 0
     then, empty

     1.2 otherwise ...

So, the following complexType

   <complexType name="foo">

has content type "empty".

What about the following type?   Is its content type "elementOnly"?

   <complexType name="bar">

And, how about the following, where there is a "child" of the sequence that
doesn't actually result in any component?

   <complexType name="bob">
        <element name="a" minOccurs="0" maxOccurs="0"/>

I'm trying to determine what should be included as the {content type}
property in the PSVI information for the resulting complexType components.

Received on Monday, 15 October 2001 17:06:49 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:49:57 UTC