Installation: .NET platform
This section explains in more detail how to install SaxonCS on the .NET platform. For a basic "quick start" guide, see Getting started with SaxonCS.
For more information about SaxonCS on the .NET platform, see SaxonCS.
Prerequisites: .NET platform
The following software must be installed separately, it is not included with the Saxon download.
-
To run SaxonCS 12 you need to install .NET 6. This is the only release on which the product has been validated; if you want to try it on other versions, please let us know your experience.
-
SaxonCS validation has taken place primarily on MacOS, with extensive regression testing on Windows and Linux. It is supported on all three platforms.
Installing the software
Before you can run the software, you will need to ensure that a license file is installed, as described in Setting up a license key.
The software can be installed using Nuget or directly as an executable.
Installing with Nuget
When SaxonCS is installed with Nuget, all of the dependencies will be automatically loaded as well. It consists of a single DLL file, named SaxonCS.
To invoke SaxonCS from a C# application, simply add a Nuget dependency to your project as you would for any other third-party library.
To run XSLT transformations, XQuery queries, or XSD validation from the command line, you can use the dotnet command, for example:
dotnet SaxonCS transform -t -s:source.xml -xsl:stylesheet.xslInstalling as an application
To install the software as an executable application, download the version appropriate for your platform: Linux, Windows, or MacOS from https://www.saxonica.com/download/dotnet.xml. The MacOS application is a universal binary that will work with either Intel or AArch64 versions of Mac hardware.
Installing on Linux or Windows
The Linux and Windows downloads are ZIP files that contain the executable application. You can unzip the archive and place the application anywhere convenient.
Installing on MacOS
The MacOS application is distributed as a signed, notarized "DMG" file. Download the DMG file, open it up, and drag the "SaxonCS" application across the screen into the Applications folder.
The SaxonCS application doesn't have a GUI interface, so simply clicking on the application icon doesn't do anything. From a terminal window, you can run
/Applications/SaxonCS.app/Contents/MacOS/SaxonCS
. For convenience, create an alias or link the application into another directory such as/usr/local/bin
.
Having installed the right executable for your target platform, you can invoke it directly using a command such as:
SaxonCS transform -t -s:source.xml -xsl:stylesheet.xslSample applications
SaxonCS is distributed with a sample application Example.cs
illustrating
a variety of use cases for invoking the Saxon API to perform queries and transformations.
This is issued
(together with this documentation and other resources) in a separate download file
saxon-resources-12.zip
, available from the Saxonica
website. Once this is unzipped, the sample applications can be found in the directory
/samples
. They are described in Samples.
As well as the Example.cs
application, the issued samples include a variety
of simple XML documents, schemas, stylesheets, and queries, which can be used to gain
familiarity with the command line interface. They are described in Samples.