Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: XSL-T in IE (JScript)

From: Martin Honnen <mahotrash@-----.-->
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/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent