R
Richard
Suppose I create a variable named "var" such as:
<xsl:variable name="var">VarValue</xsl:variable>
and then I want to insert its value into an attribute
<Element attr=" {the value of var} ">
so that it would generate
<Element attr=" VarValue ">
What syntax do I use to do this? If I specify
<Element attr=" <xsl:value-of select='$var'/> ">
then the parser complains that < > must be used for
brackets inside attribute values. However, if I change it to
<Element attr=" <xsl:value-of select='$var'/> ">
then it generates exactly that string with no variable
substitution. I tried using quotes and brackets in various
ways with no success. Is there a way to insert a variable's
value into an attribute?
<xsl:variable name="var">VarValue</xsl:variable>
and then I want to insert its value into an attribute
<Element attr=" {the value of var} ">
so that it would generate
<Element attr=" VarValue ">
What syntax do I use to do this? If I specify
<Element attr=" <xsl:value-of select='$var'/> ">
then the parser complains that < > must be used for
brackets inside attribute values. However, if I change it to
<Element attr=" <xsl:value-of select='$var'/> ">
then it generates exactly that string with no variable
substitution. I tried using quotes and brackets in various
ways with no success. Is there a way to insert a variable's
value into an attribute?