SaxonCS-b6
11.4.1
dotnet add package SaxonCS-b6 --version 11.4.1
NuGet\Install-Package SaxonCS-b6 -Version 11.4.1
<PackageReference Include="SaxonCS-b6" Version="11.4.1" />
paket add SaxonCS-b6 --version 11.4.1
#r "nuget: SaxonCS-b6, 11.4.1"
// Install SaxonCS-b6 as a Cake Addin #addin nuget:?package=SaxonCS-b6&version=11.4.1 // Install SaxonCS-b6 as a Cake Tool #tool nuget:?package=SaxonCS-b6&version=11.4.1
SaxonCS
What is SaxonCS?
SaxonCS is a library for XSLT, XQuery, XPath, and XSD processing.
It offers a high level of conformance with the latest W3C standards: XSLT 3.0, XQuery 3.1, XPath 3.1, XSD 1.1.
It provides a C# API to allow transformations and queries to be controlled from a C# application, and also offers a command line interface.
SaxonCS is a proprietary product created and distributed by Saxonica Ltd. You will need to purchase a license key to activate the product. To acquire a license key, use the Saxonica online shop, or email saxon-orders@saxonica.com.
How does it relate to other Saxon products?
SaxonCS is built from the same source code as the long-established Java product. It was created by converting the source code of SaxonJ to C# source code, using a custom transpiler written by Saxonica (primarily in XSLT 3.0, since you asked).
It is single-sourced with the Java product; the code has not been forked, and all maintenance and future development will be done on the Java base code.
The product includes some C# code for interfacing to the .NET platform, and to provide a C# API following C# coding conventions.
SaxonCS, in its initial form, is based on the Enterprise Edition of Saxon, which means that it offers high-performance features exclusive to the EE version, such as advanced optimization, schema-awareness, streaming, and multi-threading. Some platform-specific features such as bytecode generation are excluded.
License files are compatible between SaxonCS and SaxonJ.
Stylesheet export files (SEF files) are compatible between SaxonCS, SaxonC, and SaxonJ.
SaxonCS can also generate SEF files for SaxonJS.
How does it relate to other XML libraries on .NET?
SaxonCS uses the System.Xml.XmlParser
classes for parsing XML.
SaxonCS can work with a DOM tree delivered as a System.Xml.XmlDocument
.
You can either convert a DOM to Saxon's optimized internal tree structure, or
you can use Saxon's XPath or XQuery engine to query a DOM tree directly.
SaxonCS offers an alternative to the Microsoft XSLT 1.0 and XSD 1.0 processors bundled with .NET Core, which have never been updated to the latest W3C specifications. The newer standards offer a wide range of features that greatly extend the power of the tools.
It should be possible to run stylesheets developed for the Microsoft XSLT 1.0 processor under SaxonCS provided that they do not take advantage of Microsoft-specific XSLT extensions. SaxonCS offers "1.0 compatibility mode" to assist with the transition.
Since the functionality of the later standards is so much richer, Saxon does not attempt to offer API compatibility with the Microsoft processors.
What about the old Saxon/.NET product?
Up to and including Saxon 10, Saxonica delivered a product on .NET Framework built from the Java product by converting the JAR files at bytecode level using the IKVMC cross-compiler. This product relied on a converted version of the Java run-time library to function. The IKVMC technology was never ported to .NET Core, so a new approach was needed, and Saxonica settled on source code conversion as the most promising approach. A particular benefit is that it now uses the .NET run-time library in place of a converted Java run-time library, which significantly reduces the footprint.
The API for SaxonCS is closely based on the API for the older product, but it is not 100% compatible; some changes will be needed to existing applications. The changes have been designed to improve the conformance to C# house-style and to take advantage of more modern features in the C# language, for example by using delegates rather than interfaces for callbacks.
The older Saxon/.NET product will remain supported for the time being, but will not be further developed.
What's new in this version?
SaxonCS is based on version 11 of the source code, and was released ahead of the Java version. As usual there's a comprehensive list of changes in the documentation. Apart from supporting .NET 5, you'll find there are lots of new features to make processing JSON easier; it's getting close to the point where JSON is supported almost as well as XML. Certainly, there's no better library available for applications that need to mix and match XML and JSON, or do custom conversions from one to the other.
For a record of bugs fixed in each maintenance release, please consult the issues list — you can filter the list on the property "Fixed in maintenance release". This is also the place to report any problems you find.
Where do I find documentation?
It's all online.
(Delivered, in case you're interested, by Saxon-JS running in your browser.)
What if I hit problems?
If you have coding problems with XSLT, XPath, XQuery, or XSD, you will usually be able to get help by asking on StackOverflow.
If you suspect a Saxon bug, please report it on the issues list.
Will SaxonCS be integrated in Biztalk?
Microsoft currently offer XSLT 3.0 capability in Biztalk based on an integration of Saxon-HE. We don't know if they have any plans for updating to SaxonCS; we'll let you know when we hear.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- HtmlAgilityPack (>= 1.11.33)
- ICU4N (>= 60.1.0-alpha.354)
- ICU4N.Collation (>= 60.1.0-alpha.354)
- ICU4N.CurrencyData (>= 60.1.0-alpha.354)
- ICU4N.LanguageData (>= 60.1.0-alpha.354)
- ICU4N.RegionData (>= 60.1.0-alpha.354)
- ICU4N.Transliterator (>= 60.1.0-alpha.354)
- Microsoft.AspNetCore.StaticFiles (>= 2.2.0)
- Microsoft.Extensions.Configuration (>= 5.0.0)
- Microsoft.Extensions.Configuration.Json (>= 5.0.0)
- Microsoft.Extensions.Configuration.Xml (>= 5.0.0)
- Singulink.Numerics.BigDecimal (>= 2.0.0)
- Singulink.Numerics.BigIntegerExtensions (>= 2.0.1)
- System.Collections.Immutable (>= 5.0.0)
- XmlResolver (>= 1.4.0)
- XmlResolverData (>= 1.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
11.4.1 | 12,086 | 8/9/2022 |
Our first native C# release.