This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
problem with last() function
- From: John Walker <dtd2050 at yahoo dot es>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Thu, 30 May 2002 16:05:25 +0200
- Subject: [xsl] problem with last() function
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi All!
I want to know if a node is followed by some particular nodes or if
it's the last node of the set. So I've tried:
<xsl:if test="following-sibling::table |
following-sibling:list | self::node()[position()=last()]">
I've had to use "self::node()[position()=last()]" instead of simply
"position()=last()" because this last comparison doesn't return a DOM
node (wich seems to enter in conflict with the previous comparisons)...
but it doesn't work! "self::node()[position()=last()]" always returns
the current node, doesn't matter if it's the last or not.
I've an alternative solution, but I'd like to know why this particular
expresion doesn't work! (...despite of curiosity killed the cat...)
Thanx a lot!
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list