title: XSLT 1.0 add namespace + xsi:type to element
body: <p>I want to go from this :</p>
  
  <pre><code>&lt;detail&gt; 
   &lt;BusinessError&gt; 
     &lt;environment&gt;Test&lt;/environment&gt; 
     &lt;businesserror&gt; 
        &lt;BusinessCode&gt;my_businesscode&lt;/BusinessCode&gt; 
        &lt;BusinessMessage&gt;my_businessmessage&lt;/BusinessMessage&gt; 
     &lt;/businesserror&gt; 
    &lt;/BusinessError&gt; 
   &lt;/detail&gt; 
  </code></pre>
  
  <p>To this  (only the businesserror element is of interest)</p>
  
  <pre><code>&lt;detail&gt; 
   &lt;v1:BusinessError  xmlns:v1="ddd"&gt; 
     &lt;v1:environment&gt;Test&lt;/v1:environment&gt; 
     &lt;v1:businesserror  xsi:type="ns2:AppErrorType" xmlns:ns2="aaaaa" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt; 
       &lt;ns2:BusinessCode&gt;my_businesscode&lt;/ns2:BusinessCode&gt; 
       &lt;ns2:BusinessMessage&gt;my_businessmessage&lt;/ns2:BusinessMessage&gt; 
     &lt;/v1:businesserror&gt; 
   &lt;/v1:BusinessError&gt; 
  &lt;/detail&gt;
  </code></pre>
  
  <p>Important detail (I think) the namespace uri's are imported as a variable ! </p>
  
  <p>I can add the xsi:type via xs:attribute and the xsi namespace is added automatically
  but not the namespace (xmlns:ns2="aaaaa") ?
  notice that the namespace of the containing element (businesserror) is different (ddd) from the one I try to declare (aaaa)</p>
  
  <p>thanks</p>