How to pass xsl variable as a parameter to javascript function within script tag?
javascript, xslt
Solution
The curly braces are for 'Attribute Value Templates', but in this case you are not creating an attribute here, just a normal text node. I think you need to do something like this
<xsl:variable name="xx" select="'40967.6424503935'"/>
<script type="text/javascript">
time(<xsl:value-of select="$xx" />);
</script>
Problem
I have tried the following code : ``` <xsl:variable name="xx" select="'40967.6424503935'"/> <script type="text/javascript"> time({$xx}); </script> ``` My intention is to display text via document.write() present in time(). But it didnt give any result.