Comparing Schema Languages

 

This section compares schema languages to help you make decisions about implementing schemas into your XML applications.

Document Type Definitions (DTDs)

  • DTDs specify content models for a set of XML documents.

  • DTDs keep XML documents consistent.

  • DTDs can be shared.

  • DTDs provide a formal and complete definition of an XML vocabulary.

  • DTDs are restricted to one DTD for each XML document.

Schemas

Like a DTD, a schema specifies the structure or model of a particular set of documents. Following are the benefits of using a schema language to describe XML document structure:

  • Schemas use XML syntax.

  • Schemas can be parsed by an XML parser.

  • Schemas provide support for data types; the type of data contained in an element can be specified.

  • Schemas allow global elements (elements that must be used the same way throughout the XML document) and local elements (elements that have a specific meaning in context).

  • Schemas offer data type support (integer, string, Boolean), and the ability to create other data types.

Support for XDR schemas

XDR schemas have been removed from MSXML 6.0. If you are using XDR schemas, and you need to convert to MSXML 6.0, it is recommended that you convert to use XSD schemas.

XSD Schemas

XML Schema definition language (XSD) schemas provide support for data types and for defining structures. This support allows you to create robust XML Schemas and validate XML instance documents against these schemas.