﻿<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output version="4.0" method="html" indent="no" encoding="UTF-8" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
	<xsl:param name="SV_OutputFormat" select="'HTML'"/>
	<xsl:variable name="XML1" select="/"/>
	<xsl:decimal-format decimal-separator="," grouping-separator=" "/>
	<xsl:template match="/">
		<html>
			<head>
				<title>
					<xsl:value-of select="/RTS_DOC/MFB66/@ReportDesc"/> за <xsl:value-of select="/RTS_DOC/MFB66/@ReportDate"/>
				</title>
				<meta http-equiv="X-UA-Compatible" content="IE=5"/>
				<style type="text/css">
					@page 
					{
					    margin-left:0.6in;
					    margin-right:0.6in;
					    margin-top:0.79in;
					    margin-bottom:0.79in;
					}
					td
					{
					    padding-top:1px;
					    padding-right:3px;
					    padding-bottom:1px;
					    padding-left:3px;
					}
					.t1
					{
					    font-size:8pt;
					}
					.entry
					{
					    font-size:8pt;
					    background-color:#f7f3eb;
					}
					.h1
					{
					    background-color:#B0C4DE;
					    font-size:12pt;
					    font-weight:bold;
					    text-align:center;
					}
					.h2
					{
					    background-color:#FFFAF0;
					    font-size:10pt;
					    font-weight:bold;
					    text-align:center;
					}
					.h3
					{
					    background-color:#E6E6FA;
					    text-align:left;
					    vertical-align:top;
					    font-size:9pt;
					    font-weight:bold;
					}
					.h4
					{
					    background-color:#E6E6FA;
					    text-align:left;
					    vertical-align:top;
					    font-size:8pt;
					    font-weight:bold;
					}
					table
					{
					    border-collapse:collapse;
					    border-bottom:0;
					    border-left:0;
					    border-top:0;
					    border-right:0;
					    background-color:#FFFAF0;
					    color:#191970;
					    font-size:8pt;
					    font-weight:400;
					    font-style:normal;
					    font-family:"Arial";
					    word-wrap:break-word;
					}</style>
			</head>
			<body>
				<xsl:variable name="var" select="RTS_DOC/DOC_REQUISITES/@SENDER_ID"/>
				<xsl:choose>
					<xsl:when test="$var='MFBIM'">  <!-- RUSSIAN HEADER-->
						<xsl:for-each select="$XML1">
							<xsl:for-each select="RTS_DOC">
								<div>
									<xsl:for-each select="DOC_REQUISITES">
										<table width="100%" style="background-color=#FFFAF0; word-wrap:break-word; border:0; border-bottom:0; border-collapse:collapse; border-left:0; border-right:0;" border="1">
											<xsl:variable name="CurrContextGrid_3" select="."/>
											<tr style="text-align:center; vertical-align:Center; word-wrap:break-word; font-size:12; font-weight:bold; background-color= #B0C4DE; color:#191970; ">
												<th colspan="5">
													<xsl:choose>
														<xsl:when test="@SENDER_NAME!=''">
															<span>
																<xsl:value-of select="string(.)"/>
															</span>
														</xsl:when>
														<xsl:otherwise>
															<xsl:text>Публичное акционерное общество Клиринговый центр МФБ</xsl:text>
														</xsl:otherwise>
													</xsl:choose>
												</th>
											</tr>
											<tr style="background-color=#E6E6FA; text-align:center;">
												<td width="27%">
													<xsl:text>Документ</xsl:text>
												</td>
												<td width="7%">
													<xsl:text>Тип</xsl:text>
												</td>
												<td width="15%">
													<xsl:text>ID фирмы-отправителя</xsl:text>
												</td>
												<td>
													<xsl:text>Код ЭДО РТС получателя</xsl:text>
												</td>
												<td rowspan="2" style="font-style:italic; text-align:left; vertical-align:top; background-color=#FFFAF0; color:#191970; ">
													<span>
														<xsl:text>Примечание: </xsl:text>
													</span>
													<xsl:for-each select="@REMARKS">
														<xsl:value-of select="string(.)"/>
													</xsl:for-each>
												</td>
											</tr>
											<tr style="text-align:center">
												<td>
													<xsl:for-each select="@DOC_NO">
														<xsl:value-of select="string(.)"/>
													</xsl:for-each>
													<xsl:text> от </xsl:text>
													<xsl:for-each select="@DOC_DATE">
														<xsl:variable name="seqContentStrings_0">
															<xsl:value-of select="format-number(number(substring(string(string(.)), 9, 2)), '00')"/>
															<xsl:text>-</xsl:text>
															<xsl:value-of select="format-number(number(substring(string(string(.)), 6, 2)), '00')"/>
															<xsl:text>-</xsl:text>
															<xsl:value-of select="format-number(number(substring(string(string(string(.))), 1, 4)), '0000')"/>
														</xsl:variable>
														<xsl:variable name="sContent_0" select="string($seqContentStrings_0)"/>
														<xsl:value-of select="$sContent_0"/>
													</xsl:for-each>
													<xsl:text> </xsl:text>
													<xsl:for-each select="@DOC_TIME">
														<xsl:value-of select="string(.)"/>
													</xsl:for-each>
													<xsl:text> (MSK)</xsl:text>
												</td>
												<td>
													<xsl:for-each select="@DOC_TYPE_ID">
														<xsl:value-of select="string(.)"/>
													</xsl:for-each>
												</td>
												<td>
													<xsl:for-each select="@SENDER_ID">
														<xsl:value-of select="string(.)"/>
													</xsl:for-each>
												</td>
												<td>
													<xsl:for-each select="@RECEIVER_ID">
														<xsl:value-of select="string(.)"/>
													</xsl:for-each>
												</td>
											</tr>
										</table>
									</xsl:for-each>
								</div>
								<xsl:for-each select="MFB66">
									<table width="100%" style="background-color=#FFFAF0; word-wrap:break-word; border:0; border-bottom:0; border-collapse:collapse; border-left:0; border-right:0;" border="1">
										<th colspan="8" style="text-align:center;  color:#191970;  vertical-align:Center; word-wrap:break-word; font-size:15; font-weight:bold; background-color= #B0C4DE;">
											<xsl:choose>
												<xsl:when test="@ReportDesc!=''">
													<span>
														<xsl:value-of select="@ReportDesc"/>
													</span>
												</xsl:when>
												<xsl:otherwise>
													<xsl:text>Отчет о средствах на клиринговых регистрах</xsl:text>
												</xsl:otherwise>
											</xsl:choose>
										</th>
										<tr style="text-align:center;">
											<td width="17%" style="background-color=#E6E6FA; ">
												<xsl:text>Дата отчета:</xsl:text>
											</td>
											<td width="10%" style="background-color=#E6E6FA; ">
												<xsl:text>Номер отчета:</xsl:text>
											</td>
											<td width="10%" style="background-color=#E6E6FA; ">
												<xsl:text>Том отчета:</xsl:text>
											</td>
											<td width="14%" style="background=#E6E6FA;">
												<xsl:text>Код участника клиринга:</xsl:text>
											</td>
											<td width="14%" style="background=#E6E6FA;">
												<xsl:text>ИНН / TIN участника клиринга:</xsl:text>
											</td>
											<td colspan="2" width="auto" style="background=#E6E6FA;">
												<xsl:text>Наименование участника клиринга:</xsl:text>
											</td>
										</tr>
										<tr>
											<td style="text-align:center; ">
												<xsl:for-each select="@ReportDate">
													<span>
														<xsl:variable name="seqContentStrings_1">
															<xsl:value-of select="format-number(number(substring(string(string(.)), 9, 2)), '00')"/>
															<xsl:text>-</xsl:text>
															<xsl:value-of select="format-number(number(substring(string(string(.)), 6, 2)), '00')"/>
															<xsl:text>-</xsl:text>
															<xsl:value-of select="format-number(number(substring(string(string(string(.))), 1, 4)), '0000')"/>
														</xsl:variable>
														<xsl:variable name="sContent_1" select="string($seqContentStrings_1)"/>
														<xsl:value-of select="$sContent_1"/>
													</span>
												</xsl:for-each>
												<xsl:for-each select="@Weekday">
													<span>
														<xsl:text> (</xsl:text>
														<xsl:value-of select="string(.)"/>
														<xsl:text>)</xsl:text>
													</span>
												</xsl:for-each>
											</td>
											<td style="text-align:center;  ">
												<xsl:for-each select="@ReportNumber">
													<xsl:value-of select="string(.)"/>
												</xsl:for-each>
											</td>
											<td style="text-align:center;  ">
												<xsl:for-each select="@Volume">
													<xsl:value-of select="string(.)"/>
												</xsl:for-each>
												<xsl:text> из </xsl:text>
												<xsl:for-each select="@VolumeTotal">
													<xsl:value-of select="string(.)"/>
												</xsl:for-each>
											</td>
											<td style="text-align:center;  ">
												<xsl:for-each select="@MainFirmId">
													<xsl:value-of select="string(.)"/>
												</xsl:for-each>
											</td>
											<td style="text-align:center;">
												<xsl:for-each select="@MainFirmINN">
													<xsl:value-of select="string(.)"/>
												</xsl:for-each>
											</td>
											<td colspan="2" style="text-align:center;  ">
												<xsl:for-each select="@FirmName">
													<xsl:value-of select="string(.)"/>
												</xsl:for-each>
												<xsl:for-each select="@MainFirmName">
													<xsl:value-of select="string(.)"/>
												</xsl:for-each>
											</td>
										</tr>
									</table>
									<br/>
									<!--Проверка на версионность, и разветвление на разные типы отчетов -->
									<xsl:choose>
										<xsl:when test="@ReportVersion=1">
											<xsl:for-each select="FIRM">
												<table width="70%" style="background-color=#FFFAF0; font-size:11; word-wrap:break-word; border:0; border-bottom:0; border-collapse:collapse; border-left:0; border-right:0;" border="1">
													<tr>
														<td width="30%" style="background-color= #B0C4DE;">
															<xsl:text>Участник торгов</xsl:text>
														</td>
														<td style="background-color= #B0C4DE;">
															<xsl:text>Наименование участника торгов</xsl:text>
														</td>
													</tr>
													<tr>
														<td width="30%" style="font-weight: bold; font-size:12;">
															<xsl:for-each select="@FirmID">
																<xsl:value-of select="string(.)"/>
															</xsl:for-each>
														</td>
														<td style="font-weight: bold; font-size:12; ">
															<xsl:for-each select="../@FirmName">
																<xsl:value-of select="string(.)"/>
															</xsl:for-each>
														</td>
													</tr>
												</table>
												<br/>
												<xsl:for-each select="SETTLE">
													<xsl:choose>
														<xsl:when test="POSTYPES/@PosType = 'C'">
															<table width="100%" style="background-color=#FFFAF0; word-wrap:break-word; border:0; border-bottom:0; border-collapse:collapse; border-left:0; border-right:0;" border="1">
																<tr>
																	<td width="15%" style="background-color= #B0C4DE; font-weight: bold; font-size:12;">
																		<xsl:text>Данные по ТКС</xsl:text>
																	</td>
																	<xsl:choose>
																		<xsl:when test="POSTYPES/GROUP/RECORDS/ENTRY">
																			<td style="background-color= #B0C4DE; font-weight: bold; font-size:12;">
																				<xsl:for-each select="@ClrAccCode">
																					<xsl:value-of select="string(.) "/>
																				</xsl:for-each>
																			</td>
																			<td colspan="6" style="background-color= #B0C4DE; font-weight: bold; font-size:12;">
																				<xsl:text>Денежные средства</xsl:text>
																			</td>
																			<td style="background-color= #B0C4DE; font-weight: bold; font-size:12;">
																				<xsl:text>Группа активов </xsl:text>
																			</td>																			
																			<td style="background-color= #B0C4DE;  font-size:12;">	
																				<xsl:value-of select="POSTYPES/GROUP/@GroupType"/>
																			</td>
																		</xsl:when>
																		<xsl:otherwise>
																			<td style="background-color= #B0C4DE; font-weight: bold; font-size:12;">
																				<xsl:for-each select="@ClrAccCode">
																					<xsl:value-of select="string(.) "/>
																				</xsl:for-each>
																			</td>
																			<td colspan="6" style="background-color= #B0C4DE; font-weight: bold; font-size:12;">
																				<xsl:text>Движение по ТКС по денежным средствам не производилось</xsl:text>
																			</td>																			
																			<td style="background-color= #B0C4DE; font-weight: bold; font-size:12;">
																				<xsl:text>Группа активов </xsl:text>
																			</td>																			
																			<td style="background-color= #B0C4DE; font-size:12;">	
																				<xsl:value-of select="POSTYPES/GROUP/@GroupType"/>
																			</td>
																		</xsl:otherwise>
																	</xsl:choose>
																</tr>
																<xsl:for-each select="POSTYPES">
																	<!--<xsl:for-each select="GROUP">-->
																	<!--<xsl:for-each select="RECORDS">-->
																	<xsl:choose>
																		<xsl:when test="@PosType = 'C'">
																			<tr>
																				<td class="h3" colspan="3" style="background-color= #CFCED9; color=#191970 ">
																					<xsl:text>Код валюты</xsl:text>
																				</td>
																				<td class="h3" colspan="3" style="background-color= #CFCED9; color=#191970 ">
																					<xsl:text>Наименование валюты</xsl:text>
																				</td>
																				<td class="h3" width="10%" style="background-color= #CFCED9; color=#191970 ">
																					<xsl:text>Входящий остаток: </xsl:text>
																				</td>																			
																				<td class="h3" width="10%" style="background-color= #CFCED9; color=#191970 ">
																					<xsl:text>Исходящий остаток: </xsl:text>
																				</td>
																				<td class="h3" width="10%" style="background-color= #CFCED9; color=#191970  ">
																					<xsl:text>Дебет: </xsl:text>
																				</td>
																				<td class="h3" width="10%" style="background-color= #CFCED9; color=#191970  ">
																					<xsl:text>Кредит: </xsl:text>
																				</td>
																			</tr>
																			<xsl:for-each select="GROUP">
																				<xsl:for-each select="RECORDS">
																					<tr height="20">
																						<td style="font-size:12; " colspan="3">
																							<xsl:value-of select="@CurrencyId"/>
																						</td>
																						<td style="font-size:12; " colspan="3">
																							<xsl:value-of select="@CurrencyName"/>
																						</td>
																						<td style="text-align:right; font-size:12;">
																							<xsl:value-of select="format-number(@OpeningBalance,'### ### ##0,00')"/>
																						</td>
																						<td style="text-align:right; font-size:12;">
																							<xsl:value-of select="format-number(@ClosingBalance,'### ### ##0,00')"/>
																						</td>
																						<td style="text-align:right; font-size:12;">
																							<xsl:for-each select="@DebitSum">
																								<xsl:value-of select="format-number(.,'-### ### ##0,00') "/>
																							</xsl:for-each>
																						</td>
																						<td style="text-align:right; font-size:12;">
																							<xsl:for-each select="@CreditSum">
																								<xsl:value-of select="format-number(.,'### ### ##0,00') "/>
																							</xsl:for-each>
																						</td>
																					</tr>
																					<xsl:choose>
																						<xsl:when test="ENTRY">
																							<!---<xsl:if test='ENTRY'>-->
																							<tr>
																								<td class="h4" colspan="2" style="background-color= #E6E6FA; color=#191970">
																									<xsl:text>Тип операции с активом</xsl:text>
																								</td>
																								<td class="h4" colspan="2" style="background-color= #E6E6FA; color=#191970">
																									<xsl:text>Назначение платежа</xsl:text>
																								</td>
																								<td class="h4" style="background-color= #E6E6FA; color=#191970">
																									<xsl:text>Дата операции</xsl:text>
																								</td>
																								<td class="h4" style="background-color= #E6E6FA; color=#191970">
																									<xsl:text>Время операции (MSK)</xsl:text>
																								</td>
																								<td class="h4" style="background-color= #E6E6FA; color=#191970">
																									<xsl:text>Номер документа</xsl:text>
																								</td>
																								<td class="h4" style="background-color= #E6E6FA; color=#191970">
																									<xsl:text>Дополнительный номер документа</xsl:text>
																								</td>
																								<td class="h4" style="background-color= #E6E6FA; color=#191970">
																									<xsl:text>Дебет</xsl:text>
																								</td>
																								<td class="h4" style="background-color= #E6E6FA; color=#191970">
																									<xsl:text>Кредит</xsl:text>
																								</td>
																							</tr>
																							<xsl:for-each select="ENTRY">
																								<tr>
																									<td colspan="2" class="entry" style="text-align:left; word-wrap:break-word;">
																										<xsl:choose>
																											<xsl:when test="@OperationCode = '1'">
																												<xsl:text>вн./возвр. ср-в обеспечения</xsl:text>
																											</xsl:when>
																											<xsl:when test="@OperationCode = '2'">
																												<span>
																													<xsl:text>вн./возвр. ср-в обеспечения на основании перевода между регистрами, осущ. Участником</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '5'">
																												<span>
																													<xsl:text>исп. об-в/треб. по договорам с наступившей Датой исполнения</xsl:text>
																												</span>
																											</xsl:when>																											
																											<xsl:when test="@OperationCode  = '8'">
																												<span>
																													<xsl:text>об-ва по передаче дохода</xsl:text>
																												</span>
																											</xsl:when>
																											
																											<xsl:when test="@OperationCode  = '18'">
																												<span>
																													<xsl:text>вн./возвр. средств в Гарантийный Фонд</xsl:text>
																												</span>
																											</xsl:when>																											
																											<xsl:when test="@OperationCode  = '28'">
																												<span>
																													<xsl:text>ввод-вывод активов в результате корпоративных действий</xsl:text>
																												</span>
																											</xsl:when>																											
																											<xsl:when test="@OperationCode  = '48'">
																												<span>
																													<xsl:text>блокировка и разблокировка активов по распоряжению Клирингового Центра </xsl:text>
																												</span>
																											</xsl:when>																											
																											<xsl:otherwise>
																												<span>
																													<xsl:text/>
																												</span>
																											</xsl:otherwise>
																										</xsl:choose>
																									</td>
																									<td colspan="2" class="entry" style="text-align:right; ">
																										<xsl:for-each select="@Purpose">
																											<xsl:value-of select="string(.)"/>
																										</xsl:for-each>
																									</td>
																									<td class="entry" style="text-align:right; ">
																										<xsl:for-each select="@OperationDate">
																											<xsl:value-of select="string(.)"/>
																										</xsl:for-each>
																									</td>
																									<td class="entry" style="text-align:right; ">
																										<xsl:for-each select="@OperationTime">
																											<xsl:value-of select="string(.)"/>
																										</xsl:for-each>
																									</td>
																									<td class="entry" style="text-align:right; ">
																										<xsl:for-each select="@DocNo">
																											<xsl:value-of select="string(.) "/>
																										</xsl:for-each>
																									</td>
																									<td class="entry" style="text-align:right; ">
																										<xsl:for-each select="@CustomerNo">
																											<xsl:value-of select="string(.) "/>
																										</xsl:for-each>
																									</td>
																									<td class="entry" style="text-align:right; ">
																										<xsl:for-each select="@Debit">
																											<xsl:value-of select="format-number(.,'-### ### ##0,00') "/>
																										</xsl:for-each>
																									</td>
																									<td class="entry" style="text-align:right; ">
																										<xsl:for-each select="@Credit">
																											<xsl:value-of select="format-number(.,'### ### ##0,00') "/>
																										</xsl:for-each>
																									</td>
																								</tr>
																							</xsl:for-each>
																							<!--ENTRY -->
																							<td colspan="12" style="background-color=#CFCED9; border-bottom:1; text-align:right; color=#191970"> </td>
																							<tr/>
																						</xsl:when>
																					</xsl:choose>
																				</xsl:for-each>
																				<!-- RECORD -->
																			</xsl:for-each>
																			<!-- GROUP -->
																		</xsl:when>
																	</xsl:choose>
																</xsl:for-each>
																<!-- POSTYPE -->
															</table>
															<br/>
														</xsl:when>
													</xsl:choose>
												</xsl:for-each>
												<!-- SETTLE -->
												<xsl:for-each select="SETTLE">
													<xsl:choose>
														<xsl:when test="POSTYPES/@PosType = 'S'">
															<table width="100%" style="background-color=#FFFAF0; word-wrap:break-word; border:0; border-bottom:0; border-collapse:collapse; border-left:0; border-right:0;" border="1">
																<tr>
																	<td style="background-color= #B0C4DE; font-weight: bold; font-size:12;">
																		<xsl:text>Данные по ТКС</xsl:text>
																	</td>
																	<xsl:choose>
																		<xsl:when test="POSTYPES/GROUP/RECORDS/ENTRY">
																			<td style="background-color= #B0C4DE; font-weight: bold; font-size:12;">
																				<xsl:for-each select="@ClrAccCode">
																					<xsl:value-of select="string(.) "/>
																				</xsl:for-each>
																			</td>
																			<td colspan="8" style="background-color= #B0C4DE; font-weight: bold; font-size:12;">
																				<xsl:text>Ценные бумаги</xsl:text>
																			</td>
																			<td style="background-color= #B0C4DE; font-weight: bold; font-size:12;">
																				<xsl:text>Группа активов </xsl:text>
																			</td>
																			<td style="background-color= #B0C4DE;  font-size:12;">	
																				<xsl:value-of select="POSTYPES/GROUP/@GroupType"/>
																			</td>
																		</xsl:when>
																		<xsl:otherwise>
																			<td style="background-color= #B0C4DE; font-weight: bold; font-size:12;">
																				<xsl:for-each select="@ClrAccCode">
																					<xsl:value-of select="string(.) "/>
																				</xsl:for-each>
																			</td>
																			<td colspan="8" style="background-color= #B0C4DE; font-weight: bold; font-size:12;">
																				<xsl:text>Движение по ценным бумагам по ТКС не производилось</xsl:text>
																			</td>
																			<td style="background-color= #B0C4DE; font-weight: bold; font-size:12;">
																				<xsl:text>Группа активов </xsl:text>
																			</td>
																			<td style="background-color= #B0C4DE;  font-size:12;">		
																				<xsl:value-of select="POSTYPES/GROUP/@GroupType"/>
																			</td>
																		</xsl:otherwise>
																	</xsl:choose>
																</tr>
																<xsl:for-each select="POSTYPES">
																	<!--<xsl:for-each select="GROUP">-->
																	<!--<xsl:for-each select="RECORDS">-->
																	<xsl:choose>
																		<xsl:when test="@PosType = 'S'">
																			<tr>
																				<td class="h3" style="background-color= #CFCED9; color=#191970">
																					<xsl:text>Номер субсчета депо</xsl:text>
																				</td>
																				<td class="h3" style="background-color= #CFCED9; color=#191970">
																					<xsl:text>Номер раздела субсчета депо</xsl:text>
																				</td>
																				<td class="h3" style="background-color= #CFCED9; color=#191970 ">
																					<xsl:text>Код ЦБ</xsl:text>
																				</td>
																				<td class="h3" colspan="4" style="background-color= #CFCED9; color=#191970 ">
																					<xsl:text>Наименование ЦБ</xsl:text>
																				</td>
																				<td class="h3" style="background-color= #CFCED9; color=#191970 ">
																					<xsl:text>ISIN:</xsl:text>
																				</td>
																				<td class="h3" width="10%" style="background-color= #CFCED9; color=#191970 ">
																					<xsl:text>Входящий остаток: </xsl:text>
																				</td>
																				<td class="h3" width="10%" style="background-color= #CFCED9; color=#191970 ">
																					<xsl:text>Исходящий остаток: </xsl:text>
																				</td>
																				<td class="h3" width="10%" style="background-color= #CFCED9; color=#191970 ">
																					<xsl:text>Дебет: </xsl:text>
																				</td>
																				<td class="h3" width="10%" style="background-color= #CFCED9; color=#191970 ">
																					<xsl:text>Кредит: </xsl:text>
																				</td>
																			</tr>
																			<xsl:for-each select="GROUP">
																				<xsl:for-each select="RECORDS">
																					<tr height="20">
																						<td style="font-size:12">
																							<xsl:for-each select="../@DepoAccount">
																								<xsl:value-of select="string(.) "/>
																							</xsl:for-each>
																						</td>
																						<td style="font-size:12">
																							<xsl:for-each select="../@DepoSection">
																								<xsl:value-of select="string(.) "/>
																							</xsl:for-each>
																						</td>
																						<td style="font-size:12">
																							<xsl:value-of select="@SecurityId"/>
																						</td>
																						<td colspan="4" style="font-size:12">
																							<xsl:value-of select="@SecShortName"/>
																						</td>
																						<td style="font-size:12">
																							<xsl:value-of select="@ISIN"/>
																						</td>
																						<td style="text-align:right; font-size:12">
																							<xsl:value-of select="format-number(@OpeningBalance,'### ### ##0')"/>
																						</td>
																						<td style="text-align:right; font-size:12">
																							<xsl:value-of select="format-number(@ClosingBalance,'### ### ##0')"/>
																						</td>
																						<td style="text-align:right; font-size:12">
																							<xsl:for-each select="@DebitSum">
																								<xsl:value-of select="format-number(.,'-### ### ##0,00') "/>
																							</xsl:for-each>
																						</td>
																						<td style="text-align:right; font-size:12">
																							<xsl:for-each select="@CreditSum">
																								<xsl:value-of select="format-number(.,'### ### ##0,00') "/>
																							</xsl:for-each>
																						</td>
																						<xsl:choose>
																							<xsl:when test="ENTRY">
																								<!---<xsl:if test='ENTRY'>-->
																								<tr>
																									<td class="h4" colspan="3" style="background-color= #E6E6FA; color=#191970">
																										<xsl:text>Тип операции с обеспечением</xsl:text>
																									</td>
																									<td class="h4" colspan="3" style="background-color= #E6E6FA; color=#191970">
																										<xsl:text>Пояснения к операции</xsl:text>
																									</td>
																									<td class="h4" style="background-color= #E6E6FA; color=#191970">
																										<xsl:text>Дата операции </xsl:text>
																									</td>
																									<td class="h4" style="background-color= #E6E6FA; color=#191970">
																										<xsl:text>Время операции (MSK)</xsl:text>
																									</td>
																									<td class="h4" style="background-color= #E6E6FA; color=#191970">
																										<xsl:text>Номер документа в учете КЦ</xsl:text>
																									</td>
																									<td class="h4" style="background-color= #E6E6FA; color=#191970">
																										<xsl:text>Номер документа в учете Участника</xsl:text>
																									</td>
																									<td class="h4" style="background-color= #E6E6FA; color=#191970">
																										<xsl:text>Дебет</xsl:text>
																									</td>
																									<td class="h4" style="background-color= #E6E6FA; color=#191970">
																										<xsl:text>Кредит</xsl:text>
																									</td>
																								</tr>
																								<xsl:for-each select="ENTRY">
																									<tr>
																										<td colspan="3" class="entry" style="text-align:left; word-wrap:break-word;">
																											<xsl:choose>
																												<xsl:when test="@OperationCode = '1'">
																													<xsl:text>вн./возвр. ср-в обеспечения</xsl:text>
																												</xsl:when>
																												<xsl:when test="@OperationCode = '2'">
																													<span>
																														<xsl:text>вн./возвр. ср-в обеспечения на основании перевода между регистрами, осущ. Участником</xsl:text>
																													</span>
																												</xsl:when>
																												<xsl:when test="@OperationCode  = '5'">
																													<span>
																														<xsl:text>исп. об-в/треб. по договорам с наступившей Датой исполнения</xsl:text>
																													</span>
																												</xsl:when>																											
																												<xsl:when test="@OperationCode  = '8'">
																													<span>
																														<xsl:text>об-ва по передаче дохода</xsl:text>
																													</span>
																												</xsl:when>
																												
																												<xsl:when test="@OperationCode  = '18'">
																													<span>
																														<xsl:text>вн./возвр. средств в Гарантийный Фонд</xsl:text>
																													</span>
																												</xsl:when>																											
																												<xsl:when test="@OperationCode  = '28'">
																													<span>
																														<xsl:text>ввод-вывод активов в результате корпоративных действий</xsl:text>
																													</span>
																												</xsl:when>																											
																												<xsl:when test="@OperationCode  = '48'">
																													<span>
																														<xsl:text>блокировка и разблокировка активов по распоряжению Клирингового Центра </xsl:text>
																													</span>
																												</xsl:when>																											
																												<xsl:otherwise>
																													<span>
																														<xsl:text/>
																													</span>
																												</xsl:otherwise>
																											</xsl:choose>
																										</td>
																										<td colspan="3" class="entry" style="text-align:right; ">
																											<xsl:for-each select="@Purpose">
																												<xsl:value-of select="string(.)"/>
																											</xsl:for-each>
																										</td>
																										<td class="entry" style="text-align:right; ">
																											<xsl:for-each select="@OperationDate">
																												<xsl:value-of select="string(.)"/>
																											</xsl:for-each>
																										</td>
																										<td class="entry" style="text-align:right; ">
																											<xsl:for-each select="@OperationTime">
																												<xsl:value-of select="string(.)"/>
																											</xsl:for-each>
																										</td>
																										<td class="entry" style="text-align:right; ">
																											<xsl:for-each select="@DocNo">
																												<xsl:value-of select="string(.) "/>
																											</xsl:for-each>
																										</td>
																										<td class="entry" style="text-align:right; ">
																											<xsl:for-each select="@CustomerNo">
																												<xsl:value-of select="string(.) "/>
																											</xsl:for-each>
																										</td>
																										<td class="entry" style="text-align:right; ">
																											<xsl:for-each select="@Debit">
																												<xsl:value-of select="format-number(.,'-### ### ##0,00') "/>
																											</xsl:for-each>
																										</td>
																										<td class="entry" style="text-align:right; ">
																											<xsl:for-each select="@Credit">
																												<xsl:value-of select="format-number(.,'### ### ##0,00') "/>
																											</xsl:for-each>
																										</td>
																									</tr>
																								</xsl:for-each>
																								<!--ENTRY -->
																								<td colspan="11" style="background-color=#CFCED9; border-bottom:1; text-align:right; color=#191970"> </td>
																								<tr/>
																							</xsl:when>
																						</xsl:choose>
																						<!-- ENTRY -->
																					</tr>
																				</xsl:for-each>
																			</xsl:for-each>
																		</xsl:when>
																	</xsl:choose>
																</xsl:for-each>
															</table>
															<br/>
														</xsl:when>
													</xsl:choose>
												</xsl:for-each>
											</xsl:for-each>
										</xsl:when>
									</xsl:choose>
								</xsl:for-each>
							</xsl:for-each>
						</xsl:for-each>
					</xsl:when>
					<xsl:otherwise> <!-- ENGLISH HEADER-->
						
						<xsl:for-each select="$XML1">
							<xsl:for-each select="RTS_DOC">
								<div>
									<xsl:for-each select="DOC_REQUISITES">
										<table width="100%" style="background-color=#FFFAF0; word-wrap:break-word; border:0; border-bottom:0; border-collapse:collapse; border-left:0; border-right:0;" border="1">
											<xsl:variable name="CurrContextGrid_3" select="."/>
											<tr style="text-align:center; vertical-align:Center; word-wrap:break-word; font-size:12; font-weight:bold; background-color= #B0C4DE; color:#191970; ">
												<th colspan="5">
													<xsl:choose>
														<xsl:when test="@SENDER_NAME!=''">
															<span>
																<xsl:value-of select="string(.)"/>
															</span>
														</xsl:when>
														<xsl:otherwise>
															<xsl:text>Central Counterparty «SPB Clearing» (joint-stock company)</xsl:text>
														</xsl:otherwise>
													</xsl:choose>
												</th>
											</tr>
											<tr style="background-color=#E6E6FA; text-align:center;">
												<td width="27%">
													<xsl:text>Document</xsl:text>
												</td>
												<td width="7%">
													<xsl:text>Type</xsl:text>
												</td>
												<td width="15%">
													<xsl:text>Sender ID</xsl:text>
												</td>
												<td>
													<xsl:text>Recipient's code in the Electronic Document Management System</xsl:text>
												</td>
												<td rowspan="2" style="font-style:italic; text-align:left; vertical-align:top; background-color=#FFFAF0; color:#191970; ">
													<span>
														<xsl:text>Notes to the document: </xsl:text>
													</span>
													<xsl:for-each select="@REMARKS">
														<xsl:value-of select="string(.)"/>
													</xsl:for-each>
												</td>
											</tr>
											<tr style="text-align:center">
												<td>
													<xsl:for-each select="@DOC_NO">
														<xsl:value-of select="string(.)"/>
													</xsl:for-each>
													<xsl:text> of </xsl:text>
													<xsl:for-each select="@DOC_DATE">
														<xsl:variable name="seqContentStrings_0">
															<xsl:value-of select="format-number(number(substring(string(string(.)), 9, 2)), '00')"/>
															<xsl:text>-</xsl:text>
															<xsl:value-of select="format-number(number(substring(string(string(.)), 6, 2)), '00')"/>
															<xsl:text>-</xsl:text>
															<xsl:value-of select="format-number(number(substring(string(string(string(.))), 1, 4)), '0000')"/>
														</xsl:variable>
														<xsl:variable name="sContent_0" select="string($seqContentStrings_0)"/>
														<xsl:value-of select="$sContent_0"/>
													</xsl:for-each>
													<xsl:text> </xsl:text>
													<xsl:for-each select="@DOC_TIME">
														<xsl:value-of select="string(.)"/>
													</xsl:for-each>
													<xsl:text> (MSK)</xsl:text>
												</td>
												<td>
													<xsl:for-each select="@DOC_TYPE_ID">
														<xsl:value-of select="string(.)"/>
													</xsl:for-each>
												</td>
												<td>
													<xsl:for-each select="@SENDER_ID">
														<xsl:value-of select="string(.)"/>
													</xsl:for-each>
												</td>
												<td>
													<xsl:for-each select="@RECEIVER_ID">
														<xsl:value-of select="string(.)"/>
													</xsl:for-each>
												</td>
											</tr>
										</table>
									</xsl:for-each>
								</div>
								<xsl:for-each select="MFB66">
									<table width="100%" style="background-color=#FFFAF0; word-wrap:break-word; border:0; border-bottom:0; border-collapse:collapse; border-left:0; border-right:0;" border="1">
										<th colspan="8" style="text-align:center;  color:#191970;  vertical-align:Center; word-wrap:break-word; font-size:15; font-weight:bold; background-color= #B0C4DE;">
											<xsl:choose>
												<xsl:when test="@ReportDesc!=''">
													<span>
														<xsl:value-of select="@ReportDesc"/>
													</span>
												</xsl:when>
												<xsl:otherwise>
													<xsl:text>Non-Collateral Assets Report</xsl:text>
												</xsl:otherwise>
											</xsl:choose>
										</th>
										<tr style="text-align:center;">
											<td width="17%" style="background-color=#E6E6FA; ">
												<xsl:text>Report date:</xsl:text>
											</td>
											<td width="10%" style="background-color=#E6E6FA; ">
												<xsl:text>Report number:</xsl:text>
											</td>
											<td width="10%" style="background-color=#E6E6FA; ">
												<xsl:text>Report volume:</xsl:text>
											</td>
											<td width="14%" style="background=#E6E6FA;">
												<xsl:text>Clearing Member identifier:</xsl:text>
											</td>
											<td width="14%" style="background=#E6E6FA;">
												<xsl:text>Clearing Member INN / TIN:</xsl:text>
											</td>
											<td colspan="2" width="auto" style="background=#E6E6FA;">
												<xsl:text>Clearing Member name:</xsl:text>
											</td>
										</tr>
										<tr>
											<td style="text-align:center; ">
												<xsl:for-each select="@ReportDate">
													<span>
														<xsl:variable name="seqContentStrings_1">
															<xsl:value-of select="format-number(number(substring(string(string(.)), 9, 2)), '00')"/>
															<xsl:text>-</xsl:text>
															<xsl:value-of select="format-number(number(substring(string(string(.)), 6, 2)), '00')"/>
															<xsl:text>-</xsl:text>
															<xsl:value-of select="format-number(number(substring(string(string(string(.))), 1, 4)), '0000')"/>
														</xsl:variable>
														<xsl:variable name="sContent_1" select="string($seqContentStrings_1)"/>
														<xsl:value-of select="$sContent_1"/>
													</span>
												</xsl:for-each>
												<xsl:for-each select="@Weekday">
													<span>
														<xsl:text> (</xsl:text>
														<xsl:value-of select="string(.)"/>
														<xsl:text>)</xsl:text>
													</span>
												</xsl:for-each>
											</td>
											<td style="text-align:center;  ">
												<xsl:for-each select="@ReportNumber">
													<xsl:value-of select="string(.)"/>
												</xsl:for-each>
											</td>
											<td style="text-align:center;  ">
												<xsl:for-each select="@Volume">
													<xsl:value-of select="string(.)"/>
												</xsl:for-each>
												<xsl:text> of </xsl:text>
												<xsl:for-each select="@VolumeTotal">
													<xsl:value-of select="string(.)"/>
												</xsl:for-each>
											</td>
											<td style="text-align:center;  ">
												<xsl:for-each select="@MainFirmId">
													<xsl:value-of select="string(.)"/>
												</xsl:for-each>
											</td>
											<td style="text-align:center;">
												<xsl:for-each select="@MainFirmINN">
													<xsl:value-of select="string(.)"/>
												</xsl:for-each>
											</td>
											<td colspan="2" style="text-align:center;  ">
												<xsl:for-each select="@FirmName">
													<xsl:value-of select="string(.)"/>
												</xsl:for-each>
												<xsl:for-each select="@MainFirmName">
													<xsl:value-of select="string(.)"/>
												</xsl:for-each>
											</td>
										</tr>
									</table>
									<br/>
									<!--Проверка на версионность, и разветвление на разные типы отчетов -->
									<xsl:choose>
										<xsl:when test="@ReportVersion=1">
											<xsl:for-each select="FIRM">
												<table width="70%" style="background-color=#FFFAF0; font-size:11; word-wrap:break-word; border:0; border-bottom:0; border-collapse:collapse; border-left:0; border-right:0;" border="1">
													<tr>
														<td width="30%" style="background-color= #B0C4DE;">
															<xsl:text>Trading Member</xsl:text>
														</td>
														<td style="background-color= #B0C4DE;">
															<xsl:text>Trading Member Name</xsl:text>
														</td>
													</tr>
													<tr>
														<td width="30%" style="font-weight: bold; font-size:12;">
															<xsl:for-each select="@FirmID">
																<xsl:value-of select="string(.)"/>
															</xsl:for-each>
														</td>
														<td style="font-weight: bold; font-size:12; ">
															<xsl:for-each select="../@FirmName">
																<xsl:value-of select="string(.)"/>
															</xsl:for-each>
														</td>
													</tr>
												</table>
												<br/>
												<xsl:for-each select="SETTLE">
													<xsl:choose>
														<xsl:when test="POSTYPES/@PosType = 'C'">
															<table width="100%" style="background-color=#FFFAF0; word-wrap:break-word; border:0; border-bottom:0; border-collapse:collapse; border-left:0; border-right:0;" border="1">
																<tr>
																	<td width="15%" style="background-color= #B0C4DE; font-weight: bold; font-size:12;">
																		<xsl:text>Section of data on TCA</xsl:text>
																	</td>
																	<xsl:choose>
																		<xsl:when test="POSTYPES/GROUP/RECORDS/ENTRY">
																			<td style="background-color= #B0C4DE; font-weight: bold; font-size:12;">
																				<xsl:for-each select="@ClrAccCode">
																					<xsl:value-of select="string(.) "/>
																				</xsl:for-each>
																			</td>
																			<td colspan="9" style="background-color= #B0C4DE; font-weight: bold; font-size:12;">
																				<xsl:text>Monetary means</xsl:text>
																			</td>
																		</xsl:when>
																		<xsl:otherwise>
																			<td style="background-color= #B0C4DE; font-weight: bold; font-size:12;">
																				<xsl:for-each select="@ClrAccCode">
																					<xsl:value-of select="string(.) "/>
																				</xsl:for-each>
																			</td>
																			<td colspan="9" style="background-color= #B0C4DE; font-weight: bold; font-size:12;">
																				<xsl:text>There was no cash flow on the TCA</xsl:text>
																			</td>
																		</xsl:otherwise>
																	</xsl:choose>
																</tr>
																<xsl:for-each select="POSTYPES">
																	<!--<xsl:for-each select="GROUP">-->
																	<!--<xsl:for-each select="RECORDS">-->
																	<xsl:choose>
																		<xsl:when test="@PosType = 'C'">
																			<tr>
																				
																				<td class="h3" style="background-color= #CFCED9; color=#191970 ">
																					<xsl:text>Currency ID</xsl:text>
																				</td>
																				<td class="h3" colspan="3" style="background-color= #CFCED9; color=#191970 ">
																					<xsl:text>Currency Name</xsl:text>
																				</td>
																				<td class="h3" width="10%" style="background-color= #CFCED9; color=#191970 ">
																					<xsl:text>Opening balance: </xsl:text>
																				</td>
																				<td class="h3" width="10%" style="background-color= #CFCED9; color=#191970 ">
																					<xsl:text>Closing balance: </xsl:text>
																				</td>																				
																				<td class="h3" width="10%" style="background-color= #CFCED9; color=#191970  ">
																					<xsl:text>debit: </xsl:text>
																				</td>
																				<td class="h3" width="10%" style="background-color= #CFCED9; color=#191970  ">
																					<xsl:text>credit: </xsl:text>
																				</td>
																			</tr>
																			<xsl:for-each select="GROUP">
																				<xsl:for-each select="RECORDS">
																					<tr height="20">																						
																						<td style="font-size:12; ">
																							<xsl:value-of select="@CurrencyId"/>
																						</td>
																						<td style="font-size:12; " colspan="3">
																							<xsl:value-of select="@CurrencyName"/>
																						</td>
																						<td style="text-align:right; font-size:12;">
																							<xsl:value-of select="format-number(@OpeningBalance,'### ### ##0,00')"/>
																						</td>
																						<td style="text-align:right; font-size:12;">
																							<xsl:value-of select="format-number(@ClosingBalance,'### ### ##0,00')"/>
																						</td>
																						<td style="text-align:right; font-size:12;">
																							<xsl:for-each select="@DebitSum">
																								<xsl:value-of select="format-number(.,'-### ### ##0,00') "/>
																							</xsl:for-each>
																						</td>
																						<td style="text-align:right; font-size:12;">
																							<xsl:for-each select="@CreditSum">
																								<xsl:value-of select="format-number(.,'### ### ##0,00') "/>
																							</xsl:for-each>
																						</td>
																					</tr>
																					<xsl:choose>
																						<xsl:when test="ENTRY">
																							<!---<xsl:if test='ENTRY'>-->
																							<tr>
																								<td class="h4" colspan="3" style="background-color= #E6E6FA; color=#191970">
																									<xsl:text>Type of collateral operation</xsl:text>
																								</td>
																								<td class="h4" colspan="3" style="background-color= #E6E6FA; color=#191970">
																									<xsl:text>Purpose of payment</xsl:text>
																								</td>
																								<td class="h4" style="background-color= #E6E6FA; color=#191970">
																									<xsl:text>Date of operation </xsl:text>
																								</td>
																								<td class="h4" style="background-color= #E6E6FA; color=#191970">
																									<xsl:text>Time of operation (MSK) </xsl:text>
																								</td>
																								<td class="h4" style="background-color= #E6E6FA; color=#191970">
																									<xsl:text>Document number</xsl:text>
																								</td>
																								<td class="h4" style="background-color= #E6E6FA; color=#191970">
																									<xsl:text>Clearing Member document number</xsl:text>
																								</td>
																								<td class="h4" style="background-color= #E6E6FA; color=#191970">
																									<xsl:text>Debet</xsl:text>
																								</td>
																								<td class="h4" style="background-color= #E6E6FA; color=#191970">
																									<xsl:text>Credit</xsl:text>
																								</td>
																							</tr>
																							<xsl:for-each select="ENTRY">
																								<tr>
																									<td colspan="3" class="entry" style="text-align:left; word-wrap:break-word;">
																										<xsl:choose>
																											<xsl:when test="@OperationCode = '1'">
																												<xsl:text>deposit/refund of collateral</xsl:text>
																											</xsl:when>
																											<xsl:when test="@OperationCode = '2'">
																												<span>
																													<xsl:text>deposit/refund of collateral on the basis of an inter-register transfer made by the Member</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '5'">
																												<span>
																													<xsl:text>performance of obligations/claims under agreements with a due date</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '6'">
																												<span>
																													<xsl:text>об-ва по передаче дохода (купон)</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '7'">
																												<span>
																													<xsl:text>income/security transfer obligations (depreciation)</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '8'">
																												<span>
																													<xsl:text>income/security transfer obligations</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '9'">
																												<span>
																													<xsl:text>debit/ credit of variation margin</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '10'">
																												<span>
																													<xsl:text>write-off of the negotiable part/charge of refundable premium on trading fee</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '11'">
																												<span>
																													<xsl:text>write-off of the negotiable part/charge of refundable premium on the clearing fees</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '12'">
																												<span>
																													<xsl:text>write-off of the negotiable part/charge of refundable premium on licence fee</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '13'">
																												<span>
																													<xsl:text>write-off of monthly trade fee</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '14'">
																												<span>
																													<xsl:text>write-off of monthly clearing fee</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '15'">
																												<span>
																													<xsl:text>write-off of monthly licence fee</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '16'">
																												<span>
																													<xsl:text>write-off of fine cash register debts</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '17'">
																												<span>
																													<xsl:text>write-off of commission fee for forced closure of position</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '18'">
																												<span>
																													<xsl:text>crediting/return of funds to the Default Fund</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '19'">
																												<span>
																													<xsl:text>write-off of fine for non-fulfillment of donor obligations</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '20'">
																												<span>
																													<xsl:text>write-off/charge of fine in connection with entering into repurchase agreements (two sale and purchase agreements) with CC in order to settle potential defaults and fulfill obligations under agreement</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '21'">
																												<span>
																													<xsl:text>write-off of fine for default on obligations to another clearing member (under OTC contracts)</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '22'">
																												<span>
																													<xsl:text>write-off/accrual of compensation in case of forced closure of the Clearing Member in case of possible default</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '23'">
																												<span>
																													<xsl:text>debiting/crediting of cash during substitution of collateral currency</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '24'">
																												<span>
																													<xsl:text>debiting of the clearing fee for debit from the Trading Account/Custody Sub-Account of the Clearing Member of foreign securities recorded as the Collateral Assets by order for debit of securities or transfer of securities, if the Custody Account is not the Trading Account/Custody Sub-Account, in the amount exceeding the aggregate amount of securities of such foreign issuer deposited as the Collateral Assets by such Clearing Member and received to the Trading  Account/Custody Sub-Account due to the global securities operatio</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '25'">
																												<span>
																													<xsl:text>write-off of clearing fee for substitution of cash collateral</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '26'">
																												<span>
																													<xsl:text>write-off of commission fee for accepting Orders for clearing OTC contracts under executed Conversion Agreements</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '27'">
																												<span>
																													<xsl:text>write-off of commission fee for accepting Orders for clearing OTC contracts under executed Agreements</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '28'">
																												<span>
																													<xsl:text>I/O of assets as a result of corporate actions</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '29'">
																												<span>
																													<xsl:text>write-off of clearing fee for repurchase agreements executed in the Targeted Repo with Central Counterparty trading mode by Orders specifying trading and clearing accounts registered for one Trading Member</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '30'">
																												<span>
																													<xsl:text>write-off of the clearing fee for repurchase agreements executed in the Targeted Repo with Central Counterparty trading mode by Orders specifying trading and clearing accounts registered for one Clearing Member</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '31'">
																												<span>
																													<xsl:text>write-off of clearing fees for maintaining clearing registers of the Clearing Member for separate records within TCA registered for an individual client of the Clearing Member</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '32'">
																												<span>
																													<xsl:text>write-off of clearing fees for repayment of the Collateral Assets of the Clearing Member in foreign currency</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '33'">
																												<span>
																													<xsl:text>write-off of clearing fees for maintaining clearing registers of the Clearing Member admitted to clearing services</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '34'">
																												<span>
																													<xsl:text>write-off of clearing fees for settlements based on the results of contract clearing</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '35'">
																												<span>
																													<xsl:text>write-off of exchange fees for trading in the additional morning session</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '36'">
																												<span>
																													<xsl:text>other fees</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '37'">
																												<span>
																													<xsl:text>write-off of clearing fees for processing custody orders for debit, credit and transfer on sub-accounts</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '38'">
																												<span>
																													<xsl:text>debiting clearing fees for accounting of collateral in EUR</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '39'">
																												<span>
																													<xsl:text>write-off of clearing fees for accounting of collective clearing collateral in EUR</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '40'">
																												<span>
																													<xsl:text>write-off of clearing fees for processing W8-BEN</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '41'">
																												<span>
																													<xsl:text>write-off of clearing fees for processing forms upon income payment and beneficiary disclosure</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '42'">
																												<span>
																													<xsl:text>reimbursement of the CC expenses related to the payment of income on securities</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '43'">
																												<span>
																													<xsl:text>reimbursement of other CC expenses </xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '44'">
																												<span>
																													<xsl:text>Interest income</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '45'">
																												<span>
																													<xsl:text>deposit and withdrawal of Collateral upon seizure and removal of seizure</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '46'">
																												<span>
																													<xsl:text>Reimbursement of expenses for servicing the custody account</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '47'">
																												<span>
																													<xsl:text>Exchange fees for category A customer transactions</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '48'">
																												<span>
																													<xsl:text>Blocking and unblocking of assets by order of the Clearing Centre</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '49'">
																												<span>
																													<xsl:text>Payment of dividend and other income</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '50'">
																												<span>
																													<xsl:text>Reimbursement of expenses for servicing depository receipts</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '51'">
																												<span>
																													<xsl:text>Reimbursement of expenses related to corporate events</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '52'">
																												<span>
																													<xsl:text>Transaction tax equivalent</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:when test="@OperationCode  = '53'">
																												<span>
																													<xsl:text>Reimbursement to the CC for custody of securities</xsl:text>
																												</span>
																											</xsl:when>
																											<xsl:otherwise>
																												<span>
																													<xsl:text/>
																												</span>
																											</xsl:otherwise>
																										</xsl:choose>
																									</td>
																									<td colspan="3" class="entry" style="text-align:right; ">
																										<xsl:for-each select="@Purpose">
																											<xsl:value-of select="string(.)"/>
																										</xsl:for-each>
																									</td>
																									<td class="entry" style="text-align:right; ">
																										<xsl:for-each select="@OperationDate">
																											<xsl:value-of select="string(.)"/>
																										</xsl:for-each>
																									</td>
																									<td class="entry" style="text-align:right; ">
																										<xsl:for-each select="@OperationTime">
																											<xsl:value-of select="string(.)"/>
																										</xsl:for-each>
																									</td>
																									<td class="entry" style="text-align:right; ">
																										<xsl:for-each select="@DocNo">
																											<xsl:value-of select="string(.) "/>
																										</xsl:for-each>
																									</td>
																									<td class="entry" style="text-align:right; ">
																										<xsl:for-each select="@CustomerNo">
																											<xsl:value-of select="string(.) "/>
																										</xsl:for-each>
																									</td>
																									<td class="entry" style="text-align:right; ">
																										<xsl:for-each select="@Debit">
																											<xsl:value-of select="format-number(.,'-### ### ##0,00') "/>
																										</xsl:for-each>
																									</td>
																									<td class="entry" style="text-align:right; ">
																										<xsl:for-each select="@Credit">
																											<xsl:value-of select="format-number(.,'### ### ##0,00') "/>
																										</xsl:for-each>
																									</td>
																								</tr>
																							</xsl:for-each>
																							<!--ENTRY -->
																							<td colspan="11" style="background-color=#CFCED9; border-bottom:1; text-align:right; color=#191970"> </td>
																							<tr/>
																						</xsl:when>
																					</xsl:choose>
																				</xsl:for-each>
																				<!-- RECORD -->
																			</xsl:for-each>
																			<!-- GROUP -->
																		</xsl:when>
																	</xsl:choose>
																</xsl:for-each>
																<!-- POSTYPE -->
															</table>
															<br/>
														</xsl:when>
													</xsl:choose>
												</xsl:for-each>
												<!-- SETTLE -->
												<xsl:for-each select="SETTLE">
													<xsl:choose>
														<xsl:when test="POSTYPES/GROUP/@GuarDepUnitId">
															<table width="100%" style="background-color=#FFFAF0; word-wrap:break-word; border:0; border-bottom:0; border-collapse:collapse; border-left:0; border-right:0;" border="1">
																<tr>
																	<td style="background-color= #B0C4DE; font-weight: bold; font-size:12;">
																		<xsl:text>Section of data on TCA</xsl:text>
																	</td>
																	<xsl:choose>
																		<xsl:when test="POSTYPES/GROUP/RECORDS/ENTRY">
																			<td style="background-color= #B0C4DE; font-weight: bold; font-size:12;">
																				<xsl:for-each select="@ClrAccCode">
																					<xsl:value-of select="string(.) "/>
																				</xsl:for-each>
																			</td>
																			<td colspan="9" style="background-color= #B0C4DE; font-weight: bold; font-size:12;">
																				<xsl:text>Securities</xsl:text>
																			</td>
																		</xsl:when>
																		<xsl:otherwise>
																			<td style="background-color= #B0C4DE; font-weight: bold; font-size:12;">
																				<xsl:for-each select="@ClrAccCode">
																					<xsl:value-of select="string(.) "/>
																				</xsl:for-each>
																			</td>
																			<td colspan="9" style="background-color= #B0C4DE; font-weight: bold; font-size:12;">
																				<xsl:text>There was no securities flow on the TCA</xsl:text>
																			</td>
																		</xsl:otherwise>
																	</xsl:choose>
																</tr>
																<xsl:for-each select="POSTYPES">
																	<!--<xsl:for-each select="GROUP">-->
																	<!--<xsl:for-each select="RECORDS">-->
																	<xsl:choose>
																		<xsl:when test="@PosType = 'S'">
																			<tr>
																				<td class="h3" style="background-color= #CFCED9; color=#191970">
																					<xsl:text>Custody (sub-account) account for securities record</xsl:text>
																				</td>
																				<td class="h3" style="background-color= #CFCED9; color=#191970 ">
																					<xsl:text>Securities identifier</xsl:text>
																				</td>
																				<td class="h3" colspan="4" style="background-color= #CFCED9; color=#191970 ">
																					<xsl:text>Securities name</xsl:text>
																				</td>
																				<td class="h3" style="background-color= #CFCED9; color=#191970 ">
																					<xsl:text>ISIN:</xsl:text>
																				</td>
																				<td class="h3" width="10%" style="background-color= #CFCED9; color=#191970 ">
																					<xsl:text>Opening balance: </xsl:text>
																				</td>
																				<td class="h3" width="10%" style="background-color= #CFCED9; color=#191970 ">
																					<xsl:text>Closing balance: </xsl:text>
																				</td>
																				<td class="h3" width="10%" style="background-color= #CFCED9; color=#191970 ">
																					<xsl:text>Debit: </xsl:text>
																				</td>
																				<td class="h3" width="10%" style="background-color= #CFCED9; color=#191970 ">
																					<xsl:text>Credit: </xsl:text>
																				</td>
																			</tr>
																			<xsl:for-each select="GROUP">
																				<xsl:for-each select="RECORDS">
																					<tr height="20">
																						<td style="font-size:12">
																							<xsl:for-each select="../@GuarDepUnitId">
																								<xsl:value-of select="string(.) "/>
																							</xsl:for-each>
																						</td>
																						<td style="font-size:12">
																							<xsl:value-of select="@SecurityId"/>
																						</td>
																						<td colspan="4" style="font-size:12">
																							<xsl:value-of select="@SecShortName"/>
																						</td>
																						<td style="font-size:12">
																							<xsl:value-of select="@ISIN"/>
																						</td>
																						<td style="text-align:right; font-size:12">
																							<xsl:value-of select="format-number(@OpeningBalance,'### ### ##0')"/>
																						</td>
																						<td style="text-align:right; font-size:12">
																							<xsl:value-of select="format-number(@ClosingBalance,'### ### ##0')"/>
																						</td>
																						<td style="text-align:right; font-size:12">
																							<xsl:for-each select="@DebitSum">
																								<xsl:value-of select="format-number(.,'-### ### ##0,00') "/>
																							</xsl:for-each>
																						</td>
																						<td style="text-align:right; font-size:12">
																							<xsl:for-each select="@CreditSum">
																								<xsl:value-of select="format-number(.,'### ### ##0,00') "/>
																							</xsl:for-each>
																						</td>
																						<xsl:choose>
																							<xsl:when test="ENTRY">
																								<!---<xsl:if test='ENTRY'>-->
																								<tr>
																									<td class="h4" colspan="3" style="background-color= #E6E6FA; color=#191970">
																										<xsl:text>Type of collateral operation</xsl:text>
																									</td>
																									<td class="h4" colspan="3" style="background-color= #E6E6FA; color=#191970">
																										<xsl:text>Notes to the operation </xsl:text>
																									</td>
																									<td class="h4" style="background-color= #E6E6FA; color=#191970">
																										<xsl:text>Time of operation (MSK) </xsl:text>
																									</td>
																									<td class="h4" style="background-color= #E6E6FA; color=#191970">
																										<xsl:text>Document number assigned by the CC или CC document number</xsl:text>
																									</td>
																									<td class="h4" style="background-color= #E6E6FA; color=#191970">
																										<xsl:text>Clearing Member document number</xsl:text>
																									</td>
																									<td class="h4" style="background-color= #E6E6FA; color=#191970">
																										<xsl:text>Debit</xsl:text>
																									</td>
																									<td class="h4" style="background-color= #E6E6FA; color=#191970">
																										<xsl:text>Credit</xsl:text>
																									</td>
																								</tr>
																								<xsl:for-each select="ENTRY">
																									<tr>
																										<td colspan="3" class="entry" style="text-align:left; word-wrap:break-word;">
																											<xsl:choose>
																												<xsl:when test="@OperationCode = '1'">
																													<xsl:text>deposit/refund of collateral</xsl:text>
																												</xsl:when>
																												<xsl:when test="@OperationCode = '2'">
																													<span>
																														<xsl:text>deposit/refund of collateral on the basis of an inter-register transfer made by the Member</xsl:text>
																													</span>
																												</xsl:when>
																												<xsl:when test="@OperationCode  = '5'">
																													<span>
																														<xsl:text>performance of obligations/claims under agreements with a due date</xsl:text>
																													</span>
																												</xsl:when>
																												<xsl:when test="@OperationCode  = '18'">
																													<span>
																														<xsl:text>crediting/return of funds to the Default Fund</xsl:text>
																													</span>
																												</xsl:when>
																												<xsl:when test="@OperationCode  = '28'">
																													<span>
																														<xsl:text>вI/O of assets as a result of corporate actions</xsl:text>
																													</span>
																												</xsl:when>
																												<xsl:otherwise>
																													<xsl:text/>
																												</xsl:otherwise>
																											</xsl:choose>
																										</td>
																										<td colspan="3" class="entry" style="text-align:right; ">
																											<xsl:for-each select="@Purpose">
																												<xsl:value-of select="string(.)"/>
																											</xsl:for-each>
																										</td>
																										<td class="entry" style="text-align:right; ">
																											<xsl:for-each select="@OperationTime">
																												<xsl:value-of select="string(.)"/>
																											</xsl:for-each>
																										</td>
																										<td class="entry" style="text-align:right; ">
																											<xsl:for-each select="@DocNo">
																												<xsl:value-of select="string(.) "/>
																											</xsl:for-each>
																										</td>
																										<td class="entry" style="text-align:right; ">
																											<xsl:for-each select="@CustomerNo">
																												<xsl:value-of select="string(.) "/>
																											</xsl:for-each>
																										</td>
																										<td class="entry" style="text-align:right; ">
																											<xsl:for-each select="@Debit">
																												<xsl:value-of select="format-number(.,'-### ### ##0,00') "/>
																											</xsl:for-each>
																										</td>
																										<td class="entry" style="text-align:right; ">
																											<xsl:for-each select="@Credit">
																												<xsl:value-of select="format-number(.,'### ### ##0,00') "/>
																											</xsl:for-each>
																										</td>
																									</tr>
																								</xsl:for-each>
																								<!--ENTRY -->
																								<td colspan="11" style="background-color=#CFCED9; border-bottom:1; text-align:right; color=#191970"> </td>
																								<tr/>
																							</xsl:when>
																						</xsl:choose>
																						<!-- ENTRY -->
																					</tr>
																				</xsl:for-each>
																			</xsl:for-each>
																		</xsl:when>
																	</xsl:choose>
																</xsl:for-each>
															</table>
															<br/>
														</xsl:when>
													</xsl:choose>
												</xsl:for-each>
											</xsl:for-each>
										</xsl:when>										
									</xsl:choose>
								</xsl:for-each>
							</xsl:for-each>
						</xsl:for-each>
					</xsl:otherwise>
				</xsl:choose>
			</body>
		</html>
	</xsl:template>
</xsl:stylesheet>
