﻿<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sv="http://www.w3.org/2000/svg">
  <xsl:include href="###var#Path#var###/VerificationReport-css.xslt"/>
  <xsl:include href="###var#Path#var###/EncodeUrl.xslt"/>
  <xsl:output method="html" version="5.0" encoding="UTF-8"/>

  <!-- Define the maximum number of lines (rows) per page. This is used in the recursive algorithm for Part 3 -->
  <xsl:variable name="_MaxNumberOfLinesPerReportPage" select="30"/>

  <!-- Define the verification report mode to use:   fullReport=report including all parts   reducedReport=report with the first two parts (pages) only -->
  <xsl:variable name="_VerificationReportMode" select="'fullReport'"/>

  <!-- In debug mode the result of the transformation shows additional diagnosis information-->
  <xsl:variable name="_XslDebugMode" select="'false'"/>

  <xsl:template name="RecordCustomerInformation">
    <xsl:variable name="_RootGroup" select="DataSetTree//ResultParametersGroup[@name='LG_Customer']"/>
    <table>
      <tr class="layouttype-2">
        <td class="tabletype-e-col1 layouttype-2">
          <xsl:value-of select="$_RootGroup/Parameter/@label"/>
          <xsl:text>###nls#Colon#nls###</xsl:text>
          <xsl:text>&#x2007;</xsl:text>
          <xsl:value-of select="$_RootGroup/Parameter/@value"/>
        </td>
      </tr>
    </table>
  </xsl:template>

  <xsl:template name="VerificationHistoryCustomerInformation">
    <table>
      <tr class="layouttype-2">
        <td class="tabletype-e-col1 layouttype-2"/>
      </tr>
    </table>
  </xsl:template>

  <xsl:template name="RecordGeneralDeviceInformation">
    <xsl:variable name="_RootGroup" select="DataSetTree//ResultParametersGroup[@name='LG_DeviceInformation']"/>
    <table style="margin-top: 3mm">
      <tr>
      </tr>
        <td>
          <table>
            <tr class="layouttype-4">
              <td class="tabletype-a-col1 layouttype-4"><xsl:text>###nls#DeviceInformation#nls###</xsl:text></td>
              <td class="tabletype-a-col2 layouttype-4"/>
              <td class="tabletype-a-col3 layouttype-4"/>
            </tr>
            <xsl:for-each select="$_RootGroup/Parameter">
              <tr class="layouttype-5">
                <xsl:choose>
                  <xsl:when test="position() = last()">
                    <td class="layouttype-5b"><xsl:value-of select="@label"/></td>
                    <td class="layouttype-5b"/>
                    <td class="layouttype-5b"><xsl:value-of select="@value"/></td>
                  </xsl:when>
                  <xsl:otherwise>
                    <td class="layouttype-5a"><xsl:value-of select="@label"/></td>
                    <td class="layouttype-5ax"/>
                    <td class="layouttype-5a"><xsl:value-of select="@value"/></td>
                  </xsl:otherwise>
                </xsl:choose>
              </tr>
            </xsl:for-each>
          </table>
        </td>
        <td class="tabletype-a-col4">
          <xsl:call-template name="InsertHeartbeatLogo"/>
        </td>
    </table>
  </xsl:template>

  <xsl:template name="RecordCalibrationInformation">
    <xsl:variable name="_RootGroup" select="DataSetTree//ResultParametersGroup[@name='LG_CalibrationInformation']"/>
    <xsl:if test="$_RootGroup">
        <table style="margin-top: 3mm">
          <tr class="layouttype-4">
            <td class="tabletype-b-col1 layouttype-4"><xsl:text>###nls#Calibration#nls###</xsl:text></td>
            <td class="tabletype-b-col2 layouttype-4"/>
            <td class="tabletype-b-col3 layouttype-4"/>
          </tr>
          <xsl:for-each select="$_RootGroup/Parameter">
            <tr class="layouttype-5">
              <xsl:choose>
                <xsl:when test="position() = last()">
                  <td class="layouttype-5b"><xsl:value-of select="@label"/></td>
                  <td class="layouttype-5b"/>
                  <td class="layouttype-5b"><xsl:value-of select="@value"/></td>
                </xsl:when>
                <xsl:otherwise>
                  <td class="layouttype-5a"><xsl:value-of select="@label"/></td>
                  <td class="layouttype-5ax"/>
                  <td class="layouttype-5a"><xsl:value-of select="@value"/></td>
                </xsl:otherwise>
              </xsl:choose>
            </tr>
          </xsl:for-each>
        </table>
    </xsl:if>
  </xsl:template>

  <xsl:template name="RecordVerificationInformation">
    <xsl:variable name="_RootGroup" select="DataSetTree//ResultParametersGroup[@name='LG_VerificationInformation']"/>
    <table style="margin-top: 5.3mm">
      <tr class="layouttype-4">
        <td class="tabletype-b-col1 layouttype-4"><xsl:text>###nls#VerificationInformation#nls###</xsl:text></td>
        <td class="tabletype-b-col2 layouttype-4"/>
        <td class="tabletype-b-col3 layouttype-4"/>
      </tr>
      <xsl:for-each select="$_RootGroup/Parameter">
        <tr class="layouttype-5">
          <xsl:choose>
            <xsl:when test="position() = last()">
              <td class="layouttype-5b"><xsl:value-of select="@label"/></td>
              <td class="layouttype-5b"/>
              <td class="layouttype-5b"><xsl:value-of select="@value"/></td>
            </xsl:when>
            <xsl:otherwise>
              <td class="layouttype-5a"><xsl:value-of select="@label"/></td>
              <td class="layouttype-5ax"/>
              <td class="layouttype-5a"><xsl:value-of select="@value"/></td>
            </xsl:otherwise>
          </xsl:choose>
        </tr>
      </xsl:for-each>
    </table>
  </xsl:template>

  <xsl:template name="RecordVerificationResultInformation">
    <xsl:variable name="_RootGroup" select="DataSetTree//ResultParametersGroup[@name='LG_ResultInformation']"/>
    <table style="margin-top: 8mm">
      <!--<tr class="layouttype-4">
        <td class="tabletype-b-col1 layouttype-4"><xsl:text>###nls#Result#nls###</xsl:text></td>
        <td class="tabletype-b-col2 layouttype-4"/>
        <td class="tabletype-b-col3 layouttype-4"/>
      </tr>-->
      <xsl:for-each select="$_RootGroup/Parameter">
        <tr class="layouttype-2">
          <td class="tabletype-b-col1 layouttype-5b"><xsl:text>###nls#VerificationResult#nls###</xsl:text></td>
          <td class="tabletype-b-col2 layouttype-5b"/>
          <td class="tabletype-b-col3 layouttype-5b">
            <xsl:call-template name="InsertResultIcon">
              <xsl:with-param name="result" select="@valueEnumTag"/>
            </xsl:call-template>
            <xsl:value-of select="@value"/>
          </td>
        </tr>
      </xsl:for-each>
    </table>
  </xsl:template>

  <xsl:template name="RecordConfirmationOfCompliance">
    <xsl:variable name="_RootGroup" select="DataSetTree//ResultParametersGroup[@name='LG_DeviceInformation']"/>
    <table style="margin-top: 8mm">
      <tr class="layouttype-10">
        <td class="tabletype-e-col1 layouttype-4">
          <xsl:text>###nls#ConfirmationHead#nls###</xsl:text>
        </td>
      </tr>
      <tr class="layouttype-5">
        <td class="tabletype-e-col1 layouttype-5b">
          <xsl:text>###nls#HBTConfirmation_WithDeclarationWithLink#nls###</xsl:text>
          <xsl:text>  </xsl:text>
          <xsl:variable name="_OrderCode" select="$_RootGroup/Parameter[@name='STD_ENPDeviceOrderIdent_1']/@value"/>
          <a class="hyperlink">
            <xsl:attribute name="href">
              <xsl:text>https://www.endress.com/heartbeat-technology-downloads?order_code=</xsl:text>
              <xsl:call-template name="EncodeUrl">
                <xsl:with-param name="str" select="substring($_OrderCode, 1, 4)"/>
              </xsl:call-template>
              <xsl:text>-&amp;site_language=</xsl:text>
              <xsl:text>###var#LanguageCodeForE+H-Website#var###</xsl:text>
            </xsl:attribute>
            <xsl:attribute name="target">_blank</xsl:attribute>
            <xsl:text>###nls#PleaseClickHere#nls###</xsl:text>
          </a>
        </td>
      </tr>
    </table>
  </xsl:template>

  <xsl:template name="RecordAnnotations">
    <table style="margin-top: 9.7mm">
      <tr class="layouttype-4">
        <td class="tabletype-e-col1 layouttype-4"><xsl:text>###nls#Notes#nls###</xsl:text></td>
      </tr>
      <tr class="layouttype-5" style="height: 40mm">
        <td class="layouttype-5c"><xsl:value-of select="RecordInformation/Comments"/></td>
      </tr>
    </table>
  </xsl:template>

  <xsl:template name="VerificationHistoryAnnotations">
    <table style="margin-top: 5mm">
      <tr class="layouttype-4">
        <td class="tabletype-e-col1 layouttype-4"><xsl:text>###nls#Notes#nls###</xsl:text></td>
      </tr>
      <tr class="layouttype-5" style="height: 7mm">
        <td class="layouttype-5c"><xsl:value-of select="VerificationHistoryInformation/Comments"/></td>
      </tr>
    </table>
  </xsl:template>

  <xsl:template name="RecordDateAndSignatures">
    <table style="margin-top: 17.6mm">
      <tr class="layouttype-11">
        <td class="tabletype-f-col1 layouttype-11"><xsl:text>###nls#Date#nls###</xsl:text></td>
        <td class="tabletype-f-col2"/>
        <td class="tabletype-f-col3 layouttype-11"><xsl:text>###nls#OperatorsSignature#nls###</xsl:text></td>
        <td class="tabletype-f-col4"/>
        <td class="tabletype-f-col5 layouttype-11"><xsl:text>###nls#CustomersSignature#nls###</xsl:text></td>
      </tr>
    </table>
  </xsl:template>

  <xsl:template name="RecordDeviceAndVerifyTable">
    <xsl:variable name="_RootGroupA" select="DataSetTree//ResultParametersGroup[starts-with(@name, 'LG_DeviceIdentification')]"/>
    <xsl:variable name="_RootGroupB1" select="DataSetTree//ResultParametersGroup[@name='LG_DeviceInformation']"/>
    <xsl:variable name="_RootGroupB2" select="DataSetTree//ResultParametersGroup[@name='LG_VerificationInformation']"/>
    <table style="margin-top: 3mm">
      <tr>
        <td>
          <table>
            <tr class="layouttype-4">
              <td class="tabletype-a-col1 layouttype-4"><xsl:text>###nls#DeviceAndVerificationInformation#nls###</xsl:text></td>
              <td class="tabletype-a-col2 layouttype-4"/>
              <td class="tabletype-a-col3 layouttype-4"/>
            </tr>
            <xsl:choose>
              <!-- Show device identification parameters if the group exists -->
              <xsl:when test="$_RootGroupA">
                <xsl:for-each select="$_RootGroupA/Parameter">
                  <xsl:choose>
                    <xsl:when test="position() = last()">
                      <tr class="layouttype-5">
                        <td class="layouttype-5b"><xsl:value-of select="@label"/></td>
                        <td class="layouttype-5b"/>
                        <td class="layouttype-5b"><xsl:value-of select="@value"/></td>
                      </tr>
                    </xsl:when>
                    <xsl:otherwise>
                      <tr class="layouttype-5">
                        <td class="layouttype-5a"><xsl:value-of select="@label"/></td>
                        <td class="layouttype-5ax"/>
                        <td class="layouttype-5a"><xsl:value-of select="@value"/></td>
                      </tr>
                    </xsl:otherwise>
                  </xsl:choose>
                </xsl:for-each>
              </xsl:when>
              <xsl:otherwise>
                <!-- Show default device identification parameters -->
                <!-- Serial number row -->
                <tr class="layouttype-5">
                  <td class="layouttype-5a"><xsl:value-of select="$_RootGroupB1/Parameter[@name='STD_ENPDeviceSerialNumber_1']/@label"/></td>
                  <td class="layouttype-5ax"/>
                  <td class="layouttype-5a"><xsl:value-of select="$_RootGroupB1/Parameter[@name='STD_ENPDeviceSerialNumber_1']/@value"/></td>
                </tr>
                <!-- Device tag row -->
                <tr class="layouttype-5">
                  <td class="layouttype-5a"><xsl:value-of select="$_RootGroupB1/Parameter[@name='STD_ENPDeviceTag_1']/@label"/></td>
                  <td class="layouttype-5ax"/>
                  <td class="layouttype-5a"><xsl:value-of select="$_RootGroupB1/Parameter[@name='STD_ENPDeviceTag_1']/@value"/></td>
                </tr>
                <!-- Verification ID row -->
                <tr class="layouttype-5">
                  <td class="layouttype-5b"><xsl:value-of select="$_RootGroupB2/Parameter[Role='DataSetCounter']/@label"/></td>
                  <td class="layouttype-5b"/>
                  <td class="layouttype-5b"><xsl:value-of select="$_RootGroupB2/Parameter[Role='DataSetCounter']/@value"/></td>
                </tr>
              </xsl:otherwise>
            </xsl:choose>
          </table>
        </td>
        <td class="tabletype-a-col4">
          <xsl:call-template name="InsertHeartbeatLogo"/>
        </td>
      </tr>
    </table>
  </xsl:template>

  <xsl:template name="VerificationHistoryDeviceAndVerifyTable">
    <table style="margin-top: 3mm">
      <tr>
        <td>
          <table>
            <tr class="layouttype-4">
              <td class="tabletype-a-col1 layouttype-4"><xsl:text>###nls#DeviceAndVerificationInformation#nls###</xsl:text></td>
              <td class="tabletype-a-col2 layouttype-4"/>
              <td class="tabletype-a-col3 layouttype-4"/>
            </tr>
            <!-- Serial number row -->
            <tr class="layouttype-5">
              <td class="layouttype-5a"><xsl:text>###nls#SerialNumber#nls###</xsl:text></td>
              <td class="layouttype-5ax"/>
              <td class="layouttype-5a"><xsl:value-of select="../@serialNumber"/></td>
            </tr>
            <!-- Device tag row -->
            <tr class="layouttype-5">
              <td class="layouttype-5a"><xsl:text>###nls#DeviceTag#nls###</xsl:text></td>
              <td class="layouttype-5ax"/>
              <td class="layouttype-5a"><xsl:value-of select="../DeviceInformation/TagName"/></td>
            </tr>
            <!-- Verification history row -->
            <tr class="layouttype-5">
              <td class="layouttype-5b"><xsl:text>###nls#ChartTemplate#nls###</xsl:text></td>
              <td class="layouttype-5b"/>
              <td class="layouttype-5b"><xsl:value-of select="Template/@name"/></td>
            </tr>
          </table>
        </td>
        <td class="tabletype-a-col4">
          <xsl:call-template name="InsertHeartbeatLogo"/>
        </td>
      </tr>
    </table>
  </xsl:template>

  <!-- RecordResult -->
  <xsl:template name="RecordResult">
    <xsl:param name="_Parameters"/>
    <table style="margin-top: 30mm">
      <xsl:for-each select="$_Parameters">

        <xsl:choose>
          <!-- Use a solid line below the row -->
          <xsl:when test="position() = last()">
            <xsl:call-template name="RecordResult-SingleRowDebugWrapper">
              <xsl:with-param name="_Parameter" select="."/>
              <xsl:with-param name="_Css5" select="'layouttype-5b'"/>
              <xsl:with-param name="_Css5x" select="'layouttype-5b'"/>
              <xsl:with-param name="_RowNumber" select="position()"/>
            </xsl:call-template>
          </xsl:when>
          <xsl:otherwise>
            <!-- Use a dashed line below the row -->
            <xsl:call-template name="RecordResult-SingleRowDebugWrapper">
              <xsl:with-param name="_Parameter" select="."/>
              <xsl:with-param name="_Css5" select="'layouttype-5a'"/>
              <xsl:with-param name="_Css5x" select="'layouttype-5ax'"/>
              <xsl:with-param name="_RowNumber" select="position()"/>
            </xsl:call-template>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:for-each>
    </table>
  </xsl:template>

  <!-- RecordResult-SingleRowDebugWrapper -->
  <xsl:template name="RecordResult-SingleRowDebugWrapper">
    <xsl:param name="_Parameter"/>
    <xsl:param name="_Css5"/>
    <xsl:param name="_Css5x"/>
    <xsl:param name="_RowNumber"/>
    <!-- Just a helper for debugging -->
    <xsl:choose>
      <xsl:when test="$_XslDebugMode='true'">
        <xsl:call-template name="RecordResult-SingleRow">
          <xsl:with-param name="_Parameter" select="$_Parameter"/>
          <xsl:with-param name="_Css5" select="$_Css5"/>
          <xsl:with-param name="_Css5x" select="$_Css5x"/>
          <xsl:with-param name="_RowNumber" select="concat($_RowNumber, '&#x2007;')"/>
        </xsl:call-template>
      </xsl:when>
      <xsl:otherwise>
        <xsl:call-template name="RecordResult-SingleRow">
          <xsl:with-param name="_Parameter" select="$_Parameter"/>
          <xsl:with-param name="_Css5" select="$_Css5"/>
          <xsl:with-param name="_Css5x" select="$_Css5x"/>
          <xsl:with-param name="_RowNumber" select="''"/>
        </xsl:call-template>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>

  <!-- RecordResult-SingleRow -->
  <xsl:template name="RecordResult-SingleRow">
    <xsl:param name="_Parameter"/>
    <xsl:param name="_Css5"/>
    <xsl:param name="_Css5x"/>
    <xsl:param name="_RowNumber"/>

    <xsl:variable name="_GlobalResultParameter" select="$_Parameter[Role='DataSetGlobalResult']"/>
    <xsl:variable name="_ResultParameter" select="$_Parameter[Role='DataSetResult']"/>

    <xsl:choose>
      <xsl:when test="$_GlobalResultParameter">
        <!-- Headline row (must use the 'tabletype-h-colx' classes because this table has no header row!) -->
        <tr class="layouttype-4">
          <td class="tabletype-h-col1 layouttype-4"><xsl:value-of select="$_RowNumber"/><xsl:value-of select="$_GlobalResultParameter/@label"/></td>
          <td class="tabletype-h-col2 layouttype-4"/>
          <td class="tabletype-h-col3 layouttype-4"/>
          <td class="tabletype-h-col4 layouttype-4">
            <xsl:call-template name="InsertResultIcon">
              <xsl:with-param name="result" select="$_GlobalResultParameter/@valueEnumTag"/>
            </xsl:call-template>
            <xsl:value-of select="$_GlobalResultParameter/@value"/>
          </td>
        </tr>
      </xsl:when>
      <xsl:when test="$_ResultParameter">
        <!-- Normal row with result icon and optional extended verification annotation -->
        <tr class="layouttype-5">
          <td class="{$_Css5}"><xsl:value-of select="$_RowNumber"/><xsl:value-of select="$_ResultParameter/@label"/></td>
          <td class="{$_Css5}"/>
          <td class="{$_Css5x}"/>
          <td class="{$_Css5}">
            <xsl:call-template name="InsertResultIcon">
              <xsl:with-param name="result" select="$_ResultParameter/@valueEnumTag"/>
            </xsl:call-template>
            <xsl:value-of select="$_ResultParameter/@value"/>
            <xsl:if test="$_ResultParameter/@isExternalVerification='true'">
              <xsl:text>###nls#AnnotationMark#nls###</xsl:text>
            </xsl:if>
          </td>
        </tr>
      </xsl:when>
      <xsl:otherwise>
        <!-- Invalid row. Something is wrong with the record. -->
        <tr class="layouttype-5">
          <td class="{$_Css5}"><xsl:value-of select="$_RowNumber"/>???&#x2007;<xsl:value-of select="$_Parameter/@label"/></td>
          <td class="{$_Css5}"/>
          <td class="{$_Css5x}"/>
          <td class="{$_Css5}"/>
        </tr>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>

  <!-- RecordDetailedResult -->
  <xsl:template name="RecordDetailedResult">
    <xsl:param name="_Parameters"/>
    <xsl:param name="_PageIndex"/>

    <!-- This template is used recursively. Each call produces one page for Part 3-->
    <xsl:call-template name="PageHeader-Record"/>
    <xsl:call-template name="RecordCustomerInformation"/>
    <xsl:call-template name="RecordDeviceAndVerifyTable"/>

    <!-- Define the rows that belong to the current page. Page index is 1 based. -->
    <xsl:variable name="_MinRowNumber" select="$_MaxNumberOfLinesPerReportPage * ($_PageIndex - 1) + 1"/>
    <xsl:variable name="_MaxRowNumber" select="$_MaxNumberOfLinesPerReportPage * $_PageIndex"/>
    <!--xsl:variable name="_TotalNumberOfRows" select="count($_Parameters)"/-->
    <!--xsl:variable name="_NumberOfPages" select="ceiling($_TotalNumberOfRows div $_MaxNumberOfLinesPerReportPage)"/-->

    <!-- Table header row -->
    <table style="margin-top: 30mm">
      <tr class="layouttype-4">
        <td class="tabletype-k-col1 layouttype-4"><xsl:text>###nls#SpecifiedMeasuringToleranceValues#nls###</xsl:text></td>
        <td class="tabletype-k-col2 layouttype-4"/>
        <td class="tabletype-k-col3 layouttype-4"/>
        <td class="tabletype-k-col4 layouttype-4"><xsl:text>###nls#Unit#nls###</xsl:text></td>
        <td class="tabletype-k-col5n layouttype-4"/>
        <td class="tabletype-k-col6n layouttype-4"><xsl:text>###nls#Actual#nls###</xsl:text></td>
        <td class="tabletype-k-col5n layouttype-4"/>
        <td class="tabletype-k-col6n layouttype-4"><xsl:text>###nls#Min#nls###</xsl:text></td>
        <td class="tabletype-k-col5n layouttype-4"/>
        <td class="tabletype-k-col6n layouttype-4"><xsl:text>###nls#Max#nls###</xsl:text></td>
        <td class="tabletype-k-col11 layouttype-4"/>
        <td class="tabletype-k-col12 layouttype-4"><xsl:text>###nls#Visualization#nls###</xsl:text></td>
      </tr>

      <xsl:for-each select="$_Parameters">
        <!-- Handle the parameters for the current page only -->
        <xsl:if test="position() &gt;= $_MinRowNumber and position() &lt;= $_MaxRowNumber">
          <xsl:choose>
            <!-- Use a solid line below the row -->
            <xsl:when test="position() = $_MaxRowNumber or position() = last()">
              <xsl:call-template name="RecordDetailedResult-SingleRowDebugWrapper">
                <xsl:with-param name="_Parameter" select="."/>
                <xsl:with-param name="_Css5" select="'layouttype-5b'"/>
                <xsl:with-param name="_Css5x" select="'layouttype-5b'"/>
                <xsl:with-param name="_RowNumber" select="position()"/>
              </xsl:call-template>
            </xsl:when>
            <xsl:otherwise>
              <!-- Use a dashed line below the row -->
              <xsl:call-template name="RecordDetailedResult-SingleRowDebugWrapper">
                <xsl:with-param name="_Parameter" select="."/>
                <xsl:with-param name="_Css5" select="'layouttype-5a'"/>
                <xsl:with-param name="_Css5x" select="'layouttype-5ax'"/>
                <xsl:with-param name="_RowNumber" select="position()"/>
              </xsl:call-template>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:if>
      </xsl:for-each>
    </table>

    <xsl:call-template name="PageFooter"/>
    <div class="page-break"/>

    <!-- Check if we need another page -->
    <xsl:if test="$_MaxRowNumber &lt; count($_Parameters)">
      <!-- Yes, so call the template recursively -->
      <xsl:call-template name="RecordDetailedResult">
        <xsl:with-param name="_Parameters" select="$_Parameters"/>
        <xsl:with-param name="_PageIndex" select="$_PageIndex + 1"/>
      </xsl:call-template>
    </xsl:if>

  </xsl:template>

  <!-- RecordDetailedResult-SingleRowDebugWrapper -->
  <xsl:template name="RecordDetailedResult-SingleRowDebugWrapper">
    <xsl:param name="_Parameter"/>
    <xsl:param name="_Css5"/>
    <xsl:param name="_Css5x"/>
    <xsl:param name="_RowNumber"/>
    <!-- Just a helper for debugging -->
    <xsl:choose>
      <xsl:when test="$_XslDebugMode='true'">
        <xsl:call-template name="RecordDetailedResult-SingleRow">
          <xsl:with-param name="_Parameter" select="$_Parameter"/>
          <xsl:with-param name="_Css5" select="$_Css5"/>
          <xsl:with-param name="_Css5x" select="$_Css5x"/>
          <xsl:with-param name="_RowNumber" select="concat($_RowNumber, '&#x2007;')"/>
        </xsl:call-template>
      </xsl:when>
      <xsl:otherwise>
        <xsl:call-template name="RecordDetailedResult-SingleRow">
          <xsl:with-param name="_Parameter" select="$_Parameter"/>
          <xsl:with-param name="_Css5" select="$_Css5"/>
          <xsl:with-param name="_Css5x" select="$_Css5x"/>
          <xsl:with-param name="_RowNumber" select="''"/>
        </xsl:call-template>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  
  <!-- RecordDetailedResult-SingleRow -->
  <xsl:template name="RecordDetailedResult-SingleRow">
    <xsl:param name="_Parameter"/>
    <xsl:param name="_Css5"/>
    <xsl:param name="_Css5x"/>
    <xsl:param name="_RowNumber"/>

    <xsl:variable name="_GlobalResultParameter" select="$_Parameter[Role='DataSetGlobalResult']"/>
    <xsl:variable name="_ActualParameter" select="$_Parameter[Role='DataSetActual']"/>
    <xsl:variable name="_InformationParameter" select="$_Parameter[Role='DataSetInformation']"/>

    <xsl:choose>
      <xsl:when test="$_GlobalResultParameter">
        <!-- Headline row  (no need to use the 'tabletype-k-colx' classes because this table has a header row that defines them) -->
        <tr class="layouttype-4">
          <td class="layouttype-4"><xsl:value-of select="$_RowNumber"/><xsl:value-of select="$_GlobalResultParameter/@label"/></td>
          <td class="layouttype-4"/>
          <td class="layouttype-4"/>
          <td class="layouttype-4"/>
          <td class="layouttype-4"/>
          <td class="layouttype-4"/>
          <td class="layouttype-4"/>
          <td class="layouttype-4"/>
          <td class="layouttype-4"/>
          <td class="layouttype-4"/>
          <td class="layouttype-4"/>
          <td class="layouttype-4"/>
        </tr>
      </xsl:when>
      <xsl:when test="$_ActualParameter">
        <!-- Normal row with actual, min, max value and the bargraph image. No extended verification annotation here. -->
        <xsl:variable name="_MinParameter" select="$_Parameter/../Parameter[Role='DataSetMinValue']"/>
        <xsl:variable name="_MaxParameter" select="$_Parameter/../Parameter[Role='DataSetMaxValue']"/>
        <tr class="layouttype-5">
          <!-- Column 1 -->
          <!-- Specified Measauring Tolerance Values Column-->
          <td class="{$_Css5}"><xsl:value-of select="$_RowNumber"/><xsl:value-of select="$_ActualParameter/@label"/></td>
          <!-- Column 2 -->
          <td class="{$_Css5}"/>
          <!-- Column 3 -->
          <td class="{$_Css5x}"/>
          <!-- Column 4 -->
          <!-- Unit Column -->
          <td class="{$_Css5}"><xsl:value-of select="$_ActualParameter/@unit"/></td>
          <!-- Column 5 -->
          <td class="{$_Css5x}"/>
          <!-- Column 6 -->
          <!-- Actual -->
          <td class="{$_Css5}"><xsl:value-of select="$_ActualParameter/@value"/></td>
          <!-- Column 7 -->
          <td class="{$_Css5x}"/>
          <!-- Column 8 -->
          <!-- Min -->
          <td class="{$_Css5}"><xsl:value-of select="$_MinParameter/@value"/></td>
          <!-- Column 9 -->
          <td class="{$_Css5x}"/>
          <!-- Column 10 -->
          <!--Max-->
          <td class="{$_Css5}"><xsl:value-of select="$_MaxParameter/@value"/></td>
          <!-- Column 11 -->
          <td class="{$_Css5x}"/>
          <!-- Column 12 -->
          <!-- Bargraph -->
          <td class="{$_Css5}">
            <xsl:call-template name="InsertBargraphImage">
              <xsl:with-param name="_ActualValue" select="$_ActualParameter/@value"/>
              <xsl:with-param name="_MinValue" select="$_MinParameter/@value"/>
              <xsl:with-param name="_MaxValue" select="$_MaxParameter/@value"/>
            </xsl:call-template>
          </td>
        </tr>
      </xsl:when>
      <xsl:when test="$_InformationParameter">
        <!-- Normal row with information -->
        <tr class="layouttype-5">
          <td class="{$_Css5}"><xsl:value-of select="$_RowNumber"/><xsl:value-of select="$_InformationParameter/@label"/></td>
          <td class="{$_Css5}"><xsl:value-of select="$_InformationParameter/@value"/></td>
          <td class="{$_Css5}x"/>
          <td class="{$_Css5}"/>
          <td class="{$_Css5}x"/>
          <td class="{$_Css5}"/>
          <td class="{$_Css5}x"/>
          <td class="{$_Css5}"/>
          <td class="{$_Css5}x"/>
          <td class="{$_Css5}"/>
          <td class="{$_Css5}x"/>
          <td class="{$_Css5}"/>
        </tr>
      </xsl:when>
      <xsl:otherwise>
        <!-- Invalid row. Something is wrong with the record. -->
        <tr class="layouttype-5">
          <td class="{$_Css5}"><xsl:value-of select="$_RowNumber"/>???&#x2007;<xsl:value-of select="$_Parameter/@name"/></td>
          <td class="{$_Css5}"/>
          <td class="{$_Css5}x"/>
          <td class="{$_Css5}"/>
          <td class="{$_Css5}x"/>
          <td class="{$_Css5}"/>
          <td class="{$_Css5}x"/>
          <td class="{$_Css5}"/>
          <td class="{$_Css5}x"/>
          <td class="{$_Css5}"/>
          <td class="{$_Css5}x"/>
          <td class="{$_Css5}"/>
        </tr>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>

  <xsl:template name="RecordExternalVerification">
    <!-- Information about external verification -->
    <!-- Check if there is any parameter with the role DataSetResult that has the extended verification flag applied -->
    <xsl:if test="DataSetTree//ResultParametersGroup[@isResultGroup='true']/Parameter[Role='DataSetResult']/@isExternalVerification='true'">
      <p class="layouttype-9"><xsl:text>###nls#AnnotationMark#nls###</xsl:text><xsl:text>###nls#ExtendedVerification#nls###</xsl:text></p>
      <!-- External verification information table -->
      <table style="margin-top: 3.5mm">
        <tr class="layouttype-4">
          <td class="tabletype-e-col1 layouttype-4"><xsl:text>###nls#InformationAboutExtendedVerification#nls###</xsl:text></td>
        </tr>
        <!-- We use the value of the parameter XXXHBTR_ExternalDeviceInfo_x. This parameter can always be found by its role DataSetExternalVerification -->
        <tr class="layouttype-5" style="height: 10.5mm">
          <td class="layouttype-5b"><xsl:value-of select="DataSetTree//Parameter[Role='DataSetExternalVerification']/@value"/></td>
        </tr>
      </table>
    </xsl:if>
  </xsl:template>

  <xsl:template name="RecordReferenceConditions">
    <!--Reference Conditions-->
    <xsl:variable name="_RootGroup" select="DataSetTree//ResultParametersGroup[@name='VerificationActualProcessConditions']"/>
    <table style="margin-top: 30mm">
      <tr class="layouttype-4">
        <td class="tabletype-j-col1 layouttype-4"><xsl:value-of select="$_RootGroup/@label"/></td>
        <td class="tabletype-j-col2 layouttype-4"/>
        <td class="tabletype-j-col3 layouttype-4"><xsl:text>###nls#Unit#nls###</xsl:text></td>
        <td class="tabletype-j-col4 layouttype-4"/>
        <td class="tabletype-j-col5 layouttype-4"><xsl:text>###nls#Actual#nls###</xsl:text></td>
      </tr>
      <xsl:for-each select="$_RootGroup//ResultParametersGroup[@isResultGroup='true']/Parameter[Role='DataSetActual']">
        <xsl:choose>
          <xsl:when test="position() = last()">
            <tr class="tabletype-j-col1 layouttype-5">
              <td class="layouttype-5b"><xsl:value-of select="@label"/></td>
              <td class="layouttype-5b"/>
              <td class="layouttype-5b"><xsl:value-of select="@unit"/></td>
              <td class="layouttype-5b"/>
              <td class="layouttype-5b"><xsl:value-of select="@value"/></td>
            </tr>
          </xsl:when>
          <xsl:otherwise>
            <tr class="layouttype-5">
              <td class="layouttype-5a"><xsl:value-of select="@label"/></td>
              <td class="layouttype-5ax"/>
              <td class="layouttype-5a"><xsl:value-of select="@unit"/></td>
              <td class="layouttype-5ax"/>
              <td class="layouttype-5a"><xsl:value-of select="@value"/></td>
            </tr>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:for-each>
    </table>
  </xsl:template>

  <xsl:template name="VerificationHistoryImageTable">
    <table style="margin-top: 5mm">
      <tr class="layouttype-4">
        <td class="tabletype-e-col1 layouttype-4">
          <xsl:value-of select="Template/@name"/>
        </td>
      </tr>
      <tr class="layouttype-5">
        <td class="tabletype-e-col1 layouttype-5b">
          <!-- Use the rendered chart of the verification history as png -->
          <xsl:if test="Data/LineChart/RenderedImage/@src">
              <img class="verification-history-image">
                <xsl:attribute name="src">
                  <xsl:value-of select="Data/LineChart/RenderedImage/@src"/>
                </xsl:attribute>
              </img>
          </xsl:if>
          <!-- Use the rendered chart of the verification history as svg -->
          <xsl:if test="Data/LineChart/RenderedImage/sv:svg">
            <xsl:copy-of select="Data/LineChart/RenderedImage/sv:svg"/>
          </xsl:if>
        </td>
      </tr>
    </table>
  </xsl:template>

  <xsl:template name="VerificationHistoryDataTable">
    <!-- Statistical information related to the bitmap above -->
    <table style="margin-top: 5mm">
      <tr class="layouttype-4">
        <td class="tabletype-g-col1 layouttype-4"><xsl:text>###nls#SpecifiedMeasuringToleranceValues#nls###</xsl:text></td>
        <td class="tabletype-g-col2n layouttype-4"/>
        <td class="tabletype-g-col3n layouttype-4"><xsl:text>###nls#MinValue#nls###</xsl:text></td>
        <td class="tabletype-g-col2n layouttype-4"/>
        <td class="tabletype-g-col3n layouttype-4"><xsl:text>###nls#MaxValue#nls###</xsl:text></td>
        <td class="tabletype-g-col2n layouttype-4"/>
        <td class="tabletype-g-col3n layouttype-4"><xsl:text>###nls#Mean#nls###</xsl:text></td>
        <td class="tabletype-g-col2n layouttype-4"/>
        <td class="tabletype-g-col3n layouttype-4"><xsl:text>###nls#Unit#nls###</xsl:text></td>
      </tr>
      <xsl:for-each select="Data/LineChart/Series">
        <xsl:choose>
          <xsl:when test="position() = last()">
            <tr class="layouttype-5">
              <td class="layouttype-5b"><xsl:value-of select="@label"/></td>
              <td class="layouttype-5b"/>
              <td class="layouttype-5b"><xsl:value-of select="Statistics/YMin/@y"/></td>
              <td class="layouttype-5b"/>
              <td class="layouttype-5b"><xsl:value-of select="Statistics/YMax/@y"/></td>
              <td class="layouttype-5b"/>
              <td class="layouttype-5b"><xsl:value-of select="Statistics/YMean/@y"/></td>
              <td class="layouttype-5b"/>
              <td class="layouttype-5b"><xsl:variable name="_yAxisId" select="@yAxisId"/><xsl:value-of select="../YAxis[@id=$_yAxisId]/@label"/></td>
            </tr>
          </xsl:when>
          <xsl:otherwise>
            <tr class="layouttype-5">
              <td class="layouttype-5a"><xsl:value-of select="@label"/></td>
              <td class="layouttype-5ax"/>
              <td class="layouttype-5a"><xsl:value-of select="Statistics/YMin/@y"/></td>
              <td class="layouttype-5ax"/>
              <td class="layouttype-5a"><xsl:value-of select="Statistics/YMax/@y"/></td>
              <td class="layouttype-5ax"/>
              <td class="layouttype-5a"><xsl:value-of select="Statistics/YMean/@y"/></td>
              <td class="layouttype-5ax"/>
              <td class="layouttype-5a"><xsl:variable name="_yAxisId" select="@yAxisId"/><xsl:value-of select="../YAxis[@id=$_yAxisId]/@label"/></td>
            </tr>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:for-each>
    </table>
  </xsl:template>

  <!-- ********************************************************************************************* -->
  <!-- Create report for a single record -->
  <!-- ********************************************************************************************* -->
  <xsl:template name="CreateRecordReport">

    <!-- Select the global result groups to be used in RecordResult (Part2) and RecordDetailedResult (Part3) -->
    <!-- Global result groups have a parameter with the role DataSetGlobalResult -->
    <xsl:variable name="_GlobalResultGroups" select="DataSetTree//ResultParametersGroup[@isResultGroup='true' and Parameter[Role='DataSetGlobalResult']]"/>


    <!-- ################################################################################################################################### -->
    <!-- Part 1 always fills one page. Therefore Part 1 = Page 1 -->
    <xsl:call-template name="PageHeader-Record"/>
    <xsl:call-template name="RecordCustomerInformation"/>
    <xsl:call-template name="RecordGeneralDeviceInformation"/>
    <xsl:call-template name="RecordCalibrationInformation"/>
    <xsl:call-template name="RecordVerificationInformation"/>
    <xsl:call-template name="RecordVerificationResultInformation"/>
    <xsl:call-template name="RecordConfirmationOfCompliance"/>
    <xsl:call-template name="RecordAnnotations"/>
    <xsl:call-template name="RecordDateAndSignatures"/>
    <xsl:call-template name="PageFooter"/>
    <div class="page-break"/>

    <!-- ################################################################################################################################### -->
    <!-- Part 2 always fills one page. Therefore Part 2 = Page 2 -->
    <xsl:call-template name="PageHeader-Record"/>
    <xsl:call-template name="RecordCustomerInformation"/>
    <xsl:call-template name="RecordDeviceAndVerifyTable"/>

    <!-- Starting from the global result groups select the first level of child groups. These result groups have a parameter with the role DataSetResult -->
    <xsl:variable name="_ResultGroups" select="$_GlobalResultGroups/ResultParametersGroup[Parameter[Role='DataSetResult']]"/>

    <!-- Now we create the flat list of groups to be used. We combine the global result groups and the result groups-->
    <xsl:variable name="_RecordResultRelevantGroups" select="$_GlobalResultGroups/self::ResultParametersGroup | $_ResultGroups/descendant-or-self::ResultParametersGroup[@isResultGroup='true']"/>

    <!-- From the flat list of groups we create the flat list of parameters -->
    <!-- For record result we need the role DataSetGlobalResult (headline in the table) and DataSetResult (normal row in the table) only -->
    <xsl:variable name="_RecordResultParameters" select="$_RecordResultRelevantGroups/Parameter[Role='DataSetGlobalResult' or Role='DataSetResult']"/>

    <!-- Call the template and pass the flat list of parameters -->
    <xsl:call-template name="RecordResult">
      <xsl:with-param name="_Parameters" select="$_RecordResultParameters"/>
    </xsl:call-template>
    <xsl:call-template name="RecordExternalVerification"/>
    <xsl:call-template name="PageFooter"/>
    <div class="page-break"/>

    <!-- ################################################################################################################################### -->
    <!-- Part 3 fills one ore multiple pages. Part 3 starts on Page 3. -->
    <xsl:if test="$_VerificationReportMode = 'fullReport'">

      <!-- First we filter the global result groups. Here we only use global result groups that are not empty -->
      <!-- Not empty means: The global result group has at least one parameter with the role DataSetActual or DataSetInformation in the group itself or in any of its descendant groups-->
      <!--                  (Only parameters with these roles are producing normal table rows. So groups without such parameters can be ignored.) -->
      <xsl:variable name="_GlobalResultGroupsNonEmpty" select="$_GlobalResultGroups/self::ResultParametersGroup[descendant::Parameter[Role='DataSetActual' or Role='DataSetInformation']]"/>

      <!-- Starting from the non empty global result groups select the first level of child groups. These result groups have a parameter with the role DataSetResult -->
      <!-- For the detailed result we ignore result groups that describe unplugged hardware modules of the device -->
      <xsl:variable name="_ResultGroupsWithoutUnplugged" select="$_GlobalResultGroupsNonEmpty/ResultParametersGroup[Parameter[Role='DataSetResult']/@valueEnumTag != 'SlotEmpty']"/>

      <!-- Now we create the flat list of groups to be used. We combine the non empty global result groups and the result groups-->
      <xsl:variable name="_RecordDetailedResultRelevantGroups" select="$_GlobalResultGroupsNonEmpty/self::ResultParametersGroup | $_ResultGroupsWithoutUnplugged/descendant-or-self::ResultParametersGroup[@isResultGroup='true']"/>

      <!-- From the flat list of groups we create the flat list of parameters -->
      <!-- For record detailed result we need the role DataSetGlobalResult (headline row in the table) and DataSetActual or DataSetInformation (normal row in the table) only -->
      <!-- In normal table rows for DataSetActual we use additionally DataSetMinValue and DataSetMaxValue roles -->
      <xsl:variable name="_RecordDetailedResultParameters" select="$_RecordDetailedResultRelevantGroups/Parameter[Role='DataSetGlobalResult' or Role='DataSetActual' or Role='DataSetInformation']"/>

      <!-- Call the template and pass the flat list of parameters -->
      <xsl:call-template name="RecordDetailedResult">
        <xsl:with-param name="_Parameters" select="$_RecordDetailedResultParameters"/>
        <!-- PageIndex starts with 1 which is the first page of Part 3 -->
        <xsl:with-param name="_PageIndex" select="1"/>
      </xsl:call-template>
    </xsl:if>

    <!-- ################################################################################################################################### -->
    <!-- Part 4 fills one page. -->
    <xsl:if test="$_VerificationReportMode = 'fullReport'">
      <xsl:call-template name="PageHeader-Record"/>
      <xsl:call-template name="RecordCustomerInformation"/>
      <xsl:call-template name="RecordDeviceAndVerifyTable"/>
      <xsl:call-template name="RecordReferenceConditions"/>
      <xsl:call-template name="PageFooter"/>
    </xsl:if>

  </xsl:template>

  <!-- ********************************************************************************************* -->
  <!-- Create report for a single verification history -->
  <!-- ********************************************************************************************* -->
  <xsl:template name="CreateVerificationHistoryReport">
    <!-- ################################################################################################################################### -->
    <!-- Part 1 fills one page per verification history -->
    <xsl:call-template name="PageHeader-VerificationHistory"/>
    <xsl:call-template name="VerificationHistoryCustomerInformation"/>
    <xsl:call-template name="VerificationHistoryDeviceAndVerifyTable"/>
    <xsl:call-template name="VerificationHistoryImageTable"/>
    <xsl:call-template name="VerificationHistoryDataTable"/>
    <xsl:call-template name="VerificationHistoryAnnotations"/>
    <xsl:call-template name="PageFooter"/>
  </xsl:template>

  <xsl:template match="/">
    <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html&gt;&#x0a;</xsl:text>
    <html>
      <head>
        <!--<meta charset='UTF-16'/>-->
        <xsl:call-template name="IncludeCSS"/>
      </head>
      <body>
        <!-- Handle all devices. Select devices that have at least one item to include in the report -->
        <xsl:for-each select="//Device[.//*/@includeInReport]">

          <!-- Insert a page break after the first device -->
          <xsl:if test="position() &gt; 1">
            <div class="page-break"/>
          </xsl:if>

          <!-- Select the items to include for the device -->
          <xsl:for-each select=".//*[(name()='Record' or name()='VerificationHistory') and @includeInReport]">
            <!-- Sort: verification histories at the end of document. They do not have the attribute verification counter -->
            <xsl:sort select="count(@verificationCounter)" data-type="number" order="descending"/>
            <!-- Sort: records by ascending verification counter -->
            <xsl:sort select="@verificationCounter" data-type="number" order="ascending"/>

            <!-- Handle records -->
            <xsl:if test="name()='Record' and DataSetTree">
              <xsl:call-template name="CreateRecordReport"/>
            </xsl:if>
            
            <!-- Handle the verification histories -->
            <xsl:if test="name()='VerificationHistory'">
              <xsl:call-template name="CreateVerificationHistoryReport"/>
            </xsl:if>

            <!-- No page break after the last page for the device -->
            <xsl:if test="position() &lt; last()">
              <div class="page-break"/>
            </xsl:if>
          </xsl:for-each>
        </xsl:for-each>
      </body>
    </html>
  </xsl:template>

  <xsl:template name="PageHeader-Record">
    <!-- Header for every page.-->
    <!-- Enclose the whole page in a div with fixed height. This allows a proper page layout. Write the opening tag.-->
    <xsl:text disable-output-escaping="yes">&lt;div class="page"&gt;</xsl:text>
    <table class="tabletype-header">
      <tr class="layouttype-1 tabletype-header">
        <td class="tabletype-header-col1"><xsl:text>###nls#HBTVerificationReport#nls###</xsl:text></td>
        <td class="tabletype-header-col2"><xsl:call-template name="InsertEHLogo"/></td>
      </tr>
    </table>
  </xsl:template>

  <xsl:template name="PageHeader-VerificationHistory">
    <!-- Header for every page.-->
    <!-- Enclose the whole page in a div with fixed height. This allows a proper page layout. Write the opening tag.-->
    <xsl:text disable-output-escaping="yes">&lt;div class="page"&gt;</xsl:text>
    <table class="tabletype-header">
      <tr class="layouttype-1 tabletype-header">
        <td class="tabletype-header-col1"><xsl:text>###nls#HBTVerificationHistory#nls###</xsl:text></td>
        <td class="tabletype-header-col2"><xsl:call-template name="InsertEHLogo"/></td>
      </tr>
    </table>
  </xsl:template>

  <xsl:template name="PageFooter">
    <!-- Footer for every page.-->
    <table style="margin-top: 0mm">
      <tr>
        <!-- Empty whitespace 175mmx3mm to fix PDF converter layout problems -->
        <td class="tabletype-e-col1">
          <svg class="placeholder-image" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 175 3">
            <rect class="placeholder-rect-invisible" x="0" y="0" width="175" height="3"/>
          </svg>
        </td>
      </tr>
    </table>
    <table class="tabletype-footer">
      <tr class="layouttype-12">
        <td class="tabletype-footer-col1"><xsl:text>###nls#EHInternet#nls###</xsl:text></td>
        <td class="tabletype-footer-col2"><xsl:text>###nls#VerificationDTM#nls###</xsl:text></td>
        <td class="tabletype-footer-col3"><xsl:text>###nls#Page#nls###</xsl:text><xsl:text> </xsl:text></td>
      </tr>
    </table>

    <!-- Enclose the whole page in a div with fixed height. This allows a proper page layout. Write the closing tag.-->
    <!-- </div> -->
    <xsl:text disable-output-escaping="yes">&lt;/div&gt;</xsl:text>
  </xsl:template>

  <xsl:template name="InsertResultIcon">
    <xsl:param name="result"/>
      <svg class="verification-result-image" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
        <xsl:choose>
            <xsl:when test="$result='failed'">
              <!-- eh-namur-failure.svg -->
                <circle style="fill: #FF0000" cx="32" cy="32" r="28"/>
                <polygon style="fill: #FFFFFF" points="46.4,20.4 43.6,17.6 32,29.2 20.4,17.6 17.6,20.4 29.2,32 17.6,43.6 20.4,46.4 32,34.8 43.6,46.4,46.4,43.6 34.8,32"/>
            </xsl:when>
            <xsl:when test="$result='Pass'">
              <!-- eh-namur-good.svg -->
                <rect x="6" y="6" style="fill: #00CC00" width="52" height="52"/>
                <polygon style="fill: white" points="25,45.8 14.6,35.4 17.4,32.6 25,40.2 46.6,18.6 49.4,21.4 "/>
            </xsl:when>
            <xsl:otherwise>
              <!-- eh-checkbox-unchecked.svg -->
                <path d="M57,7v50H7V7H57 M61,3H3v58h58V3L61,3z"/>
            </xsl:otherwise>
        </xsl:choose>
    </svg>
  </xsl:template>

  <xsl:template name="InsertBargraphImage">
    <xsl:param name="_ActualValue"/>
    <xsl:param name="_MinValue"/>
    <xsl:param name="_MaxValue"/>
          <!-- For the specification of the bargraph usage refer to Jira FLV-199 and FLV-181 -->
          <svg class="bargraph-image" xmlns="http://www.w3.org/2000/svg" viewBox="-1 0 298 26">
            <!--<rect style="fill: none; stroke: red; stroke-width: 1" x="0" y="0" width="297" height="26"/>-->  <!-- ratio = 11.46 -->
            <xsl:choose>
              <!-- We have a all values: actual, min and max -->
              <xsl:when test="$_ActualValue != '' and $_MinValue !='' and $_MaxValue != '' ">
                <xsl:variable select="($_MaxValue - $_MinValue)" name="_Range"/>
                <xsl:choose>
                  <!-- We have a value range -->
                  <xsl:when test="$_Range &gt; 0.0">
                    <rect class="bargraph-rect-empty" x="0" y="0" width="26" height="26"/>
                    <rect class="bargraph-rect-empty" x="30" y="0" width="26" height="26"/>
                    <rect class="bargraph-rect-empty" x="60" y="0" width="26" height="26"/>
                    <rect class="bargraph-rect-empty" x="90" y="0" width="26" height="26"/>
                    <rect class="bargraph-rect-empty" x="120" y="0" width="26" height="26"/>
                    <rect class="bargraph-rect-empty" x="150" y="0" width="26" height="26"/>
                    <rect class="bargraph-rect-empty" x="180" y="0" width="26" height="26"/>
                    <rect class="bargraph-rect-empty" x="210" y="0" width="26" height="26"/>
                    <rect class="bargraph-rect-empty" x="240" y="0" width="26" height="26"/>
                    <rect class="bargraph-rect-empty" x="270" y="0" width="26" height="26"/>
                    <xsl:if test="$_ActualValue &gt;= $_MinValue and $_ActualValue &lt;= $_MaxValue">
                        <!-- Only if value is within the range we have a bargraph -->
                        <xsl:variable select="($_ActualValue - $_MinValue) div $_Range" name="_Percentage"/>
                        <xsl:choose>
                          <xsl:when test="$_Percentage &gt; 0.9">
                            <rect class="bargraph-rect-filled" x="270" y="0" width="26" height="26"/>
                          </xsl:when>
                          <xsl:when test="$_Percentage &gt; 0.8">
                            <rect class="bargraph-rect-filled" x="240" y="0" width="26" height="26"/>
                          </xsl:when>
                          <xsl:when test="$_Percentage &gt; 0.7">
                            <rect class="bargraph-rect-filled" x="210" y="0" width="26" height="26"/>
                          </xsl:when>
                          <xsl:when test="$_Percentage &gt; 0.6">
                            <rect class="bargraph-rect-filled" x="180" y="0" width="26" height="26"/>
                          </xsl:when>
                          <xsl:when test="$_Percentage &gt; 0.5">
                            <rect class="bargraph-rect-filled" x="150" y="0" width="26" height="26"/>
                          </xsl:when>
                          <xsl:when test="$_Percentage &gt; 0.4">
                            <rect class="bargraph-rect-filled" x="120" y="0" width="26" height="26"/>
                          </xsl:when>
                          <xsl:when test="$_Percentage &gt; 0.3">
                            <rect class="bargraph-rect-filled" x="90" y="0" width="26" height="26"/>
                          </xsl:when>
                          <xsl:when test="$_Percentage &gt; 0.2">
                            <rect class="bargraph-rect-filled" x="60" y="0" width="26" height="26"/>
                          </xsl:when>
                          <xsl:when test="$_Percentage &gt; 0.1">
                            <rect class="bargraph-rect-filled" x="30" y="0" width="26" height="36"/>
                          </xsl:when>
                          <xsl:when test="$_Percentage &gt;= 0.0">
                            <rect class="bargraph-rect-filled" x="0" y="0" width="26" height="26"/>
                          </xsl:when>
                          <xsl:otherwise>
                          </xsl:otherwise>
                        </xsl:choose>
                    </xsl:if>
                  </xsl:when>
                  <!-- We have no value range -->
                  <xsl:otherwise>
                    <!-- Without value range we have no bargraph at all -->
                    <!--<rect class="bargraph-rect-empty" x="135" y="0" width="26" height="26"/>
                    <xsl:if test="$_ActualValue = $_MinValue">
                        <rect class="bargraph-rect-filled" x="135" y="0" width="26" height="26"/>
                    </xsl:if>-->
                  </xsl:otherwise>
                </xsl:choose>
              </xsl:when>
              <!-- Some values are missing. We have no bargraph at all -->
              <xsl:otherwise/>
            </xsl:choose>
          </svg>
  </xsl:template>

  <xsl:template name="InsertHeartbeatLogo">
    <!-- Wort-Bild-Marke_Heartbeat_Technology.svg -->
    <svg class="heartbeat-logo-image" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 402.96 163.38">
      <defs>
        <style>.cls-1{fill:#fff;}.cls-2{fill:#a9005d;}</style>
      </defs>
      <!--<rect style="fill: none; stroke: green; stroke-width: 1" x="0" y="0" width="402.96" height="163.38"/>-->  <!-- ratio = 2.47 -->
      <g id="Weiß">
        <path class="cls-1" d="M242.77,295.41l39.08,0,3.41-12.75a2.24,2.24,0,0,1,4.38.25L296,325.19,301.84,249a2.24,2.24,0,0,1,2.22-2.07h0A2.24,2.24,0,0,1,306.3,249l4.5,51.34,1.56-3.7a2.26,2.26,0,0,1,2.07-1.37h0l87.2.07-2.36,4.48-83.36-.07-4.5,10.62a2.24,2.24,0,0,1-4.29-.68l-2.89-33.06L299,345.18a2.25,2.25,0,0,1-2.16,2.07h-.08a2.23,2.23,0,0,1-2.21-1.9l-7.74-51.12-1.08,4.06a2.24,2.24,0,0,1-2.16,1.66h0l-38.42-.05Z" transform="translate(-219.75 -224.35)"/>
      </g>
      <g id="Magenta2">
        <path class="cls-2" d="M311.41,310.36a2.24,2.24,0,0,1-4.29-.68l-2.89-33.06L299,345.18a2.25,2.25,0,0,1-2.16,2.07h-.08a2.23,2.23,0,0,1-2.21-1.9l-7.74-51.12-1.08,4.06a2.24,2.24,0,0,1-2.16,1.66h0l-38.42-.05a79.5,79.5,0,0,0,9.43,12.85l67.61,75,67.61-75a78.84,78.84,0,0,0,9.48-12.94l-83.36-.07Z" transform="translate(-219.75 -224.35)"/>
        <path class="cls-2" d="M388.09,235.21C350,207.29,322.18,242,322.18,242s-27.78-34.73-65.91-6.81c0,0-30.19,25.23-13.5,60.2l39.08,0,3.41-12.75a2.24,2.24,0,0,1,4.38.25L296,325.19,301.84,249a2.24,2.24,0,0,1,2.22-2.07h0A2.24,2.24,0,0,1,306.3,249l4.5,51.34,1.56-3.7a2.26,2.26,0,0,1,2.07-1.37h0l87.2.07C418.24,260.4,388.09,235.21,388.09,235.21Z" transform="translate(-219.75 -224.35)"/>
        <path class="cls-2" d="M222,295.41a2.2,2.2,0,0,0-2.24,2.19,2.25,2.25,0,0,0,2.24,2.25h23.15c-.88-1.51-1.66-3-2.37-4.44Z" transform="translate(-219.75 -224.35)"/>
        <path class="cls-2" d="M441.85,295.36H429.5v-14h-4.6v14l-23.27,0c-.7,1.48-1.48,3-2.36,4.48l25.63,0v15.74h4.6V299.84h12.34a2.25,2.25,0,0,0,0-4.49Z" transform="translate(-219.75 -224.35)"/>
        <polygon class="cls-2" points="225.39 71.73 225.39 75 225.39 91.22 229.99 91.22 229.99 57 225.39 57 225.39 71.73"/>
        <path class="cls-2" d="M464.47,291.13q-5.76,0-8.48,3.9a15.59,15.59,0,0,0-2.47,9.13q0,6,2.93,9.11,2.76,2.93,8.84,2.93a30.34,30.34,0,0,0,7.75-.92l-.7-3.39a18.28,18.28,0,0,1-6.42,1.26c-3.69,0-6.08-1.32-7.14-3.95a14.76,14.76,0,0,1-.8-4.89h15.91c0-.95.05-1.55.05-1.79Q473.94,291.14,464.47,291.13Zm-6.39,10.25q.76-7.22,6.25-7.22,3.56,0,4.69,2.88a13.24,13.24,0,0,1,.75,4.34Z" transform="translate(-219.75 -224.35)"/>
        <path class="cls-2" d="M496.41,301.69c0-3.42-.29-5.73-.89-6.92-1.21-2.42-3.89-3.64-8-3.64a16.93,16.93,0,0,0-7.67,1.68l.94,3.29a12.8,12.8,0,0,1,6.25-1.87c2.29,0,3.78.63,4.45,1.89a8.58,8.58,0,0,1,.56,3.71v.6a44.74,44.74,0,0,0-7.6.78q-7.12,1.67-7.12,8.14,0,6.86,7.29,6.85c3.56,0,6.18-1.27,7.84-3.8.1,1.08.23,2.14.39,3.17h4a44.59,44.59,0,0,1-.42-6.22Zm-4.38,4.7a11.93,11.93,0,0,1-.1,1.79,5.34,5.34,0,0,1-1,2.4,6.23,6.23,0,0,1-5.28,2.62q-3.9,0-3.9-4.07,0-4.41,4.56-5.38a34.93,34.93,0,0,1,5.71-.65Z" transform="translate(-219.75 -224.35)"/>
        <path class="cls-2" d="M509.66,292.93a15.6,15.6,0,0,0-1.91,2.73q-.08-2-.24-3.9h-4.19c.14,2.3.22,4.91.22,7.85v16h4.38V302.71a11.31,11.31,0,0,1,.14-1.82,10,10,0,0,1,1.19-3q1.86-3.3,4.17-3.3a7.44,7.44,0,0,1,2.64.61l.72-3.71a11.64,11.64,0,0,0-2.93-.39A5.58,5.58,0,0,0,509.66,292.93Z" transform="translate(-219.75 -224.35)"/>
        <path class="cls-2" d="M522.59,308.18a11.45,11.45,0,0,0,1,5.57c.92,1.63,2.81,2.45,5.69,2.45a16.45,16.45,0,0,0,5.08-.75l-.55-3.32a7.43,7.43,0,0,1-3.66,1,2.71,2.71,0,0,1-2.62-1.31,9.79,9.79,0,0,1-.6-4.16V295h6.15l.22-3.23H527V284.6l-3.94,1-.37,6.2H518.5l-.19,3.23h4.28Z" transform="translate(-219.75 -224.35)"/>
        <path class="cls-2" d="M556.84,311.79a15.27,15.27,0,0,0,2.08-8.42A16.27,16.27,0,0,0,557,295a7.79,7.79,0,0,0-7.2-3.88,8.81,8.81,0,0,0-4.74,1.26,11.55,11.55,0,0,0-2,1.58V279.51l-4.58.95c.13,2.19.19,4.11.19,5.76v19q0,5.6-.34,9.06a24.46,24.46,0,0,0,9.4,1.89,12.09,12.09,0,0,0,6.05-1.5A8.62,8.62,0,0,0,556.84,311.79Zm-9.11,1.31a11.13,11.13,0,0,1-4.62-.94V301.77a17.4,17.4,0,0,1,.09-2.11,7.23,7.23,0,0,1,1-2.62,5.51,5.51,0,0,1,4.84-2.81,4.26,4.26,0,0,1,4,2.55,14.28,14.28,0,0,1,1.31,6.66A13.64,13.64,0,0,1,553,310.1,5.53,5.53,0,0,1,547.73,313.1Z" transform="translate(-219.75 -224.35)"/>
        <path class="cls-2" d="M574.42,316.2a30.34,30.34,0,0,0,7.75-.92l-.7-3.39a18.36,18.36,0,0,1-6.42,1.26q-5.55,0-7.14-3.95a14.76,14.76,0,0,1-.8-4.89H583c0-.95.05-1.55.05-1.79q0-11.38-9.47-11.39-5.77,0-8.48,3.9a15.52,15.52,0,0,0-2.47,9.13q0,6,2.93,9.11Q568.34,316.2,574.42,316.2Zm-1-22c2.38,0,3.94,1,4.7,2.88a13.24,13.24,0,0,1,.75,4.34H567.2Q568,294.16,573.45,294.16Z" transform="translate(-219.75 -224.35)"/>
        <path class="cls-2" d="M604.55,309.35v-7.66q0-5.13-.9-6.92c-1.21-2.42-3.88-3.64-8-3.64a17,17,0,0,0-7.68,1.68l.95,3.29a12.74,12.74,0,0,1,6.24-1.87q3.44,0,4.46,1.89a8.74,8.74,0,0,1,.56,3.71v.6a44.88,44.88,0,0,0-7.61.78q-7.12,1.67-7.12,8.14,0,6.86,7.29,6.85c3.57,0,6.18-1.27,7.85-3.8.09,1.08.22,2.14.38,3.17h4A46.2,46.2,0,0,1,604.55,309.35Zm-4.38-3a13.44,13.44,0,0,1-.1,1.79,5.34,5.34,0,0,1-1,2.4,6.25,6.25,0,0,1-5.28,2.62q-3.9,0-3.9-4.07,0-4.41,4.55-5.38a35.07,35.07,0,0,1,5.72-.65Z" transform="translate(-219.75 -224.35)"/>
        <path class="cls-2" d="M622.21,315.45l-.56-3.32a7.37,7.37,0,0,1-3.66,1,2.69,2.69,0,0,1-2.61-1.31,9.59,9.59,0,0,1-.61-4.16V295h6.15l.22-3.23h-6.39V284.6l-4,1-.36,6.2H606.3l-.2,3.23h4.29v13.19a11.58,11.58,0,0,0,1,5.57q1.38,2.44,5.69,2.45A16.52,16.52,0,0,0,622.21,315.45Z" transform="translate(-219.75 -224.35)"/>
        <polygon class="cls-2" points="298.65 100.34 302.92 100.34 302.92 113.88 304.93 113.88 304.93 100.34 309.21 100.34 309.21 98.91 298.65 98.91 298.65 100.34"/>
        <path class="cls-2" d="M533.79,327.54a4.22,4.22,0,0,0-3.71,1.7,6.83,6.83,0,0,0-1.08,4,5.59,5.59,0,0,0,1.28,4,5.11,5.11,0,0,0,3.87,1.28,13.14,13.14,0,0,0,3.39-.4l-.31-1.48a8.18,8.18,0,0,1-2.81.55c-1.62,0-2.66-.58-3.12-1.73a6.41,6.41,0,0,1-.35-2.14h7c0-.42,0-.68,0-.78Q537.93,327.54,533.79,327.54ZM531,332c.23-2.11,1.14-3.16,2.73-3.16a2,2,0,0,1,2.06,1.26,6,6,0,0,1,.33,1.9Z" transform="translate(-219.75 -224.35)"/>
        <path class="cls-2" d="M544.89,337.15a2.53,2.53,0,0,1-2.38-1.27,5.32,5.32,0,0,1-.63-2.76,5.59,5.59,0,0,1,.8-3.15,2.29,2.29,0,0,1,2.05-1.08,3.27,3.27,0,0,1,2,.71l.48-1.48a5.86,5.86,0,0,0-2.69-.58,4.16,4.16,0,0,0-3.3,1.31,6.44,6.44,0,0,0-1.36,4.4,5.94,5.94,0,0,0,1.1,3.81,4.39,4.39,0,0,0,3.6,1.44,8.91,8.91,0,0,0,2.82-.38l-.31-1.5A5.27,5.27,0,0,1,544.89,337.15Z" transform="translate(-219.75 -224.35)"/>
        <path class="cls-2" d="M555.92,327.54a4.92,4.92,0,0,0-3.71,1.82v-6.91l-2,.42c0,1,.08,1.8.08,2.52v12.84h1.92v-6.17a3.91,3.91,0,0,1,0-.72,2.08,2.08,0,0,1,.55-.94,3.53,3.53,0,0,1,2.62-1.4,1.33,1.33,0,0,1,1.33.72,4.42,4.42,0,0,1,.26,1.82v6.69h1.92v-6.7a6.81,6.81,0,0,0-.33-2.51A2.61,2.61,0,0,0,555.92,327.54Z" transform="translate(-219.75 -224.35)"/>
        <path class="cls-2" d="M568.28,327.54a4.87,4.87,0,0,0-3.75,1.95l-.15-1.68h-1.77q.09,1.88.09,3.57v6.85h1.92V332a4,4,0,0,1,0-.64,2.38,2.38,0,0,1,.54-.92,3.44,3.44,0,0,1,2.57-1.4,1.35,1.35,0,0,1,1.34.72,4.46,4.46,0,0,1,.25,1.82v6.69h1.92v-6.7A6.88,6.88,0,0,0,571,329,2.61,2.61,0,0,0,568.28,327.54Z" transform="translate(-219.75 -224.35)"/>
        <path class="cls-2" d="M578.9,327.54a4.51,4.51,0,0,0-3.61,1.53,7,7,0,0,0,0,7.89,4.85,4.85,0,0,0,7.09,0,7,7,0,0,0,0-7.89A4.34,4.34,0,0,0,578.9,327.54Zm2.13,8.27a2.47,2.47,0,0,1-4.39,0A6,6,0,0,1,576,333a5.83,5.83,0,0,1,.61-2.8,2.33,2.33,0,0,1,2.23-1.33,2.26,2.26,0,0,1,2.15,1.33,5.89,5.89,0,0,1,.6,2.8A6,6,0,0,1,581,335.81Z" transform="translate(-219.75 -224.35)"/>
        <path class="cls-2" d="M586.41,325.39v12.84h1.92V322.45l-2,.42C586.39,323.83,586.41,324.67,586.41,325.39Z" transform="translate(-219.75 -224.35)"/>
        <path class="cls-2" d="M595.62,327.54a4.52,4.52,0,0,0-3.62,1.53,7,7,0,0,0,0,7.89,4.85,4.85,0,0,0,7.09,0,7,7,0,0,0,0-7.89A4.34,4.34,0,0,0,595.62,327.54Zm2.13,8.27a2.48,2.48,0,0,1-4.4,0,6,6,0,0,1-.59-2.79,6,6,0,0,1,.6-2.8,2.33,2.33,0,0,1,2.24-1.33,2.27,2.27,0,0,1,2.15,1.33,6,6,0,0,1,.59,2.8A6.15,6.15,0,0,1,597.75,335.81Z" transform="translate(-219.75 -224.35)"/>
        <path class="cls-2" d="M603.71,329a6.53,6.53,0,0,0-1.33,4.38c0,2.08.5,3.53,1.5,4.36a3.55,3.55,0,0,0,2.34.78,3.63,3.63,0,0,0,2.1-.61,6.33,6.33,0,0,0,.84-.75v.56a8.08,8.08,0,0,1-.38,2.79,2.35,2.35,0,0,1-2.45,1.46,7.19,7.19,0,0,1-2.93-.65l-.3,1.47a8.94,8.94,0,0,0,3.09.5c2.45,0,3.94-.92,4.48-2.78a17.37,17.37,0,0,0,.4-4.46v-4.1c0-1.38.06-2.63.16-3.75a12.72,12.72,0,0,0-3.86-.64A4.55,4.55,0,0,0,603.71,329Zm5.45,4.87a3.85,3.85,0,0,1-.48,2.06,2.44,2.44,0,0,1-2.12,1.24c-1.48,0-2.21-1.24-2.21-3.7a7,7,0,0,1,.66-3.27,2.38,2.38,0,0,1,2.26-1.29,4.3,4.3,0,0,1,1.89.44Z" transform="translate(-219.75 -224.35)"/>
        <path class="cls-2" d="M620.87,327.81l-1.55,5.34c-.08.31-.24.86-.46,1.68-.05.16-.23.8-.55,1.92l-.35-1.09-.26-.79-.58-1.78-1.78-5.28h-2l3.84,10.42h.68l-.24.7a7.62,7.62,0,0,1-1.19,2.37,1.81,1.81,0,0,1-1.44.64,3.52,3.52,0,0,1-1.15-.2l-.22,1.39a7.47,7.47,0,0,0,1.41.13,3.31,3.31,0,0,0,2.94-1.44,14.26,14.26,0,0,0,1.38-3.36l3.39-10.65Z" transform="translate(-219.75 -224.35)"/>
      </g>
    </svg>
  </xsl:template>

  <xsl:template name="InsertEHLogo">
    <!-- E+H_Claim_2c.svg  added value 3 to css class names to avoid collision with css class names of heartbeat logo.-->
    <svg class="eh-logo-image" id="Ebene_1" data-name="Ebene 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 654.24 132.52">
      <defs>
        <style>.cls-4{fill:#231f20;}.cls-5{fill:#00aeef;}.cls-5,.cls-6{fill-rule:evenodd;}.cls-6{fill:#fff;}</style>
      </defs>
      <title>E+H_Claim_2c</title>
      <!--<rect style="fill: none; stroke: red; stroke-width: 1" x="0" y="0" width="654.24" height="132.52"/>-->  <!-- ratio = 4.94 -->
      <path class="cls-4" d="M93.14,253.74h27v6.05h-20v16.06h16.14v6H100.18v18.44h20.95v6.12h-28Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M129.76,268.12h5.12l1,4.75c3.37-3.37,7.2-5.74,11.71-5.74,5.51,0,9.26,2.83,9.26,9.33v30h-6.58V278.53c0-4.36-1.23-5.59-4.67-5.59-3.06,0-6.5,2.15-9.26,4.59v28.92h-6.57Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M165.77,287.56c0-14.39,4.21-20.43,13.16-20.43,4.21,0,7.73,2.29,10.17,4.67V251.06h6.58v55.39h-5.12l-1.07-4a14.13,14.13,0,0,1-10.63,5C171.51,307.44,165.77,303.31,165.77,287.56Zm23.33,10.09V276.92c-2.22-2.14-5.27-4.13-8.49-4.13-5.43,0-7.8,2-7.8,14.31s2,14.68,7.19,14.68C183.75,301.78,186.35,300.25,189.1,297.65Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M206.67,268.12h5.13l1.07,5.44c2.83-3.52,6.35-6.13,10.79-6.13a3.5,3.5,0,0,1,1.37.24l-.76,7a7.54,7.54,0,0,0-2.29-.3c-3.52,0-5.9,1.3-8.73,3.9v28.15h-6.58Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M228.91,287.25c0-14.54,6-20.12,15-20.12s14.31,5.2,14.31,19.05v2.6H236c.15,10.48,2.44,13.08,8.79,13.08,4.13,0,6.51-1.61,9-3.6l3.6,4.75c-3.75,3.06-7.2,4.43-12.78,4.43C234.57,307.44,228.91,301.63,228.91,287.25Zm7.11-3.44h15.23c0-8.8-2-11.48-7.5-11.48C239.31,272.33,236.56,274.63,236,283.81Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M263.33,303.31l2.76-4.89a17.63,17.63,0,0,0,10.25,3.52c5.2,0,6.81-2.07,6.81-5.66,0-4.29-2-5.13-8.11-6.81-5.36-1.46-9.79-4.29-9.79-11.86,0-5.58,3.59-10.48,12-10.48a20.47,20.47,0,0,1,10.63,2.52l-2.3,5.21a16.07,16.07,0,0,0-8.1-2.15c-4.13,0-6.05,1.46-6.05,4.75,0,3.59,1.61,4.51,6.89,6,5.89,1.61,11.24,3.9,11.24,12.55,0,7.95-4.51,11.47-13.54,11.47A21.59,21.59,0,0,1,263.33,303.31Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M294.62,303.31l2.76-4.89a17.63,17.63,0,0,0,10.24,3.52c5.21,0,6.82-2.07,6.82-5.66,0-4.29-2-5.13-8.12-6.81-5.35-1.46-9.79-4.29-9.79-11.86,0-5.58,3.6-10.48,12-10.48a20.48,20.48,0,0,1,10.64,2.52l-2.3,5.21a16.08,16.08,0,0,0-8.11-2.15c-4.13,0-6,1.46-6,4.75,0,3.59,1.61,4.51,6.89,6,5.88,1.61,11.24,3.9,11.24,12.55,0,7.95-4.51,11.47-13.54,11.47A21.56,21.56,0,0,1,294.62,303.31Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M344.8,286.94H332.49v-5.73H344.8V267.67H351v13.54h12.24v5.73H351v13.54h-6.2Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M378.31,253.74h7v21.57h19V253.74h7v52.71h-7V281.51h-19v24.94h-7Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M420.36,295.51c0-8.72,5.13-12.78,17.67-12.78h3.14v-3c0-4.28-.54-6.88-5.51-6.88-4,0-7.8,1.68-11.17,3.52L422,271.34a26.82,26.82,0,0,1,14.38-4.21c7.5,0,11.4,3.37,11.4,11.55v27.77h-5.13l-1.07-3.83c-2.22,2.46-5.43,4.82-9.64,4.82C424.57,307.44,420.36,303.39,420.36,295.51Zm20.81,2.14V287.48h-2.3c-9.63,0-11.47,2.45-11.47,8,0,5.05,1.61,6.73,5.36,6.73S439.33,299.72,441.17,297.65Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M457.81,297.65V268.12h6.58v27.47c0,4.51,1.53,6,5,6,3.06,0,6.35-2.06,9.18-4.59V268.12h6.58v38.33H480l-1-4.74c-3.22,3.29-6.89,5.73-11.4,5.73C462.09,307.44,457.81,304.31,457.81,297.65Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M492.84,303.31l2.76-4.89a17.63,17.63,0,0,0,10.25,3.52c5.2,0,6.81-2.07,6.81-5.66,0-4.29-2-5.13-8.11-6.81-5.36-1.46-9.79-4.29-9.79-11.86,0-5.58,3.59-10.48,12-10.48a20.47,20.47,0,0,1,10.63,2.52l-2.29,5.21a16.13,16.13,0,0,0-8.11-2.15c-4.13,0-6,1.46-6,4.75,0,3.59,1.6,4.51,6.88,6,5.89,1.61,11.24,3.9,11.24,12.55,0,7.95-4.51,11.47-13.54,11.47A21.59,21.59,0,0,1,492.84,303.31Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M525.43,287.25c0-14.54,6-20.12,15-20.12s14.3,5.2,14.3,19.05v2.6H532.47c.15,10.48,2.45,13.08,8.8,13.08,4.13,0,6.5-1.61,9-3.6l3.59,4.75c-3.75,3.06-7.19,4.43-12.77,4.43C531.09,307.44,525.43,301.63,525.43,287.25Zm7.12-3.44h15.22c0-8.8-2-11.48-7.5-11.48C535.84,272.33,533.08,274.63,532.55,283.81Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M563.12,268.12h5.13l1.07,5.44c2.83-3.52,6.35-6.13,10.78-6.13a3.55,3.55,0,0,1,1.38.24l-.77,7a7.46,7.46,0,0,0-2.29-.3c-3.52,0-5.89,1.3-8.72,3.9v28.15h-6.58Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M206.92,336h5.42c4.34,0,6.45,2.24,6.45,6.24,0,4.22-2.11,6.49-6.11,6.49H208.9v8.91h-2ZM212.46,347c2.84,0,4.22-1.35,4.22-4.72s-1.29-4.63-4.47-4.63H208.9V347Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M227.67,356.31a5.62,5.62,0,0,0,3.75-1.35l1,1.32a7.1,7.1,0,0,1-4.79,1.64c-3.59,0-6.1-2-6.1-7.81s2.42-7.88,5.76-7.88c3.5,0,5.39,2.21,5.39,7.34v.79h-9.17C223.61,354.93,224.84,356.31,227.67,356.31Zm3.09-7.43c0-3.85-1.13-5.1-3.46-5.1-2.11,0-3.5,1.16-3.72,5.1Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M236.06,350.11c0-5.61,2.45-7.88,5.95-7.88s6.05,2.24,6.05,7.85-2.46,7.84-6,7.84S236.06,355.68,236.06,350.11Zm10,0c0-4.76-1.41-6.4-4-6.4s-4,1.55-4,6.3,1.42,6.37,4,6.37S246.07,354.87,246.07,350.14Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M252.4,342.55h1.33l.44,2a6.28,6.28,0,0,1,4.5-2.33c3,0,5.11,2.11,5.11,7.85,0,5.41-1.83,7.84-5.23,7.84a5.89,5.89,0,0,1-4.26-2V364H252.4Zm9.39,7.68c0-5-1.13-6.36-3.4-6.36a6.18,6.18,0,0,0-4.1,2.08v8.47a5.58,5.58,0,0,0,3.91,1.86C260.56,356.28,261.79,354.9,261.79,350.23Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M268.25,354.9V335.08h1.89v20c0,.95.38,1.23,1.07,1.23a2.13,2.13,0,0,0,.66-.09l.31,1.35a4.18,4.18,0,0,1-1.47.29C269.23,357.86,268.25,357.1,268.25,354.9Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M281,356.31a5.62,5.62,0,0,0,3.75-1.35l1,1.32a7.08,7.08,0,0,1-4.79,1.64c-3.59,0-6.11-2-6.11-7.81s2.43-7.88,5.77-7.88,5.38,2.21,5.38,7.34v.79h-9.16C276.94,354.93,278.17,356.31,281,356.31Zm3.09-7.43c0-3.85-1.13-5.1-3.47-5.1-2.1,0-3.49,1.16-3.71,5.1Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M295.72,344.09v-1.54h1.79v-3.72c0-2.83,1.61-4,3.56-4a5.05,5.05,0,0,1,3,.79L303.3,337a4.06,4.06,0,0,0-2-.57c-1.2,0-1.86.72-1.86,2.39v3.69h3.06v1.54H299.4V357.6h-1.89V344.09Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M304.91,350.11c0-5.61,2.46-7.88,6-7.88s6,2.24,6,7.85-2.45,7.84-6,7.84S304.91,355.68,304.91,350.11Zm10,0c0-4.76-1.42-6.4-4-6.4s-4,1.55-4,6.3,1.41,6.37,4,6.37S314.93,354.87,314.93,350.14Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M321.26,342.55h1.32l.44,2.55c1.26-1.55,2.78-2.77,4.57-2.77a1.56,1.56,0,0,1,.47.06l-.19,2a1.52,1.52,0,0,0-.65-.1c-1.55,0-2.72.79-4.07,2.24V357.6h-1.89Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M338.74,336h5.42c4.35,0,6.46,2.24,6.46,6.24,0,4.22-2.11,6.49-6.11,6.49h-3.78v8.91h-2ZM344.29,347c2.83,0,4.22-1.35,4.22-4.72s-1.3-4.63-4.48-4.63h-3.3V347Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M354.84,342.55h1.32l.44,2.55c1.26-1.55,2.77-2.77,4.57-2.77a1.56,1.56,0,0,1,.47.06l-.19,2a1.54,1.54,0,0,0-.66-.1c-1.54,0-2.71.79-4.06,2.24V357.6h-1.89Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M364.13,350.11c0-5.61,2.46-7.88,5.95-7.88s6.06,2.24,6.06,7.85-2.47,7.84-6,7.84S364.13,355.68,364.13,350.11Zm10,0c0-4.76-1.42-6.4-4-6.4s-4,1.55-4,6.3,1.42,6.37,4,6.37S374.15,354.87,374.15,350.14Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M379.5,350.11c0-5.7,2.46-7.88,5.89-7.88a5.48,5.48,0,0,1,4.22,1.77l-1.13,1.29a3.8,3.8,0,0,0-3.15-1.45c-2.49,0-3.84,1.38-3.84,6.2s1.32,6.27,4,6.27a4.08,4.08,0,0,0,3.18-1.51L389.9,356a5.7,5.7,0,0,1-4.51,1.95C381.93,357.92,379.5,355.74,379.5,350.11Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M398.66,356.31a5.66,5.66,0,0,0,3.75-1.35l1,1.32a7.07,7.07,0,0,1-4.78,1.64c-3.6,0-6.12-2-6.12-7.81s2.43-7.88,5.77-7.88c3.49,0,5.38,2.21,5.38,7.34v.79h-9.16C394.59,354.93,395.82,356.31,398.66,356.31Zm3.08-7.43c0-3.85-1.13-5.1-3.46-5.1-2.11,0-3.5,1.16-3.72,5.1Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M406.44,356.28l.81-1.35a6.64,6.64,0,0,0,4.07,1.42c2.23,0,3.15-1,3.15-2.65,0-1.83-.82-2.36-3.4-3.18-2.24-.7-3.91-1.74-3.91-4.44,0-2.11,1.45-3.85,4.44-3.85a7.68,7.68,0,0,1,4.09,1l-.69,1.48a6.41,6.41,0,0,0-3.37-.91c-1.7,0-2.68.69-2.68,2.2s.76,2.08,2.87,2.78c2.52.82,4.48,1.66,4.48,4.78,0,2.94-1.86,4.32-5,4.32A7.9,7.9,0,0,1,406.44,356.28Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M418.85,356.28l.82-1.35a6.59,6.59,0,0,0,4.06,1.42c2.24,0,3.15-1,3.15-2.65,0-1.83-.82-2.36-3.4-3.18-2.24-.7-3.91-1.74-3.91-4.44,0-2.11,1.45-3.85,4.44-3.85a7.74,7.74,0,0,1,4.1,1l-.69,1.48a6.47,6.47,0,0,0-3.38-.91c-1.7,0-2.67.69-2.67,2.2s.75,2.08,2.86,2.78c2.52.82,4.48,1.66,4.48,4.78,0,2.94-1.86,4.32-5,4.32A7.9,7.9,0,0,1,418.85,356.28Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M440.08,357.6h-2L444.84,336H447l6.62,21.64h-2.15l-2.05-7h-7.21Zm7-14.8a37.36,37.36,0,0,1-1.16-4.92h-.07a41.42,41.42,0,0,1-1.22,4.92l-1.89,6.14h6.17Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M456.81,354v-11.4h1.85v10.9c0,2,.82,2.8,2.34,2.8a7.2,7.2,0,0,0,4.34-2V342.55h1.89V357.6h-1.35l-.44-2a7,7,0,0,1-4.82,2.33C458.44,357.92,456.81,356.63,456.81,354Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M471,344.09v-1.54h1.83v-4l1.86-.44v4.41h3.15v1.54h-3.15V355c0,.91.41,1.39,1.26,1.39a3.94,3.94,0,0,0,1.76-.45l.48,1.39a4.88,4.88,0,0,1-2.34.6c-1.7,0-3-.79-3-2.84v-11Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M481.06,350.11c0-5.61,2.46-7.88,6-7.88s6,2.24,6,7.85-2.45,7.84-6,7.84S481.06,355.68,481.06,350.11Zm10,0c0-4.76-1.42-6.4-4-6.4s-4,1.55-4,6.3,1.42,6.37,4,6.37S491.08,354.87,491.08,350.14Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M497.41,342.55h1.32l.44,2.08c1.42-1.36,2.83-2.4,4.63-2.4a3.35,3.35,0,0,1,3.34,2.33c1.54-1.38,3-2.33,4.7-2.33,2.07,0,3.52,1.23,3.52,3.85V357.6h-1.89v-11c0-2-.63-2.68-2-2.68a6.49,6.49,0,0,0-4.1,2V357.6h-1.89v-11c0-2-.63-2.68-2.05-2.68s-2.74.91-4.09,2.08V357.6h-1.89Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M528.06,346.83c0-1.89-.47-3-2.49-3a8.34,8.34,0,0,0-4.51,1.51l-.75-1.38a9.23,9.23,0,0,1,5.42-1.77c2.77,0,4.22,1.36,4.22,4.35v11h-1.33l-.47-1.82a5.56,5.56,0,0,1-4.19,2.14c-2.77,0-4.41-1.61-4.41-4.54,0-3.27,2-4.85,6.58-4.85h1.93Zm0,3.15h-1.74c-3.78,0-4.78,1-4.78,3.44,0,2.07.85,2.93,2.64,2.93a5.08,5.08,0,0,0,3.88-2.08Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M533.63,344.09v-1.54h1.83v-4l1.86-.44v4.41h3.15v1.54h-3.15V355c0,.91.41,1.39,1.26,1.39a3.94,3.94,0,0,0,1.76-.45l.47,1.39a4.81,4.81,0,0,1-2.33.6c-1.7,0-3-.79-3-2.84v-11Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M545.54,344l-2.14-.29v-1.19h4V357.6h-1.89Zm-.66-6.4a1.43,1.43,0,1,1,1.41,1.45A1.41,1.41,0,0,1,544.88,337.63Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M551.87,350.11c0-5.61,2.46-7.88,6-7.88s6,2.24,6,7.85-2.46,7.84-6,7.84S551.87,355.68,551.87,350.11Zm10,0c0-4.76-1.42-6.4-4-6.4s-4,1.55-4,6.3,1.41,6.37,4,6.37S561.89,354.87,561.89,350.14Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-4" d="M568.22,342.55h1.32l.44,2.17c1.48-1.45,3.06-2.49,4.92-2.49,2.14,0,3.72,1.26,3.72,3.88V357.6h-1.9v-11c0-2-.72-2.71-2.27-2.71s-3,1-4.34,2.18V357.6h-1.89Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-5" d="M740.74,231.82a8.7,8.7,0,0,0-2.32-.31H630.58a9,9,0,0,0-8.65,6.64l-15.28,57a9,9,0,0,0,6.33,11,8.7,8.7,0,0,0,2.32.31H723.14a9,9,0,0,0,8.65-6.64l15.28-57A9,9,0,0,0,740.74,231.82Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-6" d="M674.17,299.28H630.58a1.79,1.79,0,0,1-1.79-1.79v-57a1.8,1.8,0,0,1,1.79-1.8h43.59l-4.39,16.43H648.2v5.67H663l-4.4,16.42H648.2v5.67h26Z" transform="translate(-93.14 -231.51)"/>
      <path class="cls-6" d="M724.93,297.49a1.79,1.79,0,0,1-1.79,1.79H705.52V277.19h-6v22.09h-19.4V277.19H663.86l4.39-16.42h11.9v-22.1h19.4v22.1h6v-22.1h17.62a1.8,1.8,0,0,1,1.79,1.8Z" transform="translate(-93.14 -231.51)"/>
    </svg>
  </xsl:template>

</xsl:stylesheet>
