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
        [children];
        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">
     <sequence>
     </sequence>
   </complexType>

has content type "empty".

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

   <complexType name="bar">
     <sequence>
        <sequence>
        </sequence>
     </sequence>
   </complexType>

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

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


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

Thx,
Lisa.
Received on Monday, 15 October 2001 17:06:49 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:57 GMT