XProc

The graphic of a light blue fish with white fish bones
The XProc 3.0 logo

XProc is an XML-based declarative programming language for processing data. It is based on the concept of pipelines that perform various actions such as reading and writing data, web requests or transformations and checks. XProc focuses mainly on XML, but can also process HTML, JSON, text and binary data.

XProc 1.0 was published as a web standard in 2010, but the adoption of XProc was limited. The cumbersome syntax of the first version, few learning materials and poor debugging messages from the XProc processors made the learning curve very steep for beginners.

In addition, many programmers used traditional scripting and programming languages that acted as glue code between the individual XML processing steps. Most of them provide only poor support for XML. Often the code is not declarative, depends on installed tools and lacks reusability and interoperability.

In contrast to these approaches, XProc offers many advantages: XProc can natively process XML and use the XPath query language to directly access specific branches in the XML tree and manipulate XML nodes. For many XML technologies such as XSLT, Schematron and RelaxNG, XProc offers ready-made steps in its extensive step library.

The schematic representation of an XProc pipeline shows how the XProc step p:validate-with-schematron receives an XML and a Schematron file as input and generates an SVRL report as output. The next step is the XProc step p:xslt, which generates an HTML file from the XML and the SVRL report, thus completing the pipeline.
The XProc pipeline validates the XML with Schematron and creates an HTML validation report from the Schematron messages and the XML via XSLT

XProc allows a high level of abstraction to keep even complex pipelines manageable. For example, you can import a pipeline back into another pipeline as a step, thus encapsulating functionality. Modern XProc processors also enable more efficient processing of pipelines through parallel execution of code and caching.

Version 3.0 of XProc has been available since 2022 and introduces numerous new programming concepts that make the language both more beginner-friendly and more powerful. XProc can therefore be considered a kind of Swiss army knife for many XML applications.