AltovaGen 2.0.2
See the version list below for details.
dotnet add package AltovaGen --version 2.0.2
NuGet\Install-Package AltovaGen -Version 2.0.2
paket add AltovaGen --version 2.0.2
#r "nuget: AltovaGen, 2.0.2"
#:package AltovaGen@2.0.2
#addin nuget:?package=AltovaGen&version=2.0.2
#tool nuget:?package=AltovaGen&version=2.0.2
AltovaGen
What is AltovaGen?
This library provides a managed, AnyCPU .NET 8+ API compatible with Altova.AltovaXML.dll (the COM interop wrapper from Altova XMLSpy 2026). Zero COM dependencies, fully cross-platform (Windows, Linux, macOS).
Features
| Engine | XSLT | XQuery | XSD | DTD | Comments |
|---|---|---|---|---|---|
| BCL (default) | 1.0 | 1.0 subset (XPath 1.0) | 1.0 | Well-formedness | Built-in, no external dependencies |
| SaxonCS-HE (bundled) | 2.0/3.0 | — | — | — | altova:evaluate bridge; XQuery/XSD 1.1 not wired |
Usage
Dependency injection (recommended)
The public API is interfaces only — implementation classes are internal.
Register the services and resolve the facades:
using AltovaGen.Compat;
using Microsoft.Extensions.DependencyInjection;
var services = new ServiceCollection();
services.AddAltovaGen();
using var provider = services.BuildServiceProvider();
// The IApplication facade mirrors the original Altova.AltovaXML surface
var app = provider.GetRequiredService();
app.XSLT1.InputXMLFromText = "Test ";
app.XSLT1.XSLFromText = """
""";
string result = app.XSLT1.ExecuteAndGetResultAsString();
// result == "Test"
XSLT 2.0/3.0
Use IXSLT2 for stylesheets that need XSLT 2.0/3.0 or the Altova extension
namespace xmlns:altova="http://www.w3.org/.../xslt-extensions". It is routed
to the bundled SaxonCS-HE engine:
var xslt2 = provider.GetRequiredService();
xslt2.InputXMLFileName = "sales.xml";
xslt2.XSLFileName = "sales-report.xslt";
xslt2.Execute("sales-report.fo");
Validation
var validator = provider.GetRequiredService();
validator.InputXMLFromText = xmlContent;
validator.SchemaFromText = xsdContent;
bool isValid = validator.IsValid();
Engines are constructor-injected into the router, so IEngineRouter.SelectXsltEngine(2.0)
returns the same SaxonXsltEngine instance the container registered — XSLT 2.0/3.0 (and
the altova:evaluate bridge) work out of the box, with no manual registration call.
To swap the Saxon XSLT engine or to wire XQuery 3.1 / XSD 1.1 engines (not bundled), use
the Action overload — the DI counterpart of
IEngineRouter.RegisterSaxonEngines:
services.AddAltovaGen(options =>
{
options.SaxonXslt = mySaxonXsltEngine; // null ⇒ bundled SaxonCS-HE
options.SaxonXQuery = myXQuery31Engine; // null ⇒ BCL XPath subset
options.SaxonValidation = myXsd11Engine; // null ⇒ XSD 1.1 throws
});
Registered services:
| Lifetime | Services |
|---|---|
| Singleton (stateless) | IEngineRouter → EngineRouter, BclXsltEngine, BclXQueryEngine, BclValidatorEngine, SaxonXsltEngine |
| Transient (per-operation state) | IApplication, IXSLT1, IXSLT2, IXQuery, IXMLValidator |
Installation
dotnet add package AltovaGen
Requirements
- .NET 8.0 or later
- AnyCPU / platform-agnostic (no x86 dependency)
The original 32-bit Altova.AltovaXML.dll and any Altova installation are not
required — neither at build time nor at runtime. AltovaGen has zero COM
dependencies and never loads that assembly.
Building and testing
dotnet build AltovaGen.slnx -c Release
dotnet test AltovaGen.slnx -c Release
License
MIT License — see LICENSE. The bundled SaxonCS-HE engine is Saxonica's Home Edition and is distributed under its own open-source license (MPL-2.0); it is consumed as a NuGet dependency and is not redistributed inside this package, and it requires no license key. Review Saxonica's terms for your distribution model.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- AngleSharp (>= 1.8.3)
- SaxonCS-HE (>= 13.0.0)
- System.Security.Cryptography.Xml (>= 10.0.12)
-
net8.0
- AngleSharp (>= 1.8.3)
- SaxonCS-HE (>= 13.0.0)
- System.Security.Cryptography.Xml (>= 10.0.12)
-
net9.0
- AngleSharp (>= 1.8.3)
- SaxonCS-HE (>= 13.0.0)
- System.Security.Cryptography.Xml (>= 10.0.12)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.