[Home] [By Thread] [By Date] [Recent Entries]
On 6/12/07, Charles Ohana <charles.ohana@xxxxxxxxxxxxxx> wrote:
I want to replace "a" by "b" inside "/root/@description" . I'm using XSLT 1.0 as I copied this code example from the web. it's not working with 2.0 either anyways. I'm not restricted to any version. All I need is to be able to replace string . Thank you To replace single characters use translate() eg translate(/root/@description, 'a', 'b') which is in both XSLT 1.0 and 2.0 To replace more than one character you can use replace() replace(/root/@description, 'aa', 'bb') which is only in 2.0 To to do multiple character replacements in 1.0 you need the lond-winded recursive named template approach, which what you've copied from the web. cheers andrew
|

Cart



