View stylesheet

XML schemas http://rod.eionet.europa.eu/obligations/137?V200807
Output type XML
Depends on aqq_content.xslt
Description Generates Form 3
XSL file aqq_form03.xslt (Last modified: 22 Oct 2009 11:42 )
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
	xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
	xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0">
	
	<xsl:output method="xml" indent="yes"/>

	<xsl:template match="/">
		<form3 xsi:noNamespaceSchemaLocation="http://air-climate.eionet.europa.eu/schemas/AirQualityQuestionnaire/AirQualityQuestionnaire-form3.xsd"
			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
			xml:lang="en">
			<xsl:for-each select="//table:table[@table:name=3]/table:table-row[position() = 5 or (position() &gt; 5 and ./table:table-cell/text:p)]">
				<form3-row>
					<eoi-station-code>
						<xsl:value-of select="./table:table-cell[1]/text:p"/>
					</eoi-station-code>
					<local-station-code>
						<xsl:value-of select="./table:table-cell[2]/text:p"/>
					</local-station-code>
					<zone-code>
						<xsl:value-of select="./table:table-cell[3]/text:p"/>
					</zone-code>
					<use-directive>
						<so2>
							<xsl:if test="table:table-cell[4]/text:p = 'y'">
								<xsl:text>true</xsl:text>
							</xsl:if>
							<xsl:if test="table:table-cell[4]/text:p != 'y'">
								<xsl:text>false</xsl:text>
							</xsl:if>
						</so2>
						<no2>
							<xsl:if test="table:table-cell[5]/text:p = 'y'">
								<xsl:text>true</xsl:text>
							</xsl:if>
							<xsl:if test="table:table-cell[5]/text:p != 'y'">
								<xsl:text>false</xsl:text>
							</xsl:if>
						</no2>
						<nox>
							<xsl:if test="table:table-cell[6]/text:p = 'y'">
								<xsl:text>true</xsl:text>
							</xsl:if>
							<xsl:if test="table:table-cell[6]/text:p != 'y'">
								<xsl:text>false</xsl:text>
							</xsl:if>
						</nox>
						<lead>
							<xsl:if test="table:table-cell[7]/text:p = 'y'">
								<xsl:text>true</xsl:text>
							</xsl:if>
							<xsl:if test="table:table-cell[7]/text:p != 'y'">
								<xsl:text>false</xsl:text>
							</xsl:if>
						</lead>
						<benzene>
							<xsl:if test="table:table-cell[8]/text:p = 'y'">
								<xsl:text>true</xsl:text>
							</xsl:if>
							<xsl:if test="table:table-cell[8]/text:p != 'y'">
								<xsl:text>false</xsl:text>
							</xsl:if>
						</benzene>
						<co>
							<xsl:if test="table:table-cell[9]/text:p = 'y'">
								<xsl:text>true</xsl:text>
							</xsl:if>
							<xsl:if test="table:table-cell[9]/text:p != 'y'">
								<xsl:text>false</xsl:text>
							</xsl:if>
						</co>
					</use-directive>
					<directive-measuring-meth>
						<pm10>
							<xsl:value-of select="./table:table-cell[10]/text:p"/>
						</pm10>
						<pm25>
							<xsl:value-of select="./table:table-cell[11]/text:p"/>
						</pm25>
					</directive-measuring-meth>
					<correction-factor>
						<pm10>
							<xsl:value-of select="./table:table-cell[12]/text:p"/>
						</pm10>
						<pm25>
							<xsl:value-of select="./table:table-cell[13]/text:p"/>
						</pm25>
					</correction-factor>
					<directive-measuring-others>
						<arsenic>
							<sampling>
								<xsl:value-of select="./table:table-cell[14]/text:p"/>
							</sampling>
							<analysis>
								<xsl:value-of select="./table:table-cell[15]/text:p"/>
							</analysis>
						</arsenic>
						<cadmium>
							<sampling>
								<xsl:value-of select="./table:table-cell[16]/text:p"/>
							</sampling>
							<analysis>
								<xsl:value-of select="./table:table-cell[17]/text:p"/>
							</analysis>
						</cadmium>
						<nickel>
							<sampling>
								<xsl:value-of select="./table:table-cell[18]/text:p"/>
							</sampling>
							<analysis>
								<xsl:value-of select="./table:table-cell[19]/text:p"/>
							</analysis>
						</nickel>
						<bap>
							<sampling>
								<xsl:value-of select="./table:table-cell[20]/text:p"/>
							</sampling>
							<analysis>
								<xsl:value-of select="./table:table-cell[21]/text:p"/>
							</analysis>
						</bap>
					</directive-measuring-others>
					<station-function>
						<xsl:value-of select="./table:table-cell[22]/text:p"/>
					</station-function>
				</form3-row>
			</xsl:for-each>
			<form-comments/>
		</form3>
	</xsl:template>
</xsl:stylesheet>