954,568 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Parsing strings

Say I have an element

How can I break the long string to when it hits the comma, it separates the animals into substrings? An example output is shown below:

dogs
cats
donkey
turtle
rabbit

Help is appreciated.
Thanks

f_atencia
Junior Poster in Training
54 posts since Aug 2009
Reputation Points: 10
Solved Threads: 4
 

You could use the fn:tokenize function.

fn:tokenize(pets/@animale, ",")

dknochen
Newbie Poster
9 posts since Oct 2010
Reputation Points: 10
Solved Threads: 1
 

Tokenize is a XSLT2.0 feature. Is there any recursive template I can use in XSLT V1.0?

f_atencia
Junior Poster in Training
54 posts since Aug 2009
Reputation Points: 10
Solved Threads: 4
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You