The fn:translate function replaces selected characters in a string with replacement characters.
>>-fn:translate(source-string,original-string,replacement-string)-><
source-string has the xs:string data type, or is the empty sequence.
original-string has the xs:string data type.
replacement-string has the xs:string data type.
If the length of replacement-string is greater than the length of original-string, the additional characters in replacement-string are ignored.
The length of original-string and replacement-string is limited to 32000 bytes.
If the length of original-string is greater than the length of replacement-string, delete each character in source-string that appears in original-string, but the character position in original-string does not have a corresponding position in replacement-string.
If a character appears more than once in original-string, the position of the first occurrence of the character in original-string determines the character in replacement-string that is used.
If source-string is the empty sequence, a string of length 0 is returned.
fn:translate('Test literal','el','om')
The returned value is 'Tost mitoram'.
fn:translate('Another test literal', 'Ater', 'Bfim')
The returned value is 'Bnofhim fisf lifimal'.