I just want to confirm whether we can insert html tags inside the xsl variable? example
<xsl:variable name="htmlContent">
<html>
<body>
hiiii
</body>
</html>
</xsl:variable>
if i use
<xsl:value-of select="$htmlContent"/>
I shoud get
<html>
<body>
hiiii
</body>
</html>
Is it possible? i have tried
<xsl:value-of disable-output-escaping="yes" select="$htmlContent"/>
Eventhough i am not getting the desired output
Do not use
value-of, which gets the text value of the selected node. Instead usecopy-of, which copies the entire tree (nodes and all) into the output:Here is a full example:
This will always produce the xml: