How to share/publish my successful attempts to IKVM compile Saxon HE 11.4 Java to .NET 6?
Added by Martin Honnen about 2 years ago
In the last weeks I have experimenting with cross compiling Saxon HE 11.4 Java to .NET 6, using https://github.com/ikvm-revived/ikvm-maven and/or https://github.com/ikvm-revived/ikvm.
My experiments have been successful so that I can write cross-platform .NET 6 command line or web apps using XSLT 3.0 and XQuery 3.1, although sometimes a bit cumbersome as I have not written any wrapper API, like Saxon HE 10 .NET framework or earlier editions did, but have mainly worked against the Java s9api from the .NET code (except writing some extension methods to ease things).
I think the result is worth sharing with others, as it would allow people to use XSLT 3.0 and XQuery 3.1 on .NET 6 in a similar kind of way Saxon 10 HE .NET framework allowed, without depending on the currently commercially licensed only SaxonCS or having to wait for an HE release of SaxonCS (not sure when that will be released, I think at XML Prague Michael said it is planned but not a high priority).
My current plan is to at least publish code samples on GitHub on how I have built/used Saxon HE 11.4 Java in a .NET 6 console app or web app.
I am also thinking about creating NuGet packages, at least for dotnet command line tools, to run XSLT or XQuery (e.g. aka the Transform.exe or Query.exe of Saxon HE 10 .NET). But for publishing anything on NuGet I have my doubts on how to name it, is Saxonica all right with a third party publishing something like SaxonHE11IKVMTransform/SaxonHE11IKVMXQuery or should I rather not name it that way?
Licensing would be under MPL 2, as far as I understand the license of Saxon HE.
Replies (3)
Please register to reply
RE: How to share/publish my successful attempts to IKVM compile Saxon HE 11.4 Java to .NET 6? - Added by Martin Honnen about 2 years ago
Any comments, or particularly, objections, from Saxonica?
I would like to progress during this week with my plans so in case of any concerns or objections, please raise them now.
RE: How to share/publish my successful attempts to IKVM compile Saxon HE 11.4 Java to .NET 6? - Added by Michael Kay about 2 years ago
It's open to you to do this under the open-source licensing terms.
Our only concern is that you make it clear this is not a Saxonica-supported or validated product. We haven't had a chance to test this new IKVM version ourselves, and we've no idea how reliable it is.
We would be particular concerned about testing concurrency features: though fortunately Saxon-HE generally doesn't do multi-threading, so this isn't as big a risk as it would be with Saxon-EE.
Michael Kay
RE: How to share/publish my successful attempts to IKVM compile Saxon HE 11.4 Java to .NET 6? - Added by Martin Honnen about 2 years ago
I have published my samples projects:
- NuGet dotnet tool to run XSLT 3.0: https://www.nuget.org/packages/SaxonHE11NetXslt/
- NuGet dotnet tool to run XQuery 3.1: https://www.nuget.org/packages/SaxonHE11NetXQuery/
- NuGet extension method library to ease use of Java s9api of Saxon HE 11 from .NET 6: https://www.nuget.org/packages/SaxonHE11s9apiExtensions/
Various sample projects showing the use of the IKVM cross-compiled Saxon HE 11 in .NET 6 projects/code:
- variety of samples using XPath 3.1, XQuery 3.1 and XSLT 3.0: https://github.com/martin-honnen/SaxonHE11IKVMNet6SaxonCSSamplesAdapted
- minimal sample to show running XSLT 3.0: https://github.com/martin-honnen/SaxonHE11Net6ConsoleAppTest1
- minimal sample to show running XQuery 3.1: https://github.com/martin-honnen/SaxonHE11Net6XQuerySampleApp1
- minimal sample to show running XPath 3.1: https://github.com/martin-honnen/SaxonHE11NetXPathSampleApp1
Please register to reply