[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Parameters to XSL from Javascript
Hi, I have been working on getting my XSL to be generated through javascript and I got it to work for firefox and IE. But the problem is I was able to pass a parameter for the firefox section but not the IE. I looked up how to do it for IE but it doesn't seem to work. Please let me know if you see any problems with it. Heres my code.... function loadXMLDoc(fname) { var xmlDoc; // code for IE if (window.ActiveXObject) { xmlDoc=new ActiveXObject("Microsoft.XMLDOM"); } // code for Mozilla, Firefox, Opera, etc. else if (document.implementation && document.implementation.createDocument) { xmlDoc=document.implementation.createDocument("","",null); } else { alert('Your browser cannot handle this script'); } xmlDoc.async=false; xmlDoc.load(fname); return(xmlDoc); } function displayResult() { xml=loadXMLDoc("test.xml"); xsl=loadXMLDoc("test.xsl"); // code for IE if (window.ActiveXObject) { var xsltCompiled = new ActiveXObject("Microsoft.XMLDOM"); xsltCompiled.stylesheet = xsl.documentElement; var xsltProc = xsltCompiled.createProcessor(); xsltProc.input = xml; xsltProc.addParameter('item',itm); xsltProc.transform(); }
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|