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

RE: restrictions with nested simpleTypes.

From: Jason Diamond <jason@injektilo.org>
Date: Sun, 10 Dec 2000 20:39:31 -0800
To: "Martin Gudgin" <marting@develop.com>, <xmlschema-dev@w3.org>
Message-ID: <LAEMKGDBDFAKFNKPFEKLGECCCPAA.jason@injektilo.org>
Thanks for piquing my interest in unions.

> <simpleType name="allNNI">
>   <annotation><documentation xml:lang="en">
>    for maxOccurs</documentation></annotation>
>   <union memberTypes="nonNegativeInteger">
>    <simpleType>
>     <restriction base="NMTOKEN">
>      <enumeration value="unbounded"/>
>     </restriction>
>    </simpleType>
>   </union>
>  </simpleType>

Section 5.1.3 of the Datatypes spec says, "Either the memberTypes
[attribute] must be non-empty or there must be at least one simpleType
[child]." The documentation for the union element in the datatypes schema
has a similar comment. Your example above (which I also found in the schema
for schemas) seems to be violating this constraint.

Curiously, Section of the Datatypes spec shows a different example
which it claims comes from the "XML Schema itself".

  <attributeGroup name="occurs">
    <attribute name="minOccurs"
      type="nonNegativeInteger" use="default" value="1"/>
    <attribute name="maxOccurs">
            <restriction base='nonNegativeInteger'/>
            <restriction base='string'>
              <enumeration value='unbounded'/>

This example looks correct according to my interpretation.

But I guess my real question is this: Why aren't the examples in the
datatypes spec and the actual declarations in the Schema for Schemas in
sync? Does this mean you're not using a cutting edge XInclude implementation
to suck in the examples from the schema into the spec every time you

Shame on you guys. :-)

Received on Sunday, 10 December 2000 23:43:15 UTC

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