Bonjour j'ai un fichier XSL qui m'affiche sur une page le nom d'un artiste. ça, ça marche c'est pas le problème.

Je voudrait récupérer la valeur "artist" en javascript en vue de la faire défiler par exemple (via un code javascript que j'ai déjà), la difficulté est que je ne sais pas comment récuperer cette valeur en javascript. Une idée ?

Voila le code XSL

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
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0" > 
<xsl:output omit-xml-declaration="no" method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes" encoding="utf8" /> 
<xsl:template match = "/icestats" > 
<html> 
<head> 
<title>Icecast Streaming Media Server</title> 
</head> 
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0"> 
 
<script language='javascript'> 
chart1.setDataURL(escape("xmlfile.xml?currTime=" + getTimeForURL()));/** * getTimeForURL method returns the current time * in a URL friendly format, so that it can be appended to * dataURL for effective non-caching. */ function getTimeForURL(){ var dt = new Date(); var strOutput = ""; strOutput = dt.getHours() + "_" + dt.getMinutes() + "_" + dt.getSeconds() + "_" + dt.getMilliseconds(); return strOutput; } 
</script> 
 
<xsl:for-each select="source"> 
<xsl:choose> 
<xsl:when test="listeners"> 
<div> 
<div> 
</div> 
<div> 
 
<xsl:choose> 
 
</xsl:choose> 
 
<xsl:if test="authenticator"> <a href="/auth.xsl"></a> </xsl:if> 
 
- A l'antenne: 
<xsl:if test="artist"><xsl:value-of select="artist" /> - </xsl:if><xsl:value-of select="title" /> 
 
</div> 
<div> 
</div> 
</div> 
<br /> 
<br /> 
</xsl:when> 
<xsl:otherwise> 
<h3><xsl:value-of select="@mount" /> - Not Connected</h3> 
</xsl:otherwise> 
</xsl:choose> 
 
</xsl:for-each> 
<xsl:text disable-output-escaping="yes">&amp;</xsl:text>nbsp; 
 
 
 
</body> 
</html> 
</xsl:template>