<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/sem.coalesce.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>sem.coalesce</api:function-name><api:suggest>sem.coalesce</api:suggest><api:suggest>sem</api:suggest><api:suggest>coalesce</api:suggest><api:function-link mode="xquery" fullname="sem:coalesce">/apidoc/8.0/sem:coalesce.xml</api:function-link><api:function mode="javascript" name="coalesce" type="builtin" lib="sem" category="Semantics" hidden="false" bucket="MarkLogic Built-In Functions" prefix="sem" namespace="http://marklogic.com/semantics" fullname="sem.coalesce"><api:summary>
  Returns the value of the first argument that evaluates without error.
  This XQuery function backs up the SPARQL COALESCE() functional form.
  <p xmlns="http://www.w3.org/1999/xhtml">This function is a built-in.</p>
</api:summary><api:params><api:param name="parameter1" type="item()*"><api:param-description>
   A value.
  </api:param-description><api:param-name>parameter1</api:param-name><api:param-type>ValueIterator</api:param-type></api:param><api:param name="parameterN" type="item()*,..." optional="true"><api:param-description>
   A value.  You can specify as many parameters as you need.
  </api:param-description><api:param-name>parameterN</api:param-name><api:param-type>item()*,...</api:param-type></api:param></api:params><api:return>ValueIterator</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
sem.coalesce("foo", "bar", "baz");
=&gt;
foo
</pre></api:example></api:function></api:function-page>