RE: [xsl] catching the last node still satisfying a condition

Subject: RE: [xsl] catching the last node still satisfying a condition
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Thu, 13 Sep 2001 15:53:00 +0100
> > Perhaps:
> >
> > foos/foo[position() &lt; $limit][bar][last()]
> Are successive predicate legal ? And are they evaluated as
> foo[position() &lt; $limit AND bar AND last()] or as
> (((foo[position() &lt; $limit])[bar])last()]) ?

Of course they are legal. Each predicate is is a filter that is applied to
the node-set that remains after applying the previous filters. For filters
that don't depend on position, multiple filters are equivalent to "and", but
for positional filters, the meaning is different, because position() and
last() refer to position among the nodes that remain after previous filters.

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread