Well, that's easy.
The local attributes (that's what you call declared "inline") may be qualified and may be not. "Qualified" roughly means that the namespace prefix will be required.
This is controlled by the attributeFormDefault
attribute of your <xs:schema>
.
If you had specified:
<xs:schema id="so"
targetNamespace="http://test/so.xsd"
elementFormDefault="qualified"
attributeFormDefault="qualified"
xmlns="http://test/so.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
....
then, all local attributes would have to be qualified.
But by default, the value of attributeFormDefault
is "unqualified"
.
So, when you miss it, you have all local attributes unqualified (no namespace prefix needed).
Concerning global attributes (and only them you can include by reference), they must always be qualified. That's actually the rule for anything declared globally (and elements as well).