You never select an attribute in an xsl:apply-templates instruction, therefore the template for @period will never fire. Templates only fire when the match pattern matches a node to which you are applying templates.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference