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

extended kwic hit elements, closes #11

parent fb94056e
......@@ -2,6 +2,7 @@ xquery version "3.1";
module namespace fsearch="";
import module namespace config="" at "config.xqm";
import module namespace console="";
import module namespace kwic="";
declare namespace bol="";
......@@ -145,7 +146,10 @@ declare function fsearch:result-kwic($node as node(), $model as map(*)) {
for $i in 1 to xs:integer(config:get("kwic-hits", "faceted-search"))
if(($expanded//exist:match)[$i]) then
kwic:get-summary($expanded, ($expanded//exist:match)[$i], <config width="{$kwic-width}"/>)
let $summary := kwic:get-summary($expanded, ($expanded//exist:match)[$i], <config width="{$kwic-width}"/>),
$console := console:log($summary)
<p class="kwic"><span class="kwic-prev">{$summary/span[@class="previous"]/node()}</span> <span class="kwic-hit">{$summary/span[@class="hi"]/node()}</span> <span>{$summary/span[@class="following"]/node()}</span></p>
else ()
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