A: 

Instead of trying to apply the DocBook XSL stylesheet to a single element, you could apply it to the full document, but specify the part of the document you want to transform with the rootid parameter.

From the reference documentation:

The entire document will be loaded and parsed, but formatting will begin at the element identified, rather than at the root. For example, this allows you to process only chapter 4 of a book.

Because the entire document is available to the processor, automatic numbering, cross references, and other dependencies are correctly resolved.

Jukka Matilainen
Sounds useful.. but although the sections that I want to process contain tags like `<varlistentry id="command_rescan">`, I'm finding that passing `rootid="command_rescan"` to a call to a Python lxml.etree.XSLT object does not work. The XSLT object was initialized from a parse of [http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl]. Any idea what could be wrong? I'm basically doing `from lxml import etree; etree.XSLT(etree.parse(that_url))(etree.parse(my_xml_file), rootid="command_rescan")`. It's giving me the same result as I get without passing the `rootid` parameter.
intuited
Haha! Never mind, I realized that I need to escape it via `etree.XSLT.strparam("command_rescan")` before passing that as the value of the `rootid` keyword parameter.
intuited
Except that it doesn't actually write a copy of the footnote at the bottom of the rendered page, it just references it with the number used if you were rendering the whole document.
intuited