"The 'http://www.w3.org/XML/1998/namespace:lang' attribute is not declared." "The 'http://www.w3.org/XML/1998/namespace:lang' attribute is not declared." xml xml

"The 'http://www.w3.org/XML/1998/namespace:lang' attribute is not declared."


Because many of the DTDs and XSDs originated from the W3C, they have the problem that many people try to resolve them from their servers, resulting in their being inundated with requests - millions and millions of them. So they started blocking "excessive" requests.

See this blog entry, which also applies to XSDs.

The solution is to use a local copy.


I'm pretty confident I've solved this one. I checked Fiddler and did see requests going out to w3c.org for the xsd file. A little more research turned up this link; remark #3 seemed to relate to my situation. So if for whatever reason my machine couldn't download the XSD file, then the xml namespace became unavailable. Sadly the real error ("could not reach w3c.org" or what have you) was never reported.

Removing the schemaLocation from the xs:import did the trick.