public ValidatorHandlerImpl(XSGrammarPoolContainer grammarContainer) { this(new XMLSchemaValidatorComponentManager(grammarContainer)); fComponentManager.addRecognizedFeatures(new String[] {NAMESPACE_PREFIXES}); fComponentManager.setFeature(NAMESPACE_PREFIXES, false); setErrorHandler(null); setResourceResolver(null); }
public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException { if (name == null) { throw new NullPointerException(); } try { fComponentManager.setFeature(name, value); } catch (XMLConfigurationException e) { final String identifier = e.getIdentifier(); final String key = e.getType() == XMLConfigurationException.NOT_RECOGNIZED ? "feature-not-recognized" : "feature-not-supported"; throw new SAXNotRecognizedException( SAXMessageFormatter.formatMessage(Locale.getDefault(), key, new Object[] {identifier})); } }