Namespace Topics:
Declaring
Specifications
Scope
Multiple
Using
Namespaces & Attributes

Tipworld -> XML -> Namespace
Specifications

One of the fundamental concepts behind XML can also be one of its biggest drawbacks. The ability to define your own markup language has proven to be a simple, yet powerful, tool--so much so, that new XML vocabularies are popping up faster than the weeds in my backyard. Now that we have all of these nifty XML vocabularies, there is a pretty good chance that somebody is using the same tag names you are. Commonly known as tag name collision, this is a fundamental problem with the XML spec and DTDs in general. What do you do when you want to combine two XML vocabularies and they both define the same element name with different semantic meanings? To address this problem, the W3C introduced XML namespaces, which basically allow you to define a context for a set of tags. The official definition from the XML namespace spec goes like this:

An XML namespace is a collection of names, identified by a URI reference [RFC2396], which are used in XML documents as element types and attribute names.

That's pretty ambiguous and, to be quite honest, I'm not so sure that namespaces really solve the problem. In the next few tips, I'll give you a brief introduction to what namespaces can (and can't) do. In the meantime, check out the specs below:

Namespaces in XML