salut:
soit le doc XML:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
 
<livre titre="Mon livre">
<auteurs>
<auteur nom="nom1" prenom="prenom1"/>
<auteur nom="nom2" prenom="prenom2"/>
</auteurs>
<sections>
<section titre="Section1">
<chapitre titre="Chapitre1">
<paragraphe>Premier paragraphe</paragraphe>
<paragraphe>Deuxième paragraphe</paragraphe>
</chapitre>
</section>
<section titre="Section2">
<chapitre titre="Chapitre1">
<paragraphe>Premier paragraphe</paragraphe>
<paragraphe>Deuxième paragraphe</paragraphe>
</chapitre>
</section>
</sections>
</livre>
je cherche à trouver la liste des chapitres dont un paragraphe possède le mot "Deuxième";
voici ma solution au format non abrégé, qui renvoie toujours l'ensemble vide:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
/child::livre/child::sections/child::section/child::chapitre[contains(child::paragraphe/text(),"Deuxième")]
pourtant avec le mot "Premier" çà marche trés bien
MERCI