xsl fun

March 24th, 2004 by Hen

I’ve been playing with XSL recently. I had special fun trying to do the following:

document($src)/html/head/title

It never worked. I yelled, I cursed, I offered praise to the small gods, but no avail. Then I found an old email from James Clark to the Mulberry list [I remember being on that list 4+ years ago when I first read about XSL], in which he points out that XPath does not work upon the default namespace.

Ouch, think I. Still the small gods fail to offer options. So I did the next best thing, I guessed based on the principle of least surprise.

document($src)/:html/:head/:title

and it worked. Simple really.

Comments are closed.