Altova Mailing List Archives>Archive Index >xsl-list Archive Home >Recent entries >Thread Prev - Re: [xsl] Different behaviour for the first item in a [Thread Next] Re: [xsl] Different behaviour for the first item in a for-each-groupTo: <xsl-list@-----.------------.---> Date: 11/1/2009 2:47:00 AM At 2009-10-31 19:31 -0700, Mark Wilson wrote: >That seems to be it. I checked 28 of the 200+ pages and all was OK. > >Sorry I did not make it clear from the start. Also, somewhere along >the line an un-needed for-each crept in. Then you don't need $group-position ... in what I see in your bit below it is totally redundant. > <xsl:variable name="group-position" select="position()"/> > <fo:table-row> > <xsl:if test="position()=1 and $group-position=1"> It was there to get the first of the current-group() in the first of the groups, so if you aren't walking through the groups then you don't need it. You are acting on only the first member of each group, thus I gather you are doing it for de-duping and not for classical grouping. >By the way, you have helped with this very same function three times >now over the past year. For the record, here is the actual correct template. You might want to review taking out $group-position because it isn't doing anything for you. I'm glad things have worked out for you. And a Happy Hallowe'en to you and yours! . . . . . . . Ken -- Upcoming: hands-on XSLT, XQuery and XSL-FO Washington DC Nov 2009 Interested in other classes? http://www.CraneSoftwrights.com/s/i/ Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video Video lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18 Video overview: http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18 G. Ken Holman mailto:gkholman@C... Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal --~------------------------------------------------------------------ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/ or e-mail: <mailto:xsl-list-unsubscribe@l...> --~-- | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
