Can anyone help me to create a map using dynamic variable value as a key in XSLT 1.0
I have a variable addressID whose value is 123. I would like to use this as a key in a map
<xsl:value-of select="$addressID" /> // gives output 123
<my:map>
<entry key="$addressID">1</entry>
</my:map>
Please suggest me the proper syntax to use a variable in key.
First, setup variable:
<xsl:variable name="addressID">123</xsl:variable>
Second, you can use it as follow:
<my:map>
<entry key="{$addressID}">1</entry>
</my:map>
via http://www.w3.org/TR/xslt#variables
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