Google Maps/POIs.kml.xsl: Unterschied zwischen den Versionen

Aus Geoinformation HSR
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns="http://earth.google.com/kml/2.1" xmlns:xsl="http://www.w3.org/1999/XSL/T...)
 
Zeile 1: Zeile 1:
  <?xml version="1.0" encoding="UTF-8"?>
+
<code>
    <xsl:stylesheet version="1.0"
 
      xmlns="http://earth.google.com/kml/2.1"
 
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
    <xsl:output method="xml" indent="yes"/>
 
  
     <xsl:template match="/">
+
<?xml version="1.0" encoding="UTF-8"?>
      <kml xmlns="http://earth.google.com/kml/2.1">
+
  <xsl:stylesheet version="1.0"
        <Document>
+
    xmlns="http://earth.google.com/kml/2.1"
          <name>My POIs</name>
+
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
          <description>My Points of Interest (Source: from EditGrid.com)</description>
+
  <xsl:output method="xml" indent="yes"/>
          <xsl:apply-templates/>
+
 
        </Document>
+
  <xsl:template match="/">
       </kml>
+
    <kml xmlns="http://earth.google.com/kml/2.1">
     </xsl:template>
+
      <Document>
 +
        <name>My POIs</name>
 +
        <description>My Points of Interest (Source: from EditGrid.com)</description>
 +
        <xsl:apply-templates/>
 +
      </Document>
 +
    </kml>
 +
  </xsl:template>
 +
 
 +
  <xsl:template match="sheet">
 +
    <name>POIs</name>
 +
 
 +
    <xsl:for-each select="row">
 +
       <xsl:if test="position() &gt; 1">
 +
 
 +
        <Placemark>
 +
          <name>
 +
            <xsl:value-of select="cell[@col=2]/@value"/>
 +
          </name>
 +
          <description>
 +
            <xsl:value-of select="cell[@col=3]/@value"/>
 +
          </description>
 +
          <Style>
 +
            <IconStyle>
 +
              <Icon>
 +
                <href>http://maps.google.com/mapfiles/kml/pal2/icon13.png</href>
 +
              </Icon>           
 +
            </IconStyle>
 +
          </Style>
 +
          <Point>
 +
            <extrude>0</extrude>
 +
            <altitudeMode>absolute</altitudeMode>
 +
            <coordinates><xsl:value-of select="cell[@col=1]/@value"/>,<xsl:value-of select="cell[@col=0]/@value"/>,0</coordinates>
 +
          </Point>
 +
        </Placemark>
 +
        <xsl:text>
 +
        &#10;&#13;       
 +
        </xsl:text>
 +
      </xsl:if>
 +
     </xsl:for-each>
 +
  </xsl:template>
 +
 
 +
</xsl:stylesheet>
  
    <xsl:template match="sheet">
+
</code>
      <name>POIs</name>
 
 
 
      <xsl:for-each select="row">
 
        <xsl:if test="position() &gt; 1">
 
 
 
          <Placemark>
 
            <name>
 
              <xsl:value-of select="cell[@col=2]/@value"/>
 
            </name>
 
            <description>
 
              <xsl:value-of select="cell[@col=3]/@value"/>
 
            </description>
 
            <Style>
 
              <IconStyle>
 
                <Icon>
 
                  <href>http://maps.google.com/mapfiles/kml/pal2/icon13.png</href>
 
                </Icon>           
 
              </IconStyle>
 
            </Style>
 
            <Point>
 
              <extrude>0</extrude>
 
              <altitudeMode>absolute</altitudeMode>
 
              <coordinates><xsl:value-of select="cell[@col=1]/@value"/>,<xsl:value-of select="cell[@col=0]/@value"/>,0</coordinates>
 
            </Point>
 
          </Placemark>
 
          <xsl:text>
 
          &#10;&#13;       
 
          </xsl:text>
 
        </xsl:if>
 
      </xsl:for-each>
 
    </xsl:template>
 
 
 
  </xsl:stylesheet>
 

Version vom 22. August 2007, 16:25 Uhr

<?xml version="1.0" encoding="UTF-8"?>

 <xsl:stylesheet version="1.0" 
   xmlns="http://earth.google.com/kml/2.1" 
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:output method="xml" indent="yes"/>
 
 <xsl:template match="/">
   <kml xmlns="http://earth.google.com/kml/2.1">
     <Document>
       <name>My POIs</name>
       <description>My Points of Interest (Source: from EditGrid.com)</description>
       <xsl:apply-templates/>
     </Document>
   </kml>
 </xsl:template>
 
 <xsl:template match="sheet">
   <name>POIs</name>
 
   <xsl:for-each select="row">
     <xsl:if test="position() > 1">
 
       <Placemark>
         <name>
           <xsl:value-of select="cell[@col=2]/@value"/>
         </name>
         <description>
           <xsl:value-of select="cell[@col=3]/@value"/>
         </description>
         <Style>
           <IconStyle>
             <Icon>
               <href>http://maps.google.com/mapfiles/kml/pal2/icon13.png</href>
             </Icon>            
           </IconStyle>
         </Style>
         <Point>
           <extrude>0</extrude>
           <altitudeMode>absolute</altitudeMode>
           <coordinates><xsl:value-of select="cell[@col=1]/@value"/>,<xsl:value-of select="cell[@col=0]/@value"/>,0</coordinates>
         </Point>
       </Placemark>
       <xsl:text>
       
&#13;        
       </xsl:text>
     </xsl:if>
   </xsl:for-each>
 </xsl:template>
 

</xsl:stylesheet>