fn:translate

Returns a string formed by replacing individual characters that appear in the second argument with the characters that appear at the corresponding position in the third argument.

translate($value as xs:string?, $replace as xs:string, $with as xs:string) ➔ xs:string

Arguments

 

$value

xs:string?

The string to be translated

 

$replace

xs:string

Characters to be replaced if they appear in the input string

 

$with

xs:string

Characters to be used as the replacement for corresponding characters in the second argument

Result

xs:string

Namespace

http://www.w3.org/2005/xpath-functions

Links to W3C specifications

XPath 3.1 Functions and Operators

XPath 4.0 Functions and Operators

Saxon availability

Available in XPath 2.0, XSLT 2.0, XQuery 1.0, and later versions. Available in all Saxon editions. Available for all platforms.