Just to confirm, Muenchian Grouping solves the problem. Great. Many thanks, Joerg!
Jens -- Jens Reufsteck Hobsons GmbH Wildunger Straße 6 60487 Frankfurt am Main Deutschland Tel: +49 (69) 255 37-140 Fax: +49 (69) 255 37-2140 http://www.hobsons.de http://www.hobsons.ch Geschäftsführung: Christopher Letcher, Judith Oppitz, Adam Webster Amtsgericht Frankfurt HRB 58610 >-----Original Message----- >From: Joerg Heinicke [mailto:[EMAIL PROTECTED] >Sent: Wednesday, November 07, 2007 5:06 AM >To: users@cocoon.apache.org >Subject: Re: limited number of loops with call-template? > >On 06.11.2007 8:17 Uhr, Jens Reufsteck wrote: > >> I'm using a template, which once called from outside starts >calling itself >> as long as a certain condition is true. But after a certain >amount of calls >> (1.100 times) it seems stopping to call itself. The >processing stops in the >> middle of the xml-document without throwing an exception and without >> throwing the resulting xml-document. > >I guess at some point the stack is just too big, but maybe the >exception >gets swallowed. But what actually happens? It can not just stop and do >nothing. Is it like an exception would have been thrown but does not >show up anywhere? > >> This is the template: >> >> <xsl:template name="baum"> >> <xsl:param name="position"/> >> ... >> <xsl:if test="/website/ebene[position()=$position]/text() = >> /website/ebene[position()=$position + 1]/text()"> >> <xsl:call-template name="baum"> >> <xsl:with-param name="position" >select="$position + >> 1"/> >> </xsl:call-template> >> </xsl:if> >> </xsl:template> >> >> >> The result looks like this: >> <website> >> <baum ebene="1"> >> de >> <ebene ebene="2"> >> education >> <file>diplom.html</file> >> </ebene> >> ... [further 1099 entries] >> <ebene ebene="2"/> >> > >Translation: baum = tree, ebene = level. > >What you are doing looks very much like grouping. You should >have a look >into so-called Muenchian Grouping. Feel free to ask if you >want to know >more about it. I can help you with that if you give me some >details from >the input and the grouping rules. > >Joerg > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]