<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
	<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="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="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="FIRMID_Type">
		<xs:annotation>
			<xs:documentation>Тип: "Идентификатор фирмы"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:minLength value="0"/>
			<xs:maxLength value="12"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="FIRMNAME_LONG_Type">
		<xs:annotation>
			<xs:documentation>Тип: "Hаименование участника клиринга"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:minLength value="0"/>
			<xs:maxLength value="120"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="STRING64_Type">
		<xs:annotation>
			<xs:documentation>Строка 64"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="64"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="OPERATION_TYPE_Type">
		<xs:annotation>
			<xs:documentation>
			  Тип операции:
			  OUT - вывод бумаг
			  IN - ввод бумаг
			  MOVE - перевод бумаг
			  CORP - корп. действие
			  CORR - корректировка
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
		    <xs:maxLength value="10"/>
			<xs:enumeration value="OUT"/>
			<xs:enumeration value="IN"/>
			<xs:enumeration value="MOVE"/>
			<xs:enumeration value="CORP"/>
			<xs:enumeration value="CORR"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="PAYMENT_TYPE_Type">
		<xs:annotation>
			<xs:documentation>
			  Тип платежа:
			  PAY - списание комиссии
			  REFUND - возврат комиссии		 
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
		    <xs:maxLength value="10"/>
			<xs:enumeration value="PAY"/>
			<xs:enumeration value="REFUND"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="SECURITYID_Type">
		<xs:annotation>
			<xs:documentation>Тип: "Идентификатор ценной бумаги"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="32"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="DEPOACCID_Type">
		<xs:annotation>
			<xs:documentation>Тип: "Идентификатор депо счета"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="32"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="CURRENCYID_Type">
		<xs:annotation>
			<xs:documentation>Тип: "Идентификатор валюты"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="3"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="DIRECTION_Type">
		<xs:annotation>
			<xs:documentation>Тип: "Направление депо операции 'I'- зачисление, 'D'- списание"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:minLength value="1"/>
			<xs:maxLength value="1"/>
			<xs:enumeration value="I"/>
			<xs:enumeration value="D"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="DECIMAL_36.8_Type">
		<xs:annotation>
			<xs:documentation>Тип: "Число с длиной дробной части = 8"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:decimal">
			<xs:totalDigits value="36"/>
			<xs:fractionDigits value="8"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="DECIMAL_26.8_Type">
		<xs:annotation>
			<xs:documentation>Тип: "Число с длиной дробной части = 8"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:decimal">
			<xs:totalDigits value="26"/>
			<xs:fractionDigits value="8"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="DECIMAL_26.2_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="DECIMAL_18.8_Type">
		<xs:annotation>
			<xs:documentation>Тип: "Число с длиной дробной части = 8"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:decimal">
			<xs:totalDigits value="18"/>
			<xs:fractionDigits value="8"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="WEEKDAY_Type">
		<xs:annotation>
			<xs:documentation>Тип: "Наименование дня недели"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="20"/>
			<xs:enumeration value="Понедельник"/>
			<xs:enumeration value="Вторник"/>
			<xs:enumeration value="Среда"/>
			<xs:enumeration value="Четверг"/>
			<xs:enumeration value="Пятница"/>
			<xs:enumeration value="Суббота"/>
			<xs:enumeration value="Воскресенье"/>
		</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>
		<xs:attribute name="DOC_TIME" type="xs:time" use="required">
			<!--Время формирования документа--> </xs:attribute>
		<xs:attribute name="DOC_NO" type="DOCNO_Type" use="required">
			<!--Уникальный учетный номер документа--> </xs:attribute>
		<xs:attribute name="DOC_TYPE_ID" type="DOCTYPEID_Type" use="optional">
			<!--Идентификатор типа документа--> </xs:attribute>
		<xs:attribute name="SENDER_ID" type="SENDERID_Type" use="required">
			<!--Идентификатор фирмы-отправителя документа--> </xs:attribute>
		<xs:attribute name="SENDER_NAME" type="SENDERNAME_Type" default="ОАО Отправитель"
			use="optional">
			<!--Краткое наименование отправителя--> </xs:attribute>
		<xs:attribute name="RECEIVER_ID" type="SENDERID_Type" use="required">
			<!--Код ЭДО получателя --> </xs:attribute>
		<xs:attribute name="REMARKS" type="REMARKS_Type" use="optional">
			<!--Текст примечания к документу--> </xs:attribute>
	</xs:complexType>
	
	<xs:element name="RTS_DOC">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="DOC_REQUISITES"/>
				<xs:element ref="MFB16"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="DOC_REQUISITES" type="DOC_REQUISITES_Type"/>
	<xs:element name="MFB16">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="REP_DATA" minOccurs="0"/>
				<xs:element ref="PAST_PAYMENT" minOccurs="0"/>
			</xs:sequence>
			<xs:attribute name="ReportDate" type="xs:date" use="required"/>
			<xs:attribute name="DateFrom" type="xs:date" use="required"/>
			<xs:attribute name="DateTo" type="xs:date" use="required"/>
			<xs:attribute name="ReportDesc" type="xs:string" use="optional"/>
			<xs:attribute name="ReportVersion" type="xs:string" use="optional"/>
			<xs:attribute name="WeekdayDateFrom" type="WEEKDAY_Type" use="optional"/>
			<xs:attribute name="WeekdayDateTo" type="WEEKDAY_Type" use="optional"/>
			<xs:attribute name="MainFirmId" type="FIRMID_Type" use="required"/>
			<xs:attribute name="MainFirmName" type="FIRMNAME_LONG_Type" use="required"/>
			<xs:attribute name="Volume" type="xs:positiveInteger" use="optional"/>
		    <xs:attribute name="VolumeTotal" type="xs:positiveInteger" use="optional"/>
		    <xs:attribute name="ReportNumber" type="xs:string" use="optional"/>		
		</xs:complexType>
	</xs:element>
	<xs:element name="REP_DATA">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="DATE" maxOccurs="unbounded"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="DATE">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="LIMIT" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:attribute name="Date" type="xs:date" use="required"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="LIMIT">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="ENTRY" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:attribute name="DepoAccCode" type="DEPOACCID_Type" use="required"/>
			<xs:attribute name="Isin" type="SECURITYID_Type" use="required"/>
			<xs:attribute name="Ticker" type="SECURITYID_Type" use="required"/>
			<xs:attribute name="CommCurrencyId" type="CURRENCYID_Type" use="optional"/>
			<xs:attribute name="OpeningLimit" type="DECIMAL_36.8_Type" use="required"/>
			<xs:attribute name="ClosingLimit" type="DECIMAL_36.8_Type" use="required"/>
			<xs:attribute name="OverLimit" type="DECIMAL_26.8_Type" use="required"/>
			<xs:attribute name="IncreaseLimitAgg" type="DECIMAL_26.8_Type" use="required"/>
			<xs:attribute name="DecreaseLimitAgg" type="DECIMAL_26.8_Type" use="required"/>
			<xs:attribute name="CommSummAgg" type="DECIMAL_26.2_Type" use="optional"/>
			<xs:attribute name="CalcPrice" type="DECIMAL_18.8_Type" use="optional"/>
			<xs:attribute name="CalcPriceCurrencyId" type="CURRENCYID_Type" use="optional"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="ENTRY">
		<xs:complexType>
			<xs:attribute name="Type" type="OPERATION_TYPE_Type" use="required"/>
			<xs:attribute name="DepoNo" type="STRING64_Type" use="optional"/>
			<xs:attribute name="SPBCNo" type="STRING64_Type" use="optional"/>
			<xs:attribute name="OperationAmount" type="DECIMAL_26.8_Type" use="optional"/>
			<xs:attribute name="OperationDirection" type="DIRECTION_Type" use="optional"/>
			<xs:attribute name="IncreaseLimit" type="DECIMAL_26.8_Type" use="required"/>
			<xs:attribute name="DecreaseLimit" type="DECIMAL_26.8_Type" use="required"/>
			<xs:attribute name="CommPaperAmount" type="DECIMAL_26.8_Type" use="optional"/>
			<xs:attribute name="CommSumm" type="DECIMAL_26.2_Type" use="optional"/>
			<xs:attribute name="Rate" type="DECIMAL_26.8_Type" use="optional"/>
			<xs:attribute name="PaymentDate" type="xs:date" use="optional"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="PAST_PAYMENT">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="RECORD" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="RECORD">
		<xs:complexType>
			<xs:attribute name="Type" type="OPERATION_TYPE_Type" use="required"/>
			<xs:attribute name="DepoAccCode" type="DEPOACCID_Type" use="required"/>
			<xs:attribute name="Isin" type="SECURITYID_Type" use="required"/>
			<xs:attribute name="Ticker" type="SECURITYID_Type" use="required"/>
			<xs:attribute name="Date" type="xs:date" use="required"/>
			<xs:attribute name="DepoNo" type="STRING64_Type" use="required"/>
			<xs:attribute name="SPBCNo" type="STRING64_Type" use="optional"/>
			<xs:attribute name="OperationAmount" type="DECIMAL_26.8_Type" use="required"/>
			<xs:attribute name="OperationDirection" type="DIRECTION_Type" use="required"/>
			<xs:attribute name="CommPaperAmount" type="DECIMAL_26.8_Type" use="required"/>
			<xs:attribute name="PaymentType" type="PAYMENT_TYPE_Type" use="required"/>
			<xs:attribute name="CommSumm" type="DECIMAL_26.2_Type" use="required"/>
			<xs:attribute name="CommCurrencyId" type="CURRENCYID_Type" use="required"/>
			<xs:attribute name="Rate" type="DECIMAL_26.8_Type" use="optional"/>
			<xs:attribute name="PaymentDate" type="xs:date" use="required"/>
			<xs:attribute name="CalcPrice" type="DECIMAL_18.8_Type" use="optional"/>
			<xs:attribute name="CalcPriceCurrencyId" type="CURRENCYID_Type" use="optional"/>
		</xs:complexType>
	</xs:element>
	
</xs:schema>
