PhoenixmlDb.Xslt
2.4.0
See the version list below for details.
dotnet add package PhoenixmlDb.Xslt --version 2.4.0
NuGet\Install-Package PhoenixmlDb.Xslt -Version 2.4.0
<PackageReference Include="PhoenixmlDb.Xslt" Version="2.4.0" />
<PackageVersion Include="PhoenixmlDb.Xslt" Version="2.4.0" />
<PackageReference Include="PhoenixmlDb.Xslt" />
paket add PhoenixmlDb.Xslt --version 2.4.0
#r "nuget: PhoenixmlDb.Xslt, 2.4.0"
#:package PhoenixmlDb.Xslt@2.4.0
#addin nuget:?package=PhoenixmlDb.Xslt&version=2.4.0
#tool nuget:?package=PhoenixmlDb.Xslt&version=2.4.0
PhoenixmlDb.Xslt
XSLT 4.0 transformation engine for PhoenixmlDb — transform XML documents into HTML, JSON, CSV, text, or other XML formats.
Features
- XSLT 3.0/4.0 — template matching, streaming, accumulators, packages, maps/arrays
- All output methods — HTML5, XML, XHTML, JSON, text, CSV, adaptive
- Multiple outputs —
xsl:result-documentfor multi-file generation - Full XPath 4.0 — 240+ built-in functions available in all expressions
- Packages — reusable stylesheet libraries with visibility control
Quick example
using PhoenixmlDb.Xslt;
var transformer = new XsltTransformer();
await transformer.LoadStylesheetAsync(
File.ReadAllText("style.xsl"),
new Uri(Path.GetFullPath("style.xsl")));
transformer.SetParameter("title", "My Report");
var html = await transformer.TransformAsync(
File.ReadAllText("data.xml"));
// Handle secondary outputs (xsl:result-document)
foreach (var (href, content) in transformer.SecondaryResultDocuments)
File.WriteAllText(Path.Combine(outputDir, href), content);
See the full API overview in the README.
Related packages
| Package | Description |
|---|---|
| PhoenixmlDb.Core | Core types and XDM data model (dependency) |
| PhoenixmlDb.XQuery | XQuery 4.0 query engine (dependency) |
| PhoenixmlDb.Xslt.Cli | xslt command-line tool |
Documentation
Full documentation at phoenixml.dev
License
Apache 2.0
| 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 was computed. 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
- PhoenixmlDb.Core (>= 2.0.0)
- PhoenixmlDb.XQuery (>= 2.4.0)
-
net8.0
- PhoenixmlDb.Core (>= 2.0.0)
- PhoenixmlDb.XQuery (>= 2.4.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 |
|---|---|---|
| 2.5.1 | 36 | 10/1/2026 |
| 2.4.1 | 325 | 9/28/2026 |
| 2.4.0 | 95 | 9/28/2026 |
| 2.2.0 | 116 | 9/25/2026 |
| 2.1.0 | 181 | 9/17/2026 |
| 2.0.0 | 166 | 9/15/2026 |
| 1.8.0 | 234 | 9/14/2026 |
| 1.7.0 | 126 | 9/11/2026 |
| 1.6.15 | 193 | 9/9/2026 |
| 1.6.14 | 134 | 9/7/2026 |
| 1.6.13 | 168 | 9/2/2026 |
| 1.6.12 | 128 | 8/30/2026 |
| 1.6.11 | 116 | 8/29/2026 |
| 1.6.10 | 181 | 8/27/2026 |
| 1.6.9 | 108 | 8/26/2026 |
| 1.6.8 | 109 | 8/26/2026 |
| 1.6.7 | 111 | 8/24/2026 |
| 1.6.6 | 118 | 8/23/2026 |
| 1.6.5 | 137 | 8/22/2026 |
| 1.6.4 | 137 | 8/16/2026 |
Takes **PhoenixmlDb.XQuery 2.4.0** and **PhoenixmlDb.Core 2.0.0**. There is no Xslt 2.3.0; the
engines went from 2.2.0 straight to 2.4.0 to keep the lockstep train together.
XQuery 2.4.0 brings deliberate behaviour changes that reach stylesheets too: `fn:namespace-uri`
returns `xs:anyURI`, and `fn:distinct-values` treats an `xs:anyURI` and an equal `xs:string` as
one value. See XQuery's own 2.4.0 notes. This release carries the matching fix: a stylesheet
function parameter declared `xs:string` now accepts an `xs:anyURI` by promotion (#188). Without
it, passing `namespace-uri()` to such a function failed.
### Fixed — streaming
- **A streamed `xsl:message` lost the items of an `xsl:for-each` in its content** (#175, #148).
- **Templates below an unmatched element did not fire, or could not read their own text** (#176).
- **A buffered matched subtree lost its ancestors** (#177).
- **`has-children()` always answered false** (#178).
- **`xsl:strip-space` was not applied to streamed input, and `xml:space` was ignored** (#183).
- **An element whose template builds its own complete result could close its parent's output
tag early**, whether written `<a></a>` or `<a/>` (#184, #181).
- **A streamed element's children were processed even when its template never asked for them**
(#185, #180).
- **`sx-gc-eq-801`**, the last open case of #96 (#186). That closes #96: the three streaming
sets that fell below their 1.6.10 scores are all back.
### Fixed — `fn:transform` (Martin Honnen, #173)
Two defects, one in each of the two `fn:transform` implementations:
- **From XSLT, `source-location` was never read**, so the transform ran against an empty
document. It is now honoured, `source-node` still takes precedence when both are given, and a
relative location resolves against the stylesheet's base URI.
- **From XQuery, `delivery-format='raw'` returned nothing** whenever the inner template
constructed nodes, with exit code 0. It now returns them.
### Fixed — CLI
**On Windows, `xslt` wrote stdout in the console's legacy code page** (#179, #182). No CLI set
`Console.OutputEncoding`. The visible symptom was `␦` in `--trace` output where `→` belongs. The
serious one was `xslt sheet.xsl in.xml > out.xml` writing code-page bytes under a UTF-8
declaration, which silently corrupted non-ASCII output. Output is now UTF-8 with no BOM. Our CI is
Linux-only and cannot reproduce this, so confirmation comes from Windows users.
### Conformance
**W3C XSLT 3.0: 10,397 / 10,839 (95.92%)**, up 13 from 2.2.0's 10,384 on the same denominator.
Measured with the XQuery source identical to the 2.4.0 library.
The per-set ratchet in `scripts/conformance-baseline.tsv` is raised to this measurement (+62
across 22 sets). It hadn't been raised since before 2.2.0, so most of that is earlier work that
was never recorded, not this release. The xqts rows were not re-measured and are unchanged.