You can copy a namespace node to add an extra namespace declaration to an element, but that will never change the name of the element. The name of the element (its local name and namespace URI) are determined solely by the name and namespace attributes of the xsl:element instruction. If you need to compute the namespace URI, then the computation must be done in the namespace attribute, e.g.
namespace="{document('')/xsl:stylesheet/namespace::*[local-name() = icns']}"
(though that seems a pretty odd way to compute it, since you know at the time you write your stylesheet what namespaces it declares)
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
|