Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 13th, 2007, 07:04 AM
Authorized User
 
Join Date: Feb 2007
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to SOMANATHAN10
Default 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
__________________
C.SOMA





Similar Threads
Thread Thread Starter Forum Replies Last Post
Identifying a PGP file bnraju1 BOOK: Beginning Cryptography with Java 4 July 13th, 2007 04:05 PM
Finding the 10th row in a xsl SOMANATHAN10 XSLT 4 February 19th, 2007 04:39 AM
help in xsl getting row number pandian XSLT 6 January 23rd, 2006 10:00 AM
IDENTIFYING THE PORTS abdul_owiusa C# 3 August 7th, 2004 04:11 AM
Uniquely Identifying Delegates p_nut33 Pro VB.NET 2002/2003 0 May 3rd, 2004 09:54 AM





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