Reputation: 3067
Hos do I pass array of Integers as a params to XSLT?
Upvotes: 1
Views: 4267
Reputation: 23828
You can pass it in an xml format. That would make processing in the xslt easier too.
<array>
<int>23</int>
<int>45</int>
</array>
You can then process it in your xslt as:
<xsl:param name="intArray" />
...
...
<xsl:template match="/">
...
<xsl:for-each select="$intArray/int">
<!-- Process int array -->
...
...
</xsl:for-each>
</xsl:template>
Upvotes: 3