Built-in functions
Db2 XQuery provides a library of built-in functions for working with XML data. These built-in functions include XQuery-defined functions and Db2 built-in functions.
- XQuery-defined functions
- XQuery-defined functions are in the namespace that is bound to
the prefix
fn
. This namespace is the default function namespace, which means that you can invoke XQuery-defined functions without specifying a namespace prefix. If you override this default function namespace with a default function namespace declaration in the query prolog, you must use the prefixfn
to invoke XQuery-defined functions. - Db2-defined functions
- The Db2-defined functions are db2-fn:xmlcolumn and db2-fn:sqlquery,
which you use to access XML values from a Db2 database. The prefix
db2-fn
is not the default function namespace, so you must use the namespace prefix when invoking these functions unless you override the default namespace with a default function namespace declaration in the query prolog.