for $b in doc("sortieudpipe-3244.xml")/baseudpipe/p for $c in $b/item where $c/a[8][contains(text(), 'obj')] let $gouv := $c/a[7] let $obj := $c/a[1] let $num := $obj - $gouv let $str := if($num>0) then $c/preceding-sibling::*[$num]/a[2] else($c/following-sibling::*[-$num]/a[2]) let $strobj :=$c/a[2] return (concat($str," ",$strobj))