I would suggest putting the result of the grouping in a variable, and
then processing the variable:
<xsl:variable name="temp">
<xsl:for-each-group ....>
<group>
...
</group>
</xsl:for-each-group>
</xsl:variable>
then count($temp/group)
Michael Kay
Saxonica
On 14/09/2012 14:08, Norbert Heidbrink wrote:
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">
… here, the function last() gives me the number I want, but …
</xsl:for-each-group>
… I need the figure here. …
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
--~------------------------------------------------------------------
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(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
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(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--