title: Get rid of XML root node in XSL template output
body: <p>I am using XSL templates to serve as web page templates for a web framework, the end output being XHTML 1.0 Strict; it takes XML input and outputs the XHTML. It works perfectly except for one problem - the end output is also outputting a XML node instead of just the contents. Here is the basic XML (missing some items, but the overall design is the same):</p>
  
  <pre><code>&lt;Page&gt;
      &lt;PageScript&gt;
          &lt;Script&gt;./js/myscript.js&lt;/Script&gt;
      &lt;/PageScript&gt;
      &lt;PageCSS&gt;
          &lt;CSS&gt;./css/mycss.css&lt;/CSS&gt;
      &lt;/PageCSS&gt;
      &lt;PageContent&gt;Blah blah blah&lt;/PageContent&gt;
  &lt;/Page&gt;
  </code></pre>
  
  <p>Here is the XSL Template</p>
  
  <pre><code>&lt;xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:response="http://www.ntforl.com/"
      xmlns="http://www.w3.org/1999/xhtml"
      xmlns:xhtml="http://www.w3.org/1999/xhtml"
      xmlns:lang="en"&gt;
  
      &lt;xsl:output
          method="xml"
          doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
          doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
      /&gt;
  
      &lt;xsl:template match="//PageCSS"&gt;
          &lt;xsl:for-each select="CSS"&gt;
              &lt;link type="text/css" rel="stylesheet"&gt;
                  &lt;xsl:attribute name="href"&gt;
                      &lt;xsl:value-of select="." /&gt;
                  &lt;/xsl:attribute&gt;
              &lt;/link&gt;
          &lt;/xsl:for-each&gt;
      &lt;/xsl:template&gt;
  
      &lt;xsl:template match="//PageScript"&gt;
          &lt;xsl:for-each select="Script"&gt;
              &lt;script type="text/javascript"&gt;
                  &lt;xsl:attribute name="src"&gt;
                      &lt;xsl:value-of select="." /&gt;
                  &lt;/xsl:attribute&gt;
              &lt;/script&gt;
          &lt;/xsl:for-each&gt;
      &lt;/xsl:template&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="/" disable-output-escaping="yes"&gt;
          &lt;html&gt;
              &lt;head&gt;
                  &lt;title&gt;
                      &lt;xsl:value-of select="//PageTitle" /&gt;
                  &lt;/title&gt;
                  &lt;meta http-equiv="content-type" content="text/html;charset=utf-8" /&gt;
                  &lt;link type="text/css" rel="stylesheet" href="template/style/globalStyle.css" /&gt;
                  &lt;link type="text/css" rel="stylesheet" href="template/style/standards.css" /&gt;
                  &lt;xsl:apply-templates select="//PageCSS" /&gt;
                  &lt;script type="text/javascript" src="template/js/some_file.js"&gt;&lt;/script&gt;
                  &lt;xsl:apply-templates select="//PageScript" /&gt;
              &lt;/head&gt;
              &lt;body onload=""&gt;
                  &lt;div id="container"&gt;
                      &lt;div id="top"&gt;
                          &lt;div class="clear" /&gt;
                      &lt;/div&gt;
                      &lt;div id="main"&gt;
                          &lt;div class="left" style="width: 708px; margin-top: 10px;"&gt;
                              &lt;h1 class="center"&gt;
                                  &lt;xsl:value-of select="//PageTitle" /&gt;
                              &lt;/h1&gt;
                          &lt;/div&gt;
                          &lt;div class="clear" /&gt;
                          &lt;div id="rightPane"&gt;
                              &lt;div id="rightPaneContent"&gt;
                                  &lt;xsl:apply-templates select="//PageContent" /&gt;
                              &lt;/div&gt;
                              &lt;img src="template/images/mainBgBottom.png" alt="" /&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/body&gt;
          &lt;/html&gt;
      &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>The problem resides in the PageContent, and it only happens with the PageContent. When the transformation is run, the template outputs</p>
  
  <pre><code>&lt;PageContent xmlns=""&gt; node content &lt;/PageContent&gt;
  </code></pre>
  
  <p>in the XHTML. I need to know how to get rid of it so I can have a valid XHTML 1.0 Strict document.</p>
  
  <p>The weird thing is that the PageContent node is the only node to do this, no other node gets it content wrapped with the node name in the output. What is the reason for this behaviour?</p>