What has happened to the XSLT processing in IE11?
On IE8/9/10, you can use:
if (window.ActiveXObject) {
var xslt = new ActiveXObject("Msxml2.XSLTemplate");
....
}
On Chrome/Firefox/Safari, you can use:
else {
var xsltProcessor = new XSLTProcessor();
}
But on IE11, neither of these are supported. Does anyone know how this can be accomplished?
For me running site in a compatibility mode in IE - 11 solved the issue....
Note : This might not be a solution , but I was in a situation where one if my old site was using above mentioned code. But I'm not in a position to Re-code the site
Try
This worked for me working with IE11 and allowed me to instantiate ActiveX objects since the standard old check was being bypassed.
You could consider Saxon CE, an XSLT 2.0 processor implemented entirely in JavaScript. This would give you a consistent API across all browsers and would allow you to code using the more powerful XSLT 2.0 language rather than 1.0.
You Can use ("ActiveXObject" in window) which will allow all the IE browsers to come inside the if condition . Exp :-
The reason
if(window.ActiveXObject)
fails in IE11 is because for some reasonwindow.ActiveXObject
has become falsy, even though it is still a function. I've taken to being more explicit in my feature detection:This approach also covers the case of checking for attributes that are present but not set to a truthy value:
This works for me on Chrome/Edge/Firefox/IE11