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

    <xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
    <xsd:import namespace="http://www.mulesource.org/schema/mule/core/2.0" 
                schemaLocation="http://www.mulesource.org/schema/mule/core/2.0/mule.xsd" />

    <xsd:element name="connector" type="stdioConnectorType" substitutionGroup="mule:abstract-connector"/>

    <xsd:complexType name="stdioConnectorType">
        <xsd:complexContent>
            <xsd:extension base="mule:connectorType">
                <xsd:attribute name="messageDelayTime" type="mule:substitutableLong">
                    <xsd:annotation>
                        <xsd:documentation>
                            Delay (ms) before printing prompt to stdout.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:attribute>
                <xsd:attribute name="outputMessage" type="xsd:string">
                    <xsd:annotation>
                        <xsd:documentation>
                            Text printed to stdout when a message is sent.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:attribute>
                <xsd:attribute name="promptMessage" type="xsd:string">
                    <xsd:annotation>
                        <xsd:documentation>
                            Text printed to stdout when waiting for input.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:attribute>
                <xsd:attribute name="promptMessageCode" type="xsd:string">
                    <xsd:annotation>
                        <xsd:documentation>
                            Code used to retrieve prompt message from resource bundle.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:attribute>
                <xsd:attribute name="outputMessageCode" type="xsd:string">
                    <xsd:annotation>
                        <xsd:documentation>
                            Code used to retrieve output message from resource bundle.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:attribute>
                <xsd:attribute name="resourceBundle" type="xsd:string">
                    <xsd:annotation>
                        <xsd:documentation>
                            Resource bundle to provide prompt, with promptMessageCode.
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:attribute>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:element name="inbound-endpoint" type="inboundEndpointType" substitutionGroup="mule:abstract-inbound-endpoint"/>
    <xsd:complexType name="inboundEndpointType">
        <xsd:complexContent>
            <xsd:extension base="mule:inboundEndpointType">
                <xsd:attributeGroup ref="addressAttributes"/>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:element name="outbound-endpoint" type="outboundEndpointType" substitutionGroup="mule:abstract-outbound-endpoint"/>
    <xsd:complexType name="outboundEndpointType">
        <xsd:complexContent>
            <xsd:extension base="mule:outboundEndpointType">
                <xsd:attributeGroup ref="addressAttributes"/>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:element name="endpoint" type="globalEndpointType" substitutionGroup="mule:abstract-global-endpoint"/>
    <xsd:complexType name="globalEndpointType">
        <xsd:complexContent>
            <xsd:extension base="mule:globalEndpointType">
                <xsd:attributeGroup ref="addressAttributes"/>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:attributeGroup name="addressAttributes">
        <xsd:attribute name="system">
            <xsd:simpleType>
                <xsd:restriction base="xsd:NMTOKEN">
                    <xsd:enumeration value="IN"/>
                    <xsd:enumeration value="OUT"/>
                    <xsd:enumeration value="ERR"/>
                </xsd:restriction>
            </xsd:simpleType>
        </xsd:attribute>
    </xsd:attributeGroup>

</xsd:schema>
