Re: Last tango in Paris
Brought to you by:
bs_php,
nigelswinson
From: Peter R. <php...@pe...> - 2002-02-21 14:01:18
|
On Wednesday 20 Feb 2002 11:58 pm, Nigel Swinson wrote: > > I tried: > > //employee[(@gender='m') and (position() = last())] > > against: > > company-structure.xml This is not the same thing. This is the last employee in each parent node if male (or in my example the last of each tango which is in Paris, i.e. all tangos in Paris). What I want is the last instance of all male employees, i.e. //employee[@gender='m'][last()] should find a1010 and gender = 'f' should find a1006. Incidentally, if I try //employee[(@gender='m') and (last())] I get a different answer to your example. What is this doing? 'Position() = last()' and 'last()' should surely be identical. |