1
- xquery version "3.0" ;
1
+ xquery version "3.1" ;
2
+
2
3
3
4
import module namespace templates="http://exist-db.org/xquery/html-templating" ;
4
5
import module namespace lib="http://exist-db.org/xquery/html-templating/lib" ;
@@ -11,19 +12,26 @@ import module namespace review="http://exist-db.org/xquery/documentation/review"
11
12
import module namespace diag="http://exist-db.org/xquery/diagnostics" at "diagnostics.xql" ;
12
13
import module namespace app="http://exist-db.org/apps/docs/app" at "app.xql" ;
13
14
14
- declare option exist:serialize "method=html5 media-type=text/html" ;
15
15
16
- let $config := map {
16
+ declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization" ;
17
+
18
+ declare option output:method "html5" ;
19
+ declare option output:media-type "text/html" ;
20
+
21
+ declare function local:lookup ($functionName as xs:string, $arity as xs:integer) {
22
+ function-lookup (xs:QName ($functionName), $arity)
23
+ };
24
+
25
+ declare variable $local:templating-configuration := map {
26
+ $templates:CONFIG_FILTER_ATTRIBUTES : true (),
27
+ $templates:CONFIG_USE_CLASS_SYNTAX : false (),
17
28
$templates:CONFIG_APP_ROOT : $config:app-root,
18
29
$templates:CONFIG_STOP_ON_ERROR : true ()
19
- }
20
- let $lookup := function ($functionName as xs:string, $arity as xs:integer) {
21
- try {
22
- function-lookup (xs:QName ($functionName), $arity)
23
- } catch * {
24
- ()
25
- }
26
- }
27
- let $content := request:get-data ()
28
- return
29
- templates:apply ($content, $lookup, (), $config)
30
+ };
31
+
32
+ templates:apply (
33
+ request:get-data (),
34
+ local:lookup#2 ,
35
+ (),
36
+ $local:templating-configuration
37
+ )
0 commit comments