View stylesheet

XML schemas http://air-climate.eionet.europa.eu/schemas/AirQualityQuestionnaire/AirQualityQuestionnaire-form3.xsd
Output type HTML
Description HTML
XSL file form3.xslt (Last modified: 28 Jan 2009 12:07 )
<?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="form3">
	<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-form3-title']/tuv[@xml:lang=$lang]" /></h1>
			<table>
				<thead>
					<tr>
						<th rowspan="3"><xsl:value-of select="$labels/tu[@tuid='lbl-station-code']/tuv[@xml:lang=$lang]" /></th>
						<th rowspan="3"><xsl:value-of select="$labels/tu[@tuid='lbl-station-code-local']/tuv[@xml:lang=$lang]" /></th>
						<th rowspan="3"><xsl:value-of select="$labels/tu[@tuid='lbl-zone-codes']/tuv[@xml:lang=$lang]" /></th>
						<th colspan="6"><xsl:value-of select="$labels/tu[@tuid='lbl-use-for']/tuv[@xml:lang=$lang]" /></th>
						<th colspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-measuring-method']/tuv[@xml:lang=$lang]" /></th>
						<th colspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-correction-factor']/tuv[@xml:lang=$lang]" /></th>
						<th colspan="8"><xsl:value-of select="$labels/tu[@tuid='lbl-measuring-analytical-method']/tuv[@xml:lang=$lang]" /></th>
						<th rowspan="3"><xsl:value-of select="$labels/tu[@tuid='lbl-station-function']/tuv[@xml:lang=$lang]" /></th>
					</tr>
					<tr>
						<th rowspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-so2']/tuv[@xml:lang=$lang]" /></th>
						<th rowspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-no2']/tuv[@xml:lang=$lang]" /></th>
						<th rowspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-nox']/tuv[@xml:lang=$lang]" /></th>
						<th rowspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-lead']/tuv[@xml:lang=$lang]" /></th>
						<th rowspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-benzene']/tuv[@xml:lang=$lang]" /></th>
						<th rowspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-co']/tuv[@xml:lang=$lang]" /></th>
						<th rowspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-pm10']/tuv[@xml:lang=$lang]" /></th>
						<th rowspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-pm25']/tuv[@xml:lang=$lang]" /></th>
						<th rowspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-pm10']/tuv[@xml:lang=$lang]" /></th>
						<th rowspan="2"><xsl:value-of select="$labels/tu[@tuid='lbl-pm25']/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-bap']/tuv[@xml:lang=$lang]" /></th>
					</tr>
					<tr>
						<th><xsl:value-of select="$labels/tu[@tuid='lbl-sampling']/tuv[@xml:lang=$lang]" /></th>
						<th><xsl:value-of select="$labels/tu[@tuid='lbl-analysis']/tuv[@xml:lang=$lang]" /></th>
						<th><xsl:value-of select="$labels/tu[@tuid='lbl-sampling']/tuv[@xml:lang=$lang]" /></th>
						<th><xsl:value-of select="$labels/tu[@tuid='lbl-analysis']/tuv[@xml:lang=$lang]" /></th>
						<th><xsl:value-of select="$labels/tu[@tuid='lbl-sampling']/tuv[@xml:lang=$lang]" /></th>
						<th><xsl:value-of select="$labels/tu[@tuid='lbl-analysis']/tuv[@xml:lang=$lang]" /></th>
						<th><xsl:value-of select="$labels/tu[@tuid='lbl-sampling']/tuv[@xml:lang=$lang]" /></th>
						<th><xsl:value-of select="$labels/tu[@tuid='lbl-analysis']/tuv[@xml:lang=$lang]" /></th>
					</tr>
				</thead>
				<tbody>
					<xsl:for-each select="form3-row">
						<tr>
							<td><xsl:value-of select="eoi-station-code"/></td>
							<td><xsl:value-of select="local-station-code"/></td>
							<td><xsl:value-of select="zone-code"/></td>
							<td>
								<xsl:if test="use-directive/so2 = 'true'">y</xsl:if>
							</td>
							<td>
								<xsl:if test="use-directive/no2 = 'true'">y</xsl:if>
							</td>
							<td>
								<xsl:if test="use-directive/nox = 'true'">y</xsl:if>
							</td>
							<td>
								<xsl:if test="use-directive/lead = 'true'">y</xsl:if>
							</td>
							<td>
								<xsl:if test="use-directive/benzene = 'true'">y</xsl:if>
							</td>
							<td>
								<xsl:if test="use-directive/co = 'true'">y</xsl:if>
							</td>
							<td><xsl:value-of select="directive-measuring-meth/pm10"/></td>
							<td><xsl:value-of select="directive-measuring-meth/pm25"/></td>
							<td><xsl:value-of select="correction-factor/pm10"/></td>
							<td><xsl:value-of select="correction-factor/pm25"/></td>
							<td><xsl:value-of select="directive-measuring-others/arsenic/sampling"/></td>
							<td><xsl:value-of select="directive-measuring-others/arsenic/analysis"/></td>
							<td><xsl:value-of select="directive-measuring-others/cadmium/sampling"/></td>
							<td><xsl:value-of select="directive-measuring-others/cadmium/analysis"/></td>
							<td><xsl:value-of select="directive-measuring-others/nickel/sampling"/></td>
							<td><xsl:value-of select="directive-measuring-others/nickel/analysis"/></td>
							<td><xsl:value-of select="directive-measuring-others/bap/sampling"/></td>
							<td><xsl:value-of select="directive-measuring-others/bap/analysis"/></td>
							<td><xsl:value-of select="station-function"/></td>
						</tr>
					</xsl:for-each>
				</tbody>
			</table>
		</body>
	</html>
</xsl:template>
</xsl:stylesheet>