Insert value using XSLT

xslt

Solution

<ABX>
    <xsl:attribute name="trId"><xsl:value-of select="CODE_VALUE"/></xsl:attribute>
</ABX>

The XSLT `<attribute`> tag will do exactly what you want.

Problem

I have an tag, and need to assign value to it's attribute within my XSLT ``` <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="/"> ``` I need to assign value to the trId attribute, but the way I have it now don't work, what is the right way to do it? ``` <ABX trId="<xsl:value-of select="CODE_VALUE"/>"> </xsl:template> </xsl:stylesheet> ```

Original source