Commit 2e7dd22e authored by MRodz's avatar MRodz Committed by mrodzis
Browse files

Add more person information to tei:rs

parent a08cf194
......@@ -89,18 +89,35 @@ $index-type as xs:string) as xs:string* {
(: index specific functions :)
(: events :)
declare function index-info:get-event-place($ref as xs:string) as xs:string {
let $main-entry := local:get-main-entry($ref, "eve")
return map:get($main-entry, "place")
};
(: places :)
declare function index-info:get-place-sub-ref($ref as xs:string) as xs:string* {
let $main-entry := local:get-main-entry($ref, "plc")
return map:get($main-entry, "subref-of")
};
(: persons :)
declare function index-info:get-birth-date($ref as xs:string) as xs:string* {
local:get-main-entry($ref, "psn") => map:get("birth")
};
declare function index-info:get-death-date($ref as xs:string) as xs:string* {
let $main-entry := local:get-main-entry($ref, "psn")
return map:get($main-entry, "death")
};
declare function index-info:get-occupation($ref as xs:string) as xs:string* {
let $main-entry := local:get-main-entry($ref, "psn")
return map:get($main-entry, "occupation")
};
(: auxiliary functions :)
declare function index-info:get-full-maps() {
$index-info:wrk-map
......
......@@ -638,13 +638,12 @@ declare function fontaneSimple:transform($nodes as node()*) as node()* {
case element(tei:rs) return
let $index-type := substring-before($node/@ref, ":")
let $bla := console:log($node)
return
(element tei:rs {
element tei:rs {
$node/@*,
fontaneSimple:make-index-attributes($node, $index-type),
fontaneSimple:transform($node/node())
}, console:log(fontaneSimple:transform($node/node())))
}
case element(tei:date) return
element {QName("http://www.tei-c.org/ns/1.0", $node/name())}{
......@@ -893,7 +892,9 @@ $index-type as xs:string) as attribute()* {
case "plc" return
attribute {"subref-of-" || $iii} {index-info:get-place-sub-ref($ref)}
case "psn" return
()
(attribute {"birth-" || $iii} {index-info:get-birth-date($ref)},
attribute {"death-" || $iii} {index-info:get-death-date($ref)},
attribute {"occupation-" || $iii} {index-info:get-occupation($ref)})
case "wrk" return
()
default return
......
This diff is collapsed.
This diff is collapsed.
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