Skip to main content


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 07:25
Vaibhav Bansal is currently offline Vaibhav BansalFriend
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: Sat Apr 20 01:44:56 GMT 2024

Powered by FUDForum. Page generated in 0.02825 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top