Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - XSL-T in IE (JScript) >Thread Next - Re: XSL-T in IE (JScript) Re: XSL-T in IE (JScript)To: NULL Date: 6/3/2005 3:19:00 PM
Petar Popara wrote:
> I have this script:
>
> var xmlDOM, xslDOM;
> xmlDOM = testxml.XMLDocument;
> xslDOM = xmlDOM.selectSingleNode("Transformation");
> divResults.innerHTML = xmlDOM.transformNode(xslDOM);
>
> I need to get "Transformation" node content and to create XMLDocument of it
> and to pass it to transformNode(). How can I do that?
As XSLT 1.0 transformations require MSXML 3 or later but IE 5 and 5.5 do
not come with MSXML 3 by default it is usually not a good idea to rely
on XML data islands. A better way is to use external XML documents and
load them as needed with MSXML 3 (or later). That way you can make sure
you have
var xmlDocument = new ActiveXObject('Msxml2.DOMDocument.3.0')
available to perform an XSLT 1.0 transformation. Then you can use the
load method to load the external XML and XSLT document e.g.
xmlDocument.onreadystatechange = function () {
if (xmlDocument.readyState == 4) {
... process XML as needed ...
}
}
xmlDocument.load('file.xml');
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
