RE: converting speacial characters ?

Subject: RE: converting speacial characters ?
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Thu, 14 Sep 2000 18:39:18 +0100
Jukka wrote:
>> > >Look into the XPath translste() function. It's covered in:
>> > >    http://www.w3.org/TR/xpath#section-String-Functions
>> > >
>> >but it only works on single characters
>
>It works as far there are as many source characters as in converted
>character string. 
>
>e.g:
>
>like -> luck

And only in this case if there are no repeated letters in your string, for
example:

  translate("I like lakes", "like", "luck")

would give:

  "I luck lacks"

All 'l's are turned to 'l's, all 'i's to 'u's, all 'k's to 'c's and all
'e's to 'k's.

The translate() function is simply not designed to work on replacing whole
words, only individual characters with other characters.

Cheers,

Jeni

Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread