fComponents.put(ENTITY_RESOLVER, null);
fComponents.put(ERROR_HANDLER, null);
if (System.getSecurityManager() != null) {
_isSecureMode = true;
setProperty(SECURITY_MANAGER, new SecurityManager());
} else {
fComponents.put(SECURITY_MANAGER, null);
}
fComponents.put(SYMBOL_TABLE, new SymbolTable());
// setup grammar pool
fComponents.put(XMLGRAMMAR_POOL, grammarContainer.getGrammarPool());
fUseGrammarPoolOnly = grammarContainer.isFullyComposed();
// add schema message formatter to error reporter
fErrorReporter.putMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN, new XSMessageFormatter());
// add all recognized features and properties and apply their defaults
addRecognizedParamsAndSetDefaults(fEntityManager, grammarContainer);
addRecognizedParamsAndSetDefaults(fErrorReporter, grammarContainer);
addRecognizedParamsAndSetDefaults(fSchemaValidator, grammarContainer);
// if the secure processing feature is set to true, add a security manager to the configuration
Boolean secureProcessing = grammarContainer.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING);
if (Boolean.TRUE.equals(secureProcessing)) {
fInitSecurityManager = new SecurityManager();
}
else {
fInitSecurityManager = null;
}
fComponents.put(SECURITY_MANAGER, fInitSecurityManager);