<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
  ~  Licensed to the Apache Software Foundation (ASF) under one
  ~  or more contributor license agreements.  See the NOTICE file
  ~  distributed with this work for additional information
  ~  regarding copyright ownership.  The ASF licenses this file
  ~  to you under the Apache License, Version 2.0 (the
  ~  "License"); you may not use this file except in compliance
  ~  with the License.  You may obtain a copy of the License at
  ~
  ~   http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~  Unless required by applicable law or agreed to in writing,
  ~  software distributed under the License is distributed on an
  ~   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~  KIND, either express or implied.  See the License for the
  ~  specific language governing permissions and limitations
  ~  under the License.
  -->

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
           targetNamespace="http://ws.apache.org/ns/synapse"
           xmlns="http://ws.apache.org/ns/synapse">

    <xs:include schemaLocation="core/header.xsd"/>
    <xs:include schemaLocation="core/send.xsd"/>
    <xs:include schemaLocation="core/log.xsd"/>
    <xs:include schemaLocation="core/property.xsd"/>
    <xs:include schemaLocation="core/drop.xsd"/>
    <xs:include schemaLocation="core/validate.xsd"/>
    <xs:include schemaLocation="core/callout.xsd"/>
    <xs:include schemaLocation="filter/in.xsd"/>
    <xs:include schemaLocation="filter/out.xsd"/>
    <xs:include schemaLocation="filter/filter.xsd"/>
    <xs:include schemaLocation="filter/switch.xsd"/>
    <xs:include schemaLocation="filter/throttle.xsd"/>
    <xs:include schemaLocation="transformation/fault.xsd"/>
    <xs:include schemaLocation="transformation/xslt.xsd"/>
    <xs:include schemaLocation="transformation/xquery.xsd"/>
    <xs:include schemaLocation="transformation/rewrite.xsd"/>
    <xs:include schemaLocation="advanced/db_mediators.xsd"/>
    <xs:include schemaLocation="advanced/cache.xsd"/>
    <xs:include schemaLocation="advanced/event.xsd"/>
    <xs:include schemaLocation="advanced/enqueue.xsd"/>
    <xs:include schemaLocation="advanced/transaction.xsd"/>
    <xs:include schemaLocation="extension/script.xsd"/>
    <xs:include schemaLocation="extension/class.xsd"/>
    <xs:include schemaLocation="extension/spring.xsd"/>
    <xs:include schemaLocation="eip/iterate.xsd"/>
    <xs:include schemaLocation="eip/aggregate.xsd"/>

    <xs:group name="mediatorList">
        <xs:annotation>
            <xs:documentation source="description">
                This group denotes all the mediator elements that can come inside a sequence
            </xs:documentation>
        </xs:annotation>
        <xs:choice>
            <xs:element name="sequence">
                <xs:annotation>
                    <xs:documentation>
                        This represents the sequence references
                    </xs:documentation>
                </xs:annotation>
                <xs:complexType>
                    <xs:attribute name="key" type="xs:string" use="required"/>
                </xs:complexType>
            </xs:element>
            <xs:element ref="in"/>
            <xs:element ref="out"/>
            <xs:element ref="header"/>
            <xs:element ref="send"/>
            <xs:element ref="log"/>
            <xs:element ref="property"/>
            <xs:element ref="drop"/>
            <xs:element ref="validate"/>
            <xs:element ref="filter"/>
            <xs:element ref="switch"/>
            <xs:element ref="makefault"/>
            <xs:element ref="script"/>
            <xs:element ref="xslt"/>
            <xs:element ref="xquery"/>
            <xs:element ref="dblookup"/>
            <xs:element ref="dbreport"/>
            <xs:element ref="throttle"/>
            <xs:element ref="class"/>
            <xs:element ref="iterate"/>
            <xs:element ref="aggregate"/>
            <xs:element ref="cache"/>
            <xs:element ref="callout"/>
            <xs:element ref="rewrite"/>
            <xs:element ref="spring"/>
            <xs:element ref="eventPublisher"/>
            <xs:element ref="transaction"/>
            <xs:element ref="enqueue"/>
        </xs:choice>
    </xs:group>

</xs:schema>