<!--Some parts of this schema have been adapted from WSDL XML Schema-->

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:castor="http://www.castor.org/tests/RegressionTestSuite/schema/derivation"
        targetNamespace="http://www.castor.org/tests/RegressionTestSuite/schema/derivation"
        elementFormDefault="qualified">
        
<xsd:element name="documentation">
   <xsd:complexType mixed="true">
       <xsd:sequence>
           <xsd:element name="title" type="xsd:string"/>
           <xsd:element name="body" type="xsd:string"/>
       </xsd:sequence>
   </xsd:complexType>
</xsd:element>
   
   
<xsd:complexType name="documented" abstract="true">
    <xsd:sequence>
        <xsd:element ref="castor:documentation" minOccurs="0"/>
     </xsd:sequence>
</xsd:complexType>

<xsd:complexType name="definitionsType">
   <xsd:complexContent>
     <xsd:extension base="castor:documented">
        <xsd:sequence>
            <xsd:element name="import" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
            <xsd:element name="types" type="xsd:int" minOccurs="0"/>
       </xsd:sequence>
       <xsd:attribute name="targetNamespace" type="xsd:anyURI"/>
       <xsd:attribute name="name" type="xsd:NMTOKEN"/>
    </xsd:extension>
  </xsd:complexContent>
</xsd:complexType>

<xsd:complexType name="restrictDefinitionType">
   <xsd:complexContent>
     <xsd:restriction base="castor:definitionsType">
        <xsd:sequence>
            <xsd:element name="import" type="xsd:string"/>
            <xsd:element name="types" type="xsd:int"/>
       </xsd:sequence>
    </xsd:restriction>
  </xsd:complexContent>
</xsd:complexType>

<xsd:element name="definition" type="castor:definitionsType"/>

</xsd:schema>
