my dog learned polymorphism*
The moose likes XML and Related Technologies and the fly likes replacing a char with more than one character Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "replacing a char with more than one character" Watch "replacing a char with more than one character" New topic

replacing a char with more than one character

shankar vembu
Ranch Hand

Joined: May 10, 2001
Posts: 309
I need to replace a char in my string with two chars(say replace 'a' with 'bc'). translate function wud not help cos it can only perform a char-char translation. So i thot I wud call a javascript function which can do this for me. But how do I call a javascript function from my xsl. and this needs to be called while the transformation is taking place. i am basically performing a xml to xml transformation.
Or if anyone knows a better idea to replace a single char with two chars, let me know please.
Mapraputa Is
Leverager of our synergies

Joined: Aug 26, 2000
Posts: 10065
XSLT Questions and Answers is the first place to visit if you have a problem. In particular, Replace.

Uncontrolled vocabularies
"I try my best to make *all* my posts nice, even when I feel upset" -- Philippe Maquet
wood burning stoves
subject: replacing a char with more than one character
Similar Threads
ASCII characters AND Java characters
replceAll function is not able to replace \r\r from my string
How to call Javascript function from an Application.
Why is RunThis(char arg[]) expecting a String?
apostripy problem