title: How to get rid of xmlns="" (no-namespace) attribute in XSLT output
body: <p>Here is my (simplified for this case scenario) XML:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;?xml-stylesheet href="test_1.xsl" type="text/xsl"?&gt;
  
  &lt;doc xmlns="http://www.foo.org"&gt;
    &lt;div&gt;
      &lt;title&gt;Mr. Title&lt;/title&gt;
      &lt;paragraph&gt;This is one paragraph.
      &lt;/paragraph&gt;
      &lt;paragraph&gt;Another paragraph.
      &lt;/paragraph&gt;
    &lt;/div&gt;
  &lt;/doc&gt;
  </code></pre>
  
  <p>And here is my 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:foo="http://www.foo.org"&gt;
  
  &lt;xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/&gt;
  
   &lt;xsl:template match="node()|@*"&gt;
    &lt;xsl:copy&gt;
     &lt;xsl:apply-templates select="node()|@*"/&gt;
    &lt;/xsl:copy&gt;
   &lt;/xsl:template&gt;
  
   &lt;xsl:template match="foo:doc"&gt;
    &lt;xsl:element name="newdoc" namespace="http://www/w3.org/1999/xhtml"&gt;
     &lt;xsl:apply-templates/&gt;
    &lt;/xsl:element&gt;
   &lt;/xsl:template&gt;
  
   &lt;xsl:template match="foo:div"&gt;
    &lt;segment title="{foo:title}"&gt;
     &lt;xsl:apply-templates/&gt;
    &lt;/segment&gt;
   &lt;/xsl:template&gt;
  
   &lt;xsl:template match="foo:title"&gt;
    &lt;xsl:element name="h2"&gt;
     &lt;xsl:apply-templates/&gt;
    &lt;/xsl:element&gt;
   &lt;/xsl:template&gt;
  
   &lt;xsl:template match="foo:paragraph"&gt;
    &lt;xsl:element name="p"&gt;
     &lt;xsl:apply-templates/&gt;
    &lt;/xsl:element&gt;
   &lt;/xsl:template&gt;
  
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>The output produces this:</p>
  
  <pre><code>&lt;newdoc xmlns="http://www/w3.org/1999/xhtml"&gt;
    &lt;segment xmlns="" title="Mr. Title"&gt;
      &lt;h2&gt;Mr. Title&lt;/h2&gt;
      &lt;p&gt;This is one paragraph.
      &lt;/p&gt;
      &lt;p&gt;Another paragraph.
      &lt;/p&gt;
    &lt;/segment&gt;
  &lt;/newdoc&gt;
  </code></pre>
  
  <p>which is great, except for the xmlns="" in the segment element, that seems to be defining no namespace for itself and all of its children.  How can I make it not add this?</p>
  
  <p>Sidenote: I have also tried transforming the first node with </p>
  
  <pre><code>&lt;xsl:template match="mydoc:doc"&gt;
    &lt;html xmlns="http://www/w3.org/1999/xhtml"&gt;
     &lt;xsl:apply-templates/&gt;
    &lt;/html&gt;
   &lt;/xsl:template&gt;
  </code></pre>
  
  <p>instead, but it produces the same effect.</p>
  
  <p>Thanks helpful people!</p>