The quest to build a system that allows publishing in PDF and XHTML from a single XML galley within OJS continues and I've made quite substantial progress. As before, the code for this article is available on my GitHub. Instead of working from the very basic stub, I instead used the existing xmlGalley template, reading and tracing through the code to work out what it does.