View stylesheet

XML schemas http://dd.eionet.europa.eu/GetSchema?id=TBL5078
Output type KML
Description Show in Google Earth
XSL file dd5078-to-kml.xsl (Last modified: 13 Nov 2008 11:44 )
<?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:dd593="http://dd.eionet.europa.eu/namespace.jsp?ns_id=593"

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

  <xsl:template match="dd499:DF5_MRoad">
    <kml xmlns="http://earth.google.com/kml/2.0">
      <Document>
        <name>DF5: Major Road</name>
        <description>Environmental Noise Directive</description>
        <Style id="roadsegment">
          <LineStyle>
            <color>7fff0000</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="dd593:NationalRoadID"/> - <xsl:value-of select="dd593:NationalRoadName"/></name>
      <description>
        <xsl:apply-templates/>
      </description>
      <open>0</open>
      <styleUrl>#roadsegment</styleUrl>
      <LineString>
        <coordinates>
        <xsl:value-of select="dd593:LocRoadStartNodeX1"/>,<xsl:value-of select="dd593:LocRoadStartNodeY1"/>,0
        <xsl:value-of select="dd593:LocRoadEndNodeX2"/>,<xsl:value-of select="dd593:LocRoadEndNodeY2"/>,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>