Bonjour à tous,

Je travaille sur un projet sur la création d'un carnet d'adresse à l'aide de xml.
J'ai créé mon fichier "projet.xml", j'aimerai le transformer avec ce fichier "projet.xsl" pour afficher le contenu via le fichier "projet.html".
Mon problème, j'arrive à afficher certains contenus mais tous. Et les contenus affichés ne correspondent pas à ma liste des "étudiants" car il s'agit bien d'un carnet d'adresse affichant la liste des anciens étudiants. Ci-dessous les codes de mes différents fichiers:

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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
 
// DTD:
 
<?xml version="1.0" encoding="UTF-8"?>
 
<!ELEMENT  carnetDadresse (alumni, formations, entreprises, adresses )>
 
<!ELEMENT alumni (alumnus)+>
<!ELEMENT alumnus (nom, prenom, date_naissance, promotion)>
<!ELEMENT nom (#PCDATA)>
<!ELEMENT prenom (#PCDATA)>
<!ELEMENT date_naissance (#PCDATA)>
<!ELEMENT promotion (#PCDATA)>
<!ATTLIST alumnus pk_id_alumnus ID #REQUIRED
		  fk_id_formation IDREF #REQUIRED
		  fk_id_entreprise IDREF #REQUIRED
		  fk_id_adresse IDREF #REQUIRED>
 
<!ELEMENT formations (formation)+>
<!ELEMENT formation (nom_formation, domaine)>
<!ELEMENT nom_formation (#PCDATA)>
<!ELEMENT domaine (#PCDATA)>
<!ATTLIST formation pk_id_formation ID #REQUIRED>
 
<!ELEMENT entreprises (entreprise)+>
<!ELEMENT entreprise (nom_entreprise, fonction, date_entree)>
<!ELEMENT nom_entreprise (#PCDATA)>
<!ELEMENT fonction (#PCDATA)>
<!ELEMENT date_entree (#PCDATA)>
<!ATTLIST entreprise pk_id_entreprise ID #REQUIRED>
 
<!ELEMENT adresses (adresse)+>
<!ELEMENT adresse (numero, rue, code_postal, ville, telephone, email)>
<!ELEMENT numero (#PCDATA)>
<!ELEMENT rue (#PCDATA)>
<!ELEMENT code_postal (#PCDATA)>
<!ELEMENT ville (#PCDATA)>
<!ELEMENT telephone (#PCDATA)>
<!ELEMENT email (#PCDATA)>
<!ATTLIST adresse pk_id_adresse ID #REQUIRED>
 
// XML:
 
<?xml version="1.0" encoding="UTF-8"?>
 
<!-- New XML document created with EditiX XML Editor (http://www.editix.com) at Tue Feb 24 21:09:17 CET 2015 -->
 
 
<?xml-stylesheet type="text/xsl" href="projet.xsl" ?>
 
<!DOCTYPE carnetDadresse SYSTEM "projet.dtd">
 
<carnetDadresse>
	<alumni>
		<alumnus pk_id_alumnus="A1" fk_id_adresse="D1" fk_id_formation="F3" fk_id_entreprise="E2">
			<nom>Dupont</nom>
			<prenom>Julien</prenom>
			<date_naissance>01/02/1990</date_naissance>
			<promotion>2014-2015</promotion>
		</alumnus>
 
		<alumnus pk_id_alumnus="A2" fk_id_adresse="D2" fk_id_formation="F1" fk_id_entreprise="E5">
			<nom>Dubois</nom>
			<prenom>Louise</prenom>
			<date_naissance>04/05/1985</date_naissance>
			<promotion>2013-2014</promotion>
		</alumnus>
 
		<alumnus pk_id_alumnus="A3" fk_id_adresse="D3" fk_id_formation="F2" fk_id_entreprise="E4">
			<nom>Herbert</nom>
			<prenom>John</prenom>
			<date_naissance>07/08/1982</date_naissance>
			<promotion>2012-2013</promotion>
		</alumnus>
 
		<alumnus pk_id_alumnus="A4" fk_id_adresse="D4" fk_id_formation="F1" fk_id_entreprise="E3">
			<nom>Aloui</nom>
			<prenom>Henri</prenom>
			<date_naissance>10/10/1982</date_naissance>
			<promotion>2011-2012</promotion>
		</alumnus>
 
		<alumnus pk_id_alumnus="A5" fk_id_adresse="D5" fk_id_formation="F2" fk_id_entreprise="E1">
			<nom>Koller</nom>
			<prenom>Elisa</prenom>
			<date_naissance>22/10/1988</date_naissance>
			<promotion>2010-2011</promotion>
		</alumnus>
 
	</alumni>
 
	<formations>
		<formation pk_id_formation="F1">			
			<nom_formation>Master IDEMM</nom_formation>
			<domaine>Information, communication, documentation</domaine>
		</formation>
 
		<formation pk_id_formation="F2">			
			<nom_formation>Master GIDE</nom_formation>
			<domaine>Information, communication, documentation</domaine>
		</formation>
 
		<formation pk_id_formation="F3">			
			<nom_formation>Master PRISME</nom_formation>
			<domaine>Information, communication, documentation</domaine>
		</formation>
 
	</formations>
 
	<entreprises>
		<entreprise pk_id_entreprise="E1">
			<nom_entreprise>Microsoft</nom_entreprise>
			<fonction>Chef de projet</fonction>
			<date_entree>01/01/2010</date_entree>
		</entreprise>
 
		<entreprise pk_id_entreprise="E2">
			<nom_entreprise>Orange</nom_entreprise>
			<fonction>Community Manager</fonction>
			<date_entree>01/01/2011</date_entree>
		</entreprise>
 
		<entreprise pk_id_entreprise="E3">
			<nom_entreprise>Google</nom_entreprise>
			<fonction>Expert SEO</fonction>
			<date_entree>01/01/2012</date_entree>
		</entreprise>
 
		<entreprise pk_id_entreprise="E4">
			<nom_entreprise>BMW</nom_entreprise>
			<fonction>Développeur</fonction>
			<date_entree>01/01/2015</date_entree>
		</entreprise>
 
		<entreprise pk_id_entreprise="E5">
			<nom_entreprise>Microsoft</nom_entreprise>
			<fonction>CEO</fonction>
			<date_entree>01/01/2000</date_entree>
		</entreprise>
 
	</entreprises>
 
	<adresses>
		<adresse pk_id_adresse="D1">
			<numero>20</numero>
			<rue>Pont du Petit Paradis</rue>
			<code_postal>59000</code_postal>
			<ville>Lille</ville>
			<telephone>03 20 00 00 00</telephone>
			<email>jdupont@gmail.com</email>
		</adresse>
 
		<adresse pk_id_adresse="D2">
			<numero>3</numero>
			<rue>Rue Saint André</rue>
			<code_postal>59650</code_postal>
			<ville>Villeneuve d'Ascq</ville>
			<telephone>01 20 02 00 00</telephone>
			<email>ldubois@yahoo.fr</email>
		</adresse>
 
		<adresse pk_id_adresse="D3">
			<numero>43</numero>
			<rue>Rue Saint Sebastien</rue>
			<code_postal>75000</code_postal>
			<ville>Paris</ville>
			<telephone>01 20 02 10 15</telephone>
			<email>jherbert@orange.fr</email>
		</adresse>
 
		<adresse pk_id_adresse="D4">
			<numero>93</numero>
			<rue>Rue Royale</rue>
			<code_postal>59000</code_postal>
			<ville>Lille</ville>
			<telephone>03 20 30 30 30</telephone>
			<email>elisakoller@gmail.com</email>
		</adresse>
 
		<adresse pk_id_adresse="D5">
			<numero>33</numero>
			<rue>Avenue du Peuple Belge</rue>
			<code_postal>59000</code_postal>
			<ville>Lille</ville>
			<telephone>0120303030</telephone>
			<email>haloui@yahoo.com</email>
		</adresse>
	</adresses>
</carnetDadresse>
 
// XSL
 
<?xml version="1.0" encoding="UTF-8"?>
 
<!-- New XSLT document created with EditiX XML Editor (http://www.editix.com) at Mon Mar 02 16:16:29 CET 2015 -->
 
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
	<xsl:output method="html"/>
 
	<xsl:template match="/">
	<html>
		<head>
			<meta charset="utf-8"/>
			<title>Carnet d'adresses</title>
		</head>
 
		<body style="background-color:#d0caca; width:100%; margin:auto">
			<h1>Carnet d'adresses des anciens étudiants</h1>
 
			<h2 style="background-color:#406e90; color:#fff; width:500px">Liste des étudiants dans le carnet d'adresses:</h2>
 
            <table border="1" cellpadding="10">
            	<thead style="color:#1510a2" >
            		<tr>
                		<th>PROMOTION</th>
                    	<th>NOM</th>
                    	<th>PRENOM</th>
                    	<th>NAISSANCE</th>
                    	<th>FORMATION</th>
                    	<th>EMAIL</th>
                    	<th>TELEPHONE</th>
                    	<th>ENTREPRISE</th>
                	</tr>
            	</thead>
            	<xsl:for-each select="carnetDadresse/alumni/alumnus">
            		<tr>
            			<td>
            				<xsl:value-of select="promotion"/>
            			</td>
 
            			<td>
            				<xsl:value-of select="nom"/>
            			</td>
 
            			<td>
            				<xsl:value-of select="prenom"/>
            			</td>
 
            			<td>
            				<xsl:value-of select="date_naissance"/>
            			</td>
 
         			<td>
         			     <xsl:for-each select="carnetDadresse/alumni/alumnus">
         			          <xsl:variable name="alumnus" select="@pk_id_alumnus"/>
                          		  <xsl:for-each select="/carnetDadresse/formations/formation[@fk_id_formation = $alumnus]">
            					<strong>Nom de la formation:</strong><xsl:value-of select="nom_formation"/><br/>
            					<strong>Domaine:</strong><xsl:value-of select="domaine"/>
            				  </xsl:for-each>
            			     </xsl:for-each>
            			</td>
 
            			<td>
            				<xsl:value-of select="/carnetDadresse/adresses/adresse/email"/>
            			</td>
 
            			<td>
            				<xsl:value-of select="/carnetDadresse/adresses/adresse/telephone"/>
            			</td>
 
            			<td>
            				<strong>Nom de l'entreprise:</strong><xsl:value-of select="/carnetDadresse/entreprises/entreprise/nom_entreprise"/><br/>
            				<strong>Fonction:</strong><xsl:value-of select="/carnetDadresse/entreprises/entreprise/fonction"/><br/>
            				<strong>Date d'entrée:</strong><xsl:value-of select="/carnetDadresse/entreprises/entreprise/date_entree"/>
            			</td>
            		</tr>
            	</xsl:for-each>
            </table>
 
		</body>
	</html>
	</xsl:template>
 
</xsl:stylesheet>
Quelqu'un pourrait-il m'aider?

Merci par avance!