Subject: Re: Exclude by Sibling Condition
From: JBryant@xxxxxxxxx
Date: Fri, 2 Dec 2005 08:45:47 -0600
|
Hi, Mike,
If what you did works, that's good enough, of course. However, doing it a
bit differently might have some benefits for you.
Compare
<xsl:for-each select="page">
<xsl:variable name="prev"
select="preceding-sibling::page[position()=1]"/>
<xsl:if test="not($prev) or @tab!=$prev/@tab">
<!-- Process the nodes you selected here -->
</xsl:if>
</xsl:for-each>
to
<xsl:for-each select="page[not(@tab=following::page/@tab)]">
<!-- Process the nodes you selected here -->
</xsl:for-each>
|