Separate ESIS generation from XML generation. This will evolve a bit more in a couple of days.
SGML will be supported soon, probably using an ESIS representation saved in a temp file.