PhoenixmlDb.Xslt
1.6.9
dotnet add package PhoenixmlDb.Xslt --version 1.6.9
NuGet\Install-Package PhoenixmlDb.Xslt -Version 1.6.9
<PackageReference Include="PhoenixmlDb.Xslt" Version="1.6.9" />
<PackageVersion Include="PhoenixmlDb.Xslt" Version="1.6.9" />
<PackageReference Include="PhoenixmlDb.Xslt" />
paket add PhoenixmlDb.Xslt --version 1.6.9
#r "nuget: PhoenixmlDb.Xslt, 1.6.9"
#:package PhoenixmlDb.Xslt@1.6.9
#addin nuget:?package=PhoenixmlDb.Xslt&version=1.6.9
#tool nuget:?package=PhoenixmlDb.Xslt&version=1.6.9
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 (>= 1.6.7)
- PhoenixmlDb.XQuery (>= 1.6.8)
-
net8.0
- PhoenixmlDb.Core (>= 1.6.7)
- PhoenixmlDb.XQuery (>= 1.6.8)
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 |
|---|---|---|
| 1.6.9 | 0 | 8/26/2026 |
| 1.6.8 | 30 | 8/26/2026 |
| 1.6.7 | 54 | 8/24/2026 |
| 1.6.6 | 61 | 8/23/2026 |
| 1.6.5 | 82 | 8/22/2026 |
| 1.6.4 | 117 | 8/16/2026 |
| 1.6.3 | 88 | 8/14/2026 |
| 1.6.2 | 86 | 8/13/2026 |
| 1.6.1 | 106 | 8/4/2026 |
| 1.6.0 | 108 | 7/31/2026 |
| 1.5.0 | 127 | 7/27/2026 |
| 1.4.25 | 106 | 7/17/2026 |
| 1.4.24 | 88 | 7/14/2026 |
| 1.4.23 | 131 | 7/12/2026 |
| 1.4.22 | 107 | 7/10/2026 |
| 1.4.21 | 111 | 7/9/2026 |
| 1.4.20 | 103 | 7/9/2026 |
| 1.4.19 | 100 | 7/9/2026 |
| 1.4.18 | 101 | 7/8/2026 |
| 1.4.17 | 104 | 7/7/2026 |
One engine fix from Martin Honnen's testing, and the error-reporting problems his transcript
exposed alongside it.
### `document-node(element(x:report))` matched nothing
Reported by Martin Honnen: an XSpec report stylesheet fell through to the built-in rule and
died with XTDE0555.
A pattern's name test has its namespace URI resolved to an internal namespace ID by a pass
over the pattern steps. That pass only looked at the step's node test when it *is* a name test
— but a name test also lives one level INSIDE a kind test: `element(x:report)` keeps it in the
kind test's name, `document-node(element(x:report))` in its document-element test. Those kept
their URI with the resolved ID still null, and the matcher ends on
// This shouldn't happen if namespace resolution is working correctly
return false;
which is why the template silently matched nothing rather than erroring. So the same name
behaved differently one nesting level apart: `match="x:report"` matched and
`match="element(x:report)"` did not. Martin's report surfaced the `element()` form too, which
nobody had hit.
Verified with negatives as well as positives — wrong namespace, wrong local name, and
unprefixed-means-no-namespace all still correctly reject, because a fix that resolved nothing
and matched everything would pass the positive tests alone.
### The tool reported the error, then crash-dumped over it
Martin's paste showed the shape of it:
Error: XTDE0555: No matching template found for node in mode with on-no-match='fail'
Unhandled exception. System.InvalidOperationException: XTDE0555: No matching template …
[11 stack frames]
exiting 134. The CLI's top-level handler printed a clean error line and then rethrew, so .NET
appended its unhandled-exception report. Every other handler there returns 2, and the XQuery
one says why: "so users don't see a raw .NET stack trace for a spec-defined error".
The rethrow was satisfying an analyzer rule that requires a catch-all to rethrow — wrong for a
command-line tool, where reporting and returning a non-zero exit IS the handling.
now: XSLT error: XTDE0555: No matching template found … exit 2
### Every W3C error code is an XsltException
Twelve sites threw spec-defined errors as bare `InvalidOperationException` — XTDE0555,
XPDY0002, XTDE0980, XTTE1000, XTDE0030, XTTE0990, XTTE0510 — carrying no error code, no
stylesheet location, missing the CLI's XSLT handler, and invisible to the accumulator's
deferred-error handling, which keys off the type. All now carry both.
Xslt.Tests 1301 passed, 0 failed, 1 skipped (1289 at 1.6.8)
XSLT conformance 10232/10630 = 96.26%, unchanged
XSpec: the XTDE0555 bucket cleared (5 suites -> 0); those suites now progress further