View stylesheet

XML schemas eper.xsd
Output type KML
Description Google Earth .kml file
XSL file eper-to-kml.xslt (Last modified: 18 Jun 2006 12:56 )
<?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" version="1.0">
  <xsl:output method="xml" indent="yes" omit-xml-declaration="no"/>

  <xsl:template match="report">
    <kml xmlns="http://earth.google.com/kml/2.0">
      <Document>
        <name>Eper facilities</name>
        <description>EPER 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="Facility">
        <xsl:sort select="FacilityName"/>
        </xsl:apply-templates>
      </Document>
    </kml>
  </xsl:template>

  <xsl:template match="Facility">
    <Placemark>
      <name>
        <xsl:value-of select="FacilityName"/>
      </name>
      <description>
        <xsl:apply-templates />
    </description>
      <open>0</open>
      <styleUrl>#facility</styleUrl>
      <Point>
        <coordinates><xsl:value-of select="Longitude"/>,<xsl:value-of select="Latitude"/>,0</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="Activity|Emission|SubmissionDate|Country|ReportYear" />

</xsl:stylesheet>