Skip to content

Commit

Permalink
adjustments for new keys on settlement
Browse files Browse the repository at this point in the history
  • Loading branch information
peterstadler committed Sep 14, 2017
1 parent 041117b commit d89882c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion modules/facets.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ declare %private function facets:display-term($facet as xs:string, $term as xs:s
if(wdt:persons($term)('check')()) then wdt:persons($term)('label-facets')() (:$facets:persons-norm-file//norm:entry[range:eq(@docID,$term)]/normalize-space():)
else wdt:orgs($term)('label-facets')()
case 'works' return wdt:works($term)('label-facets')()
case 'placeOfAddressee' case 'placeOfSender' case 'residences' case 'places' return wdt:places($term)('title')('txt')
case 'sex' return
if($term ='Art der Institution') then lang:get-language-string('organisationsInstitutions', $lang)
else lang:get-language-string('sex_' || $term, $lang)
Expand Down Expand Up @@ -162,7 +163,6 @@ declare
let $label := facets:display-term($i, $j, $lang)
let $key :=
switch($i)
case 'places' return string-join(string-to-codepoints(normalize-space($j)) ! string(.), '')
case 'characterNames' return string-join(string-to-codepoints(normalize-space($j)) ! string(.), '')
default return $j
order by $label ascending
Expand Down
8 changes: 4 additions & 4 deletions modules/query.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -199,17 +199,17 @@ declare function query:get-facets($collection as node()*, $facet as xs:string) a
case 'sender' return $collection//tei:correspAction[range:eq(@type,'sent')]//@key[parent::tei:persName or parent::name or parent::tei:orgName]
case 'addressee' return $collection//tei:correspAction[range:eq(@type,'received')]//@key[parent::tei:persName or parent::name or parent::tei:orgName]
case 'docStatus' return $collection/*/@status | $collection//tei:revisionDesc/@status
case 'placeOfSender' return $collection//tei:placeName[parent::tei:correspAction/@type='sent']
case 'placeOfAddressee' return $collection//tei:placeName[parent::tei:correspAction/@type='received']
case 'placeOfSender' return $collection//tei:settlement[parent::tei:correspAction/@type='sent']/@key
case 'placeOfAddressee' return $collection//tei:settlement[parent::tei:correspAction/@type='received']/@key
case 'journals' return $collection//tei:title[@level='j'][not(@type='sub')][ancestor::tei:sourceDesc]
case 'places' return $collection//tei:settlement[ancestor::tei:text or ancestor::tei:ab]
case 'places' return $collection//tei:settlement[ancestor::tei:text or ancestor::tei:ab]/@key
case 'dedicatees' return $collection//mei:persName[@role='dte']/@dbkey
case 'lyricists' return $collection//mei:persName[@role='lyr']/@dbkey
case 'librettists' return $collection//mei:persName[@role='lbt']/@dbkey
case 'composers' return $collection//mei:persName[@role='cmp']/@dbkey
case 'docSource' return $collection/tei:person/@source
case 'occupations' return $collection//tei:occupation
case 'residences' return $collection//tei:settlement[parent::tei:residence]
case 'residences' return $collection//tei:settlement[parent::tei:residence]/@key
(: index-keys does not work with multiple whitespace separated keys
probably need to change to ft:query() someday?!
:)
Expand Down

0 comments on commit d89882c

Please sign in to comment.