What is wrong with this schema? Using xjc.bat, I get the following error message? When I comment out the "<xs:group ref="group"/>" line, xjc.bat works.
[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.
line 7 of sample.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="namespace" xmlns="namespace" xmlns:xs="
http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="complex">
<xs:complexType>
<xs:sequence>
<xs:element name="x" type="xs:string"/>
<xs:group ref="group"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:group name="group">
<xs:all>
<xs:element ref="a"/>
<xs:element ref="b"/>
<xs:element ref="c"/>
</xs:all>
</xs:group>
<xs:element name="a" type="xs:string"/>
<xs:element name="b" type="xs:string"/>
<xs:element name="c" type="xs:string"/>
</xs:schema>