Bonjour,
J'ai un fichier XML comme ceci :
Avec la première balise Liste, je crée un tableau et je veux insérer dans ce tableau la deuxième balise Liste...
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 <Liste> <IL type="E-FACPV"> <BILELT type="E-FACPV-LBPOP"> N° adhésion : 2.0115164.000 </BILELT> </IL> <IL type="E-FACLV"> <BILELT type="E-FACLV-AU"> 31/03/2007 </BILELT> <BILELT type="E-FACLV-DU"> 01/01/2007 </BILELT> </IL> <Liste> <IL type="E-FACDV"> <BILELT type="E-FACDV-IDLIB"> CADRES : SALAIRE TRANCHE A </BILELT> <BILELT type="E-FACDV-TX"> 7,8400 </BILELT> <BILELT type="E-FACDV-TYPAS"> 2 </BILELT> <BILELT type="E-FACDV-MT"> 630,81 </BILELT> <BILELT type="E-FACDV-SAL"> 8 804 </BILELT> </IL> <IL type="E-FACDV"> <BILELT type="E-FACDV-IDLIB"> AGFF CADRES : SALAIRE TA (HORS CP) </BILELT> <BILELT type=">E-FACDV-TX"> 2,0000 </BILELT> <BILELT type=">E-FACDV-TYPAS"> 3 </BILELT> <BILELT type=">E-FACDV-MT"> 156,00 </BILELT> <BILELT type="E-FACDV-SAL"> 7 800 </BILELT> </IL> <IL type="E-FACDV"> <BILELT type="E-FACDV-IDLIB"> ETAM : SALAIRE TRANCHE A </BILELT> <BILELT type=">E-FACDV-TX"> 12,0100 </BILELT> <BILELT type=">E-FACDV-TYPAS"> 0 </BILELT> <BILELT type=">E-FACDV-MT"> 5.239,59 </BILELT> <BILELT type="E-FACDV-SAL"> 43 627 </BILELT> </IL> <IL type="E-FACDV"> <BILELT type="E-FACDV-IDLIB"> ETAM : SALAIRE TRANCHE B </BILELT> <BILELT type=">E-FACDV-TX"> 25,0700 </BILELT> <BILELT type=">E-FACDV-TYPAS"> 0 </BILELT> <BILELT type=">E-FACDV-MT"> 0,00 </BILELT> <BILELT type="E-FACDV-SAL"> 0 </BILELT> </IL> <IL type="E-FACDV"> <BILELT type="E-FACDV-IDLIB"> AGFF ETAM : SALAIRE TA (HORS CP) </BILELT> <BILELT type=">E-FACDV-TX"> 2,0000 </BILELT> <BILELT type=">E-FACDV-TYPAS"> 3 </BILELT> <BILELT type=">E-FACDV-MT"> 770,80 </BILELT> <BILELT type="E-FACDV-SAL"> 38 540 </BILELT> </IL> <IL type="E-FACDV"> <BILELT type="E-FACDV-IDLIB"> AGFF ETAM : SALAIRE TB (HORS CP) </BILELT> <BILELT type=">E-FACDV-TX"> 2,2000 </BILELT> <BILELT type=">E-FACDV-TYPAS"> 0 </BILELT> <BILELT type=">E-FACDV-MT"> 0,00 </BILELT> <BILELT type="E-FACDV-SAL"> 0 </BILELT> </IL> <IL type="E-FACDV"> <BILELT type="E-FACDV-IDLIB"> ETAM FORFAIT FM - COTIS. JOURN. </BILELT> <BILELT type=">E-FACDV-TX"> 2,7700 </BILELT> <BILELT type=">E-FACDV-TYPAS"> 0 </BILELT> <BILELT type=">E-FACDV-MT"> 1.495,80 </BILELT> <BILELT type="E-FACDV-SAL"> 540 </BILELT> </IL> </Liste> </Liste>
Voici un bout de XSL :
Etant donné que mes DEUX balises s'appellent Liste, j'ai un soucis au niveau des appels de fonction...
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 <xsl:template match="Liste"> <fo:block font-size="8pt" space-after="5mm" padding-top="0.5cm"> <fo:table table-layout="automatic" inline-progression-dimension="100%"> <fo:table-column column-width="7cm"/> <fo:table-column column-width="4cm"/> <fo:table-column column-width="2cm"/> <fo:table-column column-width="0.5cm"/> <fo:table-column column-width="4.5cm"/> <fo:table-header background-color="green" border="0.5pt"> <fo:table-row> <fo:table-cell> <fo:block> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell number-columns-spanned="3"> <fo:block color="white"> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-header> <fo:table-body> <fo:table-row> <fo:table-cell> <fo:block text-align="left"> <xsl:value-of select="IL[@type='E-FACPV']/BILELT[@type='E-FACPV-LBPOP']"/> </fo:block> </fo:table-cell> <fo:table-cell> <fo:block color="blue">Période </fo:block> </fo:table-cell> <fo:table-cell> <fo:block> <xsl:value-of select="IL[@type='E-FACLV']/BILELT[@type='E-FACLV-DU']"/> </fo:block> </fo:table-cell> <fo:table-cell> <fo:block color="blue">au </fo:block> </fo:table-cell> <fo:table-cell> <fo:block> <xsl:value-of select="IL[@type='E-FACLV']/BILELT[@type='E-FACLV-AU']"/> </fo:block> </fo:table-cell> </fo:table-row> <xsl:apply-templates select="Document/Liste/Liste"/> </fo:table-body> </fo:table> </fo:block> </xsl:template> <xsl:template match="Document/Liste/Liste"> <fo:block font-size="8pt" space-after="5mm" padding-top="0.5cm"> <fo:table table-layout="automatic" inline-progression-dimension="100%"> <fo:table-column column-width="7.5cm"/> <fo:table-column column-width="4.5cm"/> <fo:table-column column-width="3cm"/> <fo:table-column column-width="3cm"/> ...
Quelqu'un pourrait m'aider ??
Merci d'avance !
Partager