Serving XML: Pipelines and Filters 2005-04-11

Serving XML is a system for pipelining XML via SAX, passing the data through a series of SAX filters and/or XSL transformations.

Unfortunately for me it's Java (I read Java, and write a bit when I have to, but I still don't like it). However it's the concept that is interesting. SAX filters are pretty well established now, but what Serving XML brings to the table is a simple XML based language for describing the pipeline, that includes features such as various content sinks - want your XML serialized to a file on an FTP server? Use the ftpSink.

It also features filtering of which tags to select for further work, which is reminiscent of XSL, but with the flexibility of calling out to native language filters when/if you need to.

The syntax of the pipeline descriptions looks quite straightforward, and very useful. If I hadn't had my plate full of far too many things at the moment I'd be tempted to implement something similar for C++ and/or PHP.

I really love the entire idea of a transformation centric approach to layering presentation and functionality. For me, it started out with parsing mail messages for a webmail platform I designed - it seemed so obvious to layer the parsing: MIME parser at the bottom, then selectively including a quote printable or base64 decoded, then code to filter out harmful HTML, detect URL's in plain text, rewrite URL's, mark quoted text etc.

All of it got implemented as tiny( 20-30 lines in many cases) filter classes, and what could have been a big mess ended up fairly easy to understand.

I've been in love with filters ever since. Check out Serving XML.

blog comments powered by Disqus