O'Reilly logo

Definitive XML Schema by Priscilla Walmsley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required