RE: xpath satisfying two conditions where one is position()=last()2004-10-29 07:09:29I tried this, but didn't work. <xsl:value-of select="/Result/Monthly/MonthUltimo[(_at_)year=2000 and position()= last()]/@index"/>
Nearly right:
<xsl:value-of select="/Result/Monthly/
MonthUltimo[(_at_)year=2000][position()=last()]/@index"/>
The difference is that position()=last() is true for the last item in the
sequence qualified by the predicate. This means you need to form your
sequence first, then find its last item.
Michael Kay
http://www.saxonica.com/
|
|
||||||||||||||||