The reason for asking was I was thinking along the lines of
Programming Languages like C,C++ & Java where local variables have
this feature.Also , sometimes such questions let you know some
intricacies which you would have missed all along.

This is a personal opinion.

I think, the languages you've mentioned and XSD have different goals. C, C++ etc are general purpose languages and a feature in these languages to hide a global variable with a local one looks quite useful. XSD is used within a domain of XML validation (XSD schema doesn't have state. It is mostly a description of XML structure and specifies a collection of types). XSD schemas are usually much smaller than programs written in the other languages mentioned (I would say, there is a ratio of 1:100 roughly wrt line size for real world use). Wrt this feature, I feel there has been a trade-off (perhaps a good one) between the intended use and the cost of building this feature into XSD.