I'm struggling to fetch JS var into xsl variable for e.g

Code:
<?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:user="http://mycompany.com/mynamespace">

<msxsl:script language="JavaScript" implements-prefix="js">
      function getResult () {
         var thisResult;
         thisResult = "300";
         return thisResult;
      }
</msxsl:script>

<xsl:template match="/">

<xsl:variable name="JSattribute"><xsl:value-of select="js:getResult()"/></xsl:variable>

<xsl:variable name="XSLattribute">300</xsl:variable>

 <xsl:choose> 
      <xsl:when test="string(number($JSattribute),string(number($XSLattribute))">
testAttribute is a match number
      </xsl:when>  
 </xsl:choose> 

</xsl:template>

</xsl:stylesheet>
------------

Hope anyone can help? I've tired to test many different ways to fix this error code and unable to show "testAttribute is a match number" web page all day today.

Thank you very much and look forward to read any of you crack this code?

Cheers
Oliver