xsl-list
[Top] [All Lists]

Re: runaway template application

2003-02-08 23:30:43
<xsl:template match="context[position() mod 3 = 1]" mode="group">
    <td>
        <xsl:apply-templates select="." mode="leaf"/>
        <xsl:apply-templates select="." mode="leaf"/>
        <xsl:apply-templates select="." mode="leaf"/>
    </td>
</xsl:template>

behaves as expected. Why can't this behave in the same way?

<xsl:template match="context[position() mod 3 = 1]" mode="group">
    <td>
        <xsl:apply-templates select="." mode="leaf"/>
        <xsl:variable name="nextNode"
        select="following-sibling::node()"/>
        <xsl:apply-templates select="$nextNode" mode="leaf"/>
        <xsl:apply-templates select="." mode="leaf"/>
    </td>
</xsl:template>
_____________________________
http://terencekearns.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>