fds=118 118 fds.118 xquery version '3.0'; let $context := doc($db:context) let $howmany := 1000 let $atts := $context//att[(bron/descendant::*/@fonds = 'fds.118')] 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> Essen Essen Cf. Aigneux, Assenois, Assent, Ernage, Esneux, Hannut Astnetensis 1073 D Sb 1 Kempen Kempen in Kempeno 1073 D Sb 1 Stoppenberg Kray Essen Stophenberch 1073 D Sb 1 Köln Stofenberch 1224 D Sb 2 Köln