title: How to configure Xerces2-J to ingore xsi:schemaLocation hints?
body: <p>I am using Xerces2-J and have built a grammar pool as described in the <a href="https://xerces.apache.org/xerces2-j/faq-grammars.html#faq-1" rel="nofollow noreferrer">Grammars FAQ</a></p>
  <p>When parsing the document instance, I would like the parser to ignore any xsi:schemaLocation or xsi:noNamespaceSchemaLocation hints.</p>
  <p>The FAQ says</p>
  <blockquote>
  <p>registering a do-nothing EntityResolver will allow the application to deny validators from using any but the &quot;approved&quot; grammar set.</p>
  </blockquote>
  <p>How is a &quot;do-nothing&quot; entity resolver implemented? The entity resolver needs to implement the <a href="https://xerces.apache.org/xerces2-j/javadocs/xni/org/apache/xerces/xni/parser/XMLEntityResolver.html" rel="nofollow noreferrer">XMLEntityResolver</a> interface, which has one method:</p>
  <pre><code>public XMLInputSource resolveEntity(XMLResourceIdentifier resourceIdentifier)
      throws XNIException, IOException;
  </code></pre>
  <p>Returning <code>null</code> will default to the system behavior of trying to resolve the resourceIdentifier.  What return value can be used to simply ignore the resolveEntity request?</p>