I was thinking just after <xsl:template match="Result"> line, but before the <html> line (IOW at the very top of the HTML page - which is where your change ends up also).