Skip to content

Commit

Permalink
add support for new text types
Browse files Browse the repository at this point in the history
  • Loading branch information
peterstadler committed Dec 10, 2020
1 parent 5f5e19f commit 3b603b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/wdt.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ declare function wdt:personsPlus($item as item()*) as map(*) {

declare function wdt:writings($item as item()*) as map(*) {
let $filter := function($docs as document-node()*) as document-node()* {
$docs/root()/descendant::tei:text[range:eq(@type, ('performance-review', 'historic-news', 'concert_announcements', 'work-review'))]/root()
$docs/root()/descendant::tei:text[range:eq(@type, ('performance-review', 'historic-news', 'concert_announcements', 'work-review', 'biographical', 'literature'))]/root()
}
return
map {
Expand All @@ -300,7 +300,7 @@ declare function wdt:writings($item as item()*) as map(*) {
for $i in $filter($item) order by sort:index('writings', $i) ascending return $i
},
'init-collection' : function() as document-node()* {
crud:data-collection('writings')/descendant::tei:text[range:eq(@type, ('performance-review', 'historic-news', 'concert_announcements', 'work-review'))]/root()
crud:data-collection('writings')/descendant::tei:text[range:eq(@type, ('performance-review', 'historic-news', 'concert_announcements', 'work-review', 'biographical', 'literature'))]/root()
},
'init-sortIndex' : function() as item()* {
sort:create-index-callback('writings', wdt:writings(())('init-collection')(), function($node) {
Expand Down

0 comments on commit 3b603b2

Please sign in to comment.