title: Why is this XSLT to extract soap:Body also have soap:Header element values
body: <p>I have a following soap envelope coming from client</p>
  
  <pre><code>&lt;soap:Envelope xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
   &lt;soap:Header&gt;
    &lt;wsa:Action&gt;http://company.com/services/InterfacePoint/CallResponse&lt;/wsa:Action&gt;
    &lt;wsa:MessageID&gt;uuid:85fafb9d-9ec0-4017-a367-4f9043812310&lt;/wsa:MessageID&gt;
    &lt;wsa:To&gt;http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous&lt;/wsa:To&gt;
    &lt;wsse:Security&gt;
       &lt;wsu:Timestamp wsu:Id="Timestamp-dc059677-19f6-4b2c-a69b-ec0dffc6b1db"&gt;
          &lt;wsu:Created&gt;2013-03-28T16:24:33Z&lt;/wsu:Created&gt;
          &lt;wsu:Expires&gt;2013-03-28T16:29:33Z&lt;/wsu:Expires&gt;
       &lt;/wsu:Timestamp&gt;
    &lt;/wsse:Security&gt;
  &lt;/soap:Header&gt;
  &lt;soap:Body&gt;
    &lt;TXLife xsi:schemaLocation="http://ACORD.org/Standards/Life/2 TXLife2.22.00.XSD" xmlns="http://ACORD.org/Standards/Life/2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
    .
    .
    . 
    &lt;/TXLife&gt;
   &lt;/soap:Body&gt; 
  &lt;/soap:Envelope&gt;
  </code></pre>
  
  <p>I'm just interested in retrieving what is inside <code>soap:Body</code> and discard everything else. I wrote this <code>XSLT</code> to extract that</p>
  
  <pre><code>&lt;xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
    &lt;xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/&gt;
    &lt;xsl:template match="soap:Envelope/soap:Body"&gt;
        &lt;xsl:copy-of select="@*|node()" /&gt;    
    &lt;/xsl:template&gt; 
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>This <code>XSLT</code> works fine when there is no header in soap envelope but if I apply this to above <code>XML</code>, it outputs values of header elements also, so the output it produces is:</p>
  
  <pre><code>http://company.com/services/InterfacePoint/CallResponseuuid:85fafb9d-9ec0-4017-a367-4f9043812310http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous2013-03-28T16:24:33Z2013-03-28T16:29:33Z&lt;TXLife xmlns="http://ACORD.org/Standards/Life/2"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing"
          xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
          xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
          xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
          xsi:schemaLocation="http://ACORD.org/Standards/Life/2 TXLife2.22.00.XSD"&gt;
  .
  .
  .
  &lt;/TXLife&gt;
  </code></pre>
  
  <p>but I want output to be:</p>
  
  <pre><code>&lt;TXLife xmlns="http://ACORD.org/Standards/Life/2"&gt;
  .
  .
  .
  &lt;/TXLife&gt;
  </code></pre>
  
  <p>I don't care if other namespaces exist or not.</p>