Custom local functions

Functions may appear in a model and be declared with the help of the fx-function element. Both XPath as well as JavaScript functions are supported.

A function transforming data with XUpdate

Functions can also accept elements, and XQuery update facility is present allowing to transform data on the fly!

Modify the `reference/ref` elements in the input data and see the result control change.

The function will work on the `main/ref` elements and update them according to their `id` matching the `reference/ref/@id`.