Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 509
  • Last Modified:

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
0
xrimson77
Asked:
xrimson77
1 Solution
 
gregoryyoungCommented:
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now