Namespaces are the standard tool for mixing multiple vocabularies into a single document. They are essential for allowing software to quickly and definitively decide which elements come from which applications, even when there's no potential conflict between names in the different applications. All new XML applications should define a namespace for their elements. Even if you don't plan to integrate your vocabulary with other applications, your users might want to integrate it with theirs.
This need not be particularly onerous. The simplest case, a document that uses a single namespace, can be handled with a single default namespace declaration on the root element. You don't even need to use namespace prefixes. For example, the following document places all elements in the http://namespaces.cafeconleche.org/chess namespace.
<?xml version="1.0"?> <game xmlns="http://namespaces.cafeconleche.org/chess"> <move>f3</move> <move>e5</move> <move>g4</move> <move>Qh4++</move> </game>
Of course, you should design all your processing so that it depends on the local name and namespace URI, rather than the namespace prefix (or lack thereof). The following document is exactly equivalent to the one above.
<?xml version="1.0"?> <chess:game xmlns:chess= "http://namespaces.cafeconleche.org/chess"> <chess:move>f3</chess:move> <chess:move>e5</chess:move> <chess:move>g4</chess:move> <chess:move>Qh4++</chess:move> </chess game>
Item 21 covers this further.