I am using IE 11 and trying to fix an application which was working before. It still works in Chrome.
The XML is being returned from a stored procedure, but the xslt is not being able to process it. Here is the code in .js file:
function ReviewComplete(data) { xml = data.responseXML; xsl = asyncLoadXSLT('../Styles/XSLT/MyXslt.xslt'); transformXSLT(xml, xsl, "CmmContainer"); $("#txtComment").val(''); } //Transform results function transformXSLT(xml, xslt, containerID) { $('#' + containerID).html(" "); // code for IE for client side xsl transformation if (window.ActiveXObject || xhttp.responseType == "msxml-document") { ex = xml.transformNode(xsl); $('#' + containerID).html(ex); }
The code errors out at
ex = xml.transformNode(xsl);
the error says:
JavaScript runtime error: Object doesn't support property or method 'transformNode'.
I am not sure where the issue is. I tried making the xslt compatible with previous version of IE by introducing-
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" /> in the xslt file, which didn't help. I have done it as:<xsl:template match="DATA"><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" /><xsl:for-each select="Comment">
....
Not sure how to include it though.
Please guide what necessary steps should I take to resolve this issue.