PhoenixmlDb.Xslt
1.6.13
See the version list below for details.
dotnet add package PhoenixmlDb.Xslt --version 1.6.13
NuGet\Install-Package PhoenixmlDb.Xslt -Version 1.6.13
<PackageReference Include="PhoenixmlDb.Xslt" Version="1.6.13" />
<PackageVersion Include="PhoenixmlDb.Xslt" Version="1.6.13" />
<PackageReference Include="PhoenixmlDb.Xslt" />
paket add PhoenixmlDb.Xslt --version 1.6.13
#r "nuget: PhoenixmlDb.Xslt, 1.6.13"
#:package PhoenixmlDb.Xslt@1.6.13
#addin nuget:?package=PhoenixmlDb.Xslt&version=1.6.13
#tool nuget:?package=PhoenixmlDb.Xslt&version=1.6.13
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.12)
-
net8.0
- PhoenixmlDb.Core (>= 1.6.7)
- PhoenixmlDb.XQuery (>= 1.6.12)
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.1.0 | 52 | 9/17/2026 |
| 2.0.0 | 120 | 9/15/2026 |
| 1.8.0 | 200 | 9/14/2026 |
| 1.7.0 | 97 | 9/11/2026 |
| 1.6.15 | 170 | 9/9/2026 |
| 1.6.14 | 120 | 9/7/2026 |
| 1.6.13 | 160 | 9/2/2026 |
| 1.6.12 | 123 | 8/30/2026 |
| 1.6.11 | 108 | 8/29/2026 |
| 1.6.10 | 176 | 8/27/2026 |
| 1.6.9 | 105 | 8/26/2026 |
| 1.6.8 | 103 | 8/26/2026 |
| 1.6.7 | 108 | 8/24/2026 |
| 1.6.6 | 113 | 8/23/2026 |
| 1.6.5 | 131 | 8/22/2026 |
| 1.6.4 | 133 | 8/16/2026 |
| 1.6.3 | 104 | 8/14/2026 |
| 1.6.2 | 104 | 8/13/2026 |
| 1.6.1 | 125 | 8/4/2026 |
| 1.6.0 | 123 | 7/31/2026 |
Eleven fixes found by running XSpec's 284-suite corpus against the engine. On that corpus:
102 suites ran to completion before, 129 now; 505 assertions passed before, 1077 now. No suite
lost ground at any measured step.
### fn:transform dropped parameters, and mis-identified namespaced names
`template-params` and `tunnel-params` never reached an initial MODE: `TransformAsync` passed its
with-param list and `TransformRawAsync` passed an empty one at all three of its call sites.
XSpec compiles a scenario-level `x:param` under `x:context/@mode` into `template-params`, so
whole suites ran with their parameters missing and terminated on the first assertion that read
one.
Separately, every name in an `fn:transform` option map arrives from `fn:QName()` at runtime,
carrying an interned id the parser never assigned. Namespaced names missed every lookup - and a
namespaced `initial-mode` collapsed to no namespace and ran a DIFFERENT mode that happened to
share a local name.
`initial-match-selection` was also round-tripped through an XPath string, so a sequence became
the CLR text `System.Object[]`. No expression can denote an arbitrary existing node, so that
conversion could never work; the value is carried now.
### xsl:attribute with a body escaped its content twice
The body form runs its content into the ordinary output buffer, which escapes for element
content, and the finished value was escaped again. `&` came back as `&amp;`. The select and
AVT forms were always correct, so the divergence was between forms.
Nothing errors - the attribute is well-formed, just wrong - so it only surfaces when something
reads the value back. XSpec's compiler builds a `select` attribute this way around an XPath
containing `=>`, and the generated stylesheet then failed to parse. Worth 148 assertions.
### A forward-declared global with a NAMESPACED name was evaluated too early
Dependencies were collected by testing a variable reference for membership in the set of
declared names. The reference comes from the XPath parser and the declaration from the
stylesheet parser, and their interned ids can differ - so for a namespaced name the lookup
missed and the dependency was never recorded.
Nothing errored. The topological sort simply did not order the pair, and a global declared
before the ones it selects from read unbound values. It surfaced far from the cause as node
kinds collapsing: `comment()` and `element()` came back as documents, `attribute()` as an empty
string, `namespace-node()` as text.
### Other correctness fixes
- Supplied parameters overwrote global `xsl:variable`s. XSLT 3.0 §9.5: a value supplied for a
name declared as a variable is not a parameter and must have no effect.
- The internal text marker leaked into template matching, type coercion and node-typed
variables - three places that reasonably assume a real node.
- A global `as="text()"` variable took an id from the node store without registering it.
- Union-pattern siblings forked their group identity, so two branches of ONE rule stopped
recognising each other and matching both raised XTDE0540 (spec bug 30402).
- `as="processing-instruction(name)"` bound a document; the named spelling had no branch and
fell to a silent `item()` default.
- `SetInitialTemplate` mis-parsed an EQName, splitting `Q{http://x}main` at the URI's colon.
### Errors that named the code and not the problem
XTDE0555, XTTE0570, XTDE0540 and XPDY0002 reported the error code and the expected type - the
two things the author already knows - and not the actual node, mode, value or conflicting rules.
XTTE0570 was emitted from nine sites with identical text. A CLR type name was also reaching
users as `match="PhoenixmlDb.Xslt.Ast.DotPattern"`.
Three clusters were then solved in a single run each by reading the improved message.
Xslt.Tests 1416 passed, 0 failed