I have an XSLT with a C# script in it:
<msxsl:script language='C#' implements-prefix='user'> <msxsl:using namespace='System.Xml'/> <msxsl:using namespace='System.Xml.XPath'/> <![CDATA[ public string GetMenuPath(XPathNodeIterator node) { XPathNavigator dataSourceNode = node.Current; return dataSourceNode.Name; } ]]> </msxsl:script>
And somewhere in the XSLT this function is called:
<xsl:value-of select='user:GetMenuPath(current())'/>
But as I try to run the XSLT transformation on the XML input (the input does not matter), it stop immediately with the error ‘msxsl:script cannot be empty’.
I have absolutely no idea why… I use nxslt with .NET Framework.
Thank you for help !
Thank you for your answers, I found out the origin of the problem now. It was because I was using the ‘style’ tag instead of ‘nxslt’ for calling the XSLT transformation. ‘style’ works as long as there is no extension script.