Chapter 1 Schemas: An introduction

This chapter provides a brief explanation of schemas and why they are important. It also discusses the basic schema design goals, and describes the various existing schema languages.

1.1 What is an XML schema?

The word schema means a diagram, plan, or framework. In XML, it refers to a document that describes an XML document. Suppose you have the XML instance shown in Example 1–1. It consists of a product element that has two children (number and size) and an attribute (effDate).

Example 1–2 shows a schema that describes the instance. It contains element and attribute declarations that assign data types and names to elements and attributes.

Example 1–1. Product instance

Get Definitive XML Schema now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.