Sunday, I translated Chapter 12 of a book on ABAP programming under SAP, forthcoming in the English edition from SAP Press in March. This was actually the third chapter I'd done in this book, and the others were a little far afield from what I usually do, since I don't actually do SAP work (except from a translation standpoint.)
But this chapter was fascinating, involving the external interactions of the SAP system with other systems. One of the supporting technologies of those interactions is SOAP, which brings up XML, which in turn brings up something I have never particularly paid much attention to: XSLT.
Wow. I didn't know what I was missing! XSLT is essentially a template-based programming language, used to transform XML structures into other XML structures; the idea is to support the expression of data-centric XML into more presentation-centric XML, but the mechanism is suitably generic.
And you know what? There's no open-source XSLT processor written in C. And this is odd, because even though the XSLT spec, like everything produced by the W3C, is horribly opaque, really, when you get down to it, XSLT is a pretty straightforward little language, and the parser is a no-brainer because it is already expressed in XML. So half the hard work in writing a compiler is already done for you, right there.
So here is my latest exciting brainstorm: I want to set up a test-based environment to support the development of an XSLT processor in C. Each test would consist of a starting structure, the template or templates to run on it, and the expected result -- that's easily imagined. And each test also refers to the exact point in the W3C spec that requires it (and vice versa -- I'd have an annotated spec that refers back to the tests.)
The whole thing would then function as an "XSLT by examples" tutorial and also a testbed for a command-line XSLT processor. Wouldn't that be a nice thing for the world to have?
I'm all for starting tomorrow.
Update: Whoops, I guess mod_xslt2 for Apache is in C, looks like. Well, never mind, I still think it's a bang-up idea. We'll see what the New Year brings, eh?