XSLT transformer

Apply a stylesheet to an XML document and see what it makes: the result with a preview of HTML, the files xsl:result-document writes and what xsl:message says. XSLT 3.0 runs as written, and so do 1.0 and 2.0 stylesheets. Everything runs in your browser

XML

XSLT

One name = value per line, passed as strings

Result

How to run a transformation

  1. Paste or open the XML and the stylesheet. The example turns a UBL invoice into an HTML page and a CSV file.
  2. Add parameters if the stylesheet takes any: one name = value per line, passed to its xsl:param as strings.
  3. Press Transform (or Ctrl+Enter in an editor). The result opens below; HTML gets a Preview, and each file from xsl:result-document a tab of its own.

XSLT 3.0, 2.0 and 1.0

Stylesheets are compiled and run by SaxonJS 2.7, Saxonica's XSLT 3.0 processor for JavaScript, in a background worker. What XSLT 3.0 adds works: text value templates (expand-text), xsl:iterate, xsl:for-each-group, maps and arrays, functions as values and the whole of XPath 3.1. A 1.0 stylesheet runs in backwards-compatible mode, as the XSLT 3.0 specification provides.

Not available: schema-aware processing (xsl:import-schema) and streaming, which need Saxon-EE, and other local files: xsl:include, xsl:import and document() can't reach files on your disk, so put the modules into one stylesheet to try them here.

Messages, errors and result documents

  • xsl:message lines appear above the result, in order. With terminate="yes" the run stops with its text.
  • Errors show their code and message: static errors (XTSE0010, XPST0003) with the line in the stylesheet, dynamic ones (FORG0001, XPTY0004) as they happen. A stylesheet that runs forever can be stopped.
  • Result documents written by xsl:result-document href="…" get a tab each and download under their own name.
  • HTML results can be previewed. The preview runs without scripts and without access to this page.

Questions

Is my XML uploaded?

No. The stylesheet is compiled and run by SaxonJS in your browser; neither file leaves your machine.

Which XSLT version is supported?

XSLT 3.0 with XPath 3.1, through SaxonJS 2.7. XSLT 1.0 and 2.0 stylesheets run too.

Can I use xsl:include or xsl:import?

Not of local files: only the pasted stylesheet is available. Merge the modules into one stylesheet to try it here.

Is it the same as Saxon on a server?

SaxonJS implements the same XSLT 3.0 specification as Saxon-HE for Java. Schema-aware processing and streaming, which need Saxon-EE, are not available.

Other tools

  • XML formatter: Pretty-print or minify XML, keeping text, CDATA and comments as written.
  • XML viewer: Read a document as a tree you can fold, search and copy XPaths from.
  • XPath tester: Evaluate XPath 3.1 against a document and see each match with its line.
  • XSD generator: Infer an XML Schema from sample documents, checked against them.
  • XML from XSD: Generate a sample XML document from a schema, validated against it.
  • XML diff: Compare two XML documents as trees: changed, added and removed elements, attributes and text.
  • XML to JSON converter: Convert XML to JSON, with arrays where an element repeats or wherever its XSD allows.
  • JSON to XML converter: Convert JSON to XML: @keys become attributes, arrays repeated elements.
  • XML to CSV converter: Turn a repeating element into CSV rows: invoice lines, products, records.
  • XML to PDF converter: Save any XML as a PDF to read, print or attach: indented, coloured, with line numbers.
  • E-invoice viewer: Read an XRechnung, ZUGFeRD, Factur-X or Peppol invoice as a document, and save it as a PDF.
  • E-invoice converter: Write an XRechnung, Peppol BIS, ZUGFeRD or Factur-X invoice in another of these formats, checked before you save it.
  • ZUGFeRD validator: Check a ZUGFeRD or Factur-X PDF: the XML inside against its profile's rules, and the PDF around it.
  • XRechnung validator: Check an XRechnung in UBL or CII against EN 16931 and KoSIT's XRechnung rules before you send it.
  • UBL validator: Check a UBL invoice, order or any other UBL 2.1 document against its OASIS schema, and the business rules of the profile it names.
  • Peppol validator: Check a Peppol BIS Billing 3.0 or PINT invoice against the OpenPeppol rules before your access point sends it.
  • P7M viewer: open a .p7m file: Open a signed .p7m file: the PDF, invoice or document inside it, and who signed it.
  • XRechnung examples to download: Example XRechnung and ZUGFeRD invoices to download, one for each common case.
  • E-invoicing mandate in Germany: do I have to?: Find out whether your invoices in Germany must be e-invoices in 2026, 2027 and from 2028.
  • Factur-X examples: Example Factur-X invoices of every profile and of the French reform, as XML and as PDF.
  • Leitweg-ID check: Check the form and the check digits of a Leitweg-ID, the address of a German public buyer.
  • Peppol lookup: Check whether a company is registered in Peppol, under which ID, and which invoices it can receive.
  • PDF to XRechnung: Turn a PDF, scan or photo of an invoice into an XRechnung or ZUGFeRD e-invoice: AI fills the form, the rules check it.
  • PDF to ZUGFeRD: Turn your own PDF invoice into ZUGFeRD: the XML goes inside your PDF, its pages as they are, checked against EN 16931 first.
  • Self-billed invoices and credit notes: Write a self-billed invoice (a German Gutschrift, type 389) or a credit note as XRechnung or ZUGFeRD, checked before you download it.
  • Receive e-invoices for free: An email address of your own for e-invoices: forward an XRechnung or ZUGFeRD invoice and get it back as a PDF to read, checked against its rules.
  • XML validator: check a document against XSD, DTD, RelaxNG or Schematron, up to 1 GB.