for $nam1 in //item/a[4] let $textn1 := $nam1/preceding-sibling::a[2]/text() let $nam2 := $nam1/parent::item/following-sibling::item[1]/a[4] let $textn2 := $nam2/preceding-sibling::a[2]/text() let $ver := $nam2/parent::item/following-sibling::item[1]/a[4] let $textv2 := $ver/preceding-sibling::a[2]/text() return if($nam1/text()='PROPN' and $nam2/text()='PROPN' and $ver/text()='VERB') then string-join(($textn1, $textn2, $textv2), ' ') else ()