[Bug 4368] Editorial: what does "the appropriate case ... is true" mean?

http://www.w3.org/Bugs/Public/show_bug.cgi?id=4368

           Summary: Editorial: what does "the appropriate case ... is true"
                    mean?
           Product: XML Schema
           Version: 1.1 only
          Platform: Macintosh
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Structures: XSD Part 1
        AssignedTo: cmsmcq@w3.org
        ReportedBy: cmsmcq@w3.org
         QAContact: www-xml-schema-comments@w3.org


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.

Received on Tuesday, 6 March 2007 03:01:07 UTC