Elements and attributes behave differently with respect to default namespaces. This is often the source of confusion.
An attribute whose name has no prefix lives in no namespace, also when a default namespace is in scope.
<?xml version="1.0"?>
<foo attr="value" xmlns="http://www.example.com/my-namespace">
<!-- The attribute attr is in no namespace, even though
a default namespace is in scope. The element foo,
however, is in the default namespace. -->
</foo>