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:all>
<xs:element name="a" minOccurs="1" maxOccurs="1" />
<xs:element name="b" minOccurs="1" maxOccurs="1" />
</xs:all>
</xs:group>

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

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"/>
</xs:choice>
</xs:complexType>
</xs:element>

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: Sun Apr 20 09:36:21 EDT 2014

Powered by FUDForum. Page generated in 0.08039 seconds