[xml] "all" group limitation in schema?




Hi,

I have a simple schema file called x.xsd (see below), but
xmlSchemaParse() returns following error for it. Is it true that "all"
cann't be contained by model groups?

This same file passes other 3rd party validators.

Thanks,
Yong Chen


Error:

./x.xsd:10: element group: Schemas parser error : Element
'{http://www.w3.org/2001/XMLSchema}group': A model group definition is
referenced, but it contains an 'all' model group, which cannot be
contained by model groups.




Schema file is x.xsd as following:


<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
           xmlns="http://www.my.com";
           targetNamespace="http://www.my.com";
           elementFormDefault="qualified">

  <xs:element name="configure">
    <xs:complexType>
     <xs:sequence>
       <xs:group ref="group_1" minOccurs="0" maxOccurs="1"/>
     </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:group name="group_1">
    <xs:all>
      <xs:element name="aaa" minOccurs="0" type="xs:string"/>
      <xs:element name="bbb" minOccurs="0" type="xs:string"/>
    </xs:all>
  </xs:group>
</xs:schema>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]