In any xsd files, there are many times we found an element type refered to a xml namespace, for example in the following xsd:
<xsd:element type='x:SOME_TYPE_NAME'>
Type of the element is mentioned in the namespace ‘x’ with name ‘SOME_TYPE_NAME’. I want definition or xsd definition of this type from that particular xml namespace. How do I do this? Please help.
First, note that there is no central authority providing the information you are looking for, and so there is no guarantee that for a given namespace x and type name SOME_TYPE_NAME there will be exactly one XSD type definition. There might be multiple schemas for the same namespace, which differ precisely in their definition of SOME_TYPE_NAME.
There is also no universal rule that says how the owner of a given namespace (here, the namespace bound to the prefix x) should organize schema documents for that namespace, or where they should go. In some cases, all schema documents used in a given system might be cached in some local schema repository (database management systems are very fond of this approach).
So things may vary a lot. But quite often, it’s possible to find the (or at least some) definition you are looking for.
The element declaration you quote refers to a type defined in a given namespace. If that’s not the target namespace of the schema document in which the declaration occurs, then the schema document must contain an explicit xsd:import element importing the namespace bound to prefix x. Quite often that xs:import element will carry a schemaLocation attribute which provides a hint about where to look for declarations in that namespace. The schemaLocation attribute is not required, and the validator is not obligated to dereference that URI (perhaps it has a local repository it prefers, or perhaps it has been invoked with a run-time parameter instructing it to look elsewhere), but many validators do follow the link by default (and even if they don’t, that URI is one place for you to look — the author of the schema document you’re reading has said there is a schema document there, and that’s a hint worth exploiting).
It is also often helpful to dereference the namespace name to see if there is any documentation there. Namespace owners have no obligation to put any dereferenceable documentation at a namespace name, and it’s often regarded as very bad practice for software to dereference a namespace name every time it sees an element in the namespace, but you’re not software, you’re a human being, and it’s not bad practice for you to dereference the namespace name. Some namespace owners place a schema document at the namespace name, some put a RDDL document (HTML expanded with machine-processable pointers to schemas, documentation, etc.) there.
And for some well known namespaces you can find documentation by the normal process of Web searching.