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

Namespace Prefix (contributed by Andre Tost and Priscilla Walmsley)

Within an XML document, namespaces are represented by an abbreviated prefix - the namespace prefix - which is appended to each element and attribute that is part of the namespace. Which prefix is associated with which namespace is defined by a namespace declaration, using the xmlns attribute.

Some standard XML vocabularies have the same prefix associated to them anywhere they are used, making the prefix a de-facto part of the standard. For example, the prefix "xsd" is typically used for the XML Schema namespace in XML schema documents.

The following example highlights the prefixes for three different namespaces and further illustrates how the prefixes 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:

See also: