First, I'm not sure why you've made the mapping file be a stylesheet module. Why not make it an ordinary XML document?
Second, I guess from the title of your post that when you write:
<xsl:template match="/">
<xsl:apply-templates mode="sub"/>
<xsl:apply-templates mode="grouper"/>
</xsl:template>
you are hoping that the "grouper" template will be applied to the result of the "sub" template. The standard pattern for this in XSLT 2.0 is:
<xsl:variable name="temp">
<xsl:apply-templates mode="sub"/>
</xsl:variable>
<xsl:apply-templates select="$temp" mode="grouper"/>
In 1.0 this requires the xx:node-set() function which most XSLT processors offer as a vendor extension:
<xsl:variable name="temp">
<xsl:apply-templates mode="sub"/>
</xsl:variable>
<xsl:apply-templates select="xx:node-set($temp)" mode="grouper"/>
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference