View stylesheet

XML schemas http://wise2.jrc.it/wfdwebinterface/xmlschemas/GWB.xsd
Output type HTML
Description Simple HTML table
XSL file GWB_HTML.xsl (Last modified: 23 Jun 2008 17:10 )
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:label="http://converters.eionet.europa.eu/labels"
   xmlns:wf="http://wise2.jrc.it">
	<xsl:output omit-xml-declaration="yes" encoding="UTF-8"/>

	<xsl:template match="/">
		<html>
			<head>
				<title>WFD 2005 Submission Report</title>
                                <style type="text/css">
                                .scope-row { text-align: left; }
                                </style>
			</head>
			<body>
				<xsl:apply-templates select="wf:GroundWaterBodies"/>
			</body>
		</html>
	</xsl:template>

	<xsl:template match="wf:GroundWaterBodies">
                <h1>
                Water Framework Directive Article 5 Submission for
                <xsl:call-template name="Country">
                        <xsl:with-param name="MS" select="wf:C_CD"/>
                </xsl:call-template>
                </h1>
                <p><b>Water basin district:</b> <xsl:value-of select="wf:DIST_CD"/></p>
                <xsl:apply-templates/>
	</xsl:template>

	<xsl:template match="wf:GroundWaterBody">
                <h2>Water body: <xsl:value-of select="wf:EU_CD"/></h2>
                <table width="600">
                <col style="width:300px"/>
                <col style="width:300px"/>
                        <tbody>
                <xsl:apply-templates/>
                        </tbody>
                </table>
	</xsl:template>

	<!-- Country implementation -->
	<xsl:template name="Country">
		<xsl:param name="MS"/>
		<xsl:choose>
			<xsl:when test="$MS = 'UK'">United Kingdom</xsl:when>
			<xsl:when test="$MS = 'IE'">Ireland</xsl:when>
			<xsl:when test="$MS = 'FR'">France</xsl:when>
			<xsl:when test="$MS='DE'">Germany</xsl:when>
			<xsl:when test="$MS='AT'">Austria</xsl:when>
			<xsl:when test="$MS='BE'">Belgium</xsl:when>
			<xsl:when test="$MS='BG'">Bulgaria</xsl:when>
			<xsl:when test="$MS='CH'">Switzerland</xsl:when>
			<xsl:when test="$MS='CZ'">Czech Republic</xsl:when>
			<xsl:when test="$MS='CY'">Cyprus</xsl:when>
			<xsl:when test="$MS='DK'">Denmark</xsl:when>
			<xsl:when test="$MS='EE'">Estonia</xsl:when>
			<xsl:when test="$MS='ES'">Spain</xsl:when>
			<xsl:when test="$MS='FI'">Finland</xsl:when>
			<xsl:when test="$MS='GR'">Greece</xsl:when>
			<xsl:when test="$MS='HU'">Hungary</xsl:when>
			<xsl:when test="$MS='IS'">Iceland</xsl:when>
			<xsl:when test="$MS='IT'">Italy</xsl:when>
			<xsl:when test="$MS='LT'">Lithuania</xsl:when>
			<xsl:when test="$MS='LU'">Luxembourg</xsl:when>
			<xsl:when test="$MS='LV'">Latvia</xsl:when>
			<xsl:when test="$MS='MT'">Malta</xsl:when>
			<xsl:when test="$MS='NO'">Norway</xsl:when>
			<xsl:when test="$MS='NL'">The Netherlands</xsl:when>
			<xsl:when test="$MS='PL'">Poland</xsl:when>
			<xsl:when test="$MS='PT'">Portugal</xsl:when>
			<xsl:when test="$MS='RO'">Romania</xsl:when>
			<xsl:when test="$MS='SE'">Sweden</xsl:when>
			<xsl:when test="$MS='SI'">Slovenia</xsl:when>
			<xsl:when test="$MS='SK'">Slovakia</xsl:when>
			<xsl:when test="$MS='TR'">Turkey</xsl:when>
		</xsl:choose>
	</xsl:template>
	<!-- YesNoUnknown implementation -->
	<xsl:template name="YesNoUnknown">
		<xsl:param name="YNU"/>
		<xsl:choose>
			<xsl:when test="$YNU = 'Y'">Yes</xsl:when>
			<xsl:when test="$YNU = 'N'">No</xsl:when>
			<xsl:when test="$YNU = 'U'">Unknown</xsl:when>
		</xsl:choose>
	</xsl:template>

	<xsl:template match="wf:URL">
            <tr>
                    <th scope="row" class="scope-row"><xsl:call-template name="LookupLabel">
                        <xsl:with-param name="code" select="local-name()"/>
                </xsl:call-template></th>
                    <td>
                            <a>
                                    <xsl:attribute name="href"><xsl:value-of select="."/></xsl:attribute>
                                    <xsl:value-of select="."/>
                            </a>
                    </td>
            </tr>
	</xsl:template>

	<xsl:template match="wf:TRANSBOUNDARY|wf:SWB_ASSOC|wf:PROT_AREA_ASSOC|wf:REASON_POINT|wf:REASON_DIFFUSE|wf:REASON_ABSTRACTION|wf:REASON_RECHARGE|wf:REASON_INTRUSION">
            <tr>
                    <th scope="row" class="scope-row"><xsl:call-template name="LookupLabel">
                        <xsl:with-param name="code" select="local-name()"/></xsl:call-template></th>
                    <td><xsl:call-template name="YesNoUnknown"><xsl:with-param name="YNU" select="current()"/></xsl:call-template></td>
            </tr>
	</xsl:template>

	<xsl:template match="wf:C_CD|wf:DIST_CD|wf:METADATA|wf:EU_CD|wf:MS_CD|wf:LAT|wf:LON|wf:AREA|wf:RISK_TOTAL|wf:NAME|wf:STATUS_YR|wf:CAPACITY|wf:HORIZON|wf:LAYERED|wf:OUT_OF_RBD|wf:FINAL|wf:RISK_CHEM|wf:RISK_QUANT|wf:REASON_REF|wf:GEO_CHARS|wf:GEO_CHARS_REF|wf:HYDRO_CHARS|wf:HYDRO_CHARS_REF|wf:SUPER_CHARS|wf:SUPER_CHARS_REF|wf:STRAT_CHARS|wf:STRAT_CHARS_REF|wf:ASSOC_SYS|wf:ASSOC_SYS_REF|wf:RATE_EXCH|wf:RATE_EXCH_REF|wf:RCHG_AVE|wf:RCHG_AVE_REF|wf:CHEM_CHARS|wf:CHEM_CHARS_REF|wf:METADATA">
            <tr>
                    <th scope="row" class="scope-row"><xsl:call-template name="LookupLabel">
                        <xsl:with-param name="code" select="local-name()"/>
                </xsl:call-template></th>
                    <td>
                            <xsl:value-of select="."/>
                    </td>
            </tr>
           
	</xsl:template>

	<xsl:template name="LookupLabel">
		<xsl:param name="code"/>
                <!-- Should be possible to use document('') here, but it doesn't work -->
                <xsl:value-of select="document('http://converters.eionet.europa.eu/xsl/GWB_HTML.xsl')/xsl:stylesheet/label:element[@name=$code]"/>
	</xsl:template>

	<xsl:template match="*"/>

<label:element name="C_CD">Country code</label:element>
<label:element name="DIST_CD">Water basin district</label:element>
<label:element name="METADATA">Metadata</label:element>
<label:element name="EU_CD">Code for the WaterBody at EU level</label:element>
<label:element name="MS_CD">Code for the WaterBody within the MS</label:element>
<label:element name="LAT">Latitude</label:element>
<label:element name="LON">Longitude</label:element>
<label:element name="AREA">Area</label:element>
<label:element name="RISK_TOTAL">Risk category</label:element>
<label:element name="NAME">Name</label:element>
<label:element name="STATUS_YR">Year of reporting</label:element>
<label:element name="TRANSBOUNDARY">Transboundary</label:element>
<label:element name="CAPACITY">Capacity</label:element>
<label:element name="HORIZON">Groundwater horizon</label:element>
<label:element name="LAYERED">Deeper relevant horizons</label:element>
<label:element name="OUT_OF_RBD">Outside the RBD</label:element>
<label:element name="FINAL">Final identification</label:element>
<label:element name="SWB_ASSOC">Dynamically linked to any surface water system(s)?</label:element>
<label:element name="PROT_AREA_ASSOC">Dynamically linked to any protected area(s)?</label:element>
<label:element name="RISK_CHEM">Risk category associated with the Chemical Status</label:element>
<label:element name="RISK_QUANT">Risk category associated with the Quantative Status</label:element>
<label:element name="REASON_POINT">At risk as a result of point source pollution?</label:element>
<label:element name="REASON_DIFFUSE">At risk as a result of diffuse source pollution?</label:element>
<label:element name="REASON_ABSTRACTION">Is the waterbody at risk as a result of water abstraction?</label:element>
<label:element name="REASON_RECHARGE">Is the waterbody at risk as a result of artificial recharge?</label:element>
<label:element name="REASON_INTRUSION">Is the waterbody at risk as a result of saltwater or other intrusion?</label:element>
<label:element name="REASON_REF">Hyperlink or reference to more detail or supporting information on reasons for failing to meet objectives</label:element>
<label:element name="GEO_CHARS">Geological characteristics if GWB is at Risk including the extent and type of geological units</label:element>
<label:element name="GEO_CHARS_REF">Hyperlink or reference to further detail or supporting documentation on geological characteristics</label:element>
<label:element name="HYDRO_CHARS">Hydrological characteristics of the GWB including hydraulic conductivity, porosity and confinement</label:element>
<label:element name="HYDRO_CHARS_REF">Hyperlink or reference to further detail or supporting documentation on hydraulic characteristics</label:element>
<label:element name="SUPER_CHARS">Characteristics of the superficial deposits and soils in the catchment from which the groundwater body receives its recharge</label:element>
<label:element name="SUPER_CHARS_REF">Hyperlink or reference to further detail or supporting documentation on the characteristics of superficial deposits and soils</label:element>
<label:element name="STRAT_CHARS">Stratification characteristics of the groundwater within the GWB</label:element>
<label:element name="STRAT_CHARS_REF">Hyperlink or reference to further detail or supporting documentation on startification characteristics</label:element>
<label:element name="ASSOC_SYS">Inventary of the associated surface water systems,including significant terrestrial ecosystems and bodies of surface water with which the GWB is dynamically linked</label:element>
<label:element name="ASSOC_SYS_REF">Hyperlink or reference to further detail or supporting documentation on associated surface water systems</label:element>
<label:element name="RATE_EXCH">Estimates of the directions and rates of exchange of water between the GWB and associated surface systems</label:element>
<label:element name="RATE_EXCH_REF">Hyperlink or reference to further detail or supporting documentation on estimates of directions and rates of exchange</label:element>
<label:element name="RCHG_AVE">Long term annual rate of recharge</label:element>
<label:element name="RCHG_AVE_REF">Hyperlink or reference to further detail or supporting documentation on long term annual rate of recharge</label:element>
<label:element name="CHEM_CHARS">Characterisation of teh chemical composition of teh GWB including specification of the contributions from human activity</label:element>
<label:element name="CHEM_CHARS_REF">Hyperlink or reference to further detail or supporting documentation on the chemical composition</label:element>
<label:element name="METADATA">Hyperlink or reference to associated metadata file</label:element>
<label:element name="URL">URL for integration of MS own internet-based information</label:element>
</xsl:stylesheet>