W3C home > Mailing lists > Public > xmlschema-dev@w3.org > June 2007

xs:choice question

From: Markus Gamperl <markus.gamperl@gmx.at>
Date: Wed, 27 Jun 2007 21:21:31 +0200
Message-ID: <20070627192131.58520@gmx.net>
To: xmlschema-dev@w3.org


I have the following xml fragment example:

 <a>a test</a>
 <b>b test</a>

the schema should check the following rules (three options):
- element a must exist, b may not
- element b must exist, a may not
- element a and b must exist

Therefor I have defined the following choice:
 <xs:element name="a" type="xs:string"/>
 <xs:element name="b" type="xs:string"/>
   <xs:element name="a" type="xs:string"/>
   <xs:element name="b" type="xs:string"/>

The xml editor raises an error - something about non determenistic declaration...

Do you have a suggestion how to define these three rules?

Thanks for your help!
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger
Received on Wednesday, 27 June 2007 19:21:46 UTC

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