I\'m writing an XSLT transformation (for XSL-FO), and need to repeat something for each letter in a string value, for example:
If string is stored in MyData/My
You can try this dirt-ugly hack that has proven to work time and again:
This will work if //* matches more nodes than the number of characters in your string... Of course, this would also deserve the odd line of comment for the poor fellow reading your code afterwards... ;-)
Note: I know there are XSLT purists out there. But when you need to get the job done and don't care much about the hyper-verbosity of XSLT, then sometimes these tricks are awesome! IMO
Note also: I have raised a performance question here, to see if iteration or recursion performs better: XSLT iteration or recursion performance