<?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:variable name="FixExchangeFee">
    Биржевая комиссия
  </xsl:variable>
  <xsl:variable name="CurrExternalWdrawFee">
    Клиринговый сбор за возврат Средств обеспечения УК в иностранной валюте
  </xsl:variable>
  <xsl:variable name="HoldingFee">
    Клиринговый сбор за ведение клиринговых регистров УК, допущенного к клиринговому обслуживанию	
  </xsl:variable>
  <xsl:variable name="Correction">
    Перерасчет
  </xsl:variable>
  <xsl:variable name="DeliveryOrderFee">
    Клиринговый сбор за внесение записей по клиринговым регистрам, связанных с исполнением нетто-обязательств
  </xsl:variable>
  <xsl:variable name="DEPO_OUT">
    Клиринговый сбор за обработку поручений на внесение, списание и перевод ценных бумаг по cубсчету депо
  </xsl:variable>
  <xsl:variable name="InternalBrokerRepo">
    Клиринговый сбор за договоры репо с акциями, паями и ДР, заключённые в Режиме торгов «Адресное репо с Центральным контрагентом» на основании Заявок репо, в которых указаны ТКС
  </xsl:variable>
  <xsl:variable name="InternalBrokerRepoBond">
    Клиринговый сбор за договоры репо с облигациями, заключённые в Режиме торгов «Адресное репо с Центральным контрагентом» на основании Заявок репо, в которых указаны ТКС
  </xsl:variable>
  <xsl:variable name="SoleClientAccountFee">
    Клиринговый сбор за ведение клиринговых регистров УК в целях ведения отдельного учета в рамках ТКС, зарегистрированного для отдельного клиента УК
  </xsl:variable>
  <xsl:variable name="EuroHoldingFee">
    Клиринговый сбор за учет индивидуального клирингового обеспечения в EUR
  </xsl:variable>
  <xsl:variable name="FatcaQuestionnaireFeePhis">
    Комиссия за ручную обработку форм физических лиц резидентов РФ W8BEN
  </xsl:variable>
  <xsl:variable name="FatcaTaxReportFee">
    Комиссия за налоговое раскрытие по бумагам эмитентов США 
  </xsl:variable>
  <xsl:variable name="ExchangeRoutingFee">
    Биржевой сбор Участникам торгов категории А	
  </xsl:variable>
  <xsl:variable name="DepoHoldingCompensation">
    Возмещение расходов за хранение ценных бумаг	
  </xsl:variable>
  <xsl:variable name="StampDuty">
    Гербовый сбор за сделки заключенные
  </xsl:variable>
  <xsl:variable name="StampDutyPaymentFee">
    'Клиринговая комиссия за предоставление услуги уплаты гербового сбора'
  </xsl:variable>
  <xsl:variable name="GuaranteeSwapFee">
    'Списание клиринговой комиссии за проведение процедуры замены валюты денежных средств обеспечения'
  </xsl:variable>
  <xsl:variable name="FeeClearing">
    Клиринговая комиссия по сделкам
  </xsl:variable>
  <xsl:variable name="DonorRepoFine">
    Штраф за перенос позиций при поставке
  </xsl:variable>
  <xsl:variable name="IncomePaymentCompensation">
    Возмещение расходов СПБ Клиринг, связанных с выплатой дохода по ценным бумагам 
  </xsl:variable>
  <xsl:variable name="DepoOutputFee">
    Возмещение расходов СПБ Клиринг, связанных с участием в общем собрании владельцев именных ценных бумаг
  </xsl:variable>
  <xsl:variable name="DepoReceiptSupportCompensation">
    Возмещение расходов СПБ Клиринг, понесенных в связи с открытием и ведением Клирингового счета депо
  </xsl:variable>
  <xsl:variable name="CorpEventSupportCompensation">
    Возмещение расходов за проведение корпоративных событий
  </xsl:variable>
  <xsl:variable name="BRG">
    Комиссия за превышение лимита бесплатного вывода бумаг
  </xsl:variable>
  <xsl:variable name="DEPO_IN">
    Клиринговый сбор за обработку поручений на перевод ценных бумаг внутри cубсчета депо
  </xsl:variable>
  <xsl:variable name="FeeExchange">
    Биржевая комиссия по сделкам
  </xsl:variable>
  <xsl:variable name="FatcaQuestionnaireFeeLegal">
    Комиссия за ручную обработку форм налоговой идентификации, представляемых в отношении юридических лиц резидентов и нерезидентов РФ и физических лиц нерезидентов РФ	
  </xsl:variable>
  <xsl:variable name="FatcaTaxReportFeeDE">
    Комиссия за налоговое раскрытие по бумагам эмитентов ФРГ
  </xsl:variable>
  <xsl:variable name="RebateFine">
    Возврат части штрафа по решению КЦ за перенос позиций
  </xsl:variable>
  
  <xsl:variable name="OperationType_COMM">
    Начисление
  </xsl:variable>
  <xsl:variable name="OperationType_REFUND">
    Возврат
  </xsl:variable>
  
  <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;
          }
          
          td {
            padding-top:1px;
            padding-right:3px;
            padding-bottom:1px;
            padding-left:3px;
          }
          
          .t1 {
            font-size:8pt; 
          }
          
          .h1 {
            background-color:#B0C4DE;
            font-size:14pt;
            font-weight:bold;
            text-align:center;
          }
          
          .h2 {
            background-color:#FFFAF0;
            font-size:11pt;
            font-weight:bold;
            text-align:center;
          }
          
          .h3 {
            background-color:#E6E6FA;
            text-align:center;
            vertical-align:top;
            font-size:9pt;
            font-weight:bold;
          }
          
          .h4 {
            background-color:#E6E6FA;
            text-align:center;
            vertical-align:top;
            font-size:7pt;
            font-weight:bold;
          }
          
          table {
            border-collapse:collapse;
            border-bottom:0;
            border-left:0;
            border-top:0;
            border-right:0;
            color:#000;
            font-size:11pt;
            font-weight:400;
            font-style:normal;
            font-family:"Arial";
            word-wrap:break-word;
          }
          
          table td, table th {
            padding: 0 8px;
            text-align: left;
          }
        </style>
      </head>
      <body>
        <xsl:for-each select="$XML1">
          <xsl:for-each select="RTS_DOC">
            <h2 style="color: #191970;">
              Сводный ежедневный отчет по начисленным депозитарным сборам
            </h2>
            
            <xsl:for-each select="BUH21">
              <!-- Заголовок  -->
              <table border="1">
                <tr>
                  <th style="font-weight: 400;">Дата<br/>формирования<br/>отчета</th>
                  <th style="font-weight: 400;">Дата начала периода,<br/>когда сформированы<br/>начисления</th>
                  <th style="font-weight: 400;">Дата окончания<br/>периода, когда<br/>сформированы<br/>начисления</th>
                </tr>
                <tr>
                  <td><xsl:value-of select="@ReportDate" /></td>
                  <td><xsl:value-of select="@DateFrom" /></td>
                  <td><xsl:value-of select="@DateTo" /></td>
                </tr>
                <tr>
                  <td style="height: 11pt;"></td>
                  <td></td>
                  <td></td>
                </tr>
              </table>
              
              <!-- Блок данных за дату	 -->
              <xsl:for-each select="DATE">
                <!-- Сгруппированный период  -->
                <table style="background: #ffc000;" border="1">
                  <tr style="text-align: left;">
                    <th style="text-align: left;">Период за который начислены сборы:</th>
                    <th style="text-align: center;"><xsl:value-of select="@CommDateFrom" /></th>
                    <th style="text-align: center;"><xsl:value-of select="@CommDateTo" /></th>
                  </tr>
                </table>
                
                <!-- Блок данных по УК	 -->
                <xsl:for-each select="MEMBER">
                  <table style="width: 100%;" border="1">
                    <tr style="background: #c6d9f1; font-weight:bold;">
                      <th>Код УК</th>
                      <th>Краткое наименование</th>
                      <th>Дата доступа к клиринговому обслуживанию:</th>
                      <th>Банк</th>
                      <th>ИНН</th>
                      <th>TIN</th>
                      <th>KIO</th>
                      <th>LEI</th>
                      <th>REG Number</th>
                      <th>БИК</th>
                    </tr>
                    <tr>
                      <td><xsl:value-of select="@MemberCode" /></td>
                      <td><xsl:value-of select="@MemberName" /></td>
                      <td><xsl:value-of select="@MemberAccessDate" /></td>
                      <td><xsl:value-of select="@IsBank" /></td>
                      <td><xsl:value-of select="@MemberINN" /></td>
                      <td><xsl:value-of select="@MemberTIN" /></td>
                      <td><xsl:value-of select="@MemberKIO" /></td>
                      <td><xsl:value-of select="@MemberLEI" /></td>
                      <td><xsl:value-of select="@MemberRegNumber" /></td>
                      <td><xsl:value-of select="@MemberBIC" /></td>
                    </tr>
                  </table>
                  
                  <!-- Регулярные комиссии УК в разрезе типов комиссий -->
                  <xsl:if test="REGULAR_FEE">
                    <table style="width: 100%;" border="1">
                      <tr style="background: #ebf1de; font-weight:bold;">
                        <th>Сбор</th>
                        <th>Тип операции</th>
                        <th>Тип платежа</th>
                        <th>ТКС</th>
                        <th>Сумма</th>
                        <th>Валюта</th>
                        <th>VAT</th>
                      </tr>
                      <xsl:for-each select="REGULAR_FEE">
                        <tr>
                          <td>
                            <xsl:choose>
                              <xsl:when test="@CommissionCode='FixExchangeFee'">
                                <xsl:value-of select="$FixExchangeFee"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='CurrExternalWdrawFee'">
                                <xsl:value-of select="$CurrExternalWdrawFee"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='HoldingFee'">
                                <xsl:value-of select="$HoldingFee"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='Correction'">
                                <xsl:value-of select="$Correction"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='DeliveryOrderFee'">
                                <xsl:value-of select="$DeliveryOrderFee"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='DEPO_OUT'">
                                <span><xsl:value-of select="$DEPO_OUT"/></span>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='InternalBrokerRepo'">
                                <xsl:value-of select="$InternalBrokerRepo"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='InternalBrokerRepoBond'">
                                <xsl:value-of select="$InternalBrokerRepoBond"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='SoleClientAccountFee'">
                                <xsl:value-of select="$SoleClientAccountFee"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='EuroHoldingFee'">
                                <xsl:value-of select="$EuroHoldingFee"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='FatcaQuestionnaireFeePhis'">
                                <xsl:value-of select="$FatcaQuestionnaireFeePhis"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='FatcaTaxReportFee'">
                                <xsl:value-of select="$FatcaTaxReportFee"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='ExchangeRoutingFee'">
                                <xsl:value-of select="$ExchangeRoutingFee"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='DepoHoldingCompensation'">
                                <xsl:value-of select="$DepoHoldingCompensation"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='StampDuty'">
                                <xsl:value-of select="$StampDuty"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='StampDutyPaymentFee'">
                                <xsl:value-of select="$StampDutyPaymentFee"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='GuaranteeSwapFee'">
                                <xsl:value-of select="$GuaranteeSwapFee"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='FeeClearing'">
                                <xsl:value-of select="$FeeClearing"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='DonorRepoFine'">
                                <xsl:value-of select="$DonorRepoFine"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='IncomePaymentCompensation'">
                                <xsl:value-of select="$IncomePaymentCompensation"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='DepoOutputFee'">
                                <xsl:value-of select="$DepoOutputFee"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='DepoReceiptSupportCompensation'">
                                <xsl:value-of select="$DepoReceiptSupportCompensation"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='CorpEventSupportCompensation'">
                                <xsl:value-of select="$CorpEventSupportCompensation"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='BRG'">
                                <xsl:value-of select="$BRG"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='DEPO_IN'">
                                <xsl:value-of select="$DEPO_IN"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='FeeExchange'">
                                <xsl:value-of select="$FeeExchange"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='FatcaQuestionnaireFeeLegal'">
                                <xsl:value-of select="$FatcaQuestionnaireFeeLegal"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='FatcaTaxReportFeeDE'">
                                <xsl:value-of select="$FatcaTaxReportFeeDE"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='RebateFine'">
                                <xsl:value-of select="$RebateFine"/>
                              </xsl:when>
                            </xsl:choose>
                          </td>
                          <td>
                            <xsl:choose>
                              <xsl:when test="@PaymentType='COMM'">
                                <xsl:value-of select="$OperationType_COMM" />
                              </xsl:when>
                              <xsl:when test="@PaymentType='REFUND'">
                                <xsl:value-of select="$OperationType_REFUND" />
                              </xsl:when>
                            </xsl:choose>
                          </td>
                          <td>
                            <xsl:choose>
                              <xsl:when test="@FeeFromGuarantee='Y'">
                                ГО
                              </xsl:when>
                              <xsl:when test="@FeeFromGuarantee='N'">
                                ИНВОЙС
                              </xsl:when>
                            </xsl:choose>
                          </td>
                          <td><xsl:value-of select="@AccountCode" /></td>
                          <td><xsl:value-of select="@FeeValue" /></td>
                          <td><xsl:value-of select="@CurrencyCode" /></td>
                          <td><xsl:value-of select="@FeeVat" /></td>
                        </tr>
                      </xsl:for-each>
                    </table>
                  </xsl:if>
                </xsl:for-each>
                
                <!-- Итого по участникам заданной группы	 -->
                <xsl:for-each select="TOTAL_MEMBER_GROUP">
                  <xsl:for-each select="MEMBER_GROUP">
                    <xsl:if test="REGULAR_FEE_TOTAL">
                      <table style="width: 100%;" border="1">
                        <tr style="background: #d9d9d9; font-weight:bold;">
                          <th>ИТОГО (<xsl:value-of select="@MemberGroup" />):</th>
                        </tr>
                      </table>
                      <table style="width: 100%;" border="1">
                        <tr style="background: #d9d9d9; font-weight:bold;">
                          <th>Сбор</th>
                          <th>Тип операции</th>
                          <th>Сумма</th>
                          <th>Валюта</th>
                          <th>VAT</th>
                        </tr>
                        <xsl:for-each select="REGULAR_FEE_TOTAL">
                          <tr>
                            <td>
                              <xsl:choose>
                                <xsl:when test="@CommissionCode='FixExchangeFee'">
                                  <xsl:value-of select="$FixExchangeFee"/>
                                </xsl:when>
                                <xsl:when test="@CommissionCode='CurrExternalWdrawFee'">
                                  <xsl:value-of select="$CurrExternalWdrawFee"/>
                                </xsl:when>
                                <xsl:when test="@CommissionCode='HoldingFee'">
                                  <xsl:value-of select="$HoldingFee"/>
                                </xsl:when>
                                <xsl:when test="@CommissionCode='Correction'">
                                  <xsl:value-of select="$Correction"/>
                                </xsl:when>
                                <xsl:when test="@CommissionCode='DeliveryOrderFee'">
                                  <xsl:value-of select="$DeliveryOrderFee"/>
                                </xsl:when>
                                <xsl:when test="@CommissionCode='DEPO_OUT'">
                                  <xsl:value-of select="$DEPO_OUT"/>
                                </xsl:when>
                                <xsl:when test="@CommissionCode='InternalBrokerRepo'">
                                  <xsl:value-of select="$InternalBrokerRepo"/>
                                </xsl:when>
                                <xsl:when test="@CommissionCode='InternalBrokerRepoBond'">
                                  <xsl:value-of select="$InternalBrokerRepoBond"/>
                                </xsl:when>
                                <xsl:when test="@CommissionCode='SoleClientAccountFee'">
                                  <xsl:value-of select="$SoleClientAccountFee"/>
                                </xsl:when>
                                <xsl:when test="@CommissionCode='EuroHoldingFee'">
                                  <xsl:value-of select="$EuroHoldingFee"/>
                                </xsl:when>
                                <xsl:when test="@CommissionCode='FatcaQuestionnaireFeePhis'">
                                  <xsl:value-of select="$FatcaQuestionnaireFeePhis"/>
                                </xsl:when>
                                <xsl:when test="@CommissionCode='FatcaTaxReportFee'">
                                  <xsl:value-of select="$FatcaTaxReportFee"/>
                                </xsl:when>
                                <xsl:when test="@CommissionCode='ExchangeRoutingFee'">
                                  <xsl:value-of select="$ExchangeRoutingFee"/>
                                </xsl:when>
                                <xsl:when test="@CommissionCode='DepoHoldingCompensation'">
                                  <xsl:value-of select="$DepoHoldingCompensation"/>
                                </xsl:when>
                                <xsl:when test="@CommissionCode='StampDuty'">
                                  <xsl:value-of select="$StampDuty"/>
                                </xsl:when>
                                <xsl:when test="@CommissionCode='StampDutyPaymentFee'">
                                  <xsl:value-of select="$StampDutyPaymentFee"/>
                                </xsl:when>
                                <xsl:when test="@CommissionCode='GuaranteeSwapFee'">
                                  <xsl:value-of select="$GuaranteeSwapFee"/>
                                </xsl:when>
                                <xsl:when test="@CommissionCode='FeeClearing'">
                                  <xsl:value-of select="$FeeClearing"/>
                                </xsl:when>
                                <xsl:when test="@CommissionCode='DonorRepoFine'">
                                  <xsl:value-of select="$DonorRepoFine"/>
                                </xsl:when>
                                <xsl:when test="@CommissionCode='IncomePaymentCompensation'">
                                  <xsl:value-of select="$IncomePaymentCompensation"/>
                                </xsl:when>
                                <xsl:when test="@CommissionCode='DepoOutputFee'">
                                  <xsl:value-of select="$DepoOutputFee"/>
                                </xsl:when>
                                <xsl:when test="@CommissionCode='DepoReceiptSupportCompensation'">
                                  <xsl:value-of select="$DepoReceiptSupportCompensation"/>
                                </xsl:when>
                                <xsl:when test="@CommissionCode='CorpEventSupportCompensation'">
                                  <xsl:value-of select="$CorpEventSupportCompensation"/>
                                </xsl:when>
                                <xsl:when test="@CommissionCode='BRG'">
                                  <xsl:value-of select="$BRG"/>
                                </xsl:when>
                                <xsl:when test="@CommissionCode='DEPO_IN'">
                                  <xsl:value-of select="$DEPO_IN"/>
                                </xsl:when>
                                <xsl:when test="@CommissionCode='FeeExchange'">
                                  <xsl:value-of select="$FeeExchange"/>
                                </xsl:when>
                                <xsl:when test="@CommissionCode='FatcaQuestionnaireFeeLegal'">
                                  <xsl:value-of select="$FatcaQuestionnaireFeeLegal"/>
                                </xsl:when>
                                <xsl:when test="@CommissionCode='FatcaTaxReportFeeDE'">
                                  <xsl:value-of select="$FatcaTaxReportFeeDE"/>
                                </xsl:when>
                                <xsl:when test="@CommissionCode='RebateFine'">
                                  <xsl:value-of select="$RebateFine"/>
                                </xsl:when>
                              </xsl:choose></td>
                            <td>
                              <xsl:choose>
                                <xsl:when test="@PaymentType='COMM'">
                                  <xsl:value-of select="$OperationType_COMM" />
                                </xsl:when>
                                <xsl:when test="@PaymentType='REFUND'">
                                  <xsl:value-of select="$OperationType_REFUND" />
                                </xsl:when>
                              </xsl:choose>
                            </td>
                            <td><xsl:value-of select="@TotalFeeValue" /></td>
                            <td><xsl:value-of select="@CurrencyCode" /></td>
                            <td><xsl:value-of select="@TotalFeeVat" /></td>
                          </tr>
                        </xsl:for-each>
                      </table>
                    </xsl:if>
                  </xsl:for-each>
                </xsl:for-each>
                
                <!-- Итого по всем участникам -->
                <xsl:for-each select="TOTAL">
                  <xsl:if test="REGULAR_FEE_TOTAL_ALL">
                    <table style="width: 100%;" border="1">
                      <tr style="background: #d9d9d9; font-weight:bold;">
                        <th>ИТОГО:</th>
                      </tr>
                    </table>
                    <table style="width: 100%;" border="1">
                      <tr style="background: #d9d9d9; font-weight:bold;">
                        <th>Сбор</th>
                        <th>Тип операции</th>
                        <th>Сумма</th>
                        <th>Валюта</th>
                        <th>VAT</th>
                      </tr>
                      <xsl:for-each select="REGULAR_FEE_TOTAL_ALL">
                        <tr>
                          <td><xsl:choose>
                              <xsl:when test="@CommissionCode='FixExchangeFee'">
                                <xsl:value-of select="$FixExchangeFee"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='CurrExternalWdrawFee'">
                                <xsl:value-of select="$CurrExternalWdrawFee"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='HoldingFee'">
                                <xsl:value-of select="$HoldingFee"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='Correction'">
                                <xsl:value-of select="$Correction"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='DeliveryOrderFee'">
                                <xsl:value-of select="$DeliveryOrderFee"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='DEPO_OUT'">
                                <span><xsl:value-of select="$DEPO_OUT"/></span>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='InternalBrokerRepo'">
                                <xsl:value-of select="$InternalBrokerRepo"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='InternalBrokerRepoBond'">
                                <xsl:value-of select="$InternalBrokerRepoBond"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='SoleClientAccountFee'">
                                <xsl:value-of select="$SoleClientAccountFee"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='EuroHoldingFee'">
                                <xsl:value-of select="$EuroHoldingFee"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='FatcaQuestionnaireFeePhis'">
                                <xsl:value-of select="$FatcaQuestionnaireFeePhis"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='FatcaTaxReportFee'">
                                <xsl:value-of select="$FatcaTaxReportFee"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='ExchangeRoutingFee'">
                                <xsl:value-of select="$ExchangeRoutingFee"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='DepoHoldingCompensation'">
                                <xsl:value-of select="$DepoHoldingCompensation"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='StampDuty'">
                                <xsl:value-of select="$StampDuty"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='StampDutyPaymentFee'">
                                <xsl:value-of select="$StampDutyPaymentFee"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='GuaranteeSwapFee'">
                                <xsl:value-of select="$GuaranteeSwapFee"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='FeeClearing'">
                                <xsl:value-of select="$FeeClearing"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='DonorRepoFine'">
                                <xsl:value-of select="$DonorRepoFine"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='IncomePaymentCompensation'">
                                <xsl:value-of select="$IncomePaymentCompensation"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='DepoOutputFee'">
                                <xsl:value-of select="$DepoOutputFee"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='DepoReceiptSupportCompensation'">
                                <xsl:value-of select="$DepoReceiptSupportCompensation"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='CorpEventSupportCompensation'">
                                <xsl:value-of select="$CorpEventSupportCompensation"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='BRG'">
                                <xsl:value-of select="$BRG"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='DEPO_IN'">
                                <xsl:value-of select="$DEPO_IN"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='FeeExchange'">
                                <xsl:value-of select="$FeeExchange"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='FatcaQuestionnaireFeeLegal'">
                                <xsl:value-of select="$FatcaQuestionnaireFeeLegal"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='FatcaTaxReportFeeDE'">
                                <xsl:value-of select="$FatcaTaxReportFeeDE"/>
                              </xsl:when>
                              <xsl:when test="@CommissionCode='RebateFine'">
                                <xsl:value-of select="$RebateFine"/>
                              </xsl:when>
                            </xsl:choose></td>
                          <td>
                            <xsl:choose>
                              <xsl:when test="@PaymentType='COMM'">
                                <xsl:value-of select="$OperationType_COMM" />
                              </xsl:when>
                              <xsl:when test="@PaymentType='REFUND'">
                                <xsl:value-of select="$OperationType_REFUND" />
                              </xsl:when>
                            </xsl:choose>
                          </td>
                          <td><xsl:value-of select="@TotalFeeValue" /></td>
                          <td><xsl:value-of select="@CurrencyCode" /></td>
                          <td><xsl:value-of select="@TotalFeeVat" /></td>
                        </tr>
                      </xsl:for-each>
                    </table>
                  </xsl:if>
                </xsl:for-each>
              </xsl:for-each>
              <br/>
            </xsl:for-each>
          </xsl:for-each>
        </xsl:for-each>
      </body>
    </html>
  </xsl:template>
</xsl:stylesheet>
