|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: replace function
e is get a string i.e. > "steve,john,peter" and replace the next word to a comma with > a space hence the new string become "steve, john, peter" how > can i achieve this using the translate function? Although people have written solutions to this that you can use off-the-shelf, it's worth learning how to write the code yourself. You need a recursive template, it should use substring-before() to output the string before the first comma, then output ", ", then use substring-after() and call itself to process the rest of the string after the first comma. Any good XSLT textbook will have examples of this. Michael Kay Software AG home: Michael.H.Kay@xxxxxxxxxxxx work: Michael.Kay@xxxxxxxxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








