Re: [xep-support] "Filtered" Select and alternating background-color

From: Volodymyr Mykhailyk <Volodymyr.Mykhailyk@intelliarts.com>
Date: Thu May 25 2006 - 07:23:48 PDT
No, it just look like recursion.
From point of view of C, Java, or any other functional language it is recursion. But XSLT is procedure language.
In XSLT your always call one template from another. And since my experience such logic never cause stack overflow :), even on 1000 page or grater document.
--BS
Powell, Todd wrote:
Isn't this just another form of recursion?  You are "calling" the same
template again from within itself...

- Todd

-----Original Message-----
From: owner-xep-support@renderx.com
[mailto:owner-xep-support@renderx.com] On Behalf Of Volodymyr Mykhailyk
Sent: Thursday, May 25, 2006 9:44 AM
To: xep-support@renderx.com
Subject: Re: [xep-support] "Filtered" Select and alternating
background-color


  
<fo:table-body>
    <xsl:apply-templates select="article[1]" mode="someMode">
        <xsl:with-param name="count" select="1"/>
    </xsl:apply-templates>
<fo:table-body/>

<xsl:template match="article" mode="someMode">
    <xsl:param name="count"/>
    <xsl:choose>
       <xsl:when test="all_condition_that_you_have">
            <fo:table-row page-break-inside="avoid"> 
                <xsl:if test="($count mod 2) = 0">
                   <xsl:attribute
      
name="background-color">some_color</xsl:attribute>
  
                </xsl:if>
                [...]
             </fo:table-row>
             <xsl:apply-templates
      
select="following-sibling::article[1]" mode="someMode">
  
                <xsl:with-param name="count" select="$count+1"/>
             </xsl:apply-templates>
       </xsl:when>
       <xsl:otherwise>
           <xsl:apply-templates
      
select="following-sibling::article[1]" mode="someMode">
  
              <xsl:with-param name="count" select="$count"/>
           </xsl:apply-templates>
       </xsl:otherwise>
    </xsl:choose>
</xsl:template>
      


-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html

  

------------------- (*) To unsubscribe, send a message with words 'unsubscribe xep-support' in the body of the message to majordomo@renderx.com from the address you are subscribed from. (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html Received on Thu, 25 May 2006 17:23:48 +0300

This archive was generated by hypermail 2.1.8 : Thu May 25 2006 - 07:45:41 PDT