W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2002

Re: complexContent w/ choice minOccurs=0

From: Jeni Tennison <jeni@jenitennison.com>
Date: Fri, 17 May 2002 17:42:42 +0100
Message-ID: <28104674113.20020517174242@jenitennison.com>
To: Mark Feblowitz <mfeblowitz@frictionless.com>
CC: Tom Moog <tmoog@sarvega.com>, xmlschema-dev@w3.org
Hi Mark,

> Would the same be the case for sequences? 

You mean is a sequence with no content and a minOccurs of more than 1
unsatisfiable? No. Sequences and all groups are different from
choices. The section that I quoted actually goes on to address
sequences and all groups specifically:

 "Nothing in the above should be understood as ruling out groups
  whose {particles} is empty: although no sequence can be ·valid· with
  respect to such a group whose {compositor} is choice, the empty
  sequence is ·valid· with respect to empty groups whose {compositor}
  is sequence or all."

(Note that in the above most of the references to "sequence" are
talking about the sequence of elements in the content of the instance
document, not sequence groups in the schema.)
The difference between sequences and choices is that for sequences the
rule is:

  All the particles in the sequence must be present in the instance,
  in the order specified.

such that if there aren't any particles in the sequence, that's fine,
whereas for choices the rule is:

  One of the particles in the choice must be present in the instance.

such that if there aren't any particles in the choice, then this can't
be satisfied.


Jeni Tennison
Received on Friday, 17 May 2002 12:42:47 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:02 UTC