title: How to replace commas with spaces in XSL
body: <p>I need to replace every other comma with a space in my XML output. Right now, I have latitude and longitude that looks like this:</p>
  
  <pre><code>-0.52437106918239,0.391509433962264,-0.533805031446541,0.430817610062893,0 
  -0.547955974842767,0.427672955974843,
  </code></pre>
  
  <p>I need the coordinates in my XML output to look like this:</p>
  
  <pre><code>-0.52437106918239 0.391509433962264, -0.533805031446541 0.430817610062893,0   
  -0.547955974842767 0.427672955974843
  </code></pre>
  
  <p>How can I use XSLT to do this? Here is my xsl:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
  &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"    
  xmlns:kml="http://www.opengis.net/kml/2.2"&gt;
  &lt;xsl:output method="text"/&gt;
  
  &lt;xsl:template match="/"&gt;
  &lt;xsl:apply-templates select="kml:kml/kml:Document/kml:Placemark/kml:Polygon  
  /kml:outerBoundaryIs/kml:LinearRing"/&gt;
  &lt;/xsl:template&gt;
  
    &lt;xsl:template match="kml:LinearRing"&gt;
  "POLYGON((&lt;xsl:value-of select="kml:coordinates"/&gt;))"
   &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>