RE: [xsl] XSLT in MSXML - removeParameter?

Subject: RE: [xsl] XSLT in MSXML - removeParameter?
From: Scott Trenda <Scott.Trenda@xxxxxxxx>
Date: Wed, 25 Mar 2009 10:27:33 -0500
Martin,

Thank you so much! I think the ActiveXObject-chooser in my code defaults to
the 3.0 objects, so I'll add in some logic that'll make it try to retrieve the
6.0 and then the 4.0 objects. I got it working by overwriting proc =
proc.ownerTemplate.createProcessor() each time, but like I said, that seems
really wasteful. I think I'll keep that logic around for the 3.0 objects,
though. Aside from the changed security restrictions in the 6.0 objects
(AllowDocumentFunction, ResolveExternals, etc.) that I already know to change,
do you know of any other possible real differences in the processing between
the 3.0, 4.0, and 6.0 objects? That is, if I switched from 3.0 to 4.0 or 6.0,
would there be any real reason that my current transformations would stop
working correctly?

Thanks again! I really appreciate it!

~ Scott

-----Original Message-----
From: Martin Honnen [mailto:Martin.Honnen@xxxxxx]
Sent: Wednesday, March 25, 2009 9:43 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] XSLT in MSXML - removeParameter?

Scott Trenda wrote:

> Now, this looked promising, until I tried it: myProc.addParameter("myParam",
null);
> This threw a "Type mismatch" error in IE. The same happened when I tried
myProc.addParameter("myParam"), myProc.addParameter("myParam", undefined) and
myProc.addParameter("myParam", null, ""). I tried
myProc.addParameter("myParam"), but it threw a "Wrong number of arguments or
invalid property assignment" error instead. If I try to remove the parameter
with myProc.addParameter("myParam", ""), then it overwrites the default value
in my stylesheet, like <xsl:param name="myParam" select="'defaultVal'" />.

> Has anyone come across this issue before, and how did you deal with it? Is
there really a good, supported, CORRECT way to do this within IXSLProcessor?

I have run some tests here, with JScript and MSXML 4 and MSXML 6 the
addParameter("myParam", null) works flawlessly, it is only MSXML 3 that
gives the type mismatch.
I realize that does not solve the issue as IE 6 and later come with
MSXML 3 and not MSXML 6. On the other hand MSXML 6 is by now part of the
platform on Windows XP SP 3 and all Vista versions so a library might
want to use it instead of MSXML 3 if it is available.

Currently the best way to get public information from Microsoft on MSXML
is to post in the MSXML forum on MSDN. I have done that here:
http://social.msdn.microsoft.com/Forums/en-US/msxml/thread/58ee0753-7014-48c9
-b78f-a065dbbf1433
so you might want to check during the next days there if someone from MS
posts about a workaround for MSXML 3.


--

	Martin Honnen
	http://JavaScript.FAQTs.com/

Current Thread