Commit 5bad0580 authored by mrodzis's avatar mrodzis 🌎
Browse files

Add info about cross references (cf. print#8)

parent 75b794bb
......@@ -51,7 +51,7 @@ declare variable $index-info:place-map :=
));
declare variable $index-info:psn-map :=
map:merge(for $entry in doc("/db/sade-projects/textgrid/data/xml/data/253sx.xml")//*[self::tei:person or self::tei:personGrp]
map:merge(for $entry in doc("/db/sade-projects/textgrid/data/xml/data/test-psn.xml")//*[self::tei:person or self::tei:personGrp]
return
map:entry(string($entry/@xml:id),
map {
......@@ -60,7 +60,8 @@ declare variable $index-info:psn-map :=
"death" : string($entry/tei:death),
"occupation" : string($entry/tei:occupation),
"occs-in-nbs" : "",
"relation-to-fontane" : string($entry/tei:state/tei:desc)
"relation-to-fontane" : string($entry/tei:state/tei:desc),
"same-as" : string($entry/ancestor::tei:listPerson//tei:person[not(@xml:id)][descendant::tei:ptr[contains(@target, $entry/@xml:id)]]/tei:persName)
}
));
......
......@@ -930,6 +930,12 @@ $index-type as xs:string) as element()* {
let $relation := index-info:get-info-about($index-type, $ref, "relation-to-fontane")
return
fontaneSimple:make-term("relation-to-fontane", $relation)
else
(),
if(index-info:get-info-about($index-type, $ref, "same-as")) then
let $same-as := index-info:get-info-about($index-type, $ref, "same-as")
return
fontaneSimple:make-term("same-as", $same-as)
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