|
Subject: [xsl] IE Mimeviewer rendered useless by Microsoft Hotfix From: "Finstad, Franco" <franco.finstad@xxxxxxxxxx> Date: Thu, 21 Oct 2004 10:33:24 -0400 |
Hello all,
I have a seemingly insoluble problem related to client-side processing
of XML/XSLT using MSXML4. Here's my problem:
My J2EE server returns XML to the browser. The XML specifies in it's
prolog to use a particular XSL stylesheet. The XSL stylesheet has
javascript in it that is called when the HTML <BODY> onLoad() event
fires. The javascript manipulates the XML document using basic XSLT,
then writes to <DIV> layers in the HTML.
Here's the javascript code:
// Get the XML string from the Mimeviewer object
var xmlString = window.document.XMLDocument;
// Create an MSXML4 DOMDocument object
var myXmlObject = new ActiveXObject("Msxml2.DOMDocument.4.0");
myXmlObject.async = false;
myXmlObject.load(xmlString);
// Get the MSXML4 object for the XSL data
var xslObject = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.4.0");
xslObject.async = false;
xslObject.resolveExternals = false;
xslObject.load(window.document.XSLDocument);
// Get the root node of the XML doc and apply the XSL to it
var myXmlNode = myXmlObject.documentElement;
var myHtml = myXmlNode.transformNode(xslObject);
The problem is that the IE Mimeviewer object
(window.document.XMLDocument) has been rendered unreliable by a
Microsoft hotfix released in July 2003. Namely, the "readyState"
property is unreliable, it does not accurately reflect the readiness of
the data. See below:
Limitation of XML Mimeviewer Causes Unexpected Behavior When You
Transform XML Data by Using Internet Explorer
http://support.microsoft.com/default.aspx?scid=KB;EN-US;823828
My question is --- How do I load my MSXML4 DOMDocument object without
using the Mimeviewer object?
Is there a way for me to access the XML loaded into the browser without
referring to window.document.XMLDocument?
Any help is greatly appreciated.
-------------------------------
Franco Finstad
Project Manager
Tallan Consulting
Office: 212-213-5199 x3417
Mobile: 917-453-5028
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] Generating HTML <link> na, Michael Kay | Thread | [xsl] Assigning keywords according , Huditsch Roman |
| Re: [xsl] HTML sortable columns, John | Date | [xsl] Assigning keywords according , Huditsch Roman |
| Month |