Opened 15 years ago

Closed 15 years ago

#2392 closed defect (wontfix)

Using XMLDOM CLSID in CreateDocument causes errors with XSLT parameters

Reported by: igornaumov at hotmail dot com Owned by: alex
Priority: high Milestone: 1.0
Component: HTML Version: 0.4.1
Keywords: Cc:
Blocked By: Blocking:


For some reason CreateDocument? in dojo.dom is using "MSXML2.XMLDOM" ActiveX instead of "MSXML2.DOMDocument". If an element from a document created that way is used as a parameter in an XSLT transformation, in IE6 it results in a TypeMismatch? error. Here is a sample code:


function testDom() {
   var xmlSource = dojo.dom.createDocumentFromText(
	"<?xml version='1.0' encoding='utf-8'?>" + 
	"<root>It works!</root>" );
   var xslProc = new dojo.xml.XslTransform("test.xsl");
   var params = new Array( new Array("test", xmlSource.documentElement));

   result = xslProc.getResultString(xmlSource, params, window.document );


<?xml version='1.0' encoding='utf-8'?>
<xsl:stylesheet version='1.0' xmlns:xsl=''>
<xsl:param name='test'/>
<xsl:template match='/'>
	<xsl:copy-of select='$test'/>

In Mozilla everything works, in IE6 it gives an error "Type mismatch" on addParameter. If the CLSID list in dom.js is changed to match one used in xml/XslTransform.js, everything works.

Change History (3)

comment:1 Changed 15 years ago by bill

Component: DOMHTML
Milestone: 1.0
Owner: changed from anonymous to sjmiles

Not sure I even understand this bug but it seems to be about xml support, which is just in dojox? Scott, please correct me if I'm wrong.

comment:2 Changed 15 years ago by sjmiles

Owner: changed from sjmiles to alex

I don't know anything about this. Alex is actually the module owner for dojo.html.

comment:3 Changed 15 years ago by Tom Trenka

Resolution: wontfix
Status: newclosed

This looks more like a bug with legacy 0.4 code; we didn't port a lot of dojo.dom, and aren't going to in the near future.

If and when we start bringing in cross-browser XML tools in DojoX, we'll keep this in mind (I'm not sure why that CLSID was used either, I'd prefer DomDocument?.4.0 if possible.)

Note: See TracTickets for help on using tickets.