Right now the scope for the invoice_date
variable isn't set because it is outside of any template, which is the fine place for "global" variables.
<xsl:variable name="invoice_date" select="tokenize(., ',')[3]"/>
Based on that the .
character doesn't yet have meaning. If it is changed to /
it should now have scope of the document being processed.
<xsl:variable name="invoice_date" select="tokenize(/, ',')[3]"/>