View stylesheet

XML schema http://www.eionet.europa.eu/schemas/eprtr/PollutantReleaseAndTransferReport_2p0.xsd
Output type KML
Description Show Facilities in Google Earth
XSL file eprtr-to-kml.xslt (Last modified: 07 May 2009 14:34 )
<?xml version="1.0" encoding="UTF-8"?>
<!--
      Generate KML 2.0
  -->
<xsl:stylesheet xmlns="http://earth.google.com/kml/2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:rsm="urn:eu:com:env:prtr:data:standard:2" 
    version="1.0">
  <xsl:output method="xml" indent="yes" omit-xml-declaration="no"/>

  <xsl:template match="rsm:PollutantReleaseAndTransferReport">
    <kml xmlns="http://earth.google.com/kml/2.0">
      <Document>
        <name>E-PRTR facilities</name>
        <description>E-PRTR facilities in Europe</description>
        <Style id="facility">
          <IconStyle>
            <scale>1.0</scale>
            <Icon>
                                <href>root://icons/palette-4.png</href>
                                <x>32</x>
                                <y>128</y>
                                <w>32</w>
                                <h>32</h>
            </Icon>
          </IconStyle>
          <LabelStyle>
            <scale>1.0</scale>
          </LabelStyle>
        </Style>
        <xsl:apply-templates select="rsm:FacilityReport">
        <xsl:sort select="rsm:FacilityName"/>
        </xsl:apply-templates>
      </Document>
    </kml>
  </xsl:template>

  <xsl:template match="rsm:FacilityReport">
    <Placemark>
      <name>
        <xsl:value-of select="rsm:FacilityName"/>
      </name>
      <description>
        <xsl:apply-templates />
    </description>
      <open>0</open>
      <styleUrl>#facility</styleUrl>
      <Point>
        <coordinates><xsl:value-of select="rsm:GeographicalCoordinate/rsm:LongitudeMeasure"/>,<xsl:value-of select="rsm:GeographicalCoordinate/rsm:LatitudeMeasure"/></coordinates>
      </Point>
    </Placemark>
  </xsl:template>

  <xsl:template match="*">
    <xsl:value-of select="local-name()"/>: <xsl:value-of select="."/><xsl:text>&lt;br/&gt;</xsl:text>
  </xsl:template>

<xsl:template match="rsm:GeographicalCoordinate|rsm:Activity|rsm:PollutantRelease|rsm:PollutantTransfer|rsm:WasteTransfer" />

</xsl:stylesheet>