crossbrowser ajax xsl issue

N

nx.nine

hi, i've done some searching and haven't found a solution that worked,
hopefully someone here can help.

i apologize in advance for my dyslexic thought process.

i have an xml file being transformed by an xsl file,
the xsl outputs an html page that then loads other xml via ajax and
applies an xsl to draw a user interface.

firefox does everything perfectly, but when ie tries to start my ajax
wrapper it errors and reports that ActiveXObject("Microsoft.XMLDOM")
can not be created by the Automation server.

i've read that this is because msxml parser cannot create instances of
the msxml parser inside itself.

what really bugs me is that when i try to do everything outside of the
xml/xsl, ie fails with no debug info when it reaches var xmlObj = new
iXMLObj();
iXMLObj being a javascript function that acts as my ajax object
constructor.
when dissecting the code, things just stop here:

( this segment works fine )
var objs = {
serializer : null,
parser : null,
httpreq : null,
xsltproc : null,
xpath : null,
domdoc : null,
xsltemplate : null
};
( it fails when any of these lines are added )
objs.domdoc = ActiveXObject("Microsoft.XMLDOM");
objs.httpreq = ActiveXObject("Microsoft.XMLHTTP");
objs.xsltproc = ActiveXObject("Microsoft.XMLDOM");
objs.xsltemplate = ActiveXObject("Microsoft.XMLDOM");

i'm sorry for not posting the complete code, but this is work being
done for client who asked that nothing be released unless absolutely
neccessary.

any ideas why i can't start the xmldom?
 
M

Martin Honnen

what really bugs me is that when i try to do everything outside of the
xml/xsl, ie fails with no debug info when it reaches var xmlObj = new
iXMLObj();
objs.domdoc = ActiveXObject("Microsoft.XMLDOM");

You need to construct the object with
new ActiveXObject("Microsoft.XMLDOM")

Also note that if you want to do XSLT 1.0 transformations you would
rather use a program id lik
new ActiveXObject('Msxml2.DOMDocument.3.0')
to make sure you have the proper version to support XSLT 1.0.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,007
Messages
2,570,267
Members
46,866
Latest member
Aletlirm

Latest Threads

Top