title: XSLT interpreting tags with spaces as empty tags
body: <p>I have an XSLT that is transformed to an XML using <code>System.Xml.Xsl.XslCompiledTransform</code>. The problem is that tags with spaces are converted to empty tags. Below is a minimal sample to reproduce the problem.</p>
  
  <p>Original data:</p>
  
  <pre><code>&lt;data&gt;
    &lt;content&gt;A&lt;/content&gt;
    &lt;content&gt; &lt;/content&gt;
    &lt;content&gt;B&lt;/content&gt;
  &lt;/data&gt;
  </code></pre>
  
  <p>Output data:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;data&gt;
    &lt;content&gt;A&lt;/content&gt;
    &lt;content /&gt;
    &lt;content&gt;B&lt;/content&gt;
  &lt;/data&gt;
  </code></pre>
  
  <p><strong>The second tag is wrong! The space must not be eaten like that.</strong></p>
  
  <p>And the <strong>XSLT</strong>:</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:output method="xml" indent="yes"/&gt;
  &lt;xsl:preserve-space elements="content"/&gt;
  &lt;xsl:template match="//data"&gt;
    &lt;xsl:copy-of select="." /&gt;
  &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>Is the XSLT wrong? Or should I blame the .NET XSL transformer (I've tried both 3.5 SP1 and 4.0)?</p>
  
  <p>Please help!</p>