Problem instantiating XMLDOMDocument node within <xsl:script> in IE5

Subject: Problem instantiating XMLDOMDocument node within <xsl:script> in IE5
From: "Amit Rekhi" <amitr@xxxxxxxxxxxxx>
Date: Tue, 13 Apr 1999 21:28:48 +0530
Hello,

ENVIRONMENT
Browser :- MS IE5
DOM Implementation :- Specific to IE5

PROBLEM STATEMENT
I am trying to instantiate an XMLDOMDocument object
through an XSL template using a script call as follows
.
.
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl";>
 <xsl:script language="JScript"> 
  function WriteDocument()
  {
   objXMLDoc = new ActiveXObject("Microsoft.XMLDOM");
  }
 </xsl:script>
 <xsl:template match="/">
  <xsl:eval language="JScript">WriteDocument()</xsl:eval>
 </xsl:template>
</xsl:stylesheet>

But IE5 does not instantiate a XMLDOMDocument
object on execution of the above XSL fragment. 
IE5 gives me the following error message :- 

"Microsoft JScript runtime error 
Automation server can't create object line = 7, col = 3 
(line is offset from the tag). 
Error returned from property or method call."

QUESTIONS
* What change do I need to make to the above
XSL fragment to enable IE5 to 
instantiate an XMLDOMDocument object?

* Is there any change I need to make outside
the above XSL fragment to enable IE5 to 
instantiate an XMLDOMDocument object?

Thanks in advance for any replies,

AMIT




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


Current Thread