title: XslCompiledTransform not working when the xml file contains xmlns
body: <p>I have a simple XML file with simple XSLT transform and XslCompiledTransform does a good job when I don't have any xmlns in my XML file, but when I do the resulting XML file is empty - why?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>    public static void XmlToXmlWithXsl(string xmlFilePath, string xmlOutputFilePath, string xslFilePath)
      {
          // Load the style sheet.
          XslCompiledTransform xslt = new XslCompiledTransform();
          xslt.Load(xslFilePath);
  
          // Create the writer.
          XmlWriterSettings settings = xslt.OutputSettings;
          XmlWriter writer = XmlWriter.Create(xmlOutputFilePath, settings);
  
          // Execute the transformation.
          xslt.Transform(xmlFilePath, writer);
          writer.Close();
      }
  </code></pre>
  
  <p>Here is my XML (version with xmlns):</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;messages xmlns="blah"&gt;
      &lt;message&gt;
          &lt;id&gt;blah&lt;/id&gt;
          &lt;text&gt;Polski&lt;/text&gt;
          &lt;text lang="en"&gt;English&lt;/text&gt;
          &lt;notes /&gt;
      &lt;/message&gt;
  
      &lt;message&gt;
          &lt;id&gt;blah2&lt;/id&gt;
          &lt;text lang="pl"&gt;Polski&lt;/text&gt;
          &lt;text lang="en"&gt;English&lt;/text&gt;
          &lt;notes /&gt;
      &lt;/message&gt;
  &lt;/messages&gt;
  </code></pre>
  
  <p>Here is my XSL (little smaller then it was):</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"
      xmlns="blablabla"
  &gt;
      &lt;xsl:output method="xml" indent="yes" /&gt;
  
      &lt;xsl:variable name="empty_string"&gt;&lt;/xsl:variable&gt;
  
      &lt;!-- root --&gt;
      &lt;xsl:template match="/"&gt;
          &lt;xsl:element name="messages"&gt;
              &lt;xsl:apply-templates select="//message" /&gt;
          &lt;/xsl:element&gt;
      &lt;/xsl:template&gt;
  
      &lt;!-- AS-IS with xml content --&gt;
      &lt;xsl:template match="message"&gt;
          &lt;xsl:element name="{name(.)}"&gt;&lt;xsl:apply-templates /&gt;&lt;/xsl:element&gt;
      &lt;/xsl:template&gt;
  
      &lt;!-- AS-IS with text content --&gt;
      &lt;xsl:template match="id|notes|text"&gt;
          &lt;xsl:element name="{name(.)}"&gt;&lt;xsl:value-of select="." /&gt;&lt;/xsl:element&gt;
      &lt;/xsl:template&gt;
  
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>The output is:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;messages xmlns="blablabla" /&gt;
  </code></pre>
  
  <p>The output should be:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;messages xmlns="blablabla"&gt;
    &lt;message&gt;
          &lt;id&gt;blah&lt;/id&gt;
          &lt;text&gt;Polski&lt;/text&gt;
          &lt;text&gt;English&lt;/text&gt;
          &lt;notes&gt;&lt;/notes&gt;
      &lt;/message&gt;
    &lt;message&gt;
          &lt;id&gt;blah2&lt;/id&gt;
          &lt;text&gt;Polski&lt;/text&gt;
          &lt;text&gt;English&lt;/text&gt;
          &lt;notes&gt;&lt;/notes&gt;
      &lt;/message&gt;
  &lt;/messages&gt;
  </code></pre>