Subject: Reverse Tokens Template
From: "Greene, Stephen" <Stephen.Greene@xxxxxx>
Date: Thu, 15 May 2003 10:39:10 -0400
|
Hi,
I have been trying to modify (un-sucessfully) Dimitre Novatchev's template
to reverse the order of "words" in a string (words being character
substrings seperated by a space character). Such that the string "hello
world" would become "world hello".
I was wondering if anyone would be able to offer any hints on how to
accomplish this.
I have tried modifying the template but as the word length is variable, (and
the words need to go back into a string, and not be output) I have been
unsuccessful in concatenating the string after removing one word at a time.
If this is not possible, is there a way in which I could remove one word at
a time from the end of the string?
(in a substring-before($theString, ' ') like way) Instead of the beginning?
I thank you for your time and for your help,
Regards,
Stephen Greene
National Research Council of Canada
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|