This has been asked before, but I want to evaluate if this is possible?...
Is there a simple way to pass javascript variable into an xsl variable? Reason being, the variable will be coming from an external script.
Here's my non-working code...
<?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">
<xsl:template match="/">
<div>
<script type="text/javascript">
var key = window.location.href;
</script>
<xsl:variable name="jsvar">$key</xsl:variable>
<xsl:value-of select="$jsvar"/>
</div>
</xsl:template>
I want to display "Term1" on the web page.
Any idea?