Check Namespaces in XML for more information.
An XML namespace is a group of element and attribute names that belong to or describe a particular document style. Within a namespace, each of the names must be unique.
Namespace declarations fall into two types: default and prefixed.
A default namespace declaration has the following syntax:
A default namespace declaration applies to an element and all its descendants, unless the descendants have their own namespace declarations. If the root element has a namespace declaration, all the elements within this document that do not have an explicit declaration belong to this namespace.
The role of the URI is solely for providing an unique ID to the namespace.
A prefixed namespace declaration has the following syntax:
Within a prefixed namespace an element must contain the prefix name in its start and end tags in order to belong to the namespace:
In the above example the element room_no does not belong to the namespace agenda.
An attribute can be qualified by adding a namespace prefix like an element.
One cannot use the above colon syntax in namespaces, because this character is reserved for pseudo-elements and pseudo-classes. Instead, you should use the following general syntax:
Both the prefix and the URI must match the ones in the XML document.
If the namespace prefix is omitted, then the URI in the @namespace rule is considered to be the default one.
Any @namespace rules must come after all @import and @charset rules and before any style declarations. If a @namespace prefix is declared more than once, only the last instance is taken into effect.
Ones a namespace is declared, you can apply it to each CSS selector by using the syntax:
You can also use the wildcard symbol * with an obvious meaning:
Not all browsers support the @namespace rule. An approach implemented in the Internet Explorer is to use the following syntax instead:
This syntax is not supported by Firefox, Netscape, and Opera browsers.
As of today, the following trick works fine for combining two namespaces:
Check how it works. Do you know a simpler solution?