title: Xpath function to remove white space
body: <p>Im trying to use XSL and Xpath functions to remove all the white space from a XML attribute called name and make it lower case. At the moment i have something like</p>
  
  <pre><code> &lt;xsl:variable name="linkName"&gt;
   &lt;xsl:value-of select="normalize-space(name)"/&gt;
   &lt;/xsl:variable&gt;
  </code></pre>
  
  <p>This removes the white space at the beginning and end but not the middle. Any suggestions?</p>
  
  <p>What is the best practice for handling and altering XML data as it seems that you can use </p>
  
  <pre><code>&lt;xsl:value-of select="x"/&gt;  
  </code></pre>
  
  <p>placed directly in the HTML</p>
  
  <p>or </p>
  
  <pre><code>&lt;xsl:attribute name="y"&gt;
  &lt;xsl:value-of select="x"/&gt;
  </code></pre>
  
  <p>or use a </p>
  
  <pre><code>&lt;xsl:variable name="x"&gt;
  </code></pre>
  
  <p>I'm not really sure of the differences or when each should be used. Any help is much appreciated.</p>
  
  <p>Ally</p>