Call either a built-in function or a user-defined function.
A FunctionCall
expression is evaluated by using the
FunctionName
to identify a function in the expression evaluation
context function library, evaluating each of the arguments, converting each
argument to the type required by the function, and finally calling the
function, passing it the converted arguments. The result of the
FunctionCall
expression is the result returned by the expression.
A FunctionName
can be any qualified name (see definition of
QName
in the XML Namespaces specification,
Section 3, Rule
6) with the exception of those names that are used for a
NodeType
. Standard core functions in XPath do not use a namespace
prefix, but Tamino-internal functions use the prefix ino
such as
ino:id()
or ino:explain()
. You can also call a
function that has been defined as a server extension in the same way as every
other function. However, user-defined query functions are only available in
those databases in which they had been installed as a server extension.
It corresponds to the expression FunctionCall
defined in
XPath, Section 3.2,
Rule 16.
You can extend the set of builtin query functions by user-defined functions that are registered in a Tamino database as server extensions (see Tamino X-Tension for more information).
Call the Boolean function that always returns "true":
true()
Get the number of patients living in Bradford:
count(/patient[address/city = 'Bradford'])
Get the query explanation plan for selecting all patients living in cities whose names begin with "B" or "b":
ino:explain(/patient//city[. ~= 'B*'])
PrimaryExpr |