function doXSLT() { if(xmlDoc==null || xslDoc==null) return; var msg_id = document.getElementById("msg_id"); if(window.ActiveXObject){ msg_id.innerHTML = xmlDoc.trasformNode(xslDoc); } else{ var xsltProc = new XSLTProcessor(); xsltProc.importStylesheet(xslDoc); var fragment = xsltProc.transformToFragment(xmlDoc, document); msg_id.appendChild(fragment); } }