November 18th, 2010, 07:20 AM
Iterating a comma separated list in xsl
I am new to xsl and just trying to iterate a comma separated list in xsl.
I will retrieve a comma separated string from a java method in side xsl and want to split it. After splitting i want to compare each element in the comma separated string with another value.
Can any one suggest how to achieve this?
November 19th, 2010, 12:53 AM
I'm thinking your best bet would be to split the string in Java and give the XSLT processor a nodelist of text nodes. Then you can xsl:for-each on it and whatnot.
Otherwise: I don't know if Java (and if so, starting at which version) can do XPath 2 functions. You'd need those to do string parsing.