Tipworld -> XML
Namespaces and Attributes
You're probably aware that an attribute cannot be specified twice for a single element. For example, the following is NOT valid:

<root x="1" x="2">

This gets a little more interesting when dealing with namespaces. For example, the following XML demonstrates some different combinations of namespaces and attributes that are all invalid:

<root xmlns:ns1="http://myserver.com"
xmlns:ns2="http://myserver.com" >
<child ns1:x="1" ns1:x="2" /> -- invalid for the same reasons
if you were not using a namespace
<child ns1:x="1" ns2:x="2" /> -- can't do this because ns1 and
ns2 are bound to identical namespace name
</root>

As a point of interest, note that the uniqueness of the namespace name does not apply to the default namespace. For example, here a default namespace is declared identical to ns1:

<root xmlns:ns1="http://myserver.com"
xmlns="http://myserver.com" >
<child ns1:x="1" x="2" /> -- this is ok
</root>