XML Schema Tutorials - Herong's Tutorial Examples
Dr. Herong Yang, Version 4.00

What Is XML Schema?

This section provides a quick description of what is XML Schema.

What is XML Schema? XML Schema is an XML schema language recommended by W3C (World Wide Web Consortium) in 2001. An XML schema is a set of rules to which an XML document must conform in order to be considered 'valid' according to that schema. An XML schema language is a set of rules on how to write an XML schema.

What is XSD? XSD stands for XML Schema Definition. An XML schema document written in XML Schema is called XSD and typically has the filename extension ".xsd".

Formally, XML Schema and XSD refer to two different things: XML Schema refers to the schema language and XSD refers to a schema document written in XML Schema. But XML Schema is sometimes informally referenced as XSD.

The current version (last modification date: October 28, 2004) of XML Schema 1.0 specifications is divided into 3 parts and available at W3C web site: http://www.w3.org/XML/Schema:

  • XML Schema Part 0: Primer - An easily readable description of XML Schema and a quick tutorial on how to write XML schema documents using XML Schema.
  • XML Schema Part 1: Structures - A set of rules specifying the XML Schema definition language, which offers facilities for describing the structure and constraining the contents of XML 1.0 documents.
  • XML Schema Part 2: Datatypes - A set of rules specifying datatypes to be used in XML Schema.

Some nice features of XML Schema 1.0:

  • XML Schema 1.0 is designed to validate XML 1.0 documents.
  • XML Schema 1.0 is an XML based language. XSD documents are XML documents.
  • XML Schema 1.0 supports datatypes.

Sections in This Chapter

What Is XML Schema?

"Hello world!" Example of XSD

XML Schema Processors

Dr. Herong Yang, updated in 2007
What Is XML Schema?