<?xml version="1.0" encoding="UTF-8"?>
<!-- Product version : 6.20.205 -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://deutsche-boerse.de/m7-re"
        xmlns="http://deutsche-boerse.de/m7-re" elementFormDefault="qualified">

    <xs:include schemaLocation="x90_reports_common_structs.xsd"/>

    <xs:element name="tc540">
        <xs:complexType>
            <xs:annotation>
                <xs:documentation>TC540 Daily Order Maintenance</xs:documentation>
            </xs:annotation>
            <xs:sequence>
                <xs:element name="rptHdr" type="rptHdrType" />
                <xs:element name="tc540Grp" type="tc540GrpType" minOccurs="0" maxOccurs="unbounded" />
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:complexType name="tc540GrpType">
        <xs:complexContent>
            <xs:extension base="grpType">
                <xs:sequence>
                    <xs:element name="tc540KeyGrp" type="tc540KeyGrpType" />
                    <xs:element name="tc540Grp1" type="tc540Grp1Type" minOccurs="1" maxOccurs="unbounded" >
                        <xs:annotation>
                            <xs:documentation>
Conditions: present only if an order was modified on *rptPrntEffDat*
                            </xs:documentation>
                        </xs:annotation>
                    </xs:element>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="tc540Grp1Type">
        <xs:sequence>
            <xs:element name="tc540KeyGrp1" type="tc540KeyGrp1Type" />
            <xs:element name="tc540Rec" type="tc540RecType" minOccurs="1" maxOccurs="unbounded" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="tc540KeyGrpType">
        <xs:sequence>
            <xs:element name="membExcIdCod" type="membExcIdCodType" minOccurs="1" maxOccurs="1" >
                <xs:annotation>
                    <xs:documentation>
                        The "Member ID" of the latest order owner. For orders created by M7 as a result of AOT, it is the "Member ID" of the order owner before the AOT has been performed.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="tc540KeyGrp1Type">
        <xs:sequence>
            <xs:element name="partIdCod" type="partIdCodType" minOccurs="1" maxOccurs="1" />
            <xs:element name="instTitl" type="instTitlType" />
            <xs:element name="currTypCod" type="currTypCodType" minOccurs="1" maxOccurs="1" >
                <xs:annotation>
                    <xs:documentation>
Currency Type Code contains the currency in which the product is traded.

Valid values: A valid ISO code
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="product" type="product" minOccurs="1" maxOccurs="1" />
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="tc540RecType">
        <xs:sequence>
            <xs:element name="tranTim" type="tranTimType" minOccurs="1" maxOccurs="1">
                <xs:annotation>
                    <xs:documentation>
The transaction timestamp.

For local orders, the exact time when the maintenance action, trade execution or modification was performed.

For orders created by M7 as a result of AOT it is the time of the order transfer (time of transfer from remote contract (XBID) to linked contract (local)).

For remote orders, timestamp is provided based on configuration of the environment:

**Activated** Timestamp is filled with data provided by XBID.

**Deactivated** The exact time when M7 received the information on the maintenance action from XBID. **Note:** This time may differ from the actual time of processing the maintenance action by XBID.

Valid values: Any time in the format hh:mm:ss:ccc.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="mktArea" type="mktAreaType" minOccurs="1" maxOccurs="1" />
            <xs:element name="tso" type="tsoType" minOccurs="1" maxOccurs="1" />
            <xs:element name="balGrp" type="balGrpType" minOccurs="1" maxOccurs="1" >
                <xs:annotation>
                    <xs:documentation>
                        Balancing Group for which the order was entered.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="clgHse" type="clgHseType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="entTim" type="entTimType" minOccurs="1" maxOccurs="1" />
            <xs:element name="actnCod" type="actnCodType" minOccurs="1" maxOccurs="1" />
            <xs:element name="aggressorIndicator" type="aggressorIndicatorType" minOccurs="0" maxOccurs="1" >
                <xs:annotation>
                    <xs:documentation>
Indicates whether the executed order was as a trade aggressor or as a trade originator. Valid values:

**Y**- Trade aggressor

**N** - Trade originator

**U** - Unknown, used for executed orders of remote products, orders transferred to linked contracts and data before migration

Condition: Present if the *actnCod* of the order is either "M" (full match) or "P" (partial match).
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="revisionNo" type="revisionNoType" minOccurs="1" maxOccurs="1" >
                <xs:annotation>
                    <xs:documentation>
The revision value for each maintenance step.

Initial value is 1. When a local order or an order created by M7 as a result of AOT is modified, the value is increased by one. When a remote order is modified, the value may be increased by more than one, because the maintenance actions that were performed only locally (e.g. storing an order locally on M7 before forwarding it to XBID) are excluded from the report.<br />
Both for remote and local orders, it can only be guaranteed that the *revisionNo* will be always monotonically increasing, but not that the delta will always be one.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="remoteRevisionNo" type="revisionNoType" minOccurs="0" maxOccurs="1" >
                <xs:annotation>
                    <xs:documentation>
The revision value for each order maintenance step.

The field is not present for orders created by M7 as a result of AOT.

The initial value is 1. When an order is modified in XBID, value is increased by one. In case of a disconnection event from XBID, M7 bases the order history on the information received from XBID. For details please refer to *DFS160a*, the chapter Full Order History.

Conditions: Present if the order has been communicated to the XBID SOB
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="listID" type="listIdType" minOccurs="0" maxOccurs="1" />
            <xs:element name="listExecInst" type="listExecInstType" minOccurs="0" maxOccurs="1" />
            <xs:element name="ordrNo" type="ordrNoType" minOccurs="1" maxOccurs="1" />
            <xs:element name="remoteOrdrNo" type="ordrNoType" minOccurs="0" maxOccurs="1" >
                <xs:annotation>
                    <xs:documentation>
An "Order ID" assigned to the order by XBID SOB. It may be changed when the order is modified.

The field is not present for orders created by M7 as a result of AOT.

Conditions: Present if the order has been communicated to the XBID SOB
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="ordrInitialNo" type="ordrInitialNoType" minOccurs="0" maxOccurs="1" />
            <xs:element name="ordrParentNo" type="ordrParentNoType" minOccurs="0" maxOccurs="1" />
            <xs:element name="preAotId" type="ordrNoType" minOccurs="0" maxOccurs="1" >
                <xs:annotation>
                    <xs:documentation>
The local Id of the remote order that this order originated from during AOT. 

Conditions: Popupated if this is a local order transferred from a remote order during AOT.

It is expected to be carried over for all order transactions related to the first transferred local order.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="ordrBuyCod" type="ordrBuyCodType" minOccurs="1" maxOccurs="1" />
            <xs:element name="opnClseInd" type="openCloseIndType" minOccurs="0" maxOccurs="1" />
            <xs:element name="acctTypCodGrp" type="acctTypCodGrpType" minOccurs="1" maxOccurs="1" />
            <xs:element name="ordrQty" type="ordrQtyType" minOccurs="1" maxOccurs="1" />
            <xs:element name="peakSizeQty" type="peakSizeQtyType" minOccurs="0" maxOccurs="1" />
            <xs:element name="totalRemQty" type="totalRemQtyType" minOccurs="0" maxOccurs="1"/>
            <xs:element name="stopPrc" type="stopPrcType" minOccurs="0" maxOccurs="1" />
            <xs:element name="ppd" type="peakPrcDeltaType" minOccurs="0" maxOccurs="1">
                <xs:annotation>
                    <xs:documentation>
The peak price delta of an iceberg order

Conditions: Present if *ordrTypCod* is "I" (iceberg order)
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="ordrTypCod" type="ordrTypCodType" minOccurs="1" maxOccurs="1" />
            <xs:element name="quote" type="quoteType"  minOccurs="0" maxOccurs="1" />
            <xs:element name="ordrExePrc" type="ordrExePrcType" minOccurs="0" maxOccurs="1" >
                <xs:annotation>
                    <xs:documentation>
                        The limit price of an order. For orders created by M7 as a result of AOT it is the last ordrExePrc of the related remote order before the AOT has been performed.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="tradMtchPrc" type="tradMtchPrcType" minOccurs="0" maxOccurs="1" >
                <xs:annotation>
                    <xs:documentation>
The trade match price. This is the price at which the trade was executed.

Conditions: present if *actnCod* is either: "M" (full match) or "P" (partial match).

It is possible that in case of synchronisation issues with the XBID instance the M7 application will not be able to retrieve the match price of a trade so the attribute will be reported with an empty string. In addition, it will be required that the Market Operators check the trade match prices of all partial trades related to this ordrId against the XBID TC reports, as in this rare event M7 Trading cannot guarantee that these will be reported correctly.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="ordrResCod" type="ordrResCodType" minOccurs="0" maxOccurs="1" />
            <xs:element name="ordrValCode" type="ordrValCodeType" minOccurs="1" maxOccurs="1" />
            <xs:element name="applicationId" type="applicationIdType" minOccurs="0" maxOccurs="1" >
                <xs:annotation>
                    <xs:documentation>
Application ID which the user used to perform the maintenance step.

Conditions: Present always, except for orders submitted or maintained before the migration to M7 6.0.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="applicationVer" type="applicationVerType" minOccurs="0" maxOccurs="1" >
                <xs:annotation>
                    <xs:documentation>
The version of the application which the user used to perform the maintenance step.

Conditions: Present if the application version was provided in the API.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="valDat" type="valDatType" minOccurs="0" maxOccurs="1" />
            <xs:element name="text" type="textType" minOccurs="0" maxOccurs="1" />
            <xs:element name="membExcIdCodOboMs" type="membExcIdCodOboMsType" minOccurs="0" maxOccurs="1" >
                <xs:annotation>
                    <xs:documentation>
The "Member ID" of the user who performed a maintenance action on behalf of the order owner.

Conditions: Present if the maintenance step was performed by a user on behalf of the order owner (see the chapter On-behalf trading in _DFS180_).

For orders created by LTS as a result of AOT, it is the "Member ID" of the order owner before the AOT has been performed.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="partIdCodOboMs" type="partIdCodOboMsType" minOccurs="0" maxOccurs="1" >
                <xs:annotation>
                    <xs:documentation>
The "User Code" of the user who performed a maintenance action on behalf of the order owner.

Conditions: Present if the maintenance step was performed by a user on behalf of the order owner (see the chapter On-behalf trading in _DFS180_).

For orders created by LTS as a result of AOT, it is the string "SYSTEM".
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="aot" type="boolType" default="false" minOccurs="0" maxOccurs="1" >
                <xs:annotation>
                    <xs:documentation>
                        The indicator whether the order shall be automatically transferred to the corresponding linked contract after the trading in the specific delivery area ends in XBID.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="prioChange" type="boolType" minOccurs="0" maxOccurs="1" >
                <xs:annotation>
                    <xs:documentation>
                        An indicator of whether the order has been added or deleted as a result of an order modification which lead to a priority change of the order. If false, the element is omitted.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="location" type="string64" minOccurs="0" maxOccurs="1">
                <xs:annotation>
                    <xs:documentation>
Location of order within the delivery area.

Condition: Present if the location for an order was submitted.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="marketBased" type="boolType" minOccurs="0" maxOccurs="1">
            <xs:annotation>
                <xs:documentation>
                    Type of the congestion order to indicate whether it is a market based order (Yes) or a non-market based order (No).
                    Available only for products with Locations enabled.
                    Default value: true.
                </xs:documentation>
            </xs:annotation>
        </xs:element>
        <xs:element name="contractReference" type="string64" minOccurs="0" maxOccurs="1">
            <xs:annotation>
                <xs:documentation>
                    Reference to a contract between supplier and network operator (e.g. bidding obligation).
                    Available only for products with Locations enabled.
                </xs:documentation>
            </xs:annotation>
        </xs:element>
        <xs:element name="facilityType" type="string64" minOccurs="0" maxOccurs="1">
            <xs:annotation>
                <xs:documentation>
                    Type of the network connected facility that converts primary energy into electrical energy.
                    Available only for products with Locations enabled.
                </xs:documentation>
            </xs:annotation>
        </xs:element>
        <xs:element name="usageFraction" type="IntRange" minOccurs="0" maxOccurs="1">
            <xs:annotation>
                <xs:documentation>
                    Indicates the mix/max percentage value of usage of the order.
                    Example: For BUY orders it represents the maximum the provider can down regulate their production unit without fully shutting it down.
                    Available only for products with Locations enabled.
                </xs:documentation>
            </xs:annotation>
        </xs:element>
        </xs:sequence>
    </xs:complexType>

</xs:schema>
