diff --git a/pom.xml b/pom.xml index 92f6e013..e3f7e1b0 100644 --- a/pom.xml +++ b/pom.xml @@ -49,7 +49,7 @@ 1.8 ${project.version} - 1.1.0 + 1.2.0 v18.20.5 10.8.2 diff --git a/src/main/xar-resources/modules/view.xql b/src/main/xar-resources/modules/view.xql index 7c947108..7830daec 100755 --- a/src/main/xar-resources/modules/view.xql +++ b/src/main/xar-resources/modules/view.xql @@ -1,4 +1,5 @@ -xquery version "3.0"; +xquery version "3.1"; + import module namespace templates="http://exist-db.org/xquery/html-templating"; 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" import module namespace diag="http://exist-db.org/xquery/diagnostics" at "diagnostics.xql"; import module namespace app="http://exist-db.org/apps/docs/app" at "app.xql"; -declare option exist:serialize "method=html5 media-type=text/html"; -let $config := map { +declare namespace output="http://www.w3.org/2010/xslt-xquery-serialization"; + +declare option output:method "html5"; +declare option output:media-type "text/html"; + +declare function local:lookup ($functionName as xs:string, $arity as xs:integer) { + function-lookup(xs:QName($functionName), $arity) +}; + +declare variable $local:templating-configuration := map { + $templates:CONFIG_FILTER_ATTRIBUTES : true(), + $templates:CONFIG_USE_CLASS_SYNTAX : false(), $templates:CONFIG_APP_ROOT : $config:app-root, $templates:CONFIG_STOP_ON_ERROR : true() -} -let $lookup := function($functionName as xs:string, $arity as xs:integer) { - try { - function-lookup(xs:QName($functionName), $arity) - } catch * { - () - } -} -let $content := request:get-data() -return - templates:apply($content, $lookup, (), $config) +}; + +templates:apply( + request:get-data(), + local:lookup#2, + (), + $local:templating-configuration +) diff --git a/src/main/xar-resources/search.html b/src/main/xar-resources/search.html index 71d0a83a..bd0e594b 100644 --- a/src/main/xar-resources/search.html +++ b/src/main/xar-resources/search.html @@ -4,18 +4,18 @@
- +
-
- @@ -31,7 +31,7 @@
-
+