Home > SOA Glossary > Namespace (contributed by Andre Tost and Priscilla Walmsley)

Namespace (contributed by Andre Tost and Priscilla Walmsley)

A namespace is a means of adding groups of XML elements and attributes to a common scope. This allows distinguishing between elements that have the same name, simply by adding them to different namespaces. A namespace is represented by a URI, typically a URL, but within an XML document, an abbreviation called the "namespace prefix" is used. There are standard industry namespaces as well as user-defined namespaces.

The following example shows how three different namespaces are used to uniquely differentiate between three identically named XML elements. This example is from Chapter 4 of the book Web Service Contract Design and Versioning for SOA:

The following diagram illustrates how namespaces are used to establish domains within the XML vocabulary for a hardware store, thereby allowing different elements to have the same name with different meanings.

See also: