[XSLT] xsl:script -> ca ne marche pas!
Bonjour à tous, je me bas pour inclure du javascript dans un innerHTML.
Je voulais tenter le coup avec xsl:script mais ca ne marche pas.
Voici mon code tout simple:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| <?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output
method="html" indent="yes"
encoding="ISO-8859-1"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" />
<xsl:template match="/">
<xsl:value-of select="fct:fonc()"/>
</xsl:template>
<xsl:script implements-prefix="fct" language="JScript">
function fonc() {
alert('toto');
}
</xsl:script>
</xsl:stylesheet> |
Il doit y avoir une erreur de syntaxe je pense.
Wells