View stylesheet

XML schemas http://rod.eionet.europa.eu/obligations/137?V200807
Output type XML
Depends on
Description Generates Form 14
XSL file aqq_form14.xslt (Last modified: 10 Sep 2009 12:23 )
<?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="/">
	    <form14 xsi:noNamespaceSchemaLocation="http://air-climate.eionet.europa.eu/schemas/AirQualityQuestionnaire/AirQualityQuestionnaire-form14.xsd"
			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
			xml:lang="en">
			<form14a>
				<xsl:for-each select="//table:table[@table:name='14a']/table:table-row[position()=4 or (position()&gt;4 and ./table:table-cell/text:p)]">
					<form14a-row>
						<zone-code>
							<xsl:value-of select="table:table-cell[1]/text:p"/>
						</zone-code>
						<eoi-station-code>
							<xsl:value-of select="table:table-cell[2]/text:p"/>
						</eoi-station-code>
						<exceedence-number>
							<xsl:value-of select="table:table-cell[3]/text:p"/>
						</exceedence-number>
						<calendar-years>
							<xsl:value-of select="table:table-cell[4]/text:p"/>
						</calendar-years>
					</form14a-row>
				</xsl:for-each>
			</form14a>
			<form14b>
				<xsl:for-each select="//table:table[@table:name='14b']/table:table-row[position()=4 or (position()&gt;4 and ./table:table-cell/text:p)]">
					<form14b-row>
						<zone-code>
							<xsl:value-of select="table:table-cell[1]/text:p"/>
						</zone-code>
						<eoi-station-code>
							<xsl:value-of select="table:table-cell[2]/text:p"/>
						</eoi-station-code>
						<aot40-average>
							<xsl:value-of select="table:table-cell[3]/text:p"/>
						</aot40-average>
						<calendar-years>
							<xsl:value-of select="table:table-cell[4]/text:p"/>
						</calendar-years>
					</form14b-row>
				</xsl:for-each>
			</form14b>
			<form14c>
				<xsl:for-each select="//table:table[@table:name='14c']/table:table-row[position()=6 or (position()&gt;6 and ./table:table-cell/text:p)]">
					<form14c-row>
						<zone-code><xsl:value-of select="table:table-cell[1]/text:p"/></zone-code>
						<eoi-station-code><xsl:value-of select="table:table-cell[2]/text:p"/></eoi-station-code>
						<arsenic>
							<concentration><xsl:value-of select="table:table-cell[3]/text:p"/></concentration>
							<area>
								<km2><xsl:value-of select="table:table-cell[4]/text:p"/></km2>
								<method><xsl:value-of select="table:table-cell[5]/text:p"/></method>
							</area>
							<population>
								<number><xsl:value-of select="table:table-cell[6]/text:p"/></number>
								<method><xsl:value-of select="table:table-cell[7]/text:p"/></method>
							</population>
							<reason-code><xsl:value-of select="table:table-cell[8]/text:p"/></reason-code>
						</arsenic>
						<cadmium>
							<concentration><xsl:value-of select="table:table-cell[9]/text:p"/></concentration>
							<area>
								<km2><xsl:value-of select="table:table-cell[10]/text:p"/></km2>
								<method><xsl:value-of select="table:table-cell[11]/text:p"/></method>
							</area>
							<population>
								<number><xsl:value-of select="table:table-cell[12]/text:p"/></number>
								<method><xsl:value-of select="table:table-cell[13]/text:p"/></method>
							</population>
							<reason-code><xsl:value-of select="table:table-cell[14]/text:p"/></reason-code>
						</cadmium>
						<nickel>
							<concentration><xsl:value-of select="table:table-cell[15]/text:p"/></concentration>
							<area>
								<km2><xsl:value-of select="table:table-cell[16]/text:p"/></km2>
								<method><xsl:value-of select="table:table-cell[17]/text:p"/></method>
							</area>
							<population>
								<number><xsl:value-of select="table:table-cell[18]/text:p"/></number>
								<method><xsl:value-of select="table:table-cell[19]/text:p"/></method>
							</population>
							<reason-code><xsl:value-of select="table:table-cell[20]/text:p"/></reason-code>
						</nickel>
						<benzo-a-pyrene>
							<concentration><xsl:value-of select="table:table-cell[21]/text:p"/></concentration>
							<area>
								<km2><xsl:value-of select="table:table-cell[22]/text:p"/></km2>
								<method><xsl:value-of select="table:table-cell[23]/text:p"/></method>
							</area>
							<population>
								<number><xsl:value-of select="table:table-cell[24]/text:p"/></number>
								<method><xsl:value-of select="table:table-cell[25]/text:p"/></method>
							</population>
							<reason-code><xsl:value-of select="table:table-cell[26]/text:p"/></reason-code>
						</benzo-a-pyrene>
					</form14c-row>
				</xsl:for-each>
			</form14c>
			<form14d>
				<xsl:for-each select="//table:table[@table:name='14d']/table:table-row[position()=4 or (position()&gt;4 and ./table:table-cell/text:p)]">
					<form14d-row>
						<zone-code>
							<xsl:value-of select="table:table-cell[1]/text:p"/>
						</zone-code>
						<eoi-station-code>
							<xsl:value-of select="table:table-cell[2]/text:p"/>
						</eoi-station-code>
						<concentration>
							<xsl:value-of select="table:table-cell[3]/text:p"/>
						</concentration>
						<reason-code>
							<xsl:value-of select="table:table-cell[4]/text:p"/>
						</reason-code>
					</form14d-row>
				</xsl:for-each>
			</form14d>
			<form-comments/>
		</form14>
		</xsl:template>
</xsl:stylesheet>