Re: [xsl] count selected nodes in for-each

Subject: Re: [xsl] count selected nodes in for-each
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 04 Apr 2001 11:28:55 +0100

At 03:49 PM 4/4/01, you wrote:
I have this for-each sequence that filters the data when select statement is

[@STARTDATE = '01']">

Now, I want to know into how many nodes this for-each results, with the
purpose to use that number in this selection:
<xsl:when test="previous_amount_nudes = 0">blabla</xsl:when>

The number of nodes selected by a for-each instruction can be accessed by using the last() function (inside the for-each).

As for the number of nudes, you're on your own (not that I don't wish I was there with you).


Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.      
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
  Mulberry Technologies: A Consultancy Specializing in SGML and XML

XSL-List info and archive:

Current Thread