3 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
5 <xsl:param name="cluster" select="50000"/>
6 <xsl:param name="upper_limit" select="1200000"/>
8 <xsl:output method="xml"/>
10 <xsl:template match="/">
12 <xsl:call-template name="group-by-nodes"/>
16 <xsl:template name="group-by-nodes">
17 <xsl:param name="base" select="0"/>
18 <xsl:if test="$base <= $upper_limit">
19 <xsl:variable name="count" select="count(//stats[number(elements/total) + number(text-nodes/total) >= $base
20 and number(elements/total) + number(text-nodes/total) < $base + $cluster])"/>
21 <group begin="{$base}" end="{$base + $cluster}">
22 <xsl:value-of select="$count"/>
24 <xsl:call-template name="group-by-nodes">
25 <xsl:with-param name="base" select="$base + $cluster"/>