|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: runaway template application
This message is late because it bounced due to me not using the right
from address...
|Michael Kay wrote: | |As it happens, when I have|The problem I'm having is with the template where mode="group" <xsl:template match="context[position() mod 3 = 1]" mode="group"> <td> <xsl:apply-templates select="." mode="leaf"/> <xsl:apply-templates select="following-sibling::node()[1]" mode="leaf"/> <xsl:apply-templates select="following-sibling::node()[2]" mode="leaf"/> </td> </xsl:template> Then I only get the current node and the next node but not the one after (as I expected). if I use <xsl:template match="context[position() mod 3 = 1]" mode="group"> <td> <xsl:apply-templates select="." mode="leaf"/> <xsl:apply-templates select="following-sibling::node()[2]" mode="leaf"/> <xsl:apply-templates select="following-sibling::node()[3]" mode="leaf"/> </td> </xsl:template> I get exactly the same result. However, when I use <xsl:template match="context[position() mod 3 = 1]" mode="group">
<td>
<xsl:apply-templates select="." mode="leaf"/>
<xsl:apply-templates select="following-sibling::context[1]"
mode="leaf"/>
<xsl:apply-templates select="following-sibling::context[2]"
mode="leaf"/>
</td>
</xsl:template>As suggested by Jeni, I get what I want. | XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








