JavaScript dans une XSLT

Fermé
Anass - 27 mars 2002 à 10:50
 dje-dje - 3 avril 2002 à 16:50
Bonjour,

J'ai l'XSLT suivante :

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl=" http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:log=" http://www.royalairmaroc.co.ma">
<xsl:output method="html" media-type="text/html; charset=ISO-8859-1"/>

<msxsl:script language="JavaScript" implements-prefix="log">
function Verifprofil(a,b)
{
if (parseInt(b) == parseInt(a))
return "1";
return "0";
}
</msxsl:script>



<xsl:template match="/">
<html>
<head><title>Services</title></head>
<body TEXT="#0000ff" bgcolor="#fffff3">
<xsl:apply-templates select="services"/>
</body>
</html>
</xsl:template>

<xsl:template match="services">
<xsl:apply-templates select="service">
<xsl:sort select="./nom"/>
</xsl:apply-templates>
</xsl:template>

<xsl:template match="service">
<xsl:variable name="userp" select="3"/>
<xsl:variable name="resfunc" select="1"/>
<xsl:if test="log:Verifprofil(@profil,$userp)=$resfunc ">
<br><a href="{@lien}"><xsl:value-of select="./nom"/></a></br>
</xsl:if>
</xsl:template>

</xsl:stylesheet>

et voici le message d'erreur que je reçois quand je veux afficher mon fichier XML selon ma feuille XSLT :

Erreur d'exécution Microsoft JScript Nombre d'arguments ou affectation de propriété incorrects line = 4, col = 8 (line is offset from the start of the script block). Error returned from property or method call.

Si vous arrivez à detecter l'erreur ou bien à trouver une solution en VBScript, faites moi signe.

Merci d'avance.

1 réponse

La ligne 4 correspond a quelles lignes de ton message?
dje-dje
0