Functions are very powerful! But please Don't Repeat Yourself! So throw them in a function
library and reuse them across your pages! Both XPath (XQuery/XUpdate) as well as JavaScript functions are
supported. Just use the <fx-functionlib src="my-functionlibrary-here.html">
element and away you go!
The library can be found at ./lib.html. Visit it!
And the answer is {theanswer()}
And the answer is {hello('from function')}
Making an application with multiple pages or nested Fore elements? No worry, you can reuse the same
fx-functionlib without overwriting function definitions. If in confict the XPath engine always uses the first
matching fx-function
element.
In the example below 2 function libaries are used and the second also has an answer to everything but it's ignored.
And the answer is {theanswer()}
{hello('from XPath function')}
{now()}