View stylesheet

XML schema http://air-climate.eionet.europa.eu/schemas/AirQualityQuestionnaire/AirQualityQuestionnaire-form9.xsd
Output type HTML
Description HTML
XSL file form9.xslt (Last modified: 03 Sep 2009 15:23 )
<?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="form9">
	<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-form9']/tuv[@xml:lang=$lang]" />
				- <xsl:value-of select="$labels/tu[@tuid='lbl-form9-title']/tuv[@xml:lang=$lang]" />
			</h1>
			<xsl:apply-templates select="form9a"/>
			<xsl:apply-templates select="form9b"/>
			<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="form9a">
	<h2><xsl:value-of select="$labels/tu[@tuid='lbl-form9a-title']/tuv[@xml:lang=$lang]" /></h2>
	<table>
		<thead>
			<tr>
				<th rowspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-zone-code']/tuv[@xml:lang=$lang]" /></th>
				<th colspan="3"><xsl:value-of select="$labels/tu[@tuid='lbl-thresholds-health']/tuv[@xml:lang=$lang]" /></th>
				<th colspan="3"><xsl:value-of select="$labels/tu[@tuid='lbl-thresholds-vegetation']/tuv[@xml:lang=$lang]" /></th>

			</tr>
			<tr>
				<th>&#x3e; TV</th>
				<th>&#x2264; TV; &#x3e;LTO</th>
				<th>&#x2264; LTO</th>
				<th>&#x3e; TV</th>
				<th>&#x2264; TV; &#x3e;LTO</th>
				<th>&#x2264; LTO</th>
			</tr>
		</thead>
		<tbody>
			<xsl:for-each select="form9a-row">
				<tr>
					<td><xsl:value-of select="zone-code"/></td>
					<td><xsl:value-of select="thresholds-health/tv"/></td>
					<td><xsl:value-of select="thresholds-health/tv-lto"/></td>
					<td><xsl:value-of select="thresholds-health/lto"/></td>
					<td><xsl:value-of select="thresholds-vegetation/tv"/></td>
					<td><xsl:value-of select="thresholds-vegetation/tv-lto"/></td>
					<td><xsl:value-of select="thresholds-vegetation/lto"/></td>
				</tr>
			</xsl:for-each>
		</tbody>
	</table>
</xsl:template>

<xsl:template match="form9b">
	<h2><xsl:value-of select="$labels/tu[@tuid='lbl-form9b-title']/tuv[@xml:lang=$lang]" /></h2>
	<table>
		<thead>
			<tr>
				<th rowspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-zone-code']/tuv[@xml:lang=$lang]" /></th>
				<th colspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-arsenic']/tuv[@xml:lang=$lang]" /></th>
				<th colspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-cadmium']/tuv[@xml:lang=$lang]" /></th>
				<th colspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-nickel']/tuv[@xml:lang=$lang]" /></th>
				<th colspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-benzo-apyrene']/tuv[@xml:lang=$lang]" /></th>
			</tr>
			<tr>
				<th>&#x3e; TV</th>
				<th>&#x2264; TV</th>
				<th>&#x3e; TV</th>
				<th>&#x2264; TV</th>
				<th>&#x3e; TV</th>
				<th>&#x2264; TV</th>
				<th>&#x3e; TV</th>
				<th>&#x2264; TV</th>
			</tr>
		</thead>
		<tbody>
			<xsl:for-each select="form9b-row">
				<tr>
					<td><xsl:value-of select="zone-code"/></td>
					<td><xsl:value-of select="arsenic/gt-tv"/></td>
					<td><xsl:value-of select="arsenic/lt-tv"/></td>
					<td><xsl:value-of select="cadmium/gt-tv"/></td>
					<td><xsl:value-of select="cadmium/lt-tv"/></td>
					<td><xsl:value-of select="nickel/gt-tv"/></td>
					<td><xsl:value-of select="nickel/lt-tv"/></td>
					<td><xsl:value-of select="benzo-a-pyrene/gt-tv"/></td>
					<td><xsl:value-of select="benzo-a-pyrene/lt-tv"/></td>
				</tr>
			</xsl:for-each>
		</tbody>
	</table>
</xsl:template>

<xsl:template match="form9c">
	<h2><xsl:value-of select="$labels/tu[@tuid='lbl-form9c-title']/tuv[@xml:lang=$lang]" /></h2>
	<table>
		<thead>
			<tr>
				<th rowspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-zone-code']/tuv[@xml:lang=$lang]" /></th>
				<th colspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-target-value']/tuv[@xml:lang=$lang]" /></th>
			</tr>
			<tr>
				<th>&#x3e; TV</th>
				<th>&#x2264; TV</th>
			</tr>
		</thead>
		<tbody>
			<xsl:for-each select="form9c-row">
				<tr>
					<td><xsl:value-of select="zone-code"/></td>
					<td><xsl:value-of select="target-value/gt-tv"/></td>
					<td><xsl:value-of select="target-value/lt-tv"/></td>
				</tr>
			</xsl:for-each>
		</tbody>
	</table>
</xsl:template>
</xsl:stylesheet>