XML DTD vs. XML Schema (XSD)

Web services development frequently involves documents called Document Type Definitions (DTD) and XML Schema Definitions (XSD).

These documents are used to describe data contained within an XML document, similar to how a data structure in the RPG program describes the data contained within. XSDs are the successors of DTDs in that they were created after, and also hold more promise/features than, DTDs. For example a DTD can’t define data types (i.e. boolean, date, string, numerics, etc) but an XSD can.

In any event, XSDs are the accepted standard for new development. IBM’s Websphere Development Studio Client (WDSC) has a utility that converts DTDs to XSDs. While in WDSC right click on the DTD and select Generate→ XML Schema.