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

RE: complexContent w/ choice minOccurs=0

From: Mark Feblowitz <mfeblowitz@frictionless.com>
Date: Fri, 17 May 2002 21:43:40 -0400
Message-ID: <4DBDB4044ABED31183C000508BA0E97F040ABB7C@fcpostal.frictionless.com>
To: "'Jeni Tennison'" <jeni@jenitennison.com>
Cc: Tom Moog <tmoog@sarvega.com>, xmlschema-dev@w3.org
But if a choice has a minOccurs="0", that would be ok, right?

Mark

-----Original Message-----
From: Jeni Tennison [mailto:jeni@jenitennison.com]
Sent: Friday, May 17, 2002 12:43 PM
To: Mark Feblowitz
Cc: Tom Moog; xmlschema-dev@w3.org
Subject: Re: complexContent w/ choice minOccurs=0


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.
  
Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/
Received on Friday, 17 May 2002 21:45:16 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:56 UTC