There may be now, but I seriously doubt it. SGML DTDs (even XML DTDs) are becoming dinosaurs.
A couple of simple things you can do to begin with are: 1. Remove all tag minimization markers (the - - or - O) 2. Find all your 'inclusions' and 'exclusions' and come up with a plan on how to integrate those into your XML DTD. This is probably the most difficult part of the process (IMHO). 3. Be ready to change numerous ATTRIBUTE types in your ATTLISTs to support the reduced number (went from something like 14 to 7 if memory serves me correctly). Global search and replace will fix this pretty quickly. 4. If you have any mixed content models, make sure that the "#PCDATA" is the FIRST item in the 'or' group. Also the mixed data model is optional and repeatable (a "*") and CANNOT BE required (the "+"). 5. Be prepared to include a SYSTEM identifier in your DOCTYPE header or declaration subset for local ENTITIES (Epic is rather forgiving on this, but other parsers will complain if it isn't there).
This should get you down to things that cannot be found with search and replace actions. Then it is just a thing of fine tuning the DTD for XML.
Lynn ---- robin sun <firstname.lastname@example.org> wrote: > How to convert sgml dtd to xml dtd. Are there any tools to make this converision? > > > ----------
If you have inclusions or exclusions in your content model, you'll need to adjust your content models to remove them. If you're working on a DTD with a lot of them (anything military comes to mind) and a large set of legacy data, I'll light a candle for you...
Arbortext Architect might have some functionality that would help this, in that if you try to compile an XML doctype as SGML, it might start spitting out errors that you could fix one-at-a-time to eventually get you there. Even if you don't have or can't get Architect, you could probably just try renaming and compiling an xml doctype in Arbortext Editor and you might still get similar errors. If any of this works at all, sometimes the errors might be cryptic, so some SGML/XML knowledge would be useful in deciphering the error messages.