They are not in any namespace at all.
The relevant section of the XML Namespaces spec includes this statement:
If there is no default namespace declaration in scope, the namespace name has no value.
In the terminology of that spec, an "expanded name" consists of a pair of values, the "namespace name" and the "local name". So you could represent the <Animal:Dog />
element as something like {'URN:ANIMAL', 'Dog'}
, and the <Visitor />
element as {null, 'Visitor'}
.
Unprefixed attributes are a little more curious, as discussed in this related question, because they don't take on the default namespace even if one is in scope:
The namespace name for an unprefixed attribute name always has no value.
Many people will loosely interpret the attribute as being in the same namespace as the element it is on, but this is not technically the case. <Animal:Dog name="Hachico" />
is not the same as <Animal:Dog Animal:name="Hachico" />
.