... until the collector arrives ...

This "blog" is really just a scratchpad of mine. There is not much of general interest here. Most of the content is scribbled down "live" as I discover things I want to remember. I rarely go back to correct mistakes in older entries. You have been warned :)

2007-05-15

Empty Node Set in XPath 1.0

'/..' is an idiomatic way to express an empty node set in XPath 1.0.  In XPath 2.0, one can use the empty sequence '()'.

Event-Handling in FF and IE

The following snippet can be used in either Firefox or Internet Explorer to recover the target document node from a click event:

window.onload = function() {
    document.body.onclick = function(suppliedEvent) {
        var target;
        if (undefined != suppliedEvent) {
            target = suppliedEvent.target; // Firefox
        } else if (undefined != event) {
            target = event.srcElement; // IE
        } else {
            return; // some other browser?
        }
        alert(target.nodeName);
    };
}

2007-05-09

Little Languages

Little languages are in the news a lot these days (under the rubric DSL or Domain Specific Language).  I came across A Pattern Language for Language Implementation.

JavaFX

Sun has blessed the F3 project with the new name Java FX.  It is being represented as a competitor to Flash and Silverlight.  The implication is that FX will find its way into the JRE.

Blog Archive