W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2001

Re: rollback, underministic, unique?

From: Jeni Tennison <jeni@jenitennison.com>
Date: Sat, 8 Dec 2001 10:17:22 +0000
Message-ID: <11283506295.20011208101722@jenitennison.com>
To: Stanley Guan <Stanley.Guan@oracle.com>
CC: Schema XML <xmlschema-dev@w3.org>
Hi Stanley,

> Is the following "choice" group valid?

No.

> Does it violate "Unique Particle Attribution" constraint (3.8.6)?

Yes. When the validator comes across an 'a' element, it can't tell
whether the 'a' element should be validated against the one from the
first sequence, the second sequence or the third sequence in the
choice.

Of course it's easy to make it into one that *is* valid:

  <xs:sequence>
    <xs:element ref="my:a" />
    <xs:element ref="my:b" />
    <xs:choice>
      <xs:element ref="my:c" />
      <xs:element ref="my:d" />
      <xs:element ref="my:e" />
    </xs:choice>
  </xs:sequence>

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/
Received on Saturday, 8 December 2001 05:17:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:25 GMT