This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: first of type element position


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]