예제 #1
0
 public ValidatorHandlerImpl(XSGrammarPoolContainer grammarContainer) {
   this(new XMLSchemaValidatorComponentManager(grammarContainer));
   fComponentManager.addRecognizedFeatures(new String[] {NAMESPACE_PREFIXES});
   fComponentManager.setFeature(NAMESPACE_PREFIXES, false);
   setErrorHandler(null);
   setResourceResolver(null);
 }
예제 #2
0
 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}));
   }
 }