Namespace declarations
- indirection: namespaces are declared by special attributes and associated prefixes
Example:
<... xmlns:foo="http://www.w3.org/TR/xhtml1">
...
<foo:head>...</foo:head>
...
</...>
xmlns:prefix="URI" declares a namespace
with a prefix and a URI.
-
Scope of declaration: lexical (the element containing the
declaration and all descendants - can be overridden by nested declaration)
-
Both element and attribute names can be qualified with namespaces.
Note: the prefix is just a proxy - applications should use only the URI.