I have A $param that I am passing into a template. I wish to use the value of this parameter as class name for a div. The class is not taking the value of the parameter but taking the parameter name (in the html page it is $param). Is there any way I can use the value of a parameter as a class name?
To use a XSLT expression in an attribute of a literal result element, surround the expression with braces like so:
<div class="{$param}"> ... </div>
This is known as an attribute value template.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With