xslt 1.8.0
See the version list below for details.
dotnet tool install --global xslt --version 1.8.0
dotnet new tool-manifest
dotnet tool install --local xslt --version 1.8.0
#tool dotnet:?package=xslt&version=1.8.0
nuke :add-package xslt --version 1.8.0
xslt
Command-line XSLT 3.0/4.0 processor for .NET. Transform XML documents from the terminal using the PhoenixmlDb XSLT engine.
Installation
dotnet tool install -g xslt
Usage
# Transform XML with a stylesheet
xslt stylesheet.xsl input.xml
# Write output to a file
xslt -o result.html report.xsl data.xml
# Start from a named template (no source needed)
xslt -it main generate.xsl
# Pass parameters
xslt -p year=2026 -p title="Report" style.xsl data.xml
# Read source from stdin
cat data.xml | xslt transform.xsl
# Show timing breakdown
xslt --timing style.xsl large-input.xml
# Validate a stylesheet without running
xslt --dry-run style.xsl
# Stream large files (lower memory)
xslt --stream style.xsl large-input.xml
Features
- XSLT 3.0/4.0 — packages, streaming, maps/arrays, higher-order functions, JSON output
- Multiple output methods — XML, HTML, XHTML, text, JSON, adaptive
- Streaming — process large files without loading into memory
- xsl:result-document — generate multiple output files in one transform
- Parameters — pass values from the command line
- Timing — built-in performance profiling
- Tracing — log template matching, function calls, and built-in rules
Documentation
Full documentation at phoenixml.dev
License
Apache-2.0
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.0 | 47 | 9/15/2026 |
| 1.8.0 | 51 | 9/14/2026 |
| 1.7.0 | 59 | 9/11/2026 |
| 1.6.15 | 66 | 9/9/2026 |
| 1.6.14 | 76 | 9/7/2026 |
| 1.6.13 | 86 | 9/2/2026 |
| 1.6.12 | 84 | 8/30/2026 |
| 1.6.11 | 73 | 8/29/2026 |
| 1.6.10 | 79 | 8/27/2026 |
| 1.6.9 | 249 | 8/26/2026 |
| 1.6.8 | 72 | 8/26/2026 |
| 1.6.7 | 82 | 8/24/2026 |
| 1.6.6 | 86 | 8/23/2026 |
| 1.6.5 | 74 | 8/22/2026 |
| 1.6.4 | 103 | 8/16/2026 |
| 1.6.3 | 82 | 8/14/2026 |
| 1.6.2 | 77 | 8/13/2026 |
| 1.6.1 | 84 | 8/4/2026 |
| 1.6.0 | 82 | 7/31/2026 |
| 1.5.0 | 87 | 7/27/2026 |
Minor rather than patch: two behaviour changes, both spec-correct, both able to change what an
existing stylesheet does. **Read the first section before upgrading.**
Takes **PhoenixmlDb.XQuery 1.8.0** and PhoenixmlDb.Core 1.7.0.
### Behaviour changes — read this before upgrading
**1. `streamable="true"` and `streamable="1"` are now honoured.**
XSLT 3.0 types `@streamable` as a boolean, but previous releases compared it against the literal
string `"yes"`. Any other spelling — including `true`, `1`, and `yes` with surrounding whitespace —
was silently treated as not streamable, and such stylesheets ran unstreamed.
**If you use one of these spellings, this release changes how your stylesheet executes.** It will
now genuinely stream, which is faster and uses less memory, but streaming support has known gaps
that unstreamed execution does not: some constructs produce different output rather than raising
an error. If you see unexpected results after upgrading, setting the mode or source-document to
`streamable="no"` restores the previous behaviour, and we would like to hear about the case.
Of the nineteen conformance cases this change exposed, **eleven are already fixed in this same
release** — the change and most of its fallout ship together.
**2. Built-in functions now enforce declared argument cardinality** (from PhoenixmlDb.XQuery
1.8.0). `substring('abc', ())` now raises `XPTY0004` rather than returning `""`. This applies to
every built-in; see that package's notes.
### Silent wrong answers — fixed
Each of these produced a well-formed, plausible result with no error.
- **A streaming aggregate answered from nothing.** Under a streamable mode, a `match="/"` template
aggregating over the stream computed from no input at all: `count(//PRICE)` gave `0`,
`sum(//PRICE)` gave empty, whatever the document held. This is the default CLI path —
`--no-stream` gave the same wrong answers.
- **`xsl:function cache="yes"` returned other calls' results.** The memo key was a string
concatenation, so `f((1,2))` and `f((3,4))` shared an entry, as did `f('1')` and `f(1)`. Present
in every release since 1.1.0.
- **Accumulators read a later-declared accumulator one node late.** End-phase rules ran in
declaration order, so reading another accumulator's after-value at the same node returned the
*previous* node's value. Declaration order decided correctness. Also present since 1.1.0. A
two-accumulator cycle now correctly raises `XTDE3400` instead of resolving to stale data.
- **`xsl:function` declared `as="item()*"` silently lost element nodes.** Writing the type
explicitly — the careful habit — selected the broken path; omitting `as` worked.
- **`xsl:merge` silently merged one of two sources.** A relative `for-each-source` URI resolved
against the wrong base, and an unretrievable source was skipped without an error. Now
`FODC0002`.
- **`xsl:text` moved to the end of any untyped variable.**
- **Streamed shallow-copy produced malformed XML** — siblings nested inside one another, with the
outer element left unclosed.
- **`fn:serialize` emitted `xmlns:p=""`**, so its output did not reparse.
### Added
- **`xsl:mode warning-on-no-match` now warns.** It was parsed, validated, and discarded. The
built-in template rule is silent by design, so a node no template matched yields text where
markup was expected with no indication — this is the mechanism for catching that.
### Also fixed
- `xsl:merge` key comparison uses the key's collation rather than codepoint order.
- `xsl:merge` rejects a streamable source that crawls or sorts; duration keys compare by length.
- A schema importing the XML namespace without a location now loads — previously
`xsl:import-schema` failed outright and the stylesheet would not load at all.
- Abstract component invocation raises `XTDE3052` rather than "not found".
- Numerous error codes corrected: `XTSE3430`, `XTDE3362`, `XTDE3160`, `XTTE3210`, `XTSE3155`,
`XTSE3080`, `SESU0013`, `XTSE0010`, `XTSE0730`, `XTDE1162`, `XTSE2210`, `XTDE3510`.
- Streaming: ancestors are linked on the striding path, `position()` counts per parent, a
suppressed subtree no longer closes its ancestor early, and a matched element's children are
delivered rather than dropped.
- CLI: an `xsl:result-document` `href` that is already a URI is written to the right path.
### Conformance
**W3C XSLT 3.0: 10,292/10,630 (96.82%)** — a full-corpus run at the exact commit tagged for this
release, 2026-09-13, against `xslt30-test` @ `fddf1cf` in a Release build.
W3C QT3 **29,534/31,414 (94.02%)**, measured 2026-09-11 against `qt3tests` @ `201a6e4` from the
committed per-set baseline. That figure predates this release's XQuery bump and is a floor.
The engine pin moved from `PhoenixmlDb.XQuery` 1.7.0 to 1.8.0 in this release, and that bump was
measured as its own change: **full corpus at both commits, no per-set differences.** The
built-in cardinality change reaches nothing the XSLT corpus exercises.