Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
fontane-notizbuecher
SADE
Commits
2e7dd22e
Commit
2e7dd22e
authored
Oct 24, 2018
by
MRodz
Committed by
mrodzis
Feb 05, 2019
Browse files
Add more person information to tei:rs
parent
a08cf194
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
modules/fontane/teisimpleprint/index-info.xqm
View file @
2e7dd22e
...
...
@@ -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
...
...
modules/fontane/teisimpleprint/tei2teisimple.xqm
View file @
2e7dd22e
...
...
@@ -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
...
...
resources/xml/tei-simple-pre.xml
View file @
2e7dd22e
This diff is collapsed.
Click to expand it.
resources/xml/tei-simple-tmp.xml
View file @
2e7dd22e
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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