The mozilla XSLT client side is not visible. (With jQuery too)
I want to use firebug for debugging and help quickly complete some XSLT hosting issues, but I can't seem to get the following code to execute and render the XSLT client-side in Firefox (ok in IE):
$().ready(function() {
var oXMLHTTP
var oXSLT
if ($.browser.mozilla){
oXMLHTTP = document.implementation.createDocument("","",null);
oXSLT = document.implementation.createDocument("","",null);
}else{
oXMLHTTP = new ActiveXObject("Microsoft.XMLDOM");
oXSLT = new ActiveXObject("Microsoft.XMLDOM");
}
oXMLHTTP.async = false;
oXSLT.async = false;
oXSLT.load('Layout.xslt');
var sURL = "somepage"
/**/
$.get(sURL,function(data){
var sTranformedXML = "";
if ($.browser.mozilla){
oXMLHTTP.load(data);
var xsltProcessor = new XSLTProcessor();
xsltProcessor.importStylesheet(oXSLT);
var mDoc = document.implementation.createDocument("","",null);
sTranformedXML = xsltProcessor.transformToFragment(oXMLHTTP,mDoc);
}else{
oXMLHTTP.loadXML(data);
sTranformedXML = oXMLHTTP.transformNode(oXSLT)
}
$("#main").html(sTranformedXML);
$("#tbl_Not Grouped").insertAfter("tbl_Social Sciences");
})// $.get
})
Is there something I am missing here?
I really only need to test the Firefox code. So it doesn't have to be pretty.
+1
jwright
source
to share