It is not clear what you want to achieve. First you say you have an "incoming document in no namespace", later you say you want to "convert the default namespace that has no prefix into a defined namespace".
If you have elements in no namespace and want to transform them into elements in a certain namespace then here is an example:
Assume the XML input is
Code:
<root>
<foo att1="value 1">
<bar>foobar</bar>
</foo>
</root>
Then this stylesheet
Code:
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:param name="ns" select="'http://example.com/2009/ns1'"/>
<xsl:param name="pf" select="'foo'"/>
<xsl:template match="*">
<xsl:element name="{concat($pf, ':', local-name())}"
namespace="{$ns}">
<xsl:apply-templates select="@* | node()"/>
</xsl:element>
</xsl:template>
<xsl:template match="@* | comment() | text() | processing-instruction()">
<xsl:copy/>
</xsl:template>
</xsl:stylesheet>
creates the following result:
Code:
<?xml version="1.0" encoding="utf-8"?><foo:root xmlns:foo="http://example.com/2009/ns1">
<foo:foo att1="value 1">
<foo:bar>foobar</foo:bar>
</foo:foo>
</foo:root>
So it transforms all elements to elements with namespace and prefix given as the parameters ns and pf.
Is that what you want to achieve?