View stylesheet

XML schema http://dd.eionet.europa.eu/GetSchema?id=TBL5079
Output type KML
Description Show in Google Earth
XSL file dd5079-to-kml.xsl (Last modified: 13 Nov 2008 11:45 )
<?xml version="1.0" encoding="UTF-8"?>
<!--
      Generate KML 2.0
  -->
<xsl:stylesheet xmlns="http://earth.google.com/kml/2.0"
xmlns:dd499="http://dd.eionet.europa.eu/namespace.jsp?ns_id=499"
xmlns:dd594="http://dd.eionet.europa.eu/namespace.jsp?ns_id=594"

      xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="dd499 dd594" version="1.0">
  <xsl:output method="xml" omit-xml-declaration="no"/>

  <xsl:template match="dd499:DF5_MRail">
    <kml xmlns="http://earth.google.com/kml/2.0">
      <Document>
        <name>DF5: Major Rail</name>
        <description>Environmental Noise Directive</description>
        <Style id="railsegment">
          <LineStyle>
            <color>7f000000</color>
            <width>3</width>
          </LineStyle>
          <LabelStyle>
            <scale>1.0</scale>
          </LabelStyle>
        </Style>
        <xsl:apply-templates/>
      </Document>
    </kml>
  </xsl:template>

  <xsl:template match="dd499:Row">
    <Placemark>
      <name><xsl:value-of select="dd594:NationalRailID1"/> - <xsl:value-of select="dd594:UniqueRailID"/></name>
      <description>
        <xsl:apply-templates/>
      </description>
      <open>0</open>
      <styleUrl>#railsegment</styleUrl>
      <LineString>
        <coordinates>
        <xsl:value-of select="dd594:LocRailStartNodeX1"/>,<xsl:value-of select="dd594:LocRailStartNodeY1"/>,0
        <xsl:value-of select="dd594:LocRailEndNodeX2"/>,<xsl:value-of select="dd594:LocRailEndNodeY2"/>,0
        </coordinates>
      </LineString>
    </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:stylesheet>