Global declarations require qualified name in the instance.
Local declarations are unqualified unless you specifically say otherwise.
If your declaration requires a qualified name, the namespace is the value of the 'targetNamespace' of the document where the declaration occurs.