View stylesheet

XML schemas http://rod.eionet.europa.eu/obligations/137?V200807
Output type XML
Depends on aqq_content.xslt
Description Generates Form 8
XSL file aqq_form08.xslt (Last modified: 22 Oct 2009 11:43 )
<?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="/">
	    <form8 xsi:noNamespaceSchemaLocation="http://air-climate.eionet.europa.eu/schemas/AirQualityQuestionnaire/AirQualityQuestionnaire-form8.xsd"
			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
			xml:lang="en">
			<form8a>
				<xsl:for-each select="//table:table[@table:name='8a']/table:table-row[position()=5 or (position()&gt;5 and ./table:table-cell/text:p)]">
					<form8a-row>
						<zone-code>
							<xsl:value-of select="table:table-cell[1]/text:p"/>
						</zone-code>
						<lv-health-1>
							<lv-mot>
								<xsl:value-of select="table:table-cell[2]/text:p"/>
							</lv-mot>
							<lv-mot-lv>
								<xsl:value-of select="table:table-cell[3]/text:p"/>
							</lv-mot-lv>
							<lv>
								<xsl:value-of select="table:table-cell[4]/text:p"/>
							</lv>
						</lv-health-1>
						<lv-health-24>
							<gt-lv>
								<xsl:value-of select="table:table-cell[5]/text:p"/>
							</gt-lv>
							<lt-lv>
								<xsl:value-of select="table:table-cell[6]/text:p"/>
							</lt-lv>
						</lv-health-24>
						<lv-health-y>
							<gt-lv>
								<xsl:value-of select="table:table-cell[7]/text:p"/>
							</gt-lv>
							<lt-lv>
								<xsl:value-of select="table:table-cell[8]/text:p"/>
							</lt-lv>
						</lv-health-y>
						<lv-health-w>
							<gt-lv>
								<xsl:value-of select="table:table-cell[9]/text:p"/>
							</gt-lv>
							<lt-lv>
								<xsl:value-of select="table:table-cell[10]/text:p"/>
							</lt-lv>
						</lv-health-w>
					</form8a-row>
				</xsl:for-each>
			</form8a>
			<form8b>
				<xsl:for-each select="//table:table[@table:name='8b']/table:table-row[position()=5 or (position()&gt;5 and ./table:table-cell/text:p)]">
					<form8b-row>
						<zone-code>
							<xsl:value-of select="table:table-cell[1]/text:p"/>
						</zone-code>
						<lv-health-1>
							<lv-mot>
								<xsl:value-of select="table:table-cell[2]/text:p"/>
							</lv-mot>
							<lv-mot-lv>
								<xsl:value-of select="table:table-cell[3]/text:p"/>
							</lv-mot-lv>
							<lv>
								<xsl:value-of select="table:table-cell[4]/text:p"/>
							</lv>
						</lv-health-1>
						<lv-health-y>
							<lv-mot>
								<xsl:value-of select="table:table-cell[5]/text:p"/>
							</lv-mot>
							<lv-mot-lv>
								<xsl:value-of select="table:table-cell[6]/text:p"/>
							</lv-mot-lv>
							<lv>
								<xsl:value-of select="table:table-cell[7]/text:p"/>
							</lv>
						</lv-health-y>
						<lv-health-veg>
							<gt-lv>
								<xsl:value-of select="table:table-cell[8]/text:p"/>
							</gt-lv>
							<lt-lv>
								<xsl:value-of select="table:table-cell[9]/text:p"/>
							</lt-lv>
						</lv-health-veg>
					</form8b-row>
				</xsl:for-each>
			</form8b>
			<form8c>
				<xsl:for-each select="//table:table[@table:name='8c']/table:table-row[position()=5 or (position()&gt;5 and ./table:table-cell/text:p)]">
					<form8c-row>
						<zone-code>
							<xsl:value-of select="table:table-cell[1]/text:p"/>
						</zone-code>
						<lv-24-stage1>
							<lv-mot>
								<xsl:value-of select="table:table-cell[2]/text:p"/>
							</lv-mot>
							<lv-mot-lv>
								<xsl:value-of select="table:table-cell[3]/text:p"/>
							</lv-mot-lv>
							<lv>
								<xsl:value-of select="table:table-cell[4]/text:p"/>
							</lv>
						</lv-24-stage1>
						<lv-y-stage1>
							<lv-mot>
								<xsl:value-of select="table:table-cell[5]/text:p"/>
							</lv-mot>
							<lv-mot-lv>
								<xsl:value-of select="table:table-cell[6]/text:p"/>
							</lv-mot-lv>
							<lv>
								<xsl:value-of select="table:table-cell[7]/text:p"/>
							</lv>
						</lv-y-stage1>
						<lv-24-stage2>
							<gt-lv>
								<xsl:value-of select="table:table-cell[8]/text:p"/>
							</gt-lv>
							<lt-lv>
								<xsl:value-of select="table:table-cell[9]/text:p"/>
							</lt-lv>
						</lv-24-stage2>
						<lv-y-stage2>
							<lv-mot>
								<xsl:value-of select="table:table-cell[10]/text:p"/>
							</lv-mot>
							<lv-mot-lv>
								<xsl:value-of select="table:table-cell[11]/text:p"/>
							</lv-mot-lv>
							<lv>
								<xsl:value-of select="table:table-cell[12]/text:p"/>
							</lv>
						</lv-y-stage2>
					</form8c-row>
				</xsl:for-each>
			</form8c>
			<form8d>
				<xsl:for-each select="//table:table[@table:name='8d']/table:table-row[position()=5 or (position()&gt;5 and ./table:table-cell/text:p)]">
					<form8d-row>
						<zone-code>
							<xsl:value-of select="table:table-cell[1]/text:p"/>
						</zone-code>
						<lv>
							<lv-mot>
								<xsl:value-of select="table:table-cell[2]/text:p"/>
							</lv-mot>
							<lv-mot-lv>
								<xsl:value-of select="table:table-cell[3]/text:p"/>
							</lv-mot-lv>
							<lv>
								<xsl:value-of select="table:table-cell[4]/text:p"/>
							</lv>
							<ss>
								<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>
							</ss>
						</lv>
					</form8d-row>
				</xsl:for-each>
			</form8d>
			<form8e>
				<xsl:for-each select="//table:table[@table:name='8e']/table:table-row[position()=5 or (position()&gt;5 and ./table:table-cell/text:p)]">
					<form8e-row>
						<zone-code>
							<xsl:value-of select="table:table-cell[1]/text:p"/>
						</zone-code>
						<lv>
							<lv-mot>
								<xsl:value-of select="table:table-cell[2]/text:p"/>
							</lv-mot>
							<lv-mot-lv>
								<xsl:value-of select="table:table-cell[3]/text:p"/>
							</lv-mot-lv>
							<lv>
								<xsl:value-of select="table:table-cell[4]/text:p"/>
							</lv>
							<art-3-2>
								<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>
							</art-3-2>
						</lv>
					</form8e-row>
				</xsl:for-each>
			</form8e>
			<form8f>
				<xsl:for-each select="//table:table[@table:name='8f']/table:table-row[position()=5 or (position()&gt;5 and ./table:table-cell/text:p)]">
					<form8f-row>
						<zone-code>
							<xsl:value-of select="table:table-cell[1]/text:p"/>
						</zone-code>
						<lv>
							<lv-mot>
								<xsl:value-of select="table:table-cell[2]/text:p"/>
							</lv-mot>
							<lv-mot-lv>
								<xsl:value-of select="table:table-cell[3]/text:p"/>
							</lv-mot-lv>
							<lv>
								<xsl:value-of select="table:table-cell[4]/text:p"/>
							</lv>
						</lv>
					</form8f-row>
				</xsl:for-each>
			</form8f>
			<form-comments/>
		</form8>
		</xsl:template>
</xsl:stylesheet>