This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
In a number of places in the spec, lists of constraints are introduced with phrases like "the appropriate case among the following is [or, in some cases, "must be"] true: ..." Usually, the items in the list are conditionals: if X, then Y. Until just now, I thought that that meant "At most one of the following items is expected to apply; that one expresses a constraint that must be satisfied" and could be implemented by looking at each list item in turn and ending the search when one was found where the condition holds and the constraint in the then-clause was satisfied. But clause 1 of Validation Rule: Element Locally Valid (Complex Type) says: 1 If clause 3.2 of Element Locally Valid (Element) (§3.3.4) did not apply [that is, if the element is not null] , then the appropriate case among the following is true: 1.1 If the {content type} has {variety} empty, then the element information item has no character or element information item [children]. 1.2 If the {content type} has {variety} simple, then the element information item has no element information item [children], and the ·normalized value· of the element information item is ·valid· with respect to the {content type}'s {simple type definition} as defined by String Valid (§3.15.4). 1.3 If the {content type} has {variety} element-only, then the element information item has no character information item [children] other than those whose [character code] is defined as a white space in [XML 1.1]. ... 1.4 If the {content type} has {variety} element-only or mixed, then the sequence of the element information item's element information item [children], if any, taken in order, is ·valid· with respect to the {content type}, as defined in Element Sequence Locally Valid (Complex Content) (§3.4.4). In this case, the 'exit after the first applicable item that is satified' strategy gives the wrong answer, because an element with element-only content satisifes 1.3 and the quick-exit strategy fails to check clause 1.4. The 'appropriate case' wording should be eliminated here and in any other occurrences where more than one of the subclauses may apply. It may be simpler just to replace all occurrences of this wording with the words "all of the following are / must be true", when the subclauses are conditionals. A conditional "if X then Y" is satisfied when X is false.
(In reply to comment #0) > In a number of places in the spec, lists of constraints are introduced with > phrases like "the appropriate case among the following is [or, in some > cases, "must be"] true: ..." Usually, the items in the list are conditionals: > if X, then Y. > > Until just now, I thought that that meant "At most one of the following > items is expected to apply; that one expresses a constraint that must > be satisfied" and could be implemented by looking at each list item in > turn and ending the search when one was found where the condition holds > and the constraint in the then-clause was satisfied. I for one think that this should be the intent of that wording, and if a particular instance has more than one case true under the same circumstances it is an error in the spec in need of correction.
A wording proposal including changes relevant to this issue (among other things) went to the WG 4 Feb 2008: http://www.w3.org/XML/Group/2004/06/xmlschema-1/structures.consent.200802.html (member-only link). Accordingly, I'm changing the status keyword.
During its telcon today, the XML Schema WG accepted the 'Structures Omnibus 2' proposal, which includes changes intended to resolve this issue. (Or, for some issues, contains the editors' proposal that the issue should be closed without further changes.) http://www.w3.org/XML/Group/2004/06/xmlschema-1/structures.consent.200801.html (member-only link) Accordingly, I'm marking the issue resolved. The originator of this issue (or in some cases the individual, acting on behalf of a group, who filed the comment) should receive an email notification of this change. Please examine the changes and let us know if you agree with this resolution of your issue, by adding a comment to the issue record and changing the Status of the issue to Closed. Or, if you do not agree with this resolution, please add a comment explaining why. If you wish to appeal the WG's decision to the Director, then also change the Status of the record to Reopened. If you wish to record your dissent, but do not wish to appeal the decision to the Director, then change the Status of the record to Closed. If we do not hear from you in the next two weeks, we will assume you agree with the WG decision.