calling VB.net function in a XSL transform

  • Thread starter Thread starter amessimon
  • Start date Start date
A

amessimon

Hi

I have a page I need to access some VB.NET code in an XSL transform.

I've used scripting languages before in XSL transforms for string
manipulation and other simple tasks but have never needed to use VB. I think
what i need to do is outside the scope of a scripting language as it uses
the 'system.Security.Cryptography' namespace.

I've posted this in the XSL newsgroup as well.

Thanks in advance

amessimon
 
You can't do this directly...

The only thing I could suggest, if it's absolutely necessary, is to write
your code you need into a VB.Net class library, then expose this by putting
a COM interface on it, then access this DLL in the scripting using
CreateObject.

The other solution would be to reevaluate your approach, and see if you can
put the data you need to access inside the message in your VB.Net code
before transforming, then access the inserted data it from the XSL.

Thanks.

Daniel.
 
in System.Xml.Xsl, see the IXsltContextFunction

-- bruce (sqlwork.com)

| Hi
|
| I have a page I need to access some VB.NET code in an XSL transform.
|
| I've used scripting languages before in XSL transforms for string
| manipulation and other simple tasks but have never needed to use VB. I
think
| what i need to do is outside the scope of a scripting language as it uses
| the 'system.Security.Cryptography' namespace.
|
| I've posted this in the XSL newsgroup as well.
|
| Thanks in advance
|
| amessimon
|
|
 
Never knew that existed!

The issue for me with that is not only are you relying on an external object
existing, but the XSL has to be executed through Microsoft's .Net
XslTransform object... This isn't necessarily a problem, as long as the
XSL's aren't used in other contexts.
 
Back
Top