Commit cad55d01 authored by Mathias Goebel's avatar Mathias Goebel 🎠
Browse files

fconfig debuged

parent 565c90ac
......@@ -8,7 +8,9 @@ module namespace fconfig="https://fontane-nb.dariah.eu/fontane-config";
import module namespace config="http://exist-db.org/xquery/apps/config-params" at "config.xql";
declare variable $fconfig:project := let $value:= request:get-url() => substring-after("SADE/") => substring-before("/") return if($value="") then "textgrid" else $value;
declare variable $fconfig:project :=
let $value:= try { request:get-url() => substring-after("SADE/") => substring-before("/") } catch * {}
return if($value="") then "textgrid" else $value;
declare variable $fconfig:configDoc := doc( $config:projects-dir || $fconfig:project || "/config.xml" );
declare variable $fconfig:configMap := map:new(
for $param in $fconfig:configDoc/config/*[@key]
......
......@@ -137,7 +137,7 @@ declare function fsearch:result-kwic($node as node(), $model as map(*)) {
let $expanded := kwic:expand($hit)
order by ft:score($hit) descending
return
for $i in 1 to xs:integer(fconfig:get("kwic-hits"))
for $i in 1 to xs:integer(fconfig:module-get("faceted-search", "kwic-hits"))
return
if(($expanded//exist:match)[$i]) then
kwic:get-summary($expanded, ($expanded//exist:match)[$i], <config width="40"/>)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment