R1 : for $x in doc("sortieudpipe-slurp_3208.xml")/baseudpipe let $SkipLigne := " " let $counttitre := count($x/p[position() mod 3 eq 1]) let $countdesc := count($x/p[position() mod 3 eq 2]) return concat("Titre: ", $counttitre, $SkipLigne, "Description: ", $countdesc) R2: for $x in doc("sortieudpipe-slurp_3208.xml")/baseudpipe/p[position() mod 3 eq 1] let $SkipLigne := " " let $titre := $x/item/a[2]/text() let $titre := string-join($titre, " ") return concat($titre, $SkipLigne) R3: for $x in doc("sortieudpipe-slurp_3208.xml")/baseudpipe/p[position() mod 3 eq 2] let $SkipLigne := " " let $desc := $x/item/a[2]/text() let $desc := string-join($desc, " ") return concat($desc, $SkipLigne) R4: for $x in doc("sortieudpipe-slurp_3208.xml")/baseudpipe/p[position() mod 3 eq 1] let $SkipLigne := " " let $titre := $x/item/a[2]/text() let $titre := string-join($titre, " ") let $desc := $x/following-sibling::*[1]/item/a[2]/text() let $desc := string-join($desc, " ") return concat("Titre: ",$SkipLigne, $titre, $SkipLigne, $SkipLigne, "Description: ", $SkipLigne, $desc,$SkipLigne, "*******************") R5: for $x in doc("sortieudpipe-slurp_3208.xml")/baseudpipe/p/item let $SkipLigne := " " (:NOM ADJ:) return ( if ($x/a[4]="NOUN" and $x/following-sibling::*[1]/a[4]="ADJ" ) then concat ( $x/a[2] , " ", $x/following-sibling::*[1]/a[2]," - NOM-ADJ" ) else(), (:NOM VERBE ADV:) if($x/a[4]="NOUN" and $x/following-sibling::*[1]/a[4]="VERB" and $x/following-sibling::*[2]/a[4]="ADV") then concat( $x/a[2] , " ", $x/following-sibling::*[1]/a[2] , " " , $x/following-sibling::*[2]/a[2]," - NOM-VERBE-ADV") else(), (:NOM PREP NOM NOM:) if($x/a[4]="NOUN" and $x/following-sibling::*[1]/a[4]="ADP" and $x/following-sibling::*[2]/a[4]="NOUN"and $x/following-sibling::*[3]/a[4]="NOUN") then concat( $x/a[2] , " ", $x/following-sibling::*[1]/a[2] , " " , $x/following-sibling::*[2]/a[2] , " " , $x/following-sibling::*[3]/a[2] ," - NOM-PREP-NOM-NOM") else() ) R6: for $x in doc("sortieudpipe-slurp_3208.xml")/baseudpipe/p/item return( if ($x/a[8] = "obj") then concat($x/a[2], " ") else() ) R7: for $x in doc("sortieudpipe-slurp_3208.xml")/baseudpipe/p/item let $SkipLigne := " " where $x/a[8]="nsubj" let $indexElement := $x/a[1] let $indexGouverneur := $x/a[7] return (if (number($indexElement) > number($indexGouverneur)) then (let $distanceGov := ($indexElement - $indexGouverneur) let $texteGouverneur := $x/following-sibling::*[$distanceGov]/a[2]/text() return concat($texteGouverneur, " [SUB] ", $x/a[2]/text())) else (let $distanceGov := ($indexGouverneur - $indexElement) let $texteGouverneur := $x/following-sibling::*[$distanceGov]/a[2]/text() return concat($texteGouverneur, " [SUB] ", $x/a[2]/text())))