What is a Namespace?

Article Details
  • Written By: Malcolm Tatum
  • Edited By: Bronwyn Harris
  • Last Modified Date: 05 November 2019
  • Copyright Protected:
    Conjecture Corporation
  • Print this Article
Free Widgets for your Site/Blog
One-third of the world's population doesn't have access to a suitable toilet; more people have mobile phone access.  more...

November 16 ,  1933 :  Diplomatic relations between the US and the Soviet Union were established.  more...

Namespaces are unique forms of identification connected with a given organization that has created some type of XML schema. The main function for a namespace is to avoid any ambiguity in naming related to the Uniform Resource Identifier (URI). This is in spite of the fact that the label or title may be found in a variety of different metadata sets.

One easy way to think of a namespace is to consider this type of scoping construct as a specified set of closed names. Essentially, this set of closed names is divided in such a way that creates an attribute name for each function or class, but at the same time remains an identifiable construct in its own right. The result of this type of action is that the namespace can interact with all sorts of protocols, such as packages, modules, classes, and procedures.

A common component in the use of Extensible Markup Language or XML, the namespace makes it possible to distinguish one set of closed names from another, even if they contain some of the same elements and attribute names. The namespace provides a blanket means of identification for the particular collection of elements and allows the system to identify the collection as unique. Essentially, this happens by creating a blanket attribute name that includes the unique namespace followed by the local or functional element or attribute name.


The ability to use a namespace can be very helpful when there are similar elements used in the same XML document. For example, a single document may include the element type of garden, but within the construct actually address both vegetable and flower gardens. Being able to further define the nature of both types of gardens by creating a unique namespace for both involves nothing more than the creation of the unique names for the particular collections. The central element of “garden” still can be utilized in both instances, but the namespace will make it possible to focus in on one of the two types of gardens.

The multipart approach to creating a namespace makes it possible to use creating naming to make use of the same elements while still working with more than one related concept. From this perspective, the use of a namespace helps to simplify the process of recognizing and identifying various functional names for elements within the wider construct of the document. As a result, the ability to create a URI can also help simplify the process of creating the URLs that most users are familiar with as part of the browsing process in an Internet environment.


You might also Like


Discuss this Article

Post 3

"jet" is right. This article uses opaque jargon throughout. It's also hard to read because distracting ads keep popping up. For example, what's a "closed name"? And a "Uniform Resource Identifier?"


Post 2

Jet, you may want to search the wiseGEEK site to see if there are descriptions of these terms located in another topic; if not, consider submitting these as topics via the "Suggest a Topic" feature under "wiseGEEK Features" at the top of the page.

Post 1

I couldn't get a proper intro to NAMESPACE from my oxford dictionary, so I am studying your article in order to understand this term.

However, I got stuck at the first 2 paragraphs. Can you please explain in more simple words - XML SCHEMA, METADATA SETS and SCOPING CONSTRUCT.

Once, I get through the above, I think the rests should become easier.

Post your comments

Post Anonymously


forgot password?