An XML Schema is a language for expressing constraints about XML documents.
An XML Schema is a language for expressing constraints about XML documents. There are several different schema languages in widespread use, but the main ones are Document Type Definitions (DTDs), Relax-NG, Schematron and W3C XSD (XML Schema Definitions). From this page you can find out more about DTDs and W3C XSD, since those are the primary schema languages defined at W3C.
A Schema can be used:
Information in schema documents is often used by XML-aware editing systems so that they can offer users the most likely elements to occur at any given location in a document.
Checking a document against a Schema is known as validating against that schema; for a DTD, this is just validating, but for any other type of schema the type is mentioned, such as XSD Validation or Relax-NG validation.
Validating against a schema is an important component of quality assurance.
The Service Modeling Language (SML) provides a framework for relating multiple XSD documents to one or more documents in a single validation episode.
Since XSD supports associating data types with element and attribute content, it is also used for data binding, that is, for software components that read and write XML representations of computer programming-language objects.
Document Type Definitions are defined in the XML Recommendation. They are very widely supported with a high degree of interoperability.
W3C XML Schema Definitions are defined in the W3C XML Schema specification. This is in three parts, of which the first part, numbered zero, is an introductory document.
Learn more about the current status of specifications related to:
These W3C Groups are working on the related specifications: