xml节点的属性的值是否支持表达式,该如何解决

xml节点的属性的值是否支持表达式
<tree action="login.action?id=##" id="1">
</tree>
 问题:我想拿到id的值付给action属性中的id,也就是代替上面的##,这种可以实现吗

------解决方案--------------------
XML code

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions">
    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
    <xsl:template match="/" priority="10">
        <xsl:param name="replaceStr" select="//tree/@id"/>
        <xsl:element name="tree">
            <xsl:attribute name="action"><xsl:value-of select="replace(//tree/@action,'##', $replaceStr)"/></xsl:attribute>
        </xsl:element>
    </xsl:template>
</xsl:stylesheet>