Free DTD to XSD conversion utility? [closed]
Asked Answered
H

4

65

I have a DTD that I need to convert to an XSD (XML schema) file. Is there a free utility or simple way to accomplish this?

Hygro answered 2/10, 2009 at 15:7 Comment(0)
E
45

The W3C offers one. There are also online converters.

Eno answered 2/10, 2009 at 15:12 Comment(9)
The 'online converters' XML Utilities link is currently out-of-date. The tool moved to: http://www.xmlutilities.net. But now you'll have to request for access. I found a link to this tool http://www.lumrix.net/dtd2xs.php in an O'REILLY article and it worked well for me (you do need the Java Runtime Environment installed, but most of us still have that :-) ).Columnist
lumrix.net tool also goneNainsook
Good things disappear quickly from the internet.Hieroglyphic
There is another version of the W3C tool here mathling.com/xmlschema . Found it here: edutechwiki.unige.ch/en/XML_Schema#DTD_to_XSD_Conversion_toolsThiel
The lumrix.net link is also broken/out-of-date. A Google search on just "dtd2xs.php" turns up quite a few hits, but most are the same link, or sites that I was a little nervous about downloading from...Griseldagriseldis
Does JDK have command line tool from DTD to XSD conversion?Mandelbaum
The lumrix dtd2xs tool (Java) can be found here: github.com/reposit/dtd2xs This worked for me: java -cp . dtd2xsd report.dtd > report.xsdAnaemic
W3C tool requires Perl installationCockerel
the w3c one is actually broken, I guess it is too old. it generates invalid xsd.Ultimate
T
57

If you happen to have Visual Studio, open the DTD file an you should have a button to "Create Schema" out of it.
I haven't checked if it was available on Express edition, though.

Theatrician answered 22/8, 2013 at 9:5 Comment(3)
Nice, worked perfectly in VS2012. The option is found in the main menu under XML -> Create schemaMalacostracan
Seems supported by the 2015 community edition as well. :) Thanks!Entoderm
Visual Studio Community 2015 >>> open .dtd file >>> XML tab >>> Create SchemaHarve
E
45

The W3C offers one. There are also online converters.

Eno answered 2/10, 2009 at 15:12 Comment(9)
The 'online converters' XML Utilities link is currently out-of-date. The tool moved to: http://www.xmlutilities.net. But now you'll have to request for access. I found a link to this tool http://www.lumrix.net/dtd2xs.php in an O'REILLY article and it worked well for me (you do need the Java Runtime Environment installed, but most of us still have that :-) ).Columnist
lumrix.net tool also goneNainsook
Good things disappear quickly from the internet.Hieroglyphic
There is another version of the W3C tool here mathling.com/xmlschema . Found it here: edutechwiki.unige.ch/en/XML_Schema#DTD_to_XSD_Conversion_toolsThiel
The lumrix.net link is also broken/out-of-date. A Google search on just "dtd2xs.php" turns up quite a few hits, but most are the same link, or sites that I was a little nervous about downloading from...Griseldagriseldis
Does JDK have command line tool from DTD to XSD conversion?Mandelbaum
The lumrix dtd2xs tool (Java) can be found here: github.com/reposit/dtd2xs This worked for me: java -cp . dtd2xsd report.dtd > report.xsdAnaemic
W3C tool requires Perl installationCockerel
the w3c one is actually broken, I guess it is too old. it generates invalid xsd.Ultimate
P
13

Try xmlpad from https://download.cnet.com/XmlPad/3000-7241_4-10252051.html to convert DTD to XSD. Really nice tool.

Postilion answered 1/4, 2011 at 20:19 Comment(4)
You need to open a DTD file before you can access the requested functionality (convert DTD to XSD in this case; it can also generate a sample XML). Works great, thanks!Hague
can't parse the w3c strict.dtd file.Meshuga
Site down. Cannot reach.Maudmaude
Currently, that URL comes up with my firewall flagging it as malware.Steinke
P
12

http://www.thaiopensource.com/relaxng/trang.html

Trang converts between different schema languages for XML. It supports the following languages:

  • RELAX NG (XML syntax)
  • RELAX NG compact syntax
  • XML 1.0 DTDs
  • W3C XML Schema

http://www.thaiopensource.com/relaxng/trang-manual.html

Protoplast answered 15/12, 2009 at 18:4 Comment(2)
The website is down.Epic
The thaiopensource link currently redirects to relaxng.org/jclark/trang-manual.htmlSynecious

© 2022 - 2024 — McMap. All rights reserved.