I have some XSLT code that, based on certain conditions, sets a variable "tag" to one of three string values (see below)
<xsl:variable name="tag" select="'aaa'" />
<xsl:variable name="tag" select="'bbb'" />
<xsl:variable name="tag" select="'ccc'" />
I then want to use the value of this "tag" variable as the name of an element, i.e.:
However when I test this it claims it cannot find the variable "$tag".
I have also tried putting the xsl:choose code in a separate template that just outputs the "tag" value as text, and then calling that template within the definition of the "tag" variable just before it is used in xsl:element.
In this case it says "Illegal value used for attribute name: bbb" (bbb being the value of "tag").
Any ideas how to get the value of $tag as the xsl:element name.
Senior Software Technician
The views opinions and judgements expressed in this message are solely those of
the author. The message contents have not been reviewed or approved by CDL.