View stylesheet

XML schemas http://water.eionet.europa.eu/schemas/dir200060ec/SurfaceWaterMonitoringStations.xsd
Output type KML
Description Show stations in Google Earth
XSL file swmstation-to-kml.xsl (Last modified: 31 Aug 2007 09:06 )
<?xml version="1.0" encoding="UTF-8"?>
<!--
      Generate KML 2.0
  -->
<xsl:stylesheet xmlns="http://earth.google.com/kml/2.0"
     xmlns:wise="http://wise.jrc.cec.eu.int"
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="wise:SURFACEWATERMONITORINGSTATIONS">
    <kml xmlns="http://earth.google.com/kml/2.0">
      <Document>
        <name>Surface water monitoring stations</name>
        <description>Surface water monitoring stations 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="wise:SURFACEWATERMONITORINGSTATION">
        <xsl:sort select="wise:NAME"/>
        </xsl:apply-templates>
      </Document>
    </kml>
  </xsl:template>

  <xsl:template match="wise:SURFACEWATERMONITORINGSTATION">
    <Placemark>
      <name>
        <xsl:value-of select="wise:NAME"/>
      </name>
      <description>
        <xsl:apply-templates />
    </description>
      <open>0</open>
      <styleUrl>#facility</styleUrl>
      <Point>
        <coordinates><xsl:value-of select="wise:LON"/>,<xsl:value-of select="wise:LAT"/></coordinates>
      </Point>
    </Placemark>
  </xsl:template>

  <xsl:template match="wise:EU_CD|wise:MS_CD|wise:DRINK_WATER|wise:URL">
    <xsl:value-of select="local-name()"/>: <xsl:value-of select="."/><xsl:text>&lt;br/&gt;</xsl:text>
  </xsl:template>

<xsl:template match="*" />

</xsl:stylesheet>