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
xrimson77Asked:
Who is Participating?
 
gregoryyoungCommented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.