You have shown a couple of XSLT stylesheet modules that generate HTML output. But you are running them using fop, which is designed to transform XML to XSL-FO and then to PDF.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference