Subject: Re: Position() Function Using Filter
From: Liam R E Quin <liam@xxxxxx>
Date: Fri, 28 Oct 2011 14:17:35 -0400
|
On Fri, 2011-10-28 at 10:27 -0400, Murray McDonald wrote:
> If you are sure that there will be one and only one "match" then the '[1]'
> is unnecessary
>
> index-of(//book, //book[ends-with(., 'ASTRO_00007.JPG')])[1]
On the other hand, the difference between /a/b/c[1] and (/a/b/c)[1] is a
major source of confusion for the newcomer and the "perpetual
intermediate" [1] alike.
Sometimes you have to make the computer work a little harder if it means
getting the right answer more often.
Liam
[1] See Alan Cooper, "About Face" for the idea of designing systems for
the "perpetual intermediate".
--
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
|