I'm loading an xslt stylesheet in javascript like this. I'm only required to support Chrome.
function loadXMLDoc(filename){
xhttp = new XMLHttpRequest();
xhttp.open("GET", filename, false);
xhttp.send("");
return xhttp.responseXML;
}
xsl = loadXMLDoc("../Stylesheets/main.xsl");
xsltProcessor = new XSLTProcessor();
xsltProcessor.importStylesheet(xsl);
main.xsl is the main stylesheet and contains a lot of xsl:include references to other xsl stylesheets. I need to send an argument somewhere that tells javascript to resolve the include references.
I'm not using IE, but it has an ActiveXObject method like:
doc.setProperty('ResolveExternals', true);
Is there some command I can put in my code to 'Resolve Externals' to pull in the stylesheets referenced in main.xsl?
Turns out xhttp needed to be a global variable. I'm not sure why, but it worked.