Mark McLaren wrote:
> Stephen Welker wrote:
> >
> > My problem is that the test="position() mod 2 = 0" evaluates to true all
> > the time.
> >
> > My XML has more than 1 "sub-section" node (common parent) and is well
> > formed.
> >
> > Any suggestions?
>
> Have you tried looping through the sub-sections?
>
> <xsl:template match="sub-section">
> <xsl:for-each select=".">
> <DIV>
> <xsl:if test="number(/text/sub-section-hilite)">
> <xsl:if test="position() mod 2 = 0">
> <xsl:attribute name="CLASS">subsectionhilite</xsl:attribute>
> </xsl:if>
> </xsl:if>
> <xsl:apply-templates mode="sub-section"/>
Without the above line, of course else infinite loop!
>
> </DIV>
> </xsl:for-each>
> </xsl:template>
>
> * Note extra for-each lines!
> Better?
I will shut up now!
--
Mark McLaren