[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Grouping: Number of groups


Subject: [xsl] Grouping: Number of groups
From: Norbert Heidbrink <nh@xxxxxxxx>
Date: Fri, 14 Sep 2012 15:08:45 +0200

Hi everybody,

is there a way to retrieve the number of groups that have been found by
<xsl:for-each-group> outside this instruction?


XML:
<line>
v <tab /> w <tab /> x <tab /> y <tab/> z
<line>

(v, w, x, y, z being mixed data)


<xsl:for-each-group select="node()" group-ending-with="tab">
  b& here, the function last() gives me the number I want, but b&
</xsl:for-each-group>
b& I need the figure here. b&


Maybe I am entirely on a false track?

What I want is:
(1) if there are less than n groups do something afterwards.
(2) If there are more than m groups do something different.


Thanks for your answers,
Norbert


Current Thread