This is not true :
<input type="rad" name="RadGroup" value="<xsl:value-of select='productOptionInfo'/>" />
, and this is also wrong. :
<input type="rad" name="RadGroup" value='<xsl:value-of select="productOptionInfo"/>' />
In XML, this is a syntax error for (unescaped) markup as attribute values . See W3 XML Spec - here and here .
Two correct ways to do this (called AVT attribute value templates or ):
<input type="rad" name="RadGroup" value="{productOptionInfo}"/>
and
<xsl:attribute name="input"> <xsl:value-of select="productOptionInfo"/> </xsl:attribute>
In XSLT 2.0 it is allowed to write :
<xsl:attribute name="input" select="productOptionInfo"/>
The first path above is the shortest and most readable when the element name is statically known (in advance).
The second method should be used when the element name is not statically known and should be generated with the <xsl:element> command.
Dimitre novatchev
source share