[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: C# code and .NET libraries in xslt stylesheet

Subject: Re: C# code and .NET libraries in xslt stylesheet
From: Philip Vallone <philip.vallone@xxxxxxxxxxx>
Date: Mon, 28 Nov 2011 07:35:56 -0500
Re:  C# code and .NET libraries in xslt stylesheet
I added this a while back, which gives step by step instructions. As Michael
stated, it can be tricky. Perhaps this may be helpful:

http://sourceforge.net/apps/mediawiki/saxon/index.php?title=CallingDotNet



On Nov 28, 2011, at 5:07 AM, Michael Kay wrote:

> On 28/11/2011 08:32, Faleqczyk Jakub wrote:
>> Hello,
>>
>> I need some advice in choosing appropriate xslt processor to include to my
AHFormatter (http://www.antennahouse.com/).
>>
>> I have to do some crazy stuff with images and there's no way to do it in
xslt so I have to implement a function in C# to do these.
>> The problem is that my Formatter has MSXSL 3.0 included, and this xslt
engine supports only scripts in JScript or VBScript and those don't offer me
necessary functions.
>>
>> In C# and .NET I got some Image libraries that would do the job. The
problem is that I actually don't know what other xslt engine should I use.
>>
>> Do you have any advice on what version of Saxon would interpret C# code ?
If u do I would appreciate some information about using this function, how to
write the code inside the stylesheet, and which version of .NET is available.
>>
>>
>> any help appreciated
>>
>>
> Saxon on .NET can call out to functions written in C#: information on how to
do this is here:
>
> http://www.saxonica.com/documentation/extensibility/intro.xml
>
> You don't write the C# code inside your stylesheet; you write it separately,
and link to it from your stylesheet code. And Saxon doesn't interpret it, it
simply calls it. We haven't had any reports of any restrictions affecting
which versions of .NET you can use.
>
> Getting "reflexive" extension functions to work under .NET (which requires
dynamic loading of assemblies) can be tricky, and I would recommend using
"integrated" extension functions instead. There are examples in the
saxon-resources download file.
>
> Michael Kay
> Saxonica

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.