If someone has published an excellent vocabulary for describing demographic information and we are working on a vocabulary for an advertising application, we might wish to reuse the demographics tags within our own vocabulary. We should have a means of pointing back to some description of the vocabulary, both for the purposes of attribution and for maintaining a link to the authoritative source for the vocabulary. At a minimum, we want a way to identify a particular tag name usage as being defined in the demographics vocabulary. This prevents confusion when the same tag name is used by multiple vocabularies. If an element is marked as belonging to a particular vocabulary, the meaning should be unambiguous.
Declarations Let's review the syntax for XML namespaces.
The namespace applies to the named tag and its contents. If we are going to deal with a number of tags from the same namespace, it is convenient to declare the namespace at the highest possible level. Tags that are not qualified are assumed to belong to the containing namespace. Note that the URI need not refer to a DTD or other online definition. While that is useful, it is not a requirement.