Documentation overview

Guides for @tradik/xslt-processor, a pure JavaScript XSLT 1.0 processor that implements the W3C XSLTProcessor API for browsers and Node.js and ships an xslt command line tool. Installation and a quick start are in the project README.

GuideContents
API ReferenceXSLTProcessor methods, parameters, xsl:output serialization, module exports, XsltEngine options, TypeScript
Loadersxsl:import, xsl:include and the document() function; fetchOptions for cross-origin requests with credentials
Complete ExampleA product list transformed into an HTML table (browser and CLI)
Command Line Toolxslt options, base directory, includes, input encodings
ConformanceW3C compliance tables, supported elements and functions, known deviations, test coverage
Security LimitsXPath and XSLT limits, prototype pollution protection, input validation
Browser CompatibilityMinimum browser versions, native XSLT removal timeline, feature detection
XSLT 2.0 and 3.0@tradik/xslt3: one engine for XSLT 3.0 and 2.0 in a separate package; options, conformance and design
Migration checkernpx xslt-migrate-check .: finds XSLTProcessor usages, <?xml-stylesheet?> documents and stylesheets in a project, rates the Chrome risk and prints the one-line migration; --json and --fail-on for CI; online at xslt-processor.tradik.com/check
Migration fixesnpx xslt-migrate-check . --fix: the polyfill import, the script tags and the dependencies written as migration.patch for review (--write applies it); xslt-migrate-check/analyze runs the same analysis in a browser
Migration testxslt-migrate-test: runs every XML + XSL pair on the browser's engine (Chromium) or libxslt and on this library, compares the output and reports the compatibility
BenchmarksEvery version side by side (1.1.3, 1.2.0, 1.3.0, @tradik/xslt3) in one chart and table; then the detailed runs: 1.1.3 vs 1.2.0 speed-up, time and peak memory per scenario, with charts, tables and npm run bench to reproduce; XPath 1.0 of this package vs XPath 3.1 of @tradik/xslt3 (npm run bench -- --suite xpath); the XSLT 1.0 engine vs @tradik/xslt3 on the same stylesheets, idiomatic 2.0/3.0 rewrites and 3.0-only scenarios (npm run bench -- --suite xslt)
DevelopmentSetup, tests, Docker, Makefile, publishing to npm
Style GuideProject colors with WCAG 2.2 contrast ratios

Project files: CHANGELOG, SECURITY, CONTRIBUTORS, LICENSE.

This page is generated from docs/README.md in the repository. Corrections are welcome as a pull request to that file.

Built with ssg