15

I have a XSD (XML Schema) that I need to convert to a DTD. Is there a free utility or simple way to accomplish this? A XSLT for example? Python scripts are welcome too.

Note: this is the opposite direction of the question Free DTD to XSD conversion utility?

I am aware that the conversion may lose information…

I tried XMLSpy or oXygenXML, but it is not free and I don't have the possibility to customize the conversion.

Laurent LAPORTE
  • 21,958
  • 6
  • 58
  • 103

3 Answers3

6

XMLPad (https://xmlpad.soft32.com/) claims

Converting XSD to DTD and DTD to XSD.

I've never used it; your mileage may vary.

The Official website is: wmhelp.com

Laurent LAPORTE
  • 21,958
  • 6
  • 58
  • 103
mikep
  • 3,841
  • 8
  • 21
  • This Windows tool works well. But still looking for a standalone solution (like XSLT or Python Script). – Laurent LAPORTE Aug 29 '17 at 13:53
  • A comment from Семен from WmHelp.com: “XMLPad use custom XSD engine implemented on Delphi 7. I think that using XSLT for conversion XSD to DTD is a difficult task because XSD requires the type inference.” – Laurent LAPORTE Aug 30 '17 at 09:00
  • 1
    The service is no longer available. As of 6-Feb-2023, the domain is parked with a scavenger (snaps up domains as the registrations expire, puts up a placeholder page, and waits for someone willing to pay for it.) – Fritz Anderson Feb 06 '23 at 20:37
0

I think there are limited number of people needed DTD if they have XSD.

For me, XSD is more usable then DTD, and I know some migrations from DTD to XSD, usually done manually, but I surprised you need opposite conversion done by script.

May be, you have to write or order the custom tool for your needs.

kingoleg
  • 1,305
  • 15
  • 24
0

Technically, a complete conversion form XSD to DTD is not feasible. Even if you found a tool, you can not be sure that the results are same because there is some features in schema not exist in DTD . For example, the problem of id scoping with IDREF in DTD.

Manar Gul
  • 289
  • 4
  • 7