<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<xsd:annotation>
		<xsd:documentation>This schema file is part of the aseXML schema set, and is subject to the terms and conditions that are detailed in the aseXML_r*.xsd schema file with which this file is used</xsd:documentation>
	</xsd:annotation>
	<xsd:annotation>
		<xsd:documentation>
Purpose - Define the structure of transactions within aseXML
Detail - All transactions within aseXML are carried within a common Transaction element. This schema also defines the set of specific transactions that can appear within the Transaction element.
</xsd:documentation>
	</xsd:annotation>
	<!-- Support Types -->
	<xsd:simpleType name="TransactionIdentifier">
		<xsd:annotation>
			<xsd:documentation>
Purpose - Uniquely identify every transaction generated by the transaction sender
Detail - Note that transaction identifiers do not have to be globally unique, only unique to a particular sender. However, the length has been chosen such that UUIDs can be used as transaction identifiers if considered appropriate, guaranteeing global uniqueness. 

A transaction acknowledgement identifies which transaction it is acknowledging by providing the transaction identifier as an attribute.

In addition to carrying its own unique identifier, a transaction generated in response to the initial transaction of a transaction exchange also carries the transaction identifier of the initial transaction. This allows the sender to determine the context in which the response transaction should be interpreted.
</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="UniqueIdentifier"/>
	</xsd:simpleType>
	<!-- Main Types -->
	<xsd:complexType name="Transaction">
		<xsd:annotation>
			<xsd:documentation>
Purpose - Common container for all transactions
Detail - All transactions within aseXML are carried within this container. The transactionID and transactionDate are provided for all transactions. The initiatingTransactionID is only provided on response transactions and represents the transactionID of the initiating transaction.
</xsd:documentation>
		</xsd:annotation>
		<xsd:choice>
			<xsd:element name="ReplicationRequest" type="ReplicationRequest"/>
			<xsd:element name="ReplicationNotification" type="ReplicationNotification"/>
			<xsd:element name="ReportRequest" type="ReportRequest"/>
			<xsd:element name="ReportResponse" type="ReportResponse"/>
			<xsd:element name="MeterDataNotification" type="MeterDataNotification"/>
			<xsd:element name="MeterDataResponse" type="MeterDataResponse"/>
			<xsd:element name="SettlementDataNotification" type="SettlementDataNotification"/>
			<xsd:element name="NMIDiscoveryRequest" type="NMIDiscoveryRequest"/>
			<xsd:element name="NMIDiscoveryResponse" type="NMIDiscoveryResponse"/>
			<xsd:element name="NMIStandingDataRequest" type="NMIStandingDataRequest"/>
			<xsd:element name="NMIStandingDataResponse" type="NMIStandingDataResponse"/>
			<xsd:element name="CATSChangeRequest" type="CATSChangeRequest"/>
			<xsd:element name="CATSChangeResponse" type="CATSChangeResponse"/>
			<xsd:element name="CATSChangeWithdrawal" type="CATSChangeWithdrawal"/>
			<xsd:element name="CATSObjectionRequest" type="CATSObjectionRequest"/>
			<xsd:element name="CATSObjectionResponse" type="CATSObjectionResponse"/>
			<xsd:element name="CATSObjectionWithdrawal" type="CATSObjectionWithdrawal"/>
			<xsd:element name="CATSNotification" type="CATSNotification"/>
			<xsd:element name="CATSDataRequest" type="CATSDataRequest"/>
			<xsd:element name="CATSChangeAlert" type="CATSChangeAlert"/>
			<xsd:element name="ServiceOrderRequest" type="ServiceOrderRequest"/>
			<xsd:element name="ServiceOrderResponse" type="ServiceOrderResponse"/>
			<xsd:element name="FieldWorkNotification" type="FieldWorkNotification"/>
			<xsd:element name="NetworkInvoiceNotification" type="NetworkInvoiceNotification"/>
			<xsd:element name="DisputeNotification" type="DisputeNotification"/>
			<xsd:element name="RemittanceNotification" type="RemittanceNotification"/>
			<xsd:element name="DisputeResponse" type="DisputeResponse"/>
			<xsd:element name="CreditNotification" type="CreditNotification"/>
			<xsd:element name="FaultInformationRequest" type="FaultInformationRequest"/>
			<xsd:element name="FaultNotification" type="FaultNotification"/>
			<xsd:element name="FaultOutageAdvice" type="FaultOutageAdvice"/>
			<xsd:element name="CustomerDetailsRequest" type="CustomerDetailsRequest"/>
			<xsd:element name="CustomerDetailsNotification" type="CustomerDetailsNotification"/>
			<xsd:element name="AmendMeterRouteDetails" type="AmendMeterRouteDetails"/>
			<xsd:element name="AccountCreationNotification" type="AccountCreationNotification"/>
			<xsd:element name="NetworkDUoSBillingNotification" type="NetworkDUoSBillingNotification"/>
			<xsd:element name="MeterReadInputNotification" type="MeterReadInputNotification"/>
			<xsd:element name="MeterDataVerifyRequest" type="MeterDataVerifyRequest"/>
			<xsd:element name="MeterDataVerifyResponse" type="MeterDataVerifyResponse"/>
			<xsd:element name="MeterDataHistoryRequest" type="MeterDataHistoryRequest"/>
			<xsd:element name="MeterDataHistoryResponse" type="MeterDataHistoryResponse"/>
			<xsd:element name="SpecialReadRequest" type="ServiceOrderRequest"/>
			<xsd:element name="SpecialReadResponse" type="ServiceOrderResponse"/>
			<xsd:element name="MeterDataMissingNotification" type="MeterDataMissingNotification"/>
			<xsd:element name="CurrentRetailerConfirmationRequest" type="CurrentRetailerConfirmationRequest"/>
			<xsd:element name="CurrentRetailerConfirmationResponse" type="CurrentRetailerConfirmationResponse"/>
			<xsd:element name="NMIStandingDataUpdateNotification" type="NMIStandingDataUpdateNotification"/>
			<xsd:element name="NMIStandingDataUpdateResponse" type="MeterDataResponse"/>
			<xsd:element name="GasMeterNotification" type="GasMeterNotification"/>
			<xsd:element name="MeteredSupplyPointsCountUpdate" type="MeteredSupplyPointsCountUpdate"/>
			<xsd:element name="CATSBulkDataRequest" type="CATSBulkDataRequest"/>
			<xsd:element name="CATSBulkDataResponse" type="CATSBulkDataResponse"/>
			<xsd:element name="NOSBookingSubmission" type="NOSBookingSubmission">
				<xsd:unique name="uniqueBooking">
					<xsd:selector xpath=".//Booking"/>
					<xsd:field xpath="CompanyBookingId"/>
				</xsd:unique>
			</xsd:element>
			<xsd:element name="NOSBookingResponse" type="NOSBookingResponse"/>
			<xsd:element name="NOSBookingInfoRequest" type="NOSBookingInfoRequest"/>
			<xsd:element name="NOSEquipmentSubmission" type="NOSEquipmentSubmission">
				<xsd:unique name="equipmentKey">
					<xsd:selector xpath=".//NOSEquipment"/>
					<xsd:field xpath="CompanyElementId"/>
				</xsd:unique>
			</xsd:element>
			<xsd:element name="NOSEquipmentResponse" type="NOSEquipmentResponse"/>
			<xsd:element name="NOSEquipmentInfoRequest" type="NOSEquipmentInfoRequest"/>
			<xsd:element name="NOSInfoResponse" type="NOSInfoResponse"/>
			<xsd:element name="AllocationNotification" type="AllocationNotification"/>
			<xsd:element name="ReconciliationNotification" type="ReconciliationNotification"/>
			<xsd:element name="SwingServiceNotification" type="SwingServiceNotification"/>
			<xsd:element name="MeterReadingReferenceDataRequest" type="MeterReadingReferenceDataRequest"/>
			<xsd:element name="MeterReadingReferenceDataResponse" type="MeterReadingReferenceDataResponse"/>
			<xsd:element name="WholesaleRetrieveRequest" type="WholesaleRetrieveRequest"/>
			<xsd:element name="WholesaleRetrieveResponse" type="WholesaleRetrieveResponse"/>
			<xsd:element name="WholesaleSearchRequest" type="WholesaleSearchRequest"/>
			<xsd:element name="WholesaleSearchResponse" type="WholesaleSearchResponse"/>
			<xsd:element name="WholesaleSubmitRequest" type="WholesaleSubmitRequest"/>
			<xsd:element name="WholesaleSubmitResponse" type="WholesaleSubmitResponse"/>
			<xsd:element name="WholesaleInformationRequest" type="WholesaleInformationRequest"/>
			<xsd:element name="WholesaleInformationResponse" type="WholesaleInformationResponse"/>
			<xsd:element name="HSMMonitorsRequest" type="HSMMonitorsRequest"/>
			<xsd:element name="HSMMonitorsResponse" type="HSMMonitorsResponse"/>
			<xsd:element name="HSMMonitorDataRequest" type="HSMMonitorDataRequest"/>
			<xsd:element name="HSMMonitorDataResponse" type="HSMMonitorDataResponse"/>
			<xsd:element name="HSMTriggeredDataNotification" type="HSMTriggeredDataNotification"/>
			<xsd:element name="OneWayNotification" type="OneWayNotification"/>
		</xsd:choice>
		<xsd:attribute name="transactionID" type="TransactionIdentifier" use="required"/>
		<xsd:attribute name="transactionDate" type="xsd:dateTime" use="required"/>
		<xsd:attribute name="initiatingTransactionID" type="TransactionIdentifier" use="optional"/>
	</xsd:complexType>
	<xsd:complexType name="Transactions">
		<xsd:annotation>
			<xsd:documentation>
Purpose - Container for multiple transactions within one aseXML message
Detail - An aseXML message may contain one or more transactions. All transactions within an aseXML message are grouped under this container. 
</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="Transaction" type="Transaction" maxOccurs="unbounded"/>
		</xsd:sequence>
	</xsd:complexType>
</xsd:schema>
