Namespaces and Attributes : Attribute « Namespace « XML Tutorial






Attributes usually don't have namespaces the way elements do. 
They are just "associated" with the elements to which they belong. 

<person xmlns="http://www.java2s.com"
    <name id="25">
        <title>Sir</title>
    </name>
</person>

The id attribute is not part of this namespace.
The id attribute is simply associated with the <name> element.
If you used prefixes, you could specify that id is in a namespace. 

<a:person xmlns:a="http://www.java2s.com"
    <a:name a:id="25"
        <a:title>Sir</a:title>
    </a:name>
</a:person>








2.3.Attribute
2.3.1.Namespaces and Attributes