I am using a stylesheet to generate XSL within an
xsl:document command.
Not sure what you mean by the xsl:document "command" - do you mean the XSLT
1.1 instruction of that name?
The problem I have is that I want to include the xmlns:str
namespace to my
generated stylesheet so that I can use the EXSLT string function
uri-decode().
XSLT 2.0 has an xsl:namespace instruction for this purpose. In 1.0 there is
a workaround: copy the namespace from a source document. E.g.
<xsl:variable name="dummy">
<str:dummy xmlns:str="the namespace"/>
</xsl:variable>
<xsl:copy-of select="xx:node-set($dummy)//namespace::str"/>
Michael Kay
(XQuery, incidentally, decided not to provide this capability. I think I
will start pointing out all the things you can do with XSLT 2.0 and not with
XQuery 1.0, just in case anyone believes that Microsoft have got it
right...)