Re: [xsl] Question on translate() function

Subject: Re: [xsl] Question on translate() function
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 25 Sep 2017 15:49:22 -0000
On 25.09.2017 17:20, Mailing Lists Mail daktapaal@xxxxxxxxx wrote:

What I get is :B if#xyz#abcbcd

What I was expecting / I wantB :B if##xyz#abc#bcd#

Thing that is perticularly bothering me is abcbcd and not abc#bcd

My understanding about the translate() function is that the second param is the list of chars you want to replace, the third param is the char you want to replace with. SO I was B hoping that

()''+-*$=b will all be replaced with #

Use replace then e.g. replace('if($xyz-(abc-bcd)', '[()''+\-*$=]', '#')

translate takes a replacement list, if that list is shorter than the list of characters to be translated the characters are removed.

Current Thread