<?xml version = "1.0" encoding = "UTF-8"?>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            targetNamespace="http://www.mesa.org/xml/B2MML-V0600"
            xmlns="http://www.mesa.org/xml/B2MML-V0600"
            xmlns:Extended="http://www.mesa.org/xml/B2MML-V0600-AllExtensions"
            elementFormDefault="qualified"
            attributeFormDefault="unqualified">

    <!-- Import the Extension Schema into the 'Extended' namespace    -->

    <xsd:import namespace="http://www.mesa.org/xml/B2MML-V0600-AllExtensions"
                schemaLocation="B2MML-V0600-AllExtensions.xsd"/>

    <!-- Include the Common schema and OpSegmentResponseType definition  -->

    <xsd:include schemaLocation="B2MML-V0600-Common.xsd"/>
    <xsd:include schemaLocation="B2MML-V0600-OperationsPerformanceTypes.xsd"/>


    <xsd:annotation>
        <xsd:documentation>

            Copyright 2012 MESA International
            All Rights Reserved. http://www.mesa.org

            This MESA International work (including specifications, documents,
            software, and related items) referred to as the Business To
            Manufacturing Markup Language (B2MML) is provided by the copyright
            holders under the following license.

            Permission to use, copy, modify, or redistribute this Work and its
            documentation, with or without modification, for any purpose and
            without fee or royalty is hereby granted provided the World Batch
            Forum is acknowledged as the originator of this Work using the
            following statement:

            "The Business To Manufacturing Markup Language (B2MML) is used
            courtesy of MESA International."

            In no event shall MESA International, its members, or any
            third party be liable for any costs, expenses, losses, damages or
            injuries incurred by use of the Work or as a result of this
            agreement.

            Based upon the ANSI/ISA-95.00.02-2010 Enterprise-Control System
            Integration Part 2: Object Model Attributes Standard and the
            ANSI/ISA-95.00.05-2006 Enterprise-Control System Integration
            Part 5: Business to Manufacturing Transactions.
        </xsd:documentation>

        <xsd:documentation>

            Revision History

            Ver Date Person Note
            --- ---- ------ ----
            V0500 26 Mar 2011 D. Brandl Initial version
            V0600 17 Mar 2013 D. Brandl Changed copyright to MESA International and support for ISA 95 Part 4

        </xsd:documentation>
    </xsd:annotation>

    <!-- Global Elements -->

    <xsd:element name="OperationsPerformance" type="OperationsPerformanceType"/>
    <xsd:element name="OperationsResponse" type="OperationsResponseType"/>

    <!-- Transaction Elements -->

    <xsd:element name="GetOperationsPerformance" type="GetOperationsPerformanceType"/>
    <xsd:element name="ShowOperationsPerformance" type="ShowOperationsPerformanceType"/>
    <xsd:element name="ProcessOperationsPerformance" type="ProcessOperationsPerformanceType"/>
    <xsd:element name="AcknowledgeOperationsPerformance" type="AcknowledgeOperationsPerformanceType"/>
    <xsd:element name="ChangeOperationsPerformance" type="ChangeOperationsPerformanceType"/>
    <xsd:element name="RespondOperationsPerformance" type="RespondOperationsPerformanceType"/>
    <xsd:element name="CancelOperationsPerformance" type="CancelOperationsPerformanceType"/>
    <xsd:element name="SyncOperationsPerformance" type="SyncOperationsPerformanceType"/>

    <!-- Simple & Complex Types  -->

    <xsd:complexType name="OperationsPerformanceType">
        <xsd:sequence>
            <xsd:element name="ID" type="IdentifierType"
                         minOccurs="0"/>
            <xsd:element name="Description" type="DescriptionType"
                         minOccurs="0" maxOccurs="unbounded"/>
            <xsd:element name="HierarchyScope" type="HierarchyScopeType"
                         minOccurs="0"/>
            <xsd:element name="OperationsType" type="OperationsTypeType"
                         minOccurs="0"/>
            <xsd:element name="OperationsScheduleID" type="OperationsScheduleIDType"
                         minOccurs="0"/>
            <xsd:element name="StartTime" type="StartTimeType"
                         minOccurs="0"/>
            <xsd:element name="EndTime" type="EndTimeType"
                         minOccurs="0"/>
            <xsd:element name="PerformanceState" type="ResponseStateType"
                         minOccurs="0"/>
            <xsd:element name="PublishedDate" type="PublishedDateType"
                         minOccurs="0"/>
            <xsd:element name="OperationsResponse" type="OperationsResponseType"
                         minOccurs="0" maxOccurs="unbounded"/>
            <xsd:group ref="Extended:OperationsPerformance"
                       minOccurs="0" maxOccurs="1"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="OperationsResponseType">
        <xsd:sequence>
            <xsd:element name="ID" type="IdentifierType"
                         minOccurs="0"/>
            <xsd:element name="Description" type="DescriptionType"
                         minOccurs="0" maxOccurs="unbounded"/>
            <xsd:element name="HierarchyScope" type="HierarchyScopeType"
                         minOccurs="0"/>
            <xsd:element name="OperationsType" type="OperationsTypeType"
                         minOccurs="0"/>
            <xsd:element name="OperationsRequestID" type="OperationsRequestIDType"
                         minOccurs="0" maxOccurs="unbounded"/>
            <xsd:element name="StartTime" type="StartTimeType"
                         minOccurs="0"/>
            <xsd:element name="EndTime" type="EndTimeType"
                         minOccurs="0"/>
            <xsd:element name="OperationsDefinitionID" type="OperationsDefinitionIDType"
                         minOccurs="0" maxOccurs="unbounded"/>
            <xsd:element name="ResponseState" type="ResponseStateType"
                         minOccurs="0"/>
            <xsd:element name="SegmentResponse" type="OpSegmentResponseType"
                         minOccurs="0" maxOccurs="unbounded"/>
            <xsd:group ref="Extended:OperationsResponse" minOccurs="0" maxOccurs="1"/>
        </xsd:sequence>
    </xsd:complexType>


    <!-- - - - - - - - - - - - - - - - - - - - - -->
    <!-- OperationsPerformance Transaction Types -->
    <!-- - - - - - - - - - - - - - - - - - - - - -->

    <xsd:complexType name="GetOperationsPerformanceType">
        <xsd:sequence>
            <xsd:element name="ApplicationArea" type="TransApplicationAreaType"/>
            <xsd:element name="DataArea">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="Get" type="TransGetType"/>
                        <xsd:element name="OperationsPerformance"
                                     type="OperationsPerformanceType"
                                     minOccurs="1"
                                     maxOccurs="unbounded"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="releaseID" type="xsd:normalizedString" use="required"/>
        <xsd:attribute name="versionID" type="xsd:normalizedString" use="optional"/>
    </xsd:complexType>


    <xsd:complexType name="ShowOperationsPerformanceType">
        <xsd:sequence>
            <xsd:element name="ApplicationArea" type="TransApplicationAreaType"/>
            <xsd:element name="DataArea">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="Show" type="TransShowType"/>
                        <xsd:element name="OperationsPerformance"
                                     type="OperationsPerformanceType"
                                     minOccurs="1"
                                     maxOccurs="unbounded"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>

        </xsd:sequence>
        <xsd:attribute name="releaseID" type="xsd:normalizedString" use="required"/>
        <xsd:attribute name="versionID" type="xsd:normalizedString" use="optional"/>
    </xsd:complexType>


    <xsd:complexType name="ProcessOperationsPerformanceType">
        <xsd:sequence>
            <xsd:element name="ApplicationArea" type="TransApplicationAreaType"/>
            <xsd:element name="DataArea">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="Process" type="TransProcessType"/>
                        <xsd:element name="OperationsPerformance"
                                     type="OperationsPerformanceType"
                                     minOccurs="1"
                                     maxOccurs="unbounded"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>

        </xsd:sequence>
        <xsd:attribute name="releaseID" type="xsd:normalizedString" use="required"/>
        <xsd:attribute name="versionID" type="xsd:normalizedString" use="optional"/>
    </xsd:complexType>


    <xsd:complexType name="AcknowledgeOperationsPerformanceType">
        <xsd:sequence>
            <xsd:element name="ApplicationArea" type="TransApplicationAreaType"/>
            <xsd:element name="DataArea">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="Acknowledge" type="TransAcknowledgeType"/>
                        <xsd:element name="OperationsPerformance"
                                     type="OperationsPerformanceType"
                                     minOccurs="1"
                                     maxOccurs="unbounded"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>

        </xsd:sequence>
        <xsd:attribute name="releaseID" type="xsd:normalizedString" use="required"/>
        <xsd:attribute name="versionID" type="xsd:normalizedString" use="optional"/>
    </xsd:complexType>


    <xsd:complexType name="ChangeOperationsPerformanceType">
        <xsd:sequence>
            <xsd:element name="ApplicationArea" type="TransApplicationAreaType"/>
            <xsd:element name="DataArea">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="Change" type="TransChangeType"/>
                        <xsd:element name="OperationsPerformance"
                                     type="OperationsPerformanceType"
                                     minOccurs="1"
                                     maxOccurs="unbounded"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>

        </xsd:sequence>
        <xsd:attribute name="releaseID" type="xsd:normalizedString" use="required"/>
        <xsd:attribute name="versionID" type="xsd:normalizedString" use="optional"/>
    </xsd:complexType>


    <xsd:complexType name="RespondOperationsPerformanceType">
        <xsd:sequence>
            <xsd:element name="ApplicationArea" type="TransApplicationAreaType"/>
            <xsd:element name="DataArea">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="Respond" type="TransRespondType"/>
                        <xsd:element name="OperationsPerformance"
                                     type="OperationsPerformanceType"
                                     minOccurs="1"
                                     maxOccurs="unbounded"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>

        </xsd:sequence>
        <xsd:attribute name="releaseID" type="xsd:normalizedString" use="required"/>
        <xsd:attribute name="versionID" type="xsd:normalizedString" use="optional"/>
    </xsd:complexType>


    <xsd:complexType name="CancelOperationsPerformanceType">
        <xsd:sequence>
            <xsd:element name="ApplicationArea" type="TransApplicationAreaType"/>
            <xsd:element name="DataArea">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="Cancel" type="TransCancelType"/>
                        <xsd:element name="OperationsPerformance"
                                     type="OperationsPerformanceType"
                                     minOccurs="1"
                                     maxOccurs="unbounded"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>

        </xsd:sequence>
        <xsd:attribute name="releaseID" type="xsd:normalizedString" use="required"/>
        <xsd:attribute name="versionID" type="xsd:normalizedString" use="optional"/>
    </xsd:complexType>


    <xsd:complexType name="SyncOperationsPerformanceType">
        <xsd:sequence>
            <xsd:element name="ApplicationArea" type="TransApplicationAreaType"/>
            <xsd:element name="DataArea">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="Sync" type="TransSyncType"/>
                        <xsd:element name="OperationsPerformance"
                                     type="OperationsPerformanceType"
                                     minOccurs="1"
                                     maxOccurs="unbounded"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>

        </xsd:sequence>
        <xsd:attribute name="releaseID" type="xsd:normalizedString" use="required"/>
        <xsd:attribute name="versionID" type="xsd:normalizedString" use="optional"/>
    </xsd:complexType>


</xsd:schema>