title: Not able to get attribute value, am I missing something?
body: <ol>
  <li>I am able to get values of MessageHeader child elements (/soap:Envelope/soap:Header/ns1:MessageHeader/ns1:From/text()) but not its attribute values (/soap:Envelope/soap:Header/ns1:MessageHeader/@ns1:ResponseRequested), I am not able to figure out where i am doing wrong. can someone look into it please ? </li>
  <li>I stored Messageheader node in a variable and trying to access its content, but not able to do xpath onto its concent, can someone please suggest on how can i do it ?</li>
  </ol>
  
  <p>INPUT XML:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;soap:Envelope xmlns:soap ="http://schemas.xmlsoap.org/soap/envelope/"&gt;
  &lt;soap:Header xmlns="http://www.ama.net/1axml-msg/schema/msg-header-1_0.xsd"&gt;
    &lt;MessageHeader ResponseRequested="true" version="1.0" Terminate="true" Reverse="true" id="09B5581A" soap:mustUnderstand="1"&gt;
      &lt;From&gt;1ASI&lt;/From&gt;
      &lt;To&gt;1ASRINSAIG&lt;/To&gt;
      &lt;TimeStamp&gt;
        &lt;GenerationTime&gt;2014-10-22T12:41:38Z&lt;/GenerationTime&gt;
      &lt;/TimeStamp&gt;    
    &lt;/MessageHeader&gt;
  &lt;/soap:Header&gt;
  &lt;soap:Body&gt;
  &lt;PricingRequest xmlns="http://www.ama.net"&gt;
      &lt;originatorSection&gt;
          &lt;deliverySystem&gt;
              &lt;companyId&gt;1A&lt;/companyId&gt;
              &lt;cityCode&gt;MUC&lt;/cityCode&gt;
          &lt;/deliverySystem&gt;       
      &lt;/originatorSection&gt;    
  &lt;/PricingRequest&gt;
  &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  </code></pre>
  
  <p>XSLT trying:</p>
  
  <pre><code>&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.ama.net/1axml-msg/schema/msg-header-1_0.xsd"
      xmlns:ns2="http://www.ama.net" exclude-result-prefixes="ns1 ns2 soap"&gt;
  
      &lt;xsl:template match="ns1:* | ns2:*| soap:*"&gt;
          &lt;xsl:element name="{local-name()}"&gt;
              &lt;xsl:copy-of select="@*" /&gt;
              &lt;xsl:apply-templates /&gt;
          &lt;/xsl:element&gt;
      &lt;/xsl:template&gt;
  
      &lt;xsl:template match="/"&gt;
          &lt;xsl:variable name="SOAPHeader"&gt;
              &lt;xsl:apply-templates select="/soap:Envelope/soap:Header/node()" /&gt;
          &lt;/xsl:variable&gt;         
  From (Working):&lt;xsl:copy-of select="/soap:Envelope/soap:Header/ns1:MessageHeader/ns1:From/text()"/&gt;
  From from $SOAPHeader (Not Working)::&lt;xsl:copy-of select="$SOAPHeader/ns1:MessageHeader/ns1:From/text()"/&gt;
  
  ResponseRequested (NOT Working):    &lt;xsl:value-of select="/soap:Envelope/soap:Header/ns1:MessageHeader/@ns1:ResponseRequested"/&gt;
  ResponseRequested from $SOAPHeader (Not Working):   &lt;xsl:value-of select="$SOAPHeader/ns1:MessageHeader/@ns1:ResponseRequested"/&gt;
      &lt;/xsl:template&gt;
  
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>OUTPut getting:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  
  From (Working):1ASI
  From(Not Working)::
  </code></pre>