XML schema |
http://air-climate.eionet.europa.eu/schemas/AirQualityQuestionnaire/AirQualityQuestionnaire-form2.xsd
|
---|---|
Output type | HTML |
Description | HTML |
XSL file | form2.xslt (Last modified: 03 Sep 2009 13:14 ) |
<?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="form2"> <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> <title><xsl:value-of select="$labels/tu[@tuid='lbl-form2-title']/tuv[@xml:lang=$lang]" /></title> </head> <body> <h1> <xsl:value-of select="$labels/tu[@tuid='lbl-form2']/tuv[@xml:lang=$lang]" /> - <xsl:value-of select="$labels/tu[@tuid='lbl-form2-title']/tuv[@xml:lang=$lang]" /> </h1> <table> <thead> <tr> <th><xsl:value-of select="$labels/tu[@tuid='lbl-zone-name']/tuv[@xml:lang=$lang]" /></th> <th><xsl:value-of select="$labels/tu[@tuid='lbl-zone-code']/tuv[@xml:lang=$lang]" /></th> <th><xsl:value-of select="$labels/tu[@tuid='lbl-pollutants']/tuv[@xml:lang=$lang]" /></th> <th><xsl:value-of select="$labels/tu[@tuid='lbl-pollutant-type']/tuv[@xml:lang=$lang]" /></th> <th><xsl:value-of select="$labels/tu[@tuid='lbl-area']/tuv[@xml:lang=$lang]" /></th> <th><xsl:value-of select="$labels/tu[@tuid='lbl-population']/tuv[@xml:lang=$lang]" /></th> <th><xsl:value-of select="$labels/tu[@tuid='lbl-art22-application']/tuv[@xml:lang=$lang]" /></th> <th><xsl:value-of select="$labels/tu[@tuid='lbl-boundary-source']/tuv[@xml:lang=$lang]" /></th> </tr> </thead> <tbody> <xsl:for-each select="form2-row"> <tr> <td><xsl:value-of select="full-zone-name"/></td> <td><xsl:value-of select="zone-code"/></td> <td> <xsl:if test="./pollutants/groups/a | ./pollutants/groups/m | ./pollutants/groups/s | ./pollutants/groups/n = 'true'"> <xsl:if test="./pollutants/groups/a = 'true'">A( <xsl:if test="./pollutants/types/sh = 'true'">SH;</xsl:if> <xsl:if test="./pollutants/types/se = 'true'">SE;</xsl:if> <xsl:if test="./pollutants/types/nh = 'true'">NH;</xsl:if> <xsl:if test="./pollutants/types/nv = 'true'">NV;</xsl:if> <xsl:if test="./pollutants/types/p = 'true'">P;</xsl:if> <xsl:if test="./pollutants/types/l = 'true'">L;</xsl:if> <xsl:if test="./pollutants/types/c = 'true'">C;</xsl:if> <xsl:if test="./pollutants/types/b = 'true'">B;</xsl:if> <xsl:if test="./pollutants/types/o = 'true'">O;</xsl:if> ), </xsl:if> <xsl:if test="./pollutants/groups/m = 'true'">M( <xsl:if test="./pollutants/types/as = 'true'">As;</xsl:if> <xsl:if test="./pollutants/types/cd = 'true'">Cd;</xsl:if> <xsl:if test="./pollutants/types/ni = 'true'">Ni;</xsl:if> <xsl:if test="./pollutants/types/bap = 'true'">BaP;</xsl:if> ), </xsl:if> <xsl:if test="./pollutants/groups/s = 'true'">S( <xsl:if test="./pollutants/types/sh = 'true'">SH;</xsl:if> <xsl:if test="./pollutants/types/se = 'true'">SE;</xsl:if> ), </xsl:if> <xsl:if test="./pollutants/groups/n = 'true'">N( <xsl:if test="./pollutants/types/nh = 'true'">NH;</xsl:if> <xsl:if test="./pollutants/types/nv = 'true'">NV;</xsl:if> ), </xsl:if> </xsl:if> <xsl:if test="./pollutants/groups/a != 'true' and ./pollutants/groups/m != 'true' and ./pollutants/groups/s != 'true' and ./pollutants/groups/n != 'true'"> <xsl:if test="./pollutants/types/sh = 'true'">SH;</xsl:if> <xsl:if test="./pollutants/types/se = 'true'">SE;</xsl:if> <xsl:if test="./pollutants/types/nh = 'true'">NH;</xsl:if> <xsl:if test="./pollutants/types/nv = 'true'">NV;</xsl:if> <xsl:if test="./pollutants/types/p = 'true'">P;</xsl:if> <xsl:if test="./pollutants/types/l = 'true'">L;</xsl:if> <xsl:if test="./pollutants/types/c = 'true'">C;</xsl:if> <xsl:if test="./pollutants/types/b = 'true'">B;</xsl:if> <xsl:if test="./pollutants/types/o = 'true'">O;</xsl:if> <xsl:if test="./pollutants/types/as = 'true'">As;</xsl:if> <xsl:if test="./pollutants/types/cd = 'true'">Cd;</xsl:if> <xsl:if test="./pollutants/types/ni = 'true'">Ni;</xsl:if> <xsl:if test="./pollutants/types/bap = 'true'">BaP;</xsl:if> </xsl:if> </td> <td><xsl:value-of select="type"/></td> <td><xsl:value-of select="area"/></td> <td><xsl:value-of select="population"/></td> <td><xsl:value-of select="art22-application"/></td> <td> <xsl:if test="./source-type = 'file'"> <a href="{source-file}"><xsl:value-of select="source-file" /></a> </xsl:if> <xsl:if test="./source-type = 'codes'"> <xsl:value-of select="source-codes" /> </xsl:if> </td> </tr> </xsl:for-each> </tbody> </table> <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:stylesheet>
European Environment Agency
Kgs. Nytorv 6, DK-1050 Copenhagen K, Denmark