Semi-serious suggestion: wrap the files in an (X)HTML page that links to a Javascript file loading a full XML parser compiled to WebAssembly, which then does the full transformation live, in-browser. You wouldn't need to change your templates or your generation logic much if you structure the surrounding skeleton right!
Of course, you'd need to get over the lunacy of loading a full DOM transformation library into the browser DOM.