title: Removing white space inside quotes in XSLT
body: <p>I'm trying to format a table from XML. Lets say I have this line in the XML</p>
  
  <pre><code>&lt;country&gt;Dominican Republic&lt;/country&gt;
  </code></pre>
  
  <p>I would like to get my table to look like this</p>
  
  <pre><code>&lt;td class="country DominicanRepublic"&gt;Dominican Republic&lt;/td&gt;
  </code></pre>
  
  <p>I've tried this:</p>
  
  <pre><code>&lt;td class="country {country}"&gt;&lt;xsl:value-of select="country"/&gt;&lt;/td&gt;
  </code></pre>
  
  <p>then this:</p>
  
  <pre><code>&lt;xsl:element name="td"&gt;
   &lt;xsl:attribute name="class"&gt;
    &lt;xsl:text&gt;country &lt;/xsl:text&gt;
    &lt;xsl:value-of select="normalize-space(country)"/&gt;
   &lt;/xsl:attribute&gt;
  &lt;xsl:value-of select="country"/&gt;
  &lt;/xsl:element&gt;
  </code></pre>
  
  <p>The <code>normalize-space()</code> doesn't remove the space between the two parts of the name and I can't use <code>&lt;xsl:strip-space elements="country"/&gt;</code> because I need the space when I display the name inside the table cell.</p>
  
  <p>How can I strip the space from the value inside the class, but not the text in the cell?</p>