<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xsd:schema xmlns="http://www.mulesource.org/schema/mule/nest-example-extension/2.0"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:base="http://www.mulesource.org/schema/mule/nest-example-base/2.0"
            targetNamespace="http://www.mulesource.org/schema/mule/nest-example-extension/2.0"
            elementFormDefault="qualified"
            attributeFormDefault="unqualified">

    <xsd:import namespace="http://www.mulesource.org/schema/mule/nest-example-base/2.0"
                schemaLocation="http://www.mulesource.org/schema/mule/nest-example-base/2.0/nest-example-base.xsd"/>

    <xsd:element name="subclass" type="subclassType" substitutionGroup="base:abstract"/>

    <xsd:complexType name="subclassType">
        <xsd:complexContent>
            <xsd:extension base="base:abstractNestableType">
                <xsd:choice minOccurs="0">
                    <xsd:element name="random"/>
                </xsd:choice>
                <xsd:attribute name="another"/>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    
    <xsd:complexType name="typedSubclassType">
        <xsd:complexContent>
            <xsd:extension base="base:nestableType">
                <xsd:sequence minOccurs="0">
                    <xsd:element name="another"/>
                </xsd:sequence>
                <xsd:attribute name="more"/>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>


    <!-- separate example, sketches service implementation -->

    <xsd:element name="service" type="serviceType" substitutionGroup="base:abstract-service"/>
    <xsd:complexType name="serviceType">
        <xsd:complexContent>
            <xsd:extension base="base:abstractServiceType"/>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:element name="component" type="componentType" substitutionGroup="base:abstract-component"/>
    <xsd:complexType name="componentType">
        <xsd:complexContent>
            <xsd:extension base="base:abstractComponentType"/>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:element name="router" type="routerType" substitutionGroup="base:abstract-router"/>
    <xsd:complexType name="routerType">
        <xsd:complexContent>
            <xsd:extension base="base:abstractRouterType"/>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:element name="filter" type="filterType" substitutionGroup="base:abstract-filter"/>
    <xsd:complexType name="filterType">
        <xsd:complexContent>
            <xsd:extension base="base:abstractFilterType"/>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:element name="nesting-filter" type="nestingFilterType" substitutionGroup="base:abstract-filter"/>
    <xsd:complexType name="nestingFilterType">
        <xsd:complexContent>
            <xsd:extension base="base:abstractNestingFilterType"/>
        </xsd:complexContent>
    </xsd:complexType>

</xsd:schema>
