Skip to content

Commit

Permalink
Update to IKVM 8.8 for .NET 6 and .NET 8 support, continuing .NET 4.8…
Browse files Browse the repository at this point in the history
… framework support, of course
  • Loading branch information
martin-honnen committed May 19, 2024
1 parent e3972fc commit bd520e3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
13 changes: 7 additions & 6 deletions SaxonHE11s9apiExtensions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,23 @@
Extension methods that help/ease the task of using Saxon HE 11 Java s9api from .NET code

This is a sample project outlining my successful attempt to apply https://github.com/ikvm-revived/ikvm and
https://github.com/ikvm-revived/ikvm-maven to use the open-source Saxon HE 11 Java XSLT 3.0, XQuery 3.1 and XPath 3.1 library in .NET 6 code or .NET framework 4.8 code.
https://github.com/ikvm-revived/ikvm-maven to use the open-source Saxon HE 11 Java XSLT 3.0, XQuery 3.1 and XPath 3.1 library in .NET 6 or .NET 8 code or .NET framework 4.8 code.

Please understand that this is my own experiment, it uses the official Saxon HE 11 release from Maven, but the integration with IKVM and IKVM Maven is an experimental work of my own, not in any way an officially tested and supported product by Saxonica, the company that has produced Saxon.

Feel free to try and use it under the Mozilla Public License 2.0.

Understand that this is work in progress and kind of experimental, I don't have access to a complete test suite of unit tests to rigorously test this, I nevertheless feel it can be useful for folks to at least know about this option to run [XSLT 3.0](https://www.w3.org/TR/xslt-30/), [XPath 3.1](https://www.w3.org/TR/xpath-31/) and [XQuery 3.1](https://www.w3.org/TR/xquery-31/) in .NET 6 code or .NET framework 4.8 code.
Understand that this is work in progress and kind of experimental, I don't have access to a complete test suite of unit tests to rigorously test this, I nevertheless feel it can be useful for folks to at least know about this option to run [XSLT 3.0](https://www.w3.org/TR/xslt-30/), [XPath 3.1](https://www.w3.org/TR/xpath-31/) and [XQuery 3.1](https://www.w3.org/TR/xquery-31/) in .NET 6 or .NET 8 code or .NET framework 4.8 code.

To use Saxon under .NET, the coding is mainly done against the Java s9api API of Saxon HE 11 although I have provided some extension methods as helpers to ease the task of using .NET FileInfo or Stream instead of needing to know about and use Java specific java.io.File or Stream classes/APIs.

With this new release using IKVM 8.7.1 and IKMV.Maven.Sdk 1.6.1, it should now be possible to both use and build the packages under Windows as well as MacOs.
With this new release using IKVM 8.8.9 and IKMV.Maven.Sdk 1.6.9, it should now be possible to both use and build the packages under Windows as well as MacOs and have a single NuGet package targetting .NET 6 and .NET 8 as well as .NET framework 4.8.

The basic usage is to to install the NuGet package IKVM.Maven.Sdk to be able to pull in the Saxon HE 11 (e.g. 11.6) and the XmlResolver code it uses directly from Maven:
```
<ItemGroup>
<PackageReference Include="IKVM.Maven.Sdk" Version="1.6.1" />
<PackageReference Include="IKVM" Version="8.8.0" />
<PackageReference Include="IKVM.Maven.Sdk" Version="1.6.9" />
<MavenReference Include="net.sf.saxon:Saxon-HE" version="11.6" />
<!--<MavenReference Include="org.xmlresolver:xmlresolver" Version="4.5.1" />
<MavenReference Include="org.xmlresolver:xmlresolver" Category="data" Version="4.5.1" />-->
Expand All @@ -28,8 +29,8 @@ This extension project is also on NuGet so you can add it in your project e.g.

```
<ItemGroup>
<PackageReference Include="IKVM.Maven.Sdk" Version="1.6.1" />
<PackageReference Include="SaxonHE11s9apiExtensions" Version="11.6.8.7" />
<PackageReference Include="IKVM.Maven.Sdk" Version="1.6.9" />
<PackageReference Include="SaxonHE11s9apiExtensions" Version="11.6.9" />
<MavenReference Include="net.sf.saxon:Saxon-HE" version="11.6" />
<!--<MavenReference Include="org.xmlresolver:xmlresolver" Version="4.5.1" />
<MavenReference Include="org.xmlresolver:xmlresolver" Category="data" Version="4.5.1" />-->
Expand Down
13 changes: 7 additions & 6 deletions SaxonHE11s9apiExtensions/SaxonHE11s9apiExtensions.csproj
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net48</TargetFrameworks>
<TargetFrameworks>net6.0;net8.0;net48</TargetFrameworks>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>disable</Nullable>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<PackageLicenseExpression>MPL-2.0</PackageLicenseExpression>
<Title>Saxon HE 11 s9api Extension Helpers to use IKVM compiled Saxon HE 11 with .NET 6 and .NET framework 4.8</Title>
<Version>11.6.8.7</Version>
<Title>Saxon HE 11 s9api Extension Helpers to use IKVM compiled Saxon HE 11 with .NET 6 or with .NET 8 or with .NET framework 4.8</Title>
<Version>11.6.9</Version>
<Authors>Martin Honnen</Authors>
<Description>This is an extension method library to ease the use of an IKVM compiled version of Saxon HE 11 Java in .NET 6 applications.</Description>
<Copyright>Copyright 2023 Martin Honnen</Copyright>
<Copyright>Copyright 2024 Martin Honnen</Copyright>
<PackageTags>xslt;XSLT;xpath;XPath;xquery;XQuery;xslt-3.0;XSLT-3.0;xquery-3.1;XQuery-3.1;xpath-3.1;XPath-3.1;json</PackageTags>
<PackageReleaseNotes>This is the first release using Saxon HE 11.6 targetting both .NET framework 4.8 as well as .NET 6, using IKVM 8.7.1 and IKVM.Maven.Sdk 1.6.1</PackageReleaseNotes>
<PackageReleaseNotes>This is the first release using Saxon HE 11.6 targetting both .NET framework 4.8 as well as .NET 6 and .NET 8, using IKVM 8.8.0 and IKVM.Maven.Sdk 1.6.9</PackageReleaseNotes>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<RepositoryUrl>https://github.com/martin-honnen/SaxonHE11s9apiExtensions</RepositoryUrl>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="IKVM.Maven.Sdk" Version="1.6.1" />
<PackageReference Include="IKVM" Version="8.8.0" />
<PackageReference Include="IKVM.Maven.Sdk" Version="1.6.9" />
<MavenReference Include="net.sf.saxon:Saxon-HE" version="11.6" />
<!--<MavenReference Include="org.xmlresolver:xmlresolver" Version="4.5.1" />
<MavenReference Include="org.xmlresolver:xmlresolver" Category="data" Version="4.5.1" />-->
Expand Down

0 comments on commit bd520e3

Please sign in to comment.