p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   XSLT (http://p2p.wrox.com/forumdisplay.php?f=86)
-   -   IDENTIFYING 10TH ROW IN A XSL (http://p2p.wrox.com/showthread.php?t=53982)

SOMANATHAN10 February 13th, 2007 07:04 AM

IDENTIFYING 10TH ROW IN A XSL
 
 My requirement is like this.

I need to repeat the header between every 10th line in my xsl.
For most of the files I have done it with <xsl:if test="position() mod 10 = 1">
and succeded.
In one of the file I am not able to implement the same logic since the position() is changing frequently.

I know that in xsl reassigning of variable is not possible.

Since the for-loop is followed by a if condition the position value changes.

I want to find out how many times this if condition gets satisfied?

 <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">



C.SOMA


All times are GMT -4. The time now is 05:41 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.