function transformXML(xmlURL, xslURL, divID, fruitList) { // declare the local variables var xmlDoc, xslDoc, docProcessor, docCache, DocRequest, docFragment; // try the following for IE Browsers try { // instantiate and load the xml document xmlDoc = new ActiveXObject("MSXML2.DOMDocument"); xmlDoc.async = false; xmlDoc.load(xmlDocURL); // instantiate and load the xsl document xslDoc = new ActiveXObject("MSXML2.FreeThreadedDOMDocument"); xslDoc.async = false; xslDoc.load(xslDocURL); // prepare the xsl document for transformation docCache = new ActiveXObject("MSXML2.XSLTemplate"); docCache.stylesheet = xslDoc; // instantiate the document processor and submit the xml document docProcessor = docCache.createProcessor(); docProcessor.input = xmlDoc; // add parameters to the xsl document for(i=0;i