W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2002

Correct rules for ComplexType extension

From: Kevin Burges <xmldude@burieddreams.com>
Date: Fri, 4 Jan 2002 11:32:50 +0000
Message-ID: <9511089457.20020104113250@burieddreams.com>
To: xmlschema-dev@w3.org

I have a Schema which validates in XSV and XMLSpy, but thich fails to
load into an MSXML SchemaCache object, giving an error of:

    "file:///C:/Development/Test/Test.xsd#/schema[1]/complexType[position()
     = 2 and @name = 'OutlineEntry']/all[1]
     <all> is not the only particle in a <group> or being used as an
     extension."

I have had a good look at things and the only thing I can come up with
is to ask if having an <xs:all> group in a base type and extending
it with a second <xs:all> group in a derived type is perhaps
illegal? (if so, XSV & XMLSpy should fail)

I've tried reading the specs for this, but it's not ecactly easy going
and I haven't cone up with an answer.


Here are simplified definitions of the types:

  <xs:complexType name="OutlineEntry" abstract="true">
    <xs:annotation>
      <xs:documentation>Base Type definition for an Outilne Entry</xs:documentation>
    </xs:annotation>
    <xs:all>
      <xs:element name="Label">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="1"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:all>
  </xs:complexType>

  <xs:complexType name="DerivedOutlineEntry">
    <xs:annotation>
      <xs:documentation>Derived Type definition</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="OutlineEntry">
        <xs:all>
          <xs:element name="Link">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:minLength value="1"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:element>
        </xs:all>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  

-- 
May the flares be with you,
 Kevin                    mailto:xmldude@burieddreams.com

++++++++++++ Cool music - http://burieddreams.com/marshan
++++++ Attitude Webzine - http://burieddreams.com/attitude
Received on Friday, 4 January 2002 06:39:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:26 GMT