I have a situation where we regularly get a bunch of XML files. We do not control them, and they have no namespace information, and we really would like to avoid changing them.
We have an XSD that we need to use to validate XML files, and which works if explicitly encoded for use. Now we would like to hint at the SAX parser that this particular XML dialect should be checked against this XSD (which we have in the file system), but I cannot find any other way than providing noNamespaceSchemaLocation in the XML file, which we really like to avoid.
Suggestions? Will an EntityResolver always be called with an empty / empty namespace?
(functional solution will give 500 bonus points when I will be allowed)
source
share