XSL parameters using javascipt

I have a html page like:\[code\]<html><head><script>function loadXMLDoc(dname){if (window.XMLHttpRequest) { xhttp=new XMLHttpRequest(); }else { xhttp=new ActiveXObject("Microsoft.XMLHTTP"); }xhttp.open("GET",dname,false);xhttp.send("");return xhttp.responseXML;}function displayResult(){xml=loadXMLDoc("1.xml");xsl=loadXMLDoc("2.xsl");// code for IEif (window.ActiveXObject) { xml.addParameter("rss", test); ex=xml.transformNode(xsl); document.getElementById("example").innerHTML=ex; }// code for Mozilla, Firefox, Opera, etc.else if (document.implementation && document.implementation.createDocument) { xsltProcessor=new XSLTProcessor(); xsltProcessor.importStylesheet(xsl); resultDocument = xsltProcessor.transformToFragment(xml,document); document.getElementById("example").appendChild(resultDocument); }}</script></head><body onload="displayResult()"><div id="example" /></body></html>\[/code\]Now I would like to pass a variable (javascript) to the XSL like for example "course_name" so that in the XSL I can use it like \[code\]<xsl:param name="course_name" /><xsl:value-of select="$course_name" />\[/code\]Any help with the approach to solve this problem is highly appreciated.
 
Back
Top