Bonjour à tous,
J'espère que quelqu'un pourra m'aider sur ce problème. J'ai écrit un code code XSL pour un fichier XML, mais j'ai un problème le mise en forme s'affiche mais sans les donnée... C'est un problème !!! et ca fait 2 jours que je tourne en rond...
le voici mon code
Et voici le fichier XML qui va avec
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 <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html> <head> <title>Lettre d'information 001 du CIAA (Centre Informatique Assistance et Applications)</title> <style> body {margin:0;background-color: #0E747B;;text-align:center; } ul {list-style-type:square;} .page {background-color:white; width:800px;} .title {font-family: arial; text-align: center; color: #A1C3C9; font-weight: bold;font-size: 16px;} .demande {color: #2B525D;font-size: 12px;font-family: Arial; font-style: normal; font-weight: bold;} .domaine {color: #2B525D;font-size: 12px;font-family: Arial; font-style: normal; font-weight: bold;} .grdAltItem { background-color: #F7F7F7; color: #2B525D;font-size: 12px;font-family: Arial; font-style: normal; font-weight: normal;} .grdItem { background-color: #BED5D9;color: #2B525D;font-size: 12px;font-family: Arial; font-style: normal; font-weight: normal;} .pageHeader {background-color: #2b525d;color: #F7F7F7;font-size: 16px;font-family: Arial;font-style: normal;font-weight: bold;text-align: center;} .grdHeader {background-color: #2b525d;color: #F7F7F7;font-size: 12px;font-family: Arial;font-style: normal;font-weight: bold;text-align: center;} .default_text { font-family: Arial; font-size: 12px; font-style: normal; text-align: left;} .txtLabel { font-family: Arial; font-size: 12px;font-style: italic; font-weight: normal;color: #2B525D;text-align: left;} .tableau {border: 1px solid #A5ACB2;width: 100%; cellspacing:1;} </style> </head> <body> <!-- This is an XSLT template file. Fill in this area with the XSL elements which will transform your XML to XHTML. --> <table class="page"> <tr> <td> <h1 class="pageHeader">Lettre d'information </h1> <table class="tableau"> <tr class="grdHeader"> <td>ID du Produit</td> <td>Satut</td> <td>Libellé du Produit</td> <td>Pays</td> <td>Date validation</td> <td>Date Ordre</td> <td>Numéro Pays</td> </tr> <xsl:for-each select="ListeNegocs/ListeNegoc"> <tr class="grdItem"> <td align="center"> <xsl:value-of select="ID_PROD_US"></xsl:value-of> <xsl:text></xsl:text> </td> <td align="center"> <xsl:value-of select="FG_STATUT"></xsl:value-of> <xsl:text></xsl:text> </td> <td align="center"> <xsl:value-of select="LB_PROD_US"></xsl:value-of> <xsl:text></xsl:text> </td> <td align="center"> <xsl:value-of select="LB_PAYS"></xsl:value-of> <xsl:text></xsl:text> </td> <td align="center"> <xsl:value-of select="DT_VALID"></xsl:value-of> <xsl:text></xsl:text> </td> <td align="center"> <xsl:value-of select="DT_ORDRE"></xsl:value-of> <xsl:text></xsl:text> </td> <td align="center"> <xsl:value-of select="ID_PAYS"></xsl:value-of> <xsl:text></xsl:text> </td> </tr> </xsl:for-each> </table> </td> </tr> </table> </body> </html> </xsl:template> </xsl:stylesheet>
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 <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet href="XSLTFile1.xsl" type="text/xsl"?> <ListeNegocs xmlns="http://tempuri.org/ListeNegoc.xsd"> <ListeNegoc> <ID_PROD_US>3015</ID_PROD_US> <FG_STATUT>O</FG_STATUT> <LB_PROD_US>Embryon et ovule</LB_PROD_US> <LB_PAYS>MARTINIQUE</LB_PAYS> <DT_VALID>2011-05-19T00:00:00+02:00</DT_VALID> <DT_ORDRE>2011-05-19T11:53:02.673+02:00</DT_ORDRE> <ID_PAYS>328</ID_PAYS> </ListeNegoc> </ListeNegocs>
Merci par avance
Partager