Commit 78b58a04 authored by Mathias Goebel's avatar Mathias Goebel 🎠
Browse files

refined index

parent 1249a0b5
......@@ -202,9 +202,7 @@ declare
%rest:path("fontane/index/entity/{$id}")
%output:method("html")
function index:rendered-entity($id as xs:string)
as element(xhtml:li)? {
(: doc("/db/sade-projects/textgrid/data/xml/xhtml/index.xml")//xhtml:li[@id = $id]:)
as item()* {
let $node := collection($index:dataPath)/id($id)
let $type := $node/root()//tei:body/*[1]/local-name()
(: listEvent, listPlace, listOrg, listPerson or list :)
......
......@@ -1097,6 +1097,15 @@ else
attribute class { "label-main" },
$labelMain/text()
},
if(not($place/parent::tei:place)) then () else
element xhtml:span {
attribute class { "hiera-ref" },
" in: ",
element xhtml:a {
attribute href { "?e=" || string($place/parent::tei:place/@xml:id) },
string($place/parent::tei:place/*[1])
}
},
element xhtml:ul {
(: variant :)
ixp:variant($variant),
......
......@@ -229,7 +229,7 @@ then
else true()
};
declare function ixv:item($node, $map, $e as xs:string?) {
declare function ixv:item($node, $map, $e as xs:string?, $nb as xs:string?) {
if(string-length($e) gt 1)
then
index:rendered-entity($e)
......
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