fds=89 89 fds.89 xquery version '3.0'; let $context := doc($db:context) let $howmany := 1000 let $atts := $context//att[(bron/descendant::*/@fonds = 'fds.89')] return <result lem='{count($atts/preceding-sibling::lemma)}' atts='{count($atts)}' shown='{$howmany}'> { for $i in 1 to min(($howmany, count($atts))) let $att := $atts[$i] group by $lem := $att/preceding-sibling::lemma order by $lem/vorm return <entry> {$lem} {$att intersect $atts} </entry> } </result> Dünnwald Mülheim Köln Dvonewalt (1156-60) D Dw 1 Dvonewalt (1203-16) D Dw 3 Důnewalt 1217 D Dw 4 Donewalt (1203-16) D Dw 3 Eifel Gebirge und Gau Euflia 1217 D Dw 4 Hardenberg Neviges Hardenberg 1217 D Dw 4 Mendig = Niedermendig und Obermendig Mendig Mendich 1217 D Dw 4 Paffrath Bergisch-Gladbach Pafferodhe (1156-60) D Dw 1 Pafrode (1203-16) D Dw 3 Zissen = Niederzissen und Oberzissen Zissen Cisse 1217 D Dw 4