<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.hkicl.com.hk/tr" elementFormDefault="qualified"
	attributeFormDefault="unqualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns:fpml="http://www.fpml.org/FpML-5/reporting" xmlns="http://www.hkicl.com.hk/tr">

	<xsd:import namespace="http://www.fpml.org/FpML-5/reporting"
		schemaLocation="hkicl-tr-fpml-extended.xsd"/>
	<xsd:include schemaLocation="hkicl-tr-doc.xsd"/>
	<xsd:include schemaLocation="hkicl-tr-shared.xsd"/>
	<xsd:include schemaLocation="hkicl-tr-asset.xsd"/>
	<xsd:include schemaLocation="hkicl-tr-cd.xsd"/>
	<xsd:include schemaLocation="hkicl-tr-enum.xsd"/>

	<!-- Extended type declarations -->
	<xsd:complexType name="EventId">
		<xsd:annotation>
			<xsd:documentation xml:lang="en">An event reference identifier allocated by a party.</xsd:documentation>
		</xsd:annotation>
		<xsd:simpleContent>
			<xsd:extension base="fpml:Scheme">
				<xsd:attribute name="eventIdScheme" type="xsd:anyURI" use="required"/>
			</xsd:extension>
		</xsd:simpleContent>
	</xsd:complexType>

	<xsd:complexType name="ExecutionType">
		<xsd:annotation>
			<xsd:documentation xml:lang="en">Used to describe how the trade was executed, e.g. via voice or electronically.</xsd:documentation>
		</xsd:annotation>
		<xsd:simpleContent>
			<xsd:extension base="fpml:Scheme">
				<xsd:attribute name="executionTypeScheme" type="xsd:anyURI"
					default="http://www.fpml.org/coding-scheme/execution-type" use="optional"/>
			</xsd:extension>
		</xsd:simpleContent>
	</xsd:complexType>

	<xsd:complexType name="ExecutionVenueType">
		<xsd:annotation>
			<xsd:documentation xml:lang="en">Used to describe the type of venue where trade was executed, e.g via an execution facility or privately.</xsd:documentation>
		</xsd:annotation>
		<xsd:simpleContent>
			<xsd:extension base="fpml:Scheme">
				<xsd:attribute name="executionVenueTypeScheme" type="xsd:anyURI"
					default="http://www.fpml.org/coding-scheme/execution-venue-type" use="optional"
				/>
			</xsd:extension>
		</xsd:simpleContent>
	</xsd:complexType>

	<xsd:complexType name="EventProcessingTimestamps">
		<xsd:annotation>
			<xsd:documentation xml:lang="en">Allows timing information about when an event was processed and reported to be recorded.</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:element name="orderEntryTimestamp" type="xsd:dateTime" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>The time and date when the order was entered</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="submissionOfOrderEntryTimestamp" type="xsd:dateTime" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>The time and date when the order was sent to the platform to be executed</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:complexType name="PartyEventInformation">
		<xsd:sequence>
			<xsd:group ref="fpml:PartyAndAccountReferences.model">
				<xsd:annotation>
					<xsd:documentation xml:lang="en">Reference to a party.</xsd:documentation>
				</xsd:annotation>
			</xsd:group>
			<xsd:element name="eventId" type="EventId">
				<xsd:annotation>
					<xsd:documentation>An event reference identifier allocated by a party.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="confirmed" type="xsd:boolean" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Indicates whether the reported trade has been confirmed or not.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="executionType" type="ExecutionType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Used to describe how the trade was executed, e.g. via voice or electronically.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="executionVenueType" type="ExecutionVenueType" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Used to describe the type of venue where trade was executed, e.g via an execution facility or privately.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="eventProcessingTimestamps" type="EventProcessingTimestamps"
				minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>Allows timing information about when an event was processed and reported to be recorded.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="remarks" type="xsd:string" minOccurs="0">
				<xsd:annotation>
					<xsd:documentation>A free style string for typing in remarks associated with this event.</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	
	<xsd:complexType name="NewTrade">
		<xsd:complexContent>
			<xsd:extension base="fpml:AdditionalEvent">
				<xsd:sequence>
					<xsd:element ref="fpml:trade"/>
					<xsd:element name="tradeParty1" type="fpml:PartyReference">
						<xsd:annotation>
							<xsd:documentation>The trade party that directly relates to the reporter of the trade. In simple words, it must either be the "reporting party" or "reporting-for party".</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="tradeParty2" type="fpml:PartyReference">
						<xsd:annotation>
							<xsd:documentation>The party that participates in the trade other than tradeParty1. It will be used to reconcile the trade parties defined within the product.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="utiIndicator" type="xsd:boolean" minOccurs="1">
						<xsd:annotation>
							<xsd:documentation>Declaration of UTI applicability.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="specialTermsIndicator" type="xsd:boolean" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>Indicates whether special terms is applicable or not.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="bilateralComments" type="xsd:string" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>An arbitrary string describing the trade.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="partyEventInformation" type="PartyEventInformation">
						<xsd:annotation>
							<xsd:documentation>A structure for storing event specific information for a reporting party.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:complexType name="TradeAmendmentContent">
		<xsd:complexContent>
			<xsd:extension base="fpml:TradeAmendmentContent">
				<xsd:sequence>
					<xsd:element name="tradeParty1" type="fpml:PartyReference">
						<xsd:annotation>
							<xsd:documentation>The trade party that directly relates to the reporter of the trade. In simple words, it must either be the "reporting party" or "reporting-for party".</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="tradeParty2" type="fpml:PartyReference">
						<xsd:annotation>
							<xsd:documentation>The party that participates in the trade other than tradeParty1. It will be used to reconcile the trade parties defined within the product.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="utiIndicator" type="xsd:boolean" minOccurs="1">
						<xsd:annotation>
							<xsd:documentation>Declaration of UTI applicability.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="specialTermsIndicator" type="xsd:boolean" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>Indicates whether special terms is applicable or not.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="bilateralComments" type="xsd:string" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>An arbitrary string describing the trade.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="partyEventInformation" type="PartyEventInformation">
						<xsd:annotation>
							<xsd:documentation>A structure for storing event specific information for a reporting party.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:complexType name="TradeNotionalChange">
		<xsd:complexContent>
			<xsd:extension base="fpml:TradeNotionalChange">
				<xsd:sequence>
					<xsd:element name="partyEventInformation" type="PartyEventInformation">
						<xsd:annotation>
							<xsd:documentation>A structure for storing event specific information for a reporting party.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:complexType name="Withdrawal">
		<xsd:complexContent>
			<xsd:extension base="fpml:Withdrawal">
				<xsd:sequence>
					<xsd:element name="partyEventInformation" type="PartyEventInformation">
						<xsd:annotation>
							<xsd:documentation>A structure for storing event specific information for a reporting party.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:complexType name="Quit">
		<xsd:complexContent>
			<xsd:extension base="fpml:AdditionalEvent">
				<xsd:sequence>
					<xsd:element ref="fpml:tradeIdentifier"/>
					<xsd:element name="partyEventInformation" type="PartyEventInformation">
						<xsd:annotation>
							<xsd:documentation>A structure for storing event specific information for a reporting party.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:complexType name="Backloading">
		<xsd:complexContent>
			<xsd:extension base="fpml:AdditionalEvent">
				<xsd:sequence>
					<xsd:element ref="fpml:trade"/>
					<xsd:element name="tradeParty1" type="fpml:PartyReference">
						<xsd:annotation>
							<xsd:documentation>The trade party that directly relates to the reporter of the trade. In simple words, it must either be the "reporting party" or "reporting-for party".</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="tradeParty2" type="fpml:PartyReference">
						<xsd:annotation>
							<xsd:documentation>The party that participates in the trade other than tradeParty1. It will be used to reconcile the trade parties defined within the product.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="backloadingDate" type="xsd:date">
						<xsd:annotation>
							<xsd:documentation>Date when the trade snapshot is extracted.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="utiIndicator" type="xsd:boolean" minOccurs="1">
						<xsd:annotation>
							<xsd:documentation>Declaration of UTI applicability.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="specialTermsIndicator" type="xsd:boolean" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>Indicates whether special terms in PartyTradeInformation is applicable or not.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="bilateralComments" type="xsd:string" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>An arbitrary string describing the trades.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="partyEventInformation" type="PartyEventInformation">
						<xsd:annotation>
							<xsd:documentation>A structure for storing event specific information for a reporting party.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:complexType name="Relink">
		<xsd:complexContent>
			<xsd:extension base="fpml:AdditionalEvent">
				<xsd:sequence>
					<xsd:element name="relinkFrom" type="fpml:TradeIdentifier">
						<xsd:annotation>
							<xsd:documentation>The trade identifier of the trade to form link from.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="relinkTo" type="fpml:TradeIdentifier" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>The trade identifier of the trade to form link to.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="partyEventInformation" type="PartyEventInformation">
						<xsd:annotation>
							<xsd:documentation>A structure for storing event specific information for a reporting party.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:complexType name="SuppressUncertain">
		<xsd:complexContent>
			<xsd:extension base="fpml:AdditionalEvent">
				<xsd:sequence>
					<xsd:element name="tradeId" type="fpml:TradeIdentifier">
						<xsd:annotation>
							<xsd:documentation>The trade identifier of the trade to be suppressed / un-suppressed from the uncertain unlink report. It can either be TR trade reference or UTI.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="suppressUncertainIndicator" type="xsd:boolean">
						<xsd:annotation>
							<xsd:documentation>An indicator to indicate whether the identified trade is to be suppressed or un-suppressed from the uncertain unlink report.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="partyEventInformation" type="PartyEventInformation">
						<xsd:annotation>
							<xsd:documentation>A structure for storing event specific information for a reporting party.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	
	<xsd:complexType name="TradeLegSizeChange">
		<xsd:annotation>
			<xsd:documentation xml:lang="en">A structure describing a change to the size of a single leg or stream of a trade.</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="fpml:TradeLegSizeChange">
				<xsd:sequence>
					<xsd:element name="legType" type="CommodityLegTypeEnum" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>Specifies the leg type of a Commodity product by which the Number of Units changes.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	
	<!-- Element declarations -->
	<xsd:element name="newTrade" type="NewTrade" substitutionGroup="fpml:additionalEvent"/>
	<xsd:element name="termination" type="TradeNotionalChange"/>
	<xsd:element name="withdrawal" type="Withdrawal"/>
	<xsd:element name="quit" type="Quit" substitutionGroup="fpml:additionalEvent"/>
	<xsd:element name="backloading" type="Backloading" substitutionGroup="fpml:additionalEvent"/>
	<xsd:element name="relink" type="Relink" substitutionGroup="fpml:additionalEvent"/>
	<xsd:element name="suppressUncertain" type="SuppressUncertain"
		substitutionGroup="fpml:additionalEvent"/>

</xsd:schema>
