Split String To Array Using XPATH
Posted: Fri Jul 22, 2016 12:22 am
I'm trying to break a string into an array based on the length. for Ex: If I have a string of 30 characters, I want to convert into an array of 5 characters each using an xpath function.
Is there any way to do this? Also, I noticed in this thread - Creating an incremental count variable in XSLT / XPath when using Xpath for..in..return?
that we can use "For" as "For $i in 1 to $length return $i". When I'm trying to use "1 to 5" i.e. constants, xpath is accepting, but when I'm trying to pass a variable " 1 to $length", xpath is not accepting.
Please suggest.
Alex
Is there any way to do this? Also, I noticed in this thread - Creating an incremental count variable in XSLT / XPath when using Xpath for..in..return?
that we can use "For" as "For $i in 1 to $length return $i". When I'm trying to use "1 to 5" i.e. constants, xpath is accepting, but when I'm trying to pass a variable " 1 to $length", xpath is not accepting.
Please suggest.
Alex