Source Code for Me (s-c.me)

Allows you to paste souce code to blogs! Adapted for Twitter! Here is Search Form in case you missed your code.
Code:
Selected Language:
Show Linenumbers:
Short link for Twitter:
HTML:

HTML view:

Copy Source | Copy HTML
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <xsl:stylesheet version="1.0" xmlns="http://earth.google.com/kml/2.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3.     <xsl:output method="xml" />
  4.     <xsl:template match="/">
  5.         <kml>
  6.             <Document>
  7.                 <name>
  8.                     Spreadsheets name
  9.                 </name>
  10.                 <xsl:apply-templates />
  11.             </Document>
  12.         </kml>
  13.     </xsl:template>
  14.     <xsl:template match="sheet">
  15.         <xsl:for-each select="row[@row >= 2]">
  16.             <Placemark>
  17.                 <Snippet maxLines="0"></Snippet>
  18.                 <name>
  19.                     <xsl:value-of select="cell[@col=0]" />
  20.                 </name>
  21.                 <description>
  22.                     <![CDATA[
  23.                         <b>Length:</b><br>
  24.                         Seg: ]]><xsl:value-of select="format-number(cell[@col=3]/@value,'#.000')" /><![CDATA[ ,km<br>
  25.                         Sum: ]]><xsl:value-of select="format-number(cell[@col=4]/@value,'#.000')" /><![CDATA[ ,km<br>
  26.                     ]]>
  27.                 </description>
  28.                 <Point>
  29.                     <coordinates>
  30.                         <xsl:value-of select="cell[@col=2]/@value" />,
  31.                         <xsl:value-of select="cell[@col=1]/@value" />
  32.                     </coordinates>
  33.                 </Point>
  34.             </Placemark>
  35.         </xsl:for-each>
  36.     </xsl:template>
  37. </xsl:stylesheet>
  38.  




Based on Manoli.Net's CodeFormatter. Made by Topbot (c) 2008-2017