|
Subject: RE: [xsl] xpath satisfying two conditions where one is position()=last() From: "Michael Kay" <mike@xxxxxxxxxxxx> Date: Fri, 29 Oct 2004 15:09:29 +0100 |
> I tried this, but didn't work.
> <xsl:value-of select="/Result/Monthly/MonthUltimo[@year=2000
> and position()=
> last()]/@index"/>
Nearly right:
<xsl:value-of select="/Result/Monthly/
MonthUltimo[@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/
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] xpath satisfying two conditio, Christoph Klocker | Thread | [xsl] Re: Dynamic processing of xml, Michael |
| RE: [xsl] counting equal entries, Michael Kay | Date | Re: [xsl] complex positioning probl, Wendell Piez |
| Month |