Description
Unless configured specifically otherwise (i.e., using the default namespace option to switch the default namespace), the original namespace prefixes should be preserved in the resulting XML document so that an element content typed as QName can be resolved against the namespace context.
For example, if you have an input XML:
<a:foo xmlns:a="urn:abc">
<a2:bar xmlns:a2="urn:abc">a2:text</a2:bar>
</a:foo>
and suppose the content of element bar is of type QName.
If we are transforming from
{urn:abc}* to
{urn:a}*, we should not
simply generate:
<a:foo xmlns:a="urn:a">
<a:bar>a2:text</a:bar>
</a:foo>
Instead, we should generate:
<a:foo xmlns:a="urn:a">
<a2:bar xmlns:a2="urn:a">a2:text</a2:bar>
</a:foo>
so that the QName a2:text can be correctly interpreted.