I'm confused, and I think that's because you are confused.
If you are trying to generate PDF via XSL-FO, then where does HTML come into it? XSL-FO and HTML are completely different vocabularies. If you are generating XSL-FO, your stylesheet should not be generating any HTML elements.
Author, XSLT 2.0 and XPath 2.0 Programmer's Reference