Link to home
Start Free TrialLog in
Avatar of xrimson77
xrimson77

asked on

Using external objects within XSLT C# script.

I have an XSLT script that I'm trying to use and inside the script I need to use an external object that I have created, but everytime I
add the following line to reference the object:

<msxsl:using namespace="MyNamepace" />

to my script I get the following error:

Exception.Message = file:///C:/Documents and Settings/Jason Herron/My Documents/Visual Studio Projects/XSLTransformWithCSharpScript/XSLTransformWithCSharpScript/XSLTFile1.xslt(7,55) :\n
Exception.InnerException = msxsl:script cannot be empty.

I'm trying to do something along these lines: http://msdn2.microsoft.com/en-us/library/ms256167.aspx

Even when I forget about my own external object and just try referencing the System.IO namespace, i get the same error.  When I pull the above line out the script works fine (well, it would work fine if I don't use any unknown objects).

Has anyone gotten this to work successfully?

An alternative I've tried is to add an Extension object to the XslTransform object, but I can't seem to figure out how to use that object in script.  I can only successfully use it inside the transforms.

Thanks,
Jason
ASKER CERTIFIED SOLUTION
Avatar of gregoryyoung
gregoryyoung
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial