This is what i tried to do using xpath2.0 engine saxon7
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl
utput method="text" indent="yes" />
<xsl:variable name="newline">
<xsl:text>
</xsl:text>
</xsl:variable>
<xsl:template match="/">
<xsl:for-each-group select="/"
group-by="Year">
<xsl:text>Total count (by year) = </xsl:text>
<xsl:value-of select="count(//Year)"/>
<xsl:value-of select="$newline"/>
<!-- ########LOGIC IS WRONG HERE ##### -->
<xsl:for-each-group select="/"
group-by="Month">
<xsl:text>Total count (by Month) = </xsl:text>
<xsl:value-of select="count(//Month)"/>
<xsl:value-of select="$newline"/>
<xsl:for-each-group select="/"
group-by="Day">
<xsl:text>Total count (by Day) = </xsl:text>
<xsl:value-of select="count(//Day)"/>
<xsl:value-of select="$newline"/>
</xsl:for-each-group>
</xsl:for-each-group>
<!-- TILL HERE -->
</xsl:for-each-group>
</xsl:template>
</xsl:stylesheet>
calculating customers GROUP BY YEAR,MONTH,DAY - that's my objective. The above result returns 3 for all groups ...
or are there alternatives to handle such situations
pls advise