Although suitable for validating the structure of an XML document, the DTD has nonetheless a number of important limitations.
Firstly, although it allows validation of the required and expected structure of a document, such as the correct positioning and nesting of elements, it can say nothing about the validity of the content.
Taking a leaf from the database designer’s book, the XML schema adds also the concept of ‘data-typing’. This allows a designer to specify what a specified XML element should contain, for example a date, an integer within a particular range, just text. In addition, XML schemas can include user-defined datatypes, such as a Zip code specified in a particular format, a name from a predefined list or a product or reference code.
An information manager should avoid being embroiled in the details of schema design, but nonetheless maintain a high-level view of their development. What is important is to give your developers guidelines on the basis of clear and comprehensive analyses of your information and document types.
There are ongoing debates about whether document analysts and designers should now abandon the DTD completely in favour of schemas in one form or another. Without losing ourselves in the detail, a good reason for using DTDs would if an organization already had a substantial investment in SGML and associated tools. SGML tools validate conformity of document instances to their associated types exclusively by means of the DTD.
The second limitation – now no longer valid – is that the XML Schema standard has not yet been finalized, so that developers must hedge their bets for some time to come. If your organization is coming into XML ‘clean’, with little or no SGML legacy, it is probably better to opt for the more powerful schema.