for $ver in //item/a[4] let $textv := $ver/preceding-sibling::a[2]/text() let $det := $ver/parent::item/following-sibling::item[1]/a[4] let $textd := $det/preceding-sibling::a[2]/text() let $nom1 := $det/parent::item/following-sibling::item[1]/a[4] let $textn := $nom1/preceding-sibling::a[2]/text() return if($ver/text()='VERB' and $det/text()='DET' and $nom1/text()='NOUN') then string-join(($textv, $textd, $textn), ' ') else ()