Commit 4132deab authored by Mathias Goebel's avatar Mathias Goebel 🎠
Browse files

fix former_current_location, add more information for nested entries

parent e8f040a2
......@@ -355,7 +355,8 @@ element xhtml:li {
declare function local:has-former-or-current-location($links as element(tei:link)*)
as element(xhtml:li)* {
for $link in $links
let $id := $link/@target => substring-after(":") => substring-before(" ")
let $id := $link/@target => substring-after(" ") => substring-after(":")
let $targetNode := $f-indexproc:dataCollection/id($id)
return
element xhtml:li {
attribute class { "former-or-current-location" },
......@@ -363,7 +364,14 @@ return
attribute href { "?e=" || $id },
<xhtml:i class="fa fa-map-marker" aria-hidden="true"></xhtml:i>,
"&#160;",
$f-indexproc:dataCollection/id($id)/*[1]/string()
$targetNode/*[1]/string(),
let $ancestors := $targetNode/ancestor::tei:place
for $parentPlace at $pos in $ancestors
let $name := $parentPlace/*[1]/string()
return
((if($pos = 1) then "(" else ", ") ||
$name ||
(if($pos = count($ancestors)) then ")" else ()))
}
}
};
......
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