The use of XML namespaces in your example is necessary because you have two table
elements in your document with different meaning. They are not the same. One comes from XHTML, the other from a W3 Schools vocabulary. You distinguish between them by "putting" the first table in the XHTML NS thanks to the local prefix h
which is bound to the http://www.w3.org/TR/html4/
NS and the second table
in the other NS thanks to the local prefix f
which is bound to the http://www.w3schools.com/furniture
NS. Now, by building expanded names and comparing URIs, we are able to differentiate between both elements. Note that prefixes are arbitrary.
The namespace URI is what allows us to identify uniquely the namespace. It is also called the namespace name. If you use an URL, you will take advantage of the uniqueness of domain names in the domain name system (DNS).
In Namespaces in XML 1.0 sections 2.1, we can read that:
An XML namespace is identified by a URI reference
And in section 2.3:
URI references identifying namespaces are compared when determining whether a name belongs to a given namespace, and whether two names belong to the same namespace. [Definition: The two URIs are treated as strings, and they are identical if and only if the strings are identical, that is, if they are the same sequence of characters. ] The comparison is case-sensitive, and no %-escaping is done or undone.
That means that when one (a program) has to compare NS URIs it does it only as raw string comparison. The URI doesn't have to be an URL pointing to a resource on the Internet (e.g. a web page accessible through HTTP).
Please note that the URI is used with a local name (name without colon) to build an expanded name i.e. a pair (URI, localName)
that you may write as {URI}localName
(James Clark notation) and that pair is used instead of local names alone. Both notations are not standard and cannot be used inside an XML document. It simply allows use to write things down. The namespace doesn't exist as such, but the recommendation explains how we use expanded names and how we can use a special attribute named xmlns to build such expanded names. That's it, no more, no less.
Let me suggest that your read Namespace Myths Exploded by Ronald Bourret.
Namespaces in XML 1.1 generalizes the usage of URIs to IRIs.