I have to take back (some of) the nasty things I said about XSLT earlier (13 Jul 2000)... Of course it's possible to do what I was trying to do, and had I bothered to RTFM (XPATH section 12.2, to be precise) it would have been blindingly obvious what I was doing wrong.
I still wish XSLT were more composable, though...