title: How can I prevent these redundant namespaces from an XSLT stylesheet?
body: <p>When using an XSLT stylesheet to transform an XML file which contains embedded XHTML (using namespaces) into pure XHTML, I'm left with redundant namespace definitions on the elements which were originally XHTML.  Simple test case:</p>
  
  <p>XML:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;?xml-stylesheet type="text/xml" href="fbb.xsl"?&gt;
  &lt;foo xmlns="urn:foo:bar:baz" xmlns:html="http://www.w3.org/1999/xhtml"&gt;
      &lt;bar&gt;
          &lt;baz&gt;Some &lt;html:i&gt;example&lt;/html:i&gt; text.&lt;/baz&gt;
      &lt;/bar&gt;
  &lt;/foo&gt;
  </code></pre>
  
  <p>XSL:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;xsl:stylesheet version="1.0" xmlns="http://www.w3.org/1999/xhtml" xmlns:fbb="urn:foo:bar:baz" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="fbb"&gt;
      &lt;xsl:output method="xml" indent="yes"/&gt;
  
      &lt;xsl:template match="/fbb:foo"&gt;
          &lt;html&gt;
              &lt;head&gt;
                  &lt;title&gt;Example&lt;/title&gt;
              &lt;/head&gt;
  
              &lt;body&gt;
                  &lt;p&gt;
                      &lt;xsl:copy-of select="fbb:bar/fbb:baz/node()"/&gt;
                  &lt;/p&gt;
              &lt;/body&gt;
          &lt;/html&gt;
      &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
    &lt;head&gt;
      &lt;title&gt;Example&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;p&gt;Some &lt;html:i xmlns="urn:foo:bar:baz" xmlns:html="http://www.w3.org/1999/xhtml"&gt;example&lt;/html:i&gt; text.&lt;/p&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Is it possible to prevent the redundant namespaces (and prefix) from being added to the <code>&lt;i&gt;</code> element?  (For reference, I'm using <code>xsltproc</code> with <code>libxml2-2.7.3</code> and <code>libxslt-1.1.24</code> on Cygwin.)</p>