title: Aliasing prefixes (not namespaces) in XSLT
body: <p>I want to change the prefix in the output from the prefix in the stylesheet itself.</p>
  
  <p>XSLT file:</p>
  
  <pre><code>&lt;stylesheet version="1.0" xmlns:a="nsA"&gt;
   &lt;template match="/"&gt;
    &lt;a:out/&gt;
   &lt;/template&gt;
  &lt;/stylesheet&gt;
  </code></pre>
  
  <p>What I get:</p>
  
  <pre><code>&lt;a:out xmlns:a="nsA" /&gt;
  </code></pre>
  
  <p>What I want:</p>
  
  <pre><code>&lt;b:out xmlns:b="nsA" /&gt;
  </code></pre>
  
  <p>Note that I want to change only the <strong>prefix</strong>, not the <strong>namespace</strong>. The element namespace-alias will translate only the namespace, leaving the prefix intact.</p>
  
  <p>Bonus points if it is possible to remove the prefix completely:</p>
  
  <pre><code>&lt;out xmlns="nsA" /&gt;
  </code></pre>
  
  <p>Note that the XSLT elements are not prefixed and the output elements are prefixed. It has to remain like that. I know that the problem could be solved with prefixing XSLT and un-prefixing output elements, but it's not an option. The to-be-output elements must have the prefix as provided in the stylesheet, only in the output should they be changed.</p>