Loading TOC...

MarkLogic 9 Product Documentation
sem:coalesce

sem:coalesce(
   $parameter1 as item()*,
   [$parameterN as item()*,...]
) as item()*

Summary

Returns the value of the first argument that evaluates without error. This XQuery function backs up the SPARQL COALESCE() functional form.

This function is a built-in.

Parameters
parameter1 A value.
parameterN A value. You can specify as many parameters as you need.

Example

sem:coalesce("foo", "bar", "baz");
=>
foo

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.