(Edit: I misinterpreted the question for the first time)
I suggest using
ancestor-or-self::name[1]
This finds all name elements, starting with self, parent, etc., and arranges them at a distance from itself. Therefore, choosing [1] gives you the closest.
Martin v. LΓΆwis Sep 01 '09 at 13:28 2009-09-01 13:28
source share