Skip to content

Commit

Permalink
constrained getTodaysEvents() to only show people once even when ther…
Browse files Browse the repository at this point in the history
…e are more matching dates
  • Loading branch information
peterstadler committed Nov 14, 2013
1 parent 9ed6fec commit 5703d64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webapp/xql/modules/wega.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -1352,7 +1352,7 @@ declare function wega:getTodaysEvents($date as xs:date) as element(tei:date)* {
let $date-regex := concat('^', string-join(('\d{4}',$month,$day),'-'), '$')
return
collection(wega:getOption('letters'))//tei:dateSender/tei:date[matches(@when, $date-regex)] union
collection(wega:getOption('persons'))//tei:date[matches(@when, $date-regex)][parent::tei:birth or parent::tei:death][ancestor::tei:person/@source='WeGA']
collection(wega:getOption('persons'))//tei:date[matches(@when, $date-regex)][not(preceding-sibling::tei:date[matches(@when, $date-regex)])][parent::tei:birth or parent::tei:death][ancestor::tei:person/@source='WeGA']
};

(:~
Expand Down

0 comments on commit 5703d64

Please sign in to comment.