This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: catching the last node still satisfying a condition
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] catching the last node still satisfying a condition
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Thu, 13 Sep 2001 15:53:00 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
> > Perhaps:
> >
> > foos/foo[position() < $limit][bar][last()]
> Are successive predicate legal ? And are they evaluated as
> foo[position() < $limit AND bar AND last()] or as
> (((foo[position() < $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