View stylesheet

XML schema http://dd.eionet.europa.eu/schemas/MSFD13/ART18.xsd
Output type HTML
Description HTML view
XSL file ART18-HTML.xslt (Last modified: 17 Oct 2018 12:47 )
<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:dc="http://purl.org/dc/elements/1.1/"
                xmlns:fn="http://www.w3.org/2005/xpath-functions"
                xmlns:xs="http://www.w3.org/2001/XMLSchema"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                version="1.0"
                >
  <xsl:output version="4.0"
              method="html"
              indent="yes"
              encoding="UTF-8"
              doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
              doctype-system="http://www.w3.org/TR/html4/loose.dtd"/>

  <xsl:template match="/">
    <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
      <head>
        <title>Reporting on Article 18 Progress on PoMs</title>
        <meta content="text/html; charset=utf-8"/>
        <style type="text/css">
          body {
          font-family: Verdana, Arial, Helvetica,sans-serif, "MS sans serif";
          background: #fff;
          color: #000;
          font-size: 8pt;
          }

          fieldset {
          margin-bottom: 1em;
          }

          fieldset legend {
          font-weight: bold;
          }
          /* IE - Fix some weirdness with group labels/legends */
          legend span {
          display: block !important;
          white-space: normal !important;
          width: 100%;
          }
          /* Fix for odd br in label in IE only for other langs */
          label br {
          display: none;
          }

          .label {
          width: auto !important;
          white-space: normal !important;
          }

          .info {
          padding: 0.5em;
          display: block;
          }

          .ta {
          display: block;
          border: 1px solid #bcd884;
          padding: 0.5em;
          color: rgb(85, 96, 63);
          font-size: 8pt;
          font-weight: bold;
          }

          .qa {
          display: block;
          width: 98%;
          border: 1px solid #fff;
          }

          .qa-table {
          width: 100%;
          }

          .qa-table td, .qa-table th {
          padding-left: 0.5em;
          padding-right: 0.5em;
          width: 45%;
          }

          .q-cell .a-cell {
          }

          .notPresent {
          color: blue;
          }

          .oneCol {
          width: 100%;
          overflow: hidden;
          }

          .twoCol {
          width: 100%;
          overflow: hidden;
          }

          .leftCol {
          float: left;
          width: 49.8%;
          overflow: hidden;
          }

          .rightCol {
          float: right;
          width: 49.8%;
          overflow: hidden;
          }
          /*.rightCol { float: left; margin-left: 50%; width: 100%; overflow:hidden;}*/
          #container {
          width: 100%;
          min-width: 600px;
          position: relative;
          margin: 0px auto;
          /*  max-width: 80em;*/
          background-color: #fff;
          color: #333;
          }
        </style>

      </head>
      <body class="fullscreen">
        <div id="container">
          <form name="chibaform" >
            <h1>
              <label class="label heading" id="C1" for="C1">Reporting on Article 18 Progress on PoMs</label>
            </h1>
            <div class="oneCol">
              <xsl:call-template name="Index"></xsl:call-template>
            </div>
            <h2>
              <a id="info">Reporter Info</a>
            </h2>
            <div class="oneCol">
              <xsl:call-template name="Reporter"></xsl:call-template>
            </div>
            <xsl:call-template name="MeasureProgress"></xsl:call-template>
            <xsl:call-template name="Category1bNotWFD"></xsl:call-template>
          </form>
        </div>
      </body>
    </html>
  </xsl:template>
  <xsl:template name="Index">
    <fieldset class="group" >
      <legend class="label">Index</legend>
      <span>
        <dl>
          <dt>
            <a href="#info">Reporter Info</a>
          </dt>
          <xsl:if test="ART18/MeasureProgress">
            <dt>Progress on PoMs</dt>
            <xsl:for-each select="ART18/MeasureProgress">
              <dd>
                <xsl:variable name="mc" select="MeasureName"/>
                <a href="#{generate-id($mc)}">
                  <xsl:value-of select="MeasureCode" /> - <xsl:value-of select="MeasureName" />
                </a>
              </dd>
            </xsl:for-each>
          </xsl:if>
          <xsl:if test="ART18/Category1bNotWFD">
            <dt>Progress on PoMs - Category 1b not related to WFD</dt>
            <xsl:for-each select="ART18/Category1bNotWFD">
              <xsl:if test="Measure">
                <dd>
                  <xsl:variable name="cc" select="Descriptor"/>
                  <a href="#{generate-id($cc)}">
                    <xsl:call-template name="DescriptorCode2"></xsl:call-template>
                  </a>
                </dd>
              </xsl:if>
            </xsl:for-each>
          </xsl:if>
        </dl>
      </span>
    </fieldset>
  </xsl:template>
  <xsl:template name="Reporter">
    <fieldset class="group" >
      <legend class="label">Reporter</legend>
      <table class="qa-table">
        <tr>
          <th class="q-cell"></th>
          <th class="a-cell"></th>
        </tr>
        <tr>
          <td>
            <label class="label" >Country</label>
          </td>
          <td>
            <span class="ta" >
              <xsl:call-template name="CountriesCode"></xsl:call-template>
            </span>
          </td>
        </tr>
        <tr>
          <td>
            <label class="label" >Name of the reporter</label>
          </td>
          <td>
            <span class="ta" >
              <xsl:value-of select="ART18/@ContactName" />
            </span>
          </td>
        </tr>
        <tr>
          <td>
            <label class="label" >Email of Reporter</label>
          </td>
          <td>
            <span class="ta" >
              <xsl:value-of select="ART18/@ContactMail" />
            </span>
          </td>
        </tr>
        <tr>
          <td>
            <label class="label" >Reporter organisation</label>
          </td>
          <td>
            <span class="ta" >
              <xsl:value-of select="ART18/@ContactOrganisation" />
            </span>
          </td>
        </tr>
        <tr>
          <td>
            <label class="label" >Reporting date</label>
          </td>
          <td>
            <span class="ta" >
              <xsl:value-of select="ART18/@ReportingDate" />
            </span>
          </td>
        </tr>
      </table>
    </fieldset>
  </xsl:template>
  <xsl:template name="MeasureProgress">
    <xsl:if test="ART18/MeasureProgress">
      <xsl:for-each select="ART18/MeasureProgress">
        <div class="oneCol">
          <xsl:variable name="mc" select="MeasureName"/>
          <h2>
            <a id="{generate-id($mc)}">
              <xsl:value-of select="MeasureCode" /> - <xsl:value-of select="MeasureName" />
            </a>
          </h2>
          <fieldset class="group" >
            <legend class="label">Measure Progress</legend>
            <table class="qa-table">
              <tr>
                <th class="q-cell"></th>
                <th class="a-cell"></th>
              </tr>
              <tr>
                <td>
                  <label class="label" >Measure Code</label>
                </td>
                <td>
                  <span class="ta" >
                    <xsl:value-of select="MeasureCode" />
                  </span>
                </td>
              </tr>
              <tr>
                <td>
                  <label class="label" >Measure Name</label>
                </td>
                <td>
                  <span class="ta" >
                    <xsl:value-of select="MeasureName" />
                  </span>
                </td>
              </tr>
              <tr>
                <td>
                  <label class="label" >Category of measure</label>
                </td>
                <td>
                  <span class="ta" >
                    <xsl:value-of select="Category" />
                  </span>
                </td>
              </tr>
              <tr>
                <td>
                  <label class="label" >MSFD Descriptor number</label>
                </td>
                <td>
                  <span class="ta" >
                    <xsl:for-each select="Descriptor">
                      <xsl:call-template name="DescriptorCode"></xsl:call-template>
                      <xsl:if test="position() != last()">
                        <br/>
                      </xsl:if>
                    </xsl:for-each>
                  </span>
                </td>
              </tr>
              <xsl:if test="Category != '1a' and Category != '1b (related to WFD)'">
                <tr>
                  <td>
                    <label class="label" >Progress in implementation</label>
                  </td>
                  <td>
                    <span class="ta" >
                      <xsl:value-of select="ImplementationProgress" />
                    </span>
                  </td>
                </tr>
                <tr>
                  <td>
                    <label class="label" >Measure withdrawn</label>
                  </td>
                  <td>
                    <span class="ta" >
                      <xsl:value-of select="MeasureWithdrawn" />
                    </span>
                  </td>
                </tr>
                <xsl:if test="MeasureWithdrawn = 'Yes'">
                  <tr>
                    <td>
                      <label class="label" >Reason for withdrawal</label>
                    </td>
                    <td>
                      <span class="ta" >
                        <xsl:value-of select="ReasonWithdrawal" />
                      </span>
                    </td>
                  </tr>
                  <xsl:if test="ReasonWithdrawal = 'Other'">
                    <tr>
                      <td>
                        <label class="label" >Reason for withdrawal - Other</label>
                      </td>
                      <td>
                        <span class="ta" >
                          <xsl:value-of select="ReasonWithdrawalOther" />
                        </span>
                      </td>
                    </tr>
                  </xsl:if>
                </xsl:if>
                <tr>
                  <td>
                    <label class="label" >Year of implementation</label>
                  </td>
                  <td>
                    <span class="ta" >
                      <xsl:value-of select="ImplementationYear" />
                    </span>
                  </td>
                </tr>
                <tr>
                  <td>
                    <label class="label" >Delay</label>
                  </td>
                  <td>
                    <span class="ta" >
                      <xsl:value-of select="Delay" />
                    </span>
                  </td>
                </tr>
                <xsl:if test="Delay > 0">
                  <tr>
                    <td>
                      <label class="label" >Reason for delay</label>
                    </td>
                    <td>
                      <span class="ta" >
                        <xsl:value-of select="ReasonDelay" />
                      </span>
                    </td>
                  </tr>
                  <xsl:if test="ReasonDelay = 'Other'">
                    <tr>
                      <td>
                        <label class="label" >Reason for delay - Other</label>
                      </td>
                      <td>
                        <span class="ta" >
                          <xsl:value-of select="ReasonDelayOther" />
                        </span>
                      </td>
                    </tr>
                  </xsl:if>
                </xsl:if>
                <tr>
                  <td>
                    <label class="label" >Other obstacles</label>
                  </td>
                  <td>
                    <span class="ta" >
                      <xsl:value-of select="OtherObstacles" />
                    </span>
                  </td>
                </tr>
                <xsl:if test="OtherObstacles = 'Yes'">
                  <tr>
                    <td>
                      <label class="label" >Type of obstacle</label>
                    </td>
                    <td>
                      <span class="ta" >
                        <xsl:value-of select="TypeObstacle" />
                      </span>
                    </td>
                  </tr>
                  <xsl:if test="TypeObstacle = 'Other'">
                    <tr>
                      <td>
                        <label class="label" >Type of obstacle - Other</label>
                      </td>
                      <td>
                        <span class="ta" >
                          <xsl:value-of select="TypeObstacleOther" />
                        </span>
                      </td>
                    </tr>
                  </xsl:if>
                </xsl:if>
                <xsl:if test="MeasureWithdrawn = 'Yes' or Delay > 0 or OtherObstacles = 'Yes'">
                  <tr>
                    <td>
                      <label class="label" >Further information on obstacles</label>
                    </td>
                    <td>
                      <span class="ta" >
                        <xsl:value-of select="FurtherInformationObstacles" />
                      </span>
                    </td>
                  </tr>
                </xsl:if>
              </xsl:if>
              <tr>
                <td>
                  <label class="label" >Brief description of progress</label>
                </td>
                <td>
                  <span class="ta" >
                    <xsl:value-of select="ProgressDescription" />
                  </span>
                </td>
              </tr>
            </table>
          </fieldset>
        </div>
      </xsl:for-each>
    </xsl:if>
  </xsl:template>
  <xsl:template name="Category1bNotWFD">
    <xsl:if test="ART18/Category1bNotWFD">
      <xsl:for-each select="ART18/Category1bNotWFD">
        <xsl:if test="Measure">
          <div class="oneCol">
            <xsl:variable name="cc" select="Descriptor"/>
            <h2>
              <a id="{generate-id($cc)}">
                <xsl:call-template name="DescriptorCode2"></xsl:call-template>
              </a>
            </h2>
            <fieldset class="group" >
              <table class="qa-table">
                <tr>
                  <th class="q-cell"></th>
                  <th class="a-cell"></th>
                </tr>
                <tr>
                  <td>
                    <label class="label" >Progress in implementation</label>
                  </td>
                  <td>
                    <span class="ta" >
                      <xsl:value-of select="ImplementationProgress" />
                    </span>
                  </td>
                </tr>
                <tr>
                  <td>
                    <label class="label" >Measure withdrawn</label>
                  </td>
                  <td>
                    <span class="ta" >
                      <xsl:value-of select="MeasureWithdrawn" />
                    </span>
                  </td>
                </tr>
                <xsl:if test="MeasureWithdrawn = 'Yes'">
                  <tr>
                    <td>
                      <label class="label" >Reason for withdrawal</label>
                    </td>
                    <td>
                      <span class="ta" >
                        <xsl:value-of select="ReasonWithdrawal" />
                      </span>
                    </td>
                  </tr>
                  <xsl:if test="ReasonWithdrawal = 'Other'">
                    <tr>
                      <td>
                        <label class="label" >Reason for withdrawal - Other</label>
                      </td>
                      <td>
                        <span class="ta" >
                          <xsl:value-of select="ReasonWithdrawalOther" />
                        </span>
                      </td>
                    </tr>
                  </xsl:if>
                </xsl:if>
                <tr>
                  <td>
                    <label class="label" >Year of implementation</label>
                  </td>
                  <td>
                    <span class="ta" >
                      <xsl:value-of select="ImplementationYear" />
                    </span>
                  </td>
                </tr>
                <tr>
                  <td>
                    <label class="label" >Delay</label>
                  </td>
                  <td>
                    <span class="ta" >
                      <xsl:value-of select="Delay" />
                    </span>
                  </td>
                </tr>
                <xsl:if test="Delay > 0">
                  <tr>
                    <td>
                      <label class="label" >Reason for delay</label>
                    </td>
                    <td>
                      <span class="ta" >
                        <xsl:value-of select="ReasonDelay" />
                      </span>
                    </td>
                  </tr>
                  <xsl:if test="ReasonDelay = 'Other'">
                    <tr>
                      <td>
                        <label class="label" >Reason for delay - Other</label>
                      </td>
                      <td>
                        <span class="ta" >
                          <xsl:value-of select="ReasonDelayOther" />
                        </span>
                      </td>
                    </tr>
                  </xsl:if>
                </xsl:if>
                <tr>
                  <td>
                    <label class="label" >Other obstacles</label>
                  </td>
                  <td>
                    <span class="ta" >
                      <xsl:value-of select="OtherObstacles" />
                    </span>
                  </td>
                </tr>
                <xsl:if test="OtherObstacles = 'Yes'">
                  <tr>
                    <td>
                      <label class="label" >Type of obstacle</label>
                    </td>
                    <td>
                      <span class="ta" >
                        <xsl:value-of select="TypeObstacle" />
                      </span>
                    </td>
                  </tr>
                  <xsl:if test="TypeObstacle = 'Other'">
                    <tr>
                      <td>
                        <label class="label" >Type of obstacle - Other</label>
                      </td>
                      <td>
                        <span class="ta" >
                          <xsl:value-of select="TypeObstacleOther" />
                        </span>
                      </td>
                    </tr>
                  </xsl:if>
                </xsl:if>
                <xsl:if test="MeasureWithdrawn = 'Yes' or Delay > 0 or OtherObstacles = 'Yes'">
                  <tr>
                    <td>
                      <label class="label" >Further information on obstacles</label>
                    </td>
                    <td>
                      <span class="ta" >
                        <xsl:value-of select="FurtherInformationObstacles" />
                      </span>
                    </td>
                  </tr>
                </xsl:if>
                <tr>
                  <td>
                    <label class="label" >Brief description of progress</label>
                  </td>
                  <td>
                    <span class="ta" >
                      <xsl:value-of select="ProgressDescription" />
                    </span>
                  </td>
                </tr>
                <xsl:if test="Measure">
                  <tr>
                    <td colspan="2">
                      <fieldset class="group" >
                        <legend class="label">Measures</legend>
                        <table class="qa-table">
                          <tr>
                            <th class="q-cell"></th>
                            <th class="a-cell"></th>
                          </tr>
                          <xsl:for-each select="Measure">
                            <tr>
                              <td colspan="2">
                                <fieldset class="group" >
                                  <table class="qa-table">
                                    <tr>
                                      <th class="q-cell"></th>
                                      <th class="a-cell"></th>
                                    </tr>
                                    <tr>
                                      <td>
                                        <label class="label" >Measure Code</label>
                                      </td>
                                      <td>
                                        <span class="ta" >
                                          <xsl:value-of select="MeasureCode" />
                                        </span>
                                      </td>
                                    </tr>
                                    <tr>
                                      <td>
                                        <label class="label" >Measure Name</label>
                                      </td>
                                      <td>
                                        <span class="ta" >
                                          <xsl:value-of select="MeasureName" />
                                        </span>
                                      </td>
                                    </tr>
                                    <tr>
                                      <td>
                                        <label class="label" >Comments</label>
                                      </td>
                                      <td>
                                        <span class="ta" >
                                          <xsl:value-of select="Comments" />
                                        </span>
                                      </td>
                                    </tr>
                                    <tr>
                                      <td>
                                        <label class="label" >Disagree</label>
                                      </td>
                                      <td>
                                        <span class="ta" >
                                          <xsl:value-of select="Disagree" />
                                        </span>
                                      </td>
                                    </tr>
                                    <tr>
                                      <td>
                                        <label class="label" >Member State Comments</label>
                                      </td>
                                      <td>
                                        <span class="ta" >
                                          <xsl:value-of select="MSComments" />
                                        </span>
                                      </td>
                                    </tr>
                                  </table>
                                </fieldset>
                              </td>
                            </tr>
                          </xsl:for-each>
                        </table>
                      </fieldset>
                    </td>
                  </tr>
                </xsl:if>
              </table>
            </fieldset>
          </div>
        </xsl:if>
      </xsl:for-each>
    </xsl:if>
  </xsl:template>
  <xsl:template name="CountriesCode">
    <xsl:choose>
      <xsl:when test="ART18/CountryCode = 'BE'">Belgium</xsl:when>
      <xsl:when test="ART18/CountryCode = 'BG'">Bulgaria</xsl:when>
      <xsl:when test="ART18/CountryCode = 'CY'">Cyprus</xsl:when>
      <xsl:when test="ART18/CountryCode = 'DE'">Germany</xsl:when>
      <xsl:when test="ART18/CountryCode = 'DK'">Denmark</xsl:when>
      <xsl:when test="ART18/CountryCode = 'EE'">Estonia</xsl:when>
      <xsl:when test="ART18/CountryCode = 'EL'">Greece</xsl:when>
      <xsl:when test="ART18/CountryCode = 'ES'">Spain</xsl:when>
      <xsl:when test="ART18/CountryCode = 'FI'">Finland</xsl:when>
      <xsl:when test="ART18/CountryCode = 'FR'">France</xsl:when>
      <xsl:when test="ART18/CountryCode = 'HR'">Croatia</xsl:when>
      <xsl:when test="ART18/CountryCode = 'IE'">Ireland</xsl:when>
      <xsl:when test="ART18/CountryCode = 'IT'">Italy</xsl:when>
      <xsl:when test="ART18/CountryCode = 'LT'">Lithuania</xsl:when>
      <xsl:when test="ART18/CountryCode = 'LV'">Latvia</xsl:when>
      <xsl:when test="ART18/CountryCode = 'MT'">Malta</xsl:when>
      <xsl:when test="ART18/CountryCode = 'NL'">Netherlands</xsl:when>
      <xsl:when test="ART18/CountryCode = 'PL'">Poland</xsl:when>
      <xsl:when test="ART18/CountryCode = 'PT'">Portugal</xsl:when>
      <xsl:when test="ART18/CountryCode = 'RO'">Romania</xsl:when>
      <xsl:when test="ART18/CountryCode = 'SE'">Sweden</xsl:when>
      <xsl:when test="ART18/CountryCode = 'SI'">Slovenia</xsl:when>
      <xsl:when test="ART18/CountryCode = 'UK'">United Kingdom</xsl:when>
    </xsl:choose>
  </xsl:template>
  <xsl:template name="DescriptorCode">
    <xsl:choose>
      <xsl:when test="string(.) = 'D1'">D1 Biodiversity</xsl:when>
      <xsl:when test="string(.) = 'D2'">D2 Non-indigenous species</xsl:when>
      <xsl:when test="string(.) = 'D3'">D3 Commercial fish and shellfish</xsl:when>
      <xsl:when test="string(.) = 'D4'">D4 Food webs</xsl:when>
      <xsl:when test="string(.) = 'D5'">D5 Eutrophication</xsl:when>
      <xsl:when test="string(.) = 'D6'">D6 Sea-floor integrity</xsl:when>
      <xsl:when test="string(.) = 'D7'">D7 Hydrographical changes</xsl:when>
      <xsl:when test="string(.) = 'D8'">D8 Contaminants</xsl:when>
      <xsl:when test="string(.) = 'D9'">D9 Contaminants in seafood</xsl:when>
      <xsl:when test="string(.) = 'D10'">D10 Marine litter</xsl:when>
      <xsl:when test="string(.) = 'D11'">D11 Energy, incl. underwater noise</xsl:when>
    </xsl:choose>
  </xsl:template>
  <xsl:template name="DescriptorCode2">
    <xsl:choose>
      <xsl:when test="Descriptor = 'D1/4/6'">D1 Biodiversity / D4 Food webs / D6 Sea-floor integrity</xsl:when>
      <xsl:when test="Descriptor = 'D2'">D2 Non-indigenous species</xsl:when>
      <xsl:when test="Descriptor = 'D3'">D3 Commercial fish and shellfish</xsl:when>
      <xsl:when test="Descriptor = 'D5'">D5 Eutrophication</xsl:when>
      <xsl:when test="Descriptor = 'D7'">D7 Hydrographical changes</xsl:when>
      <xsl:when test="Descriptor = 'D8'">D8 Contaminants</xsl:when>
      <xsl:when test="Descriptor = 'D9'">D9 Contaminants in seafood</xsl:when>
      <xsl:when test="Descriptor = 'D10'">D10 Marine litter</xsl:when>
      <xsl:when test="Descriptor = 'D11'">D11 Energy, incl. underwater noise</xsl:when>
    </xsl:choose>
  </xsl:template>
</xsl:stylesheet>