I have declared a variable in my XSLT as given below :
<xsl:variable name="inline-array">
<Item>A</Item>
<Item>B</Item>
<Item>C</Item>
</xsl:variable>
I am accessing this variable as given below :
<xsl:param name="array"
select="document('')/*/xsl:variable[@name='inline-array']/*" />
<xsl:value-of select="$array[1]" />
This is working fine as long as my inline array has static contents. But my requirement is to dynamically assign values in the XSLT to the tag "Item" ie. Something like :
<xsl:variable name="inline-array">
<Item>$item1</Item>
<Item>$item2</Item>
<Item>$item3</Item>
</xsl:variable>
But, I tried all possible options without any luck. Any suggestions will be greatly appreciated. Any other options to fulfill my requirement is also welcome. Thanks.