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