Yes, it is possible but a little confusing. God love XSL.....
<a><xsl:attribute name="href"><xsl:text>JavaScript:editCostCode('</xsl:text> <xsl:value-of select="item[@name='costcodeid']/value"/><xsl:text>');</xsl:text></xsl:attribute> <xsl:value-of select="item[@name='costcodedisplay']/value"/>  </a> The above will produce the equivalent of: <a href="JavaScript:editCostCode('24');">CostCode Name </a> |