- From: David Wright <dawright@microsoft.com>
- Date: Thu, 06 Mar 2003 11:33:25 -0700
- To: W3C XML Schema Comments list <www-xml-schema-comments@w3.org>
- Message-Id: <5.1.0.14.1.20030306113320.0243b930@localhost>
This is a request for the next version of XML-Schema. Please allow a way to specify that an element may have various numbers of child elements in any order. For example: <A> must contain& 0 or 1 <a/> s exactly 1 <b/> any number of <c/> s &in any order (I have learned that it is actually possible to do this by implementing a decision tree using <xsd:choice> and <xsd:sequence>, and for this toy problem that isn t too bad. In my real-world scenario, though, I have 11 child elements.) I realize that, if one changes the schema so that <c/> s are contained within a <C> element and makes the <C> element a child of <A>, one can do this using <xsd:all>. Not all of us attempting to validate documents using XML-Schema, though, have the possibility of changing to schema used. We need to be able to express a rule that existed in someone s else s head, to whom it never occurred that the rule might some day need to be expressed in XML-Schema. It may make implementations easier to require that like child elements occur together, e.g. that <A><b/><c/><c/></A> is allowed, but <A><c/><b/><c/></A> isn t. This would still be a great improvement. A simple way to do this simple, at least, at the spec level -- is to relax the condition that, for child elements of <xsd:all>, minOccurs and maxOccurs can only be 0 or 1.
Received on Thursday, 6 March 2003 13:34:56 UTC