<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/fn.translate.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>fn.translate</api:function-name><api:suggest>fn.translate</api:suggest><api:suggest>fn</api:suggest><api:suggest>translate</api:suggest><api:function-link mode="xquery" fullname="fn:translate">/apidoc/8.0/fn:translate.xml</api:function-link><api:function mode="javascript" name="translate" type="builtin" lib="fn" category="StringBuiltins" bucket="W3C-Standard Functions" hidden="false" prefix="fn" namespace="http://www.w3.org/2005/xpath-functions" fullname="fn.translate"><api:summary>
Returns a string where every character in $src that occurs in some
position in the $mapString is translated into the $transString character
in the corresponding location of the $mapString character.
</api:summary><api:params><api:param name="src" type="xs:string?"><api:param-description>
  The string to translate characters.
  </api:param-description><api:param-name>src</api:param-name><api:param-type>String?</api:param-type></api:param><api:param name="mapString" type="xs:string?"><api:param-description>
  The string representing characters to be translated.
  </api:param-description><api:param-name>mapString</api:param-name><api:param-type>String?</api:param-type></api:param><api:param name="transString" type="xs:string?"><api:param-description>
  The string representing the characters to which the
  $mapString characters are translated.
  </api:param-description><api:param-name>transString</api:param-name><api:param-type>String?</api:param-type></api:param></api:params><api:return>String?</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
fn.translate("abcd", "abcd", "wxyz");

=&gt; wxyz
</pre>
</api:example></api:function></api:function-page>