'/..' is an idiomatic way to express an empty node set in XPath 1.0. In XPath 2.0, one can use the empty sequence '()'.
... 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
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.
Subscribe to:
Posts (Atom)