View Single Post
  #4 (permalink)  
Old February 19th, 2007, 12:22 AM
SOMANATHAN10 SOMANATHAN10 is offline
Authorized User
 
Join Date: Feb 2007
Location: CHENNAI, TAMILNADU, India.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to SOMANATHAN10
Default

Mich,

This is my question:I am trying to call header template when an if condition is satisfied. See the following lines in the code snippet.
I am not able to call the header template as the position value is frequently changing.Anyhow I want to identify the every 10th row.This is my requirement.
<xsl:if test position() mod 10 = 1>
<xsl:call-template name="header">
</xsl:if>

code snippet:
===========

 <xsl:for-each select="/job/summary/sunAlertReport/rs:sunAlertReportSummary/rs:sunAlertSummaryList/rs:sunAlertSummary/rs:sunAlertId[generate-id()=generate-id(key(&apos;distinct-segcode&apos;,.))]">
                                    <xsl:sort order="ascending" select="."/>
                                    <xsl:variable name="SA" select="."/>
                                    <xsl:if test="count(/job/summary/sunAlertReport/rs:sunAlertReportSummary/rs:sunAlertSummaryList/rs:sunAlertSummary[rs:sunAlertId=$SA]/rs:oriNext/rs:oriNextList/rs:oriRule[rs:severity = 'Critical']) &gt; 0">
                                    <xsl:if test position() mod 10 = 1>
                                    <xsl:call-template name="header">
                                    </xsl:if>
                                    <xsl:call-template name="saItem">
                                    <xsl:with-param name="hostCount" select="$hostCount"/>
                                    <xsl:with-param name="severity">Critical</xsl:with-param>
                                    </xsl:call-template>
                                    </xsl:if>
                                </xsl:for-each>

C.SOMA
Reply With Quote