Xml/Xslt - How to use xslt ActeveX objects effectively?

Asked By Charlie Hower on 24-Mar-06 01:14 AM
How to make high effective use of xslt ActeveX objects
I've trie the code below to work on my page.They just works good but not effective enough.Everytime the activex object is created,the js retrieve xsl file and files inclued in it from server and that terribly do harm to the efficiency of the system,for my server is embeded in some kind of equipment.So ,is there is a way that I can create the xslt object using files obtained from the IE cache just like othe cgi requests do?
.................................................. ..............
function createXSLDOM() {
var arrSignatures = ["Msxml2.FreeThreadedDOMDocument.6.0","Msxml2.FreeT hreadedDOMDocument.5.0", "Msxml2.FreeThreadedDOMDocument.4.0",
"Msxml2.FreeThreadedDOMDocument.3.0", "Msxml2.FreeThreadedDOMDocument.2.0",
"Msxml2.FreeThreadedDOMDocument"];
for (var i=0; i < arrSignatures.length; i++) {
try {
var oXslDom = new ActiveXObject(arrSignatures[i]);
return oXslDom;
} catch (oError) {
//ignore
}
}
throw new Error("MSXML is not installed on your system.");
}
function loadAreaPage(areaObject,xmlName,xslName,callback){
var xslDoc = createXSLDOM();
var xmlDoc = createXMLDOM();
try{
xmlDoc.async=true
xslDoc.validateOnParse=false
xmlDoc.load(xmlName)
xmlDoc.onreadystatechange=function(){
if(xmlDoc.readyState==4){
xslDoc.load(xslName)
}
}
xslDoc.onreadystatechange=function(){
if(xslDoc.readyState==4){
if(!xslDoc || !xmlDoc || xslDoc.text.length==0){
xmlDoc=null
xslDoc=null
return
}
areaObject.innerHTML=xmlDoc.transformNode(xslDoc)
xmlDoc=null
xslDoc=null
try{
callback()
}catch(exc){}
}
}
}catch(exc){}}
.................................................. ..............

Tks,everybody and wait......

xslt ActeveX objects - Asked By John Conway on 02-Apr-06 12:22 AM

http://www.sitepoint.com/article/xml-data-traversal