When we invent our own element names in XML we should use meaningful names. Now we often need to mix XML from more sources than one. Therefore we need namespaces. Namespaces are a means of distinguishing otherwise equal element names from different XML documents. Let us see the usage:
<a:bibliography version="5.0"
xmlns:a="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
<a:title>Litteratur</a:title>
<a:bibliomixed xml:id="Alls07">
<a:author>
<a:personname>
...
<xlink:link ...>
</a:bibliomixed>
</a:bibliography>
Important information is it that the seemingly meaningful URIs in the namespace declaration is not necessarily a browsable web address. It is a string intended to be a unique textual identifier of the namespace, a name. Namespace definitions must follow the rules of URIs. They are, however, not looked up, so you do not need to be on the net when testing XML.
Let me give an even more illustrative example that will also point towards the XSLT discussion to come:
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:b="http://docbook.org/ns/docbook"
xmlns="http://www.w3.org/1999/xhtml">
<!-- <xsl:strip-space elements="*"/>
<xsl:preserve-space elements="bibliomixed"/> -->
<xsl:param name="what">pba</xsl:param>
<xsl:template match="b:bibliography">
<html>
...
</xsl:template>
...
</xsl:stylesheet>
You will find several namespaces in use here, one being the default namespace, which is the one without a prefix.