<?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/call.xsd"/>
    <xs:include schemaLocation="core/call-template.xsd"/>
    <xs:include schemaLocation="core/drop.xsd"/>
    <xs:include schemaLocation="core/log.xsd"/>
    <xs:include schemaLocation="core/loopback.xsd"/>
    <xs:include schemaLocation="core/property.xsd"/>
    <xs:include schemaLocation="core/respond.xsd"/>
    <xs:include schemaLocation="core/send.xsd"/>
    <xs:include schemaLocation="core/store.xsd"/>
    <xs:include schemaLocation="filter/cond_router.xsd"/>
    <xs:include schemaLocation="filter/filter.xsd"/>
    <xs:include schemaLocation="filter/switch.xsd"/>
    <xs:include schemaLocation="core/validate.xsd"/>
    <xs:include schemaLocation="extension/bean.xsd"/>
    <xs:include schemaLocation="extension/class.xsd"/>
    <xs:include schemaLocation="extension/command.xsd"/>
    <xs:include schemaLocation="extension/ejb.xsd"/>
    <xs:include schemaLocation="extension/script.xsd"/>
    <xs:include schemaLocation="extension/spring.xsd"/>
    <xs:include schemaLocation="transformation/enrich.xsd"/>
    <xs:include schemaLocation="transformation/fault.xsd"/>
    <xs:include schemaLocation="core/header.xsd"/>
    <xs:include schemaLocation="transformation/payload.xsd"/>
    <xs:include schemaLocation="transformation/smooks.xsd"/>
    <xs:include schemaLocation="transformation/rewrite.xsd"/>
    <xs:include schemaLocation="transformation/xquery.xsd"/>
    <xs:include schemaLocation="transformation/xslt.xsd"/>
    <xs:include schemaLocation="transformation/datamapper.xsd"/>
    <xs:include schemaLocation="transformation/fastXSLT.xsd"/>
    <xs:include schemaLocation="advanced/cache.xsd"/>
    <xs:include schemaLocation="advanced/db_mediators.xsd"/>
    <xs:include schemaLocation="advanced/enqueue.xsd"/>
    <xs:include schemaLocation="advanced/event.xsd"/>
    <xs:include schemaLocation="filter/throttle.xsd"/>
    <xs:include schemaLocation="advanced/transaction.xsd"/>
    <xs:include schemaLocation="eip/aggregate.xsd"/>
    <xs:include schemaLocation="core/callout.xsd"/>
    <xs:include schemaLocation="advanced/clone.xsd"/>
    <xs:include schemaLocation="eip/iterate.xsd"/>
    <xs:include schemaLocation="eip/foreach.xsd"/>
    <xs:include schemaLocation="other/entitlement.xsd"/>
    <xs:include schemaLocation="other/oauth.xsd"/>
    <xs:include schemaLocation="other/builder.xsd"/>
    <xs:include schemaLocation="other/rule.xsd"/>
    <xs:include schemaLocation="other/bam.xsd"/>
    <xs:include schemaLocation="other/publishEvent.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 ref="call"/>
            <xs:element ref="call-template"/>
            <xs:element ref="drop"/>
            <xs:element ref="log"/>
            <xs:element ref="loopback"/>
            <xs:element ref="property"/>
            <xs:element ref="respond"/>
            <xs:element ref="send"/>
            <xs:element name="sequence">
                <xs:annotation>
                    <xs:documentation source="description">
                        Sequence mediator of the synapse configuration
                    </xs:documentation>
                </xs:annotation>
                <xs:complexType>
                    <xs:attribute name="key" type="xs:string" use="required"/>
                </xs:complexType>
            </xs:element>
            <xs:element ref="store"/>
            <xs:element ref="conditionalRouter"/>
            <xs:element ref="filter"/>
            <xs:element ref="switch"/>
            <xs:element ref="validate"/>
            <xs:element ref="bean"/>
            <xs:element ref="class"/>
            <xs:element ref="pojoCommand"/>
            <xs:element ref="ejb"/>
            <xs:element ref="script"/>
            <xs:element ref="spring"/>
            <xs:element ref="enrich"/>
            <xs:element ref="makefault"/>
            <xs:element ref="header"/>
            <xs:element ref="payloadFactory"/>
            <xs:element ref="smooks"/>
            <xs:element ref="rewrite"/>
            <xs:element ref="xquery"/>
            <xs:element ref="xslt"/>
            <xs:element ref="datamapper"/>
            <xs:element ref="fastXSLT"/>
            <xs:element ref="cache"/>
            <xs:element ref="dblookup"/>
            <xs:element ref="dbreport"/>
            <xs:element ref="enqueue"/>
            <xs:element ref="event"/>
            <xs:element ref="throttle"/>
            <xs:element ref="transaction"/>
            <xs:element ref="aggregate"/>
            <xs:element ref="callout"/>
            <xs:element ref="clone"/>
            <xs:element ref="iterate"/>
            <xs:element ref="foreach"/>
            <xs:element ref="entitlementService"/>
            <xs:element ref="oauthService"/>
            <xs:element ref="builder"/>
            <xs:element ref="rule"/>
            <xs:element ref="bam"/>
            <xs:element ref="publishEvent"/>
        </xs:choice>
    </xs:group>

</xs:schema>
