Re: [xsl] first of type element position

Subject: Re: [xsl] first of type element position
From: Peter Davis <pdavis152@xxxxxxxxx>
Date: Tue, 12 Mar 2002 02:32:22 -0800
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


Current Thread