Subject: Re: [xsl] Last Position Check From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx> Date: Wed, 18 Jul 2001 17:28:35 +0100 |
Hi Nathan, > I am currently running a check to see if an element is in the last > position, but it does not seem to be working. > > <xsl:if test="not(position()='last')"> | </xsl:if> You're testing whether the position() of the current node is equal to the string 'last'. You want to test whether the position() of the current node is equal to the length of the current node list, which you can get with a call to the function last(): <xsl:if test="not(position() = last())"> | </xsl:if> or: <xsl:if test="position() != last()"> | </xsl:if> I hope that helps, Jeni --- Jeni Tennison http://www.jenitennison.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Last Position Check, Nathan Shaw | Thread | RE: [xsl] Last Position Check, Clapham, Paul |
Re: [xsl] Test for presence of attr, Jeni Tennison | Date | RE: [xsl] Last Position Check, Clapham, Paul |
Month |