IE9 applies MSXML6 by default, where IE8 applies MSXML3. The fact that certain functionalities are off by default in MSXML6 causes trouble, in particular when loading pages like
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="test.xsl"?>
<root>...</root>
where the xslt stylesheet referred to applies embedded javascript (for example, custom extension functions).
It is possible to set DOM xslt properties in script code, for instance in Jscript:
var xsltDoc = new ActiveXObject("Msxml2.DOMDocument.6.0");
xsltDoc.setProperty("AllowXsltScript", true);
xsltDoc.loadXML(xsltfile);
But when loading the file supplied above, IE9 loads the xslt file automatically, with default property values. And this results in a striking difference with IE8: IE8 will load the page flawlessly, but IE9 throws an error because of the default MSXML6 DOM objects property "allow xslt scripting = false". This is not true - see my answer below. The remainder of the question is thus insignificant
How can I trigger IE9 to load the file above and still allow running scripts in the xslt?
Note: I already tried the Internet Options/Security/Custom level.../Scripting/Active Scripting = Enable as suggested on msdn, but that setting was already correct.
I am hoping there is a specific IE9 processing instruction available but I guess there isn't. But maybe thre is a special stylesheet attribute that cooperates with IE9 xslt loading.
The concluson may also be that this is only possible by running a script on a main html file, where no automatic loading is done, but XML and XSLT are loaded into specified DOM objects with specified properties (like AllowXsltScript), and the output of the transformation is then loaded into the browser explicitly.