[JScriptException: Function expected]
Microsoft.JScript.LateBinding.Call(Binder binder, Object[] arguments, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters, Boolean construct, Boolean brackets, VsaEngine engine) +5705
Microsoft.JScript.LateBinding.Call(Object[] arguments, Boolean construct, Boolean brackets, VsaEngine engine) +257
System.Xml.Xsl.CompiledQuery.Script1.countNamespaceDecls(Object pNodeList) +703
<xsl:template match="/">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current) +4028
Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) +108
Execute(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) +47
System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlSequenceWriter results) +132
System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer) +311
System.Xml.Xsl.XslCompiledTransform.Transform(XmlReader input, XsltArgumentList arguments, XmlWriter results, XmlResolver documentResolver) +83
System.Xml.Xsl.XslCompiledTransform.Transform(String inputUri, String resultsFile) +304
Compiler.ConvertOLDXSL2XSLT.btnConvert_Click(Object sender, EventArgs e) in c:\WebProjects\CodeCreator\Compiler\Compiler\ConvertOLDXSL2XSLT.aspx.cs:29
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +158
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +175
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +39
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +37
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +105
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4413
XsltSettings mySettings = new XsltSettings() { EnableScript = true };
XslCompiledTransform xslt = new XslCompiledTransform();
xslt.Load(Server.MapPath(@"CG\\xsl-xslt-converter.xslt"), mySettings , null); //
xslt.Transform(Server.MapPath(@"toconvert.xml"), Server.MapPath(@"convertedto.xslt"));
Support for embedded scripts is an optional XSLT setting on the XslCompiledTransform class. Script support is disabled by default. To enable script support, create an XsltSettings object with the EnableScript property set to true and pass the object to the Load method.
(that must have been relevant about 15 years ago)
Windows Scripting has evolved over this time, so it might be somewhat tricky to set it up
I looked inside the Javascript
There is no reason to use the javascript, you can simply run the XSLT on your XSL
using microsoft XSL (so simply drop the javasacript, take an IDE and run the XSLT over your XSL
You have not included the WS-XSL file, so I can't run it for you.
If you find an issue doing the XSLT, you can simply post it (or send it privately) so I can run the XSLT for you