XML schema |
http://wise2.jrc.it/wfdwebinterface/xmlschemas/ProtArea.xsd
|
---|---|
Output type | KML |
Description | Show locations in Google Earth |
XSL file | ProtArea_KML.xsl (Last modified: 26 Jun 2008 12:53 ) |
<?xml version="1.0" encoding="UTF-8"?> <!-- Generate KML 2.0 --> <!-- xmlns:wf="http://wise.jrc.cec.eu.int" --> <xsl:stylesheet exclude-result-prefixes="wf" xmlns="http://earth.google.com/kml/2.0" xmlns:wf="http://wise2.jrc.it" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" omit-xml-declaration="no" encoding="UTF-8"/> <xsl:template match="wf:ProtectedAreas"> <kml xmlns="http://earth.google.com/kml/2.0"> <Document> <name>WFD Protected areas</name> <description>Water Framework Directive Article 5 Submission for <xsl:call-template name="Country"> <xsl:with-param name="MS" select="wf:C_CD"/> </xsl:call-template><xsl:text><br/></xsl:text> Water basin district: <xsl:value-of select="wf:DIST_CD"/></description> <Style id="area"> <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/> </Document> </kml> </xsl:template> <xsl:template match="wf:ProtectedArea"> <Placemark> <name> <xsl:value-of select="wf:EU_CD"/> - <xsl:value-of select="wf:NAME"/> </name> <description> <xsl:apply-templates /> </description> <open>0</open> <styleUrl>#area</styleUrl> <Point> <coordinates><xsl:value-of select="wf:LON"/>,<xsl:value-of select="wf:LAT"/></coordinates> </Point> </Placemark> </xsl:template> <xsl:template match="*"> <xsl:value-of select="local-name()"/>: <xsl:value-of select="."/><xsl:text><br/></xsl:text> </xsl:template> <!-- Country implementation --> <xsl:template name="Country"> <xsl:param name="MS"/> <xsl:choose> <xsl:when test="$MS='UK'">United Kingdom</xsl:when> <xsl:when test="$MS='IE'">Ireland</xsl:when> <xsl:when test="$MS='FR'">France</xsl:when> <xsl:when test="$MS='DE'">Germany</xsl:when> <xsl:when test="$MS='AT'">Austria</xsl:when> <xsl:when test="$MS='BE'">Belgium</xsl:when> <xsl:when test="$MS='BG'">Bulgaria</xsl:when> <xsl:when test="$MS='CH'">Switzerland</xsl:when> <xsl:when test="$MS='CZ'">Czech Republic</xsl:when> <xsl:when test="$MS='CY'">Cyprus</xsl:when> <xsl:when test="$MS='DK'">Denmark</xsl:when> <xsl:when test="$MS='EE'">Estonia</xsl:when> <xsl:when test="$MS='ES'">Spain</xsl:when> <xsl:when test="$MS='FI'">Finland</xsl:when> <xsl:when test="$MS='GR'">Greece</xsl:when> <xsl:when test="$MS='HU'">Hungary</xsl:when> <xsl:when test="$MS='IS'">Iceland</xsl:when> <xsl:when test="$MS='IT'">Italy</xsl:when> <xsl:when test="$MS='LT'">Lithuania</xsl:when> <xsl:when test="$MS='LU'">Luxembourg</xsl:when> <xsl:when test="$MS='LV'">Latvia</xsl:when> <xsl:when test="$MS='MT'">Malta</xsl:when> <xsl:when test="$MS='NO'">Norway</xsl:when> <xsl:when test="$MS='NL'">The Netherlands</xsl:when> <xsl:when test="$MS='PL'">Poland</xsl:when> <xsl:when test="$MS='PT'">Portugal</xsl:when> <xsl:when test="$MS='RO'">Romania</xsl:when> <xsl:when test="$MS='SE'">Sweden</xsl:when> <xsl:when test="$MS='SI'">Slovenia</xsl:when> <xsl:when test="$MS='SK'">Slovakia</xsl:when> <xsl:when test="$MS='TR'">Turkey</xsl:when> </xsl:choose> </xsl:template> <!-- YesNoUnknown implementation --> <xsl:template name="YesNoUnknown"> <xsl:param name="YNU"/> <xsl:choose> <xsl:when test="$YNU = 'Y'">Yes</xsl:when> <xsl:when test="$YNU = 'N'">No</xsl:when> <xsl:when test="$YNU = 'U'">Unknown</xsl:when> </xsl:choose> </xsl:template> </xsl:stylesheet>
European Environment Agency
Kgs. Nytorv 6, DK-1050 Copenhagen K, Denmark