Create an array in xslt

You can create any data type model you want to in xslt. To create an array, just create a variable for it. Example: <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text" omit-xml-declaration="yes"/> <xsl:variable name="array" as="element()*"> <Item>A</Item> <Item>B</Item> <Item>C</Item> </xsl:variable> <xsl:template match="/"> <xsl:value-of select="$array[2]"/> </xsl:template> </xsl:stylesheet> Output B Advertisements

Read More →