I'm assuming you want one row in the output for every row in the Inventory table. So it's best to make Inventory.xml the primary input of your transformation. I'll assume first that your Inventory file had the month in the format "2007-05". The essence of it is then:
<xsl:variable name="invoices" select="document('invoices.xml')"/>
<xsl:template match="Inventry">
<row>
<xsl:copy-of select="Country"/>
<xsl:copy-of select="Month"/>
<xsl:copy-of select="Product"/>
<InvoiceQty><xsl:value-of select="sum($invoices/*[starts-with(Date, current()/Month]/Qty)"/></InvoiceQty>
<xsl:copy-of select="Qty"/>
</row>
</xsl:template>
You need to do a bit more work because you need to translate the month from "May" to "2007-05". I'm not sure where you want to get the year from. You can do the month part as
format-number(string-length(substring-before("JanFebMarApr...Dec", $month)) div 3 + 1, '00')
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference