xquery version "3.0"; module namespace app="$$namespace$$"; import module namespace templates="http://exist-db.org/xquery/templates" $$templates$$; (:~ : This is a sample templating function. It will be called by the templating module if : it encounters an HTML element with a class attribute: class="app:test". The function : has to take exactly 3 parameters. : : @param $node the HTML node with the class attribute which triggered this call : @param $model a map containing arbitrary data - used to pass information between template calls :) declare function app:test($node as node(), $model as map(*)) {
Dummy template output generated by function app:test at {current-dateTime()}. The templating
function was triggered by the class attribute class="app:test"
.