Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fontane-notizbuecher
SADE
Commits
4132deab
Commit
4132deab
authored
Aug 15, 2018
by
Mathias Goebel
Browse files
fix former_current_location, add more information for nested entries
parent
e8f040a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/fontane/index-processor.xqm
View file @
4132deab
...
...
@@ -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>,
" ",
$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 ()))
}
}
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment