- From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
- Date: 12 Dec 2000 11:35:25 +0000
- To: "Jason Diamond" <jason@injektilo.org>
- Cc: "Martin Gudgin" <marting@develop.com>, <xmlschema-dev@w3.org>
"Jason Diamond" <jason@injektilo.org> writes:
> 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.
How do you read this as violating the constraint? The first term of
the disjunction is satisfied (memberTypes is non-empty) and so is the
second (there is at least one simpleType child). I guess you were
reading this as an exclusive 'or' -- I'll edit the spec. to clarify
that it's inclusive.
> 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>
Good catch, we'll get it fixed.
> 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"?
Neither general entities nor XInclude have the right property, namely
include _and_ quote :-(
ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
W3C Fellow 1999--2001, part-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
Received on Tuesday, 12 December 2000 06:35:35 UTC