This paper presents an experiment in using DocBook5 to mark up and maintain LaTeX classes and packages in the literate-programming style, using XSLT2 to generate the standard format of distribution files suitable for the CTAN repository. It identifies several benefits in automation and reusability of code; a number of areas where a customisation layer for DocBook would be useful; and a few unresolved restrictions that package and class authors or maintainers would need to be aware of when editing XML.