Default Namespaces Declaration

  • Usage:

    A default namespace is considered to apply to the element where it is declared (if that element has no namespace prefix), and to all elements with no prefix within the content of that element.

  • Notation:

    <test xmlns="" att="whatever">
  • Default Namespace Scoping Example:

    <test xmlns="" att="whatever">
      <child att2="value">
        <anotherchild xmlns="" att2="value"/>
  • Default Namespaces do not apply directly to attributes.

  • If the URI reference in a default Namespace declaration is empty (xmlns=""), then unprefixed elements in the scope of the declaration are not considered to be in any namespace.