View stylesheet

XML schemas http://air-climate.eionet.europa.eu/schemas/AirQualityQuestionnaire/AirQualityQuestionnaire-form14.xsd
Output type HTML
Description HTML
XSL file form14.xslt (Last modified: 03 Sep 2009 15:24 )
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<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:param name="xml_folder_uri" />
	<xsl:variable name="lang">en</xsl:variable>

	<!-- Uncommment the lines below for production use -->
	<xsl:variable name="labels_xml" select="document(concat($xml_folder_uri,'aqq-labels.xml'))" />


	<!-- Uncomment the lines below for development use
	<xsl:variable name="labels_xml" select="document('../xml/aqq-labels.xml')" />
  -->
	<xsl:variable name="labels" select="$labels_xml/tmx/body" />

<xsl:template match="form14">
	<html>
		<head>
			<style type="text/css">
				table {
					border: 1px solid black;
					border-collapse: collapse;
					width: 100%;
				}
				table th {
					border: 1px solid black;
				}
				table td {
					border: 1px solid black;
				}
			</style>
		</head>
		<body>
			<h1>
				<xsl:value-of select="$labels/tu[@tuid='lbl-form14']/tuv[@xml:lang=$lang]" />
				- <xsl:value-of select="$labels/tu[@tuid='lbl-form14-title']/tuv[@xml:lang=$lang]" />
			</h1>
			<xsl:apply-templates select="form14a"/>
			<xsl:apply-templates select="form14b"/>
			<xsl:apply-templates select="form14c"/>
			<xsl:apply-templates select="form14d"/>
			<h2><xsl:value-of select="$labels/tu[@tuid='lbl-form-comments']/tuv[@xml:lang=$lang]" /></h2>
			<p><xsl:value-of select="form-comments"/></p>
		</body>
	</html>
</xsl:template>

<xsl:template match="form14a">
	<h2><xsl:value-of select="$labels/tu[@tuid='lbl-form14a-title']/tuv[@xml:lang=$lang]" /></h2>
	<table>
		<thead>
			<tr>
				<th><xsl:value-of select="$labels/tu[@tuid='lbl-zone-code']/tuv[@xml:lang=$lang]" /></th>
				<th><xsl:value-of select="$labels/tu[@tuid='lbl-station-code']/tuv[@xml:lang=$lang]" /></th>
				<th><xsl:value-of select="$labels/tu[@tuid='lbl-exceedence-number']/tuv[@xml:lang=$lang]" /></th>
				<th><xsl:value-of select="$labels/tu[@tuid='lbl-calendar-years-3']/tuv[@xml:lang=$lang]" /></th>
			</tr>
		</thead>
		<tbody>
			<xsl:for-each select="form14a-row">
				<tr>
					<td><xsl:value-of select="zone-code"/></td>
					<td><xsl:value-of select="eoi-station-code"/></td>
					<td><xsl:value-of select="exceedence-number"/></td>
					<td><xsl:value-of select="calendar-years"/></td>
				</tr>
			</xsl:for-each>
		</tbody>
	</table>
</xsl:template>
<xsl:template match="form14b">
	<h2><xsl:value-of select="$labels/tu[@tuid='lbl-form14b-title']/tuv[@xml:lang=$lang]" /></h2>
	<table>
		<thead>
			<tr>
				<th><xsl:value-of select="$labels/tu[@tuid='lbl-zone-code']/tuv[@xml:lang=$lang]" /></th>
				<th><xsl:value-of select="$labels/tu[@tuid='lbl-station-code']/tuv[@xml:lang=$lang]" /></th>
				<th><xsl:value-of select="$labels/tu[@tuid='lbl-aot40-average-over-5-years']/tuv[@xml:lang=$lang]" /></th>
				<th><xsl:value-of select="$labels/tu[@tuid='lbl-calendar-years-5']/tuv[@xml:lang=$lang]" /></th>
			</tr>
		</thead>
		<tbody>
			<xsl:for-each select="form14b-row">
				<tr>
					<td><xsl:value-of select="zone-code"/></td>
					<td><xsl:value-of select="eoi-station-code"/></td>
					<td><xsl:value-of select="aot40-average"/></td>
					<td><xsl:value-of select="calendar-years"/></td>
				</tr>
			</xsl:for-each>
		</tbody>
	</table>
</xsl:template>
<xsl:template match="form14c">
	<h2><xsl:value-of select="$labels/tu[@tuid='lbl-form14c-title']/tuv[@xml:lang=$lang]" /></h2>
	<table>
		<thead>
			<tr>
				<th rowspan="3"><xsl:value-of select="$labels/tu[@tuid='lbl-zone-code']/tuv[@xml:lang=$lang]" /></th>
				<th rowspan="3"><xsl:value-of select="$labels/tu[@tuid='lbl-station-code']/tuv[@xml:lang=$lang]" /></th>
				<th colspan="6"><xsl:value-of select="$labels/tu[@tuid='lbl-arsenic']/tuv[@xml:lang=$lang]" /></th>
				<th colspan="6"><xsl:value-of select="$labels/tu[@tuid='lbl-cadmium']/tuv[@xml:lang=$lang]" /></th>
				<th colspan="6"><xsl:value-of select="$labels/tu[@tuid='lbl-nickel']/tuv[@xml:lang=$lang]" /></th>
				<th colspan="6"><xsl:value-of select="$labels/tu[@tuid='lbl-benzo-a-pyrene']/tuv[@xml:lang=$lang]" /></th>
			</tr>
			<tr>
				<th rowspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-concentration-ngm3']/tuv[@xml:lang=$lang]" /></th>
				<th colspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-area-generic']/tuv[@xml:lang=$lang]" /></th>
				<th colspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-population-exposed']/tuv[@xml:lang=$lang]" /></th>
				<th rowspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-reason-code']/tuv[@xml:lang=$lang]" /></th>
				<th rowspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-concentration-ngm3']/tuv[@xml:lang=$lang]" /></th>
				<th colspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-area-generic']/tuv[@xml:lang=$lang]" /></th>
				<th colspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-population-exposed']/tuv[@xml:lang=$lang]" /></th>
				<th rowspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-reason-code']/tuv[@xml:lang=$lang]" /></th>
				<th rowspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-concentration-ngm3']/tuv[@xml:lang=$lang]" /></th>
				<th colspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-area-generic']/tuv[@xml:lang=$lang]" /></th>
				<th colspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-population-exposed']/tuv[@xml:lang=$lang]" /></th>
				<th rowspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-reason-code']/tuv[@xml:lang=$lang]" /></th>
				<th rowspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-concentration-ngm3']/tuv[@xml:lang=$lang]" /></th>
				<th colspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-area-generic']/tuv[@xml:lang=$lang]" /></th>
				<th colspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-population-exposed']/tuv[@xml:lang=$lang]" /></th>
				<th rowspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-reason-code']/tuv[@xml:lang=$lang]" /></th>
			</tr>
			<tr>
				<th><xsl:value-of select="$labels/tu[@tuid='lbl-km2']/tuv[@xml:lang=$lang]" /></th>
				<th><xsl:value-of select="$labels/tu[@tuid='lbl-method']/tuv[@xml:lang=$lang]" /></th>
				<th><xsl:value-of select="$labels/tu[@tuid='lbl-number']/tuv[@xml:lang=$lang]" /></th>
				<th><xsl:value-of select="$labels/tu[@tuid='lbl-method']/tuv[@xml:lang=$lang]" /></th>
				<th><xsl:value-of select="$labels/tu[@tuid='lbl-km2']/tuv[@xml:lang=$lang]" /></th>
				<th><xsl:value-of select="$labels/tu[@tuid='lbl-method']/tuv[@xml:lang=$lang]" /></th>
				<th><xsl:value-of select="$labels/tu[@tuid='lbl-number']/tuv[@xml:lang=$lang]" /></th>
				<th><xsl:value-of select="$labels/tu[@tuid='lbl-method']/tuv[@xml:lang=$lang]" /></th>
				<th><xsl:value-of select="$labels/tu[@tuid='lbl-km2']/tuv[@xml:lang=$lang]" /></th>
				<th><xsl:value-of select="$labels/tu[@tuid='lbl-method']/tuv[@xml:lang=$lang]" /></th>
				<th><xsl:value-of select="$labels/tu[@tuid='lbl-number']/tuv[@xml:lang=$lang]" /></th>
				<th><xsl:value-of select="$labels/tu[@tuid='lbl-method']/tuv[@xml:lang=$lang]" /></th>
				<th><xsl:value-of select="$labels/tu[@tuid='lbl-km2']/tuv[@xml:lang=$lang]" /></th>
				<th><xsl:value-of select="$labels/tu[@tuid='lbl-method']/tuv[@xml:lang=$lang]" /></th>
				<th><xsl:value-of select="$labels/tu[@tuid='lbl-number']/tuv[@xml:lang=$lang]" /></th>
				<th><xsl:value-of select="$labels/tu[@tuid='lbl-method']/tuv[@xml:lang=$lang]" /></th>
			</tr>
		</thead>
		<tbody>
			<xsl:for-each select="form14c-row">
				<tr>
					<td><xsl:value-of select="zone-code"/></td>
					<td><xsl:value-of select="eoi-station-code"/></td>
					<td><xsl:value-of select="arsenic/concentration"/></td>
					<td><xsl:value-of select="arsenic/area/km2"/></td>
					<td><xsl:value-of select="arsenic/area/method"/></td>
					<td><xsl:value-of select="arsenic/population/number"/></td>
					<td><xsl:value-of select="arsenic/population/method"/></td>
					<td><xsl:value-of select="arsenic/reason-code"/></td>
					<td><xsl:value-of select="cadmium/concentration"/></td>
					<td><xsl:value-of select="cadmium/area/km2"/></td>
					<td><xsl:value-of select="cadmium/area/method"/></td>
					<td><xsl:value-of select="cadmium/population/number"/></td>
					<td><xsl:value-of select="cadmium/population/method"/></td>
					<td><xsl:value-of select="cadmium/reason-code"/></td>
					<td><xsl:value-of select="nickel/concentration"/></td>
					<td><xsl:value-of select="nickel/area/km2"/></td>
					<td><xsl:value-of select="nickel/area/method"/></td>
					<td><xsl:value-of select="nickel/population/number"/></td>
					<td><xsl:value-of select="nickel/population/method"/></td>
					<td><xsl:value-of select="nickel/reason-code"/></td>
					<td><xsl:value-of select="benzo-a-pyrene/concentration"/></td>
					<td><xsl:value-of select="benzo-a-pyrene/area/km2"/></td>
					<td><xsl:value-of select="benzo-a-pyrene/area/method"/></td>
					<td><xsl:value-of select="benzo-a-pyrene/population/number"/></td>
					<td><xsl:value-of select="benzo-a-pyrene/population/method"/></td>
					<td><xsl:value-of select="benzo-a-pyrene/reason-code"/></td>
				</tr>
			</xsl:for-each>
		</tbody>
	</table>
</xsl:template>
<xsl:template match="form14d">
	<h2><xsl:value-of select="$labels/tu[@tuid='lbl-form14d-title']/tuv[@xml:lang=$lang]" /></h2>
	<table>
		<thead>
			<tr>
				<th><xsl:value-of select="$labels/tu[@tuid='lbl-zone-code']/tuv[@xml:lang=$lang]" /></th>
				<th><xsl:value-of select="$labels/tu[@tuid='lbl-station-code']/tuv[@xml:lang=$lang]" /></th>
				<th><xsl:value-of select="$labels/tu[@tuid='lbl-concentration-ugm3']/tuv[@xml:lang=$lang]" /></th>
				<th><xsl:value-of select="$labels/tu[@tuid='lbl-reason-code']/tuv[@xml:lang=$lang]" /></th>
			</tr>
		</thead>
		<tbody>
			<xsl:for-each select="form14d-row">
				<tr>
					<td><xsl:value-of select="zone-code"/></td>
					<td><xsl:value-of select="eoi-station-code"/></td>
					<td><xsl:value-of select="concentration"/></td>
					<td><xsl:value-of select="reason-code"/></td>
				</tr>
			</xsl:for-each>
		</tbody>
	</table>
</xsl:template>
</xsl:stylesheet>