XML Schemas Are a Type of Schema

XML Schemas offer an alternative to describing an XML grammar using DTDs. They do not “replace” DTDs, nor do XML Schemas necessarily make DTDs obsolete. DTDs are simple, and they are established technology. There are times when in the interest of expedience and compatibility, it would make sense to use a DTD.

Both tools are useful for describing XML documents. If backward compatibility is an issue, DTDs might be a wiser choice. But if you need some of the features XML Schemas offer, such as datatypes, then the choice will be made for you. It's simply a question of using the right tool for the job.

From the XML Schema Requirements Note published by the W3C, the goals of the XML Schema Recommendation state that ...

Get Special Edition Using XML, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.