﻿<?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/>
				<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 } 
					
				</style>
				<style>
					td
					{padding-top:1px;
					padding-right:3px;
					padding-bottom:1px;
					padding-left:3px;
					color:windowtext;
					font-size:8pt;
					font-weight:400;
					font-style:normal;
					text-decoration:none;
					font-family:"Arial";
					text-align:general;
					vertical-align:center;
					color:#191970;
					word-wrap:break-word;}
					tr
					{height:15}
				</style>
			</head>
			<body>
				<xsl:variable name="var" select="RTS_DOC/DOC_REQUISITES/@SENDER_ID"/>
				<xsl:choose>
					<xsl:when test="$var='MFBIM'">
						<xsl:for-each select="$XML1">
							<xsl:for-each select="RTS_DOC">
								<xsl:for-each select="DOC_REQUISITES">
									<table width="100%" style="background=#FFFAF0; color=#191970; font-size:11; word-wrap:break-word; border:0; border-bottom:0; border-collapse:collapse; border-left:0; border-right:0;" border="1">
										<tr style="text-align:center; vertical-align:Center; word-wrap:break-word; font-size:15; font-weight:bold; color:#191970; background= #B0C4DE;">
											<th colspan="5">
												<xsl:choose>
													<xsl:when test="@SENDER_NAME!=''">
														<span>
															<xsl:value-of select="@SENDER_NAME"/>
														</span>
													</xsl:when>
													<xsl:otherwise>
														<xsl:text>Публичное акционерное общество Клиринговый центр МФБ</xsl:text>
													</xsl:otherwise>
												</xsl:choose>
											</th>
										</tr>
										<tr style="background=#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=#FFFAF0;">
												<span style="font-weight:bold;">
													<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>
								<xsl:for-each select="MFB23">
									<table width="100%" style="background=#FFFAF0; color=#191970; font-size:11; word-wrap:break-word; border:0; border-bottom:0; border-collapse:collapse; border-left:0; border-right:0;" border="1">
										<th colspan="5" style="text-align:center; vertical-align:Center; word-wrap:break-word; font-size:15; font-weight:bold; color:#191970; background= #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=#E6E6FA;">
												<xsl:text>Дата отчета:</xsl:text>
											</td>
											<td width="10%" style="background=#E6E6FA;">
												<xsl:text>ID уч. клиринга:</xsl:text>
											</td>
											<td colspan="3" 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="@MainFirmId">
													<xsl:value-of select="string(.)"/>
												</xsl:for-each>
											</td>
											<td colspan="3" style="text-align:center;">
												<xsl:for-each select="@FirmName">
													<xsl:value-of select="string(.)"/>
												</xsl:for-each>
											</td>
										</tr>
									</table>
									<br/>
									<!--Проверка на версионность, и разветвление на разные типы отчетов -->
									<xsl:choose>
										<xsl:when test="@ReportVersion=2">
											<xsl:for-each select="FIRM">
												<xsl:for-each select="SETTLE">
													<table width="70%" style="background=#FFFAF0; 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= #B0C4DE;">
																<xsl:text>Участник торгов</xsl:text>
															</td>
															<td style="background= #B0C4DE;">
																<xsl:text>Наименование участника торгов</xsl:text>
															</td>
															<td style="background= #B0C4DE;">
																<xsl:text>Код ТКС</xsl:text>
															</td>
														</tr>
														<tr>
															<td width="30%" style="font-size:12;">
																<xsl:for-each select="../@FirmID">
																	<xsl:value-of select="string(.)"/>
																</xsl:for-each>
															</td>
															<td style="font-size:12; ">
																<xsl:for-each select="../../@FirmName">
																	<xsl:value-of select="string(.)"/>
																</xsl:for-each>
															</td>
															<td style="font-size:12; ">
																<xsl:for-each select="@ClrAccCode">
																	<xsl:value-of select="string(.)"/>
																</xsl:for-each>
															</td>
														</tr>
													</table>
													<table width="100%" style="background=#FFFAF0; color=#191970; word-wrap:break-word; border:0; border-bottom:0; border-collapse:collapse; border-left:0; border-right:0;" border="1">
														<tr style="text-align:center; vertical-align:top; word-wrap:break-word; color:#191970; background=#E6E6FA;">
															<td width="8%" style="background= #B0C4DE;">
																<xsl:text>Срок исполнения обязательств на</xsl:text>
															</td>
															<td width="8%" style="background= #B0C4DE;">
																<xsl:text>Код раздела регистра внутреннего учета</xsl:text>
															</td>
															<td width="8%">
																<xsl:text>Тип обязательств</xsl:text>
															</td>
															<td width="8%">
																<xsl:text>Код валюты/Краткий код бумаги</xsl:text>
															</td>
															<td width="8%">
																<xsl:text>Входящее нетто-обязательство</xsl:text>
															</td>
															<td width="8%">
																<xsl:text>Входящее нетто-требование</xsl:text>
															</td>
															<td width="8%">
																<xsl:text>Изменение обязательств в связи с заключением договоров в текущий день</xsl:text>
															</td>
															<td width="8%">
																<xsl:text>Изменение требований в связи с заключением договоров в текущий день</xsl:text>
															</td>
															<td width="8%">
																<xsl:text>Изменение обязательств в связи с проведением корпоративного события</xsl:text>
															</td>
															<td width="8%">
																<xsl:text>Изменение требований в связи с проведением корпоративного события</xsl:text>
															</td>
															<td width="8%">
																<xsl:text>Кол-во исп. обязательств</xsl:text>
															</td>
															<td width="7%">
																<xsl:text>Кол-во исп. требований</xsl:text>
															</td>
															<td width="8%">
																<xsl:text>Итоговое нетто-обязательство</xsl:text>
															</td>
															<td width="7%">
																<xsl:text>Итоговое нетто-требование</xsl:text>
															</td>
														</tr>
														<xsl:for-each select="SETTLEDATE">
															<xsl:for-each select="POSTYPES">
																<xsl:for-each select="GROUP">
																	<xsl:for-each select="RECORDS">
																		<tr style="vertical-align:top; ">
																			<td style="border-bottom:0; border-top:0;">
																				<xsl:for-each select="../../../@SettleDate">
																					<xsl:variable name="seqContentStrings_2">
																						<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_2" select="string($seqContentStrings_2)"/>
																					<xsl:value-of select="$sContent_2"/>
																				</xsl:for-each>
																			</td>
																			<td style="border-bottom:0; border-top:0;  text-align:center;">
																				<xsl:choose>
																					<xsl:when test="../../@PosType = 'C'">
																						<xsl:for-each select="../@BankAccCode">
																							<xsl:value-of select="string(.) "/>
																						</xsl:for-each>
																					</xsl:when>
																					<xsl:when test="../../@PosType = 'S'">
																						<xsl:for-each select="../@GuarDepUnitId">
																							<xsl:value-of select="string(.) "/>
																						</xsl:for-each>
																					</xsl:when>
																				</xsl:choose>
																			</td>
																			<td style="border-bottom:0; border-top:0; text-align:right; ">
																				<xsl:choose>
																					<xsl:when test="@DataType='TRADE'">
																						<span>
																							<xsl:text>по Договорам</xsl:text>
																						</span>
																					</xsl:when>
																					<xsl:when test="@DataType='FEE'">
																						<span>
																							<xsl:text>по комиссии с уплатой в день исполнения Договора</xsl:text>
																						</span>
																					</xsl:when>
																					<xsl:when test="@DataType='DIVIDEND'">
																						<span>
																							<xsl:text>по возврату дивидендов по сделкам РЕПО</xsl:text>
																						</span>
																					</xsl:when>
																					<xsl:when test="@DataType='ADDITIONAL'">
																						<span>
																							<xsl:text>дополнительные обязательства, возникшие в связи с корпоративными событиями</xsl:text>
																						</span>
																					</xsl:when>
																				</xsl:choose>
																			</td>
																			<xsl:choose>
																				<xsl:when test="../../@PosType = 'S'">
																					<td style="border-bottom:0; border-top:0;">
																						<xsl:for-each select="@SecurityId">
																							<xsl:value-of select="string(.) "/>
																						</xsl:for-each>
																					</td>
																				</xsl:when>
																				<xsl:when test="../../@PosType = 'C'">
																					<td style="border-bottom:0; border-top:0;">
																						<xsl:for-each select="@CurrencyId">
																							<xsl:value-of select="string(.) "/>
																						</xsl:for-each>
																					</td>
																				</xsl:when>
																			</xsl:choose>
																			<td style="border-bottom:0; border-top:0; text-align:right; ">
																				<xsl:for-each select="@DebitBeg">
																					<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																				</xsl:for-each>
																			</td>
																			<td style="border-bottom:0; border-top:0; text-align:right; ">
																				<xsl:for-each select="@CreditBeg">
																					<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																				</xsl:for-each>
																			</td>
																			<td style="border-bottom:0; border-top:0; text-align:right; ">
																				<xsl:for-each select="@DebitIntraday">
																					<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																				</xsl:for-each>
																			</td>
																			<td style="border-bottom:0; border-top:0; text-align:right; ">
																				<xsl:for-each select="@CreditIntraday">
																					<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																				</xsl:for-each>
																			</td>
																			<td style="border-bottom:0; border-top:0; text-align:right; ">
																				<xsl:for-each select="@DebitCorpEvCorrection">
																					<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																				</xsl:for-each>
																			</td>
																			<td style="border-bottom:0; border-top:0; text-align:right; ">
																				<xsl:for-each select="@CreditCorpEvCorrection">
																					<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																				</xsl:for-each>
																			</td>
																			<td style="border-bottom:0; border-top:0; text-align:right; ">
																				<xsl:for-each select="@PosExecDebit">
																					<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																				</xsl:for-each>
																			</td>
																			<td style="border-bottom:0; border-top:0; text-align:right; ">
																				<xsl:for-each select="@PosExecCredit">
																					<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																				</xsl:for-each>
																			</td>
																			<td style="border-bottom:0; border-top:0; text-align:right; ">
																				<xsl:for-each select="@Debit">
																					<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																				</xsl:for-each>
																			</td>
																			<td style="border-bottom:0; border-top:0; text-align:right; ">
																				<xsl:for-each select="@Credit">
																					<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																				</xsl:for-each>
																			</td>
																		</tr>
																		<tr>
																			<td colspan="14" style="border-bottom:0; border-left:0; border-right:0; font:10; font-weight:bold; height:1; line-height:1; text-align:left; "/>
																		</tr>
																	</xsl:for-each>
																	<!--records-->
																</xsl:for-each>
																<!--GROUP-->
															</xsl:for-each>
															<!--POSTYPES-->
														</xsl:for-each>
														<!--SETTLEDATE-->
													</table>
													<xsl:for-each select="SETTLEDATE">
														<xsl:for-each select="POSTYPES">
															<xsl:for-each select="GROUP">
																<xsl:for-each select="SUBACCOUNT">
																	<table width="15%" style="background=#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= #B0C4DE; color=#191970; font-weight: bold;">
																				<xsl:text>Код аналитического ТКС</xsl:text>
																			</td>
																		</tr>
																		<tr>
																			<td style="font-weight: bold;">
																				<xsl:for-each select="@SubClrAccCode">
																					<xsl:value-of select="string(.) "/>
																				</xsl:for-each>
																			</td>
																		</tr>
																	</table>
																	<table width="100%" style="background=#FFFAF0; color=#191970; word-wrap:break-word; border:0; border-bottom:0; border-collapse:collapse; border-left:0; border-right:0;" border="1">
																		<tr style="text-align:center; vertical-align:top; word-wrap:break-word; color:#191970; background=#E6E6FA;">
																			<td width="8%" style="background= #B0C4DE;">
																				<xsl:text>Срок исполнения обязательств на</xsl:text>
																			</td>
																			<td width="8%" style="background= #B0C4DE;">
																				<xsl:text>Код раздела регистра внутреннего учета</xsl:text>
																			</td>
																			<td width="8%">
																				<xsl:text>Тип обязательств</xsl:text>
																			</td>
																			<td width="8%">
																				<xsl:text>Код валюты/Краткий код бумаги</xsl:text>
																			</td>
																			<td width="8%">
																				<xsl:text>Входящее нетто-обязательство</xsl:text>
																			</td>
																			<td width="8%">
																				<xsl:text>Входящее нетто-требование</xsl:text>
																			</td>
																			<td width="8%">
																				<xsl:text>Изменение обязательств в связи с заключением договоров в текущий день</xsl:text>
																			</td>
																			<td width="8%">
																				<xsl:text>Изменение требований в связи с заключением договоров в текущий день</xsl:text>
																			</td>
																			<td width="8%">
																				<xsl:text>Изменение обязательств в связи с проведением корпоративного события</xsl:text>
																			</td>
																			<td width="8%">
																				<xsl:text>Изменение требований в связи с проведением корпоративного события</xsl:text>
																			</td>
																			<td width="8%">
																				<xsl:text>Кол-во исп. обязательств</xsl:text>
																			</td>
																			<td width="7%">
																				<xsl:text>Кол-во исп. требований</xsl:text>
																			</td>
																			<td width="8%">
																				<xsl:text>Итоговое нетто-обязательство</xsl:text>
																			</td>
																			<td width="7%">
																				<xsl:text>Итоговое нетто-требование</xsl:text>
																			</td>
																		</tr>
																		<xsl:for-each select="SUBRECORDS">
																			<tr style="vertical-align:top; ">
																				<td style="border-bottom:0; border-top:0;">
																					<xsl:for-each select="../../../../@SettleDate">
																						<xsl:variable name="seqContentStrings_2">
																							<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_2" select="string($seqContentStrings_2)"/>
																						<xsl:value-of select="$sContent_2"/>
																					</xsl:for-each>
																				</td>
																				<td>
																					<xsl:choose>
																						<xsl:when test="../../../@PosType = 'C'">
																							<xsl:for-each select="../../@BankAccCode">
																								<xsl:value-of select="string(.) "/>
																							</xsl:for-each>
																						</xsl:when>
																						<xsl:when test="../../../@PosType = 'S'">
																							<xsl:for-each select="../../@GuarDepUnitId">
																								<xsl:value-of select="string(.) "/>
																							</xsl:for-each>
																						</xsl:when>
																					</xsl:choose>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:choose>
																						<xsl:when test="@DataType='TRADE'">
																							<span>
																								<xsl:text>по Договорам</xsl:text>
																							</span>
																						</xsl:when>
																						<xsl:when test="@DataType='FEE'">
																							<span>
																								<xsl:text>по оборотной части комиссионного вознаграждения с уплатой в день исполнения Договора</xsl:text>
																							</span>
																						</xsl:when>
																						<xsl:when test="@DataType='DIVIDEND'">
																							<span>
																								<xsl:text>по возврату дивидендов по сделкам РЕПО</xsl:text>
																							</span>
																						</xsl:when>
																					</xsl:choose>
																				</td>
																				<td style="border-bottom:0; border-top:0;  ">
																					<xsl:choose>
																						<xsl:when test="../../../@PosType = 'S'">
																							<xsl:for-each select="@SecurityId">
																								<xsl:value-of select="string(.) "/>
																							</xsl:for-each>
																						</xsl:when>
																						<xsl:when test="../../../@PosType = 'C'">
																							<xsl:for-each select="@CurrencyId">
																								<xsl:value-of select="string(.) "/>
																							</xsl:for-each>
																						</xsl:when>
																					</xsl:choose>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@DebitBeg">
																						<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																					</xsl:for-each>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@CreditBeg">
																						<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																					</xsl:for-each>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@DebitIntraday">
																						<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																					</xsl:for-each>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@CreditIntraday">
																						<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																					</xsl:for-each>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@DebitCorpEvCorrection">
																						<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																					</xsl:for-each>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@CreditCorpEvCorrection">
																						<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																					</xsl:for-each>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@PosExecDebit">
																						<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																					</xsl:for-each>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@PosExecCredit">
																						<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																					</xsl:for-each>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@Debit">
																						<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																					</xsl:for-each>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@Credit">
																						<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																					</xsl:for-each>
																				</td>
																			</tr>
																		</xsl:for-each>
																		<!--subrecords-->
																	</table>
																</xsl:for-each>
																<!--SUBACCOUNT-->
															</xsl:for-each>
															<!--GROUP-->
														</xsl:for-each>
														<!--postypeS-->
													</xsl:for-each>
													<!--settledate-->
													<br/>
												</xsl:for-each>
												<!--settle-->
											</xsl:for-each>
											<!--fIRM-->
										</xsl:when>
										<xsl:otherwise>
											<xsl:for-each select="FIRM">
												<xsl:for-each select="SETTLE">
													<table width="1000" style="background=#FFFAF0; color=#191970; 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="25%" style="background= #B0C4DE; color=#191970">
																<xsl:text>Участник торгов:</xsl:text>
															</td>
															<td width="10%">
																<xsl:for-each select="../@FirmID">
																	<xsl:value-of select="string(.)"/>
																</xsl:for-each>
															</td>
															<td width="10%" style="background= #B0C4DE; color=#191970">
																<xsl:text>Код ТКС:</xsl:text>
															</td>
															<td colspan="3">
																<xsl:for-each select="@ClrAccCode">
																	<xsl:value-of select="string(.) "/>
																</xsl:for-each>
															</td>
														</tr>
													</table>
													<xsl:for-each select="SETTLEDATE">
														<xsl:for-each select="POSTYPES">
															<xsl:for-each select="GROUP">
																<table width="1000" style="background=#FFFAF0; color=#191970; 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="25%" style="background= #B0C4DE; color=#191970">
																			<xsl:text>Дата исполнения:</xsl:text>
																		</td>
																		<td width="10%">
																			<xsl:for-each select="../../@SettleDate">
																				<xsl:variable name="seqContentStrings_2">
																					<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_2" select="string($seqContentStrings_2)"/>
																				<xsl:value-of select="$sContent_2"/>
																			</xsl:for-each>
																		</td>
																		<td style="background= #B0C4DE; color=#191970">
																			<xsl:text>Информация по типам обязательств: </xsl:text>
																		</td>
																		<td>
																			<xsl:choose>
																				<xsl:when test="../@PosType = 'C'">
																					<span>
																						<xsl:text>Информация о нетто обязательствах/требованиях по денежной позиции</xsl:text>
																					</span>
																				</xsl:when>
																				<xsl:when test="../@PosType = 'S'">
																					<span>
																						<xsl:text>Информация о нетто обязательствах/требованиях по депозитарным разделам </xsl:text>
																					</span>
																				</xsl:when>
																			</xsl:choose>
																		</td>
																	</tr>
																	<tr>
																		<xsl:choose>
																			<xsl:when test="../@PosType = 'C'">
																				<td style="background= #B0C4DE; color=#191970">
																					<xsl:text>Код денежного регистра: </xsl:text>
																				</td>
																				<td colspan="3">
																					<xsl:for-each select="@BankAccCode">
																						<xsl:value-of select="string(.) "/>
																					</xsl:for-each>
																				</td>
																			</xsl:when>
																			<xsl:when test="../@PosType = 'S'">
																				<td style="background= #B0C4DE; color=#191970">
																					<xsl:text>Счет (субсчет) депо для учета ценных бумаг: </xsl:text>
																				</td>
																				<td colspan="3">
																					<xsl:for-each select="@GuarDepUnitId">
																						<xsl:value-of select="string(.) "/>
																					</xsl:for-each>
																				</td>
																			</xsl:when>
																		</xsl:choose>
																	</tr>
																</table>
																<table width="1000" style="background=#FFFAF0; color=#191970; border:1; border-bottom:0; border-collapse:collapse; border-left:0; border-right:0; border-top:0; font-family:Arial; font-size:9; word-wrap:break-word;" border="1">
																	<xsl:variable name="CurrContextGrid_4" select="."/>
																	<thead style="text-align:center; word-wrap:break-word; ">
																		<tr style="text-align:center; vertical-align:top; word-wrap:break-word; color:#191970; background=#E6E6FA;">
																			<th>
																				<xsl:text>Тип обязательств</xsl:text>
																			</th>
																			<xsl:choose>
																				<xsl:when test="../@PosType = 'S'">
																					<th>
																						<xsl:text>Идентификатор валюты расчётов</xsl:text>
																					</th>
																					<th>
																						<xsl:text>Наименование валюты расчётов</xsl:text>
																					</th>
																					<th>
																						<xsl:text>Идентификатор инструмента</xsl:text>
																					</th>
																					<th>
																						<xsl:text>Краткое наименование инструмента</xsl:text>
																					</th>
																				</xsl:when>
																				<xsl:when test="../@PosType = 'C'">
																					<th colspan="2">
																						<xsl:text>Идентификатор валюты</xsl:text>
																					</th>
																					<th colspan="2">
																						<xsl:text>Наименование валюты</xsl:text>
																					</th>
																				</xsl:when>
																			</xsl:choose>
																			<th>
																				<xsl:text>Входящее нетто-обязательство</xsl:text>
																			</th>
																			<th>
																				<xsl:text>Входящее нетто-требование</xsl:text>
																			</th>
																			<th>
																				<xsl:text>ВМ по вх. нетто-обязательству/требованию</xsl:text>
																			</th>
																			<th>
																				<xsl:text>ВМ по сделкам за текущий день</xsl:text>
																			</th>
																			<th>
																				<xsl:text>Кол-во исп. обязательств</xsl:text>
																			</th>
																			<th>
																				<xsl:text>Кол-во исп. требований</xsl:text>
																			</th>
																			<th>
																				<xsl:text>Итоговое нетто-обязательство</xsl:text>
																			</th>
																			<th>
																				<xsl:text>Итоговое нетто-требование</xsl:text>
																			</th>
																		</tr>
																	</thead>
																	<tbody>
																		<xsl:for-each select="RECORDS">
																			<tr style="vertical-align:top; ">
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:choose>
																						<xsl:when test="@DataType='TRADE'">
																							<span>
																								<xsl:text>по Договорам</xsl:text>
																							</span>
																						</xsl:when>
																						<xsl:when test="@DataType='FEE'">
																							<span>
																								<xsl:text>по оборотной части комиссионного вознаграждения с уплатой в день исполнения Договора</xsl:text>
																							</span>
																						</xsl:when>
																						<xsl:when test="@DataType='DIVIDEND'">
																							<span>
																								<xsl:text>по возврату дохода по договорам репо</xsl:text>
																							</span>
																						</xsl:when>
																						<xsl:when test="@DataType='ADDITIONAL'">
																							<span>
																								<xsl:text>по дополнительным обязательствам, возникшим в результате корпоративных событий</xsl:text>
																							</span>
																						</xsl:when>
																					</xsl:choose>
																				</td>
																				<xsl:choose>
																					<xsl:when test="../../@PosType = 'S'">
																						<td style="border-bottom:0; border-top:0; text-align:right; ">
																							<xsl:for-each select="@CurrencyId">
																								<xsl:value-of select="string(.) "/>
																							</xsl:for-each>
																						</td>
																						<td style="border-bottom:0; border-top:0; text-align:right; ">
																							<xsl:for-each select="@CurrencyName">
																								<xsl:value-of select="string(.) "/>
																							</xsl:for-each>
																						</td>
																						<td style="border-bottom:0; border-top:0; text-align:right; ">
																							<xsl:for-each select="@SecurityId">
																								<xsl:value-of select="string(.) "/>
																							</xsl:for-each>
																						</td>
																						<td style="border-bottom:0; border-top:0; text-align:right; ">
																							<xsl:for-each select="@SecShortName">
																								<xsl:value-of select="string(.) "/>
																							</xsl:for-each>
																						</td>
																					</xsl:when>
																					<xsl:when test="../../@PosType = 'C'">
																						<td colspan="2" style="border-bottom:0; border-top:0; text-align:right; ">
																							<xsl:for-each select="@CurrencyId">
																								<xsl:value-of select="string(.) "/>
																							</xsl:for-each>
																						</td>
																						<td colspan="2" style="border-bottom:0; border-top:0; text-align:right; ">
																							<xsl:for-each select="@CurrencyName">
																								<xsl:value-of select="string(.) "/>
																							</xsl:for-each>
																						</td>
																					</xsl:when>
																				</xsl:choose>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@DebitBeg">
																						<xsl:value-of select="string(.) "/>
																					</xsl:for-each>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@CreditBeg">
																						<xsl:value-of select="string(.) "/>
																					</xsl:for-each>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@VarMarginBeg">
																						<xsl:value-of select="string(.) "/>
																					</xsl:for-each>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@VarMargin">
																						<xsl:value-of select="string(.) "/>
																					</xsl:for-each>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@PosExecDebit">
																						<xsl:value-of select="string(.) "/>
																					</xsl:for-each>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@PosExecCredit">
																						<xsl:value-of select="string(.) "/>
																					</xsl:for-each>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@Debit">
																						<xsl:value-of select="string(.) "/>
																					</xsl:for-each>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@Credit">
																						<xsl:value-of select="string(.) "/>
																					</xsl:for-each>
																				</td>
																			</tr>
																			<tr>
																				<td colspan="13" style="border-bottom:0; border-left:0; border-right:0; font:10; font-weight:bold; height:1; line-height:1; text-align:left; "/>
																			</tr>
																		</xsl:for-each>
																	</tbody>
																</table>
																<BR/>
																<xsl:for-each select="SUBACCOUNT">
																	<table width="1000" style="background=#FFFAF0; color=#191970; border:1; border-bottom:0; border-collapse:collapse; border-left:0; border-right:0; border-top:0; font-family:Arial; font-size:9; word-wrap:break-word;" border="1">
																		<thead style="text-align:center; word-wrap:break-word; ">
																			<tr>
																				<th colspan="4" style="background= #B0C4DE; color=#191970">
																					<xsl:text>Код аналитического ТКС:</xsl:text>
																				</th>
																				<th colspan="9" style="text-align:left">
																					<xsl:for-each select="@SubClrAccCode">
																						<xsl:value-of select="string(.) "/>
																					</xsl:for-each>
																				</th>
																			</tr>
																			<tr style="text-align:center; vertical-align:top; word-wrap:break-word; color:#191970; background=#E6E6FA;">
																				<th>
																					<xsl:text>Тип обязательств</xsl:text>
																				</th>
																				<xsl:choose>
																					<xsl:when test="../../@PosType = 'S'">
																						<th>
																							<xsl:text>Идентификатор валюты</xsl:text>
																						</th>
																						<th>
																							<xsl:text>Наименование валюты</xsl:text>
																						</th>
																						<th>
																							<xsl:text>Идентификатор инструмента</xsl:text>
																						</th>
																						<th>
																							<xsl:text>Краткое наименование инструмента</xsl:text>
																						</th>
																					</xsl:when>
																					<xsl:when test="../../@PosType = 'C'">
																						<th colspan="2">
																							<xsl:text>Идентификатор валюты</xsl:text>
																						</th>
																						<th colspan="2">
																							<xsl:text>Наименование валюты</xsl:text>
																						</th>
																					</xsl:when>
																				</xsl:choose>
																				<th>
																					<xsl:text>Входящее нетто-обязательство</xsl:text>
																				</th>
																				<th>
																					<xsl:text>Входящее нетто-требование</xsl:text>
																				</th>
																				<th>
																					<xsl:text>ВМ по вх. нетто-об-ву/нетто-треб-ю</xsl:text>
																				</th>
																				<th>
																					<xsl:text>ВМ по сделкам за текущий день</xsl:text>
																				</th>
																				<th>
																					<xsl:text>Кол-во исп. обязательств</xsl:text>
																				</th>
																				<th>
																					<xsl:text>Кол-во исп. требований</xsl:text>
																				</th>
																				<th>
																					<xsl:text>Итоговое нетто-обязательство/обязательство</xsl:text>
																				</th>
																				<th>
																					<xsl:text>Итоговое нетто-требование/требование</xsl:text>
																				</th>
																			</tr>
																		</thead>
																		<tbody>
																			<xsl:for-each select="SUBRECORDS">
																				<tr style="vertical-align:top; ">
																					<td style="border-bottom:0; border-top:0; text-align:right; ">
																						<xsl:choose>
																							<xsl:when test="@DataType='TRADE'">
																								<span>
																									<xsl:text>по Договорам</xsl:text>
																								</span>
																							</xsl:when>
																							<xsl:when test="@DataType='FEE'">
																								<span>
																									<xsl:text>по оборотной части комиссионного вознаграждения с уплатой в день исполнения Договора</xsl:text>
																								</span>
																							</xsl:when>
																						</xsl:choose>
																					</td>
																					<xsl:choose>
																						<xsl:when test="../../../@PosType = 'S'">
																							<td style="border-bottom:0; border-top:0; text-align:right; ">
																								<xsl:for-each select="@CurrencyId">
																									<xsl:value-of select="string(.) "/>
																								</xsl:for-each>
																							</td>
																							<td style="border-bottom:0; border-top:0; text-align:right; ">
																								<xsl:for-each select="@CurrencyName">
																									<xsl:value-of select="string(.) "/>
																								</xsl:for-each>
																							</td>
																							<td style="border-bottom:0; border-top:0; text-align:right; ">
																								<xsl:for-each select="@SecurityId">
																									<xsl:value-of select="string(.) "/>
																								</xsl:for-each>
																							</td>
																							<td style="border-bottom:0; border-top:0; text-align:right; ">
																								<xsl:for-each select="@SecShortName">
																									<xsl:value-of select="string(.) "/>
																								</xsl:for-each>
																							</td>
																						</xsl:when>
																						<xsl:when test="../../../@PosType = 'C'">
																							<td colspan="2" style="border-bottom:0; border-top:0; text-align:right; ">
																								<xsl:for-each select="@CurrencyId">
																									<xsl:value-of select="string(.) "/>
																								</xsl:for-each>
																							</td>
																							<td colspan="2" style="border-bottom:0; border-top:0; text-align:right; ">
																								<xsl:for-each select="@CurrencyName">
																									<xsl:value-of select="string(.) "/>
																								</xsl:for-each>
																							</td>
																						</xsl:when>
																					</xsl:choose>
																					<td style="border-bottom:0; border-top:0; text-align:right; ">
																						<xsl:for-each select="@DebitBeg">
																							<xsl:value-of select="string(.) "/>
																						</xsl:for-each>
																					</td>
																					<td style="border-bottom:0; border-top:0; text-align:right; ">
																						<xsl:for-each select="@CreditBeg">
																							<xsl:value-of select="string(.) "/>
																						</xsl:for-each>
																					</td>
																					<td style="border-bottom:0; border-top:0; text-align:right; ">
																						<xsl:for-each select="@VarMarginBeg">
																							<xsl:value-of select="string(.) "/>
																						</xsl:for-each>
																					</td>
																					<td style="border-bottom:0; border-top:0; text-align:right; ">
																						<xsl:for-each select="@VarMargin">
																							<xsl:value-of select="string(.) "/>
																						</xsl:for-each>
																					</td>
																					<td style="border-bottom:0; border-top:0; text-align:right; ">
																						<xsl:for-each select="@PosExecDebit">
																							<xsl:value-of select="string(.) "/>
																						</xsl:for-each>
																					</td>
																					<td style="border-bottom:0; border-top:0; text-align:right; ">
																						<xsl:for-each select="@PosExecCredit">
																							<xsl:value-of select="string(.) "/>
																						</xsl:for-each>
																					</td>
																					<td style="border-bottom:0; border-top:0; text-align:right; ">
																						<xsl:for-each select="@Debit">
																							<xsl:value-of select="string(.) "/>
																						</xsl:for-each>
																					</td>
																					<td style="border-bottom:0; border-top:0; text-align:right; ">
																						<xsl:for-each select="@Credit">
																							<xsl:value-of select="string(.) "/>
																						</xsl:for-each>
																					</td>
																				</tr>
																				<tr>
																					<td colspan="13" style="border-bottom:0; border-left:0; border-right:0; font:10; font-weight:bold; height:1; line-height:1; text-align:left; "/>
																				</tr>
																			</xsl:for-each>
																		</tbody>
																	</table>
																	<br/>
																</xsl:for-each>
															</xsl:for-each>
														</xsl:for-each>
													</xsl:for-each>
												</xsl:for-each>
											</xsl:for-each>
										</xsl:otherwise>
									</xsl:choose>
								</xsl:for-each>
								<!--mfb23-->
							</xsl:for-each>
							<!--rts_doc-->
						</xsl:for-each>
						<!--XML1-->
					</xsl:when>
					<xsl:otherwise>
						<xsl:for-each select="$XML1">
							<xsl:for-each select="RTS_DOC">
								<xsl:for-each select="DOC_REQUISITES">
									<table width="100%" style="background=#FFFAF0; color=#191970; font-size:11; word-wrap:break-word; border:0; border-bottom:0; border-collapse:collapse; border-left:0; border-right:0;" border="1">
										<tr style="text-align:center; vertical-align:Center; word-wrap:break-word; font-size:15; font-weight:bold; color:#191970; background= #B0C4DE;">
											<th colspan="5">
												<xsl:choose>
													<xsl:when test="@SENDER_NAME!=''">
														<span>
															<xsl:value-of select="@SENDER_NAME"/>
														</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=#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=#FFFAF0;">
												<span style="font-weight:bold;">
													<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>
								<xsl:for-each select="MFB23">
									<table width="100%" style="background=#FFFAF0; color=#191970; font-size:11; word-wrap:break-word; border:0; border-bottom:0; border-collapse:collapse; border-left:0; border-right:0;" border="1">
										<th colspan="5" style="text-align:center; vertical-align:Center; word-wrap:break-word; font-size:15; font-weight:bold; color:#191970; background= #B0C4DE;">
											<xsl:choose>
												<xsl:when test="@ReportDesc!=''">
													<span>
														<xsl:value-of select="@ReportDesc"/>
													</span>
												</xsl:when>
												<xsl:otherwise>
													<xsl:text>Report on Obligations under Agreements</xsl:text>
												</xsl:otherwise>
											</xsl:choose>
										</th>
										<tr style="text-align:center;">
											<td width="17%" style="background=#E6E6FA;">
												<xsl:text>Report date:</xsl:text>
											</td>
											<td width="10%" style="background=#E6E6FA;">
												<xsl:text>Clearing Member identifier:</xsl:text>
											</td>
											<td colspan="3" 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="@MainFirmId">
													<xsl:value-of select="string(.)"/>
												</xsl:for-each>
											</td>
											<td colspan="3" style="text-align:center;">
												<xsl:for-each select="@FirmName">
													<xsl:value-of select="string(.)"/>
												</xsl:for-each>
											</td>
										</tr>
									</table>
									<br/>
									<!--Проверка на версионность, и разветвление на разные типы отчетов -->
									<xsl:choose>
										<xsl:when test="@ReportVersion=2">
											<xsl:for-each select="FIRM">
												<xsl:for-each select="SETTLE">
													<table width="70%" style="background=#FFFAF0; 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= #B0C4DE;">
																<xsl:text>Trading Member</xsl:text>
															</td>
															<td style="background= #B0C4DE;">
																<xsl:text>Trading Member Name</xsl:text>
															</td>
															<td style="background= #B0C4DE;">
																<xsl:text>TCA code</xsl:text>
															</td>
														</tr>
														<tr>
															<td width="30%" style="font-size:12;">
																<xsl:for-each select="../@FirmID">
																	<xsl:value-of select="string(.)"/>
																</xsl:for-each>
															</td>
															<td style="font-size:12; ">
																<xsl:for-each select="../../@FirmName">
																	<xsl:value-of select="string(.)"/>
																</xsl:for-each>
															</td>
															<td style="font-size:12; ">
																<xsl:for-each select="@ClrAccCode">
																	<xsl:value-of select="string(.)"/>
																</xsl:for-each>
															</td>
														</tr>
													</table>
													<table width="100%" style="background=#FFFAF0; color=#191970; word-wrap:break-word; border:0; border-bottom:0; border-collapse:collapse; border-left:0; border-right:0;" border="1">
														<tr style="text-align:center; vertical-align:top; word-wrap:break-word; color:#191970; background=#E6E6FA;">
															<td width="8%" style="background= #B0C4DE;">
																<xsl:text>Date of obligation settlement</xsl:text>
															</td>
															<td width="8%" style="background= #B0C4DE;">
																<xsl:text>Internal accounting register section code</xsl:text>
															</td>
															<td width="8%">
																<xsl:text>Type of obligations</xsl:text>
															</td>
															<td width="8%">
																<xsl:text>Short name of the instrument</xsl:text>
															</td>
															<td width="8%">
																<xsl:text>Opening net obligation/obligation</xsl:text>
															</td>
															<td width="8%">
																<xsl:text>Opening net claim/claim</xsl:text>
															</td>
															<td width="8%">
																<xsl:text>Change of obligations in connection with the execution of agreements on the current</xsl:text>
															</td>
															<td width="8%">
																<xsl:text>Change of claims in connection with the execution of agreements on the current day</xsl:text>
															</td>
															<td width="8%">
																<xsl:text>Change of obligations in connection with the corporate event</xsl:text>
															</td>
															<td width="8%">
																<xsl:text>Change of claims in connection with the corporate event</xsl:text>
															</td>
															<td width="8%">
																<xsl:text>Number of fulfilled obligations</xsl:text>
															</td>
															<td width="7%">
																<xsl:text>Number of satisfied claims</xsl:text>
															</td>
															<td width="8%">
																<xsl:text>Final net obligation/obligation</xsl:text>
															</td>
															<td width="7%">
																<xsl:text>Final net obligation/obligation</xsl:text>
															</td>
														</tr>
														<xsl:for-each select="SETTLEDATE">
															<xsl:for-each select="POSTYPES">
																<xsl:for-each select="GROUP">
																	<xsl:for-each select="RECORDS">
																		<tr style="vertical-align:top; ">
																			<td style="border-bottom:0; border-top:0;">
																				<xsl:for-each select="../../../@SettleDate">
																					<xsl:variable name="seqContentStrings_2">
																						<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_2" select="string($seqContentStrings_2)"/>
																					<xsl:value-of select="$sContent_2"/>
																				</xsl:for-each>
																			</td>
																			<td style="border-bottom:0; border-top:0;  text-align:center;">
																				<xsl:choose>
																					<xsl:when test="../../@PosType = 'C'">
																						<xsl:for-each select="../@BankAccCode">
																							<xsl:value-of select="string(.) "/>
																						</xsl:for-each>
																					</xsl:when>
																					<xsl:when test="../../@PosType = 'S'">
																						<xsl:for-each select="../@GuarDepUnitId">
																							<xsl:value-of select="string(.) "/>
																						</xsl:for-each>
																					</xsl:when>
																				</xsl:choose>
																			</td>
																			<td style="border-bottom:0; border-top:0; text-align:right; ">
																				<xsl:choose>
																					<xsl:when test="@DataType='TRADE'">
																						<span>
																							<xsl:text>under agreements</xsl:text>
																						</span>
																					</xsl:when>
																					<xsl:when test="@DataType='FEE'">
																						<span>
																							<xsl:text>negotiable part of the commission fee with payment on the day of agreement performance</xsl:text>
																						</span>
																					</xsl:when>
																					<xsl:when test="@DataType='DIVIDEND'">
																						<span>
																							<xsl:text>for return of dividends on Repurchase transactions</xsl:text>
																						</span>
																					</xsl:when>
																					<xsl:when test="@DataType='ADDITIONAL'">
																						<span>
																							<xsl:text>additional obligations arisen out of corporate events</xsl:text>
																						</span>
																					</xsl:when>
																				</xsl:choose>
																			</td>
																			<xsl:choose>
																				<xsl:when test="../../@PosType = 'S'">
																					<td style="border-bottom:0; border-top:0;">
																						<xsl:for-each select="@SecurityId">
																							<xsl:value-of select="string(.) "/>
																						</xsl:for-each>
																					</td>
																				</xsl:when>
																				<xsl:when test="../../@PosType = 'C'">
																					<td style="border-bottom:0; border-top:0;">
																						<xsl:for-each select="@CurrencyId">
																							<xsl:value-of select="string(.) "/>
																						</xsl:for-each>
																					</td>
																				</xsl:when>
																			</xsl:choose>
																			<td style="border-bottom:0; border-top:0; text-align:right; ">
																				<xsl:for-each select="@DebitBeg">
																					<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																				</xsl:for-each>
																			</td>
																			<td style="border-bottom:0; border-top:0; text-align:right; ">
																				<xsl:for-each select="@CreditBeg">
																					<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																				</xsl:for-each>
																			</td>
																			<td style="border-bottom:0; border-top:0; text-align:right; ">
																				<xsl:for-each select="@DebitIntraday">
																					<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																				</xsl:for-each>
																			</td>
																			<td style="border-bottom:0; border-top:0; text-align:right; ">
																				<xsl:for-each select="@CreditIntraday">
																					<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																				</xsl:for-each>
																			</td>
																			<td style="border-bottom:0; border-top:0; text-align:right; ">
																				<xsl:for-each select="@DebitCorpEvCorrection">
																					<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																				</xsl:for-each>
																			</td>
																			<td style="border-bottom:0; border-top:0; text-align:right; ">
																				<xsl:for-each select="@CreditCorpEvCorrection">
																					<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																				</xsl:for-each>
																			</td>
																			<td style="border-bottom:0; border-top:0; text-align:right; ">
																				<xsl:for-each select="@PosExecDebit">
																					<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																				</xsl:for-each>
																			</td>
																			<td style="border-bottom:0; border-top:0; text-align:right; ">
																				<xsl:for-each select="@PosExecCredit">
																					<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																				</xsl:for-each>
																			</td>
																			<td style="border-bottom:0; border-top:0; text-align:right; ">
																				<xsl:for-each select="@Debit">
																					<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																				</xsl:for-each>
																			</td>
																			<td style="border-bottom:0; border-top:0; text-align:right; ">
																				<xsl:for-each select="@Credit">
																					<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																				</xsl:for-each>
																			</td>
																		</tr>
																		<tr>
																			<td colspan="14" style="border-bottom:0; border-left:0; border-right:0; font:10; font-weight:bold; height:1; line-height:1; text-align:left; "/>
																		</tr>
																	</xsl:for-each>
																	<!--records-->
																</xsl:for-each>
																<!--GROUP-->
															</xsl:for-each>
															<!--POSTYPES-->
														</xsl:for-each>
														<!--SETTLEDATE-->
													</table>
													<xsl:for-each select="SETTLEDATE">
														<xsl:for-each select="POSTYPES">
															<xsl:for-each select="GROUP">
																<xsl:for-each select="SUBACCOUNT">
																	<table width="15%" style="background=#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= #B0C4DE; color=#191970; font-weight: bold;">
																				<xsl:text>Analytical TCA code</xsl:text>
																			</td>
																		</tr>
																		<tr>
																			<td style="font-weight: bold;">
																				<xsl:for-each select="@SubClrAccCode">
																					<xsl:value-of select="string(.) "/>
																				</xsl:for-each>
																			</td>
																		</tr>
																	</table>
																	<table width="100%" style="background=#FFFAF0; color=#191970; word-wrap:break-word; border:0; border-bottom:0; border-collapse:collapse; border-left:0; border-right:0;" border="1">
																		<tr style="text-align:center; vertical-align:top; word-wrap:break-word; color:#191970; background=#E6E6FA;">
																			<td width="8%" style="background= #B0C4DE;">
																				<xsl:text>Date of obligation settlement</xsl:text>
																			</td>
																			<td width="8%" style="background= #B0C4DE;">
																				<xsl:text>Internal accounting register section code</xsl:text>
																			</td>
																			<td width="8%">
																				<xsl:text>Type of obligations</xsl:text>
																			</td>
																			<td width="8%">
																				<xsl:text>Short name of the instrument</xsl:text>
																			</td>
																			<td width="8%">
																				<xsl:text>Opening net obligation/obligation</xsl:text>
																			</td>
																			<td width="8%">
																				<xsl:text>Opening net claim/claim</xsl:text>
																			</td>
																			<td width="8%">
																				<xsl:text>Change of obligations in connection with the execution of agreements on the current</xsl:text>
																			</td>
																			<td width="8%">
																				<xsl:text>Change of claims in connection with the execution of agreements on the current day</xsl:text>
																			</td>
																			<td width="8%">
																				<xsl:text>Change of obligations in connection with the corporate event</xsl:text>
																			</td>
																			<td width="8%">
																				<xsl:text>Change of claims in connection with the corporate event</xsl:text>
																			</td>
																			<td width="8%">
																				<xsl:text>Number of fulfilled obligations</xsl:text>
																			</td>
																			<td width="7%">
																				<xsl:text>Number of satisfied claims</xsl:text>
																			</td>
																			<td width="8%">
																				<xsl:text>Final net obligation/obligation</xsl:text>
																			</td>
																			<td width="7%">
																				<xsl:text>Final net obligation/obligation</xsl:text>
																			</td>
																		</tr>
																		<xsl:for-each select="SUBRECORDS">
																			<tr style="vertical-align:top; ">
																				<td style="border-bottom:0; border-top:0;">
																					<xsl:for-each select="../../../../@SettleDate">
																						<xsl:variable name="seqContentStrings_2">
																							<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_2" select="string($seqContentStrings_2)"/>
																						<xsl:value-of select="$sContent_2"/>
																					</xsl:for-each>
																				</td>
																				<td>
																					<xsl:choose>
																						<xsl:when test="../../../@PosType = 'C'">
																							<xsl:for-each select="../../@BankAccCode">
																								<xsl:value-of select="string(.) "/>
																							</xsl:for-each>
																						</xsl:when>
																						<xsl:when test="../../../@PosType = 'S'">
																							<xsl:for-each select="../../@GuarDepUnitId">
																								<xsl:value-of select="string(.) "/>
																							</xsl:for-each>
																						</xsl:when>
																					</xsl:choose>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:choose>
																						<xsl:when test="@DataType='TRADE'">
																							<span>
																								<xsl:text>under agreements</xsl:text>
																							</span>
																						</xsl:when>
																						<xsl:when test="@DataType='FEE'">
																							<span>
																								<xsl:text>negotiable part of the commission fee with payment on the day of agreement performance</xsl:text>
																							</span>
																						</xsl:when>
																						<xsl:when test="@DataType='DIVIDEND'">
																							<span>
																								<xsl:text>for return of dividends on Repurchase transactions </xsl:text>
																							</span>
																						</xsl:when>
																					</xsl:choose>
																				</td>
																				<td style="border-bottom:0; border-top:0;  ">
																					<xsl:choose>
																						<xsl:when test="../../../@PosType = 'S'">
																							<xsl:for-each select="@SecurityId">
																								<xsl:value-of select="string(.) "/>
																							</xsl:for-each>
																						</xsl:when>
																						<xsl:when test="../../../@PosType = 'C'">
																							<xsl:for-each select="@CurrencyId">
																								<xsl:value-of select="string(.) "/>
																							</xsl:for-each>
																						</xsl:when>
																					</xsl:choose>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@DebitBeg">
																						<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																					</xsl:for-each>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@CreditBeg">
																						<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																					</xsl:for-each>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@DebitIntraday">
																						<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																					</xsl:for-each>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@CreditIntraday">
																						<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																					</xsl:for-each>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@DebitCorpEvCorrection">
																						<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																					</xsl:for-each>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@CreditCorpEvCorrection">
																						<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																					</xsl:for-each>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@PosExecDebit">
																						<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																					</xsl:for-each>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@PosExecCredit">
																						<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																					</xsl:for-each>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@Debit">
																						<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																					</xsl:for-each>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@Credit">
																						<xsl:value-of select="format-number(string(.),'### ### ##0,00')"/>
																					</xsl:for-each>
																				</td>
																			</tr>
																		</xsl:for-each>
																		<!--subrecords-->
																	</table>
																</xsl:for-each>
																<!--SUBACCOUNT-->
															</xsl:for-each>
															<!--GROUP-->
														</xsl:for-each>
														<!--postypeS-->
													</xsl:for-each>
													<!--settledate-->
													<br/>
												</xsl:for-each>
												<!--settle-->
											</xsl:for-each>
											<!--fIRM-->
										</xsl:when>
										<xsl:otherwise>
											<xsl:for-each select="FIRM">
												<xsl:for-each select="SETTLE">
													<table width="1000" style="background=#FFFAF0; color=#191970; 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="25%" style="background= #B0C4DE; color=#191970">
																<xsl:text>Trading Member:</xsl:text>
															</td>
															<td width="10%">
																<xsl:for-each select="../@FirmID">
																	<xsl:value-of select="string(.)"/>
																</xsl:for-each>
															</td>
															<td width="10%" style="background= #B0C4DE; color=#191970">
																<xsl:text>TCA code:</xsl:text>
															</td>
															<td colspan="3">
																<xsl:for-each select="@ClrAccCode">
																	<xsl:value-of select="string(.) "/>
																</xsl:for-each>
															</td>
														</tr>
													</table>
													<xsl:for-each select="SETTLEDATE">
														<xsl:for-each select="POSTYPES">
															<xsl:for-each select="GROUP">
																<table width="1000" style="background=#FFFAF0; color=#191970; 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="25%" style="background= #B0C4DE; color=#191970">
																			<xsl:text>Settlement date:</xsl:text>
																		</td>
																		<td width="10%">
																			<xsl:for-each select="../../@SettleDate">
																				<xsl:variable name="seqContentStrings_2">
																					<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_2" select="string($seqContentStrings_2)"/>
																				<xsl:value-of select="$sContent_2"/>
																			</xsl:for-each>
																		</td>
																		<td style="background= #B0C4DE; color=#191970">
																			<xsl:text>Section of data on obligation types: </xsl:text>
																		</td>
																		<td>
																			<xsl:choose>
																				<xsl:when test="../@PosType = 'C'">
																					<span>
																						<xsl:text>Information on net obligations/requirements for a cash position</xsl:text>
																					</span>
																				</xsl:when>
																				<xsl:when test="../@PosType = 'S'">
																					<span>
																						<xsl:text>Information on net obligations/claims for depository sections</xsl:text>
																					</span>
																				</xsl:when>
																			</xsl:choose>
																		</td>
																	</tr>
																	<tr>
																		<xsl:choose>
																			<xsl:when test="../@PosType = 'C'">
																				<td style="background= #B0C4DE; color=#191970">
																					<xsl:text>Cash Register code: </xsl:text>
																				</td>
																				<td colspan="3">
																					<xsl:for-each select="@BankAccCode">
																						<xsl:value-of select="string(.) "/>
																					</xsl:for-each>
																				</td>
																			</xsl:when>
																			<xsl:when test="../@PosType = 'S'">
																				<td style="background= #B0C4DE; color=#191970">
																					<xsl:text>Custody (sub-account) account for securities record: </xsl:text>
																				</td>
																				<td colspan="3">
																					<xsl:for-each select="@GuarDepUnitId">
																						<xsl:value-of select="string(.) "/>
																					</xsl:for-each>
																				</td>
																			</xsl:when>
																		</xsl:choose>
																	</tr>
																</table>
																<table width="1000" style="background=#FFFAF0; color=#191970; border:1; border-bottom:0; border-collapse:collapse; border-left:0; border-right:0; border-top:0; font-family:Arial; font-size:9; word-wrap:break-word;" border="1">
																	<xsl:variable name="CurrContextGrid_4" select="."/>
																	<thead style="text-align:center; word-wrap:break-word; ">
																		<tr style="text-align:center; vertical-align:top; word-wrap:break-word; color:#191970; background=#E6E6FA;">
																			<th>
																				<xsl:text>Type of obligations</xsl:text>
																			</th>
																			<xsl:choose>
																				<xsl:when test="../@PosType = 'S'">
																					<th>
																						<xsl:text>Settlement currency ID</xsl:text>
																					</th>
																					<th>
																						<xsl:text>Settlement currency name</xsl:text>
																					</th>
																					<th>
																						<xsl:text>Instrument identifier</xsl:text>
																					</th>
																					<th>
																						<xsl:text>Short name of the instrument</xsl:text>
																					</th>
																				</xsl:when>
																				<xsl:when test="../@PosType = 'C'">
																					<th colspan="2">
																						<xsl:text>Currency ID</xsl:text>
																					</th>
																					<th colspan="2">
																						<xsl:text>Currency name</xsl:text>
																					</th>
																				</xsl:when>
																			</xsl:choose>
																			<th>
																				<xsl:text>Opening net obligation/obligation</xsl:text>
																			</th>
																			<th>
																				<xsl:text>Opening net claim/claim</xsl:text>
																			</th>
																			<th>
																				<xsl:text>Variation margin on opening net obligation/net-claim</xsl:text>
																			</th>
																			<th>
																				<xsl:text>Variation margin on transactions for the current day</xsl:text>
																			</th>
																			<th>
																				<xsl:text>Number of fulfilled obligations</xsl:text>
																			</th>
																			<th>
																				<xsl:text>Number of fulfilled obligations</xsl:text>
																			</th>
																			<th>
																				<xsl:text>Final net obligation/obligation</xsl:text>
																			</th>
																			<th>
																				<xsl:text>Final net claim/claim</xsl:text>
																			</th>
																		</tr>
																	</thead>
																	<tbody>
																		<xsl:for-each select="RECORDS">
																			<tr style="vertical-align:top; ">
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:choose>
																						<xsl:when test="@DataType='TRADE'">
																							<span>
																								<xsl:text>under agreements</xsl:text>
																							</span>
																						</xsl:when>
																						<xsl:when test="@DataType='FEE'">
																							<span>
																								<xsl:text>negotiable part of the commission fee with payment on the day of agreement performance</xsl:text>
																							</span>
																						</xsl:when>
																						<xsl:when test="@DataType='DIVIDEND'">
																							<span>
																								<xsl:text>for return of dividends on Repurchase transactions </xsl:text>
																							</span>
																						</xsl:when>
																						<xsl:when test="@DataType='ADDITIONAL'">
																							<span>
																								<xsl:text>additional obligations arisen out of corporate events</xsl:text>
																							</span>
																						</xsl:when>
																					</xsl:choose>
																				</td>
																				<xsl:choose>
																					<xsl:when test="../../@PosType = 'S'">
																						<td style="border-bottom:0; border-top:0; text-align:right; ">
																							<xsl:for-each select="@CurrencyId">
																								<xsl:value-of select="string(.) "/>
																							</xsl:for-each>
																						</td>
																						<td style="border-bottom:0; border-top:0; text-align:right; ">
																							<xsl:for-each select="@CurrencyName">
																								<xsl:value-of select="string(.) "/>
																							</xsl:for-each>
																						</td>
																						<td style="border-bottom:0; border-top:0; text-align:right; ">
																							<xsl:for-each select="@SecurityId">
																								<xsl:value-of select="string(.) "/>
																							</xsl:for-each>
																						</td>
																						<td style="border-bottom:0; border-top:0; text-align:right; ">
																							<xsl:for-each select="@SecShortName">
																								<xsl:value-of select="string(.) "/>
																							</xsl:for-each>
																						</td>
																					</xsl:when>
																					<xsl:when test="../../@PosType = 'C'">
																						<td colspan="2" style="border-bottom:0; border-top:0; text-align:right; ">
																							<xsl:for-each select="@CurrencyId">
																								<xsl:value-of select="string(.) "/>
																							</xsl:for-each>
																						</td>
																						<td colspan="2" style="border-bottom:0; border-top:0; text-align:right; ">
																							<xsl:for-each select="@CurrencyName">
																								<xsl:value-of select="string(.) "/>
																							</xsl:for-each>
																						</td>
																					</xsl:when>
																				</xsl:choose>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@DebitBeg">
																						<xsl:value-of select="string(.) "/>
																					</xsl:for-each>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@CreditBeg">
																						<xsl:value-of select="string(.) "/>
																					</xsl:for-each>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@VarMarginBeg">
																						<xsl:value-of select="string(.) "/>
																					</xsl:for-each>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@VarMargin">
																						<xsl:value-of select="string(.) "/>
																					</xsl:for-each>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@PosExecDebit">
																						<xsl:value-of select="string(.) "/>
																					</xsl:for-each>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@PosExecCredit">
																						<xsl:value-of select="string(.) "/>
																					</xsl:for-each>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@Debit">
																						<xsl:value-of select="string(.) "/>
																					</xsl:for-each>
																				</td>
																				<td style="border-bottom:0; border-top:0; text-align:right; ">
																					<xsl:for-each select="@Credit">
																						<xsl:value-of select="string(.) "/>
																					</xsl:for-each>
																				</td>
																			</tr>
																			<tr>
																				<td colspan="13" style="border-bottom:0; border-left:0; border-right:0; font:10; font-weight:bold; height:1; line-height:1; text-align:left; "/>
																			</tr>
																		</xsl:for-each>
																	</tbody>
																</table>
																<BR/>
																<xsl:for-each select="SUBACCOUNT">
																	<table width="1000" style="background=#FFFAF0; color=#191970; border:1; border-bottom:0; border-collapse:collapse; border-left:0; border-right:0; border-top:0; font-family:Arial; font-size:9; word-wrap:break-word;" border="1">
																		<thead style="text-align:center; word-wrap:break-word; ">
																			<tr>
																				<th colspan="4" style="background= #B0C4DE; color=#191970">
																					<xsl:text>Analytical TCA code:</xsl:text>
																				</th>
																				<th colspan="9" style="text-align:left">
																					<xsl:for-each select="@SubClrAccCode">
																						<xsl:value-of select="string(.) "/>
																					</xsl:for-each>
																				</th>
																			</tr>
																			<tr style="text-align:center; vertical-align:top; word-wrap:break-word; color:#191970; background=#E6E6FA;">
																				<th>
																					<xsl:text>Type of obligations:</xsl:text>
																				</th>
																				<xsl:choose>
																					<xsl:when test="../../@PosType = 'S'">
																						<th>
																							<xsl:text>Currency ID</xsl:text>
																						</th>
																						<th>
																							<xsl:text>Currency name</xsl:text>
																						</th>
																						<th>
																							<xsl:text>Instrument ID</xsl:text>
																						</th>
																						<th>
																							<xsl:text>Short name of the instrument</xsl:text>
																						</th>
																					</xsl:when>
																					<xsl:when test="../../@PosType = 'C'">
																						<th colspan="2">
																							<xsl:text>Currency ID</xsl:text>
																						</th>
																						<th colspan="2">
																							<xsl:text>Currency name</xsl:text>
																						</th>
																					</xsl:when>
																				</xsl:choose>
																				<th>
																					<xsl:text>Opening net obligation/obligation</xsl:text>
																				</th>
																				<th>
																					<xsl:text>Opening net claim/claim</xsl:text>
																				</th>
																				<th>
																					<xsl:text>Variation margin on opening net obligation/net-claim</xsl:text>
																				</th>
																				<th>
																					<xsl:text>Variation margin on transactions for the current day</xsl:text>
																				</th>
																				<th>
																					<xsl:text>Number of fulfilled obligations</xsl:text>
																				</th>
																				<th>
																					<xsl:text>Number of satisfied claims</xsl:text>
																				</th>
																				<th>
																					<xsl:text>Final net obligation/obligation</xsl:text>
																				</th>
																				<th>
																					<xsl:text>Final net obligation/obligation</xsl:text>
																				</th>
																			</tr>
																		</thead>
																		<tbody>
																			<xsl:for-each select="SUBRECORDS">
																				<tr style="vertical-align:top; ">
																					<td style="border-bottom:0; border-top:0; text-align:right; ">
																						<xsl:choose>
																							<xsl:when test="@DataType='TRADE'">
																								<span>
																									<xsl:text>under agreements</xsl:text>
																								</span>
																							</xsl:when>
																							<xsl:when test="@DataType='FEE'">
																								<span>
																									<xsl:text>negotiable part of the commission fee with payment on the day of agreement performance</xsl:text>
																								</span>
																							</xsl:when>
																						</xsl:choose>
																					</td>
																					<xsl:choose>
																						<xsl:when test="../../../@PosType = 'S'">
																							<td style="border-bottom:0; border-top:0; text-align:right; ">
																								<xsl:for-each select="@CurrencyId">
																									<xsl:value-of select="string(.) "/>
																								</xsl:for-each>
																							</td>
																							<td style="border-bottom:0; border-top:0; text-align:right; ">
																								<xsl:for-each select="@CurrencyName">
																									<xsl:value-of select="string(.) "/>
																								</xsl:for-each>
																							</td>
																							<td style="border-bottom:0; border-top:0; text-align:right; ">
																								<xsl:for-each select="@SecurityId">
																									<xsl:value-of select="string(.) "/>
																								</xsl:for-each>
																							</td>
																							<td style="border-bottom:0; border-top:0; text-align:right; ">
																								<xsl:for-each select="@SecShortName">
																									<xsl:value-of select="string(.) "/>
																								</xsl:for-each>
																							</td>
																						</xsl:when>
																						<xsl:when test="../../../@PosType = 'C'">
																							<td colspan="2" style="border-bottom:0; border-top:0; text-align:right; ">
																								<xsl:for-each select="@CurrencyId">
																									<xsl:value-of select="string(.) "/>
																								</xsl:for-each>
																							</td>
																							<td colspan="2" style="border-bottom:0; border-top:0; text-align:right; ">
																								<xsl:for-each select="@CurrencyName">
																									<xsl:value-of select="string(.) "/>
																								</xsl:for-each>
																							</td>
																						</xsl:when>
																					</xsl:choose>
																					<td style="border-bottom:0; border-top:0; text-align:right; ">
																						<xsl:for-each select="@DebitBeg">
																							<xsl:value-of select="string(.) "/>
																						</xsl:for-each>
																					</td>
																					<td style="border-bottom:0; border-top:0; text-align:right; ">
																						<xsl:for-each select="@CreditBeg">
																							<xsl:value-of select="string(.) "/>
																						</xsl:for-each>
																					</td>
																					<td style="border-bottom:0; border-top:0; text-align:right; ">
																						<xsl:for-each select="@VarMarginBeg">
																							<xsl:value-of select="string(.) "/>
																						</xsl:for-each>
																					</td>
																					<td style="border-bottom:0; border-top:0; text-align:right; ">
																						<xsl:for-each select="@VarMargin">
																							<xsl:value-of select="string(.) "/>
																						</xsl:for-each>
																					</td>
																					<td style="border-bottom:0; border-top:0; text-align:right; ">
																						<xsl:for-each select="@PosExecDebit">
																							<xsl:value-of select="string(.) "/>
																						</xsl:for-each>
																					</td>
																					<td style="border-bottom:0; border-top:0; text-align:right; ">
																						<xsl:for-each select="@PosExecCredit">
																							<xsl:value-of select="string(.) "/>
																						</xsl:for-each>
																					</td>
																					<td style="border-bottom:0; border-top:0; text-align:right; ">
																						<xsl:for-each select="@Debit">
																							<xsl:value-of select="string(.) "/>
																						</xsl:for-each>
																					</td>
																					<td style="border-bottom:0; border-top:0; text-align:right; ">
																						<xsl:for-each select="@Credit">
																							<xsl:value-of select="string(.) "/>
																						</xsl:for-each>
																					</td>
																				</tr>
																				<tr>
																					<td colspan="13" style="border-bottom:0; border-left:0; border-right:0; font:10; font-weight:bold; height:1; line-height:1; text-align:left; "/>
																				</tr>
																			</xsl:for-each>
																		</tbody>
																	</table>
																	<br/>
																</xsl:for-each>
															</xsl:for-each>
														</xsl:for-each>
													</xsl:for-each>
												</xsl:for-each>
											</xsl:for-each>
										</xsl:otherwise>
									</xsl:choose>
								</xsl:for-each>
								<!--mfb23-->
							</xsl:for-each>
							<!--rts_doc-->
						</xsl:for-each>
						<!--XML1-->
					</xsl:otherwise>
				</xsl:choose>
			</body>
		</html>
	</xsl:template>
</xsl:stylesheet>
