xslt 1.7.0

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global xslt --version 1.7.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local xslt --version 1.7.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=xslt&version=1.7.0
                    
nuke :add-package xslt --version 1.7.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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
2.0.0 46 9/15/2026
1.8.0 51 9/14/2026
1.7.0 59 9/11/2026
1.6.15 64 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 72 8/29/2026
1.6.10 79 8/27/2026
1.6.9 249 8/26/2026
1.6.8 71 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
Loading failed

Takes PhoenixmlDb.XQuery 1.7.0 and PhoenixmlDb.Core 1.7.0.

### Fixed — xsl:try

Three independent causes that happened to land in one test set:

- **`$err:module` and `$err:line-number` were empty for runtime-raised errors.** A catch block
 interrogating the error variables saw blanks.
- **`xsl:try` ran its body in the CALLER's scope.** A variable declared inside the body wrote
 into the same scope as an identically-named outer binding and clobbered it, so `xsl:catch`
 read the body's value rather than the outer one.
- **A global variable's error was catchable.** Globals are evaluated outside any `xsl:try`, so
 the error must stay uncatchable however late the deferred rethrow lands.

### Fixed — other

- **`xsl:analyze-string` discarded `flags="s"`.** The flag was parsed and mapped correctly, then
 thrown away by a pattern rewrite that baked `[^\r\n]` into the regex, leaving
 `RegexOptions.Singleline` nothing to act on.
- **A copied element's text was pulled out of it during serialization**, so it came back
 correctly named, correctly counted, and empty. Reached further than expected: five sets gained.
- **A parentless constructed comment reported the stylesheet's base URI** where XDM requires the
 empty sequence.

### Conformance — 10,082/10,630 (94.8%)

Measured 2026-09-10 against `w3c/xslt30-test` @ `fddf1cf`, in a **Release** build.

**This is higher than the 94.4% published on 2026-09-05 and the engine did not improve that
much.** The previous figure came from a Debug build, which lost 38 cases across 21 sets purely to
the harness's 10s per-case timeout — 43 timeouts against Release's 5. Release is what ships, so a
figure from a Debug build was not a claim about the product. `scripts/conformance.sh` now defaults
to Release. See `BUGS.md` #43.

### Release discipline

`publish` is now gated on the test job. Until today this repository could push a tagged release
to nuget.org with a red suite.

16 versions shipped in the 1.6.x line, several carrying defects found only later. See
`docs/RELEASE-HYGIENE.md` for the unlisting plan and the controls that should stop a repeat.

### Known, not fixed

- `map:put`/`map:remove` are O(n) copies, making incremental map building quadratic —
 phoenixmldb-xquery#6. Present in 1.6.x too.
- No current XQuery/QT3 conformance figure is published. The harness now runs per-set, but its
 results depend on execution order (shared fixture state), so no honest number exists yet —
 `BUGS.md` #44.