The XML part of it was a far less scary trip than I expected. I can see the exact XML that I want to produce. Is this XML just a step between parsing and generating? If so, is it possible to just inject it? I'm not sure where I would do that with sphinx-doc. I'm guessing there's a prettier way to put this in there, but if I'm able to simply throw XML into the generation, then this will give me the exact result I'm looking for.