<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
	
	<xs:simpleType name="SETTLECURRENCY_Type">
		<xs:annotation>
			<xs:documentation>Тип: "Идентификатор вылюты"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="4"/>
		</xs:restriction>
	</xs:simpleType>
	
	<xs:simpleType name="VOLUME_Type">
		<xs:annotation>
			<xs:documentation>Тип: "Вещественное число с длиной дробной части = 2"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:decimal">
			<xs:totalDigits value="26"/>
			<xs:fractionDigits value="2"/>
		</xs:restriction>
	</xs:simpleType>
	
	<xs:simpleType name="DOCNO_Type">
		<xs:annotation>
			<xs:documentation>Тип: "Уникальный учетный номер документа в системе ЭДО"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:minLength value="0"/>
			<xs:maxLength value="20"/>
			<xs:pattern value="[A-Z,0-9,//]{1,20}"/>
		</xs:restriction>
	</xs:simpleType>
	
	<xs:simpleType name="DOCTYPEID_Type">
		<xs:annotation>
			<xs:documentation>Тип: "Идентификатор типа документа в системе электронного документооборота"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:minLength value="0"/>
			<xs:maxLength value="20"/>
			<xs:pattern value="[A-Z,0-9,_,//,А-Я]{1,20}"/>
		</xs:restriction>
	</xs:simpleType>
	
	<xs:simpleType name="SENDERID_Type">
		<xs:annotation>
			<xs:documentation>Тип: "Идентификатор фирмы отправителя/получателя ЭДО"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="7"/>
			<xs:minLength value="3"/>
		</xs:restriction>
	</xs:simpleType>
	
	<xs:simpleType name="SENDERNAME_Type">
		<xs:annotation>
			<xs:documentation>Тип: "Краткое наименование отправителя"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:minLength value="0"/>
			<xs:maxLength value="120"/>
		</xs:restriction>
	</xs:simpleType>
	
	<xs:simpleType name="REMARKS_Type">
		<xs:annotation>
			<xs:documentation>Тип: "Примечание к документу"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:minLength value="0"/>
			<xs:maxLength value="120"/>
		</xs:restriction>
	</xs:simpleType>
	
	<xs:simpleType name="GUARANTEETYPE_Type">
		<xs:annotation>
			<xs:documentation>Тип: "Тип средств обеспечения"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="50"/>
			<xs:enumeration value="INDIVIDUAL"/>
			<xs:enumeration value="COLLECTIVE"/>
			<xs:enumeration value="OTHER"/>
			<xs:enumeration value="UNKNOWN"/>
		</xs:restriction>
	</xs:simpleType>

	<xs:complexType name="DOC_REQUISITES_Type">
		<xs:annotation>
			<xs:documentation>Реквизиты документа в системе электронного документооборота</xs:documentation>
		</xs:annotation>
		<xs:attribute name="DOC_DATE" type="xs:date" use="required"/>	
		<xs:attribute name="DOC_TIME" type="xs:time" use="required"/>
		<xs:attribute name="DOC_NO" type="DOCNO_Type" use="required"/>			
		<xs:attribute name="DOC_TYPE_ID" type="DOCTYPEID_Type"  use="optional"/>			
		<xs:attribute name="SENDER_ID" type="SENDERID_Type" use="optional"/>
		<xs:attribute name="SENDER_NAME" type="SENDERNAME_Type" default="ОАО Отправитель" use="optional"/>
		<xs:attribute name="RECEIVER_ID" type="SENDERID_Type" use="optional"/>			
		<xs:attribute name="REMARKS" type="REMARKS_Type" use="optional"/>			
	</xs:complexType>
	
	<xs:element name="RTS_DOC">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="DOC_REQUISITES"/>
				<xs:element ref="BUH15K"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>

	<xs:element name="DOC_REQUISITES" type="DOC_REQUISITES_Type"/>
	
	<xs:element name="BUH15K">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="CURRENCY" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:attribute name="ReportDate" type="xs:date" use="optional"/>
			<xs:attribute name="ReportDesc" type="xs:string" use="required"/>
			<xs:attribute name="ReportVersion" type="xs:string" use="optional"/>
			<xs:attribute name="DateFrom" type="xs:date" use="required"/>
			<xs:attribute name="DateTo" type="xs:date" use="required"/>
			<xs:attribute name="Month" type="xs:string" use="optional"/>
			<xs:attribute name="Year" type="xs:integer" use="optional"/>
		</xs:complexType>
	</xs:element>
	
	<xs:element name="CURRENCY">
		<xs:complexType>
		  <xs:sequence>
			<xs:element ref="MEMBER" maxOccurs="unbounded"/>
			<xs:element ref="TOTAL" maxOccurs="1"/>
		  </xs:sequence>
		  <xs:attribute name="SettleCurrency" use="required" type="SETTLECURRENCY_Type"/>
		  <xs:attribute name="GuaranteeType" use="required" type="GUARANTEETYPE_Type"/>
		  <xs:attribute name="ClearingAccountPrefix" use="optional" type="xs:string"/>
		</xs:complexType>
	</xs:element>
	
	<xs:element name="MEMBER">
		<xs:complexType>
		  <xs:sequence>
			<xs:element ref="ASSETS" maxOccurs="1" />
		  </xs:sequence>
		  <xs:attribute name="MemberCode" use="required" type="xs:string"/>
		  <xs:attribute name="MemberDetails" use="required" type="xs:string"/>
		  <xs:attribute name="MemberShortName" use="required" type="xs:string"/>
       </xs:complexType>
	</xs:element>

	<xs:element name="TOTAL">
		<xs:complexType>
		  <xs:sequence>
			<xs:element ref="ASSETS" maxOccurs="1"/>
		  </xs:sequence>
		</xs:complexType>
	</xs:element>
	
	<xs:element name="ASSETS">
		<xs:complexType>
		  <xs:attribute name="VolumeInit" use="required" type="VOLUME_Type"/>
		  <xs:attribute name="VolumeInputOutput" use="required" type="VOLUME_Type"/>
		  <xs:attribute name="VolumeConverted" use="required" type="VOLUME_Type"/>
		  <xs:attribute name="VolumeDeals" use="required" type="VOLUME_Type"/>
		  <xs:attribute name="ClearingFee" use="required" type="VOLUME_Type"/>
		  <xs:attribute name="ExchangeFee" use="required" type="VOLUME_Type"/>
		  <xs:attribute name="LicenseFee" use="required" type="VOLUME_Type"/>
		  <xs:attribute name="ConversionManualFee" use="required" type="VOLUME_Type"/>
		  <xs:attribute name="ConversionDealFee" use="required" type="VOLUME_Type"/>
		  <xs:attribute name="Dividend" use="required" type="VOLUME_Type"/>
		  <xs:attribute name="Fine" use="required" type="VOLUME_Type"/>
		  <xs:attribute name="VolumeFinal" use="required" type="VOLUME_Type"/>
		  <xs:attribute name="VolumeDelta" use="required" type="VOLUME_Type"/>
		  <xs:attribute name="ClearingFeeDepoWdrawOverLimit" use="required" type="VOLUME_Type"/>      
		  <xs:attribute name="ClearingFeeCurrencyWdraw" use="required" type="VOLUME_Type"/>
		  <xs:attribute name="ClearingFeeHolding" use="required" type="VOLUME_Type"/>
		  <xs:attribute name="ClearingFeeHoldingSoleClient" use="required" type="VOLUME_Type"/>
		  <xs:attribute name="ClearingFeeDelivery" use="required" type="VOLUME_Type"/>
		  <xs:attribute name="ClearingFeeIntrabrokerRepoShare" use="required" type="VOLUME_Type"/>      
		  <xs:attribute name="ClearingFeeIntrabrokerRepoBond" use="required" type="VOLUME_Type"/>
		  <xs:attribute name="ExchangeMorningFee" use="required" type="VOLUME_Type"/>
		  <xs:attribute name="ClearingFeeDepoTransfer" use="required" type="VOLUME_Type"/>      
		  <xs:attribute name="ClearingHoldingEuroFee" use="required" type="VOLUME_Type"/>
		  <xs:attribute name="ClearingFeeFatcaQuestionnaire" use="required" type="VOLUME_Type"/>
		  <xs:attribute name="ClearingFeeFatcaAsset" use="required" type="VOLUME_Type"/>      
		  <xs:attribute name="CompensationFee" use="required" type="VOLUME_Type"/> 
		  <xs:attribute name="CompensationFeeDepoHolding" use="required" type="VOLUME_Type"/> 
		  <xs:attribute name="OtherCharges" use="required" type="VOLUME_Type"/>
		  <xs:attribute name="DepositPercent" use="required" type="VOLUME_Type"/>
		  <xs:attribute name="DepoExternalFee" use="required" type="VOLUME_Type"/>
		  <xs:attribute name="MarketMakerRoutingFee" use="required" type="VOLUME_Type"/>
		  <xs:attribute name="IncomePayment" use="required" type="VOLUME_Type"/>
		  <xs:attribute name="StampDuty" use="required" type="VOLUME_Type"/>
		  <xs:attribute name="StampDutyFee" use="required" type="VOLUME_Type"/>
		</xs:complexType>
	</xs:element>
	
</xs:schema>
