prolog_declarations.txt 546 B

12345678910111213141516171819202122
  1. xquery version "3.1";
  2. (:~
  3. : @author Duncan Paterson
  4. : @version 1.0:)
  5. module namespace app="http://none";
  6. import module namespace config="http://config" at "config.xqm"; (: schema :)
  7. declare copy-namespaces no-preserve, inherit;
  8. (: switch to preserve, no-inherit:)
  9. declare %private variable $app:maxItems := 12;
  10. declare context item := doc("catalog.xml");
  11. declare %templates:wrap-all function app:helloworld($node as node(), $model as map(*), $name as xs:string?) {
  12. if ($name) then
  13. <p>Hello {$name}!</p>
  14. else
  15. ()
  16. };