Chapter 68: XSLT On the Server

1. Why XSLT is still used on the server in 2025–2026 (honest answer)

Even though many new projects use JSON + JavaScript templates, XSLT remains very important on servers in specific domains:

Domain / Use case Typical volume / importance in 2025–2026 Main reasons XSLT is chosen over JSON templates
Mandatory e-Invoicing (GST, PEPPOL, Factur-X, ZUGFeRD, XRechnung…) Extremely high – tens of millions of documents/month Legal requirement, schema validation, PDF generation, signed XML
Financial messaging (ISO 20022, SEPA, SWIFT, FIXML…) Very high in banks, payment gateways, treasury Strict message validation, canonicalization, multi-format output (XML, PDF, CSV)
Healthcare (HL7 CDA, FHIR XML export, discharge letters) High Structured clinical documents, PDF export, audit trail
Publishing / technical documentation (DocBook, DITA, S1000D) Medium–High Multi-channel publishing (HTML, PDF, mobile, print), reuse of content
Legacy enterprise integration High Many ERP → partner → ERP flows still use XML + XSLT
Batch report generation Medium Large XML → styled PDF / HTML / Excel reports
Configuration transformation Medium XML config → documentation, UI preview, migration scripts

Bottom line (2025–2026 reality)

  • New web APIs → almost always JSON + React/Vue/Angular
  • Server-side enterprise / regulated / B2B / document-heavy domains → XSLT is still very much alive (and often mandatory)

2. Most common server-side XSLT scenarios in practice

# Scenario Typical input Typical output Common processors (2025) Typical language/framework
1 e-Invoice → human-readable + PDF UBL/GST XML HTML + PDF (via XSL-FO) Saxon, Xalan, libxslt Java (Spring), .NET, Node.js
2 ISO 20022 payment message → report pacs.008, camt.053 XML HTML + CSV + PDF Saxon (Java), Saxon-JS (Node) Java, .NET, Python
3 Large batch XML → styled reports 10,000+ invoices XML HTML/PDF per document Saxon-EE (streaming) Java Batch, Spring Batch
4 DocBook/DITA → multi-channel publishing Technical manual XML HTML5, PDF, EPUB Saxon, Antenna House, XEP Java, Node.js
5 SOAP response → preview / logging SOAP envelope XML HTML preview Saxon, Xalan Java EE, Spring WS

3. Most popular XSLT processors on the server (2025–2026)

Processor Language / Platform XSLT version Streaming / High volume Saxon-JS (browser) compatible Still actively maintained? Typical users
Saxon Java, .NET, Node.js 1.0, 2.0, 3.1 Yes (Saxon-EE) Yes (Saxon-JS) Very active Enterprise, banks, governments
libxslt C, Python, PHP, Ruby 1.0 only Yes No Active PHP, Python, legacy systems
Xalan Java 1.0 Limited No Low activity Old Java systems
Apache FOP Java XSL-FO 1.1 Yes No Active PDF generation from XSL-FO
Saxon-JS Node.js / Browser 3.0 Limited Yes Active Modern Node.js + browser

Most common choice in 2025–2026

  • Java worldSaxon-HE / Saxon-EE
  • Node.js worldSaxon-JS or xslt3 (libxslt)
  • PHPlibxslt / XSLTProcessor
  • .NETSystem.Xml.Xsl or Saxon.NET

4. Realistic server-side example 1 – Java + Spring Boot + Saxon

Goal: Receive GST e-invoice XML → transform to nice HTML + PDF

pom.xml (dependencies)

XML

Controller

Java

invoice-to-html.xsl (simplified real-world fragment)

XML

Summary – XSLT on the server in 2025–2026 – Quick Reference

Scenario Most common processor Language / Framework Output formats Typical volume
GST e-Invoice → HTML + PDF Saxon-EE Java (Spring Boot) HTML, PDF Millions/month
ISO 20022 → report / PDF Saxon Java, .NET HTML, PDF, CSV High
DocBook/DITA → multi-channel Saxon, Antenna House Java HTML5, PDF, EPUB Medium–High
Batch XML → styled reports Saxon-EE (streaming) Java Batch, Spring Batch PDF, HTML Large files
Legacy SOAP → preview Saxon, libxslt Java EE, Node.js, PHP HTML Medium

Would you like to continue with one of these next?

  • Identity transform + small modifications (very common pattern)
  • Passing parameters from Java/Node/PHP to XSLT
  • Error handling & validation during transformation
  • Streaming transformation (Saxon-EE) for very large files
  • XSLT 3.0 features on server (group-by, JSON output, higher-order functions)
  • Real-world example — GST e-invoice → beautiful HTML + PDF

Just tell me which direction feels most useful or interesting for you right now! 😊

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *