[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] Using position()


Subject: RE: [xsl] Using position()
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Wed, 7 Nov 2001 19:16:10 -0000

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



Current Thread