Bonjour,

Je vous présente mon problème :

j'ai une page php contenant un parser,

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
function parseur($fxml, $fxsl){
				$xh = xslt_create();
				$file=fopen($fxml,"r");
				$xml=fread($file,2048000);
				fclose($file);
				$file=fopen($fxsl,"r");
				$xsl=fread($file,2048000);
				fclose($file);
				$arguments = array(
					'/_xml' => $xml,
					'/_xsl' => $xsl
				);
				$parameters = array(
					'nom' => $nom
				);
				$result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, $arguments, $parameters);
				xslt_free($xh);
				echo $result;
			}
que j'apelle comme suis ds ma page php :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
 
	parseur("./xml/vito.xml", "./xsl/vito.xsl");
elle me renvoie un beau tableau jusque là rien de bien sorcier.

maintenant je voudrais trier mon tableau avec du JS.
je m'explique, trier avec 2 flèches dans mes en-têtes de tableau (croissant, décroissant)
je sais le faire avec une page html simple mais la c'est le XSL qui met en page mes données en tableau donc... une idée de piste ?



voilà la feuille XSL qui me genere mon bô tableau

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
<?xml version="1.0" encoding="ISO-8859-1"?>
 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output encoding="ISO-8859-1" method="html"/>
 
	<xsl:template match="Synthese">	
 
			<style>
			<![CDATA[
 
			H1 {color:black; font-family:Arial; font-size:14px ; text-align:center}
			h2 {color:black; font-family:Arial; font-size:10px ;}
			.ListeTitreSection 		{color:black ; font-size : 8px; font-weight:normal}
			.ListeTitreSection7 		{color:black ; font-size : 12px; font-weight:bold}
			.ListeTitreSection2 		{color:black ; font-size : 8px; font-weight:bold   ; text-align:left}
			.ListeTitreCellule 		{color:black ; font-size : 8px; font-weight:bold   ; text-align:center}
			.ListeTitreCelluleCenter 	{color:black ; font-size : 8px; font-weight:bold   ; text-align:center}
			.ListeCellule      		{color:black ; font-size : 8px; font-weight:normal ; text-align:center}
			.ListeTexteLibre   		{color:black ; font-size : 4px; font-weight:normal ; text-align:center}
			.ListeTexteGras    		{color:black ; font-size : 8px; font-weight:bold   ; text-align:center}
			.ListeTexteGras2    	{color:black ; font-size : 8px; font-weight:bold   ; text-align:center}
 
			A:hover {
			   font-size : 8px;
			   font-weight : normal;
			   font-family : Arial;
			   color : blue;
			   background : transparent;
			}
 
			A:visited, A:link, A:active {
			   font-size : 8px;
			   font-weight : normal;
			   font-family : Arial;
			   color : blue;
			}
 
			p {
				font-size : 8px;
				font-family : Arial;
			}
 
			a {
				font-size : 8px;
				font-family : Arial;
			}
 
			BODY {
			   font-size : 8px;
			   font-family : Arial;
			   color : #000000;
			   background-color:#eeeeee;
 
			.test1
			{
				border-collapse:	collapse;
			}
 
 
			}
			]]>
			</style>
				<table align='center' style='text-align: center;'>
			<tr>
			<th>
			<font color='#8C151A' style='font-size:18px'>
				<b>
					Demandes d'évolutions ouvertes <br/>
				</b>
			</font>
			</th>
			</tr>
			<tr>
				<br/>
			</tr>
 
		</table>
		<table id="trier" style="width: 100%; border: solid 1px; text-align:center" align="center" class="ListeTitreSection"><br/><br/>
		<tr style="background-color:#7B1016" >
			<td style="width: 7%" class="ListeTitreSection7">	<font color="#FFFFFF"><b>Dossier </b></font></td>
			<td style="width: 7%" class="ListeTitreSection7"><font color="#FFFFFF"><b>Creation</b></font></td>
			<td style="width: 30%" class="ListeTitreSection7"><font color="#FFFFFF"><b>Thème</b></font></td>
			<td style="width: 5%" class="ListeTitreSection7"><font color="#FFFFFF"><b>Code Priorite</b></font></td>
			<td style="width: 35%" class="ListeTitreSection7"><font color="#FFFFFF"><b>Libelle Court</b></font></td>
			<td style="width: 30%" class="ListeTitreSection7"><font color="#FFFFFF"><b>Etat d'avancement</b></font></td>
			<td style="width: 6%" class="ListeTitreSection7"><font color="#FFFFFF"><b>Version Corrective</b></font></td>
			<td style="width: 11%" class="ListeTitreSection7"><font color="#FFFFFF"><b>Date de Livraison</b></font></td>
 
			<xsl:for-each select="Record">
				<xsl:variable name="annee" select="substring(Date_de_Livraison, 1, 4)" />
		<xsl:variable name="mois" select="substring(Date_de_Livraison, 5, 2)" />
		<xsl:variable name="jour" select="substring(Date_de_Livraison, 7, 2)" />
		<xsl:variable name="date_de_livraison" select="concat($jour, '/',$mois, '/',$annee)" />
				<xsl:variable name="anneecrea" select="substring(Création, 1, 4)" />
		<xsl:variable name="moiscrea" select="substring(Création, 6, 2)" />
		<xsl:variable name="jourcrea" select="substring(Création, 9, 2)" />
		<xsl:variable name="date_de_creation" select="concat($jourcrea, '/',$moiscrea, '/',$anneecrea)" />
 
					<tr class="ListeTexteLibre">
					<td><xsl:value-of select="Dossier"/></td>
					<td><xsl:value-of select="$date_de_creation"/></td>
						<td><xsl:value-of select="Thème"/></td>
					<td><xsl:value-of select="substring-after(Code_priorite, ' ')"/></td>
					<td><xsl:value-of select="Libellé_court"/></td>
					<td><xsl:value-of select="Etat_d-avancement"/></td>
					<td><xsl:value-of select="Version_corrective"/></td>
					<xsl:choose>
							<xsl:when test="Date_de_Livraison != ''">
								<td><xsl:value-of select="$date_de_livraison"/></td>
							</xsl:when>
							<xsl:otherwise>
								<td>-</td>
							</xsl:otherwise>
						</xsl:choose>
					</tr>
 
		</xsl:for-each>
		</tr>
		</table><br/>
		</xsl:template>
</xsl:stylesheet>