View stylesheet

XML schemas http://biodiversity.eionet.europa.eu/schemas/barcelona_convention/barcelona.xsd
Output type HTML
Description XSL for Barcelona Convention
XSL file barcelona.xslt (Last modified: 03 Jun 2008 18:27 )
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#160;"> ]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns="http://www.w3.org/1999/xhtml" 
                version="1.0">
	<xsl:output method="xml" indent="yes"
              doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
              doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
              omit-xml-declaration="yes"/>
  <xsl:preserve-space elements="difficulty-type"/>
  <xsl:param name="xml_folder_uri"/>
  <xsl:include href="http://converters.eionet.europa.eu/xsl/common.xslt"/>
  <xsl:variable name="labels_xml" select="document(concat($xml_folder_uri,'barcelona-labels-en.xml'))"/>
  <!--xsl:include href="common.xslt"/>
  <xsl:variable name="labels_xml" select="document(concat($xml_folder_uri,'../xml/barcelona-labels-en.xml'))"/-->
  <xsl:variable name="labels" select="$labels_xml/labels"/>
  <xsl:template match="barcelona">
    <html>
      <xsl:attribute name="xml:lang">
        <xsl:value-of select="@xml:lang"/>
      </xsl:attribute>
      <head>
          <style type="text/css"><![CDATA[
html
{
  font-family: arial, sans-serif;
  font-size: .8em;
}          
.zebra0
{
  background-color: white;
}          
.zebra1
{
  background-color: lightgrey;
}          
.datatable
{
  border-collapse: collapse;
}
.datatable td
{
  border: 1px solid black;
}

#description pre
{
  font-family: arial, sans-serif;
}

.vertical-text
{
  text-align: center;
}

.check-column
{
  text-align: center;
  font-weight: bold;
}

.center-text
{
  text-align: center;
}

.underline
{
  text-decoration: underline;
}
]]>       </style> 
        <title>Barcelona Convention</title>
      </head>
      <body>
        <h1><xsl:value-of select="$labels/label[@id='barcelona-title']"/></h1>
        <!-- METADATA INFORMATION -->
        <xsl:apply-templates select="reporting-party"/>
        <!-- REPORT -->
        <xsl:apply-templates select="report"/>
      </body>
    </html>
  </xsl:template>

  <!-- REPORT -->
  <xsl:template match="report">
    <h2><xsl:value-of select="@label"/></h2>
    <xsl:apply-templates select="status-ratification"/>
    <br />
    <xsl:apply-templates select="agreements"/>
    <br />
    <xsl:apply-templates select="legal-instruments"/>
    <br />
    <xsl:apply-templates select="legal-measures"/>
    <br />
    <xsl:apply-templates select="policy-measures"/>
    <br />
    <xsl:apply-templates select="resources-allocation"/>
    <br />
    <xsl:apply-templates select="other-measures"/>
  </xsl:template>
  <!-- END OF REPORT -->
  
  <!-- REPORT / PART I -->
  <xsl:template match="status-ratification">
    <h2 class="underline"><xsl:value-of select="$labels/label[@id='p1-title']"/></h2>
    <p>
      <strong>
        <xsl:value-of select="$labels/label[@id='p1-q1']"/>
      </strong>
    </p>      
    <table border="1" cellpadding="1" cellspacing="0" class="datatable">
      <caption>
        <xsl:value-of select="$labels/label[@id='p1-caption']"/>
      </caption>
      <thead>
        <tr>
          <th rowspan="2"><xsl:value-of select="$labels/label[@id='p1-ra']"/></th>
          <th rowspan="2"><xsl:value-of select="$labels/label[@id='number']"/></th>
          <th rowspan="2"><xsl:value-of select="$labels/label[@id='p1-totli']"/></th>
          <th colspan="5">
            <xsl:value-of select="$labels/label[@id='status']"/>
            <br />
            <em><xsl:value-of select="$labels/label[@id='tick-answer']"/></em>
          </th>
          <th colspan="6">
            <xsl:value-of select="$labels/label[@id='difficulties']"/>
            <br />
            <em><xsl:value-of select="$labels/label[@id='tick-answers']"/></em>
          </th>
        </tr>
        <tr>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='status-yes']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='status-no']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='status-dev']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='status-other']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='status-na']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='diff-policy']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='diff-regul']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='diff-finance']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='diff-admin']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='diff-tech']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='diff-public']"/></td>
        </tr>
      </thead>
      <tbody>
        <xsl:for-each select="table/*">
          <tr class="zebra{position() mod 2}">
            <xsl:variable name="lilabel" select="concat('p1-t1-li', position())" />
            <td rowspan="3">&nbsp;</td>
            <td rowspan="3" class="center-text"><xsl:value-of select="position()"/></td>
            <td rowspan="3"><xsl:value-of select="$labels/label[@id=$lilabel]"/></td>
            <td class="check-column">
              <xsl:if test="./status-column/status-type = 00">X</xsl:if>
              <xsl:if test="./status-column/status-type != 00">&nbsp;</xsl:if>
            </td>
            <td class="check-column">
              <xsl:if test="./status-column/status-type = 01">X</xsl:if>
              <xsl:if test="./status-column/status-type != 01">&nbsp;</xsl:if>
            </td>
            <td class="check-column">
              <xsl:if test="./status-column/status-type = 02">X</xsl:if>
              <xsl:if test="./status-column/status-type != 02">&nbsp;</xsl:if>
            </td>
            <td class="check-column">
              <xsl:if test="./status-column/status-type = 03">X</xsl:if>
              <xsl:if test="./status-column/status-type != 03">&nbsp;</xsl:if>
            </td>
            <td class="check-column">
              <xsl:if test="./status-column/status-type = 04">X</xsl:if>
              <xsl:if test="./status-column/status-type != 04">&nbsp;</xsl:if>
            </td>
            <td class="check-column">
              <xsl:call-template name="decode-difficulty">
                <xsl:with-param name="text" select="./difficulties-column/difficulty-type" />
                <xsl:with-param name="pattern" select="'00'"/>
              </xsl:call-template>
            </td>
            <td class="check-column">
              <xsl:call-template name="decode-difficulty">
                <xsl:with-param name="text" select="./difficulties-column/difficulty-type" />
                <xsl:with-param name="pattern" select="'01'"/>
              </xsl:call-template>
            </td>
            <td class="check-column">
              <xsl:call-template name="decode-difficulty">
                <xsl:with-param name="text" select="./difficulties-column/difficulty-type" />
                <xsl:with-param name="pattern" select="'02'"/>
              </xsl:call-template>
            </td>
            <td class="check-column">
              <xsl:call-template name="decode-difficulty">
                <xsl:with-param name="text" select="./difficulties-column/difficulty-type" />
                <xsl:with-param name="pattern" select="'03'"/>
              </xsl:call-template>
            </td>
            <td class="check-column">
              <xsl:call-template name="decode-difficulty">
                <xsl:with-param name="text" select="./difficulties-column/difficulty-type" />
                <xsl:with-param name="pattern" select="'04'"/>
              </xsl:call-template>
            </td>
            <td class="check-column">
              <xsl:call-template name="decode-difficulty">
                <xsl:with-param name="text" select="./difficulties-column/difficulty-type" />
                <xsl:with-param name="pattern" select="'05'"/>
              </xsl:call-template>
            </td>
          </tr>
          <tr class="zebra{position() mod 2}">
            <td colspan="5" class="center-text">
              <xsl:value-of select="./status-column/reference"/>
            </td>
            <td colspan="6" rowspan="2" class="center-text">
              <xsl:value-of select="./difficulties-column/comment"/>
            </td>
          </tr>
          <tr class="zebra{position() mod 2}">
            <td colspan="5" class="center-text">
              <xsl:value-of select="./status-column/comment"/>
            </td>
          </tr>
        </xsl:for-each>  
      </tbody>
    </table>
  </xsl:template>
  
  <!-- REPORT / PART II -->
  <xsl:template match="agreements">
    <h2 class="underline"><xsl:value-of select="$labels/label[@id='p2-title']"/></h2>
    <p>
      <xsl:value-of select="$labels/label[@id='p2-description']"/>
    </p>
    <table border="1" cellpadding="1" cellspacing="0" class="datatable">
      <caption>
        <xsl:value-of select="$labels/label[@id='p2-t1-caption']"/>
      </caption>
      <thead>
        <tr>
          <th><xsl:value-of select="$labels/label[@id='p2-t1-col1']"/></th>
          <th><xsl:value-of select="$labels/label[@id='p2-t1-col2']"/></th>
          <th><xsl:value-of select="$labels/label[@id='p2-t1-col3']"/></th>
          <th><xsl:value-of select="$labels/label[@id='p2-t1-col4']"/></th>
          <th><xsl:value-of select="$labels/label[@id='p2-t1-col5']"/></th>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
      </thead>
      <tbody>
        <xsl:for-each select="*">
          <tr class="zebra{position() mod 2}">
            <td class="center-text">
              <xsl:value-of select="position()"/>
            </td>
            <td>
              <xsl:value-of select="./title"/>
            </td>
            <td>
              <xsl:value-of select="./parties"/>
            </td>
            <td>
              <xsl:value-of select="./date"/>
            </td>
            <td>
              <xsl:value-of select="./subject"/>
            </td>
          </tr>
        </xsl:for-each>
      </tbody>
    </table>
  </xsl:template>
  
  <!-- REPORT / PART III -->
  <xsl:template match="legal-instruments">
    <h2 class="underline"><xsl:value-of select="$labels/label[@id='p3-title']"/></h2>
    <p>
      <xsl:value-of select="$labels/label[@id='p3-description']"/>
    </p>
    <table border="1" cellpadding="1" cellspacing="0" class="datatable">
      <caption>
        <xsl:value-of select="$labels/label[@id='p3-t1-caption']"/>
      </caption>
      <thead>
        <tr>
          <th><xsl:value-of select="$labels/label[@id='p3-t1-col1']"/></th>
          <th><xsl:value-of select="$labels/label[@id='p3-t1-col2']"/></th>
          <th><xsl:value-of select="$labels/label[@id='p3-t1-col3']"/></th>
          <th><xsl:value-of select="$labels/label[@id='p3-t1-col4']"/></th>
          <th><xsl:value-of select="$labels/label[@id='p3-t1-col5']"/></th>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
      </thead>
      <tbody>
        <xsl:for-each select="*">
          <tr class="zebra{position() mod 2}">
            <td class="center-text"><xsl:value-of select="position()"/></td>
            <td><xsl:value-of select="./title"/></td>
            <td><xsl:value-of select="./date"/></td>
            <td><xsl:value-of select="./comments"/></td>
            <td class="center-text">
              <xsl:if test="./ticking-box = 'Yes'">X</xsl:if>
            </td>
          </tr>
        </xsl:for-each>
      </tbody>
    </table>
  </xsl:template>
  
  <!-- REPORT / PART IV -->  
  <xsl:template match="legal-measures">
    <h2 class="underline"><xsl:value-of select="$labels/label[@id='p4-title']"/></h2>
    <p>
      <strong>
        <xsl:value-of select="$labels/label[@id='p4-q1']"/>
      </strong>
    </p>
    <table border="1" cellpadding="1" cellspacing="0" class="datatable">
      <caption>
        <xsl:value-of select="$labels/label[@id='p4-t1-caption']"/>
      </caption>
      <thead>
        <tr>
          <th rowspan="2"><xsl:value-of select="$labels/label[@id='p4-t1-col1']"/></th>
          <th rowspan="2"><xsl:value-of select="$labels/label[@id='number']"/></th>
          <th rowspan="2"><xsl:value-of select="$labels/label[@id='p4-t1-col3']"/></th>
          <th colspan="5">
            <xsl:value-of select="$labels/label[@id='status']"/>
            <br />
            <em><xsl:value-of select="$labels/label[@id='tick-answer']"/></em>
          </th>
          <th colspan="6">
            <xsl:value-of select="$labels/label[@id='difficulties']"/>
            <br />
            <em><xsl:value-of select="$labels/label[@id='tick-answers']"/></em>
          </th>
        </tr>
        <tr>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='status-yes']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='status-no']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='status-dev']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='status-other']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='status-na']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='diff-policy']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='diff-regul']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='diff-finance']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='diff-admin']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='diff-tech']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='diff-public']"/></td>
        </tr>
      </thead>
      <tbody>
        <xsl:for-each select="table/*">
          <xsl:variable name="ralabel" select="concat('p4-t1-ra-row', position())" />
          <xsl:variable name="odlabel" select="concat('p4-t1-od-row', position())" />
        
          <tr class="zebra{position() mod 2}">
            <td rowspan="3" class="vertical-text"><xsl:value-of select="$labels/label[@id=$ralabel]"/></td>
            <td rowspan="3" class="center-text"><xsl:value-of select="position()"/></td>
            <td rowspan="3"><xsl:value-of select="$labels/label[@id=$odlabel]"/></td>
            <td class="check-column">
              <xsl:if test="./status-column/status-type = 00">X</xsl:if>
              <xsl:if test="./status-column/status-type != 00">&nbsp;</xsl:if>
            </td>
            <td class="check-column">
              <xsl:if test="./status-column/status-type = 01">X</xsl:if>
              <xsl:if test="./status-column/status-type != 01">&nbsp;</xsl:if>
            </td>
            <td class="check-column">
              <xsl:if test="./status-column/status-type = 02">X</xsl:if>
              <xsl:if test="./status-column/status-type != 02">&nbsp;</xsl:if>
            </td>
            <td class="check-column">
              <xsl:if test="./status-column/status-type = 03">X</xsl:if>
              <xsl:if test="./status-column/status-type != 03">&nbsp;</xsl:if>
            </td>
            <td class="check-column">
              <xsl:if test="./status-column/status-type = 04">X</xsl:if>
              <xsl:if test="./status-column/status-type != 04">&nbsp;</xsl:if>
            </td>
            <td class="check-column">
              <xsl:call-template name="decode-difficulty">
                <xsl:with-param name="text" select="./difficulties-column/difficulty-type" />
                <xsl:with-param name="pattern" select="'00'"/>
              </xsl:call-template>
            </td>
            <td class="check-column">
              <xsl:call-template name="decode-difficulty">
                <xsl:with-param name="text" select="./difficulties-column/difficulty-type" />
                <xsl:with-param name="pattern" select="'01'"/>
              </xsl:call-template>
            </td>
            <td class="check-column">
              <xsl:call-template name="decode-difficulty">
                <xsl:with-param name="text" select="./difficulties-column/difficulty-type" />
                <xsl:with-param name="pattern" select="'02'"/>
              </xsl:call-template>
            </td>
            <td class="check-column">
              <xsl:call-template name="decode-difficulty">
                <xsl:with-param name="text" select="./difficulties-column/difficulty-type" />
                <xsl:with-param name="pattern" select="'03'"/>
              </xsl:call-template>
            </td>
            <td class="check-column">
              <xsl:call-template name="decode-difficulty">
                <xsl:with-param name="text" select="./difficulties-column/difficulty-type" />
                <xsl:with-param name="pattern" select="'04'"/>
              </xsl:call-template>
            </td>
            <td class="check-column">
              <xsl:call-template name="decode-difficulty">
                <xsl:with-param name="text" select="./difficulties-column/difficulty-type" />
                <xsl:with-param name="pattern" select="'05'"/>
              </xsl:call-template>
            </td>
          </tr>
          <tr class="zebra{position() mod 2}">
            <td colspan="5" class="center-text">
              <xsl:value-of select="./status-column/reference"/>
            </td>
            <td colspan="6" rowspan="2" class="center-text">
              <xsl:value-of select="./difficulties-column/comment"/>
            </td>
          </tr>
          <tr class="zebra{position() mod 2}">
            <td colspan="5" class="center-text">
              <xsl:value-of select="./status-column/comment"/>
            </td>
          </tr>
        </xsl:for-each>  
      </tbody>
    </table>
  </xsl:template>
  
  <!-- REPORT / PART V -->  
  <xsl:template match="policy-measures">
    <h2 class="underline"><xsl:value-of select="$labels/label[@id='p5-title']"/></h2>
    <p>
      <strong>
        <xsl:value-of select="$labels/label[@id='p5-q1']"/>
      </strong>
    </p>
    <table border="1" cellpadding="1" cellspacing="0" class="datatable">
      <caption>
        <xsl:value-of select="$labels/label[@id='p5-t1-caption']"/>
      </caption>
      <thead>
        <tr>
          <th rowspan="2"><xsl:value-of select="$labels/label[@id='p5-t1-col1']"/></th>
          <th rowspan="2"><xsl:value-of select="$labels/label[@id='number']"/></th>
          <th rowspan="2"><xsl:value-of select="$labels/label[@id='p5-t1-col3']"/></th>
          <th colspan="5">
            <xsl:value-of select="$labels/label[@id='status']"/>
            <br />
            <em><xsl:value-of select="$labels/label[@id='tick-answer']"/></em>
          </th>
          <th colspan="6">
            <xsl:value-of select="$labels/label[@id='difficulties']"/>
            <br />
            <em><xsl:value-of select="$labels/label[@id='tick-answers']"/></em>
          </th>
        </tr>
        <tr>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='status-yes']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='status-no']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='status-dev']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='status-other']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='status-na']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='diff-policy']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='diff-regul']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='diff-finance']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='diff-admin']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='diff-tech']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='diff-public']"/></td>
        </tr>
      </thead>
      <tbody>
        <xsl:for-each select="table/*">
          <xsl:variable name="mdlabel" select="concat('p5-t1-md-row', position())" />
          <tr class="zebra{position() mod 2}">
            <td rowspan="3" class="vertical-text"><xsl:value-of select="$labels/label[@id='p5-t1-ra']"/></td>
            <td rowspan="3" class="center-text"><xsl:value-of select="position()"/></td>
            <td rowspan="3"><xsl:value-of select="$labels/label[@id=$mdlabel]"/></td>
            <td class="check-column">
              <xsl:if test="./status-column/status-type = 00">X</xsl:if>
              <xsl:if test="./status-column/status-type != 00">&nbsp;</xsl:if>
            </td>
            <td class="check-column">
              <xsl:if test="./status-column/status-type = 01">X</xsl:if>
              <xsl:if test="./status-column/status-type != 01">&nbsp;</xsl:if>
            </td>
            <td class="check-column">
              <xsl:if test="./status-column/status-type = 02">X</xsl:if>
              <xsl:if test="./status-column/status-type != 02">&nbsp;</xsl:if>
            </td>
            <td class="check-column">
              <xsl:if test="./status-column/status-type = 03">X</xsl:if>
              <xsl:if test="./status-column/status-type != 03">&nbsp;</xsl:if>
            </td>
            <td class="check-column">
              <xsl:if test="./status-column/status-type = 04">X</xsl:if>
              <xsl:if test="./status-column/status-type != 04">&nbsp;</xsl:if>
            </td>
            <td class="check-column">
              <xsl:call-template name="decode-difficulty">
                <xsl:with-param name="text" select="./difficulties-column/difficulty-type" />
                <xsl:with-param name="pattern" select="'00'"/>
              </xsl:call-template>
            </td>
            <td class="check-column">
              <xsl:call-template name="decode-difficulty">
                <xsl:with-param name="text" select="./difficulties-column/difficulty-type" />
                <xsl:with-param name="pattern" select="'01'"/>
              </xsl:call-template>
            </td>
            <td class="check-column">
              <xsl:call-template name="decode-difficulty">
                <xsl:with-param name="text" select="./difficulties-column/difficulty-type" />
                <xsl:with-param name="pattern" select="'02'"/>
              </xsl:call-template>
            </td>
            <td class="check-column">
              <xsl:call-template name="decode-difficulty">
                <xsl:with-param name="text" select="./difficulties-column/difficulty-type" />
                <xsl:with-param name="pattern" select="'03'"/>
              </xsl:call-template>
            </td>
            <td class="check-column">
              <xsl:call-template name="decode-difficulty">
                <xsl:with-param name="text" select="./difficulties-column/difficulty-type" />
                <xsl:with-param name="pattern" select="'04'"/>
              </xsl:call-template>
            </td>
            <td class="check-column">
              <xsl:call-template name="decode-difficulty">
                <xsl:with-param name="text" select="./difficulties-column/difficulty-type" />
                <xsl:with-param name="pattern" select="'05'"/>
              </xsl:call-template>
            </td>
          </tr>
          <tr class="zebra{position() mod 2}">
            <td colspan="5" class="center-text">
              <xsl:value-of select="./status-column/reference"/>
            </td>
            <td colspan="6" rowspan="2" class="center-text">
              <xsl:value-of select="./difficulties-column/comment"/>
            </td>
          </tr>
          <tr class="zebra{position() mod 2}">
            <td colspan="5" class="center-text">
              <xsl:value-of select="./status-column/comment"/>
            </td>
          </tr>
        </xsl:for-each>  
      </tbody>
    </table>
  </xsl:template>
  
  <!-- REPORT / PART VI -->  
  <xsl:template match="resources-allocation">
    <h2 class="underline"><xsl:value-of select="$labels/label[@id='p6-title']"/></h2>
    <p>
      <strong>
        <xsl:value-of select="$labels/label[@id='p6-q1']"/>
      </strong>
    </p>
    <table border="1" cellpadding="1" cellspacing="0" class="datatable">
      <caption><xsl:value-of select="$labels/label[@id='p6-t1-caption']"/></caption>
      <thead>
        <tr>
          <th rowspan="2"><xsl:value-of select="$labels/label[@id='p6-t1-col1']"/></th>
          <th rowspan="2"><xsl:value-of select="$labels/label[@id='number']"/></th>
          <th rowspan="2"><xsl:value-of select="$labels/label[@id='p6-t1-col3']"/></th>
          <th colspan="5">
            <xsl:value-of select="$labels/label[@id='status']"/>
            <br />
            <em><xsl:value-of select="$labels/label[@id='tick-answer']"/></em>
          </th>
          <th colspan="6">
            <xsl:value-of select="$labels/label[@id='difficulties']"/>
            <br />
            <em><xsl:value-of select="$labels/label[@id='tick-answers']"/></em>
          </th>
        </tr>
        <tr>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='status-yes']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='status-no']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='status-dev']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='status-other']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='status-na']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='diff-policy']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='diff-regul']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='diff-finance']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='diff-admin']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='diff-tech']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='diff-public']"/></td>
        </tr>
      </thead>
      <tbody>
        <xsl:for-each select="table/*">
          <xsl:variable name="ralabel" select="concat('p6-t1-ra-row', position())" />
          <xsl:variable name="mdlabel" select="concat('p6-t1-md-row', position())" />
          <tr class="zebra{position() mod 2}">
            <td rowspan="3" class="vertical-text"><xsl:value-of select="$labels/label[@id=$ralabel]"/></td>
            <td rowspan="3" class="center-text"><xsl:value-of select="position()"/></td>
            <td rowspan="3"><xsl:value-of select="$labels/label[@id=$mdlabel]"/></td>
            <td class="check-column">
              <xsl:if test="./status-column/status-type = 00">X</xsl:if>
              <xsl:if test="./status-column/status-type != 00">&nbsp;</xsl:if>
            </td>
            <td class="check-column">
              <xsl:if test="./status-column/status-type = 01">X</xsl:if>
              <xsl:if test="./status-column/status-type != 01">&nbsp;</xsl:if>
            </td>
            <td class="check-column">
              <xsl:if test="./status-column/status-type = 02">X</xsl:if>
              <xsl:if test="./status-column/status-type != 02">&nbsp;</xsl:if>
            </td>
            <td class="check-column">
              <xsl:if test="./status-column/status-type = 03">X</xsl:if>
              <xsl:if test="./status-column/status-type != 03">&nbsp;</xsl:if>
            </td>
            <td class="check-column">
              <xsl:if test="./status-column/status-type = 04">X</xsl:if>
              <xsl:if test="./status-column/status-type != 04">&nbsp;</xsl:if>
            </td>
            <td class="check-column">
              <xsl:call-template name="decode-difficulty">
                <xsl:with-param name="text" select="./difficulties-column/difficulty-type" />
                <xsl:with-param name="pattern" select="'00'"/>
              </xsl:call-template>
            </td>
            <td class="check-column">
              <xsl:call-template name="decode-difficulty">
                <xsl:with-param name="text" select="./difficulties-column/difficulty-type" />
                <xsl:with-param name="pattern" select="'01'"/>
              </xsl:call-template>
            </td>
            <td class="check-column">
              <xsl:call-template name="decode-difficulty">
                <xsl:with-param name="text" select="./difficulties-column/difficulty-type" />
                <xsl:with-param name="pattern" select="'02'"/>
              </xsl:call-template>
            </td>
            <td class="check-column">
              <xsl:call-template name="decode-difficulty">
                <xsl:with-param name="text" select="./difficulties-column/difficulty-type" />
                <xsl:with-param name="pattern" select="'03'"/>
              </xsl:call-template>
            </td>
            <td class="check-column">
              <xsl:call-template name="decode-difficulty">
                <xsl:with-param name="text" select="./difficulties-column/difficulty-type" />
                <xsl:with-param name="pattern" select="'04'"/>
              </xsl:call-template>
            </td>
            <td class="check-column">
              <xsl:call-template name="decode-difficulty">
                <xsl:with-param name="text" select="./difficulties-column/difficulty-type" />
                <xsl:with-param name="pattern" select="'05'"/>
              </xsl:call-template>
            </td>
          </tr>
          <tr class="zebra{position() mod 2}">
            <td colspan="5" class="center-text">
              <xsl:value-of select="./status-column/reference"/>
            </td>
            <td colspan="6" rowspan="2" class="center-text">
              <xsl:value-of select="./difficulties-column/comment"/>
            </td>
          </tr>
          <tr class="zebra{position() mod 2}">
            <td colspan="5" class="center-text">
              <xsl:value-of select="./status-column/comment"/>
            </td>
          </tr>
        </xsl:for-each>  
      </tbody>
    </table>
  </xsl:template>
  
  <!-- REPORT / PART VII -->  
  <xsl:template match="other-measures">
    <h2 class="underline"><xsl:value-of select="$labels/label[@id='p7-title']"/></h2>
    <p>
      <strong>
        <xsl:value-of select="$labels/label[@id='p7-q1']"/>
      </strong>
    </p>
    <table border="1" cellpadding="1" cellspacing="0" class="datatable">
      <caption>
        <xsl:value-of select="$labels/label[@id='p7-t1-caption']"/>
      </caption>
      <thead>
        <tr>
          <th rowspan="2"><xsl:value-of select="$labels/label[@id='p7-t1-col1']"/></th>
          <th rowspan="2"><xsl:value-of select="$labels/label[@id='number']"/></th>
          <th rowspan="2"><xsl:value-of select="$labels/label[@id='p7-t1-col3']"/></th>
          <th colspan="5">
            <xsl:value-of select="$labels/label[@id='status']"/>
            <br />
            <em><xsl:value-of select="$labels/label[@id='tick-answer']"/></em>
          </th>
          <th colspan="6">
            <xsl:value-of select="$labels/label[@id='difficulties']"/>
            <br />
            <em><xsl:value-of select="$labels/label[@id='tick-answers']"/></em>
          </th>
        </tr>
        <tr>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='status-yes']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='status-no']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='status-dev']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='status-other']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='status-na']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='diff-policy']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='diff-regul']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='diff-finance']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='diff-admin']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='diff-tech']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='diff-public']"/></td>
        </tr>
      </thead>
      <tbody>
        <xsl:for-each select="table/*">
          <xsl:variable name="ralabel" select="concat('p7-t1-ra-row', position())" />
          <xsl:variable name="mdlabel" select="concat('p7-t1-md-row', position())" />
          <tr class="zebra{position() mod 2}">
            <td rowspan="3" class="vertical-text"><xsl:value-of select="$labels/label[@id=$ralabel]"/></td>
            <td rowspan="3" class="center-text"><xsl:value-of select="position()"/></td>
            <td rowspan="3"><xsl:value-of select="$labels/label[@id=$mdlabel]"/></td>
            <td class="check-column">
              <xsl:if test="./status-column/status-type = 00">X</xsl:if>
              <xsl:if test="./status-column/status-type != 00">&nbsp;</xsl:if>
            </td>
            <td class="check-column">
              <xsl:if test="./status-column/status-type = 01">X</xsl:if>
              <xsl:if test="./status-column/status-type != 01">&nbsp;</xsl:if>
            </td>
            <td class="check-column">
              <xsl:if test="./status-column/status-type = 02">X</xsl:if>
              <xsl:if test="./status-column/status-type != 02">&nbsp;</xsl:if>
            </td>
            <td class="check-column">
              <xsl:if test="./status-column/status-type = 03">X</xsl:if>
              <xsl:if test="./status-column/status-type != 03">&nbsp;</xsl:if>
            </td>
            <td class="check-column">
              <xsl:if test="./status-column/status-type = 04">X</xsl:if>
              <xsl:if test="./status-column/status-type != 04">&nbsp;</xsl:if>
            </td>
            <td class="check-column">
              <xsl:call-template name="decode-difficulty">
                <xsl:with-param name="text" select="./difficulties-column/difficulty-type" />
                <xsl:with-param name="pattern" select="'00'"/>
              </xsl:call-template>
            </td>
            <td class="check-column">
              <xsl:call-template name="decode-difficulty">
                <xsl:with-param name="text" select="./difficulties-column/difficulty-type" />
                <xsl:with-param name="pattern" select="'01'"/>
              </xsl:call-template>
            </td>
            <td class="check-column">
              <xsl:call-template name="decode-difficulty">
                <xsl:with-param name="text" select="./difficulties-column/difficulty-type" />
                <xsl:with-param name="pattern" select="'02'"/>
              </xsl:call-template>
            </td>
            <td class="check-column">
              <xsl:call-template name="decode-difficulty">
                <xsl:with-param name="text" select="./difficulties-column/difficulty-type" />
                <xsl:with-param name="pattern" select="'03'"/>
              </xsl:call-template>
            </td>
            <td class="check-column">
              <xsl:call-template name="decode-difficulty">
                <xsl:with-param name="text" select="./difficulties-column/difficulty-type" />
                <xsl:with-param name="pattern" select="'04'"/>
              </xsl:call-template>
            </td>
            <td class="check-column">
              <xsl:call-template name="decode-difficulty">
                <xsl:with-param name="text" select="./difficulties-column/difficulty-type" />
                <xsl:with-param name="pattern" select="'05'"/>
              </xsl:call-template>
            </td>
          </tr>
          <tr class="zebra{position() mod 2}">
            <td colspan="5" class="center-text">
              <xsl:value-of select="./status-column/reference"/>
            </td>
            <td colspan="6" rowspan="2" class="center-text">
              <xsl:value-of select="./difficulties-column/comment"/>
            </td>
          </tr>
          <tr class="zebra{position() mod 2}">
            <td colspan="5" class="center-text">
              <xsl:value-of select="./status-column/comment"/>
            </td>
          </tr>
        </xsl:for-each>  
      </tbody>
    </table>
  </xsl:template>
</xsl:stylesheet>