﻿<?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: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">
								<div>
									<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>
								</div>
								<xsl:for-each select="MFB21">
									<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 width="30%" style="background=#E6E6FA;">
												<xsl:text>Наим. уч. клиринга:</xsl:text>
											</td>
											<td 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 style="text-align:center;">
												<xsl:for-each select="@FirmName">
													<xsl:value-of select="string(.)"/>
												</xsl:for-each>
											</td>
											<td>
												<xsl:for-each select="@FirmType">
													<xsl:value-of select="string(.)"/>
												</xsl:for-each>
											</td>
										</tr>
									</table>
									<br/>
									<!--Проверка на версионность, и разветвление на разные типы отчетов -->
									<xsl:choose>
										<xsl:when test="@ReportVersion=3">
											<xsl:for-each select="CURRENCY">
												<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>
														<td style="background= #B0C4DE; color=#191970; font-weight:bold">
															<xsl:text>Валюта расчетов: </xsl:text>
															<xsl:text>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;</xsl:text>
															<xsl:for-each select="@CurrencyId">
																<xsl:value-of select="string(.)"/>
															</xsl:for-each>
															<xsl:text> (</xsl:text>
															<xsl:for-each select="@CurrencyName">
																<xsl:value-of select="string(.)"/>
															</xsl:for-each>
															<xsl:text>)</xsl:text>
														</td>
													</tr>
												</table>
												<xsl:for-each select="BANK_ACC">
													<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; color:#191970; background=#E6E6FA;">
															<td width="10%">
																<xsl:text>Номер счета получателя</xsl:text>
															</td>
															<td width="20%">
																<xsl:text>Код счета, присвоенный КЦ при регистрации</xsl:text>
															</td>
															<td width="20%">
																<xsl:text>Наименование банка получателя</xsl:text>
															</td>
															<xsl:choose>
																<xsl:when test="../@CurrencyId ='RUB'">
																	<td colspan="2" width="10%">
																		<xsl:text>Номер корр.счета</xsl:text>
																	</td>
																	<td width="10%">
																		<xsl:text>БИК</xsl:text>
																	</td>
																	<td>
																		<xsl:text>Наименование получателя</xsl:text>
																	</td>
																</xsl:when>
																<xsl:otherwise>
																	<td width="10%">
																		<xsl:text>Номер счета в банке-корреспонденте</xsl:text>
																	</td>
																	<td width="10%">
																		<xsl:text>SWIFT-BIC банка-получателя</xsl:text>
																	</td>
																	<td>
																		<xsl:text>SWIFT-BIC банка-корреспондента</xsl:text>
																	</td>
																	<td>
																		<xsl:text>Наименование получателя</xsl:text>
																	</td>
																	<xsl:choose>
																		<xsl:when test="@RecipientAddress = ''">
																			<td>
																				<xsl:text>BIC/BEI</xsl:text>
																			</td>
																		</xsl:when>
																		<xsl:otherwise>
																			<td>
																				<xsl:text>Адрес получателя</xsl:text>
																			</td>
																		</xsl:otherwise>
																	</xsl:choose>
																</xsl:otherwise>
															</xsl:choose>
															<td>
																<xsl:text>Признак счета для вывода при прекращении обслуживания</xsl:text>
															</td>
														</tr>
														<tr>
															<td>
																<xsl:for-each select="@RecvAccount">
																	<xsl:value-of select="string(.)"/>
																</xsl:for-each>
															</td>
															<td>
																<xsl:for-each select="@AccCode">
																	<xsl:value-of select="string(.)"/>
																</xsl:for-each>
															</td>
															<td>
																<xsl:for-each select="@RecvBankName">
																	<xsl:value-of select="string(.)"/>
																</xsl:for-each>
															</td>
															<xsl:choose>
																<xsl:when test="../@CurrencyId = 'RUB'">
																	<td colspan="2">
																		<xsl:for-each select="@RecvBankCorrAcc">
																			<xsl:value-of select="string(.)"/>
																		</xsl:for-each>
																	</td>
																	<td>
																		<xsl:for-each select="@RecvBankBIC">
																			<xsl:value-of select="string(.)"/>
																		</xsl:for-each>
																	</td>
																	<td>
																		<xsl:for-each select="@RecipientName">
																			<xsl:value-of select="string(.)"/>
																		</xsl:for-each>
																	</td>
																</xsl:when>
																<xsl:otherwise>
																	<td>
																		<xsl:for-each select="@RecvBankCorrAcc">
																			<xsl:value-of select="string(.)"/>
																		</xsl:for-each>
																	</td>
																	<td>
																		<xsl:for-each select="@RecvBankBIC">
																			<xsl:value-of select="string(.)"/>
																		</xsl:for-each>
																	</td>
																	<td>
																		<xsl:for-each select="@CorBankBIC">
																			<xsl:value-of select="string(.)"/>
																		</xsl:for-each>
																	</td>
																	<td>
																		<xsl:for-each select="@RecipientName">
																			<xsl:value-of select="string(.)"/>
																		</xsl:for-each>
																	</td>
																	<xsl:choose>
																		<xsl:when test="@RecipientAddress = ''">
																			<td>
																				<xsl:for-each select="@RecipientBIC">
																					<xsl:value-of select="string(.)"/>
																				</xsl:for-each>
																			</td>
																		</xsl:when>
																		<xsl:otherwise>
																			<td>
																				<xsl:for-each select="@RecipientAddress">
																					<xsl:value-of select="string(.)"/>
																				</xsl:for-each>
																			</td>
																		</xsl:otherwise>
																	</xsl:choose>
																</xsl:otherwise>
															</xsl:choose>
															<td>
																<xsl:for-each select="@DefaultAccount">
																	<xsl:value-of select="string(.)"/>
																</xsl:for-each>
															</td>
														</tr>
													</table>
													<xsl:choose>
														<xsl:when test="SETTLE">
															<table width="30%" 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:top; color:#191970; background=#CFCED9;">
																	<td width="33%">
																		<xsl:text>Код ТКС</xsl:text>
																	</td>
																	<td>
																		<xsl:text>Идентификатор участника торгов</xsl:text>
																	</td>
																</tr>
																<xsl:for-each select="SETTLE">
																	<tr>
																		<td>
																			<xsl:for-each select="@ClrAccCode">
																				<xsl:value-of select="string(.)"/>
																			</xsl:for-each>
																		</td>
																		<td>
																			<xsl:for-each select="@FirmID">
																				<xsl:value-of select="string(.)"/>
																			</xsl:for-each>
																		</td>
																	</tr>
																</xsl:for-each>
															</table>
														</xsl:when>
														<xsl:otherwise>
															<table width="30%" 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="vertical-align:top; color:#191970; background=#CFCED9;">
																	<td>
																		<xsl:text>Может использоваться для вывода активов с любого ТКС</xsl:text>
																	</td>
																</tr>
															</table>
														</xsl:otherwise>
													</xsl:choose>
												</xsl:for-each>
												<!--BANC_ACC-->
												<br/>
											</xsl:for-each>
											<!--CURRENCY-->
										</xsl:when>
										<xsl:when test="@ReportVersion=2">
											<xsl:for-each select="CURRENCY">
												<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>
														<td style="background= #B0C4DE; color=#191970; font-weight:bold">
															<xsl:text>Валюта расчетов: </xsl:text>
															<xsl:text>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;</xsl:text>
															<xsl:for-each select="@CurrencyID">
																<xsl:value-of select="string(.)"/>
															</xsl:for-each>
														</td>
													</tr>
												</table>
												<xsl:for-each select="BANK_ACC">
													<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; color:#191970; background=#E6E6FA;">
															<td width="10%">
																<xsl:text>Номер счета получателя</xsl:text>
															</td>
															<td width="20%">
																<xsl:text>Код счета, присвоенный КЦ при регистрации</xsl:text>
															</td>
															<td width="20%">
																<xsl:text>Наименование банка получателя</xsl:text>
															</td>
															<xsl:choose>
																<xsl:when test="../@CurrencyID ='RUR'">
																	<td width="10%">
																		<xsl:text>Номер корр.счета</xsl:text>
																	</td>
																	<td width="10%">
																		<xsl:text>БИК</xsl:text>
																	</td>
																	<td colspan="2">
																		<xsl:text>Наименование получателя</xsl:text>
																	</td>
																</xsl:when>
																<xsl:otherwise>
																	<td width="10%">
																		<xsl:text>Номер счета в банке-корреспонденте</xsl:text>
																	</td>
																	<td width="10%">
																		<xsl:text>SWIFT-BIC банка-получателя</xsl:text>
																	</td>
																	<td>
																		<xsl:text>SWIFT-BIC банка-корреспондента</xsl:text>
																	</td>
																	<xsl:choose>
																		<xsl:when test="@RecipientName = ''">
																			<td>
																				<xsl:text>BIC/BEI</xsl:text>
																			</td>
																		</xsl:when>
																		<xsl:otherwise>
																			<td>
																				<xsl:text>Наименование получателя</xsl:text>
																			</td>
																		</xsl:otherwise>
																	</xsl:choose>
																</xsl:otherwise>
															</xsl:choose>
														</tr>
														<tr>
															<td>
																<xsl:for-each select="@RealAccount">
																	<xsl:value-of select="string(.)"/>
																</xsl:for-each>
															</td>
															<td>
																<xsl:for-each select="@AccCode">
																	<xsl:value-of select="string(.)"/>
																</xsl:for-each>
															</td>
															<td>
																<xsl:for-each select="@BankName">
																	<xsl:value-of select="string(.)"/>
																</xsl:for-each>
															</td>
															<td>
																<xsl:for-each select="@CorrAcc">
																	<xsl:value-of select="string(.)"/>
																</xsl:for-each>
															</td>
															<xsl:choose>
																<xsl:when test="../@CurrencyID = 'RUR'">
																	<td>
																		<xsl:for-each select="@BankBIC">
																			<xsl:value-of select="string(.)"/>
																		</xsl:for-each>
																	</td>
																	<td colspan="2">
																		<xsl:for-each select="@RecipientName">
																			<xsl:value-of select="string(.)"/>
																		</xsl:for-each>
																	</td>
																</xsl:when>
																<xsl:otherwise>
																	<td>
																		<xsl:for-each select="@RecBankBIC">
																			<xsl:value-of select="string(.)"/>
																		</xsl:for-each>
																	</td>
																	<td>
																		<xsl:for-each select="@CorBankBIC">
																			<xsl:value-of select="string(.)"/>
																		</xsl:for-each>
																	</td>
																	<xsl:choose>
																		<xsl:when test="@RecipientName = ''">
																			<td>
																				<xsl:for-each select="@BIC_BEI">
																					<xsl:value-of select="string(.)"/>
																				</xsl:for-each>
																			</td>
																		</xsl:when>
																		<xsl:otherwise>
																			<td>
																				<xsl:for-each select="@RecipientName">
																					<xsl:value-of select="string(.)"/>
																				</xsl:for-each>
																			</td>
																		</xsl:otherwise>
																	</xsl:choose>
																</xsl:otherwise>
															</xsl:choose>
														</tr>
													</table>
													<xsl:choose>
														<xsl:when test="SETTLE">
															<table width="30%" 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:top; color:#191970; background=#CFCED9;">
																	<td width="33%">
																		<xsl:text>Код ТКС</xsl:text>
																	</td>
																	<td>
																		<xsl:text>Идентификатор участника торгов</xsl:text>
																	</td>
																</tr>
																<xsl:for-each select="SETTLE">
																	<tr>
																		<td>
																			<xsl:for-each select="@ClrAccCode">
																				<xsl:value-of select="string(.)"/>
																			</xsl:for-each>
																		</td>
																		<td>
																			<xsl:for-each select="@FirmID">
																				<xsl:value-of select="string(.)"/>
																			</xsl:for-each>
																		</td>
																	</tr>
																</xsl:for-each>
															</table>
														</xsl:when>
														<xsl:otherwise>
															<table width="30%" 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="vertical-align:top; color:#191970; background=#CFCED9;">
																	<td>
																		<xsl:text>Может использоваться для вывода активов с любого ТКС</xsl:text>
																	</td>
																</tr>
															</table>
														</xsl:otherwise>
													</xsl:choose>
												</xsl:for-each>
												<!--BANC_ACC-->
												<br/>
											</xsl:for-each>
											<!--CURRENCY-->
										</xsl:when>
										<xsl:otherwise>
											<xsl:for-each select="CURRENCY">
												<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>
														<th colspan="4" style="background= #B0C4DE; color=#191970">
															<xsl:text>Данные по валюте счета</xsl:text>
														</th>
													</tr>
													<tr>
														<td width="20%" style="background= #B0C4DE; color=#191970">
															<xsl:text>Идентификатор валюты счета</xsl:text>
														</td>
														<td width="10%">
															<xsl:for-each select="@CurrencyId">
																<xsl:value-of select="string(.)"/>
															</xsl:for-each>
														</td>
														<td width="20%" style="background= #B0C4DE; color=#191970">
															<xsl:text>Наименование валюты расчетов</xsl:text>
														</td>
														<td>
															<xsl:for-each select="@CurrencyName">
																<xsl:value-of select="string(.) "/>
															</xsl:for-each>
														</td>
													</tr>
												</table>
												<xsl:for-each select="BANK_ACC">
													<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">
														<thead style="text-align:center; ">
															<tr>
																<th colspan="9" style="background= #B0C4DE; color=#191970">
																	<xsl:text>Данные по счету</xsl:text>
																</th>
															</tr>
															<tr style="text-align:center; vertical-align:top; color:#191970; background=#E6E6FA;">
																<td width="12%">
																	<xsl:text>Номер счета получателя</xsl:text>
																</td>
																<td width="17%">
																	<xsl:text>Код счета, присвоенный КЦ при регистрации</xsl:text>
																</td>
																<td width="35%">
																	<xsl:text>Наименование банка получателя</xsl:text>
																</td>
																<xsl:choose>
																	<xsl:when test="../@CurrencyId = 'RUB'">
																		<td width="12%">
																			<xsl:text>Номер корр.счета</xsl:text>
																		</td>
																		<td width="5%">
																			<xsl:text>БИК</xsl:text>
																		</td>
																		<td width="30%">
																			<xsl:text>Наименование получателя</xsl:text>
																		</td>
																	</xsl:when>
																	<xsl:otherwise>
																		<td width="12%">
																			<xsl:text>Номер счета в банке-корреспонденте</xsl:text>
																		</td>
																		<td width="5%">
																			<xsl:text>SWIFT-BIC банка-получателя</xsl:text>
																		</td>
																		<td width="5%">
																			<xsl:text>SWIFT-BIC банка-корреспондента</xsl:text>
																		</td>
																		<xsl:choose>
																			<xsl:when test="@RecipientName = ''">
																				<td width="5%">
																					<xsl:text>BIC/BEI</xsl:text>
																				</td>
																			</xsl:when>
																			<xsl:otherwise>
																				<td width="30%">
																					<xsl:text>Наименование получателя</xsl:text>
																				</td>
																			</xsl:otherwise>
																		</xsl:choose>
																	</xsl:otherwise>
																</xsl:choose>
															</tr>
														</thead>
														<body>
															<tr>
																<td>
																	<xsl:for-each select="@RealAccount">
																		<xsl:value-of select="string(.)"/>
																	</xsl:for-each>
																</td>
																<td>
																	<xsl:for-each select="@AccCode">
																		<xsl:value-of select="string(.)"/>
																	</xsl:for-each>
																</td>
																<td>
																	<xsl:for-each select="@BankName">
																		<xsl:value-of select="string(.)"/>
																	</xsl:for-each>
																</td>
																<td>
																	<xsl:for-each select="@CorrAcc">
																		<xsl:value-of select="string(.)"/>
																	</xsl:for-each>
																</td>
																<xsl:choose>
																	<xsl:when test="../@CurrencyId = 'RUB'">
																		<td>
																			<xsl:for-each select="@BankBIC">
																				<xsl:value-of select="string(.)"/>
																			</xsl:for-each>
																		</td>
																		<td>
																			<xsl:for-each select="@RecipientName">
																				<xsl:value-of select="string(.)"/>
																			</xsl:for-each>
																		</td>
																	</xsl:when>
																	<xsl:otherwise>
																		<td>
																			<xsl:for-each select="@RecBankBIC">
																				<xsl:value-of select="string(.)"/>
																			</xsl:for-each>
																		</td>
																		<td>
																			<xsl:for-each select="@CorBankBIC">
																				<xsl:value-of select="string(.)"/>
																			</xsl:for-each>
																		</td>
																		<xsl:choose>
																			<xsl:when test="@RecipientName = ''">
																				<td>
																					<xsl:for-each select="@BIC_BEI">
																						<xsl:value-of select="string(.)"/>
																					</xsl:for-each>
																				</td>
																			</xsl:when>
																			<xsl:otherwise>
																				<td>
																					<xsl:for-each select="@RecipientName">
																						<xsl:value-of select="string(.)"/>
																					</xsl:for-each>
																				</td>
																			</xsl:otherwise>
																		</xsl:choose>
																	</xsl:otherwise>
																</xsl:choose>
															</tr>
														</body>
													</table>
													<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">
															<thead style="text-align:center; ">
																<tr>
																	<th colspan="2" style="background= #B0C4DE; color=#191970">
																		<xsl:text>Данные по ТКС, с которых можно выводить средства на данный счет</xsl:text>
																	</th>
																</tr>
																<tr style="text-align:center; vertical-align:top; color:#191970; background=#E6E6FA;">
																	<td width="20%">
																		<xsl:text>Код ТКС</xsl:text>
																	</td>
																	<td width="20%">
																		<xsl:text>Идентификатор участника торгов</xsl:text>
																	</td>
																</tr>
															</thead>
															<body>
																<tr>
																	<td>
																		<xsl:for-each select="@ClrAccCode">
																			<xsl:value-of select="string(.)"/>
																		</xsl:for-each>
																	</td>
																	<td>
																		<xsl:for-each select="@FirmID">
																			<xsl:value-of select="string(.)"/>
																		</xsl:for-each>
																	</td>
																</tr>
															</body>
														</table>
													</xsl:for-each>
													<br/>
												</xsl:for-each>
											</xsl:for-each>
										</xsl:otherwise>
									</xsl:choose>
								</xsl:for-each>
							</xsl:for-each>
						</xsl:for-each>
					</xsl:when>
					<xsl:otherwise>
						<xsl:for-each select="$XML1">
							<xsl:for-each select="RTS_DOC">
								<div>
									<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>
								</div>
								<xsl:for-each select="MFB21">
									<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>Notification on the Clearing Member's Accounts for Funds Withdrawal </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 width="30%" style="background=#E6E6FA;">
												<xsl:text>Clearing Member name:</xsl:text>
											</td>
											<td style="background=#E6E6FA;">
												<xsl:text>Clearing Member type:</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 style="text-align:center;">
												<xsl:for-each select="@FirmName">
													<xsl:value-of select="string(.)"/>
												</xsl:for-each>
											</td>
											<td>
												<xsl:for-each select="@FirmType">
													<xsl:value-of select="string(.)"/>
												</xsl:for-each>
											</td>
										</tr>
									</table>
									<br/>
									<!--Проверка на версионность, и разветвление на разные типы отчетов -->
									<xsl:choose>
										<xsl:when test="@ReportVersion=3">
											<xsl:for-each select="CURRENCY">
												<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>
														<td style="background= #B0C4DE; color=#191970; font-weight:bold">
															<xsl:text>Settlement currency: </xsl:text>
															<xsl:text>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;</xsl:text>
															<xsl:for-each select="@CurrencyId">
																<xsl:value-of select="string(.)"/>
															</xsl:for-each>
															<xsl:text> (</xsl:text>
															<xsl:for-each select="@CurrencyName">
																<xsl:value-of select="string(.)"/>
															</xsl:for-each>
															<xsl:text>)</xsl:text>
														</td>
													</tr>
												</table>
												<xsl:for-each select="BANK_ACC">
													<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; color:#191970; background=#E6E6FA;">
															<td width="10%">
																<xsl:text>Recipient's account number</xsl:text>
															</td>
															<td width="20%">
																<xsl:text>Account code assigned to the CC upon registration</xsl:text>
															</td>
															<td width="20%">
																<xsl:text>Account code assigned to the CC upon registration</xsl:text>
															</td>
															<xsl:choose>
																<xsl:when test="../@CurrencyId ='RUB'">
																	<td colspan="2" width="10%">
																		<xsl:text>Correspondent account number</xsl:text>
																	</td>
																	<td width="10%">
																		<xsl:text>BIK</xsl:text>
																	</td>
																	<td>
																		<xsl:text>Recipient's name</xsl:text>
																	</td>
																</xsl:when>
																<xsl:otherwise>
																	<td width="10%">
																		<xsl:text>Correspondent account number</xsl:text>
																	</td>
																	<td width="10%">
																		<xsl:text>SWIFT-BIK of the recipient bank</xsl:text>
																	</td>
																	<td>
																		<xsl:text>SWIFT-BIK of the correspondent</xsl:text>
																	</td>
																	<td>
																		<xsl:text>Recipient's name</xsl:text>
																	</td>
																	<xsl:choose>
																		<xsl:when test="@RecipientAddress = ''">
																			<td>
																				<xsl:text>BIC/BEI</xsl:text>
																			</td>
																		</xsl:when>
																		<xsl:otherwise>
																			<td>
																				<xsl:text>Beneficiary address</xsl:text>
																			</td>
																		</xsl:otherwise>
																	</xsl:choose>
																</xsl:otherwise>
															</xsl:choose>
															<td>
																<xsl:text>Attribute of the account for withdrawal upon termination of service</xsl:text>
															</td>
														</tr>
														<tr>
															<td>
																<xsl:for-each select="@RecvAccount">
																	<xsl:value-of select="string(.)"/>
																</xsl:for-each>
															</td>
															<td>
																<xsl:for-each select="@AccCode">
																	<xsl:value-of select="string(.)"/>
																</xsl:for-each>
															</td>
															<td>
																<xsl:for-each select="@RecvBankName">
																	<xsl:value-of select="string(.)"/>
																</xsl:for-each>
															</td>
															<xsl:choose>
																<xsl:when test="../@CurrencyId = 'RUB'">
																	<td colspan="2">
																		<xsl:for-each select="@RecvBankCorrAcc">
																			<xsl:value-of select="string(.)"/>
																		</xsl:for-each>
																	</td>
																	<td>
																		<xsl:for-each select="@RecvBankBIC">
																			<xsl:value-of select="string(.)"/>
																		</xsl:for-each>
																	</td>
																	<td>
																		<xsl:for-each select="@RecipientName">
																			<xsl:value-of select="string(.)"/>
																		</xsl:for-each>
																	</td>
																</xsl:when>
																<xsl:otherwise>
																	<td>
																		<xsl:for-each select="@RecvBankCorrAcc">
																			<xsl:value-of select="string(.)"/>
																		</xsl:for-each>
																	</td>
																	<td>
																		<xsl:for-each select="@RecvBankBIC">
																			<xsl:value-of select="string(.)"/>
																		</xsl:for-each>
																	</td>
																	<td>
																		<xsl:for-each select="@CorBankBIC">
																			<xsl:value-of select="string(.)"/>
																		</xsl:for-each>
																	</td>
																	<td>
																		<xsl:for-each select="@RecipientName">
																			<xsl:value-of select="string(.)"/>
																		</xsl:for-each>
																	</td>
																	<xsl:choose>
																		<xsl:when test="@RecipientAddress = ''">
																			<td>
																				<xsl:for-each select="@RecipientBIC">
																					<xsl:value-of select="string(.)"/>
																				</xsl:for-each>
																			</td>
																		</xsl:when>
																		<xsl:otherwise>
																			<td>
																				<xsl:for-each select="@RecipientAddress">
																					<xsl:value-of select="string(.)"/>
																				</xsl:for-each>
																			</td>
																		</xsl:otherwise>
																	</xsl:choose>
																</xsl:otherwise>
															</xsl:choose>
															<td>
																<xsl:for-each select="@DefaultAccount">
																	<xsl:value-of select="string(.)"/>
																</xsl:for-each>
															</td>
														</tr>
													</table>
													<xsl:choose>
														<xsl:when test="SETTLE">
															<table width="30%" 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:top; color:#191970; background=#CFCED9;">
																	<td width="33%">
																		<xsl:text>TCA code</xsl:text>
																	</td>
																	<td>
																		<xsl:text>Trading member identifier</xsl:text>
																	</td>
																</tr>
																<xsl:for-each select="SETTLE">
																	<tr>
																		<td>
																			<xsl:for-each select="@ClrAccCode">
																				<xsl:value-of select="string(.)"/>
																			</xsl:for-each>
																		</td>
																		<td>
																			<xsl:for-each select="@FirmID">
																				<xsl:value-of select="string(.)"/>
																			</xsl:for-each>
																		</td>
																	</tr>
																</xsl:for-each>
															</table>
														</xsl:when>
														<xsl:otherwise>
															<table width="30%" 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="vertical-align:top; color:#191970; background=#CFCED9;">
																	<td>
																		<xsl:text>Can be used to withdraw assets from any TCA</xsl:text>
																	</td>
																</tr>
															</table>
														</xsl:otherwise>
													</xsl:choose>
												</xsl:for-each>
												<!--BANC_ACC-->
												<br/>
											</xsl:for-each>
											<!--CURRENCY-->
										</xsl:when>
										<xsl:when test="@ReportVersion=2">
											<xsl:for-each select="CURRENCY">
												<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>
														<td style="background= #B0C4DE; color=#191970; font-weight:bold">
															<xsl:text>Settlement currency: </xsl:text>
															<xsl:text>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;</xsl:text>
															<xsl:for-each select="@CurrencyID">
																<xsl:value-of select="string(.)"/>
															</xsl:for-each>
														</td>
													</tr>
												</table>
												<xsl:for-each select="BANK_ACC">
													<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; color:#191970; background=#E6E6FA;">
															<td width="10%">
																<xsl:text>Recipient's account number</xsl:text>
															</td>
															<td width="20%">
																<xsl:text>Account code assigned to the CC upon registration</xsl:text>
															</td>
															<td width="20%">
																<xsl:text>Name of the recipient's bank</xsl:text>
															</td>
															<xsl:choose>
																<xsl:when test="../@CurrencyID ='RUR'">
																	<td width="10%">
																		<xsl:text>Correspondent account number</xsl:text>
																	</td>
																	<td width="10%">
																		<xsl:text>BIK</xsl:text>
																	</td>
																	<td colspan="2">
																		<xsl:text>Recipient's name</xsl:text>
																	</td>
																</xsl:when>
																<xsl:otherwise>
																	<td width="10%">
																		<xsl:text>Correspondent account number</xsl:text>
																	</td>
																	<td width="10%">
																		<xsl:text>SWIFT-BIK of the recipient bank</xsl:text>
																	</td>
																	<td>
																		<xsl:text>SWIFT-BIK of the correspondent bank</xsl:text>
																	</td>
																	<xsl:choose>
																		<xsl:when test="@RecipientName = ''">
																			<td>
																				<xsl:text>BIC/BEI</xsl:text>
																			</td>
																		</xsl:when>
																		<xsl:otherwise>
																			<td>
																				<xsl:text>Recipient's name</xsl:text>
																			</td>
																		</xsl:otherwise>
																	</xsl:choose>
																</xsl:otherwise>
															</xsl:choose>
														</tr>
														<tr>
															<td>
																<xsl:for-each select="@RealAccount">
																	<xsl:value-of select="string(.)"/>
																</xsl:for-each>
															</td>
															<td>
																<xsl:for-each select="@AccCode">
																	<xsl:value-of select="string(.)"/>
																</xsl:for-each>
															</td>
															<td>
																<xsl:for-each select="@BankName">
																	<xsl:value-of select="string(.)"/>
																</xsl:for-each>
															</td>
															<td>
																<xsl:for-each select="@CorrAcc">
																	<xsl:value-of select="string(.)"/>
																</xsl:for-each>
															</td>
															<xsl:choose>
																<xsl:when test="../@CurrencyID = 'RUR'">
																	<td>
																		<xsl:for-each select="@BankBIC">
																			<xsl:value-of select="string(.)"/>
																		</xsl:for-each>
																	</td>
																	<td colspan="2">
																		<xsl:for-each select="@RecipientName">
																			<xsl:value-of select="string(.)"/>
																		</xsl:for-each>
																	</td>
																</xsl:when>
																<xsl:otherwise>
																	<td>
																		<xsl:for-each select="@RecBankBIC">
																			<xsl:value-of select="string(.)"/>
																		</xsl:for-each>
																	</td>
																	<td>
																		<xsl:for-each select="@CorBankBIC">
																			<xsl:value-of select="string(.)"/>
																		</xsl:for-each>
																	</td>
																	<xsl:choose>
																		<xsl:when test="@RecipientName = ''">
																			<td>
																				<xsl:for-each select="@BIC_BEI">
																					<xsl:value-of select="string(.)"/>
																				</xsl:for-each>
																			</td>
																		</xsl:when>
																		<xsl:otherwise>
																			<td>
																				<xsl:for-each select="@RecipientName">
																					<xsl:value-of select="string(.)"/>
																				</xsl:for-each>
																			</td>
																		</xsl:otherwise>
																	</xsl:choose>
																</xsl:otherwise>
															</xsl:choose>
														</tr>
													</table>
													<xsl:choose>
														<xsl:when test="SETTLE">
															<table width="30%" 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:top; color:#191970; background=#CFCED9;">
																	<td width="33%">
																		<xsl:text>TCA code</xsl:text>
																	</td>
																	<td>
																		<xsl:text>Trading member identifier</xsl:text>
																	</td>
																</tr>
																<xsl:for-each select="SETTLE">
																	<tr>
																		<td>
																			<xsl:for-each select="@ClrAccCode">
																				<xsl:value-of select="string(.)"/>
																			</xsl:for-each>
																		</td>
																		<td>
																			<xsl:for-each select="@FirmID">
																				<xsl:value-of select="string(.)"/>
																			</xsl:for-each>
																		</td>
																	</tr>
																</xsl:for-each>
															</table>
														</xsl:when>
														<xsl:otherwise>
															<table width="30%" 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="vertical-align:top; color:#191970; background=#CFCED9;">
																	<td>
																		<xsl:text>Can be used to withdraw assets from any TCA</xsl:text>
																	</td>
																</tr>
															</table>
														</xsl:otherwise>
													</xsl:choose>
												</xsl:for-each>
												<!--BANC_ACC-->
												<br/>
											</xsl:for-each>
											<!--CURRENCY-->
										</xsl:when>
										<xsl:otherwise>
											<xsl:for-each select="CURRENCY">
												<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>
														<th colspan="4" style="background= #B0C4DE; color=#191970">
															<xsl:text>Section of data on the account</xsl:text>
														</th>
													</tr>
													<tr>
														<td width="20%" style="background= #B0C4DE; color=#191970">
															<xsl:text>Account currency ID</xsl:text>
														</td>
														<td width="10%">
															<xsl:for-each select="@CurrencyId">
																<xsl:value-of select="string(.)"/>
															</xsl:for-each>
														</td>
														<td width="20%" style="background= #B0C4DE; color=#191970">
															<xsl:text>Account currency name</xsl:text>
														</td>
														<td>
															<xsl:for-each select="@CurrencyName">
																<xsl:value-of select="string(.) "/>
															</xsl:for-each>
														</td>
													</tr>
												</table>
												<xsl:for-each select="BANK_ACC">
													<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">
														<thead style="text-align:center; ">
															<tr>
																<th colspan="9" style="background= #B0C4DE; color=#191970">
																	<xsl:text>Section of data on the account</xsl:text>
																</th>
															</tr>
															<tr style="text-align:center; vertical-align:top; color:#191970; background=#E6E6FA;">
																<td width="12%">
																	<xsl:text>Recipient's account number</xsl:text>
																</td>
																<td width="17%">
																	<xsl:text>Account code assigned to the CC upon registration</xsl:text>
																</td>
																<td width="35%">
																	<xsl:text>Name of the recipient's bank</xsl:text>
																</td>
																<xsl:choose>
																	<xsl:when test="../@CurrencyId = 'RUB'">
																		<td width="12%">
																			<xsl:text>Correspondent account number</xsl:text>
																		</td>
																		<td width="5%">
																			<xsl:text>BIK</xsl:text>
																		</td>
																		<td width="30%">
																			<xsl:text>Recipient's name</xsl:text>
																		</td>
																	</xsl:when>
																	<xsl:otherwise>
																		<td width="12%">
																			<xsl:text>Correspondent account number</xsl:text>
																		</td>
																		<td width="5%">
																			<xsl:text>SWIFT-BIK of the recipient bank</xsl:text>
																		</td>
																		<td width="5%">
																			<xsl:text>SWIFT-BIK of the correspondent bank </xsl:text>
																		</td>
																		<xsl:choose>
																			<xsl:when test="@RecipientName = ''">
																				<td width="5%">
																					<xsl:text>BIC/BEI</xsl:text>
																				</td>
																			</xsl:when>
																			<xsl:otherwise>
																				<td width="30%">
																					<xsl:text>Recipient's name</xsl:text>
																				</td>
																			</xsl:otherwise>
																		</xsl:choose>
																	</xsl:otherwise>
																</xsl:choose>
															</tr>
														</thead>
														<body>
															<tr>
																<td>
																	<xsl:for-each select="@RealAccount">
																		<xsl:value-of select="string(.)"/>
																	</xsl:for-each>
																</td>
																<td>
																	<xsl:for-each select="@AccCode">
																		<xsl:value-of select="string(.)"/>
																	</xsl:for-each>
																</td>
																<td>
																	<xsl:for-each select="@BankName">
																		<xsl:value-of select="string(.)"/>
																	</xsl:for-each>
																</td>
																<td>
																	<xsl:for-each select="@CorrAcc">
																		<xsl:value-of select="string(.)"/>
																	</xsl:for-each>
																</td>
																<xsl:choose>
																	<xsl:when test="../@CurrencyId = 'RUB'">
																		<td>
																			<xsl:for-each select="@BankBIC">
																				<xsl:value-of select="string(.)"/>
																			</xsl:for-each>
																		</td>
																		<td>
																			<xsl:for-each select="@RecipientName">
																				<xsl:value-of select="string(.)"/>
																			</xsl:for-each>
																		</td>
																	</xsl:when>
																	<xsl:otherwise>
																		<td>
																			<xsl:for-each select="@RecBankBIC">
																				<xsl:value-of select="string(.)"/>
																			</xsl:for-each>
																		</td>
																		<td>
																			<xsl:for-each select="@CorBankBIC">
																				<xsl:value-of select="string(.)"/>
																			</xsl:for-each>
																		</td>
																		<xsl:choose>
																			<xsl:when test="@RecipientName = ''">
																				<td>
																					<xsl:for-each select="@BIC_BEI">
																						<xsl:value-of select="string(.)"/>
																					</xsl:for-each>
																				</td>
																			</xsl:when>
																			<xsl:otherwise>
																				<td>
																					<xsl:for-each select="@RecipientName">
																						<xsl:value-of select="string(.)"/>
																					</xsl:for-each>
																				</td>
																			</xsl:otherwise>
																		</xsl:choose>
																	</xsl:otherwise>
																</xsl:choose>
															</tr>
														</body>
													</table>
													<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">
															<thead style="text-align:center; ">
																<tr>
																	<th colspan="2" style="background= #B0C4DE; color=#191970">
																		<xsl:text>Section of data on the TCA from which funds can be withdrawn to this account</xsl:text>
																	</th>
																</tr>
																<tr style="text-align:center; vertical-align:top; color:#191970; background=#E6E6FA;">
																	<td width="20%">
																		<xsl:text>TCA code</xsl:text>
																	</td>
																	<td width="20%">
																		<xsl:text>Trading member identifier</xsl:text>
																	</td>
																</tr>
															</thead>
															<body>
																<tr>
																	<td>
																		<xsl:for-each select="@ClrAccCode">
																			<xsl:value-of select="string(.)"/>
																		</xsl:for-each>
																	</td>
																	<td>
																		<xsl:for-each select="@FirmID">
																			<xsl:value-of select="string(.)"/>
																		</xsl:for-each>
																	</td>
																</tr>
															</body>
														</table>
													</xsl:for-each>
													<br/>
												</xsl:for-each>
											</xsl:for-each>
										</xsl:otherwise>
									</xsl:choose>
								</xsl:for-each>
							</xsl:for-each>
						</xsl:for-each>
					</xsl:otherwise>
				</xsl:choose>
			</body>
		</html>
	</xsl:template>
</xsl:stylesheet>
