[Home] [By Thread] [By Date] [Recent Entries]
On 01.09.2017 18:16, Joseph L. Casale jcasale@xxxxxxxxxxxxxxxxx wrote:
I am trying to split up a few large xsl templates where one contains a large block of msxsl:script based C# functions. Almost all of the templates use some quantity of the functions made available through this facility as well as some quantity of shared variables for data like apostrophes, quotes and some common names. Are you aware that XslCompiledTransform supports extension objects as well as inline code? If you encapsulate your C# code in a class and pass that as an extension object with e.g. https://msdn.microsoft.com/en-us/library/system.xml.xsl.xsltargumentlist.addextensionobject(v=vs.110).aspx when you run XSLT then you don't depend on inline script compilation and execution and I think it should also solve the problem you have with sharing the C# code. Obviously that way you need to write and compile the C# separately instead of having XslCompiledTransform doing it for the inline code, I am not sure whether it is an option.
|

Cart



