UpdatingFunction

Call a function to updated a database entry.

Top of page

Related Syntax Constructs

The following construct(s) refer to this construct:


Syntax

graphics/UpdatingFunction.png

Description

An UpdatingFunction represents the invocation of an updating function, together with the provided argument expression list. The QName must match the name of an updating function that is declared in the current update statement or in an imported module. The number of argument expressions must match the number of arguments in the declared function signature.

An updating function can only be invoked from within an update expression. It does not return a function value, rather it results in a sequence of update operations being applied to the database.

Example

For each book element, invoke the function y:set-year:

import module namespace y="Y";
update
  for $book in input()/bib/book
  do Y:set-year($book)