Bonjour
voici mon code
Donc voila mon probleme est de recuperer une variable javascript ou alors deuxieme solution que getI() me renvoie true si i=0 domnc comment faire pour appeler une fonction javascript
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 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="/"> <html> <head> <script> var i = 0; function incremente() { if(i==0) i++; else i=0; } function getI() {return i;} </script> </head> <body style="font-family:Arial; font-size:12pt;"> <table border="1"> <xsl:for-each select="table/row"> <script> incremente(); </script> <xsl:if test="getI()=0"> // ICI JE VEUX TESTER LA VALEUR DE I COMMENT FAIRE MERCI <tr><td><xsl:value-of select="$var"/></td></tr> </xsl:if> </xsl:for-each> </table> </body> </html> </xsl:template> </xsl:stylesheet>
Merci
Partager