- From: <bugzilla@jessica.w3.org>
- Date: Wed, 30 May 2012 21:49:40 +0000
- To: www-xml-schema-comments@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=17140 --- Comment #1 from C. M. Sperberg-McQueen <cmsmcq@blackmesatech.com> 2012-05-30 21:49:39 UTC --- 0 should be legal as the value of maxOccurs in a schema document, but if I understand the XML mapping rules of the spec correctly, an XML construct with maxOccurs = 0 should not turn into any schema component at all. In 3.3.2, for example, a propos of element elements, the final bullet item in a list of pointers to mapping rules says "If the <element> element information item has minOccurs=maxOccurs=0, then it maps to no component at all." 3.7.2 makes the same point for group elements: "Otherwise, the <group> has minOccurs=maxOccurs=0, in which case it maps to no component at all." 3.8.2 applies the same principle to all, choice, and sequence elements: "Each of the above items corresponds to a particle containing a model group, with properties as follows (unless minOccurs=maxOccurs=0, in which case the item corresponds to no component at all):" And 3.10.2 gives the same rule for wildcards: "An <any> information item corresponds both to a wildcard component and to a particle containing that wildcard (unless minOccurs=maxOccurs=0, in which case the item corresponds to no component at all)." I think that's all the elements that are allowed to carry maxOccurs attributes. Allowing maxOccurs="0" on XML representations of particles makes sense in the context of the original design of restriction in XSD 1.0, as a way of preserving a structural isomorphism between the XML description of the base type and the XML description of the restriction. -- Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
Received on Wednesday, 30 May 2012 21:49:42 UTC