title: XSLT to change namespace
body: <p><strong>I have this XML code:</strong></p>
  
  <pre><code>    &lt;soapenv:Envelope xmlns:soapenv="something2" xmlns:oas="something1" xmlns:bill="something"&gt;
      &lt;soapenv:Header&gt;
      &lt;wsse:Security xmlns:wsse="something_else"&gt;
       &lt;wsse:UsernameToken&gt;
          &lt;wsse:Username&gt;SYSUSER&lt;/wsse:Username&gt;
          &lt;wsse:Password Type="PasswordText"&gt;sysuser00&lt;/wsse:Password&gt;
       &lt;/wsse:UsernameToken&gt;
      &lt;/wsse:Security&gt;
     &lt;/soapenv:Header&gt;
      &lt;soapenv:Body&gt;
     &lt;GetBillList xmlns="old_uri" xmlns:xsi="else" xsi:schemaLocation="old_schema"&gt;
     &lt;Case&gt;
     &lt;CaseID&gt;699677&lt;/CaseID&gt; 
     &lt;BillGroup casref="123"&gt;
     &lt;BillGroupID&gt;1&lt;/BillGroupID&gt; 
     &lt;/BillGroup&gt;
     &lt;/Case&gt;
     &lt;StartDate&gt;2014-06-12&lt;/StartDate&gt; 
     &lt;/GetBillList&gt;
     &lt;/soapenv:Body&gt;
     &lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <p>I want to change <code>old_uri</code> &amp; <code>old_schema</code> into <code>new_uri</code> &amp; <code>new_schema</code> respectively, along with attribute conversion into element of <code>BillGroup</code> node.</p>
  
  <p><strong>XSLT used:</strong></p>
  
  <pre><code>   &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:bill="something"&gt;
     &lt;xsl:output method="xml" 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="bill:BillGroup"&gt;
     &lt;xsl:element name="{local-name()}"&gt;
     &lt;xsl:value-of select="."/&gt;
     &lt;/xsl:element&gt;
     &lt;/xsl:template&gt;
     &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p><strong>Target XML:</strong></p>
  
  <pre><code>   &lt;soapenv:Envelope xmlns:soapenv="something2" xmlns:oas="something1" xmlns:bill="something"&gt;
      &lt;soapenv:Header&gt;
      &lt;wsse:Security xmlns:wsse="something_else"&gt;
          &lt;wsse:UsernameToken&gt;
              &lt;wsse:Username&gt;SYSUSER&lt;/wsse:Username&gt;
              &lt;wsse:Password Type="PasswordText"&gt;sysuser00&lt;/wsse:Password&gt;
          &lt;/wsse:UsernameToken&gt;
      &lt;/wsse:Security&gt;
     &lt;/soapenv:Header&gt;
      &lt;soapenv:Body&gt;
      &lt;GetBillList xmlns="new_uri" xmlns:xsi="else" xsi:schemaLocation="new_schema"&gt;
          &lt;Case&gt;
              &lt;CaseID&gt;699677&lt;/CaseID&gt;
              &lt;BillGroup&gt;
                  &lt;casref&gt;123&lt;/casref&gt;
                  &lt;BillGroupID&gt;1&lt;/BillGroupID&gt;
              &lt;/BillGroup&gt;
          &lt;/Case&gt;
          &lt;StartDate&gt;2014-06-12&lt;/StartDate&gt;
         &lt;/GetBillList&gt;
          &lt;/soapenv:Body&gt;
       &lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <p>Would appreciate any help on this.</p>