title: Remove XML namespace declaration from XSLT output root?
body: <p>Having the following input XML:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;customSettings xmlns:env="urn:schemas-test-env"&gt;
      &lt;connectionStrings&gt;
          &lt;add name="Name" connectionString="None" providerName="" /&gt;
          &lt;add name="Name" connectionString="Local"  providerName="" env:name="Local" /&gt;
          &lt;add name="Name" connectionString="Dev"  providerName="" env:name="Dev"  /&gt;
      &lt;/connectionStrings&gt;
      &lt;appSettings&gt;
          &lt;add key="Name" value="Value" /&gt;
          &lt;add key="Name" value="Local" env:name="Local" /&gt;
          &lt;add key="Name" value="Dev" env:name="Dev" /&gt;
      &lt;/appSettings&gt;
  &lt;/customSettings&gt;
  </code></pre>
  
  <p>and 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"
                  xmlns:msxsl="urn:schemas-microsoft-com:xslt"
  
                  xmlns:code="urn:schemas-test-code"
                  xmlns:env="urn:schemas-test-env"
  &gt;
      &lt;xsl:output version="1.0" encoding="utf-8" omit-xml-declaration="yes" indent="yes" /&gt;
      &lt;xsl:strip-space elements="*" /&gt;
  
      &lt;!-- Populate param value --&gt;
      &lt;xsl:param name="env" select="code:GetEnvironment()" /&gt;
  
      &lt;!-- Copy content as is --&gt;
      &lt;xsl:template match="node()|@*" name="identity"&gt;
          &lt;xsl:copy&gt;
              &lt;xsl:apply-templates select="node()|@*" /&gt;
          &lt;/xsl:copy&gt;
      &lt;/xsl:template&gt;
  
      &lt;!-- Remove all add nodes with env:name not matching param --&gt;
      &lt;xsl:template match="add"&gt;
          &lt;xsl:if test="not(@env:name != $env)"&gt;
              &lt;xsl:call-template name="identity" /&gt;
          &lt;/xsl:if&gt;
      &lt;/xsl:template&gt;
  
      &lt;!-- Remove all env:name attributes --&gt;
      &lt;xsl:template match="@env:name" /&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>I'm getting the following output XML:</p>
  
  <pre><code>&lt;customSettings xmlns:env="urn:schemas-test-env"&gt;
    &lt;connectionStrings&gt;
      &lt;add name="Name" connectionString="None" providerName="" /&gt;
      &lt;add name="Name" connectionString="Local" providerName="" /&gt;
    &lt;/connectionStrings&gt;
    &lt;appSettings&gt;
      &lt;add key="Name" value="Value" /&gt;
      &lt;add key="Name" value="Local" /&gt;
    &lt;/appSettings&gt;
  &lt;/customSettings&gt;
  </code></pre>
  
  <p>How to remove namespace declaration from the root element?</p>