PhoenixmlDb.Xslt 1.6.11

There is a newer version of this package available.
See the version list below for details.
dotnet add package PhoenixmlDb.Xslt --version 1.6.11
                    
NuGet\Install-Package PhoenixmlDb.Xslt -Version 1.6.11
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PhoenixmlDb.Xslt" Version="1.6.11" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PhoenixmlDb.Xslt" Version="1.6.11" />
                    
Directory.Packages.props
<PackageReference Include="PhoenixmlDb.Xslt" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PhoenixmlDb.Xslt --version 1.6.11
                    
#r "nuget: PhoenixmlDb.Xslt, 1.6.11"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PhoenixmlDb.Xslt@1.6.11
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PhoenixmlDb.Xslt&version=1.6.11
                    
Install as a Cake Addin
#tool nuget:?package=PhoenixmlDb.Xslt&version=1.6.11
                    
Install as a Cake Tool

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 outputsxsl:result-document for 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.

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.12 55 8/30/2026
1.6.11 46 8/29/2026
1.6.10 58 8/27/2026
1.6.9 66 8/26/2026
1.6.8 73 8/26/2026
1.6.7 87 8/24/2026
1.6.6 99 8/23/2026
1.6.5 117 8/22/2026
1.6.4 119 8/16/2026
1.6.3 89 8/14/2026
1.6.2 89 8/13/2026
1.6.1 110 8/4/2026
1.6.0 109 7/31/2026
1.5.0 129 7/27/2026
1.4.25 109 7/17/2026
1.4.24 92 7/14/2026
1.4.23 137 7/12/2026
1.4.22 107 7/10/2026
1.4.21 112 7/9/2026
1.4.20 103 7/9/2026
Loading failed

### `xsl:attribute` content leaked into the caller's sequence

Reported by Martin Honnen against XSpec's `format-xspec-report.xsl`:

   XTTE0505: Template 'scenario-html-class-attribute' return value does not match
             declared type Attribute: expected exactly one item, got 2

His objection was the right one — a template whose body is a single `xsl:attribute` cannot
express two items, so the second had to come from the engine. It did: the attribute's VALUE was
landing in the caller's result sequence while the attribute node itself was built empty.

`xsl:attribute` has two branches. The one taken when `separator` is present isolates the
enclosing sequence; the common no-separator branch did not — and `xsl:sequence` checks for an
active sequence accumulator *before* any attribute-content check. So

   <xsl:attribute name="class">
     <xsl:choose>…<xsl:sequence select="'failed'"/>…</xsl:choose>
   </xsl:attribute>

inside a typed template appended `"failed"` to the caller. Verified against his actual
stylesheet: it now emits complete HTML with the correct `class` values.

### Both CLIs report the engines they bundle

`xquery --version` read 1.6.9 while embedding `PhoenixmlDb.Xslt` **1.6.6**, so four releases of
XSLT fixes were unreachable from the command line and nothing on screen said so. Martin had to
infer it from a repro that kept failing against a version that supposedly contained the fix.

   xslt 1.6.11 (PhoenixmlDb XSLT 3.0/4.0)
     PhoenixmlDb.Xslt 1.6.11
     PhoenixmlDb.XQuery 1.6.10
     PhoenixmlDb.Core 1.6.7

A version identifies the package, not what it carries. Printing it surfaced live drift on the
first run, which this release also clears (the XQuery pin moves 1.6.9 → 1.6.10).

### Package locations without another vendor's file format

`fn:transform` could only learn package locations from a Saxon configuration document, which
made another implementation's format a de facto dependency for `xsl:use-package`. There is now
a native vocabulary:

   'vendor-options': map {
       QName('http://phoenixml.dev/ns/vendor-options', 'packages'): map {
           'http://example.org/lib.xsl' : 'lib/library.xsl',
           'http://example.org/other'   : map { 'location': 'o.xsl', 'version': '2.0' }
       }
   }

Saxon's vocabulary is still read so existing stylesheets keep working, but it is now one
recognised vocabulary rather than the only door. Options in other vocabularies are ignored
rather than claimed — the first cut matched a bare local name `configuration` in any namespace,
which would have seized a foreign vendor's option and could mask a real one.

### Typed template bodies no longer double-count their own text

Text written inside a stylesheet function went to both the sequence accumulator and the output
buffer, and the pass that recombines them assumed they were disjoint — so a template declared
`as="text()"` returned two items with identical content. Two XSpec suites went from erroring at
the Run stage to completing.

   Xslt.Tests 1315 passed, 0 failed, 1 skipped (1310 at 1.6.10)
   XSLT conformance 10237/10630 = 96.30%
   XSpec: 62 of 284 suites complete end to end