for $item at $i in doc("/Users/julie/Documents/projet_encadre/BAO3/corpus_titre_description-3246.udpipe.xml")//p/item where $item/a[8]="nsubj" let $pos_dep := $item/a[1] let $pos_gov := $item/a[7] return if ($pos_dep < $pos_gov) then (string-join(($item/following-sibling::item[a[1]=$pos_gov]/a[2], "->", $item/a[2]), " ")) else (string-join(($item/preceding-sibling::item[a[1]=$pos_gov]/a[2], "->", $item/a[2]), " "))