In his recent blog-article: “XPath needs virtual axes. Making XPath more XPathy?” Rick Jelliffe sais:
“I really like XPath2. I would never recommend anyone start with XPath1, unless you were doing very basic transformations with no text processing or data formatting.
But the niggle I have with XPath2 is that it is less XPath-y than XPath1. It does not significantly improve the central syntactical feature of XPaths: the location steps. (The only improvement that springs to mind is that XPath2 did improve the use of parentheses in location steps.) Instead, XPath2 provided much more conventional features like a for iterator. I think these significantly decrease the comprehensibility of an XPath, are anonymous and therefore require may comments to explain them, and fracture the line. To an extent, once you start to use nested syntaxes and iterators, why both using XPath at all?”
Rick gives this example:
and proposes to improve the expression above by introducing “virtual axes” so that it could be written as:
So, curious reader, pause for a while, don’t read below, and think: has Rick uncovered a hole in XPath?
What you are asking for can be expressed almost exactly in the same form (actually I prefer the current XPath 2.0 form of expression).
You are asking for:
One can write this in XPath 2.0 as:
The current XPath way of expressing this is cleaner — no need for virtual axes.
This is a feature of XPath 2.0 that is not widely used and known: any function can be used as the current location step. The syntax rules that resolve its use are (at http://www.w3.org/TR/2007/REC-xpath20-20070123/#id-grammar):
 StepExpr ==>  FilterExpr ==>  PrimaryExpr
and the fact that a FunctionCall is a PrimaryExpr:
Also, consider that the axes in XPath have been useful so far mainly because there are just a few of them. Imagine having to deal with zillions of axes and struggling to remember what they mean. And if everyone can introduce their own axes, then why bother with them at all?
Dear reader, it’s up to you to decide… as I have already done.