Some Python scripts to deal with DTD:
dtd-doc.py
They rely on the xmldtd module of the XMLProc python module.