This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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
Author

replacing a char with more than one character

shankar vembu
Ranch Hand

Joined: May 10, 2001
Posts: 309
Hello,
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.
Regards,
Shankar.
Mapraputa Is
Leverager of our synergies
Sheriff

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
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