Reputation: 31
I am passing an arraylist from Java to Xsl using transformer.setParameter.
ArrayList books=new ArrayList<String>;
transformer.setparameter("booksinXSL","books");
Now I need to access this array's elements in XSL.
<xsl:param name="booksinXSL">
Now If I use this line of code in XSL it throws an error:Invalid conversion of ArrayList to NodeSet.
<value-of select="$booksinXSL[0]">
but if I set it as the below line it prints the entire array [book1,book2] without any error
<value-of select="$booksinXSL">
Upvotes: 3
Views: 3583