diff --git a/modules/facets.xqm b/modules/facets.xqm index ed35c4dd7..e99f49d5c 100644 --- a/modules/facets.xqm +++ b/modules/facets.xqm @@ -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) @@ -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 diff --git a/modules/query.xqm b/modules/query.xqm index 9b6454b5e..2653e9127 100644 --- a/modules/query.xqm +++ b/modules/query.xqm @@ -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?! :)