private boolean validateSchemaLocations(final String rootURI, final Map<String, String> schemaLocations,
                                            final FindXMLSchemaCriteria schemaConstraint) throws SAXException {
        final SchemaSet schemaSet = xmlSchemaCache.getSchemaSet(schemaConstraint);
        final String validLocations = schemaSet.getLocations();

        // Check that the root has a URI.
        if (rootURI == null || rootURI.trim().isEmpty()) {
            noNamespace(validLocations, schemaConstraint);
            return false;
        }

        // Make sure we have some schema locations.
        if (schemaLocations == null || schemaLocations.isEmpty()) {
            noSchemaLocations(validLocations, schemaConstraint);
            return false;
        }

        // Check that the root URI has a valid schema location.
        final String rootLocation = schemaLocations.get(rootURI);
        if (rootLocation == null) {
            noSchemaLocation(rootURI, validLocations, schemaConstraint);
            return false;
        }

        // Make sure the namespace or location for the root schema can be found
        // within the set of valid schemas.
        final XmlSchemaDoc bestMatch = schemaSet.getBestMatch(rootLocation, rootURI);
        if (bestMatch == null) {
            invalidSchemaLocation(rootLocation, validLocations, schemaConstraint);
            return false;
        }

        // Finally check that all of the schema locations are valid.
        final FindXMLSchemaCriteria findXMLSchemaCriteria = new FindXMLSchemaCriteria();
        findXMLSchemaCriteria.setUserRef(schemaConstraint.getUserRef());
        final SchemaSet allSchemas = xmlSchemaCache.getSchemaSet(findXMLSchemaCriteria);
        for (final Entry<String, String> entry : schemaLocations.entrySet()) {
            final String namespaceURI = entry.getKey();
            final String systemId = entry.getValue();
            final XmlSchemaDoc res = allSchemas.getBestMatch(systemId, namespaceURI);
            if (res == null) {
                invalidSchemaLocation(systemId, allSchemas.getLocations(), null);
                return false;
            } else if (res.isDeprecated()) {
                deprecatedSchema(systemId);
            }
        }

        return true;
    }
Sends characters to the current validator handler.

@param ch     Characters.
@param start  Start of char buffer.
@param length Number of chars to send.
@throws SAXException Not thrown.
@see stroom.pipeline.filter.AbstractXMLFilter#characters(char[],
int, int)
stroom-pipeline/src/main/java/stroom/pipeline/filter/SchemaFilter.java