[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: shuffling words in text content
Hi Michael, Thanks for having a look! Originally I tried to use random-number-generator()?permute(), but the XSLT Fiddle I worked in uses Saxon 9.8 HE and I found that random-number-generator() isn't supported in Saxon HE until 10+. :( Also, originally I used tokenize() and string-join(), but then I switched to <analyze-string> because (1) it kept newlines/indenting intact in multi-line strings, and (2) it kept non-word punctuation in place by construction. I could still use tokenize() to obtain the words, but then I'd need to keep a "not-a-word" pattern consistent with my "is-a-word" pattern. It made me happier to keep code symmetry across word acquisition and word substitution. - Chris
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|