<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2005 U (http://www.xmlspy.com) by Clive Raven (LogicaCMG) -->
<xs:schema xmlns:rpt="http://www.fsa.gov.uk/XMLSchema/FSATRSValidationReport-v1-0" xmlns:cmn="http://www.fsa.gov.uk/XMLSchema/FSAFeedCommon-v1-2" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.fsa.gov.uk/XMLSchema/FSATRSValidationReport-v1-0" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">
	<xs:import namespace="http://www.fsa.gov.uk/XMLSchema/FSAFeedCommon-v1-2" schemaLocation="FSAFeedCommon-v1-2.xsd"/>
	<!-- Component Types -->
	<xs:complexType name="ValidationResultType">
		<xs:annotation>
			<xs:documentation>Holds the validation result</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="ValidationStatus">
				<xs:annotation>
					<xs:documentation>Validation Result</xs:documentation>
				</xs:annotation>
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="OK"/>
						<xs:enumeration value="Partial Failure"/>
						<xs:enumeration value="XML Fail"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="ErrorDescription" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Only present if validation status = 'XML Fail'.  Describes reason for failure</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="TotalTransactions" type="xs:nonNegativeInteger" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Only omitted if validation status is 'XML Fail'</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="SuccessfulTransactions" type="xs:nonNegativeInteger" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Only omitted if validation status is 'XML Fail'</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="TxnFailureDetailsType">
		<xs:annotation>
			<xs:documentation>Details reason transaction was rejected</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="FailureType">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="Business"/>
						<xs:enumeration value="Schema"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="FailureReason" type="xs:string"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="TransactionErrorDetailsType">
		<xs:annotation>
			<xs:documentation>Details failed transaction</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="Position" type="xs:positiveInteger">
				<xs:annotation>
					<xs:documentation>Position of failed transaction in the original file</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="FirmFSARef" type="cmn:FSARefType" minOccurs="0">
				<xs:annotation>
					<xs:documentation>The FSA Code of the reporting firm for this transaction.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="TransRef" minOccurs="0">
				<xs:annotation>
					<xs:documentation>The unique reference, internal to the reporting firm, that will enable the firm to provide the FSA with more information concerning the trade if required. This reference must be unique within each report file, with the exception that a reference can occur twice if one occurrence is a cancellation. </xs:documentation>
				</xs:annotation>
				<xs:simpleType>
					<xs:restriction base="cmn:NonEmptyString">
						<xs:maxLength value="25"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
			<xs:element name="Cancellation" type="xs:boolean" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Indicates if the transaction is a cancellation. If ommitted this is logically the same as providing a value of 'false'.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element ref="rpt:TxnFailureDetails">
				<xs:annotation>
					<xs:documentation>Desribes validation failure></xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="ValidationReportType">
		<xs:sequence>
			<xs:element name="SubmttedReportDetails">
				<xs:annotation>
					<xs:documentation>Provides details of the original report (where readable in the original report).</xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:sequence>
						<xs:element name="FileName" type="xs:string">
							<xs:annotation>
								<xs:documentation>Filename of uploaded report.</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="ReportType" minOccurs="0">
							<xs:annotation>
								<xs:documentation>Type of the original report.</xs:documentation>
							</xs:annotation>
							<xs:simpleType>
								<xs:restriction base="xs:string">
									<xs:enumeration value="HSFMG"/>
									<xs:enumeration value="HSFPP"/>
									<xs:enumeration value="HSFRI"/>
									<xs:enumeration value="Markets"/>
								</xs:restriction>
							</xs:simpleType>
						</xs:element>
						<xs:element name="FeedTargetSchemaVersion" type="xs:string" minOccurs="0">
							<xs:annotation>
								<xs:documentation>Identifies the version of the business specific schema to which this report conforms.</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="SubmittingFirm" type="cmn:FSARefType" minOccurs="0">
							<xs:annotation>
								<xs:documentation>The FSA Code of the firm submitting the report. This will either be the FSA Code of the reporting fiirm themselves, or may be the FSA Code of a regulated agent who has registered with the FSA to submit transactions on behalf of the reporting firm.registered agency.</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="SubmittingDept" minOccurs="0">
							<xs:annotation>
								<xs:documentation>The identifier of the department within the submitting firm who created this report - optional.</xs:documentation>
							</xs:annotation>
							<xs:simpleType>
								<xs:restriction base="cmn:NonEmptyString">
									<xs:maxLength value="20"/>
									<xs:pattern value="[a-zA-Z0-9]+"/>
								</xs:restriction>
							</xs:simpleType>
						</xs:element>
						<xs:element name="ReportCreationDate" type="xs:date" minOccurs="0">
							<xs:annotation>
								<xs:documentation>Report creation date.</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="ReportIdentifier" minOccurs="0">
							<xs:annotation>
								<xs:documentation>Unique identifier for the report (wthin the context of the submitter, submitting firm, submitting department and report creation date).</xs:documentation>
							</xs:annotation>
							<xs:simpleType>
								<xs:restriction base="cmn:NonEmptyString">
									<xs:maxLength value="25"/>
								</xs:restriction>
							</xs:simpleType>
						</xs:element>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="ValidationResult" type="rpt:ValidationResultType"/>
			<xs:element ref="rpt:TransactionErrorDetails" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="TransactionErrorDetails" type="rpt:TransactionErrorDetailsType">
		<xs:annotation>
			<xs:documentation>Details validation failures for individual transactions.  Only present when Validation Status is 'Partial Failure'.  Core Items are only included if they are readable and valid within the original report. </xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="TxnFailureDetails" type="rpt:TxnFailureDetailsType"/>
	<!-- Overall structure-->
	<xs:element name="TRSValidationReport" type="rpt:ValidationReportType">
		<xs:annotation>
			<xs:documentation>Validation report on an uploaded file</xs:documentation>
		</xs:annotation>
	</xs:element>
</xs:schema>
