choice between groups in xsd [message #780102] |
Tue, 17 January 2012 07:25 |
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.
|
|
|
Powered by
FUDForum. Page generated in 0.02551 seconds