XProc Gradle plugin
Announcing a new Gradle plugin for XProc that supports both XML Calabash and MorganaXProc-III.
This is a bonus Markup Monday post because I’m one behind (the 20th of April blew past me without so much as a wave).
I’ve written a few Gradle plugins over the years: for the 1.x version of XML Calabash, for Saxon, for RELAX NG validation, for trang, and a few other things. They are all more-or-less janky depending on how well I understood Gradle and Groovy at the time. I’ve still got build scripts that use them.
I find writing Gradle plugins in Kotlin much easier and nicer, and I understand Gradle (a little) better. Against that backdrop, I wrote a plugin for XML Calabash version 3.x. Unsurprisingly, I discovered it was a lot easier and cleaner to string together XInclude plus validation plus transformation in an XProc pipeline than in a sequence of Gradle tasks.
But it always bothered me that this was an XML Calabash plugin and not an XProc plugin. With some help, (thank you, Achim!), I’ve updated the plugin so that you can choose either processor. You can even switch between them with ease.
The new plugin is the XProc gradle plugin and it’s ready to use today. (Okay, today, you have to install it from a non-standard location, but I’ve started the process for getting it published as an official Gradle plugin; I’m in the “human will review your request” stage at the moment, but I think I’ve crossed all the t’s and dotted all the i’s correctly.)
I’m quite pleased with the result.
So pleased, in fact, that I updated the DocBook xslTNG plugin with examples showing how you can use either XProc processor to transform DocBook documents with full support for the catalogs and extension functions.
Share and enjoy.