This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: first of type element position
- From: Peter Davis <pdavis152 at attbi dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Tue, 12 Mar 2002 02:32:22 -0800
- Subject: Re: [xsl] first of type element position
- References: <sc8ddeb5.024@mailbrugt1.ep.ec>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Use the preceding-sibling axis to test for TOC.SECT elements that come before
the current element.
<xsl:template select="TOC.SECT">
<xsl:choose>
<xsl:when test="preceding-sibling::TOC.SECT">
The current TOC.SECT is *not* the first.
</xsl:when>
<xsl:when test="not(preceding-sibling::TOC.SECT)">
The current TOC.SECT *is* the first.
</xsl:when>
</xsl:if>
--
Peter Davis
Bumper sticker:
All the parts falling off this car are of the very finest
British manufacture.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list