If you are working with any file format and you wish to preserve comments and layout then use your source file as a template.

po2dtd -t <source-file> <input> <output>

This will use the files in <source-file> as a template, merge the PO files in <input>, and create new DTD files in <output>

If you ran this without the templates you would get valid DTD files but they would not preserve the layout or all the comments from the source DTD file

The same concept of templates is also used when you merge files.

pomerge -t <old> <fixes> <new>

This would take the <old> files merge in the <fix>'s and output new PO files, preserving formatting, into <new>. You can use the same directory for <old> and <new> if you want the merges to overwrite files in <old>.