Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » XSD » choice between groups in xsd(I have two group of elements and I want to perform a choice between these groups)
choice between groups in xsd [message #780102] Tue, 17 January 2012 02:25
Vaibhav Bansal is currently offline Vaibhav Bansal
Messages: 1
Registered: January 2012
Junior Member
I have two group of elements like :
<xs:group name="abc">
<xs:element name="a" minOccurs="1" maxOccurs="1" />
<xs:element name="b" minOccurs="1" maxOccurs="1" />

<xs:group name="xyz">
<xs:element name="c" minOccurs="1" maxOccurs="1" />
<xs:element name="d" minOccurs="1" maxOccurs="1" />

I want to have a choice between these two groups like:

<xs:element name="attachment">
<xs:complexType >
<xs:choice minOccurs="1" maxOccurs="1">
<xs:group ref="abc" />
<xs:group ref="xyz"/>

But, I am getting the following error
cos-all-limited.1.2: An 'all' model group must appear in a particle with '{'min occurs'}' = '{'max occurs'}' = 1, and that particle must be part of a pair which constitutes the '{'content type'}' of a complex type definition

Please if anybody has come across this error and can give some guidance.
Previous Topic:Load EMF from xml stream
Next Topic:Branching Schema
Goto Forum:

Current Time: Wed Aug 20 09:00:08 EDT 2014

Powered by FUDForum. Page generated in 0.01700 seconds