This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Using position()
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Using position()
- From: "Michael Kay" <michael dot h dot kay at ntlworld dot com>
- Date: Wed, 7 Nov 2001 19:16:10 -0000
- Reply-To: xsl-list at lists dot mulberrytech dot com
I thought this
> would work: <xsl:if
> test="./@t_orno = //row[position()-1]/@t_orno"> but it doesn't.
When you use a numeric predicate X, it is short for position()=X, so you are
selecting those rows that have position()=position()-1, which of course
doesn't match any of them.
Use preceding-sibling.
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list