for $article in collection("TALISMANE-3208")//p for $ele in $article/item let $nextele1:=$ele/following-sibling::item[1] let $nextele2:=$ele/following-sibling::item[2] where $ele/a[4]="NC" and $nextele1/a[4]="P" and $nextele2/a[4]="NC" return concat($ele/a[2]/text()," ",$nextele1/a[2]/text()," ",$nextele2/a[2]/text())