[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: using position() inside Muenchian groups?

Subject: Re: using position() inside Muenchian groups?
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 14 Oct 2008 21:28:43 -0400
Re:  using position() inside Muenchian groups?
At 2008-10-15 12:07 +1100, Eric Scheid wrote:
> 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?

Yes, that is it ... though <xsl:number/> works on the entire source tree not just elements.


<plug>
If you want more details on <xsl:number/> (it is a very powerful construct) that happens to be the subject of the YouTube excerpted sample lesson of our five-day hands-on class recorded as a 24-hour interactive hyperlinked XSLT/XPath 1.0/2.0 training DVD:


http://www.youtube.com/watch?v=PrNjJCh7Ppg

Of course the YouTube bit isn't hyperlinked ... so to see how that works there is a download of a "test lesson" that demonstrates the hyperlinking to each slide:

http://www.cranesoftwrights.com/training/index.htm#testvideo

The DVD runs on Linux (with Totem), Macintosh and Windows platforms, but I ask prospective buyers to try the above test video first to ensure the format will run on their platform.

An overview of the entire class is also posted as a YouTube excerpt:

http://www.youtube.com/watch?v=VTiodiij6gE

I've been very excited with the feedback from our video customers.
</plug>

I hope this helps.

. . . . . . . . . . Ken

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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.