title: XSLT converting string number with whitespace to number
body: <p>I have a problem with xslt trasformation.<br>
  How to convert number: "<em>2 402.83</em>" to numeber. Unfortunely when I use function <code>number(string(.))</code> I get NaN. I try to use replace function <code>number(replace(string(.), ' ', ''))</code>, but it returns nothing (exception in js: <em>Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.</em>). </p>
  
  <p>My xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;catalog&gt;
     &lt;cd number="1" price="2 402.82"/&gt;
  &lt;/catalog&gt;
  </code></pre>
  
  <p>My xslt:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
  &lt;xsl:template match="/"&gt;
    &lt;html&gt;
    &lt;body&gt;
      &lt;xsl:for-each select="catalog/cd"&gt;
        &lt;xsl:for-each select="@price"&gt;
          &lt;span&gt;                                      
            &lt;xsl:value-of select="number(replace(string(.),' ', ''))" /&gt;
          &lt;/span&gt;
        &lt;/xsl:for-each&gt;
       &lt;/xsl:for-each&gt;                                
    &lt;/body&gt;
    &lt;/html&gt;
  &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>