View stylesheet

XML schemas http://biodiversity.eionet.europa.eu/schemas/barcelona_convention/prevention.xsd
Output type HTML
Description XSL for Prevention and Emergency Protocol
XSL file prevention.xslt (Last modified: 27 May 2008 12:18 )
<?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,'prevention-labels-en.xml'))"/>
  <xsl:variable name="labels" select="$labels_xml/labels"/>
  
  <xsl:template match="prevention">
    <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;
}
]]>       </style> 
        <title>Prevention and Emergency Protocol</title>
      </head>
      <body>
        <h1><xsl:value-of select="$labels/label[@id='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">
    <xsl:apply-templates select="ratification-status"/>
    <br />
    <xsl:apply-templates select="legal-measures"/>
    <br />
    <xsl:apply-templates select="technical-measures"/>
    <br />
    <xsl:apply-templates select="spill-incidents"/>
    <br />
    <xsl:apply-templates select="effectiveness"/>
    <br />
  </xsl:template>
  
  <xsl:template match="ratification-status">
    <h2><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-t1-caption']"/>
      </caption>
      <thead>
        <tr>
          <th rowspan="2"><xsl:value-of select="$labels/label[@id='p1-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='p1-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/*">
          <tr class="zebra{position() mod 2}">
            <xsl:variable name="relart" select="concat(concat('p1-t1-row', position()), '-ra')" />
            <xsl:variable name="descob" select="concat(concat('p1-t1-row', position()), '-od')" />
            <td rowspan="3"><xsl:value-of select="$labels/label[@id=$relart]"/></td>
            <td rowspan="3" class="center-text"><xsl:value-of select="position()"/></td>
            <td rowspan="3"><xsl:value-of select="$labels/label[@id=$descob]"/></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>
    <br />
    <br />
    <table border="1" cellpadding="1" cellspacing="0" class="datatable">
      <caption>
        <xsl:value-of select="$labels/label[@id='p1-t2-caption']"/>
      </caption>
      <thead>
        <tr>
          <th rowspan="2"><xsl:value-of select="$labels/label[@id='p1-t2-col1']"/></th>
          <th rowspan="2"><xsl:value-of select="$labels/label[@id='number']"/></th>
          <th rowspan="2"><xsl:value-of select="$labels/label[@id='p1-t2-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="table2/*">
          <tr class="zebra{position() mod 2}">
            <xsl:variable name="relart" select="concat(concat('p1-t2-row', position()), '-ra')" />
            <xsl:variable name="descob" select="concat(concat('p1-t2-row', position()), '-od')" />
            <td rowspan="3"><xsl:value-of select="$labels/label[@id=$relart]"/></td>
            <td rowspan="3" class="center-text"><xsl:value-of select="position()"/></td>
            <td rowspan="3"><xsl:value-of select="$labels/label[@id=$descob]"/></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>
    <br />
    <br />
    <table border="1" cellpadding="1" cellspacing="0" class="datatable">
      <caption>
        <xsl:value-of select="$labels/label[@id='p1-t3-caption']"/>
      </caption>
      <thead>
        <tr>
          <th rowspan="2"><xsl:value-of select="$labels/label[@id='p1-t3-col1']"/></th>
          <th rowspan="2"><xsl:value-of select="$labels/label[@id='number']"/></th>
          <th rowspan="2"><xsl:value-of select="$labels/label[@id='p1-t3-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="table3/*">
          <tr class="zebra{position() mod 2}">
            <xsl:variable name="relart" select="concat(concat('p1-t3-row', position()), '-ra')" />
            <xsl:variable name="descob" select="concat(concat('p1-t3-row', position()), '-od')" />
            <td rowspan="3"><xsl:value-of select="$labels/label[@id=$relart]"/></td>
            <td rowspan="3" class="center-text"><xsl:value-of select="position()"/></td>
            <td rowspan="3"><xsl:value-of select="$labels/label[@id=$descob]"/></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:template match="legal-measures">
    <h2><xsl:value-of select="$labels/label[@id='p2-title']"/></h2>
    <p>
      <strong>
        <xsl:value-of select="$labels/label[@id='p2-q1']"/>
      </strong>
    </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 rowspan="2"><xsl:value-of select="$labels/label[@id='p2-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='p2-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/*">
          <tr class="zebra{position() mod 2}">
            <xsl:variable name="relart" select="concat(concat('p2-t1-row', position()), '-ra')" />
            <xsl:variable name="descob" select="concat(concat('p2-t1-row', position()), '-od')" />
            <td rowspan="3"><xsl:value-of select="$labels/label[@id=$relart]"/></td>
            <td rowspan="3" class="center-text"><xsl:value-of select="position()"/></td>
            <td rowspan="3"><xsl:value-of select="$labels/label[@id=$descob]"/></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:template match="technical-measures">
    <h2><xsl:value-of select="$labels/label[@id='p3-title']"/></h2>
    <p>
      <strong>
        <xsl:value-of select="$labels/label[@id='p3-q1']"/>
      </strong>
    </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='number']"/></th>
          <th><xsl:value-of select="$labels/label[@id='p3-t1-col3']"/></th>
          <th colspan="5"><xsl:value-of select="$labels/label[@id='p3-t1-col4']"/></th>
        </tr>
      </thead>
      <tbody>
        <!-- ROW 1 -->
        <tr>
          <td rowspan="8"><xsl:value-of select="$labels/label[@id='p3-t1-art4']"/></td>
          <td rowspan="2">1</td>
          <td rowspan="2"><xsl:value-of select="$labels/label[@id='p3-t1-row1-od']"/></td>
          <td><xsl:value-of select="$labels/label[@id='p3-t1-row1-yes']"/></td>
          <td><xsl:value-of select="$labels/label[@id='status-no']"/></td>
          <td><xsl:value-of select="$labels/label[@id='p3-t1-prep']"/></td>
          <td><xsl:value-of select="$labels/label[@id='p3-t1-adopt']"/></td>
          <td><xsl:value-of select="$labels/label[@id='p3-t1-rev']"/></td>
        </tr>
        <tr>
          <td class="check-column">
            <xsl:if test="./table5/response-strategy/answer = 00">
              X
              <br />
              <xsl:value-of select="./table5/response-strategy/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/response-strategy/answer != 00">&nbsp;</xsl:if>
          </td>
          <td class="check-column">
            <xsl:if test="./table5/response-strategy/answer = 01">
              X
              <br />
              <xsl:value-of select="./table5/response-strategy/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/response-strategy/answer != 01">&nbsp;</xsl:if>
          </td>
          <td class="check-column">
            <xsl:if test="./table5/response-strategy/answer = 02">
              X
              <br />
              <xsl:value-of select="./table5/response-strategy/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/response-strategy/answer != 02">&nbsp;</xsl:if>
          </td>
          <td class="check-column">
            <xsl:if test="./table5/response-strategy/answer = 03">
              X
              <br />
              <xsl:value-of select="./table5/response-strategy/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/response-strategy/answer != 03">&nbsp;</xsl:if>
          </td>
          <td class="check-column">
            <xsl:if test="./table5/response-strategy/answer = 04">
              X
              <br />
              <xsl:value-of select="./table5/response-strategy/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/response-strategy/answer != 04">&nbsp;</xsl:if>
          </td>
        </tr>
        <!-- ROW 2-->
        <tr>
          <td rowspan="2">2</td>
          <td rowspan="2"><xsl:value-of select="$labels/label[@id='p3-t1-row2-od']"/></td>
          <td><xsl:value-of select="$labels/label[@id='p3-t1-row2-oil']"/></td>
          <td colspan="3"><xsl:value-of select="$labels/label[@id='p3-t1-row2-hns']"/></td>
          <td><xsl:value-of select="$labels/label[@id='p3-t1-row2-both']"/></td>
        </tr>
        <tr>
          <td class="check-column">
            <xsl:if test="./table5/ncp-substances/answer = 00">
              X
              <br />
              <xsl:value-of select="./table5/ncp-substances/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/ncp-substances/answer != 00">&nbsp;</xsl:if>
          </td>
          <td class="check-column" colspan="3">
            <xsl:if test="./table5/ncp-substances/answer = 01">
              X
              <br />
              <xsl:value-of select="./table5/ncp-substances/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/ncp-substances/answer != 01">&nbsp;</xsl:if>
          </td>
          <td class="check-column">
            <xsl:if test="./table5/ncp-substances/answer = 02">
              X
              <br />
              <xsl:value-of select="./table5/ncp-substances/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/ncp-substances/answer != 02">&nbsp;</xsl:if>
          </td>
        </tr>
        <!-- ROW 3-->
        <tr>
          <td rowspan="2">3</td>
          <td rowspan="2"><xsl:value-of select="$labels/label[@id='p3-t1-row3-od']"/></td>
          <td><xsl:value-of select="$labels/label[@id='p3-t1-row1-yes']"/></td>
          <td class="check-column" colspan="4">
            <xsl:if test="./table5/anti-pollution-equipment-stockpile/answer = 'Yes'">
              X
              <br />
              <xsl:value-of select="./table5/anti-pollution-equipment-stockpile/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/anti-pollution-equipment-stockpile/answer != 'Yes'">&nbsp;</xsl:if>
          </td>
        </tr>
        <tr>
          <td><xsl:value-of select="$labels/label[@id='p3-t1-row3-no']"/></td>
          <td class="check-column" colspan="4">
            <xsl:if test="./table5/anti-pollution-equipment-stockpile/answer = 'No'">
              X
              <br />
              <xsl:value-of select="./table5/anti-pollution-equipment-stockpile/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/anti-pollution-equipment-stockpile/answer != 'No'">&nbsp;</xsl:if>
          </td>
        </tr>
        <!-- ROW 4 -->
        <tr>
          <td rowspan="2">4</td>
          <td rowspan="2"><xsl:value-of select="$labels/label[@id='p3-t1-row4-od']"/></td>
          <td><xsl:value-of select="$labels/label[@id='p3-t1-row4-yes']"/></td>
          <td colspan="3"><xsl:value-of select="$labels/label[@id='status-no']"/></td>
          <td><xsl:value-of select="$labels/label[@id='p3-t1-planned']"/></td>
        </tr>
        <tr>
          <td class="check-column">
            <xsl:if test="./table5/exercices/answer = 00">
              X
              <br />
              <xsl:value-of select="./table5/exercices/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/exercices/answer != 00">&nbsp;</xsl:if>
          </td>
          <td class="check-column" colspan="3">
            <xsl:if test="./table5/exercices/answer = 01">
              X
              <br />
              <xsl:value-of select="./table5/exercices/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/exercices/answer != 01">&nbsp;</xsl:if>
          </td>
          <td class="check-column">
            <xsl:if test="./table5/exercices/answer = 02">
              X
              <br />
              <xsl:value-of select="./table5/exercices/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/exercices/answer != 02">&nbsp;</xsl:if>
          </td>
        </tr>
        <!-- ROW 5 -->
        <tr>
          <td rowspan="12"><xsl:value-of select="$labels/label[@id='p3-t1-art11']"/></td>
          <td rowspan="2">5</td>
          <td rowspan="2"><xsl:value-of select="$labels/label[@id='p3-t1-row5-od']"/></td>
          <td><xsl:value-of select="$labels/label[@id='p3-t1-row5-yes']"/></td>
          <td colspan="3"><xsl:value-of select="$labels/label[@id='status-no']"/></td>
          <td><xsl:value-of select="$labels/label[@id='p3-t1-prep']"/></td>
        </tr>
        <tr>
          <td class="check-column">
            <xsl:if test="./table5/local-port-contingency-plan/answer = 00">
              X
              <br />
              <xsl:value-of select="./table5/local-port-contingency-plan/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/local-port-contingency-plan/answer != 00">&nbsp;</xsl:if>
          </td>
          <td class="check-column" colspan="3">
            <xsl:if test="./table5/local-port-contingency-plan/answer = 01">
              X
              <br />
              <xsl:value-of select="./table5/local-port-contingency-plan/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/local-port-contingency-plan/answer != 01">&nbsp;</xsl:if>
          </td>
          <td class="check-column">
            <xsl:if test="./table5/local-port-contingency-plan/answer = 02">
              X
              <br />
              <xsl:value-of select="./table5/local-port-contingency-plan/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/local-port-contingency-plan/answer != 02">&nbsp;</xsl:if>
          </td>
        </tr>
        <!-- ROW 6 -->
        <tr>
          <td rowspan="2">6</td>
          <td rowspan="2"><xsl:value-of select="$labels/label[@id='p3-t1-row6-od']"/></td>
          <td><xsl:value-of select="$labels/label[@id='status-yes']"/></td>
          <td colspan="3"><xsl:value-of select="$labels/label[@id='status-no']"/></td>
          <td><xsl:value-of select="$labels/label[@id='p3-t1-integ']"/></td>
        </tr>
        <tr>
          <td class="check-column">
            <xsl:if test="./table5/local-plan-integrated-ncp/answer = 00">
              X
              <br />
              <xsl:value-of select="./table5/local-plan-integrated-ncp/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/local-plan-integrated-ncp/answer != 00">&nbsp;</xsl:if>
          </td>
          <td class="check-column" colspan="3">
            <xsl:if test="./table5/local-plan-integrated-ncp/answer = 01">
              X
              <br />
              <xsl:value-of select="./table5/local-plan-integrated-ncp/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/local-plan-integrated-ncp/answer != 01">&nbsp;</xsl:if>
          </td>
          <td class="check-column">
            <xsl:if test="./table5/local-plan-integrated-ncp/answer = 02">
              X
              <br />
              <xsl:value-of select="./table5/local-plan-integrated-ncp/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/local-plan-integrated-ncp/answer != 02">&nbsp;</xsl:if>
          </td>
        </tr>
        <!-- ROW 7 -->
        <tr>
          <td rowspan="2">7</td>
          <td rowspan="2"><xsl:value-of select="$labels/label[@id='p3-t1-row7-od']"/></td>
          <td><xsl:value-of select="$labels/label[@id='status-yes']"/></td>
          <td colspan="3"><xsl:value-of select="$labels/label[@id='status-no']"/></td>
          <td><xsl:value-of select="$labels/label[@id='p3-t1-integ']"/></td>
        </tr>
        <tr>
          <td class="check-column">
            <xsl:if test="./table5/local-plan-integrated-industry/answer = 00">
              X
              <br />
              <xsl:value-of select="./table5/local-plan-integrated-industry/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/local-plan-integrated-industry/answer != 00">&nbsp;</xsl:if>
          </td>
          <td class="check-column" colspan="3">
            <xsl:if test="./table5/local-plan-integrated-industry/answer = 01">
              X
              <br />
              <xsl:value-of select="./table5/local-plan-integrated-industry/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/local-plan-integrated-industry/answer != 01">&nbsp;</xsl:if>
          </td>
          <td class="check-column">
            <xsl:if test="./table5/local-plan-integrated-industry/answer = 02">
              X
              <br />
              <xsl:value-of select="./table5/local-plan-integrated-industry/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/local-plan-integrated-industry/answer != 02">&nbsp;</xsl:if>
          </td>
        </tr>
        <!-- ROW 8 -->
        <tr>
          <td rowspan="2">8</td>
          <td rowspan="2"><xsl:value-of select="$labels/label[@id='p3-t1-row8-od']"/></td>
          <td><xsl:value-of select="$labels/label[@id='status-yes']"/></td>
          <td colspan="3"><xsl:value-of select="$labels/label[@id='status-no']"/></td>
          <td><xsl:value-of select="$labels/label[@id='p3-t1-why']"/></td>
        </tr>
        <tr>
          <td class="check-column">
            <xsl:if test="./table5/ships-emergency-plan/answer = 'Yes'">X</xsl:if>
            <xsl:if test="./table5/ships-emergency-plan/answer != 'Yes'">&nbsp;</xsl:if>
          </td>
          <td class="check-column" colspan="3">
            <xsl:if test="./table5/ships-emergency-plan/answer = 'No'">X</xsl:if>
            <xsl:if test="./table5/ships-emergency-plan/answer != 'No'">&nbsp;</xsl:if>
          </td>
          <td class="check-column">
            <xsl:if test="./table5/ships-emergency-plan/answer = 'No'">
              <xsl:value-of select="./table5/ships-emergency-plan/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/ships-emergency-plan/answer != 'No'">&nbsp;</xsl:if>
          </td>
        </tr>
        <!-- ROW 9 -->
        <tr>
          <td rowspan="2">9</td>
          <td rowspan="2"><xsl:value-of select="$labels/label[@id='p3-t1-row9-od']"/></td>
          <td><xsl:value-of select="$labels/label[@id='status-yes']"/></td>
          <td colspan="3"><xsl:value-of select="$labels/label[@id='status-no']"/></td>
          <td><xsl:value-of select="$labels/label[@id='p3-t1-why']"/></td>
        </tr>
        <tr>
          <td class="check-column">
            <xsl:if test="./table5/country-requested-plan/answer = 'Yes'">X</xsl:if>
            <xsl:if test="./table5/country-requested-plan/answer != 'Yes'">&nbsp;</xsl:if>
          </td>
          <td class="check-column" colspan="3">
            <xsl:if test="./table5/country-requested-plan/answer = 'No'">X</xsl:if>
            <xsl:if test="./table5/country-requested-plan/answer != 'No'">&nbsp;</xsl:if>
          </td>
          <td class="check-column">
            <xsl:if test="./table5/country-requested-plan/answer = 'No'">
              <xsl:value-of select="./table5/country-requested-plan/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/country-requested-plan/answer != 'No'">&nbsp;</xsl:if>
          </td>
        </tr>
        <!-- ROW 10 -->
        <tr>
          <td rowspan="2">10</td>
          <td rowspan="2"><xsl:value-of select="$labels/label[@id='p3-t1-row10-od']"/></td>
          <td><xsl:value-of select="$labels/label[@id='status-yes']"/></td>
          <td colspan="3"><xsl:value-of select="$labels/label[@id='status-no']"/></td>
          <td><xsl:value-of select="$labels/label[@id='p3-t1-why']"/></td>
        </tr>
        <tr>
          <td class="check-column">
            <xsl:if test="./table5/country-requested-contingency-plan/answer = 'Yes'">X</xsl:if>
            <xsl:if test="./table5/country-requested-contingency-plan/answer != 'Yes'">&nbsp;</xsl:if>
          </td>
          <td class="check-column" colspan="3">
            <xsl:if test="./table5/country-requested-contingency-plan/answer = 'No'">X</xsl:if>
            <xsl:if test="./table5/country-requested-contingency-plan/answer != 'No'">&nbsp;</xsl:if>
          </td>
          <td class="check-column">
            <xsl:if test="./table5/country-requested-contingency-plan/answer = 'No'">
              <xsl:value-of select="./table5/country-requested-contingency-plan/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/country-requested-contingency-plan/answer != 'No'">&nbsp;</xsl:if>
          </td>
        </tr>
        <!-- Row 11 -->
        <tr>
          <td rowspan="9"><xsl:value-of select="$labels/label[@id='p3-t1-art4']"/></td>
          <td rowspan="4">11</td>
          <td rowspan="4"><xsl:value-of select="$labels/label[@id='p3-t1-row11-od']"/></td>
          <td><xsl:value-of select="$labels/label[@id='p3-t1-row11-yes']"/></td>
          <td><xsl:value-of select="$labels/label[@id='status-no']"/></td>
          <td><xsl:value-of select="$labels/label[@id='p3-t1-prep']"/></td>
          <td><xsl:value-of select="$labels/label[@id='p3-t1-adopt']"/></td>
          <td><xsl:value-of select="$labels/label[@id='p3-t1-rev']"/></td>
        </tr>
        <tr>
          <td class="check-column">
            <xsl:if test="./table5/subregional-agreements/answer = 00">
              X
              <br />
              <xsl:value-of select="./table5/subregional-agreements/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/subregional-agreements/answer != 00">&nbsp;</xsl:if>
          </td>
          <td class="check-column">
            <xsl:if test="./table5/subregional-agreements/answer = 01">
              X
              <br />
              <xsl:value-of select="./table5/subregional-agreements/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/subregional-agreements/answer != 01">&nbsp;</xsl:if>
          </td>
          <td class="check-column">
            <xsl:if test="./table5/subregional-agreements/answer = 02">
              X
              <br />
              <xsl:value-of select="./table5/subregional-agreements/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/subregional-agreements/answer != 02">&nbsp;</xsl:if>
          </td>
          <td class="check-column">
            <xsl:if test="./table5/subregional-agreements/answer = 03">
              X
              <br />
              <xsl:value-of select="./table5/subregional-agreements/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/subregional-agreements/answer != 03">&nbsp;</xsl:if>
          </td>
          <td class="check-column">
            <xsl:if test="./table5/subregional-agreements/answer = 04">
              X
              <br />
              <xsl:value-of select="./table5/subregional-agreements/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/subregional-agreements/answer != 04">&nbsp;</xsl:if>
          </td>
        </tr>
        <tr>
          <td colspan="5">
            <strong><xsl:value-of select="$labels/label[@id='p3-t1-row11-act']"/></strong>
            &nbsp;
            <xsl:value-of select="./table5/subregional-agreements/ncp-reference"/>
            &nbsp;
            <xsl:value-of select="./table5/subregional-agreements/ncp-date"/>
          </td>
        </tr>
        <tr>
          <td colspan="5">
            <xsl:value-of select="$labels/label[@id='remarks']"/>
            <br />
            <xsl:value-of select="./table5/subregional-agreements/comments"/>
           </td>
        </tr>
        <!-- ROW 12 -->
        <tr>
          <td rowspan="2">12</td>
          <td rowspan="2"><xsl:value-of select="$labels/label[@id='p3-t1-row12-od']"/></td>
          <td colspan="2"><xsl:value-of select="$labels/label[@id='p3-t1-row12-bilateral']"/></td>
          <td colspan="3"><xsl:value-of select="./table5/subregional-agreements/bilateral-agreements"/></td>
        </tr>
        <tr>
          <td colspan="2"><xsl:value-of select="$labels/label[@id='p3-t1-row12-subregional']"/></td>
          <td colspan="3"><xsl:value-of select="./table5/subregional-agreements/subregional-agreements"/></td>
        </tr>
        <!-- ROW 13 -->
        <tr>
          <td rowspan="3">13</td>
          <td rowspan="3"><xsl:value-of select="$labels/label[@id='p3-t1-row13-od']"/></td>
          <td><xsl:value-of select="$labels/label[@id='p3-t1-row13-yes']"/></td>
          <td colspan="2"><xsl:value-of select="$labels/label[@id='p3-t1-row13-exercise']"/></td>
          <td><xsl:value-of select="$labels/label[@id='status-no']"/></td>
          <td><xsl:value-of select="$labels/label[@id='p3-t1-prep']"/></td>
        </tr>
        <tr>
          <td class="check-column">
            <xsl:if test="./table5/framework-exercices/answer = 00">
              X
              <br />
              <xsl:value-of select="./table5/framework-exercices/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/framework-exercices/answer != 00">&nbsp;</xsl:if>
          </td>
          <td colspan="2">
            <!-- Type of exercise: full scale/comm -->
            <xsl:if test="./table5/framework-exercices/exercise = 00">
              <xsl:value-of select="$labels/label[@id='p3-t1-full']"/>
            </xsl:if>
            <xsl:if test="./table5/framework-exercices/exercise != 00">
              <xsl:value-of select="$labels/label[@id='p3-t1-comm']"/>
            </xsl:if>
          </td>
          <td class="check-column">
            <xsl:if test="./table5/framework-exercices/answer = 01">
              X
              <br />
              <xsl:value-of select="./table5/framework-exercices/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/framework-exercices/answer != 01">&nbsp;</xsl:if>
          </td>
          <td class="check-column">
            <xsl:if test="./table5/framework-exercices/answer = 02">
              X
              <br />
              <xsl:value-of select="./table5/framework-exercices/remarks"/>
            </xsl:if>
            <xsl:if test="./table5/framework-exercices/answer != 02">&nbsp;</xsl:if>
          </td>
        </tr>
        <tr>
          <td colspan="5">
            <xsl:value-of select="$labels/label[@id='remarks']"/>
            <br />
            <xsl:value-of select="./table5/framework-exercices/comments"/>
           </td>
        </tr>
      </tbody>
    </table>
    <br />
    <p>
      <strong>
        <xsl:value-of select="$labels/label[@id='p3-q2']"/>
      </strong>
    </p>      
    <table border="1" cellpadding="1" cellspacing="0" class="datatable">
      <caption>
        <xsl:value-of select="$labels/label[@id='p3-t2-caption']"/>
      </caption>
      <thead>
        <tr>
          <th rowspan="2"><xsl:value-of select="$labels/label[@id='p3-t2-col1']"/></th>
          <th rowspan="2"><xsl:value-of select="$labels/label[@id='number']"/></th>
          <th rowspan="2"><xsl:value-of select="$labels/label[@id='p3-t2-col3']"/></th>
          <th colspan="5"><xsl:value-of select="$labels/label[@id='p3-t2-col4']"/></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='p3-t2-col6']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='p3-t2-col7']"/></td>
          <td class="vertical-text"><xsl:value-of select="$labels/label[@id='p3-t2-col8']"/></td>
        </tr>
      </thead>
      <tbody>
        <xsl:for-each select="table6/*">
          <tr class="zebra{position() mod 2}">
            <xsl:variable name="relart" select="concat(concat('p3-t2-row', position()), '-ra')" />
            <xsl:variable name="descob" select="concat(concat('p3-t2-row', position()), '-od')" />
            <td><xsl:value-of select="$labels/label[@id=$relart]"/></td>
            <td class="center-text"><xsl:value-of select="position()"/></td>
            <td><xsl:value-of select="$labels/label[@id=$descob]"/></td>
            <td class="check-column">
              <xsl:if test="./answer = 'Yes'">X</xsl:if>
              <xsl:if test="./answer != 'Yes'">&nbsp;</xsl:if>
            </td>
            <td class="check-column">
              <xsl:if test="./answer = 'No'">X</xsl:if>
              <xsl:if test="./answer != 'No'">&nbsp;</xsl:if>
            </td>
            <td>
              <xsl:value-of select="impediments"/>
            </td>
            <td>
              <xsl:value-of select="remedy"/>
            </td>
            <td>
              <xsl:value-of select="actions"/>
            </td>
          </tr>
        </xsl:for-each>  
      </tbody>      
    </table>    
  </xsl:template>
  <xsl:template match="spill-incidents">
    <h2><xsl:value-of select="$labels/label[@id='p4-title']"/></h2>
    <table border="1" cellpadding="1" cellspacing="0" class="datatable">
      <caption>
        <xsl:value-of select="$labels/label[@id='p4-t1-caption']"/>
      </caption>
      <thead>
        <tr>
          <th><xsl:value-of select="$labels/label[@id='p4-t1-col1']"/></th>
          <th><xsl:value-of select="$labels/label[@id='p4-t1-col2']"/></th>
          <th><xsl:value-of select="$labels/label[@id='p4-t1-col3']"/></th>
          <th><xsl:value-of select="$labels/label[@id='p4-t1-col4']"/></th>
          <th><xsl:value-of select="$labels/label[@id='p4-t1-col5']"/></th>
          <th><xsl:value-of select="$labels/label[@id='p4-t1-col6']"/></th>
          <th><xsl:value-of select="$labels/label[@id='p4-t1-col7']"/></th>
          <th><xsl:value-of select="$labels/label[@id='p4-t1-col8']"/></th>
        </tr>
      </thead>
      <tbody>
        <xsl:for-each select="table/*">
          <tr class="zebra{position() mod 2}">
            <td><xsl:value-of select="location"/></td>
            <td>
              <xsl:if test="type = 00"><xsl:value-of select="$labels/label[@id='p4-type0']"/></xsl:if>
              <xsl:if test="type = 01"><xsl:value-of select="$labels/label[@id='p4-type1']"/></xsl:if>
              <xsl:if test="type = 02"><xsl:value-of select="$labels/label[@id='p4-type2']"/></xsl:if>
              <xsl:if test="type = 03"><xsl:value-of select="$labels/label[@id='p4-type3']"/></xsl:if>
              <xsl:if test="type = 04"><xsl:value-of select="$labels/label[@id='p4-type4']"/></xsl:if>
              <xsl:if test="type = 05"><xsl:value-of select="$labels/label[@id='p4-type5']"/></xsl:if>
              <xsl:if test="type = 06"><xsl:value-of select="$labels/label[@id='p4-type6']"/></xsl:if>
              <xsl:if test="type = 07"><xsl:value-of select="$labels/label[@id='p4-type7']"/></xsl:if>
              <xsl:if test="type = 08"><xsl:value-of select="$labels/label[@id='p4-type8']"/></xsl:if>
              <xsl:if test="type = 09"><xsl:value-of select="$labels/label[@id='p4-type9']"/></xsl:if>
            </td>
            <td><xsl:value-of select="vesselno"/></td>
            <td><xsl:value-of select="flag"/></td>
            <td><xsl:value-of select="product-released"/></td>
            <td><xsl:value-of select="product-type"/></td>
            <td><xsl:value-of select="action-taken"/></td>
            <td><xsl:value-of select="action"/></td>
          </tr>
        </xsl:for-each>
      </tbody>
    </table>
  </xsl:template>
  <xsl:template match="effectiveness">
    <h2><xsl:value-of select="$labels/label[@id='p5-title']"/></h2>
    <p>
      <xsl:value-of select="$labels/label[@id='p5-1']"/>
      &nbsp;
      <strong>
        <xsl:value-of select="."/>
      </strong>
    </p>     
    
  </xsl:template>
</xsl:stylesheet>