Altova Mailing List Archives>Archive Index >xsl-list Archive Home >Recent entries >Thread Prev - Re: [xsl] Exclude by Sibling Condition [Thread Next] Re: [xsl] Exclude by Sibling ConditionTo: Date: 12/2/2005 2:44:00 PM 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> | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
