- From: Martin Gudgin <marting@develop.com>
- Date: Sun, 10 Dec 2000 22:03:50 -0800
- To: "Jason Diamond" <jason@injektilo.org>, <xmlschema-dev@w3.org>
- Cc: "Biron,Paul V" <Paul.V.Biron@kp.org>
----- Original Message ----- From: "Jason Diamond" <jason@injektilo.org> To: "Martin Gudgin" <marting@develop.com>; <xmlschema-dev@w3.org> Sent: Sunday, December 10, 2000 8:39 PM Subject: RE: restrictions with nested simpleTypes. > 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. [MJG] I don't see this as being a violation. The spec does *not* say 'if memberTypes is non-empty there cannot be a simpleType child'. It merely says that if memberTypes is empty there MUST be at least one simpleType child. Does this make sense? > > Curiously, Section 2.5.1.3 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"> > <simpleType> > <union> > <simpleType> > <restriction base='nonNegativeInteger'/> > </simpleType> > <simpleType> > <restriction base='string'> > <enumeration value='unbounded'/> > </restriction> > </simpleType> > </union> > </simpleType> > </attribute> > </attributeGroup> > > 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 > "build"? > > Shame on you guys. :-) [MJG] Hmm, not sure why there is the discrepancy. Paul? Gudge
Received on Monday, 11 December 2000 01:05:20 UTC