diff --git a/SaxonHE11s9apiExtensions/DotNetInputStream.cs b/SaxonHE11s9apiExtensions/DotNetInputStream.cs index 56ca816..3254973 100644 --- a/SaxonHE11s9apiExtensions/DotNetInputStream.cs +++ b/SaxonHE11s9apiExtensions/DotNetInputStream.cs @@ -14,7 +14,7 @@ // This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - +using System.IO; using JInputStream = java.io.InputStream; namespace net.liberty_development.SaxonHE11s9apiExtensions diff --git a/SaxonHE11s9apiExtensions/DotNetOutputStream.cs b/SaxonHE11s9apiExtensions/DotNetOutputStream.cs index cc43107..2c72c06 100644 --- a/SaxonHE11s9apiExtensions/DotNetOutputStream.cs +++ b/SaxonHE11s9apiExtensions/DotNetOutputStream.cs @@ -14,6 +14,7 @@ // This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +using System.IO; using JOutputStream = java.io.OutputStream; namespace net.liberty_development.SaxonHE11s9apiExtensions diff --git a/SaxonHE11s9apiExtensions/DotNetWriter.cs b/SaxonHE11s9apiExtensions/DotNetWriter.cs index bcd07d1..6ec40b1 100644 --- a/SaxonHE11s9apiExtensions/DotNetWriter.cs +++ b/SaxonHE11s9apiExtensions/DotNetWriter.cs @@ -17,6 +17,9 @@ using JWriter = java.io.Writer; using JException = java.lang.Exception; +using System.IO; +using System; + namespace net.liberty_development.SaxonHE11s9apiExtensions { diff --git a/SaxonHE11s9apiExtensions/README.md b/SaxonHE11s9apiExtensions/README.md index b875e85..3c46745 100644 --- a/SaxonHE11s9apiExtensions/README.md +++ b/SaxonHE11s9apiExtensions/README.md @@ -2,22 +2,22 @@ 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. +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. 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. +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. 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. -Known issues: I have created the project with VS 2022 Community Edition on Windows, apps built that way could be deployed and run successfully under Linux or Mac where the dotnet .NET 6 runtime is installed; however, the https://github.com/ikvm-revived/ikvm-maven does seem to work on a Mac, so in experiments of your own you will probably be restricted to develop and build on Windows. +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. 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: ``` - + @@ -28,8 +28,8 @@ This extension project is also on NuGet so you can add it in your project e.g. ``` - - + + diff --git a/SaxonHE11s9apiExtensions/S9ApiExtensions.cs b/SaxonHE11s9apiExtensions/S9ApiExtensions.cs index 1895d77..31d15b3 100644 --- a/SaxonHE11s9apiExtensions/S9ApiExtensions.cs +++ b/SaxonHE11s9apiExtensions/S9ApiExtensions.cs @@ -13,6 +13,8 @@ using URL = java.net.URL; using URI = java.net.URI; using Source = javax.xml.transform.Source; +using System; +using System.IO; namespace net.liberty_development.SaxonHE11s9apiExtensions { diff --git a/SaxonHE11s9apiExtensions/SaxonHE11s9apiExtensions.csproj b/SaxonHE11s9apiExtensions/SaxonHE11s9apiExtensions.csproj index d8698fa..ab50644 100644 --- a/SaxonHE11s9apiExtensions/SaxonHE11s9apiExtensions.csproj +++ b/SaxonHE11s9apiExtensions/SaxonHE11s9apiExtensions.csproj @@ -1,18 +1,18 @@  - net6.0 - enable - enable + net6.0;net48 + disable + disable True MPL-2.0 - Saxon HE 11 s9api Extension Helpers to use IKVM compiled Saxon HE 11 with .NET 6 - 11.6.0 + Saxon HE 11 s9api Extension Helpers to use IKVM compiled Saxon HE 11 with .NET 6 and .NET framework 4.8 + 11.6.8.7 Martin Honnen This is an extension method library to ease the use of an IKVM compiled version of Saxon HE 11 Java in .NET 6 applications. Copyright 2023 Martin Honnen 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 - This is the first release using Saxon HE 11.6 + 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 True https://github.com/martin-honnen/SaxonHE11s9apiExtensions True @@ -20,7 +20,7 @@ - +