Bonjour,

jai un schema xml qui se presente ainsi :
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
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<s xml:lang="fr" id="0">
		<phr type="DP" function="subj" id="Subj0">
			<w type="det" lemma="le">Le</w>
			<w type="adj" lemma="joli">joli</w>
			<w type="nom" lemma="chat">chat</w>
 
			<phr type="" function="D-obj" id="Do1">
				<w type="pro" lemma="que">que</w>
			</phr>
 
			<phr type="" function="subj" id="Subj1">
				<w type="nom" lemma="je">j'</w>
			</phr>
 
			<phr type="" function="predicate" id="Predicate1">
				<w type="aux" lemma="avoir">ai</w>
 
                             <phr type="" function="CC" xml:id="CC2">
				<w type="adv" lemma="gentiment">gentiment</w>
			     </phr>
 
				<w type="partpass" lemma="adopter">adopté</w>
			</phr>
		</phr>
 
		<phr type="" function="predicate" id="Predicate0">
			<w type="aux" lemma="avoir">a</w>
			<phr type="" function="CC" id="CC1">
				<w type="adv" lemma="bien">bien</w>
			</phr>
			<w type="partpass" lemma="donner">donné</w>
 
		</phr>
 
		<phr type="" function="D-obj" id="Do0">
			<w type="det" lemma="un">un</w>
			<w type="nom" lemma="coup">coup</w>
			<w type="prep" lemma="de">de</w>
			<w type="nom" lemma="patte">patte</w>
		</phr>
 
		<phr type="" function="I-obj" id="Io0">
			<w type="prep" lemma="à">à</w>
			<w type="det" lemma="le">la</w>
			<w type="nom" lemma="souris">souris</w>
		</phr>
 
		<phr type="" function="CC" id="Cc0">
			<w type="prep" lemma="dans">dans</w>
			<w type="det" lemma="le">la</w>
			<w type="nom" lemma="cuisine">cuisine</w>
		</phr>
 
 
	</s>
jaimerai le tranformer en html comme celui ci :
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
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<div id="phrase">
 
 
<span class="Subj0"> 
	<span class="det" title="Déterminant défini - Masculin Singulier">le</span>
	<span class="adj" title="Adjectif - Masculin Singulier">joli</span>
	<span class="nom" title="Nom Commun - Masculin Singulier">chat</span> 
<span class="Do1"> 
   <span class="pro" title="Pronom Relatif - Singulier Masculin">que</span> 
</span> 
<span class="Subj1"> 
   <span class="nom" title="Pronom Personnel - 1ère Personne Singulier">j'</span>
</span> 
 <span class="predicate1"> 
  <span class="aux" title="Verbe Auxiliaire - Indicatif 1ère Personne Singulier">ai</span> 
  <span class="Cc2">
	<span class="adv" title="Adverbe">gentiment</span> </span> 
	<span class="partpass" title="Verbe - Participe Passé">adopté</span>
</span> 
</span> 
 
<span class="predicate0"> 
	<span class="aux" title="Verbe Auxiliaire - Indicatif 3éme personne Singulier">a</span> 
 <span class="Cc1">
	<span class="adv" title="Adverbe">bien</span>
 </span> 
<span class="partpass" title="Verbe - Participe Passé">donné</span> 
</span> 
 
<span class="Do0"> 
	<span class="det" title="Déterminant Indéfini - Singulier Masculin">un</span>
	<span class="nom" title="Nom Commun - Singulier Masculin">coup</span> 
	<span class="prep" title="Préposition">de</span> <span class="nom" title="Nom Commun - Singulier Féminin">patte</span>
</span> 
 
<span class="Io0">
	<span class="prep" title="Préposition">à</span>
	<span class="det" title="Déterminant Défini - Singulier Féminin">la</span>
	<span class="nom" title="Nom Commun - Singulier Féminin">souris</span>
</span>
 
<span class="Cc0">
	<span class="prep" title="Préposition">dans</span>
	<span class="det" title="Déterminant Défini - Singulier Masculin">la</span>
	<span class="nom" title="Nom Commun - Singulier Féminin">cuisine</span>
</span>
 
</div>
en fait mon soucis est de preserver la hierarchie 0,1,2 etc.
jai tenté de faire ces transformation avec jquery mais jai vite eu des limites pour representer cette structure.
je voulais donc savoir si cest faisable en gardant cette structure (jai ajouter l'id depuis) ou meme en enlevant l'id des elements phr.

merci