In Part 1 of this Testing XSL series I introduced how XSL can be used and some basic ways to test their correctness.
In this post I’m going to go into further detail with some utility methods that greatly reduce the amount of code you need to test the XSL on a more fine-grained level. They also abstract away any need to worry about DocumentBuilderFactories or Transformers and let you deal with just strings.
I refer to all XML manipulations via XSL stylesheets as simply “XSL”. One could get quite particular about calling something XSLT over XSL but really I just associate all things that read/manipulate/produce XML data with XSLT and XPATH as being XSL.
Over the last few weeks, since I finished reading RabbitMQ in Action, I have played about with RabbitMQ a little … and I like it!
The whole integration / middleware / messaging space is wide and varied, but for this post I’m just referring to messaging with RabbitMQ.
The city that I live in, Perth, is sprawled out over a large distance and so the BOM’s temperature for Perth isn’t entirely accurate. Enter the Ag Dept’s temperature sensors here or more specifically, the one for Wanneroo here. These sensors are updated every minute (most of the time) and provide a more accurate measure of what the weather is doing right now. Rather than visiting the page manually, I wrote a script to grab the temperature for use elsewhere, such as on a dashboard.