I have an input string which has csv values. Eg., 1,2,3 I would need to separate each values and assign to target node in for-each loop.
I got this below template that s
With XSLT 2.0 you can use tokenize(string, separator)
function instead of named template.
And this xsl:
gives following result:
15/12/2011
16/12/2011
19/12/2011
20/12/2011
21/12/2011
Update:
With Xslt 2.0 processor under backward compatibility mode following template gives the same result:
For Xslt 1.0 - it is not possible simple (with standard functions) access to nodes via variable - see @Dimitre Novatchev answer XSLT 1.0 - Create node set and pass as a parameter
For this purpose XSLT 1.0 processors contains extension function: node-set(...)
For Saxon 6.5 node-set()
function is defined in http://icl.com/saxon
namespace
So in the case of XSLT 1.0 processors solution would be:
Thanks @Dimitre Novatchev to correct me and his answer about accessing node sets from variable.