EDN Admin
Well-known member
I have a simple xml data set like:
<raw><br/>
<total>2800</total><br/>
<total>4300</total><br/>
<total>600</total><br/>
<total>3200</total><br/>
<total>7400</total><br/>
...<br/>
</raw>
What I need to do is count these in buckets of 2500, without knowing what the maximum value is. I can do this easily if I know the max value (example below), but how can I dynamically generate the groupings?
<TotalNum100to2500><br/>
<xsl:value-of select="count(msxsl:node-set($data)/total[number(.)>=100 and number(.)<2500])"/><br/>
</TotalNum100to2500> <br/>
<TotalNum2500to5000><br/>
<xsl:value-of select="count(msxsl:node-set($data)/total[number(.)>2500 and number(.)<5000])"/><br/>
</TotalNum2500to5000> <br/>
<TotalNum5000to7500><br/>
<xsl:value-of select="count(msxsl:node-set($data)/total[number(.)>5000 and number(.)<7500])"/><br/>
</TotalNum5000to7500>
View the full article
<raw><br/>
<total>2800</total><br/>
<total>4300</total><br/>
<total>600</total><br/>
<total>3200</total><br/>
<total>7400</total><br/>
...<br/>
</raw>
What I need to do is count these in buckets of 2500, without knowing what the maximum value is. I can do this easily if I know the max value (example below), but how can I dynamically generate the groupings?
<TotalNum100to2500><br/>
<xsl:value-of select="count(msxsl:node-set($data)/total[number(.)>=100 and number(.)<2500])"/><br/>
</TotalNum100to2500> <br/>
<TotalNum2500to5000><br/>
<xsl:value-of select="count(msxsl:node-set($data)/total[number(.)>2500 and number(.)<5000])"/><br/>
</TotalNum2500to5000> <br/>
<TotalNum5000to7500><br/>
<xsl:value-of select="count(msxsl:node-set($data)/total[number(.)>5000 and number(.)<7500])"/><br/>
</TotalNum5000to7500>
View the full article