Saxonica.com

Saxon on .NET platform

Saxon is now released for two platforms: the Java platform (JDK 1.4 or later), and the .NET platform (validated only on .NET version 1.1). The documentation covers both platforms except where otherwise stated.

The basic port to the .NET platform has been achieved by translating the Java bytecode to MSIL instructions using the IKVMC static compiler, which in turn links to the GNU ClassPath for run-time support of the Java class library. I would like to express my appreciation to Pieter Siegers and M. David Peterson who pioneered this approach and demonstrated its feasibility, and of course to Jeroen Frijters and the other developers who created the technology, which has proved very robust.

The code that is ported in this way includes both the schema-aware and basic products. The open-source (basic) product is provided as an assembly saxon8.dll, while the schema-aware code is packaged in assembly saxon8sa.dll. Note that unlike the Java distribution, the saxon8sa.dll does not duplicate or replace the code in saxon8.dll, rather it references it as a dependent assembly.

The ported Java code is supplemented by an API library designed for use by .NET applications. Although documented in C# terms, this is of course accessible to any .NET programming language. This is a new API designed to give a coherent approach to handling of XSLT, XQuery, and XPath, and to provide integration with existing .NET capabilities (in particular, the System.Xml package where appropriate. The API builds on ideas from JAXP and from System.Xml.Xsl and elsewhere, but is in effect a new design.

Command-line interfaces Transform, Query and Validate are available for .NET: the command-line options are largely the same as the Java equivalents. The same command provides access to schema-aware (using the -sa option) and non-schema-aware operations (Validate, of course, is always schema-aware).

Facilities not currently supported on the .NET platform include the following (this means they are untested, not necessarily that they don't work):

Saxon on the .NET platform relies on the GNU Classpath library for much of its run-time support, though some of the more critical operations are delegated instead to the .NET Common Language Runtime (CLR). The Microsoft XML parser is generally used in preference to the GNU XML parser, though the GNU parser will be used, for example, if a SAXSource is supplied by the application. URI handling (especially URI dereferencing) is generally delegated to the .NET platform. Collations are implemented using the facilities of the .NET System.Globalization namespace, except where Java-specific facilities are used such as an explicit collation class or explicit collation rules. Regular expression processing is also delegated to the CLR, because the GNU regex library was found not to support the full JDK regex syntax.

Next