Problems with KB936021 – Xsl parsing, variable scopes and includes, Oh My!

If you downloaded microsoft’s security updates with trust in your hearts and found that your nice xml xslt transforms no longer functioned correctly, you’re not alone.  Nothing quite like watching a perfect build fail only on your build server, whilst working fine on your development machines, to really brighten up your day.

Jscript scripts can be used to apply xsl transforms to xml files, and is a good way to manage generation of interop info for a project.  KB936021 contains a fairly important change to the Msxml2.DOMDocument.3.0 active x object that doesn’t seem to matter anywhere.  It’s probably not their fault, but it’s irritating none the less.  When it comes to security updates, Microsoft subscribes to a less is more philosophy information-wise.  Very little concrete information about what was changed in a security fix is released, which made this particular bug a pain to track down. The fix works, the reasoning behind it is speculation.

It seems that the msxml object has a property called resolveExternals.  This property determines whether or not to allow the includes and imports inside an xsl to take place, or whether just to ignore them. You can guess the consequences of the latter.

It would also appear that originally the default value for this property was true, which makes sense as it’s a way many people use xsl.  As the focus has switched more towards security in recent years, this default was changed to false for later versions (though it was retained as true for a long time for backwards compatibility.)  At least, that was the intention – turns out, it was never changed to false.  An oversight, perhaps.

Obviously with KB936021 they’ve discovered this oversight and changed it – so now it is false by default.  As our scripts expected the (old) behaviour of true, and no notices was given that this was changing, they all broke.

The way you manage transforms using this activex component is to load both the xml and the xsl document as dom docuemnts and make the following call:

var output = doc.transformNode(xsl);

This will still work, just include the following line before it if you have includes in your xsl document.

xsl.resolveExternals = true;

Powered by ScribeFire.


Lovecraft Interactive Fiction

Unlike my brother, I don’t have much of a stomach for horror. I avoid horror movies most of the time and Stephen King is one author I have never given a second chance – however there is something about the Lovecraft stories that I find compelling and keep being drawn back to, despite getting the creeps.  Shadows over Innsmouth is classic creep fiction that I first heard as a radio dramatisation that left me cold.

If you like that sort of thing and are interested at all in interactive fiction (something I have waxed lyrical about in the past), give the Lovecraft Commonplace Books project a look. The interactive fiction community has a small but dedicated core of authors and organisers and at least one of them has written some work for the project – I also note that its organised by one of the few people to make a successful go at producing and selling modern interactive fiction since the 80’s heydays of Infocom and legend.

Give it a look in any case. I’ve downloaded the best of gallery to check out and expect to quite enjoy it 😉  I’ve seen some other work by the community that are a tad Lovecraftian (not to mention The Lurking Horror by Infocom) and they tend to be quite fun.

Coma Patient Awakes

It’s strange – I get the feeling we’re supposed to be uplifted and amazed by the wonders of technology and our own abilities with this story of how a man has awoken from a persistant vegetative state with the help of electrodes to the brain.

Whilst it does somewhat validate some of my own pet theories about the brain and the nature of our own existance, this story saddens me.  They’ve managed to wake him up, but is it still him? So much was damaged in the attack and since, it makes me wonder if it’s any achievement at all.

Brain electrodes help man speak again – Yahoo! News