Commit e1997598 authored by Wolfgang's avatar Wolfgang

Bugfix: when viewing a page resulting from search, navigating to next/previous...

Bugfix: when viewing a page resulting from search, navigating to next/previous page caused an error unless the page as well contained the search terms
parent 3cffacfe
......@@ -177,8 +177,12 @@ declare function teis:expand($data as element()) {
($data/ancestor::tei:div, $data/ancestor::tei:text)[1]
else
$data
let $result := teis:query-default-view($div, $query, $field)
let $expanded :=
util:expand(teis:query-default-view($div, $query, $field), "add-exist-id=all")
if (exists($result)) then
util:expand($result, "add-exist-id=all")
else
$div
return
if ($data instance of element(tei:pb)) then
$expanded//tei:pb[@exist:id = util:node-id($data)]
......
Markdown is supported
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