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 ......