XSLT Support
By Adrian Sutton
I’ve been wanting to develop a “dashboard” style system to information from a bunch of different systems at work. Since we use an awful lot of XML around the place at work the easiest way to do that is most likely to use XSLT to transform the various XML feeds into HTML to be displayed and piece it all together into one page. Systems that don’t speak XML could have a gateway developed for them easily enough. Anyway, I figured I’d write a few simple perl scripts to piece the various XSTLs together and make it all work, hopefully develop something fairly pluggable so that it’s easy to add new feeds as required. So I went looking for XSLT processors for perl and wasn’t particularly impressed with anything I found. The XSLT I had been using and that worked with both XAlan and MSXML but barfed with XML::XSLT. The other XSLT libraries I found either failed to compile on OS X or failed to run once installed. Now admittedly that’s mostly going to be my lack of knowledge of C and perl but I was surprised there wasn’t a simple, standard XSLT processor. So then I tried PHP and while it has XSLT commands that looked promising, they weren’t compiled in to my copy of PHP. It appears to be off by default in PHP because it depends on a bunch of native libraries that may not be present on most systems. So in the end, I think I’ll write the system in Java simply because it’s actually good at handling XSLT. Why isn’t XSLT straight forward in other languages? It seems that they’re trying to leverage off existing C libraries to save having to write a complete XML parser and XSLT processor natively in the language. Unfortunately, that seems to introduce a number of headaches when actually trying to use the libraries. I guess Java makes communicating with C libraries more difficult than with languages like perl or PHP and that in combination with it’s dedication to cross-platform support seems to have given it an big advantage in situations like this by not encouraging the reuse of existing code in another language. It certainly makes it a heck of a lot easier for users of the language. So what am I missing? Is there a simple way to get a fully compliant XSLT processor in an effective scripting language? Is there another scripting language that’s good for piecing together simple systems that does have straight-forward XSLT support? Python? Ruby? Help!