You haven't made your requirements clear. Are you saying you want to change the local name, but keep the prefix and namespace URI the same? If so you can try
<xsl:element name="newname" namespace="{namespace-uri(.)}">
and if you're lucky the system will keep the prefix, or if you want better certainty you can do
<xsl:element name="{substring-before(name(.), ':')}:newname" namespace="{namespace-uri(.)}">
Remember that prefixes don't really matter, it's only the namespace URI that's important.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
|