xslt - value of a variable in a div id html/xsl -


 <div id="$var"> </div> 

$var value of variable var. example var="apple". in loop value of var changing. when run program want have <div id="apple"> , <div id="pear"> etc.

is possible so? if yes, how?

i. {} https://www.w3.org/tr/xslt#dt-attribute-value-template

...<div id="{$var}">... 

ii. <xsl:attribute> https://www.w3.org/tr/xslt#creating-attributes

... <xsl:element name="div">    <xsl:attribute name="id">        <xsl:value-of select="$var"/>    </attribute> </xsl:element> 

the xsl:attribute element can used add attributes result elements whether created literal result elements in stylesheet or instructions such xsl:element.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -