This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: converting speacial characters ?


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]