[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Problem using transformNode in html transformed from

Subject: Problem using transformNode in html transformed from XML
From: "Steve Renshaw" <renshaw_steve@xxxxxxxxxxx>
Date: Wed, 20 Mar 2002 20:32:05 +0000
html transformnode
I have doc.xm and doc.xsl that generates html output.
Within the generated html output, there a javascript
function "Change()" that executes when a certain form
element has an onChange event.

Within Change() I attempt to load Bug.xml and Bug.xsl,
do the transform using transformNode and stuff the
result into <div id="here">: The generated code within
the html output looks like this:

<html>
<head>
 <script type="text/javascript">
   <![CDATA[
    function Change() {
     var objPathXml="Bug.xml";
     objXml= new ActiveXObject("MSXML2.FreeThreadedDOMDocument");
     objXml.async =false;
     objXml.validateOnParse = false;
     objXml.load(objPathXml);

     var objPathXsl="Bug.xsl";
     objXsl= new ActiveXObject('Microsoft.XMLDom');
     objXsl.async =false;
     objXsl.validateOnParse = false;
     objXsl.load(objPathXsl);

document.all['here'].innerHTML = objXml.transformNode(objXsl.documentElement);

     return;
    }
   ]]>
 </script>
</head>
<body>
 <div id="here"></div>
</body>
</html>

My problem is that I consistently get the error message:

"Invalid procedure call or argument"

on the line that contains "document.all['here'].innerHTML".
I realize there is a lot going on in this example, but if
I change the last line to:

document.all['here'].innerHTML ="<b>Hello World</b>";

then "Hello World" shows up in bold at <div id="here">
when the form element is changed. The only thing that
does not appear to be working is the transformNode.

Any ideas what is going wrong?

I am using IE6 and doing client side XSLT.



_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.