Chapter 3 Namespaces

Understanding namespaces is essential to understanding XML Schema. This chapter introduces namespaces and explains their relationship to schemas.

3.1 Namespaces in XML

Before we delve into the use of namespaces in schema documents, let’s take a minute to learn about namespaces in general. Namespaces are surprisingly simple considering how much confusion and controversy they cause. The purpose of namespaces is to provide containers for the names used in XML. An element-type name, such as table, can have several meanings. Its meaning in XHTML is very different from its meaning in FurnitureML. Namespaces provide context for element-type and attribute names in instances. An element-type or attribute ...

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.