Je cherche à calculer le nombre de profils en fonction du type de hits.
J'ai eht, etr, ght et là j'essaye pour eht. Je veux calculer combien de balises <profil> dans chaque balise <hits> selon un groupement par type de <hits>

Voici un extrait de la source
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
 
	<hits
		type="eht"
	>
		<profil
			exception="oui"
		>
			<description
				ra_papier="oui"
				ra_electronique="oui"
				collermonter="non"
				analyse="non"
				pasdedoublons="non"
				classement="CMN*3"
				confiance="2"
				nature="electronique"
				id_theme="208442"
				type_paiement="AFM"
				grand_compte="oui"
				facture_groupee="oui"
				id_facturation="35164"
				prioritehoraire="7"
				date_profil="2007/09/26-20:04:19"
				pressbook="non"
				envoi_fax="non"
				envoi_cc="oui"
			>
				        MUSÉE DU LOUVRE : uniquement politique institutionnelle, articles de fond
 
			</description>
			<requete>((MUS[EÈÉÊË][EÈÉÊË] LOUVRE ADJ 2) </requete>
			<id_profil>102011</id_profil>
				<mots>
					<mot word="LOUVRE" x="2528" y="2533"/>
					<mot word="direction" x="2476" y="2484"/>
				</mots>
			<profiler>elt</profiler>
		</profil>
	</hits>
	<hits
		type="etr"
	>
	</hits>
	<hits
		type="ght"
	>
		<profil
			exception="non"
		>
			<description
				ra_papier="oui"
				ra_electronique="oui"
				collermonter="non"
				analyse="non"
				pasdedoublons="non"
				classement="BORDEAUX10"
				confiance="2"
				nature="electronique"
				id_theme="45622"
				type_paiement="AV"
				grand_compte="non"
				facture_groupee="non"
				id_facturation="26299"
				prioritehoraire="0"
				date_profil="2007/09/26-20:07:38"
				pressbook="non"
				envoi_fax="non"
				envoi_cc="non"
			>
				        GRAND THEATRE DE BORDEAUX (33) : toutes citations 
 
 
			</description>
			<requete>((GRAND TH[EÈÉËÊ][AÄÀÂ]TRE ADJ 1) (05 56 00 85 95 ADJ 4) WITHIN 100) OR ((GRAND TH[EÈÉËÊ][AÄÀÂ]TRE ADJ 1) (PLACE COM[EÈÉËÊ]DIE ADJ 1) WITHIN 100) OR ((GRAND TH[EÈÉËÊ][AÄÀÂ]TRE ADJ 1) BORDEAUX WITHIN 100) OR (GRANDTH[EÈÉËÊ][AÄÀÂ]TRE  BORDEAUX WITHIN 100) OR (GRANDTH[EÈÉËÊ][AÄÀÂ]TREDEBORDEAUX)</requete>
			<id_profil>135226</id_profil>
				<mots>
					<mot word="Grand" x="909" y="913"/>
				</mots>
			<profiler>mdk</profiler>
		</profil>
		<profil
			exception="non"
		>
			<description
				ra_papier="oui"
				ra_electronique="oui"
				collermonter="non"
				analyse="non"
				pasdedoublons="non"
				classement="BORDEAUX10"
				confiance="2"
				nature="electronique"
				id_theme="45622"
				type_paiement="AV"
				grand_compte="non"
				facture_groupee="non"
				id_facturation="26299"
				prioritehoraire="0"
				date_profil="2007/09/26-20:07:38"
				pressbook="non"
				envoi_fax="non"
				envoi_cc="non"
			>
				        ONBA ou Orchestre National Bordeaux Aquitaine (33) : appellation citée, toutes citations
 
			</description>
			<requete>(ONBA) OR (ORCH[EÈÉËÊ]STRE NATIONAL BORDEAUX AQUITAINE ADJ 3)</requete>
			<id_profil>135227</id_profil>
				<mots>
					<mot word="ONBA" x="904" y="907"/>
					<mot word="ONBA" x="1043" y="1046"/>
					<mot word="ONBA" x="1274" y="1277"/>
				</mots>
			<profiler>mdk</profiler>
		</profil>
		<profil
			exception="non"
		>
			<description
				ra_papier="non"
				ra_electronique="non"
				collermonter="non"
				analyse="non"
				pasdedoublons="non"
				classement="CADENCES@"
				confiance="3"
				nature="papier"
				id_theme="29657"
				type_paiement="AFS"
				grand_compte="non"
				facture_groupee="non"
				id_facturation="29220"
				prioritehoraire="0"
				date_profil="2007/09/26-20:06:38"
				pressbook="non"
				envoi_fax="non"
				envoi_cc="non"
			>
				        CADENCES : magazine sur l&apos;actualité de la musique classique, toutes citations
 
			</description>
			<requete>("CADENCES" OR "Cadences") OR ((CADENCES NOT (CADENCES INFERNALES ADJ 1)) (JOURNAL OR JOURNAUX OR MAGAZINE* OR PRESSE OR REVUE* OR QUOTIDIEN OR HEBDOMADAIRE* OR MENSUEL OR BIMESTRIEL OR TRIMESTRIEL OR PUBLICATION*) WITHIN 8) OR (CADENCES (ACTUALIT[EÈÉËÊ] CONCERTS OP[EÈÉËÊ]RA ADJ 4) WITHIN 12) OR (CADENCES (MAGAZINE* OR PUBLICATION*) (ACTUALIT[EÈÉËÊ] MUSIQUE CLASSIQUE ADJ 3) WITHIN 15) OR (CADENCES MAGAZINE ADJ 1) OR (CADENCES PUBLICAT* WITHIN 12)</requete>
			<id_profil>40830</id_profil>
				<mots>
					<mot word="CADENCES" x="420" y="427"/>
				</mots>
			<profiler>CRE</profiler>
		</profil>
		<profil
			exception="non"
		>
			<description
				ra_papier="oui"
				ra_electronique="oui"
				collermonter="non"
				analyse="non"
				pasdedoublons="non"
				classement="ORCHESTRA"
				confiance="2"
				nature="electronique"
				id_theme="43597"
				type_paiement="AV"
				grand_compte="non"
				facture_groupee="non"
				id_facturation="34797"
				prioritehoraire="0"
				date_profil="2007/09/26-19:45:03"
				pressbook="non"
				envoi_fax="non"
				envoi_cc="non"
			>
				        ORCHESTRA : vêtements pour enfants, toutes citations 
 
 
			</description>
			<requete>(("ORCHESTRA" OR "Orchestra") </requete>
			<id_profil>122920</id_profil>
				<mots>
					<mot word="Orchestra" x="1599" y="1607"/>
					<mot word="Chapeau" x="1696" y="1702"/>
				</mots>
			<profiler>BHO</profiler>
		</profil>
		<profil
			exception="non"
		>
			<description
				ra_papier="non"
				ra_electronique="non"
				collermonter="non"
				analyse="non"
				pasdedoublons="non"
				classement="PESSAC"
				confiance="3"
				nature="papier"
				id_theme="1878"
				type_paiement="AV"
				grand_compte="non"
				facture_groupee="non"
				id_facturation="26985"
				prioritehoraire="0"
				date_profil="2007/09/26-19:44:13"
				pressbook="non"
				envoi_fax="non"
				envoi_cc="non"
			>
				        Toutes citations :
- VILLE DE PESSAC, en Gironde (33)
- FESTIVAL INTERNATIONAL DU FILM D&apos;HISTOIRE de Pessac
 
			</description>
			<requete>(PESSAC) OR (FESTIVAL INTERNATIONAL DU FILM HISTOIRE ADJ 5) OR (PESSAC (FESTIVAL OR FESTIVALS OR (FILM HISTOIRE ADJ 2)) WITHIN 25) OR (PESSACAIS OR PESSACAISE OR PESSACAISES)</requete>
			<id_profil>60310</id_profil>
				<mots>
					<mot word="Pessac" x="548" y="553"/>
				</mots>
			<profiler>GHS</profiler>
		</profil>
	</hits>
 
 
Voici mon fichier 
 
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" encoding="ISO-8859-15"/>
<xsl:template match="/">
 
<xsl:value-of select="count(//id_profil[normalize-space(../../hits/@type)='eht'])"/>
</xsl:template>
</xsl:stylesheet>

Et je trouve 0. J'imagine qu'on peut faire cela en cherchant les balises profil dans hits mais je ne vois pas comment faire.

Pour moi on compte les balises id_profil et je regarde la valeur du type de hits.
C'est conceptuellement correct.

Une idée ?