Subject: Re: [xsl] using position() inside Muenchian groups?|
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 14 Oct 2008 21:28:43 -0400
> There is an instruction that by definition works on axes and not on > the current node list: <xsl:number/> ... but it is designed for > exposing tree positions in formatted results, I very rarely find a > need to use it in a "programming style" within my code logic. I do > find my students quickly resort to using <xsl:number/> when > position() is better, but in your case position() is *not* better.
Ah, nice one. Googling the documentation of xsl:number would never have suggested this solution to me. So, to understand correctly, <xsl:number/> reports the original position in the source elements, while position() reports the position in the *selected* sub-set of nodes/elements?
I've been very excited with the feedback from our video customers. </plug>
-- Upcoming XSLT/XSL-FO hands-on courses: Wellington, NZ 2009-01 Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video Video sample lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg Video course overview: http://www.youtube.com/watch?v=VTiodiij6gE G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal