msxml:script rant

There are some things that you just can't do with the native implementation of xsl.  One alternative is to use the msxml:script block. 

The problem I am running into is the different implementations of the msxml:script in MSXML and System.Xml.Xsl .  In MSXML vbscript is supported while System.Xml.Xsl does not support vbscript.  System.Xml.Xsl supports C#,VB.Net, JScript, java, and other languages.  The documentation is "XSLT Stylesheet Scripting Using <msxsl:script>"

So if your xsl sheets were designed for MSXML and contain vbscript they will probably fail in System.Xml.Xsl with

'Let' and 'Set' assignment statements are no longer supported.

The work around for this of course is to remove the Set statements.  Or redo the code in JScript which is supported by both XSL implementations.

My beef is why vbscript support was dropped for System.Xml.Xsl.  I have to maintain 2 versions of the same xml transformations, one for MSXML dependent applications(Internet Explorer) and a System.Xml.Xsl version for .Net stuff.

What XML implementation do you think IE8 will support?   

Print | posted on Friday, March 21, 2008 10:47 AM